storage: {
l: {
get: <TKey extends string, TValue = any>(
key: TKey,
transform?: (value: string) => TValue,
defaultValue?: TValue | null,
) => NonNullable<TValue> | null;
has: <TKey extends string, TValue = any>(
key: TKey,
defaultValue?: TValue,
) => boolean | NonNullable<TValue>;
remove: <TKey extends string>(key: TKey) => void;
set: <TKey extends string, TValue = any>(
key: TKey,
value?: TValue,
transform?: (value: any) => string,
) => void;
};
s: {
get: <TKey extends string, TValue = any>(
key: TKey,
transform?: (value: string) => TValue,
defaultValue?: TValue | null,
) => NonNullable<TValue> | null;
has: <TKey extends string, TValue = any>(
key: TKey,
defaultValue?: TValue,
) => boolean | NonNullable<TValue>;
remove: <TKey extends string>(key: TKey) => void;
set: <TKey extends string, TValue = any>(
key: TKey,
value?: TValue,
transform?: (value: any) => string,
) => void;
};
} = ...
Type Declaration
-
l: {
get: <TKey extends string, TValue = any>(
key: TKey,
transform?: (value: string) => TValue,
defaultValue?: TValue | null,
) => NonNullable<TValue> | null;
has: <TKey extends string, TValue = any>(
key: TKey,
defaultValue?: TValue,
) => boolean | NonNullable<TValue>;
remove: <TKey extends string>(key: TKey) => void;
set: <TKey extends string, TValue = any>(
key: TKey,
value?: TValue,
transform?: (value: any) => string,
) => void;
}
-
s: {
get: <TKey extends string, TValue = any>(
key: TKey,
transform?: (value: string) => TValue,
defaultValue?: TValue | null,
) => NonNullable<TValue> | null;
has: <TKey extends string, TValue = any>(
key: TKey,
defaultValue?: TValue,
) => boolean | NonNullable<TValue>;
remove: <TKey extends string>(key: TKey) => void;
set: <TKey extends string, TValue = any>(
key: TKey,
value?: TValue,
transform?: (value: any) => string,
) => void;
}
Storage, for
localStorageandsessionStorage