fix: types are optional

This commit is contained in:
thepassle 2023-09-13 17:00:23 +02:00
parent 55e445c21e
commit d79795acc3

View file

@ -11,12 +11,12 @@ export interface LionRequestInit extends Omit<RequestInit, 'body'> {
} }
export interface AjaxConfig { export interface AjaxConfig {
addAcceptLanguage: boolean; addAcceptLanguage?: boolean;
addCaching: boolean; addCaching?: boolean;
xsrfCookieName: string | null; xsrfCookieName?: string | null;
xsrfHeaderName: string | null; xsrfHeaderName?: string | null;
cacheOptions: CacheOptionsWithIdentifier; cacheOptions?: CacheOptionsWithIdentifier;
jsonPrefix: string; jsonPrefix?: string;
} }
export type RequestInterceptor = (request: Request) => Promise<Request | Response>; export type RequestInterceptor = (request: Request) => Promise<Request | Response>;
@ -46,7 +46,7 @@ export interface CacheOptions {
} }
export interface CacheOptionsWithIdentifier extends CacheOptions { export interface CacheOptionsWithIdentifier extends CacheOptions {
getCacheIdentifier: () => string; getCacheIdentifier?: () => string;
} }
export interface ValidatedCacheOptions extends CacheOptions { export interface ValidatedCacheOptions extends CacheOptions {