Skip to content

Commit bcccd4a

Browse files
committed
docs: fix code snippet
needs adjustment because without it since sveltejs/svelte.dev#1094 it won't build anymore
1 parent 9fbfb22 commit bcccd4a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

documentation/docs/30-advanced/25-errors.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ This throws an exception that SvelteKit catches, causing it to set the response
5757
You can add extra properties to the error object if needed...
5858

5959
```js
60-
import { error } from '@sveltejs/kit';
61-
60+
// @filename: ambient.d.ts
6261
declare global {
6362
namespace App {
6463
interface Error {
@@ -67,7 +66,10 @@ declare global {
6766
}
6867
}
6968
}
69+
export {}
7070

71+
// @filename: index.js
72+
import { error } from '@sveltejs/kit';
7173
// ---cut---
7274
error(404, {
7375
message: 'Not found',

0 commit comments

Comments
 (0)