-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
helpThis issue can likely be resolved in GitHub issues. No bug fixes, features, or docs necessaryThis issue can likely be resolved in GitHub issues. No bug fixes, features, or docs necessary
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.6.3
Node.js version
doesn't matter
MongoDB server version
doesn't matter
Typescript version (if applicable)
5.6.2
Description
InferSchemaType returns Buffer instead of Binary(from BSON) for Buffer field
Steps to Reproduce
const exampleSchema = new Schema({
image: { type: Buffer },
});
export type Example = InferSchemaType<typeof exampleSchema>;
// type Example = {
// image?: Buffer | null | undefined;
// }Expected Behavior
type Example is:
type Example = {
image?: Binary | null | undefined;
}(Binary from BSON)
Metadata
Metadata
Assignees
Labels
helpThis issue can likely be resolved in GitHub issues. No bug fixes, features, or docs necessaryThis issue can likely be resolved in GitHub issues. No bug fixes, features, or docs necessary