feat: move global declare to @ms/ployfill

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2020-02-01 02:44:23 +08:00
parent 39e899211b
commit 8c4f266356
4 changed files with 30 additions and 13 deletions

View File

@@ -0,0 +1,34 @@
import { XMLHttpRequest as xhr } from './xml-http-request'
declare global {
namespace NodeJS {
interface Global {
logger: any;
debug: boolean;
level: string;
NashornEngineStartTime: number;
setGlobal: (key: string, value: any) => void;
noop: () => void;
console: Console;
}
}
var root: string;
var base: Core;
var XMLHttpRequest: typeof xhr;
var ScriptEngineContextHolder: any;
function engineLoad(str: string): any;
interface Core {
getClass(name: String): any;
getProxyClass(): any;
getInstance(): any;
read(path: string): string;
save(path: string, content: string): void;
delete(path: string): void;
}
interface Console {
ex(err: Error): void;
stack(err: Error): string[];
sender(...args: any): void;
console(...args: any): void;
}
}
export { }