- Preparing search index...
- The search index is not available
Ditox.js
- optional<T>(token: Token<T>, optionalValue: T): OptionalToken<T>
-
Returns OptionalToken<T>
- optional<T>(token: Token<T>): OptionalToken<T | undefined>
-
Returns OptionalToken<T | undefined>
Decorate a token with an optional value. This value is be used as default value in case a container does not have registered token.