Giter Site home page Giter Site logo

Comments (5)

Horaceluo avatar Horaceluo commented on June 26, 2024 4

可尝试将TypeScript的编译选项”target“设置为ES6

如果TypeScript的编译选项"target"设置为ES5的话,类并不是使用class来实现。类的方法是通过Object.prototype来定义的匿名函数,这种情况下,function.name这个属性的值是个空字符串。导致swagger key值与装饰器生成的key值不一致。最终文档无法显示出来。

from koa-swagger-decorator.

oooonly avatar oooonly commented on June 26, 2024

同问,我也是ts下不显示定义的接口

from koa-swagger-decorator.

oooonly avatar oooonly commented on June 26, 2024

同问,我也是ts下不显示定义的接口

emitDecoratorMetadata我的关闭了这个选项就好了

from koa-swagger-decorator.

Cody2333 avatar Cody2333 commented on June 26, 2024

可以在 typescript 使用,但是通过 webpack 打成 bundle 后可能会跑不起来的,因为运行时 mapDir 会遍历目录去加载路由

from koa-swagger-decorator.

SankarRavichandran avatar SankarRavichandran commented on June 26, 2024

can't we use webpack then? Is there any alternate solutions available to use webpack & koa-swagger-decorator combinedly?

from koa-swagger-decorator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.