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/scriptcraft/src/main/ts/types/scriptcraft-core/index.d.ts

32 lines
967 B
TypeScript
Raw Normal View History

2020-04-28 16:44:44 +00:00
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;
2020-04-28 20:18:22 +00:00
interface String {
2020-08-26 21:52:17 +00:00
// eslint-disable-next-line @typescript-eslint/naming-convention
2020-04-28 20:18:22 +00:00
__quote(): string;
}
2020-04-28 16:44:44 +00:00
declare module 'scriptcraft-core' {
function addBridge(name: string, bridge: BridgeType): void;
function useBridge(name: string, ...args: readonly BridgeValueType[]): BridgeValueType;
}