Skip to content

Don't enforce naming restrictions in ambient declarations #8293

Closed
@RyanCavanaugh

Description

@RyanCavanaugh

There are some modules like this:

export declare namespace Foo {
  export var static: any;
}

We flag this as an error:

../../throwaway/clipboard.ts(2,14): error TS1214: Identifier expected. 'static' is a reserved word in strict mode. Modules are automatically in strict mode.

This is a mistake -- it's possible the actual library says something like e.g. Foo["static"] = expr, rather than actually making a literal static local; we should not treat this as an error. This is blocking some actual .d.ts files on DT.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions