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