fixed mongodb type bug
This commit is contained in:
9
examples/mongodb-crud/frontend/src/env.d.ts
vendored
Normal file
9
examples/mongodb-crud/frontend/src/env.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
// TSRPC would decode ObjectId as string in frontend.
|
||||
declare module 'mongodb' {
|
||||
export type ObjectId = string;
|
||||
export type ObjectID = string;
|
||||
}
|
||||
declare module 'bson' {
|
||||
export type ObjectId = string;
|
||||
export type ObjectID = string;
|
||||
}
|
Reference in New Issue
Block a user