This repository has been archived on 2023-11-26. You can view files and clone it, but cannot push or open issues or pull requests.
ScriptCraft/src/main/resources/scriptcraft/types/scriptcraft/index.d.ts

29 lines
767 B
TypeScript
Raw Normal View History

2020-04-25 13:33:17 +00:00
interface JavaObject {
discriminator: 'JavaObject';
}
2020-04-26 17:23:16 +00:00
type BridgeValueType = void | string | number | boolean | JavaObject | BridgeValueType[];
2020-04-25 13:33:17 +00:00
type BridgeType = (...args: BridgeValueType[]) => BridgeValueType;
interface ScriptCraft {
useBridge(name: string, ...args: BridgeValueType[]): BridgeValueType;
bridges: { [key: string]: BridgeType };
}
declare const __scriptcraft__: ScriptCraft;
interface Console {
log(...args: string[]): void;
info(...args: string[]): void;
warn(...args: string[]): void;
error(...args: string[]): void;
dir(...args: string[]): void;
debug(...args: string[]): void;
trace(...args: string[]): void;
assert(condition: boolean, ...args: string[]): void;
}
declare const console: Console;