-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
typescriptTypes or Types-test related issue / Pull RequestTypes or Types-test related issue / Pull Request
Milestone
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the bug has not already been reported
Mongoose version
8.0.2
Node.js version
18.x
MongoDB server version
6.x
Typescript version (if applicable)
5.2.2
Description
When i use BigInt type in mongoose schema, i cannot pass typecheck and assign BigInt value to it's property.
Steps to Reproduce
export const affiliateSchema = new Schema({
balance: { type: BigInt, default: BigInt(0) },
});
const AffiliateModel = model("Affiliate", affiliateSchema);
AffiliateModel.findOne({})!.then(modelValue => {
modelValue.balance = 123n;
});
Expected Behavior
No type error here.
Metadata
Metadata
Assignees
Labels
typescriptTypes or Types-test related issue / Pull RequestTypes or Types-test related issue / Pull Request
