Skip to content
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

polymer.dom() also accepts type 'event' #65

Open
DanielJoyce opened this issue Dec 30, 2015 · 3 comments
Open

polymer.dom() also accepts type 'event' #65

DanielJoyce opened this issue Dec 30, 2015 · 3 comments

Comments

@DanielJoyce
Copy link

https://www.polymer-project.org/1.0/docs/devguide/events.html

Polymer.dom(event).localTarget/path/rootTarget

This needs to be added to polymer-ts.d.ts

Starting line 57

interface dom {
    (event: Event): Dom.api.Event;
    (node: HTMLElement): HTMLElement;
    (node: polymer.Base): HTMLElement;
    flush(): any;
}

This solves the errors I am getting from atom-typescript and it runs fine.

@nippur72
Copy link
Owner

What is Dom in Dom.api.Event ? I can't find it.

@DanielJoyce
Copy link
Author

interface dom {
    (event: Event): Polymer.DomApi.Event;
    (node: HTMLElement): HTMLElement;
    (node: polymer.Base): HTMLElement;
    flush(): any;
}

Polymer provides DomApi for wrapping shady/shadow/events and making them look the same. Looks like maybe there is no ambient typing right now for DomApi?

https://github.com/Polymer/polymer/blob/master/src/lib/dom-api.html

@kpgarrod
Copy link

@DanielJoyce I don't understand how you managed to clear the errors from Atom Typescript without typings for Polymer.DomApi. Am I missing something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants