Skip to content

Commit 335bb33

Browse files
committed
Add name to empty array log messages
1 parent 87115e7 commit 335bb33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/InterfaceGenerator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export default class InterfaceGenerator {
157157
}
158158
}
159159
console.warn(
160-
`The array at ${parentName}.${fieldName} is empty. Generated type will be 'unknown[]'. Consider adding variations with data for this field.`,
160+
`${this.name}:The array at ${parentName}.${fieldName} is empty. Generated type will be 'unknown[]'. Consider adding variations with data for this field.`,
161161
);
162162
return "unknown[]";
163163
} else if (typeof value === "object" && value !== null) {
@@ -189,7 +189,7 @@ export default class InterfaceGenerator {
189189
}
190190
} else if (value === "undefined[]") {
191191
console.warn(
192-
`The array at ${parentName}.${fieldName} is empty. Generated type will be 'unknown[]'. Consider adding variations with data for this field.`,
192+
`${this.name}: The array at ${parentName}.${fieldName} is empty. Generated type will be 'unknown[]'. Consider adding variations with data for this field.`,
193193
);
194194
return "unknown[]";
195195
}

0 commit comments

Comments
 (0)