MetadataManager
Index
Constructors
Properties
Methods
- attachMetadata
- copyMetadata
- copyOwnMetadata
- defineMetadata
- deleteMetadata
- ensureTargetType
- getMetadata
- getMetadataKeys
- getMethodParamTypes
- getMethodReturnTypes
- getOwnMetadata
- getOwnMetadataKeys
- getOwnPropertiesWithMetadata
- getPropertiesWithMetadata
- getPropertyType
- hasMetadata
- hasOwnMetadata
- transformTypeFromTSDesign
Constructors
constructor
Properties
publicstaticObjectType
publicstaticreadonlyemptyValueSymbol
A symbol that represents an empty value
Methods
publicstaticattachMetadata
Attaches metadata for a target class or property Value will push to the end of the metadata array and save for own metadata
publicstaticcopyMetadata
Copies metadata from a source class or property to a target class or property
publicstaticcopyOwnMetadata
Copies own metadata from a source class or property to a target class or property
publicstaticdefineMetadata
Defines metadata for a target class or property Value will replace the existing metadata
publicstaticdeleteMetadata
Deletes metadata for a target class or property
publicstaticensureTargetType
publicstaticgetMetadata
Retrieves metadata for a target class or property
Type parameters
- T = any
publicstaticgetMetadataKeys
Get all metadata keys on the entire prototype chain Because we need to get metadata on the entire prototype chain, we do not use cache here, so the performance is poor
publicstaticgetMethodParamTypes
Get parameters type by reflect-metadata
publicstaticgetMethodReturnTypes
Gets the type of a property from Reflect metadata
publicstaticgetOwnMetadata
Retrieves own metadata for a target class or property
Type parameters
- T = any
publicstaticgetOwnMetadataKeys
Get metadata keys on the current class or object
publicstaticgetOwnPropertiesWithMetadata
Retrieves all properties of the current class that have a specific metadata key and their metadata values.
Type parameters
- T = any
publicstaticgetPropertiesWithMetadata
Retrieves all properties of the class and its prototype chain that have a specific metadata key and their metadata values.
Type parameters
- T = any
publicstaticgetPropertyType
Get property(method) type from metadata
publicstatichasMetadata
Checks if metadata exists for a target class or property
publicstatichasOwnMetadata
Checks if own metadata exists for a target class or property
A class that manages metadata for classes and properties This class is a simplified version of the Reflect Metadata API Provides a way to retrieve, define, delete and copy metadata
4.0.0