ComponentEx.registerAsyncDisposable method
ComponentEx › registerAsyncDisposable
Registers anAsyncDisposable so its disposal starts when this component unloads, and returns it unchanged.Obsidian's unload is synchronous, so nothing awaits the disposal: it runs detached, and a failure is reported, never rethrown. See the free function registerAsyncDisposable, which this delegates to.
Signature:
registerAsyncDisposable(asyncDisposable: TAsyncDisposable): TAsyncDisposableParameters:
| Parameter | Type | Description |
|---|---|---|
| asyncDisposable | TAsyncDisposable | The async disposable to register. |
Returns: TAsyncDisposable — The same async disposable, for chaining.