Workspace.on('quit') method
Workspace › on(‘quit’)
Official
Triggered when the app is about to quit. Not guaranteed to actually run. Perform some best effort cleanup here.Signature:
on(name: "quit", callback: (tasks: Tasks) => unknown, ctx?: unknown): EventRefParameters:
| Parameter | Type | Description |
|---|---|---|
| name | "quit" | Should be 'quit'. |
| callback | (tasks: Tasks) => unknown | The callback function. |
| ctx? | unknown | The context passed as this to the callback function. |
Returns: EventRef — The event reference.
Example:
app.workspace.on('quit', (tasks: Tasks) => { console.log(tasks);});