instanceof with mongo's id constructorid should properly be typed as a string if you use this helper aboveinstanceofconst zodMongoId = z.instanceof(MongoObjectId).transform((val) => val.toString());
someProcedure.output(z.object({
id: zodMongoId
})