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

(feat) update new typings #1606

Merged
merged 3 commits into from Aug 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -3,15 +3,15 @@
"range": { "start": { "line": 9, "character": 5 }, "end": { "line": 9, "character": 19 } },
"severity": 1,
"source": "ts",
"message": "Argument of type '{ \"this-is\": string; }' is not assignable to parameter of type 'HTMLProps<HTMLDivElement>'.\n Object literal may only specify known properties, and '\"this-is\"' does not exist in type 'HTMLProps<HTMLDivElement>'.",
"message": "Argument of type '{ \"this-is\": string; }' is not assignable to parameter of type 'HTMLAttributes<...> & EventsWithColon<HTMLProps<HTMLDivElement>> & svelteHTML.HTMLAttributes<...>'.\n Object literal may only specify known properties, and '\"this-is\"' does not exist in type 'HTMLAttributes<...> & EventsWithColon<HTMLProps<HTMLDivElement>> & svelteHTML.HTMLAttributes<...>'.",
"code": 2345,
"tags": []
},
{
"range": { "start": { "line": 10, "character": 6 }, "end": { "line": 10, "character": 9 } },
"severity": 1,
"source": "ts",
"message": "Argument of type '{ bar: string; }' is not assignable to parameter of type 'HTMLProps<HTMLDivElement>'.\n Object literal may only specify known properties, and 'bar' does not exist in type 'HTMLProps<HTMLDivElement>'.",
"message": "Argument of type '{ bar: string; }' is not assignable to parameter of type 'HTMLAttributes<...> & EventsWithColon<HTMLProps<HTMLDivElement>> & svelteHTML.HTMLAttributes<...>'.\n Object literal may only specify known properties, and 'bar' does not exist in type 'HTMLAttributes<...> & EventsWithColon<HTMLProps<HTMLDivElement>> & svelteHTML.HTMLAttributes<...>'.",
"code": 2345,
"tags": []
}
Expand Down
1,582 changes: 1,582 additions & 0 deletions packages/svelte2tsx/svelte-html-do-not-use.d.ts

Large diffs are not rendered by default.

608 changes: 5 additions & 603 deletions packages/svelte2tsx/svelte-jsx.d.ts

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion packages/svelte2tsx/svelte-native-jsx.d.ts
Expand Up @@ -7,7 +7,10 @@ declare namespace svelteNative.JSX {
): any;

function createElement<Elements extends IntrinsicElements, Key extends keyof Elements>(
element: Key, attrs: Elements[Key]
element: Key | undefined | null, attrs: Elements[Key]
): any;
function createElement<Elements extends IntrinsicElements, Key extends keyof Elements, T>(
element: Key | undefined | null, attrEnhancers: T, attrs: Elements[Key] & T
): any;


Expand Down