We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 461c93a commit 0fe525bCopy full SHA for 0fe525b
src/generate.ts
@@ -247,14 +247,14 @@ const tableToInterface = (
247
) => {
248
const writableFields =
249
table.definition != null
250
- ? []
251
- : fieldsToInterfaceProps(m, table.fields, 'Write', opts);
+ ? (table.modifyFields ?? [])
+ : (table.modifyFields ?? table.fields);
252
const writeType =
253
writableFields.length === 0
254
? // If there's a table definition then we cannot write anything
255
'Record<string, never>'
256
: `{
257
- ${writableFields.join('\n\t\t')}
+ ${fieldsToInterfaceProps(m, writableFields, 'Write', opts).join('\n\t\t')}
258
}`;
259
return trimNL`
260
export interface ${modelNameToCamelCaseName(table.name)} {
0 commit comments