HumanBreak/src/types/plugin.d.ts

30 lines
725 B
TypeScript
Raw Normal View History

2022-11-13 18:02:05 +08:00
// 这里包含所有插件导出的函数及变量声明声明的函数会在类型标注中标注到core上
2022-11-21 20:00:34 +08:00
type CanParseCss = keyof {
[P in keyof CSSStyleDeclaration as CSSStyleDeclaration[P] extends string
? P extends string
? P
: never
: never]: CSSStyleDeclaration[P];
};
2024-08-29 02:18:41 +08:00
interface PluginDeclaration {
init(): void;
_afterLoadResouce(): void;
2022-12-30 15:25:58 +08:00
}
2022-11-13 18:02:05 +08:00
type Forward<T> = {
[K in keyof T as T[K] extends Function
? K extends `_${string}`
? never
: K
: never]: T[K];
};
type ForwardKeys<T> = keyof Forward<T>;
2023-08-01 12:22:05 +08:00
2024-01-24 21:32:49 +08:00
declare const Mota: import('../game/system').IMota;
2023-08-01 12:22:05 +08:00
interface Window {
2024-01-24 21:32:49 +08:00
Mota: import('../game/system').IMota;
2023-08-01 12:22:05 +08:00
}