feat: 🎸 根据低代码协议文档, 完善UtilsMap的定义

This commit is contained in:
牧毅 2020-08-13 00:13:45 +08:00
parent 7901c8e96d
commit 7fe4bc0ac1

View File

@ -1,13 +1,21 @@
import { NpmInfo } from './npm';
import { JSExpression, JSFunction } from './value-type';
export type UtilsMap = Array<
| {
name: string;
type: 'npm';
content: NpmInfo;
}
| {
name: string;
type: '';
}
>;
export type UtilItem =
| {
name: string;
type: 'npm';
content: NpmInfo;
}
| {
name: string;
type: 'tnpm';
content: NpmInfo;
}
| {
name: string;
type: 'function';
content: JSFunction | JSExpression;
};
export type UtilsMap = UtilItem[];