From 45ac87d39ee5ba65c8845467cd0732a5e9a1024d Mon Sep 17 00:00:00 2001 From: Steve Ruiz Date: Tue, 11 Jun 2024 12:38:46 +0100 Subject: [PATCH] Add return info to StoreSideEffects methods (#3918) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add TSDoc return to the store methods. ### Change Type - [x] `sdk` — Changes the tldraw SDK - [x] `chore` — Updating dependencies, other boring stuff --- packages/store/src/lib/StoreSideEffects.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/store/src/lib/StoreSideEffects.ts b/packages/store/src/lib/StoreSideEffects.ts index b6c27a705..a4323b406 100644 --- a/packages/store/src/lib/StoreSideEffects.ts +++ b/packages/store/src/lib/StoreSideEffects.ts @@ -224,6 +224,8 @@ export class StoreSideEffects { * * @param typeName - The type of record to listen for * @param handler - The handler to call + * + * @returns A callback that removes the handler. */ registerBeforeCreateHandler( typeName: T, @@ -254,6 +256,8 @@ export class StoreSideEffects { * * @param typeName - The type of record to listen for * @param handler - The handler to call + * + * @returns A callback that removes the handler. */ registerAfterCreateHandler( typeName: T, @@ -288,6 +292,8 @@ export class StoreSideEffects { * * @param typeName - The type of record to listen for * @param handler - The handler to call + * + * @returns A callback that removes the handler. */ registerBeforeChangeHandler( typeName: T, @@ -317,6 +323,8 @@ export class StoreSideEffects { * * @param typeName - The type of record to listen for * @param handler - The handler to call + * + * @returns A callback that removes the handler. */ registerAfterChangeHandler( typeName: T, @@ -348,6 +356,8 @@ export class StoreSideEffects { * * @param typeName - The type of record to listen for * @param handler - The handler to call + * + * @returns A callback that removes the handler. */ registerBeforeDeleteHandler( typeName: T, @@ -380,6 +390,8 @@ export class StoreSideEffects { * * @param typeName - The type of record to listen for * @param handler - The handler to call + * + * @returns A callback that removes the handler. */ registerAfterDeleteHandler( typeName: T, @@ -413,6 +425,8 @@ export class StoreSideEffects { * * @param handler - The handler to call * + * @returns A callback that removes the handler. + * * @public */ registerOperationCompleteHandler(handler: StoreOperationCompleteHandler) {