From 1c5900165bf1e5e4e24c2480b26b5e1c718e092c Mon Sep 17 00:00:00 2001 From: Nathan Brown Date: Sat, 6 May 2023 12:33:44 -0700 Subject: [PATCH] Using an arrow function instead --- packages/remix-server-runtime/sessions.ts | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/packages/remix-server-runtime/sessions.ts b/packages/remix-server-runtime/sessions.ts index ce039fd5f41..f1e5fe108bb 100644 --- a/packages/remix-server-runtime/sessions.ts +++ b/packages/remix-server-runtime/sessions.ts @@ -174,31 +174,31 @@ export interface SessionStorage { * Session. If there is no session associated with the cookie, this will * return a new Session with no data. */ - getSession( + getSession: ( this: void, cookieHeader?: string | null, options?: CookieParseOptions - ): Promise>; + ) => Promise>; /** * Stores all data in the Session and returns the Set-Cookie header to be * used in the HTTP response. */ - commitSession( + commitSession: ( this: void, session: Session, options?: CookieSerializeOptions - ): Promise; + ) => Promise; /** * Deletes all data associated with the Session and returns the Set-Cookie * header to be used in the HTTP response. */ - destroySession( + destroySession: ( this: void, session: Session, options?: CookieSerializeOptions - ): Promise; + ) => Promise; } /** @@ -224,7 +224,6 @@ export interface SessionIdStorageStrategy< * Creates a new record with the given data and returns the session id. */ createData: ( - this: void, data: FlashSessionData, expires?: Date ) => Promise; @@ -232,16 +231,12 @@ export interface SessionIdStorageStrategy< /** * Returns data for a given session id, or `null` if there isn't any. */ - readData: ( - this: void, - id: string - ) => Promise | null>; + readData: (id: string) => Promise | null>; /** * Updates data for the given session id. */ updateData: ( - this: void, id: string, data: FlashSessionData, expires?: Date @@ -250,7 +245,7 @@ export interface SessionIdStorageStrategy< /** * Deletes data for a given session id from the data store. */ - deleteData: (this: void, id: string) => Promise; + deleteData: (id: string) => Promise; } export type CreateSessionStorageFunction = <