mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-13 12:37:16 +08:00
zone.js: Provides its own types (#15558)
This commit is contained in:
18
types/zone.js/index.d.ts
vendored
18
types/zone.js/index.d.ts
vendored
@@ -1,18 +0,0 @@
|
||||
// Type definitions for Zone.js
|
||||
// Project: https://github.com/angular/zone.js
|
||||
// Definitions by: angular team <https://github.com/angular/>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare class Zone {
|
||||
constructor(parentZone: Zone, data: any);
|
||||
|
||||
fork(locals?: {[key: string]: any}): Zone;
|
||||
bind(fn: Function, skipEnqueue?: boolean): void;
|
||||
bindOnce(fn: Function): any;
|
||||
run(fn: Function, applyTo?: any, applyWith?: any): void;
|
||||
isRootZone(): boolean;
|
||||
|
||||
static bindPromiseFn<T extends () => Promise<any>>(fn: T): T;
|
||||
|
||||
static longStackTraceZone: {[key: string]: any};
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"zone.js-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
|
||||
|
||||
declare var zone: Zone;
|
||||
|
||||
zone.fork().fork({
|
||||
beforeTask: function () {
|
||||
console.log('from beforeTask');
|
||||
}
|
||||
}).run(function () {
|
||||
console.log('from main');
|
||||
});
|
||||
Reference in New Issue
Block a user