Skip to content

Commit

Permalink
fix walking, more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dummdidumm committed Nov 14, 2024
1 parent 0674708 commit 933c815
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ export class HoistableInterfaces {
ts.forEachChild(node, walk);
};

type_node.forEachChild(walk);
walk(type_node);
}

/**
Expand Down
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_;
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>
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_;
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>

0 comments on commit 933c815

Please sign in to comment.