Repository navigation
bridge: DialogRpc 位置参数改为 options 对象 - #18
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
动机
DialogRpc 构造函数原有 23 个位置参数,180 处调用中 179 处在测试里靠数 undefined 占位对齐。PR #11 解决冲突时被坑了三次(参数链中部插参数导致所有占位错位)。
改动
(platform, session, store?, options?: DialogRpcOptions),前 3 个必填参数保留位置,其余 20 个全部进 options 对象(键名与原参数名一致,去掉下划线前缀)验证
yarn typecheck0 errorsyarn vitest run --exclude=**/*.e2e.test.ts1982 tests 全过(e2e 由 CI 覆盖)与 PR #11 的关系
PR #11 rebase 到本 PR 之后只需在 options 里加一个
imageStorage键,冲突面缩小到一个文件两三行。