mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 07:13:45 -05:00
Merge pull request #5390 from maybejulian/declareOnTypeAliasInDts
Allow type aliases to omit 'declare' keyword in '.d.ts' files
This commit is contained in:
@@ -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 ||
|
||||
|
||||
Reference in New Issue
Block a user