Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dummdidumm authored Nov 11, 2024
1 parent effffcf commit 9cbaa15
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ const defaultScriptTemplate = `
const tsSv5ScriptTemplate = `
<script lang="ts">
import type { LayoutData } from './$types';
let { data }: LayoutData = $props();
let { data }: { data: LayoutData } = $props();
</script>
`;

const tsScriptTemplate = `
<script lang="ts">
import type { LayoutData } from './$types';
export let data: LayoutData;
</script>
`;

const jsSv5ScriptTemplate = `
<script>
/** @type {import('./$types').LayoutData} */
/** @type {{ data: import('./$types').LayoutData }} */
let { data } = $props();
</script>
`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ const defaultScriptTemplate = `

const tsSv5ScriptTemplate = `
<script lang="ts">
let { data } = $props();
import type { PageData } from './$types';
let { data }: { data: PageData } = $props();
</script>
`;

Expand All @@ -23,7 +25,7 @@ const tsScriptTemplate = `

const jsSv5ScriptTemplate = `
<script>
/** @type {import('./$types').PageData} */
/** @type {{ data: import('./$types').PageData }} */
let { data } = $props();
</script>
`;
Expand Down

0 comments on commit 9cbaa15

Please sign in to comment.