mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-04-06 03:59:53 +08:00
* fix: 优化类型提示 * fix: 添加 enums 接口类型声明 * feat: 配置插件api提示 Co-authored-by: wanchun <445436867@qq.com>
26 lines
775 B
TypeScript
26 lines
775 B
TypeScript
import '@fesjs/fes';
|
|
|
|
interface EnumExtend {
|
|
key: string;
|
|
dir: string;
|
|
transfer<T>(data: T): T;
|
|
}
|
|
|
|
interface EnumApi {
|
|
get(name: string, key?: string, extend?: EnumExtend): any;
|
|
push(name: string, _enum?: [] | object, option?: { keyName: string; valueName: string }): any;
|
|
remove(name: string): void;
|
|
concat(name: string, _enum: [] | object, option?: { keyName: string; valueName: string; before: boolean; extend: EnumExtend }): any;
|
|
convert(name: string, _enum?: [] | object, option?: { keyName: string; valueName: string }): any;
|
|
}
|
|
|
|
declare module '@fesjs/fes' {
|
|
interface PluginBuildConfig {
|
|
enums?: {
|
|
[key: string]: [string | number, string | number][];
|
|
} | false;
|
|
}
|
|
|
|
export const enums: EnumApi;
|
|
}
|