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

feat: support typescript #30

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

feat: support typescript #30

wants to merge 2 commits into from

Conversation

bobo1133
Copy link

Checklist
  • npm test passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)
Description of change

@whlsxl
Copy link
Contributor

whlsxl commented Feb 11, 2020

请问,
现在对ts的支持怎么样啊?
这个pr可以合并么?

@bobo1133
Copy link
Author

请问,
现在对ts的支持怎么样啊?
这个pr可以合并么?

太久了,建议自己fork一个调整一下吧

@whxaxes
Copy link
Member

whxaxes commented Feb 20, 2020

看逻辑没啥问题,补充一下单测吧

@whlsxl
Copy link
Contributor

whlsxl commented Feb 20, 2020

看逻辑没啥问题,补充一下单测吧

是要增加ts的测试吗?
如果是js,现在测试能跑通,就可以。

@whxaxes
Copy link
Member

whxaxes commented Feb 20, 2020

@whlsxl 对,在 test/fixtures 下加个 ts 的 example ,然后加个 test case 跑一下

@droplet-js
Copy link

啥时候能正常支持 ts 啊 ... js 太让人蛋疼了 ...

@fre2d0m
Copy link

fre2d0m commented May 8, 2020

@v7lin

1、可以把package.json 内的 egg.typescript改成false,启动的时候就不会删除生成的js文件
然后开启WebStorm的Recompile on changes 自动编译ts(WebStorm的好处是能把ts,js组织为目录,vscode全平铺展开太乱)
2、graphql相关的resolver和connector文件用js,别用ts。一点点代码自动提示缺失影响不大
3、npm run dev

亲测有效

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.

5 participants