You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm getting multiple type errors in svelte2tsx after disabling skipLibCheck:
/home/user/project/node_modules/svelte2tsx/svelte-jsx.d.ts:49:95
Error: Type 'Property' cannot be used to index type 'IntrinsicElements'.
Omit<
Omit<import('svelte/elements').SvelteHTMLElements[Property], keyof EventsWithColon<Omit<svelte.JSX.IntrinsicElements[Property & string], svelte.JSX.AttributeNames>>> & EventsWithColon<Omit<svelte.JSX.IntrinsicElements[Property & string], svelte.JSX.AttributeNames>>,
keyof Override
/home/user/project/node_modules/svelte2tsx/svelte-jsx.d.ts:49:196
Error: Type 'Property' cannot be used to index type 'IntrinsicElements'.
Omit<
Omit<import('svelte/elements').SvelteHTMLElements[Property], keyof EventsWithColon<Omit<svelte.JSX.IntrinsicElements[Property & string], svelte.JSX.AttributeNames>>> & EventsWithColon<Omit<svelte.JSX.IntrinsicElements[Property & string], svelte.JSX.AttributeNames>>,
keyof Override
/home/user/project/node_modules/svelte2tsx/svelte-jsx.d.ts:60:13
Error: Interface 'IntrinsicElements' incorrectly extends interface 'SvelteHTMLElements'.
The types of ''svelte:window'['on:devicemotion']' are incompatible between these types.
Type 'EventHandler<DeviceMotionEvent, HTMLElement> | null | undefined' is not assignable to type 'EventHandler<DeviceMotionEvent, Element> | null | undefined'.
Type 'EventHandler<DeviceMotionEvent, HTMLElement>' is not assignable to type 'EventHandler<DeviceMotionEvent, Element>'.
Types of parameters 'event' and 'event' are incompatible.
Type 'DeviceMotionEvent & { currentTarget: EventTarget & Element; }' is not assignable to type 'DeviceMotionEvent & { currentTarget: EventTarget & HTMLElement; }'.
Type 'DeviceMotionEvent & { currentTarget: EventTarget & Element; }' is not assignable to type '{ currentTarget: EventTarget & HTMLElement; }'.
Types of property 'currentTarget' are incompatible.
Type 'EventTarget & Element' is not assignable to type 'EventTarget & HTMLElement'.
Type 'EventTarget & Element' is missing the following properties from type 'HTMLElement': accessKey, accessKeyLabel, autocapitalize, dir, and 123 more.
// the following type construct makes sure that we can use the new typings while maintaining backwards-compatibility in case someone enhanced the old typings
interface IntrinsicElements extends Omit<RemoveIndex<svelte.JSX.IntrinsicElements>, keyof RemoveIndex<import('svelte/elements').SvelteHTMLElements>> {
a: HTMLProps<'a', HTMLAttributes>;
/home/user/project/node_modules/svelte2tsx/svelte-jsx.d.ts:246:5
Error: Duplicate index signature for type 'string'.
[name: string]: { [name: string]: any };
}
svelte-jsx and svelte-shims are used for Svelte 3 only, and are likely out of date, yet we don't want to invest time into adjusting them anymore, therefore silence any type errors in it.
Helps with #2498
Pushed a commit that helps silence this, release pending. But ultimately this is a misuage of svelte2tsx within Svelte Material UI. I opened hperrin/svelte-material-ui#665 for that.
Describe the bug
Hello, I'm getting multiple type errors in
svelte2tsx
after disablingskipLibCheck
:Reproduction
skaut/shared-drive-mover#1741
Expected behaviour
No error
System Info
Which package is the issue about?
svelte2tsx
Additional Information, eg. Screenshots
Svelte2tsx v0.7.17
The text was updated successfully, but these errors were encountered: