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

DONE: Migrate the westore project to TypeScript #127

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

ChelesteWang
Copy link
Contributor

@ChelesteWang ChelesteWang commented Sep 25, 2021

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
Contributor Author

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

@ChelesteWang
Copy link
Contributor Author

@dntzhang 抽空 review 一下

Copy link
Contributor Author

@ChelesteWang ChelesteWang left a comment

Choose a reason for hiding this comment

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

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

if (current === previous) return

const rootCurrentType: DataTypes = getType(current)
const rootPreType: DataTypes = getType(previous)

if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
for (const key in previous) {
Copy link
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 的时候优化成了常量

path: string,
result: any
) {
function _diff(current: any, previous: any, path: string, result: any) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

@ChelesteWang ChelesteWang left a comment

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.

None yet

2 participants