Documents injecute 1.x · Migrating from 0.x
Skip to content

Type Alias: DisposeOption<T> ​

DisposeOption<T> = boolean | ((instance) => unknown)

Defined in: src/types.ts:143

How dispose() releases an instance: true (or unset, for singletons) calls [Symbol.asyncDispose] / [Symbol.dispose] when present, false skips it, a function disposes with it. When the service is a promise, the resolved value is disposed; a rejected one is skipped.

Type Parameters ​

T ​

T

Released under the MIT License.