-
-
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.
- Loading branch information
1 parent
0674708
commit 933c815
Showing
5 changed files
with
53 additions
and
1 deletion.
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
17 changes: 17 additions & 0 deletions
17
...ages/svelte2tsx/test/svelte2tsx/samples/ts-runes-hoistable-props-false-1.v5/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,17 @@ | ||
///<reference types="svelte" /> | ||
;function render() { | ||
|
||
interface Props { | ||
foo: C; | ||
} | ||
|
||
const a = 1; | ||
type C = typeof a | '2' | '3'; | ||
|
||
let { foo }: Props = $props(); | ||
; | ||
async () => {}; | ||
return { props: {} as any as Props, exports: {}, bindings: __sveltets_$$bindings(''), slots: {}, events: {} }} | ||
const Input__SvelteComponent_ = __sveltets_2_fn_component(render()); | ||
type Input__SvelteComponent_ = ReturnType<typeof Input__SvelteComponent_>; | ||
export default Input__SvelteComponent_; |
10 changes: 10 additions & 0 deletions
10
packages/svelte2tsx/test/svelte2tsx/samples/ts-runes-hoistable-props-false-1.v5/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,10 @@ | ||
<script lang="ts"> | ||
interface Props { | ||
foo: C; | ||
} | ||
const a = 1; | ||
type C = typeof a | '2' | '3'; | ||
let { foo }: Props = $props(); | ||
</script> |
16 changes: 16 additions & 0 deletions
16
...ages/svelte2tsx/test/svelte2tsx/samples/ts-runes-hoistable-props-false-2.v5/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,16 @@ | ||
///<reference types="svelte" /> | ||
;function render() { | ||
|
||
const a: string = ''; | ||
|
||
interface Props { | ||
[index: typeof a]: boolean; | ||
} | ||
|
||
let { foo }: Props = $props(); | ||
; | ||
async () => {}; | ||
return { props: {} as any as Props, exports: {}, bindings: __sveltets_$$bindings(''), slots: {}, events: {} }} | ||
const Input__SvelteComponent_ = __sveltets_2_fn_component(render()); | ||
type Input__SvelteComponent_ = ReturnType<typeof Input__SvelteComponent_>; | ||
export default Input__SvelteComponent_; |
9 changes: 9 additions & 0 deletions
9
packages/svelte2tsx/test/svelte2tsx/samples/ts-runes-hoistable-props-false-2.v5/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,9 @@ | ||
<script lang="ts"> | ||
const a: string = ''; | ||
interface Props { | ||
[index: typeof a]: boolean; | ||
} | ||
let { foo }: Props = $props(); | ||
</script> |