Closed dimaip closed 3 years ago
private static checkOmit(docs?: string, name?: 'input' | 'output') {
const value = docs?.match(/@Pal.omit\(\[(.*?)\]\)/);
if (value && name) {
const asArray = value[1]
.replace(/ /g, '')
.split(',')
.filter((v) => v);
return asArray.includes(name);
}
return false;
}
Resolves: https://github.com/paljs/prisma-tools/issues/234
Put this kind of comment to hide a field from the generated types:
Documentation: https://github.com/paljs/docs/pull/8