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

_attachDom type signature is too restrictive #5665

Open
e111077 opened this issue Jun 11, 2020 · 1 comment
Open

_attachDom type signature is too restrictive #5665

e111077 opened this issue Jun 11, 2020 · 1 comment
Labels

Comments

@e111077
Copy link
Contributor

e111077 commented Jun 11, 2020

Description

_attachDom's docs say that it can be overriden to support any type of node that is not just only a shadow root. The return types though seem to be ShadowRoot | null which means that you cannot return this as an acceptable root.

* @return {ShadowRoot} node to which the dom has been attached.

_attachDom(dom: StampedTemplate|null): ShadowRoot|null;

Steps to Reproduce

  1. override _attachDom
  2. place the snippet below
  3. attempt to compile with closure or TS
_attachDom(dom) {
  this.appendChild(dom);
  return this;
}

Expected Results

no compilation error

Actual Results

compilation error

Browsers Affected

N/A

Versions

  • Polymer: v3.4.1
@stale
Copy link

stale bot commented Jun 16, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant