Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace setup with hooks #670

Merged
merged 10 commits into from
Mar 25, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
lets just make it async
  • Loading branch information
Rich-Harris committed Mar 25, 2021
commit 5eb3f943c30077d695f0892fe1c670ca9513061e
2 changes: 1 addition & 1 deletion documentation/docs/04-hooks.md
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@ If unimplemented, session is `{}`.

```ts
type GetSession<Context = any, Session = any> = {
({ context }: { context: Context }): Session;
({ context }: { context: Context }): Session | Promise<Session>;
};
```

2 changes: 1 addition & 1 deletion packages/kit/types.d.ts
Original file line number Diff line number Diff line change
@@ -90,7 +90,7 @@ export type Load = (input: LoadInput) => LoadOutput | Promise<LoadOutput>;
export type GetContext<Context = any> = (incoming: Incoming) => Context;

export type GetSession<Context = any, Session = any> = {
({ context }: { context: Context }): Session;
({ context }: { context: Context }): Session | Promise<Session>;
};

export type Handle<Context = any> = (