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

Allowing 'part' attributes #703

Closed
megasys1968 opened this issue Dec 8, 2020 · 0 comments
Closed

Allowing 'part' attributes #703

megasys1968 opened this issue Dec 8, 2020 · 0 comments
Labels
bug Something isn't working Fixed Fixed in master branch. Pending production release.

Comments

@megasys1968
Copy link

Is your feature request related to a problem? Please describe.

I'm developing a custom element in Svelte and when I specify 'part' attribute, I get an error on the VS Code.

image

Type '{ part: string; }' is not assignable to type 'HTMLProps<HTMLDivElement>'.
  Property 'part' does not exist on type 'HTMLProps<HTMLDivElement>'.

However, the compilation finished successfully and 'part' attribute works.

Describe the solution you'd like

Add 'part' property to HTMLAttributes interface, like this:

interface HTMLAttributes<T extends EventTarget> extends DOMAttributes<T> {
  ...
  part?: string;
}

When I try to apply it to svelte-jsx.d.ts, which is used by Svelte for VS Code, the error disappear.

Describe alternatives you've considered
No.

Additional context
No.

I am not a native English speaker. Sorry if my explanation is wrong.

@dummdidumm dummdidumm added the bug Something isn't working label Dec 8, 2020
dummdidumm added a commit that referenced this issue Dec 8, 2020
@dummdidumm dummdidumm added the Fixed Fixed in master branch. Pending production release. label Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Fixed Fixed in master branch. Pending production release.
Projects
None yet
Development

No branches or pull requests

2 participants