import { TextMorph } from 'torph/svelte' gives typescript error: "Module '"torph/svelte"' has no exported member 'TextMorph'." and using TextMorph you don't get any prop types in Svelte. It works just fine at runtime.
Looking into it, the generated declaration files only export TextMorphProps and do not export the TextMorph component so Typescript sees it as missing.
A potential fix is to edit src/svelte/types.ts to include and export the component:
// packages/torph/src/svelte/types.ts
+ import type { Component } from "svelte";
import type { TextMorphOptions } from "../lib/text-morph/types";
export interface TextMorphProps extends Omit<TextMorphOptions, "element"> {
text: string;
class?: string;
style?: string;
as?: string;
}
+ export declare const TextMorph: Component<TextMorphProps>;
I did this in a fork and it fixes the issue in my usage: notnotjake@b692c96. Can open PR if that is acceptable?
import { TextMorph } from 'torph/svelte'gives typescript error: "Module '"torph/svelte"' has no exported member 'TextMorph'." and usingTextMorphyou don't get any prop types in Svelte. It works just fine at runtime.Looking into it, the generated declaration files only export
TextMorphPropsand do not export theTextMorphcomponent so Typescript sees it as missing.A potential fix is to edit
src/svelte/types.tsto include and export the component:I did this in a fork and it fixes the issue in my usage: notnotjake@b692c96. Can open PR if that is acceptable?