-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationp2-nice-to-haveSvelteKit cannot be used by a small number of people, quality of life improvements, etc.SvelteKit cannot be used by a small number of people, quality of life improvements, etc.types / typescript
Description
Describe the problem
It took me a long time to figure out how to write a TypeScript load function for __error.svelte
Describe the proposed solution
Include an example :)
import type { ErrorLoadInput, LoadOutput } from "@sveltejs/kit";
export async function load({
error,
status,
}: ErrorLoadInput): Promise<LoadOutput> {
return {
props: {
title: `${status}: ${error.message}`,
stack: error.stack,
},
};
}Alternatives considered
Don't include an example :(
Importance
nice to have
Additional Information
No response
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationp2-nice-to-haveSvelteKit cannot be used by a small number of people, quality of life improvements, etc.SvelteKit cannot be used by a small number of people, quality of life improvements, etc.types / typescript