You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
873 B
19 lines
873 B
import * as METADATA_KEY from "../constants/metadata_keys";
|
|
var MetadataReader = (function () {
|
|
function MetadataReader() {
|
|
}
|
|
MetadataReader.prototype.getConstructorMetadata = function (constructorFunc) {
|
|
var compilerGeneratedMetadata = Reflect.getMetadata(METADATA_KEY.PARAM_TYPES, constructorFunc);
|
|
var userGeneratedMetadata = Reflect.getMetadata(METADATA_KEY.TAGGED, constructorFunc);
|
|
return {
|
|
compilerGeneratedMetadata: compilerGeneratedMetadata,
|
|
userGeneratedMetadata: userGeneratedMetadata || {}
|
|
};
|
|
};
|
|
MetadataReader.prototype.getPropertiesMetadata = function (constructorFunc) {
|
|
var userGeneratedMetadata = Reflect.getMetadata(METADATA_KEY.TAGGED_PROP, constructorFunc) || [];
|
|
return userGeneratedMetadata;
|
|
};
|
|
return MetadataReader;
|
|
}());
|
|
export { MetadataReader };
|
|
|