Skip to content

DONE: Migrate the westore project to TypeScript#127

Open
ChelesteWang wants to merge 23 commits into
Tencent:masterfrom
ChelesteWang:westore-ts
Open

DONE: Migrate the westore project to TypeScript#127
ChelesteWang wants to merge 23 commits into
Tencent:masterfrom
ChelesteWang:westore-ts

Conversation

@ChelesteWang

@ChelesteWang ChelesteWang commented Sep 25, 2021

Copy link
Copy Markdown
Contributor

common.js 产物已可在 example 小程序上运行

@ChelesteWang ChelesteWang changed the title WIP: Migrate the westore project to TypeScript DONE: Migrate the westore project to TypeScript Sep 26, 2021
@ChelesteWang

Copy link
Copy Markdown
Contributor Author

后续任务:
完善 commitlint 支持 senmantic
支持 changelog 生成
完善 westore 类型
优化 westore 构建产物

@ChelesteWang

Copy link
Copy Markdown
Contributor Author

@dntzhang 抽空 review 一下

@ChelesteWang ChelesteWang left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix: traverse error
当前 diff 与 原代码只差格式问题

Comment thread packages/westore/src/westore.ts Outdated
const rootPreType: DataTypes = getType(previous)

if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
for (const key in previous) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

主要问题在于 eslint 由于类型系统读取不到 auto fix 的时候优化成了常量

Comment thread packages/westore/src/westore.ts Outdated
path: string,
result: any
) {
function _diff(current: any, previous: any, path: string, result: any) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

先暂时用 any 类型后面进行优化

@ChelesteWang ChelesteWang left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

与 master 最新更改同步

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.

2 participants