Skip to content

[spec] tsc accepts a TypeAliasDeclaration inside a AmbientExternalModuleDeclaration, the spec doesn't #3004

Closed
@sedwards2009

Description

@sedwards2009

According to the grammar in the spec a TypeAliasDeclaration not permitted to appear inside a AmbientExternalModuleDeclaration.

For example, on DefinitelyTyped acl.d.ts contains:

declare module "acl" {
  type strings = string|string[];
}

This doesn't conform to the grammar, but tsc 1.5.0-beta is happy to accept it though.

TypeAliasDeclaration just needs to be added to the production of AmbientModuleElement in the spec as far as I can tell.

Metadata

Metadata

Assignees

Labels

FixedA PR has been merged for this issueSpecIssues related to the TypeScript language specification

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions