Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const createCustomTypesFile = (
const statements: StatementedNodeStructure['statements'] = [
{
kind: StructureKind.ImportDeclaration,
namedImports: ['SubsetOf'],
namedImports: ['CreateCustomTypes'],
moduleSpecifier: '../../generated/utils',
isTypeOnly: true,
},
Expand All @@ -38,7 +38,7 @@ export const createCustomTypesFile = (
{
kind: StructureKind.TypeAlias,
name: `${pascal_table_name}CustomTypes`,
type: `SubsetOf<Selectable${pascal_table_name}, {}>`,
type: `CreateCustomTypes<Selectable${pascal_table_name}, {}>`,
isExported: true,
},
(writer) => writer.blankLine(),
Expand Down
2 changes: 1 addition & 1 deletion src/lib/file-generators/generated/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type NullableKeys<T> = {
/**
* 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
Expand Down