This repository was archived by the owner on Feb 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 408
chore: Fix type definitions #298
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import { Zone, ZoneDelegate, Task, ZoneSpec } from '../zone'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here |
||
'use strict'; | ||
(function() { | ||
const NEWLINE = '\n'; | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import { Zone, ZoneSpec, Task, ZoneDelegate, MicroTask } from '../zone'; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here |
||
(function() { | ||
class SyncTestZoneSpec implements ZoneSpec { | ||
runZone = Zone.current; | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import { Zone, ZoneSpec, Task, ZoneDelegate } from '../zone'; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here |
||
(function(global) { | ||
interface Wtf { trace: WtfTrace; } | ||
interface WtfScope {}; | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,7 +119,7 @@ | |
* zones are children of the root zone. | ||
* | ||
*/ | ||
interface Zone { | ||
export interface Zone { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will prevent the Zone from being imported ambiently. Sorry we can't do it that way. |
||
/** | ||
* | ||
* @returns {Zone} The parent Zone. | ||
|
@@ -212,7 +212,7 @@ interface Zone { | |
cancelTask(task: Task): any; | ||
} | ||
|
||
interface ZoneType { | ||
export interface ZoneType { | ||
/** | ||
* @returns {Zone} Returns the current [Zone]. Returns the current zone. The only way to change | ||
* the current zone is by invoking a run() method, which will update the current zone for the | ||
|
@@ -230,7 +230,7 @@ interface ZoneType { | |
* | ||
* Only the `name` property is required (all other are optional). | ||
*/ | ||
interface ZoneSpec { | ||
export interface ZoneSpec { | ||
/** | ||
* The name of the zone. Usefull when debugging Zones. | ||
*/ | ||
|
@@ -359,7 +359,7 @@ interface ZoneSpec { | |
* Note: The ZoneDelegate treats ZoneSpec as class. This allows the ZoneSpec to use its `this` to | ||
* store internal state. | ||
*/ | ||
interface ZoneDelegate { | ||
export interface ZoneDelegate { | ||
zone: Zone; | ||
fork(targetZone: Zone, zoneSpec: ZoneSpec): Zone; | ||
intercept(targetZone: Zone, callback: Function, source: string): Function; | ||
|
@@ -371,7 +371,7 @@ interface ZoneDelegate { | |
hasTask(targetZone: Zone, isEmpty: HasTaskState): void; | ||
} | ||
|
||
type HasTaskState = { | ||
export type HasTaskState = { | ||
microTask: boolean, | ||
macroTask: boolean, | ||
eventTask: boolean, | ||
|
@@ -381,11 +381,11 @@ type HasTaskState = { | |
/** | ||
* Task type: `microTask`, `macroTask`, `eventTask`. | ||
*/ | ||
type TaskType = string; /* TS v1.8 => "microTask" | "macroTask" | "eventTask" */; | ||
export type TaskType = string; /* TS v1.8 => "microTask" | "macroTask" | "eventTask" */; | ||
|
||
/** | ||
*/ | ||
interface TaskData { | ||
export interface TaskData { | ||
/** | ||
* A periodic [MacroTask] is such which get automatically rescheduled after it is executed. | ||
*/ | ||
|
@@ -414,7 +414,7 @@ interface TaskData { | |
* queue. This happens when the event fires. | ||
* | ||
*/ | ||
interface Task { | ||
export interface Task { | ||
/** | ||
* Task type: `microTask`, `macroTask`, `eventTask`. | ||
*/ | ||
|
@@ -464,15 +464,15 @@ interface Task { | |
zone: Zone; | ||
} | ||
|
||
interface MicroTask extends Task { | ||
export interface MicroTask extends Task { | ||
/* TS v1.8 => type: 'microTask'; */ | ||
} | ||
|
||
interface MacroTask extends Task { | ||
export interface MacroTask extends Task { | ||
/* TS v1.8 => type: 'macroTask'; */ | ||
} | ||
|
||
interface EventTask extends Task { | ||
export interface EventTask extends Task { | ||
/* TS v1.8 => type: 'eventTask'; */ | ||
} | ||
|
||
|
@@ -481,7 +481,7 @@ type AmbientZone = Zone; | |
/** @internal */ | ||
type AmbientZoneDelegate = ZoneDelegate; | ||
|
||
var Zone: ZoneType = (function(global) { | ||
export var Zone: ZoneType = (function(global) { | ||
class Zone implements AmbientZone { | ||
static __symbol__: (name: string) => string = __symbol__; | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import { Zone, ZoneDelegate } from '../lib/zone'; | ||
|
||
describe('longStackTraceZone', function () { | ||
var log; | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can not add this code here. If we do then Zones will be included in the
async-test.js
bundle as well aszone.js
bundle.Zone's is meant as a polyfil, and so it should be ambiently available.