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.
22 lines
1.1 KiB
22 lines
1.1 KiB
define(["require", "exports", "../constants/metadata_keys"], function (require, exports, METADATA_KEY) {
|
|
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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;
|
|
}());
|
|
exports.MetadataReader = MetadataReader;
|
|
});
|
|
|