Add return info to StoreSideEffects methods (#3918)

Add TSDoc return to the store methods.

### Change Type

- [x] `sdk` — Changes the tldraw SDK

- [x] `chore` — Updating dependencies, other boring stuff
This commit is contained in:
Steve Ruiz 2024-06-11 12:38:46 +01:00 committed by GitHub
parent 215ff308ba
commit 45ac87d39e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -224,6 +224,8 @@ export class StoreSideEffects<R extends UnknownRecord> {
* *
* @param typeName - The type of record to listen for * @param typeName - The type of record to listen for
* @param handler - The handler to call * @param handler - The handler to call
*
* @returns A callback that removes the handler.
*/ */
registerBeforeCreateHandler<T extends R['typeName']>( registerBeforeCreateHandler<T extends R['typeName']>(
typeName: T, typeName: T,
@ -254,6 +256,8 @@ export class StoreSideEffects<R extends UnknownRecord> {
* *
* @param typeName - The type of record to listen for * @param typeName - The type of record to listen for
* @param handler - The handler to call * @param handler - The handler to call
*
* @returns A callback that removes the handler.
*/ */
registerAfterCreateHandler<T extends R['typeName']>( registerAfterCreateHandler<T extends R['typeName']>(
typeName: T, typeName: T,
@ -288,6 +292,8 @@ export class StoreSideEffects<R extends UnknownRecord> {
* *
* @param typeName - The type of record to listen for * @param typeName - The type of record to listen for
* @param handler - The handler to call * @param handler - The handler to call
*
* @returns A callback that removes the handler.
*/ */
registerBeforeChangeHandler<T extends R['typeName']>( registerBeforeChangeHandler<T extends R['typeName']>(
typeName: T, typeName: T,
@ -317,6 +323,8 @@ export class StoreSideEffects<R extends UnknownRecord> {
* *
* @param typeName - The type of record to listen for * @param typeName - The type of record to listen for
* @param handler - The handler to call * @param handler - The handler to call
*
* @returns A callback that removes the handler.
*/ */
registerAfterChangeHandler<T extends R['typeName']>( registerAfterChangeHandler<T extends R['typeName']>(
typeName: T, typeName: T,
@ -348,6 +356,8 @@ export class StoreSideEffects<R extends UnknownRecord> {
* *
* @param typeName - The type of record to listen for * @param typeName - The type of record to listen for
* @param handler - The handler to call * @param handler - The handler to call
*
* @returns A callback that removes the handler.
*/ */
registerBeforeDeleteHandler<T extends R['typeName']>( registerBeforeDeleteHandler<T extends R['typeName']>(
typeName: T, typeName: T,
@ -380,6 +390,8 @@ export class StoreSideEffects<R extends UnknownRecord> {
* *
* @param typeName - The type of record to listen for * @param typeName - The type of record to listen for
* @param handler - The handler to call * @param handler - The handler to call
*
* @returns A callback that removes the handler.
*/ */
registerAfterDeleteHandler<T extends R['typeName']>( registerAfterDeleteHandler<T extends R['typeName']>(
typeName: T, typeName: T,
@ -413,6 +425,8 @@ export class StoreSideEffects<R extends UnknownRecord> {
* *
* @param handler - The handler to call * @param handler - The handler to call
* *
* @returns A callback that removes the handler.
*
* @public * @public
*/ */
registerOperationCompleteHandler(handler: StoreOperationCompleteHandler) { registerOperationCompleteHandler(handler: StoreOperationCompleteHandler) {