diff --git a/packages/svelte2tsx/test/svelte2tsx/samples/export-list-runes/expected-svelte5.ts b/packages/svelte2tsx/test/svelte2tsx/samples/export-list-runes/expected-svelte5.ts new file mode 100644 index 000000000..e99e80294 --- /dev/null +++ b/packages/svelte2tsx/test/svelte2tsx/samples/export-list-runes/expected-svelte5.ts @@ -0,0 +1,25 @@ +/// +;function render() { + + let name1 = "world" + let name2/*Ωignore_startΩ*/;name2 = __sveltets_2_any(name2);/*Ωignore_endΩ*/ + + let rename1 = ''; + let rename2/*Ωignore_startΩ*/;rename2 = __sveltets_2_any(rename2);/*Ωignore_endΩ*/; + + class Foo {} + function bar() {} + const baz = ''; + + class RenameFoo {} + function renamebar() {} + const renamebaz = ''; + + +; +async () => { { svelteHTML.createElement("svelte:options", {"runes":true,});} + +}; +return { props: /** @type {Record} */ ({}), exports: /** @type {{name1: typeof name1,name2: typeof name2,renamed1: typeof rename1,renamed2: typeof rename2,Foo: typeof Foo,bar: typeof bar,baz: typeof baz,RenamedFoo: typeof RenameFoo,renamedbar: typeof renamebar,renamedbaz: typeof renamebaz}} */ ({}), bindings: __sveltets_$$bindings(''), slots: {}, events: {} }} +const Input__SvelteComponent_ = __sveltets_2_fn_component(render()); +export default Input__SvelteComponent_; \ No newline at end of file diff --git a/packages/svelte2tsx/test/svelte2tsx/samples/export-list-runes/input.svelte b/packages/svelte2tsx/test/svelte2tsx/samples/export-list-runes/input.svelte new file mode 100644 index 000000000..999d14122 --- /dev/null +++ b/packages/svelte2tsx/test/svelte2tsx/samples/export-list-runes/input.svelte @@ -0,0 +1,19 @@ + + + diff --git a/packages/svelte2tsx/test/svelte2tsx/samples/renamed-exports-runes/expected-svelte5.ts b/packages/svelte2tsx/test/svelte2tsx/samples/renamed-exports-runes/expected-svelte5.ts new file mode 100644 index 000000000..8461d6616 --- /dev/null +++ b/packages/svelte2tsx/test/svelte2tsx/samples/renamed-exports-runes/expected-svelte5.ts @@ -0,0 +1,13 @@ +/// +;function render() { + + let name = "world" + let name2 = "world" + +; +async () => { { svelteHTML.createElement("svelte:options", {"runes":true,});} + +}; +return { props: /** @type {Record} */ ({}), exports: /** @type {{name3: typeof name,name4: typeof name2}} */ ({}), bindings: __sveltets_$$bindings(''), slots: {}, events: {} }} +const Input__SvelteComponent_ = __sveltets_2_fn_component(render()); +export default Input__SvelteComponent_; \ No newline at end of file diff --git a/packages/svelte2tsx/test/svelte2tsx/samples/renamed-exports-runes/input.svelte b/packages/svelte2tsx/test/svelte2tsx/samples/renamed-exports-runes/input.svelte new file mode 100644 index 000000000..4b1efc883 --- /dev/null +++ b/packages/svelte2tsx/test/svelte2tsx/samples/renamed-exports-runes/input.svelte @@ -0,0 +1,7 @@ + + + diff --git a/packages/svelte2tsx/test/svelte2tsx/samples/ts-export-list-runes/expected-svelte5.ts b/packages/svelte2tsx/test/svelte2tsx/samples/ts-export-list-runes/expected-svelte5.ts new file mode 100644 index 000000000..45c93ecf4 --- /dev/null +++ b/packages/svelte2tsx/test/svelte2tsx/samples/ts-export-list-runes/expected-svelte5.ts @@ -0,0 +1,25 @@ +/// +;function render() { + + let name1: string = "world"/*Ωignore_startΩ*/;name1 = __sveltets_2_any(name1);/*Ωignore_endΩ*/ + let name2: string/*Ωignore_startΩ*/;name2 = __sveltets_2_any(name2);/*Ωignore_endΩ*/; + let name3: string = ''/*Ωignore_startΩ*/;name3 = __sveltets_2_any(name3);/*Ωignore_endΩ*/;let name4: string/*Ωignore_startΩ*/;name4 = __sveltets_2_any(name4);/*Ωignore_endΩ*/; + + let rename1: string = ''/*Ωignore_startΩ*/;rename1 = __sveltets_2_any(rename1);/*Ωignore_endΩ*/; + let rename2: string/*Ωignore_startΩ*/;rename2 = __sveltets_2_any(rename2);/*Ωignore_endΩ*/; + + class Foo {} + function bar() {} + const baz: string = ''; + + class RenameFoo {} + function renamebar() {} + const renamebaz: string = ''; + + +; +async () => { { svelteHTML.createElement("svelte:options", {"runes":true,});} +}; +return { props: {} as Record, exports: {} as any as { name1: string,name2: string,name3: string,name4: string,renamed1: string,renamed2: string,Foo: typeof Foo,bar: typeof bar,baz: string,RenamedFoo: typeof RenameFoo,renamedbar: typeof renamebar,renamedbaz: string }, bindings: __sveltets_$$bindings(''), slots: {}, events: {} }} +const Input__SvelteComponent_ = __sveltets_2_fn_component(render()); +export default Input__SvelteComponent_; \ No newline at end of file diff --git a/packages/svelte2tsx/test/svelte2tsx/samples/ts-export-list-runes/input.svelte b/packages/svelte2tsx/test/svelte2tsx/samples/ts-export-list-runes/input.svelte new file mode 100644 index 000000000..11ceadd74 --- /dev/null +++ b/packages/svelte2tsx/test/svelte2tsx/samples/ts-export-list-runes/input.svelte @@ -0,0 +1,19 @@ + +