Skip to content

[TS] breaking change in 0.11: ShadowRoot object is no longer assignable to second parameter of render() function #87

Description

@trusktr

The web component example now fails in TypeScript in 0.11:

    !this.shadowRoot && this.attachShadow({mode: 'open'});
    this.dispose = render(this.render.bind(this), this.shadowRoot!); // ERROR

The error is:

Argument of type 'ShadowRoot' is not assignable to parameter of type 'HTMLElement'.
  Type 'ShadowRoot' is missing the following properties from type 'HTMLElement': accessKey, accessKeyLabel, autocapitalize, dir, and 177 more.

In version 0.10, the type of the second parameter was Node, which a shadowRoot is assignable to.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions