Skip to content

Commit

Permalink
fix(dx): Updating index.d.ts file (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
Borales committed May 8, 2020
1 parent b2298e7 commit bbf71bb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ export type SessionOptions = {

export type Handler = (req: any, res: any) => any;

export type Session = {
set: <T = any>(name: string, value: T) => void;
get: <T = any>(name: string) => T | undefined;
unset: (name: string) => void;
destroy: () => void;
save: () => Promise<void>;
};

export type CookieOptions = {
/** Forbids JavaScript from accessing the cookie.
* For example, through the Document.cookie property, the XMLHttpRequest API, or the Request API.
Expand Down

1 comment on commit bbf71bb

@Dashue
Copy link
Contributor

@Dashue Dashue commented on bbf71bb May 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Please sign in to comment.