ts-mongoose:自动推断Mongoose模式的TypeScript接口

ts-mongoose是一个轻量级的库,它能根据通用定义自动生成Mongoose模式和TypeScript类型,从而简化了使用Mongoose和TypeScript时的开发流程。通过ts-mongoose,开发者无需分别维护架构和接口,且无需担心两者的匹配问题,从而避免了潜在的开发错误和开销。所有类型都是通过线性函数创建的,无需依赖装饰器,使得代码更加清晰、易于维护。例如,可以使用Type.string({ required: true })来定义一个必需的字符串类型。

zip
ts-mongoose-master.zip 预估大小:43个文件
folder
ts-mongoose-master 文件夹
file
.travis.yml 94B
folder
example 文件夹
file
example1.ts 1KB
file
example3.ts 273B
file
example5.ts 966B
file
example2.ts 1KB
file
example6.ts 806B
file
example4.ts 767B
file
package.json 1KB
folder
__tests__ 文件夹
file
tests.test.ts 11KB
folder
.github 文件夹
file
refs.gif 3.89MB
file
custom.png 16KB
file
.prettierrc 85B
file
jest.config.js 212B
file
package-lock.json 183KB
folder
src 文件夹
file
plugin.ts 442B
file
createSchema.ts 457B
file
typedModel.ts 582B
folder
types 文件夹
file
extract.ts 2KB
file
_shared.ts 1KB
file
singleType.ts 2KB
file
schema.ts 3KB
file
populate.ts 541B
file
index.ts 111B
file
Type.ts 2KB
file
index.ts 111B
file
.npmignore 35B
file
tsconfig.json 5KB
file
.gitignore 894B
folder
ts_test 文件夹
folder
singleTypes 文件夹
file
4.objectId.ts 380B
file
2.boolean.ts 334B
file
0.string.ts 526B
file
9.array.ts 3KB
file
5.mixed.ts 461B
file
a.ref.ts 987B
file
6.decimal128.ts 392B
file
3.date.ts 316B
file
7.schema.ts 833B
file
1.number.ts 328B
file
8.object.ts 2KB
file
createSchema.tstest.ts 5KB
file
README.md 9KB
file
yarn.lock 149KB
folder
scripts 文件夹
file
build.sh 343B
zip 文件大小:4MB