Skip to content

ERROR in src/app.ts:4:15 TS2345: Argument of type 'typeof SvelteComponentDev' is not assignable to parameter of type 'typeof SvelteComponent'. Types of construct signatures are incompatible. #9

@shenghan97

Description

@shenghan97

Hey!

I just cloned this repository and installed dependencies but when I tried to run npm run dev. I got this error message:

ERROR in src/app.ts:4:15
TS2345: Argument of type 'typeof SvelteComponentDev' is not assignable to parameter of type 'typeof SvelteComponent'.
  Types of construct signatures are incompatible.
    Type 'new (options: IComponentOptions<Record<string, any>>) => SvelteComponentDev' is not assignable to type 'new (options: { target?: NSVElement<NativeView<Component>> | Element; props?: any; anchor?: NSVElement<NativeView<Component>> | Element; intro?: boolean; }) => SvelteComponent'.
      Types of parameters 'options' and 'options' are incompatible.
        Type '{ target?: NSVElement<NativeView<Component>> | Element; props?: any; anchor?: NSVElement<NativeView<Component>> | Element; intro?: boolean; }' is not assignable to type 'IComponentOptions<Record<string, any>>'.
          Types of property 'target' are incompatible.
            Type 'NSVElement<NativeView<Component>> | Element' is not assignable to type 'Element | ShadowRoot'.
              Type 'NSVElement<NativeView<Component>>' is not assignable to type 'Element | ShadowRoot'.
                Type 'NSVElement<NativeView<Component>>' is missing the following properties from type 'Element': attributes, classList, className, clientHeight, and 139 more.

Hope there's a fix for that! Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions