31 lines
898 B
TypeScript
31 lines
898 B
TypeScript
interface JavaObject {
|
|
discriminator: 'JavaObject';
|
|
}
|
|
|
|
type BridgeValueType = void | string | number | boolean | JavaObject | BridgeValueType[];
|
|
type BridgeType = (...args: readonly BridgeValueType[]) => BridgeValueType;
|
|
|
|
interface Console {
|
|
log(...args: readonly string[]): void;
|
|
info(...args: readonly string[]): void;
|
|
warn(...args: readonly string[]): void;
|
|
error(...args: readonly string[]): void;
|
|
dir(...args: readonly string[]): void;
|
|
debug(...args: readonly string[]): void;
|
|
trace(...args: readonly string[]): void;
|
|
|
|
assert(condition: boolean, ...args: readonly string[]): void;
|
|
}
|
|
|
|
declare const console: Console;
|
|
|
|
interface String {
|
|
__quote(): string;
|
|
}
|
|
|
|
declare module 'scriptcraft-core' {
|
|
function addBridge(name: string, bridge: BridgeType): void;
|
|
|
|
function useBridge(name: string, ...args: readonly BridgeValueType[]): BridgeValueType;
|
|
}
|