-
Notifications
You must be signed in to change notification settings - Fork 545
Closed
Labels
svelteRelated to the svelte adapterRelated to the svelte adapter
Description
Inertia version
3.x (beta)
@inertiajs/svelte Version
2.3.1 and 3.0.0-beta.2
Backend stack (optional)
No response
Describe the problem
When using page to access a typed shared prop, it is any instead of the type specified.
<script lang="ts">
import { page } from "@inertiajs/svelte";
</script>
<svelte:head>
<title>Dashboard - {page.props.appName}</title> <!-- type is any instead of string -->
</svelte:head>Steps to reproduce
Add this global.d.ts file:
declare module "@inertiajs/core" {
export interface InertiaConfig {
sharedPageProps: {
appName: string;
};
errorValueType: string[];
}
}The tsconfig.json checks all .ts file via "include": ["resources/js/**/*.ts", "resources/js/**/*.svelte"], explicitly including .d.ts files did not fix the issue.
I am using bun as the package manager and installing @inertiajs/core did also not fix the issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
svelteRelated to the svelte adapterRelated to the svelte adapter