{"name":"svelte2tsx","version":"0.7.50","keywords":["svelte","typescript"],"author":{"name":"The Svelte Community"},"license":"MIT","_id":"svelte2tsx@0.7.50","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":"f4fc1435ffca5391dd43ffd96d07de09c33e3d22","tarball":"http://registry-npm.ywwl.com/svelte2tsx/download/svelte2tsx-0.7.50.tgz","fileCount":11,"integrity":"sha512-2+DffbPC+4lmZmEflTXAXw/Zx0L6sO2EhkaXNcby0ZJhD/tKyF1B1DPlwVIQt30FTqgELGiSoDSMXnEFTmZtVQ==","signatures":[{"sig":"MEQCIBx2WzqOs1y0jQXPuTt+iemRunAJWSioTuQaM+I40w/+AiBgT/3m/v7lyxGiSg+zRNdoPK/ZBiTmsn2cMCum6ZlUtg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/svelte2tsx@0.7.50","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":818903,"size":173076,"noattachment":false,"key":"/svelte2tsx/-/svelte2tsx-0.7.50.tgz"},"main":"index.js","type":"commonjs","_from":"file:svelte2tsx-0.7.50.tgz","types":"index.d.ts","module":"index.mjs","scripts":{"dev":"rollup -c -w","test":"mocha test/test.ts --no-experimental-strip-types","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/600ebde85a332f723a5fdc8c45d736b7/svelte2tsx-0.7.50.tgz","_integrity":"sha512-2+DffbPC+4lmZmEflTXAXw/Zx0L6sO2EhkaXNcby0ZJhD/tKyF1B1DPlwVIQt30FTqgELGiSoDSMXnEFTmZtVQ==","repository":{"url":"git+https://github.com/sveltejs/language-tools.git#master","type":"git"},"_npmVersion":"11.6.2","description":"Convert Svelte components to TSX for type checking","directories":{},"_nodeVersion":"24.13.0","dependencies":{"scule":"^1.3.0","dedent-js":"^1.0.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.50_1771596043738_0.5563304992400759","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":1771596043978,"_cnpm_publish_time":1771596043978,"dist-tags":{"latest":"0.7.63"}}