This commit is contained in:
crusader 2018-05-21 01:11:13 +09:00
parent da4e5c50a8
commit 529d717588
3 changed files with 5 additions and 3 deletions

View File

@ -22,7 +22,8 @@
"build": "npm run bundle && npm run generate:package && npm run generate:doc"
},
"dependencies": {
"@loafer/core": "^0.0.1"
"@loafer/core": "^0.0.1",
"reflect-metadata": "^0.1.12"
},
"devDependencies": {
"@types/jasmine": "~2.8.5",

View File

@ -24,7 +24,7 @@ import { NotSupportedDecoratorError } from './error';
export class DecoratorHelper {
public static register<AnnotationType extends Annotation>(annotation: AnnotationType, ...decoratorArgs: any[]) {
const annotationClass = TypeUtil.getType(annotation);
const annotationClass = Metadata.getType(annotation);
const name: string = annotationClass.name;
DecoratorHelper.registerAnnotation(name, annotation, decoratorArgs);
@ -46,7 +46,7 @@ export class DecoratorHelper {
const [target, propertyKey, descriptorOrParameterIndex] = decoratorArgs;
const clazz: Class = Class._defineClass(TypeUtil.getType(target));
const clazz: Class = Class._defineClass(Metadata.getType(target));
let field: Field = null;
let method: Method = null;
let parameter: Parameter = null;

View File

@ -37,6 +37,7 @@
"node_modules/@types"
],
"types": [
"reflect-metadata"
],
"lib": [
"es2015", "es2016", "es2017", "dom"