-
-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: disambiguate
render
in module script
- Loading branch information
1 parent
2f46701
commit 1f771d6
Showing
18 changed files
with
174 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
packages/svelte2tsx/test/svelte2tsx/samples/render-function-module/expected-svelte5.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
///<reference types="svelte" /> | ||
; | ||
function render(){} | ||
;;function render_0() { | ||
async () => {}; | ||
return { props: /** @type {Record<string, never>} */ ({}), exports: {}, bindings: "", slots: {}, events: {} }} | ||
const Input__SvelteComponent_ = __sveltets_2_isomorphic_component(__sveltets_2_partial(__sveltets_2_with_any_event(render_0()))); | ||
/*Ωignore_startΩ*/type Input__SvelteComponent_ = InstanceType<typeof Input__SvelteComponent_>; | ||
/*Ωignore_endΩ*/export default Input__SvelteComponent_; |
3 changes: 3 additions & 0 deletions
3
packages/svelte2tsx/test/svelte2tsx/samples/render-function-module/input.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<script module lang="ts"> | ||
function render(){} | ||
</script> |
14 changes: 14 additions & 0 deletions
14
packages/svelte2tsx/test/svelte2tsx/samples/render-import-module-exports/expected-svelte5.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
///<reference types="svelte" /> | ||
; | ||
import { render } from "render"; | ||
;;function render_0() { | ||
|
||
|
||
; | ||
async () => { | ||
|
||
}; | ||
return { props: {render: render}, exports: /** @type {{render: typeof render}} */ ({}), bindings: "", slots: {}, events: {} }} | ||
const Input__SvelteComponent_ = __sveltets_2_isomorphic_component(__sveltets_2_partial(['render'], __sveltets_2_with_any_event(render_0()))); | ||
/*Ωignore_startΩ*/type Input__SvelteComponent_ = InstanceType<typeof Input__SvelteComponent_>; | ||
/*Ωignore_endΩ*/export default Input__SvelteComponent_; |
7 changes: 7 additions & 0 deletions
7
packages/svelte2tsx/test/svelte2tsx/samples/render-import-module-exports/input.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<script module lang="ts"> | ||
import { render } from "render"; | ||
</script> | ||
|
||
<script lang="ts"> | ||
export { render } | ||
</script> |
32 changes: 32 additions & 0 deletions
32
...ages/svelte2tsx/test/svelte2tsx/samples/render-import-module-generics/expected-svelte5.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
///<reference types="svelte" /> | ||
; | ||
import { render } from "render"; | ||
;;function render_0</*Ωignore_startΩ*/T>/*Ωignore_endΩ*/() { | ||
|
||
; | ||
async () => { | ||
|
||
}; | ||
return { props: /** @type {Record<string, never>} */ ({}), exports: {}, bindings: "", slots: {}, events: {} }} | ||
class __sveltets_Render<T> { | ||
props() { | ||
return render_0<T>().props; | ||
} | ||
events() { | ||
return __sveltets_2_with_any_event(render_0<T>()).events; | ||
} | ||
slots() { | ||
return render_0<T>().slots; | ||
} | ||
bindings() { return ""; } | ||
exports() { return {}; } | ||
} | ||
|
||
interface $$IsomorphicComponent { | ||
new <T>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<T>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<T>['props']>, ReturnType<__sveltets_Render<T>['events']>, ReturnType<__sveltets_Render<T>['slots']>> & { $$bindings?: ReturnType<__sveltets_Render<T>['bindings']> } & ReturnType<__sveltets_Render<T>['exports']>; | ||
<T>(internal: unknown, props: {$$events?: ReturnType<__sveltets_Render<T>['events']>}): ReturnType<__sveltets_Render<T>['exports']>; | ||
z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>; | ||
} | ||
const Input__SvelteComponent_: $$IsomorphicComponent = null as any; | ||
/*Ωignore_startΩ*/type Input__SvelteComponent_<T> = InstanceType<typeof Input__SvelteComponent_<T>>; | ||
/*Ωignore_endΩ*/export default Input__SvelteComponent_; |
6 changes: 6 additions & 0 deletions
6
packages/svelte2tsx/test/svelte2tsx/samples/render-import-module-generics/input.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<script module lang="ts"> | ||
import { render } from "render"; | ||
</script> | ||
|
||
<script lang="ts" generics="T"> | ||
</script> |
9 changes: 9 additions & 0 deletions
9
packages/svelte2tsx/test/svelte2tsx/samples/render-import-module/expectedv2.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
///<reference types="svelte" /> | ||
; | ||
import { render } from "render"; | ||
;;function render_0() { | ||
async () => {}; | ||
return { props: /** @type {Record<string, never>} */ ({}), slots: {}, events: {} }} | ||
|
||
export default class Input__SvelteComponent_ extends __sveltets_2_createSvelte2TsxComponent(__sveltets_2_partial(__sveltets_2_with_any_event(render_0()))) { | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/svelte2tsx/test/svelte2tsx/samples/render-import-module/input.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<script module lang="ts"> | ||
import { render } from "render"; | ||
</script> |
9 changes: 9 additions & 0 deletions
9
packages/svelte2tsx/test/svelte2tsx/samples/render-named-import-module/expected-svelte5.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
///<reference types="svelte" /> | ||
; | ||
import render from "render"; | ||
;;function render_0() { | ||
async () => {}; | ||
return { props: /** @type {Record<string, never>} */ ({}), exports: {}, bindings: "", slots: {}, events: {} }} | ||
const Input__SvelteComponent_ = __sveltets_2_isomorphic_component(__sveltets_2_partial(__sveltets_2_with_any_event(render_0()))); | ||
/*Ωignore_startΩ*/type Input__SvelteComponent_ = InstanceType<typeof Input__SvelteComponent_>; | ||
/*Ωignore_endΩ*/export default Input__SvelteComponent_; |
3 changes: 3 additions & 0 deletions
3
packages/svelte2tsx/test/svelte2tsx/samples/render-named-import-module/input.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<script module lang="ts"> | ||
import render from "render"; | ||
</script> |
9 changes: 9 additions & 0 deletions
9
packages/svelte2tsx/test/svelte2tsx/samples/render-variable-module/expected-svelte5.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
///<reference types="svelte" /> | ||
; | ||
const render = 42; | ||
;;function render_0() { | ||
async () => {}; | ||
return { props: /** @type {Record<string, never>} */ ({}), exports: {}, bindings: "", slots: {}, events: {} }} | ||
const Input__SvelteComponent_ = __sveltets_2_isomorphic_component(__sveltets_2_partial(__sveltets_2_with_any_event(render_0()))); | ||
/*Ωignore_startΩ*/type Input__SvelteComponent_ = InstanceType<typeof Input__SvelteComponent_>; | ||
/*Ωignore_endΩ*/export default Input__SvelteComponent_; |
3 changes: 3 additions & 0 deletions
3
packages/svelte2tsx/test/svelte2tsx/samples/render-variable-module/input.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<script module lang="ts"> | ||
const render = 42; | ||
</script> |