Merge pull request #5390 from maybejulian/declareOnTypeAliasInDts

Allow type aliases to omit 'declare' keyword in '.d.ts' files
This commit is contained in:
Mohamed Hegazy
2015-10-25 23:26:18 -07:00
4 changed files with 19 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
=== tests/cases/compiler/typeAliasDeclareKeyword01.d.ts ===
type Foo = number;
>Foo : Symbol(Foo, Decl(typeAliasDeclareKeyword01.d.ts, 0, 0))
declare type Bar = string;
>Bar : Symbol(Bar, Decl(typeAliasDeclareKeyword01.d.ts, 0, 18))

View File

@@ -0,0 +1,7 @@
=== tests/cases/compiler/typeAliasDeclareKeyword01.d.ts ===
type Foo = number;
>Foo : number
declare type Bar = string;
>Bar : string

View File

@@ -0,0 +1,2 @@
type Foo = number;
declare type Bar = string;