Daniel
11/17/2021, 11:17 AMnpm build
with an existing very simple database with two tables:
node_modules/.prisma/client/index.d.ts144998 - error TS2314: Generic type ‘Keys’ requires 1 type argument(s). I have two tables, Keys
and KeyRatios
mapped like this (omitted trivial attributes):
model KeyRatios {
Id Int @id(map: “PK_KeyRatios”) @default(autoincrement())
KeyId Int
Keys Keys @relation(fields: [KeyId], references: [Id], onDelete: Cascade, onUpdate: NoAction, map: “FK_KeyRatios_Keys_KeyId”)
@@index([KeyId], map: “IX_KeyRatios_KeyId”)
}
model Keys {
Id Int @id(map: “PK_Keys”) @default(autoincrement())
KeyRatios KeyRatios[]
}
1449 Keys<T extends KeysArgs = {}>(args?: Subset<T, KeysArgs>): CheckSelect<T, Prisma__KeysClient<Keys | null >, Prisma__KeysClient<KeysGetPayload<T> | null >>;
~~~~
node_modules/.prisma/client/index.d.ts:2049:11 - error TS2314: Generic type 'Keys' requires 1 type argument(s).
2049 ? Keys
~~~~
node_modules/.prisma/client/index.d.ts:2054:7 - error TS2314: Generic type 'Keys' requires 1 type argument(s).
2054 ? Keys & {
~~~~
node_modules/.prisma/client/index.d.ts:2063:51 - error TS2314: Generic type 'Keys' requires 1 type argument(s).
2063 [P in TrueKeys<S['select']>]: P extends keyof Keys ?Keys [P]
~~~~
node_modules/.prisma/client/index.d.ts:2063:57 - error TS2314: Generic type 'Keys' requires 1 type argument(s).
2063 [P in TrueKeys<S['select']>]: P extends keyof Keys ?Keys [P]
~~~~
node_modules/.prisma/client/index.d.ts:2070:7 - error TS2314: Generic type 'Keys' requires 1 type argument(s).
2070 : Keys
~~~~
node_modules/.prisma/client/index.d.ts:2071:5 - error TS2314: Generic type 'Keys' requires 1 type argument(s).
2071 : Keys
~~~~
node_modules/.prisma/client/index.d.ts:2094:132 - error TS2314: Generic type 'Keys' requires 1 type argument(s).
2094 ): HasReject<GlobalRejectSettings, LocalRejectSettings, 'findUnique', 'Keys'> extends True ? CheckSelect<T, Prisma__KeysClient<Keys>, Prisma__KeysClient<KeysGetPayload<T>>> : CheckSelect<T, Prisma__KeysClient<Keys | null >, Prisma__KeysClient<KeysGetPayload<T> | null >>
~~~~
node_modules/.prisma/client/index.d.ts:2094:214 - error TS2314: Generic type 'Keys' requires 1 type argument(s).
2094 ): HasReject<GlobalRejectSettings, LocalRejectSettings, 'findUnique', 'Keys'> extends True ? CheckSelect<T, Prisma__KeysClient<Keys>, Prisma__KeysClient<KeysGetPayload<T>>> : CheckSelect<T, Prisma__KeysClient<Keys | null >, Prisma__KeysClient<KeysGetPayload<T> | null >>
~~~~
node_modules/.prisma/client/index.d.ts:2111:131 - error TS2314: Generic type 'Keys' requires 1 type argument(s).
2111 ): HasReject<GlobalRejectSettings, LocalRejectSettings, 'findFirst', 'Keys'> extends True ? CheckSelect<T, Prisma__KeysClient<Keys>, Prisma__KeysClient<KeysGetPayload<T>>> : CheckSelect<T, Prisma__KeysClient<Keys | null >, Prisma__KeysClient<KeysGetPayload<T> | null >>
~~~~
node_modules/.prisma/client/index.d.ts:2111:213 - error TS2314: Generic type 'Keys' requires 1 type argument(s).
2111 ): HasReject<GlobalRejectSettings, LocalRejectSettings, 'findFirst', 'Keys'> extends True ? CheckSelect<T, Prisma__KeysClient<Keys>, Prisma__KeysClient<KeysGetPayload<T>>> : CheckSelect<T, Prisma__KeysClient<Keys | null >, Prisma__KeysClient<KeysGetPayload<T> | null >>
~~~~
node_modules/.prisma/client/index.d.ts:2131:43 - error TS2314: Generic type 'Keys' requires 1 type argument(s).
2131 ): CheckSelect<T, PrismaPromise<Array<Keys>>, PrismaPromise<Array<KeysGetPayload<T>>>>
~~~~
node_modules/.prisma/client/index.d.ts:2147:42 - error TS2314: Generic type 'Keys' requires 1 type argument(s).
2147 ): CheckSelect<T, Prisma__KeysClient<Keys>, Prisma__KeysClient<KeysGetPayload<T>>>
~~~~
node_modules/.prisma/client/index.d.ts:2179:42 - error TS2314: Generic type 'Keys' requires 1 type argument(s).
2179 ): CheckSelect<T, Prisma__KeysClient<Keys>, Prisma__KeysClient<KeysGetPayload<T>>>
~~~~
node_modules/.prisma/client/index.d.ts:2198:42 - error TS2314: Generic type 'Keys' requires 1 type argument(s).
2198 ): CheckSelect<T, Prisma__KeysClient<Keys>, Prisma__KeysClient<KeysGetPayload<T>>>
~~~~
node_modules/.prisma/client/index.d.ts:2256:42 - error TS2314: Generic type 'Keys' requires 1 type argument(s).
2256 ): CheckSelect<T, Prisma__KeysClient<Keys>, Prisma__KeysClient<KeysGetPayload<T>>>
Ryan
11/17/2021, 11:20 AMKeys
to something else and check?Ryan
11/17/2021, 11:21 AMDaniel
11/17/2021, 11:28 AMDaniel
11/17/2021, 11:38 AMKRKeys
and added @@map("Keys")
That seemed to do it. Thanks for the tip!