Updates
This commit is contained in:
@@ -40,15 +40,16 @@ export default function generateTypeDefinition({
|
||||
if (schemaType.options && schemaType.options.length > 0) {
|
||||
return schemaType.options
|
||||
.map((opt) =>
|
||||
schemaType.dataType?.match(/int/i) ||
|
||||
typeof opt == "number"
|
||||
schemaType.dataType?.match(
|
||||
/int|double|decimal|float/i,
|
||||
) || typeof opt == "number"
|
||||
? `${opt}`
|
||||
: `"${opt}"`,
|
||||
)
|
||||
.join(" | ");
|
||||
}
|
||||
|
||||
if (schemaType.dataType?.match(/int|double|decimal/i)) {
|
||||
if (schemaType.dataType?.match(/int|double|decimal|float/i)) {
|
||||
return "number";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user