Page Contents
metadata package
A package with utilities to help developers implement TypeScript decorators, define/merge metadata, and inspect metadata.
Remarks
Utilities:
- Reflector: Wrapper of reflect-metadata. - Decorator factories: A set of factories for class/method/property/parameter decorators to apply metadata to a given class and its static or instance members. - MetadataInspector: High level APIs to inspect a class and/or its members to get metadata applied by decorators.
Classes
Class | Description |
---|---|
ClassDecoratorFactory | Factory for class decorators |
DecoratorFactory | Base factory class for decorator functions |
MetadataAccessor | A strongly-typed metadata accessor via reflection |
MetadataInspector | Inspector for metadata applied by decorators |
MethodDecoratorFactory | Factory for method decorators |
MethodMultiDecoratorFactory | Factory for an append-array of method-level decorators The @response metadata for a method is an array. Each item in the array should be a single value, containing a response code and a single spec or Model. This should allow: |
MethodParameterDecoratorFactory | Factory for method level parameter decorator. |
NamespacedReflect | |
ParameterDecoratorFactory | Factory for parameter decorators |
PropertyDecoratorFactory | Factory for property decorators |
Interfaces
Interface | Description |
---|---|
DecoratorOptions | Options for a decorator |
DesignTimeMethodMetadata | Design time metadata for a method. |
InspectionOptions | Options for inspection |
MetadataMap | An object mapping keys to corresponding metadata |
Variables
Variable | Description |
---|---|
Reflector |
Type Aliases
Type Alias | Description |
---|---|
DecoratorType | Decorator function types |
MetadataKey | Key for metadata access via reflection |