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

@@ -15979,11 +15979,14 @@ namespace ts {
// DeclarationElement:
// ExportAssignment
// export_opt InterfaceDeclaration
// export_opt TypeAliasDeclaration
// export_opt ImportDeclaration
// export_opt ExternalImportDeclaration
// export_opt AmbientDeclaration
//
// TODO: The spec needs to be amended to reflect this grammar.
if (node.kind === SyntaxKind.InterfaceDeclaration ||
node.kind === SyntaxKind.TypeAliasDeclaration ||
node.kind === SyntaxKind.ImportDeclaration ||
node.kind === SyntaxKind.ImportEqualsDeclaration ||
node.kind === SyntaxKind.ExportDeclaration ||