You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched existing issues to ensure the bug has not already been reported
Mongoose version
7.4.3
Node.js version
18.12.1
MongoDB server version
6.0.9
Typescript version (if applicable)
5.1.6
Description
BigInt is a supported schema type but is not exposed by schematypes.d.ts. However when using JavaScript without TypeScript, this property is accessible and can be used like normal. This prevents you from checking the type of a field to verify if it is a BigInt type using instanceof (see this related PR typegoose/auto-increment#21)
Steps to Reproduce
TypeScript:
importmongoosefrom'mongoose';console.log(mongoose.Schema.Types.BigInt);// Property 'BigInt' does not exist on type 'typeof Types'. ts(2339)
Prerequisites
Mongoose version
7.4.3
Node.js version
18.12.1
MongoDB server version
6.0.9
Typescript version (if applicable)
5.1.6
Description
BigInt
is a supported schema type but is not exposed by schematypes.d.ts. However when using JavaScript without TypeScript, this property is accessible and can be used like normal. This prevents you from checking the type of a field to verify if it is a BigInt type usinginstanceof
(see this related PR typegoose/auto-increment#21)Steps to Reproduce
TypeScript:
JavaScript:
Expected Behavior
For
BigInt
to be accessible at the type levelThe text was updated successfully, but these errors were encountered: