zone.js: Provides its own types (#15558)

This commit is contained in:
Andy
2017-04-17 08:25:01 -07:00
committed by GitHub
parent ec985e9ded
commit 2fd5e227fb
4 changed files with 6 additions and 52 deletions

View File

@@ -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};
}

View File

@@ -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"
]
}

View File

@@ -1,11 +0,0 @@
declare var zone: Zone;
zone.fork().fork({
beforeTask: function () {
console.log('from beforeTask');
}
}).run(function () {
console.log('from main');
});