Function onFinishWork
- onFinishWork<T extends FinishHandler>(
handler: T | (() => T),
options?: { uniqueTag?: string | symbol },
): TType Parameters
- T extends FinishHandler
Type of the handler to register.
Parameters
- handler: T | (() => T)
Handler to register. If a function is passed, it is called to get the handler. Ignored if a handler is already present
Optional
options: { uniqueTag?: string | symbol }uniqueTag: Unique tag to register the handler with. If a handler is already registered with this tag, it is replaced.
Returns T
The newly registerd handler. If uniqueTag is set, the originally registered handler is returned
- T extends FinishHandler
Register a finish hander for the current work with the specified tag