Skip to content

Commit df984eb

Browse files
committed
Correct type of state object
1 parent 76e6cfe commit df984eb

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

lib/types/server/options.d.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { PluginSpecificConfiguration } from '../plugin';
77
import { RouteOptions } from '../route';
88
import { CacheProvider, ServerOptionsCache } from './cache';
99
import { SameSitePolicy } from './state';
10+
import { ServerStateCookieOptions } from './state';
1011

1112
export interface ServerOptionsCompression {
1213
minBytes: number;
@@ -208,16 +209,7 @@ export interface ServerOptions {
208209
* }
209210
* Sets the default configuration for every state (cookie) set explicitly via server.state() or implicitly (without definition) using the state configuration object.
210211
*/
211-
// TODO I am not sure if I need to use all the server.state() definition (like the default value) OR only the options below. The v16 use "any" here.
212-
// state?: ServerStateCookieOptions;
213-
state?: {
214-
strictHeader?: boolean | undefined;
215-
ignoreErrors?: boolean | undefined;
216-
isSecure?: boolean | undefined;
217-
isHttpOnly?: boolean | undefined;
218-
isSameSite?: SameSitePolicy | undefined;
219-
encoding?: 'none' | 'base64' | 'base64json' | 'form' | 'iron' | undefined;
220-
} | undefined;
212+
state?: ServerStateCookieOptions | undefined;
221213

222214
/**
223215
* @default none.

0 commit comments

Comments
 (0)