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:
Alex Eagle
2015-10-09 17:21:25 -07:00
committed by Alex Eagle
parent 95f984615b
commit 867c08ac84
69 changed files with 369 additions and 31 deletions

View File

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