0.0.3 • Published 5 years ago
ts-metadata v0.0.3
ts-metadata
typescript 元数据操作, 提取/删除
Install
npm install --save ts-metadata
Usage
import ts from "typescript";
import Compiler from "ts-metadata";
const compiler = new Compiler({
enableLog: true,
rootNames: ['xxx.ts'],
options: {
target: ts.ScriptTarget.Latest,
module: ts.ModuleKind.CommonJS,
},
});
compiler.getMetadataByDecorator({
classDecorators: ["Component", "InputType", "Props"],
propsDecorators: ["Design", "Foo"],
});
License
MIT © galaa2011