Open rchrdnsh opened 1 year ago
I had the same issue today. Running npm i @vime/svelte --force
worked but is not ideal.
I created a PR that could be reviewed and appears to fix the issue:
https://github.com/vime-js/vime/pull/373
I have some minimal local testing but because of the way this package is nested for deploy it's not super easy to just test with npm. Extra eyes are always appreciated on this but maybe we can get it merged if it works
I also started to receive the following typescript issues while attempting to use this with svelte 4.
Argument of type 'typeof Video' is not assignable to parameter of type 'ConstructorOfATypedSvelteComponent'.
Types of construct signatures are incompatible.
Type 'new (options: any) => Video' is not assignable to type 'new (args: { target: any; props?: any; }) => ATypedSvelteComponent'.
Construct signature return types 'Video' and 'ATypedSvelteComponent' are incompatible.
The types of '$on' are incompatible between these types.
Type '<K extends never>(type: K, callback: (e: VmVideoEvents[K]) => any) => () => void' is not assignable to type '(event: string, handler: ((e: any) => any) | null | undefined) => () => void'.
Types of parameters 'callback' and 'handler' are incompatible.
Type '((e: any) => any) | null | undefined' is not assignable to type '(e: never) => any'.
Type 'undefined' is not assignable to type '(e: never) => any'.
Possible causes:
- You use the instance type of a component where you should use the constructor type
- Type definitions are missing for this Svelte Component. If you are using Svelte 3.31+, use SvelteComponentTyped to add a definition:
import type { SvelteComponentTyped } from "svelte";
class ComponentName extends SvelteComponentTyped<{propertyName: string;}> {}
Get the following errors when trying to install the svelte bindings for a sveltekit project using svelte 4:
please test and update dependencies accordingly.
Thank you!