Closed jmsunseri closed 3 years ago
I don’t know typescript. It looks like it needs a .d.ts
file.
Do you think something like this would work in an index.d.ts
:
export const componentName: any;
If I would create a line like that for every component.
Do you think something like this would work in an index.d.ts:
export const componentName: any;
It does work, but I would like to do better.
I've found a SvelteComponentTyped
class in svelte. I just need to figure out how to give my icons that type. I’ve tried:
import { SvelteComponentTyped } from "svelte";
export class TablerIconComponent extends SvelteComponentTyped<{
color?: string;
size?: string | number;
strokeWidth?: string | number;
}> {}
export const TwoFA: TablerIconComponent;
export const ThreeDCubeSphere: TablerIconComponent;
export const AB: TablerIconComponent;
When I run svelte-check
on a test project I get this error:
Error: JSX element type 'CurrencyBitcoin' does not have any construct or call signatures. (ts)
do you have to implement a constructor for TablerIconComponent?
v1.6.0 has been released and has an index.d.ts
file. svelte-check
no longer throws errors. Thanks for submitting this issue🙌
getting a bunch of errors running svelte-check