Skip to content

Commit 114f461

Browse files
authored
feat: Rename util type (#6)
1 parent 56a325c commit 114f461

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/lib/file-generators/custom/[schema_name]/[TableName]CustomTypes.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const createCustomTypesFile = (
2424
const statements: StatementedNodeStructure['statements'] = [
2525
{
2626
kind: StructureKind.ImportDeclaration,
27-
namedImports: ['SubsetOf'],
27+
namedImports: ['CreateCustomTypes'],
2828
moduleSpecifier: '../../generated/utils',
2929
isTypeOnly: true,
3030
},
@@ -38,7 +38,7 @@ export const createCustomTypesFile = (
3838
{
3939
kind: StructureKind.TypeAlias,
4040
name: `${pascal_table_name}CustomTypes`,
41-
type: `SubsetOf<Selectable${pascal_table_name}, {}>`,
41+
type: `CreateCustomTypes<Selectable${pascal_table_name}, {}>`,
4242
isExported: true,
4343
},
4444
(writer) => writer.blankLine(),

src/lib/file-generators/generated/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ type NullableKeys<T> = {
3939
/**
4040
* Allows creating a type that is a subset of another type.
4141
*/
42-
export type SubsetOf<
42+
export type CreateCustomTypes<
4343
Super,
4444
Sub extends {
4545
// The types of keys present in sub must be assignable to the types of the same keys in super

0 commit comments

Comments
 (0)