chore(typings): mark underscore methods @internal.
This allows TypeScript to produce an API surface which matches the Dart semantics. I found these with: gulp build.js.dev && find dist/js/dev/es5/angular2/src -name "*.d.ts" -exec grep -H -n '^ *_' {} \; Closes #4638
This commit is contained in:
@ -14,12 +14,15 @@ import {PromiseWrapper} from 'angular2/src/core/facade/async';
|
||||
*/
|
||||
@Injectable()
|
||||
export class Testability {
|
||||
/** @internal */
|
||||
_pendingCount: number = 0;
|
||||
/** @internal */
|
||||
_callbacks: Function[] = [];
|
||||
/** @internal */
|
||||
_isAngularEventPending: boolean = false;
|
||||
constructor(_ngZone: NgZone) { this._watchAngularEvents(_ngZone); }
|
||||
|
||||
constructor(public _ngZone: NgZone) { this._watchAngularEvents(_ngZone); }
|
||||
|
||||
/** @internal */
|
||||
_watchAngularEvents(_ngZone: NgZone): void {
|
||||
_ngZone.overrideOnTurnStart(() => { this._isAngularEventPending = true; });
|
||||
_ngZone.overrideOnEventDone(() => {
|
||||
@ -44,6 +47,7 @@ export class Testability {
|
||||
|
||||
isStable(): boolean { return this._pendingCount == 0 && !this._isAngularEventPending; }
|
||||
|
||||
/** @internal */
|
||||
_runCallbacksIfReady(): void {
|
||||
if (!this.isStable()) {
|
||||
return; // Not ready
|
||||
@ -76,6 +80,7 @@ export class Testability {
|
||||
|
||||
@Injectable()
|
||||
export class TestabilityRegistry {
|
||||
/** @internal */
|
||||
_applications = new Map<any, Testability>();
|
||||
|
||||
constructor() { testabilityGetter.addToWindow(this); }
|
||||
|
Reference in New Issue
Block a user