fes.js/packages/fes-plugin-enums/types.d.ts

25 lines
770 B
TypeScript
Raw Normal View History

import '@fesjs/fes';
2022-03-29 14:26:05 +08:00
interface EnumExtend {
key: string;
dir: string;
transfer<T>(data: T): T;
2022-03-29 14:26:05 +08:00
}
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;
}
2022-03-29 14:26:05 +08:00
2022-11-10 17:48:34 +08:00
export const enums: EnumApi;
declare module '@fesjs/fes' {
interface PluginBuildConfig {
enums?: {
[key: string]: [string | number, string | number][];
} | false;
}
}