We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
guys i am using svelte2tsx for transforming svelte to tsx for gneerating .d.ts
const tsx = s2x.svelte2tsx(content, { filename: file, isTsFile: isTsScript(content), emitOnTemplateError: false, version: svelte.VERSION, mode: 'dts' });
i get such output
import { SvelteComponentTyped } from "svelte" ;function render() { ;type $$ComponentProps = { name: string; }; const { name }:/*Ωignore_startΩ*/$$ComponentProps/*Ωignore_endΩ*/ = $props(); ; async () => { { svelteHTML.createElement("h1", {}); name; } { svelteHTML.createElement("h2", {}); } }; return { props: {} as any as $$ComponentProps, exports: {}, bindings: __sveltets_$$bindings(''), slots: {}, events: {} }} const Foo = __sveltets_2_fn_component(render()); export default Foo;
when i use typescript on it , i t gives me such .d.ts file, how do i fix it?
declare const Foo: any; export default Foo;
my code: https://github.com/NaviTheCoderboi/foo
The text was updated successfully, but these errors were encountered:
svelte2tsx also has an emitDts mode you can use. https://github.com/sveltejs/language-tools/blob/master/packages/svelte2tsx/src/emitDts.ts. You can also reference the implementation If you have a specific reason for not using it,
Sorry, something went wrong.
@jasonlyu123 i have written my code from that only, but i am not getting expected output
Please provide a proper reproduction (the link is a 404)
No branches or pull requests
guys i am using svelte2tsx for transforming svelte to tsx for gneerating .d.ts
i get such output
when i use typescript on it , i t gives me such .d.ts file, how do i fix it?
my code: https://github.com/NaviTheCoderboi/foo
The text was updated successfully, but these errors were encountered: