Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sedwards2009 opened this issue May 2, 2015 · 1 comment
Assignees
Labels
Fixed A PR has been merged for this issue Spec Issues related to the TypeScript language specification

Comments

@sedwards2009
Copy link

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.

sedwards2009 added a commit to sedwards2009/typescript-definition-toolkit that referenced this issue May 2, 2015
@RyanCavanaugh RyanCavanaugh added the Bug A bug in TypeScript label May 4, 2015
@mhegazy mhegazy added the Spec Issues related to the TypeScript language specification label May 4, 2015
@mhegazy mhegazy added this to the TypeScript 1.5.2 milestone May 4, 2015
@mhegazy mhegazy removed the Bug A bug in TypeScript label May 27, 2015
@mhegazy mhegazy modified the milestones: TypeScript 1.5.2, TypeScript 1.6 Jun 17, 2015
@ahejlsberg
Copy link
Member

Fixed in #4033.

@DanielRosenwasser DanielRosenwasser added the Fixed A PR has been merged for this issue label Aug 5, 2015
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Fixed A PR has been merged for this issue Spec Issues related to the TypeScript language specification
Projects
None yet
Development

No branches or pull requests

5 participants