diff --git a/src/lib/file-generators/custom/[schema_name]/[TableName]CustomTypes.ts b/src/lib/file-generators/custom/[schema_name]/[TableName]CustomTypes.ts index f4c87ac..5103a21 100644 --- a/src/lib/file-generators/custom/[schema_name]/[TableName]CustomTypes.ts +++ b/src/lib/file-generators/custom/[schema_name]/[TableName]CustomTypes.ts @@ -24,7 +24,7 @@ export const createCustomTypesFile = ( const statements: StatementedNodeStructure['statements'] = [ { kind: StructureKind.ImportDeclaration, - namedImports: ['SubsetOf'], + namedImports: ['CreateCustomTypes'], moduleSpecifier: '../../generated/utils', isTypeOnly: true, }, @@ -38,7 +38,7 @@ export const createCustomTypesFile = ( { kind: StructureKind.TypeAlias, name: `${pascal_table_name}CustomTypes`, - type: `SubsetOf`, + type: `CreateCustomTypes`, isExported: true, }, (writer) => writer.blankLine(), diff --git a/src/lib/file-generators/generated/utils.ts b/src/lib/file-generators/generated/utils.ts index 5d4e243..973511b 100644 --- a/src/lib/file-generators/generated/utils.ts +++ b/src/lib/file-generators/generated/utils.ts @@ -39,7 +39,7 @@ type NullableKeys = { /** * Allows creating a type that is a subset of another type. */ -export type SubsetOf< +export type CreateCustomTypes< Super, Sub extends { // The types of keys present in sub must be assignable to the types of the same keys in super