uni-helper / localForage-adapter

适用于 uni-app 的 localForage 适配器
https://www.npmjs.com/package/@uni-helper/localforage-adapter
MIT License
3 stars 0 forks source link

defineDriver(uniStorageDriver)类型错误 #14

Open jonashao opened 2 months ago

jonashao commented 2 months ago

描述问题

类型“{ _driver: string; _support: () => boolean; _initStorage: (options: any) => Promise; clear: (callback: any) => any; getItem: (key: any, callback: any) => any; iterate: (iterator: any, callback: any) => any; ... 5 more ...; dropInstance: (options: any, callback: any) => any; }”的参数不能赋给类型“LocalForageDriver”的参数。 属性“_support”的类型不兼容。 不能将类型“() => boolean”分配给类型“boolean | LocalForageDriverSupportFunc”。 不能将类型“() => boolean”分配给类型“LocalForageDriverSupportFunc”。 不能将类型“boolean”分配给类型“Promise”。ts(2345)

复现

image

系统信息

基础环境信息:

基础依赖信息:

使用的包管理器

pnpm

核对

censujiang commented 2 months ago

请问一下是使用hbuilderx时出现的错误吗?我这边自用项目在vscode上打开并尝试了一下暂时没有发现问题