-
Notifications
You must be signed in to change notification settings - Fork 80
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
这个组件可以用在typescript的koa项目中吗? #93
Comments
同问,我也是ts下不显示定义的接口 |
emitDecoratorMetadata我的关闭了这个选项就好了 |
可以在 typescript 使用,但是通过 webpack 打成 bundle 后可能会跑不起来的,因为运行时 mapDir 会遍历目录去加载路由 |
可尝试将TypeScript的编译选项”target“设置为ES6 如果TypeScript的编译选项"target"设置为ES5的话,类并不是使用class来实现。类的方法是通过Object.prototype来定义的匿名函数,这种情况下,function.name这个属性的值是个空字符串。导致swagger key值与装饰器生成的key值不一致。最终文档无法显示出来。 |
can't we use webpack then? Is there any alternate solutions available to use webpack & koa-swagger-decorator combinedly? |
这个组件可以用在typescript的koa项目中吗?我在我们的TS项目中尝试集成这个组件,最终在API列表中显示No operations defined in spec!。我们的TS项目最终编译出来的是一个webpack打包JS文件,会和这个有关系吗?
The text was updated successfully, but these errors were encountered: