Skip to content

Fix type declarations inadvertently referencing Polymer.Element. - #5084

Merged
aomarks merged 1 commit into
masterfrom
element-shadow
Feb 1, 2018
Merged

aomarks merged 1 commit into
masterfrom
element-shadow

Conversation

@aomarks

@aomarks aomarks commented Feb 1, 2018 •

Copy link
Copy Markdown
Contributor

Polymer defines its own Element class, shadowing the standard global Element class. This means that references to Element within the Polymer namespace inadvertently reference Polymer.Element. Here we define an alias of the global Element (called _Element), so that we can reference it from declarations within the Polymer namespace.

See microsoft/TypeScript#983 for general discussion of this shadowing problem in TypeScript.

Fixes #5074

Polymer defines its own `Element` class, shadowing the standard global
`Element` class. This means that references to `Element` within the
`Polymer` namespace inadvertently reference `Polymer.Element`. Here we
define an alias of the global `Element`, so that we can reference it
from declarations within the `Polymer` namespace.

See microsoft/TypeScript#983 for general
discussion of this shadowing problem in TypeScript.

Fixes #5074
@aomarks
aomarks merged commit 82cd3da into master Feb 1, 2018
@aomarks
aomarks deleted the element-shadow branch February 1, 2018 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants