heluxjs/helux

使用Typescript 4.1.5, react ts template项目 , store.ts中的"Se"有类型报错

Closed this issue · 4 comments

复现方式:

  1. npx create-react-app demo-app --template concent-ts
  2. 使用VS Code打开, 稍等片刻就能见到 ./src/types/store.ts文件中, 所有的Se都是报类型错误

影响:
项目编译失败, 无法运行

Here is the English version:
Title: When using TypeScript 4.1.5, there are type errors in the react template project. Mainly happens in the store.ts file.

How to reproduce:

  1. npx create-react-app demo-app --template concent-ts
  2. Open it with VS Code, just wait for a moment until the editor indexed all the codes, then you can see the type error in this folder: ./src/types/store.ts. All the "Se" type has this warning.

Impact:
Run project failed.

你好,问题已经修复了,欢迎重新安装再体验,但貌似cra有更新延迟,你可以克隆模板原项目直接运行
git clone git@github.com:concentjs/cra-project-concent-ts.git

现在cra也正常了,执行
npx create-react-app demo-app --template concent-ts 可以正常运行了

Thanks for you fast action! I just test, it works perfectly.

Thanks for you fast action! I just test, it works perfectly.

Cool, just notice useSetup in App.tsx, it gives you a totally new way to organize your logic code(including event, ref computed, lifecycle etc features)😀