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

manifest.config.ts指定多个permission权限时类型检查不通过 #34

Closed
5 of 7 tasks
foxmale007 opened this issue Sep 8, 2024 · 0 comments · Fixed by #35 · May be fixed by #36
Closed
5 of 7 tasks

manifest.config.ts指定多个permission权限时类型检查不通过 #34

foxmale007 opened this issue Sep 8, 2024 · 0 comments · Fixed by #35 · May be fixed by #36

Comments

@foxmale007
Copy link

描述问题

manifest.config.ts指定多个permission权限时类型检查不通过。需要将index.d.mts里的
permission?: Record<'scope.userLocation', { /** 小程序获取权限时展示的接口用途说明 */ desc: string; }>;
修改为:
permission?: Record<string, { /** 小程序获取权限时展示的接口用途说明 */ desc: string; }>;

复现

在manifest.config.ts里指定permission:
'mp-weixin': {
appid: VITE_WX_APPID,
setting: {
urlCheck: false
},
permission: {
'scope.userFuzzyLocation': {
desc: '你的位置信息将用于城市定位个吧拉吧拉这个是自定义内容'
},
'scope.userLocation': {
desc: '你的位置信息将用于骑行位置检测'
}
},
requiredPrivateInfos: ['getFuzzyLocation'],
usingComponents: true
// usePrivacyCheck: true,
},

出现typescript检查报错

系统信息

"@uni-helper/vite-plugin-uni-manifest": "^0.2.3",

使用的包管理器

npm

核对

贡献

  • 我愿意提交一个 PR 修复这个问题
  • 我愿意提交一个 PR 带有失败的测试(实际上只要去做就好,谢谢!)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant