Skip to content

Conversation

@dummdidumm
Copy link
Member

When setting the new mode option to 'dts', all tsx/jsx code and the template code will be thrown out, all shims will be inlined and the export is rewritten differently. Only the code property will be set on the returned element. Use this as an intermediate step to generate type definitions from a component. It is expected to pass the result to TypeScript which should handle emitting the d.ts files.

Simon Holthausen added 2 commits June 11, 2021 11:53
When setting the new mode option to 'dts', all tsx/jsx code and the template code will be thrown out, all shims will be inlined and the export is rewritten differently. Only the `code` property will be set on the returned element. Use this as an intermediate step to generate type definitions from a component. It is expected to pass the result to TypeScript which should handle emitting the d.ts files.
@dummdidumm dummdidumm merged commit a3d52bd into sveltejs:master Jun 11, 2021
@dummdidumm dummdidumm deleted the svelte2tsx-dts-target branch June 11, 2021 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant