Skip to content

Commit

Permalink
chore: adjust test
Browse files Browse the repository at this point in the history
test for the case where user has create a type themselves
  • Loading branch information
dummdidumm committed Mar 12, 2024
1 parent 48507fc commit ceb4f70
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
///<reference types="svelte" />
;function render<T>() {
;type $$ComponentProps = { a: T, b: string };
let { a, b }:$$ComponentProps = $props();

type Props = { a: T, b: string };
let { a, b }: Props = $props();
let x = $state<T>(0);
let y = $derived(x * 2);

Expand All @@ -10,7 +11,7 @@ async () => {

{ __sveltets_createSlot("default", { x,y,});}};
let $$implicit_children = __sveltets_2_snippet({x:x, y:y});
return { props: {} as any as $$ComponentProps & { children?: typeof $$implicit_children }, slots: {'default': {x:x, y:y}}, events: {} }}
return { props: {} as any as Props & { children?: typeof $$implicit_children }, slots: {'default': {x:x, y:y}}, events: {} }}
class __sveltets_Render<T> {
props() {
return render<T>().props;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
///<reference types="svelte" />
;function render<T>() {
;type $$ComponentProps = { a: T, b: string };
let { a, b }:$$ComponentProps = $props();

type Props = { a: T, b: string };
let { a, b }: Props = $props();
let x = $state<T>(0);
let y = $derived(x * 2);

/*Ωignore_startΩ*/;const __sveltets_createSlot = __sveltets_2_createCreateSlot();/*Ωignore_endΩ*/;
async () => {

{ __sveltets_createSlot("default", { x,y,});}};
return { props: {} as any as $$ComponentProps, slots: {'default': {x:x, y:y}}, events: {} }}
return { props: {} as any as Props, slots: {'default': {x:x, y:y}}, events: {} }}
class __sveltets_Render<T> {
props() {
return render<T>().props;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts" generics="T">
let { a, b }: { a: T, b: string } = $props();
type Props = { a: T, b: string };
let { a, b }: Props = $props();
let x = $state<T>(0);
let y = $derived(x * 2);
</script>
Expand Down

0 comments on commit ceb4f70

Please sign in to comment.