docs(type): Export Type so that we can link to it in our docs.
Closes #3345
This commit is contained in:
parent
f6da89f74f
commit
dad9338c82
|
@ -1,32 +0,0 @@
|
|||
{% extends '../type-definition.template.html' %}
|
||||
{% block staticDeclarations %}
|
||||
// Angular depends transitively on these libraries.
|
||||
// If you don't have them installed you can run
|
||||
// $ tsd query es6-promise rx rx-lite --action install --save
|
||||
///<reference path="../es6-promise/es6-promise.d.ts"/>
|
||||
///<reference path="../rx/rx.d.ts"/>
|
||||
|
||||
interface List<T> extends Array<T> {}
|
||||
interface Map<K,V> {}
|
||||
interface StringMap<K,V> extends Map<K,V> {}
|
||||
|
||||
declare module ng {
|
||||
type SetterFn = typeof Function;
|
||||
type int = number;
|
||||
interface Type extends Function {
|
||||
new (...args): any;
|
||||
}
|
||||
|
||||
// See https://github.com/Microsoft/TypeScript/issues/1168
|
||||
class BaseException /* extends Error */ {
|
||||
message: string;
|
||||
stack: string;
|
||||
toString(): string;
|
||||
}
|
||||
interface InjectableReference {}
|
||||
}
|
||||
{% endblock %}
|
||||
|
||||
declare module "angular2/angular2" {
|
||||
export = ng;
|
||||
}
|
|
@ -11,12 +11,6 @@ interface Map<K,V> {}
|
|||
interface StringMap<K,V> extends Map<K,V> {}
|
||||
|
||||
declare module ng {
|
||||
type SetterFn = typeof Function;
|
||||
type int = number;
|
||||
interface Type extends Function {
|
||||
new (...args: any[]): any;
|
||||
}
|
||||
|
||||
// See https://github.com/Microsoft/TypeScript/issues/1168
|
||||
class BaseException /* extends Error */ {
|
||||
message: string;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
export {appComponentTypeToken} from 'angular2/src/core/application_tokens';
|
||||
export {ApplicationRef} from 'angular2/src/core/application_common';
|
||||
export {Type} from 'angular2/src/facade/lang';
|
||||
|
||||
|
||||
// Compiler Related Dependencies.
|
||||
|
|
|
@ -3,7 +3,13 @@ var _global: BrowserNodeGlobal = <any>(typeof window === 'undefined' ? global :
|
|||
export {_global as global};
|
||||
|
||||
export var Type = Function;
|
||||
export type Type = new (...args: any[]) => any;
|
||||
|
||||
/**
|
||||
* Runtime representation of a type.
|
||||
*
|
||||
* In JavaScript a Type is a constructor function.
|
||||
*/
|
||||
export interface Type extends Function { new (...args): any; }
|
||||
|
||||
export function getTypeNameForDebugging(type: Type): string {
|
||||
return type['name'];
|
||||
|
|
Loading…
Reference in New Issue