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
15 lines
507 B
TypeScript
15 lines
507 B
TypeScript
import {RouteHandler} from './route_handler';
|
|
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) {
|
|
this._resolvedComponent = PromiseWrapper.resolve(componentType);
|
|
}
|
|
|
|
resolveComponentType(): Promise<any> { return this._resolvedComponent; }
|
|
}
|