Closed
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment