Closed akshay-nm closed 10 months ago
Hi @akshay-nm, sorry you can't use the --no-mongoose
flag in this case, otherwise the generated types would not properly reflect MongoDB documents.
As a workaround, you can use the following helper type:
type WithId<T> = T & { id: string };
// Example
type UserWithId = WithId<User>
Closing for now, but feel free to re-open if you have any questions or suggestions for a feature
I want to use id instead of _id in frontend. I am using mongoose-tsgen for types. I love the project but it restricts me to stick to _id.