我在哪里可以找到reflect-metadata中使用的metadataKey值

时间:2017-02-23 17:09:01

标签: javascript angular typescript reflect-metadata

我使用的是typescript和Angular(2.4.7)

reflect-metadata是指神奇的字符串,在哪里可以找到它们的定义?例如"设计:输入"

function Type(type) { return Reflect.metadata("design:type", type); }
function ParamTypes(...types) { return Reflect.metadata("design:paramtypes", types); }
function ReturnType(type) { return Reflect.metadata("design:returntype", type); }

1 个答案:

答案 0 :(得分:1)

来自具有启用master_script.sh: line 14: [: =: unary operator expected master_script.sh: line 14: [: =: unary operator expected master_script.sh: line 19: [: !=: unary operator expected 选项

的typescript编译器

https://github.com/Microsoft/TypeScript/blob/ef25b25c1fb64602f99a6278f24d42c1b6d53d90/src/compiler/transformers/ts.ts#L1360-L1376

https://github.com/Microsoft/TypeScript/blob/ef25b25c1fb64602f99a6278f24d42c1b6d53d90/src/compiler/transformers/ts.ts#L1498-L1528

enter image description here