Tongoose从Mongoose模式自动生成TypeScript接口

想要自动生成 Mongoose 模式的 TypeScript 接口?试试tongoose吧!它能从 Mongoose 模式生成对应的 TypeScript 接口,省去你手动编写的麻烦。只需要通过npx tongoose ./path/to/mongoose/model来远程运行,或者安装为全局包用npm install --global tongoose,在项目中执行tongoose ./path/to/mongoose/model就搞定了。生成的接口会自动与 Mongoose 模式对接,简直省心。对于不太熟悉的,可以参考官方教程快速上手。注意,当前代码已经过时,不过不久会有更新,期待新版更加流畅哦!

如果你正在做 TypeScript 项目,而且 Mongoose 的模式和接口绑定比较麻烦,tongoose绝对能为你省不少时间。它的使用方法简单,功能直观,而且更新频繁,挺适合团队协作开发。

整体上,tongoose的设计比较清晰,简单易上手。如果你对 TypeScript + Mongoose 的结合感兴趣,可以通过这款工具快速提高开发效率,减少重复工作。,值得一试!

zip
tongoose-master.zip 预估大小:19个文件
folder
tongoose-master 文件夹
file
.eslintrc.json 1KB
folder
utils 文件夹
file
prepareDotTongooseDir.js 1KB
file
generateRelativePathForTypeDefinitionOutputFile.js 1KB
file
returnModelDirOrFileOrShowHelpAndExit.js 770B
file
convertCleanMongooseSchemaToTypeScriptReadyJSObject.js 7KB
file
collectAllModelFilesRecursivelySync.js 1KB
file
makeSureAtLeastOneFileExistsOrExit.js 588B
file
manageCliWithYargs.js 2KB
file
toFilename.js 410B
file
showHelpAndExit.js 310B
file
showWarning.js 262B
file
toClickablePath.js 311B
file
yarn.lock 69KB
file
LICENSE 1KB
file
README.md 6KB
file
.gitignore 54B
file
index.js 12KB
file
ROADMAP.md 1KB
file
package.json 1KB
zip 文件大小:46.46KB