Skip to content

@epikodelabs/streamix


@epikodelabs/streamix / src/public-api / injectOptional

Function: injectOptional()

injectOptional<T>(token): T | undefined

Defined in: projects/libraries/streamix/src/lib/atoms/scope.ts:298

Resolves an optional service from the current scope's container.

Falls back to the global container when called outside of a scope.

Type Parameters

T

T

Parameters

token

Token<T>

Returns

T | undefined

Released under the GNU AGPL v3 or later.