examples
examples copied to clipboard
feat: add TypeScript framework-ts example
need commits of https://github.com/eggjs/egg/pull/2321
Checklist
- [x]
npm testpasses - [x] tests and/or benchmarks are included
- [x] documentation is changed or added
- [ ] commit message follows commit guidelines
Affected core subsystem(s)
Description of change
已知问题
- route 导入模块 如下图
如果改为导入框架模块 yadan-ts,就会爆一堆类型错误。如果使用当前的 'egg' 模块,那么应用 app/package.json 又需要引入 egg 不知道是否会导致其他问题?
"dependencies": {
"egg": "^2.6.0",
"egg-scripts": "^2.6.0",
"yadan-ts": "../yadan"
},
- 调用框架服务的类型推断
目前无法读取到框架 yadan-ts 中 ctx.service 的类型,只能使用上图的丑陋定义方法
有空再按照茶叶蛋的规范更新