Search code examples
typescriptsveltesvelte-componentsvelte-native

Svelte Native TypeScript errors: No overload matches this call


In this case my question is Svelte Native specific. I want to build an app using Svelte Native and the TypeScript error that I am getting is for using props on Svelte components in the template (.svelte) files, something like this:

Svelte Native TypeScript Error

But this error only occurs with certain components, not all of them. I have this declared in 'types' folder:

declare module '*.svelte' { export { SvelteComponent as default }; }

But it doesn't help.

One similar issue is with using on:event prop with one RadListView component from Native Script:

Native Script TypeScript Error

Technically everything is working fine, it's just annoying to keep on seeing that. How can I get rid of these error? Is anybody else facing this issue? Thanks.


Solution

  • "true" is string. Either use the flag shorthand or set it via {...}

    <page actionBarHidden />
    <page actionBarHidden={true} />