UNPKG

404 BTypeScriptView Raw
1/**
2 * Parameter decorator for an injected dependency marking the
3 * dependency as optional.
4 *
5 * For example:
6 * ```typescript
7 * constructor(@Optional() @Inject('HTTP_OPTIONS')private readonly httpClient: T) {}
8 * ```
9 *
10 * @see [Optional providers](https://docs.nestjs.com/providers#optional-providers)
11 *
12 * @publicApi
13 */
14export declare function Optional(): PropertyDecorator & ParameterDecorator;