forked from cipherxof/war3-transformer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.d.ts
28 lines (23 loc) · 1005 Bytes
/
types.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/** @noSelfInFile * */
declare type ObjectData = import('war3-objectdata-th').ObjectData;
declare type ConstantsType = {
abilities: typeof import('war3-objectdata-th').Abilities;
buffs: typeof import('war3-objectdata-th').Buffs;
destructables: typeof import('war3-objectdata-th').Destructables;
doodads: typeof import('war3-objectdata-th').Doodads;
items: typeof import('war3-objectdata-th').Items;
units: typeof import('war3-objectdata-th').Units;
upgrades: typeof import('war3-objectdata-th').Upgrades;
}
declare interface CompiletimeContext {
objectData: ObjectData;
fourCC: (id: string) => number;
log: (...any: any) => void;
constants: ConstantsType;
}
declare type CompiletimeReturnType = object | string | number | boolean | undefined | null | void;
declare type CompiletimeFunction = (ctx: CompiletimeContext) => CompiletimeReturnType;
/**
* @param fn Expression to be evaluated by Node.
*/
declare function compiletime(fn: CompiletimeFunction): CompiletimeReturnType;