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

@ -3,6 +3,7 @@ import {Promise, PromiseWrapper} from 'angular2/src/core/facade/async';
import {isPresent, Type} from 'angular2/src/core/facade/lang';
export class AsyncRouteHandler implements RouteHandler {
/** @internal */
_resolvedComponent: Promise<any> = null;
componentType: Type;

View File

@ -80,7 +80,9 @@ export const APP_BASE_HREF: OpaqueToken = CONST_EXPR(new OpaqueToken('appBaseHre
*/
@Injectable()
export class Location {
/** @internal */
_subject: EventEmitter = new EventEmitter();
/** @internal */
_baseHref: string;
constructor(public platformStrategy: LocationStrategy,

View File

@ -99,6 +99,7 @@ export class RouteRecognizer {
return solutions;
}
/** @internal */
_redirect(urlParse: Url): Url {
for (var i = 0; i < this.redirects.length; i += 1) {
let redirector = this.redirects[i];

View File

@ -204,6 +204,7 @@ export class Router {
});
}
/** @internal */
_navigate(instruction: Instruction, _skipLocationChange: boolean): Promise<any> {
return this._settleInstruction(instruction)
.then((_) => this._canReuse(instruction))
@ -230,6 +231,7 @@ export class Router {
// guaranteed that the `componentType`s for the terminal async routes have been loaded by the time
// we begin navigation. The method below simply traverses instructions and resolves any components
// for which `componentType` is not present
/** @internal */
_settleInstruction(instruction: Instruction): Promise<any> {
var unsettledInstructions: Array<Promise<any>> = [];
if (isBlank(instruction.component.componentType)) {
@ -257,6 +259,7 @@ export class Router {
/*
* Recursively set reuse flags
*/
/** @internal */
_canReuse(instruction: Instruction): Promise<any> {
if (isBlank(this._outlet)) {
return _resolveToFalse;
@ -335,8 +338,10 @@ export class Router {
}
/** @internal */
_startNavigating(): void { this.navigating = true; }
/** @internal */
_finishNavigating(): void { this.navigating = false; }
@ -454,6 +459,7 @@ export class Router {
}
export class RootRouter extends Router {
/** @internal */
_location: Location;
constructor(registry: RouteRegistry, location: Location, primaryComponent: Type) {

View File

@ -3,6 +3,7 @@ import {Promise, PromiseWrapper} from 'angular2/src/core/facade/async';
import {Type} from 'angular2/src/core/facade/lang';
export class SyncRouteHandler implements RouteHandler {
/** @internal */
_resolvedComponent: Promise<any> = null;
constructor(public componentType: Type, public data?: Object) {

View File

@ -22,6 +22,7 @@ export class Url {
segmentToString(): string { return this.path + this._matrixParamsToString(); }
/** @internal */
_auxToString(): string {
return this.auxiliary.length > 0 ?
('(' + this.auxiliary.map(sibling => sibling.toString()).join('//') + ')') :
@ -36,6 +37,7 @@ export class Url {
return ';' + serializeParams(this.params).join(';');
}
/** @internal */
_childString(): string { return isPresent(this.child) ? ('/' + this.child.toString()) : ''; }
}