Skip to content

fix(types/batchSetStorageSync): 修复类型,去掉外层包装对象#18939

Open
skr2005 wants to merge 1 commit intoNervJS:mainfrom
skr2005:patch-1
Open

fix(types/batchSetStorageSync): 修复类型,去掉外层包装对象#18939
skr2005 wants to merge 1 commit intoNervJS:mainfrom
skr2005:patch-1

Conversation

@skr2005
Copy link
Copy Markdown

@skr2005 skr2005 commented Mar 3, 2026

Removed batchSetStorageSync interface and updated its usage in batchSetStorage.

close #18911

这个 PR 做了什么? (简要描述所做更改)

这个 PR 是什么类型? (至少选择一个)

  • 错误修复 (Bugfix) issue: fix #
  • 新功能 (Feature)
  • 代码重构 (Refactor)
  • TypeScript 类型定义修改 (Types)
  • 文档修改 (Docs)
  • 代码风格更新 (Code style update)
  • 构建优化 (Chore)
  • 其他,请描述 (Other, please describe):

这个 PR 涉及以下平台:

  • 所有平台
  • Web 端(H5)
  • 移动端(React-Native)
  • 鸿蒙(Harmony)
  • 鸿蒙容器(Harmony Hybrid)
  • ASCF 元服务
  • 快应用(QuickApp)
  • 所有小程序
  • 微信小程序
  • 企业微信小程序
  • 京东小程序
  • 百度小程序
  • 支付宝小程序
  • 支付宝 IOT 小程序
  • 钉钉小程序
  • QQ 小程序
  • 飞书小程序
  • 快手小程序
  • 头条小程序

Removed batchSetStorageSync interface and updated its usage in batchSetStorage.
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 3, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between af08244 and c15e1ab.

📒 Files selected for processing (1)
  • packages/taro/types/api/storage/index.d.ts

概述

简化了 batchSetStorageSync API 的类型定义结构,将嵌套的命名空间和接口替换为内联数组类型。API 行为保持不变,仅调整了 TypeScript 类型声明。

变更

类别 / 文件 摘要
类型定义简化
packages/taro/types/api/storage/index.d.ts
移除 batchSetStorageSync 命名空间和相关接口声明,将 API 签名从 batchSetStorageSync(option: batchSetStorageSync.Option): void 改为直接使用内联数组类型 batchSetStorageSync(option: { key: string; value: any }[]): void,简化了公共 API 表面。

预估代码审查工作量

🎯 2 (简单) | ⏱️ ~10 分钟

建议审查人

  • Single-Dancer
  • yoyo837

🐰✨ 类型的衣裳换一身,

嵌套的纱衣脱掉轻,

数组直白又简洁,

API 容颜更清新!

兔兔为之欢呼叫。

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题准确总结了主要变更:修复batchSetStorageSync类型定义,去掉外层包装对象,将嵌套的Option/kv结构替换为内联数组结构。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai bot requested review from Single-Dancer and yoyo837 March 3, 2026 12:59
@skr2005 skr2005 changed the title fix(types/batchSetStorageSync): 去掉外层包装对象 fix(types/batchSetStorageSync): 修复类型,去掉外层包装对象 Mar 3, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.31%. Comparing base (af08244) to head (c15e1ab).
⚠️ Report is 3 commits behind head on main.

❌ Your project check has failed because the head coverage (56.31%) is below the target coverage (75.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #18939   +/-   ##
=======================================
  Coverage   56.31%   56.31%           
=======================================
  Files         447      447           
  Lines       23352    23352           
  Branches     5763     5781   +18     
=======================================
  Hits        13150    13150           
+ Misses       8508     8502    -6     
- Partials     1694     1700    +6     
Flag Coverage Δ
taro-cli 72.85% <ø> (ø)
taro-runtime 60.27% <ø> (ø)
taro-web 53.12% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This was referenced Mar 7, 2026
This was referenced Mar 28, 2026
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

Successfully merging this pull request may close these issues.

batchSetStorageSync 参数类型错误

1 participant