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

getDefaultValuesFromConstructorVisitor make incorrect fields in class members #210

Open
2 tasks done
elasim opened this issue May 11, 2023 · 0 comments
Open
2 tasks done

Comments

@elasim
Copy link

elasim commented May 11, 2023

Checklist

  • Did you run the analyzer with the --dev flag to get more information?
  • Did you create a minimal reproduction in the playground?

Completing the items above will greatly improve triaging time of your issue.

Reproduction URL:
https://custom-elements-manifest.netlify.app/?source=CmNsYXNzIE15RWxlbWVudCBleHRlbmRzIEhUTUxFbGVtZW50IHsKICAjZGF0YSA9IG5ldyBjbGFzcyBleHRlbmRzIFNvbWVXSGVyZSB7CiAgICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgICAgdGhpcy5maWVsZElzTm90TWVtYmVyT2ZNeUVsZW1lbnQgPSAwOwogICAgICB9CiAgfQogIHN0YXRpYyBnZXQgb2JzZXJ2ZWRBdHRyaWJ1dGVzKCkgewogICAgcmV0dXJuIFsnZGlzYWJsZWQnXTsKICB9CgogIHNldCBkaXNhYmxlZCh2YWwpIHsKICAgIHRoaXMuX19kaXNhYmxlZCA9IHZhbDsKICB9CiAgZ2V0IGRpc2FibGVkKCkgewogICAgcmV0dXJuIHRoaXMuX19kaXNhYmxlZDsKICB9CgogIGZpcmUoKSB7CiAgICB0aGlzLmRpc3BhdGNoRXZlbnQobmV3IEV2ZW50KCdkaXNhYmxlZC1jaGFuZ2VkJykpOwogIH0KfQoKY3VzdG9tRWxlbWVudHMuZGVmaW5lKCdteS1lbGVtZW50JywgTXlFbGVtZW50KTsK&library=vanilla

Expected behavior
A clear and concise description of what you expected to happen.

fieldIsNotMemberOfMyElement should not be part of the members declared in MyElement.

In my opinion, if node.kind is ts.SyntaxKind.PropertyDeclaration at the following location, ts.forEachChild should not be executed.

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

1 participant