Skip to content

Commit dad9338

Browse files
committed
docs(type): Export Type so that we can link to it in our docs.
Closes angular#3345
1 parent f6da89f commit dad9338

File tree

4 files changed

+8
-39
lines changed

4 files changed

+8
-39
lines changed

docs/docs-package/templates/angular2/angular2.d.ts.template.html

Lines changed: 0 additions & 32 deletions
This file was deleted.

docs/typescript-definition-package/templates/angular2/angular2.d.ts.template.html

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@
1111
interface StringMap<K,V> extends Map<K,V> {}
1212

1313
declare module ng {
14-
type SetterFn = typeof Function;
15-
type int = number;
16-
interface Type extends Function {
17-
new (...args: any[]): any;
18-
}
19-
2014
// See https://github.com/Microsoft/TypeScript/issues/1168
2115
class BaseException /* extends Error */ {
2216
message: string;

modules/angular2/core.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
export {appComponentTypeToken} from 'angular2/src/core/application_tokens';
77
export {ApplicationRef} from 'angular2/src/core/application_common';
8+
export {Type} from 'angular2/src/facade/lang';
89

910

1011
// Compiler Related Dependencies.

modules/angular2/src/facade/lang.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@ var _global: BrowserNodeGlobal = <any>(typeof window === 'undefined' ? global :
33
export {_global as global};
44

55
export var Type = Function;
6-
export type Type = new (...args: any[]) => any;
6+
7+
/**
8+
* Runtime representation of a type.
9+
*
10+
* In JavaScript a Type is a constructor function.
11+
*/
12+
export interface Type extends Function { new (...args): any; }
713

814
export function getTypeNameForDebugging(type: Type): string {
915
return type['name'];

0 commit comments

Comments
 (0)