1.0.0 • Published 4 years ago
schema2tsd v1.0.0
schema2tsd
编译 fengdie schema 为 TypeScript 类型定义文件。
Example
Object(跑马灯配置){
interval(间隔时间): Number,
}
↓ ↓ ↓ ↓ ↓ ↓
/**
* 跑马灯配置
*/
export interface ISchemaProps {
/**
* 间隔时间
*/
interval?: number;
}
Usage
$ npm i schema2tsd -D
$ npx schema2tsd --output src/typing.d.ts
$ npx schema2tsd --output src/typing.d.ts --schema config.schema
Options
--output
指定输出文件,默认是 src/typing.d.ts
。
--schema
指定 schema 文件,默认是 config.schema
。
LICENSE
MIT
1.0.0
4 years ago