@ts-safeql/generate
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -95,3 +95,4 @@ "use strict"; | ||
function buildInterfacePropertyValue(params) { | ||
return `${params.key}: ${params.isNullable ? `${params.value} | null` : params.value}`; | ||
const isNullable = params.isNullable && ["any", "null"].includes(params.value) === false; | ||
return `${params.key}: ${isNullable ? `${params.value} | null` : params.value}`; | ||
} | ||
@@ -135,6 +136,5 @@ function isNullableDueToRelation(params) { | ||
if ("introspected" in params.col) { | ||
const tsType = params.typesMap[params.col.introspected.colType]; | ||
const value = params.col.introspected.colNotNull ? tsType : `${tsType} | null`; | ||
const value = params.typesMap[params.col.introspected.colType]; | ||
const key = (_a = params.col.described.name) !== null && _a !== void 0 ? _a : params.col.introspected.colName; | ||
const isNullable = isNullableDueToRelation({ | ||
const isNullable = !params.col.introspected.colNotNull || isNullableDueToRelation({ | ||
col: params.col.introspected, | ||
@@ -141,0 +141,0 @@ relationsWithJoins: params.relationsWithJoins, |
{ | ||
"name": "@ts-safeql/generate", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41296