chore: improve angular2.d.ts file

- support ambient and import format for .d.ts
This commit is contained in:
Misko Hevery
2015-07-02 22:26:07 +02:00
committed by Alex Eagle
parent 65a767d9b0
commit 0052c6b120
4 changed files with 50 additions and 25 deletions

View File

@ -9,11 +9,14 @@
interface List<T> extends Array<T> {}
interface Map<K,V> {}
interface StringMap<K,V> extends Map<K,V> {}
interface Type {}
declare type Type = ng.Type;
declare module "angular2/angular2" {
declare module ng {
type SetterFn = typeof Function;
type int = number;
interface Type extends Function {
new (...args);
}
// See https://github.com/Microsoft/TypeScript/issues/1168
class BaseException /* extends Error */ {
@ -22,4 +25,8 @@ declare module "angular2/angular2" {
toString(): string;
}
}
{% endblock %}
{% endblock %}
declare module "angular2/angular2" {
export = ng;
}