fix: Dependency cycles

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2020-03-01 19:37:34 +08:00
parent 8c12319dc9
commit 6ada3e41d0
10 changed files with 62 additions and 14 deletions

View File

@@ -0,0 +1 @@
/// <reference path="./nashorn.d.ts" />

View File

@@ -0,0 +1,38 @@
declare global {
function print(...message: any[]): void;
function load(script: string | object);
function loadWithNewGlobal(script: string | object);
function exit(code?: number);
function quit(code?: number);
function JavaImporter(...className: string[]);
namespace Java {
function type(clazz: string): any;
function from(javaObj: any): any[];
function to(array: any[]): any;
function extend(...parentTypes: any[]);
//@ts-ignore
// function super(type: any);
}
interface Error {
readonly lineNumber?: number;
readonly columnNumber?: number;
readonly fileName?: string;
dumpStack?: Function;
printStackTrace?: Function;
getStackTrace?: () => any[];
}
interface String {
trimLeft();
trimRight();
}
interface Object {
setPrototypeOf(obj: object, prototype: object);
bindProperties(to: object, from: object);
}
}
export { };