We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a2c6169 commit e279b02Copy full SHA for e279b02
packages/types/src/lib/interfaces.ts
@@ -253,7 +253,12 @@ export type KV = Record<string, any>;
253
* binded globally
254
*/
255
export const StorageProviderSchema = z.object({
256
- provider: z.instanceof(Storage),
+ provider: z.object({
257
+ getItem: z.function().args(z.string()).returns(z.union([z.string(), z.null()])),
258
+ setItem: z.function().args(z.string(), z.string()).returns(z.void()),
259
+ removeItem: z.function().args(z.string()).returns(z.void()),
260
+ clear: z.function().returns(z.void())
261
+ }),
262
});
263
export type StorageProvider = z.infer<typeof StorageProviderSchema>;
264
0 commit comments