{"name":"svelte2tsx","version":"0.7.43","keywords":["svelte","typescript"],"author":{"name":"The Svelte Community"},"license":"MIT","_id":"svelte2tsx@0.7.43","maintainers":[{"name":"svelte-language-tools-deploy","email":"svelte-language-tools-deploy@orta.io"},{"name":"dummdidumm","email":"sholthausen@web.de"},{"name":"orta","email":"orta.therox@gmail.com"},{"name":"halfnelson","email":"dpershouse@gmail.com"}],"homepage":"https://github.com/sveltejs/language-tools/tree/master/packages/svelte2tsx","bugs":{"url":"https://github.com/sveltejs/language-tools/issues"},"dist":{"shasum":"889fcba290dfbb35b9840b3b9a85869e0c65b62f","tarball":"http://registry-npm.ywwl.com/svelte2tsx/download/svelte2tsx-0.7.43.tgz","fileCount":11,"integrity":"sha512-TtxMuk520th4ZEvUQrhbDAyyQ1I+kc5dZCA4ChOLlbVXZfqenrY45iTH27DpLyx/u4STEz8O3hkGm5goTS8JhQ==","signatures":[{"sig":"MEQCIGyz4cUcQZSO8Y395TZt7/cCoc6lYUL219aIpoF7BIT6AiBxNR6/L3L5GccWw7B8JuGyiAYWu377oy/4kDwP9Bhz8A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/svelte2tsx@0.7.43","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":781525,"size":166357,"noattachment":false,"key":"/svelte2tsx/-/svelte2tsx-0.7.43.tgz"},"main":"index.js","type":"commonjs","_from":"file:svelte2tsx-0.7.43.tgz","types":"index.d.ts","module":"index.mjs","scripts":{"dev":"rollup -c -w","test":"mocha test/test.ts","build":"rollup -c"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:e4d9fc0d-997d-4852-9ad1-86d4b189a538"}},"_resolved":"/tmp/09d05535307e5727cca6377471c70e0f/svelte2tsx-0.7.43.tgz","_integrity":"sha512-TtxMuk520th4ZEvUQrhbDAyyQ1I+kc5dZCA4ChOLlbVXZfqenrY45iTH27DpLyx/u4STEz8O3hkGm5goTS8JhQ==","repository":{"url":"git+https://github.com/sveltejs/language-tools.git#master","type":"git"},"_npmVersion":"11.6.0","description":"Convert Svelte components to TSX for type checking","directories":{},"_nodeVersion":"24.8.0","dependencies":{"dedent-js":"^1.0.1","pascal-case":"^3.1.1"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^9.2.0","tslib":"^2.4.0","rollup":"3.7.5","svelte":"~4.2.19","tiny-glob":"^0.2.6","periscopic":"^2.0.2","typescript":"^5.9.2","@types/node":"^18.0.0","@types/mocha":"^9.1.0","@types/unist":"^2.0.3","@types/vfile":"^3.0.2","magic-string":"^0.30.11","@types/estree":"^0.0.42","estree-walker":"^2.0.1","builtin-modules":"^3.3.0","source-map-support":"^0.5.16","@rollup/plugin-json":"^6.0.0","rollup-plugin-delete":"^2.0.0","@rollup/plugin-commonjs":"^24.0.0","@jridgewell/trace-mapping":"^0.3.25","@rollup/plugin-typescript":"^10.0.0","@jridgewell/sourcemap-codec":"^1.5.0","@rollup/plugin-node-resolve":"^15.0.0"},"peerDependencies":{"svelte":"^3.55 || ^4.0.0-next.0 || ^4.0 || ^5.0.0-next.0","typescript":"^4.9.4 || ^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/svelte2tsx_0.7.43_1757603884738_0.7591829083857833","host":"s3://npm-registry-packages-npm-production"},"readme":"# svelte2tsx\n\nConverts [Svelte](https://svelte.dev) component source into TSX. The TSX can be type checked using the included `svelte-jsx.d.ts` and `svelte-shims.d.ts`.\n\n_This project only converts svelte to tsx, type checking is left to consumers of this plugin such as language services_\n\n```typescript\ntype SvelteCompiledToTsx = {\n    code: string;\n    map: import('magic-string').SourceMap;\n};\n\nexport default function svelte2tsx(svelte: string): SvelteCompiledToTsx;\n```\n\nFor example\n\nInput.svelte\n\n```svelte\n<script>\n    export let world = 'name';\n</script>\n\n<h1>hello {world}</h1>\n```\n\nwill produce this ugly but type checkable TSX\n\n```tsx\n<></>;\nfunction render() {\n    let world = 'name';\n    <>\n        <h1>hello {world}</h1>\n    </>;\n    return { props: { world }, slots: {}, events: {} };\n}\n\nexport default class _World_ extends __sveltets_2_createSvelte2TsxComponent(\n    __sveltets_2_partial(__sveltets_2_with_any_event(render))\n) {}\n```\n\nwith a v3 SourceMap back to the original source.\n\nFor more examples of the transformations, see the `test/**/samples` folders\n\n## Credits\n\n-   [halfnelson](https://github.com/halfnelson) for creating `svelte2tsx`\n-   [pushkine](https://github.com/pushkine) for creating the source mapping test infrastructure\n","publish_time":1757603884970,"_cnpm_publish_time":1757603884970,"dist-tags":{"latest":"0.7.63"}}