Skip to content

Commit

Permalink
chore: Update template
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangfengming committed Nov 23, 2023
1 parent 918648f commit f5114a8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/context/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './types'
6 changes: 3 additions & 3 deletions src/views/404.svelte
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script lang="ts" context="module">
import type { Route } from 'svelte-pilot'
import type { Context } from '../context-interface'
import type { LoadFunction } from 'svelte-pilot'
import type { Context } from '../context'
export async function load(props: unknown, route: Route, ctx: Context) {
export const load: LoadFunction<{}, Context> = async ({}, route, ctx) => {
ctx.setStatus(404)
}
</script>
Expand Down
6 changes: 3 additions & 3 deletions src/views/500.svelte
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script lang="ts" context="module">
import type { Route } from 'svelte-pilot'
import type { Context } from '../context-interface'
import type { LoadFunction } from 'svelte-pilot'
import type { Context } from '../context'
export async function load(props: unknown, route: Route, ctx: Context) {
export const load: LoadFunction<{}, Context> = async ({}, route, ctx) => {
ctx.setStatus(500)
}
</script>
Expand Down
2 changes: 1 addition & 1 deletion src/views/Doc.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script context="module" lang="ts">
import type { LoadFunction } from 'svelte-pilot'
import type { Context } from '../context/types'
import type { Context } from '../context'
import docs from '../docs'
export const load: LoadFunction<
Expand Down

0 comments on commit f5114a8

Please sign in to comment.