Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

defineDriver(uniStorageDriver)类型错误 #14

Open
4 tasks done
jonashao opened this issue Jun 7, 2024 · 1 comment
Open
4 tasks done

defineDriver(uniStorageDriver)类型错误 #14

jonashao opened this issue Jun 7, 2024 · 1 comment
Assignees

Comments

@jonashao
Copy link

jonashao commented Jun 7, 2024

描述问题

类型“{ _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

系统信息

基础环境信息:

  • os: macOS 14.5
  • node: 20.11.0
  • vscode: 1.90.0
  • volar: 2.0.19

基础依赖信息:

  • vue: 3.4.27
  • vite: 5.2.8
  • @dcloudio/uni-app: 3.0.0-alpha-4010820240603001

使用的包管理器

pnpm

核对

  • 遵循我们的 行为准则
  • 检查是否已经有一个报告相同错误的问题,以避免重复创建。
  • 这是一个具体的错误。请开启 GitHub 讨论你的疑问。
  • 所提供的复现是这个问题的 最小复现
@censujiang
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants