Giter Club home page Giter Club logo

Comments (7)

whxaxes avatar whxaxes commented on August 11, 2024 3

嗯,也有道理,我会放进开发计划中,之后会加上 model 的支持

from egg-ts-helper.

atzcl avatar atzcl commented on August 11, 2024 1

egg ts 下,sequelizemongoose 是可以正常使用的,建议查看下对应的 @types 包的 .d.ts 写法

from egg-ts-helper.

whxaxes avatar whxaxes commented on August 11, 2024

这个不属于 egg-ts-helper 的工作范畴了,model 是 egg-sequelize 提供的能力,应该由插件去提供支持。而且我记得 egg-sequelize 已经加上了 d.ts 了

from egg-ts-helper.

4tj avatar 4tj commented on August 11, 2024

手动添加model的.d.ts没有问题
我实际在开发中遇到的问题是,通过egg-bin dev -r egg-ts-helper/register启动的项目,model目录无法编译,在执行ets && tsc后发现model下文件没有包含进编译

from egg-ts-helper.

whxaxes avatar whxaxes commented on August 11, 2024

目前 egg-ts-helper 本来就没有去处理 model 目录,因为 model 的能力是 egg-sequelize 这个插件提供的,如果有需要解析 model 的话,欢迎提 PR

from egg-ts-helper.

4tj avatar 4tj commented on August 11, 2024

但是对用户来讲就是 “egg ts 连 sequelize都用不了”啊

from egg-ts-helper.

maroon1 avatar maroon1 commented on August 11, 2024

由于 egg 的 loader 机制,要想结合 TS 使用 egg,了解类型定义方法是不得不迈过去的一个坎,不可能什么样的类型都要插件自动生成,其他的插件需要的 model 也有可能不一致,在文档中详细说明各种场景下的类型声明技巧才是根本。

from egg-ts-helper.

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.