ts-mongoose
ts-mongoose copied to clipboard
Incorrect _id type for ExtractProps
If type of _id is set to be none-ObjectId type, the ExtractProps will still extract _id as ObjectId.
const AccountSchema = createSchema({
_id: Type.string({ require: true }),
nickName: Type.string({ require: true }),
ggSlug: Type.string({ require: true }),
ggPlayerId: Type.string({ require: true }),
gamerTag: Type.string({ require: true }),
prefix: Type.string(),
});
type AccountProps = ExtractProps<typeof AccountSchema>;
type AccountProps = {
**_id: Types.ObjectId;**
nickName?: string | undefined;
ggSlug?: string | undefined;
ggPlayerId?: string | undefined;
gamerTag?: string | undefined;
prefix?: string | undefined;
__v: number;
}