ts: Object literal may only specify known properties except the property is known

No overload matches this call.
Overload 2 of 2, '(values: { role: string | SQL<unknown> | Placeholder<string, any>; channelId: string | SQL<unknown> | Placeholder<string, any>; webhookId: string | SQL<unknown> | Placeholder<...>; webhookToken: string | ... 1 more ... | Placeholder<...>; region: string | ... 1 more ... | Placeholder<...>; }[]): PgInsertBase<...>', gave the following error.
Object literal may only specify known properties, and 'channelId' does not exist in type '{ role: string | SQL<unknown> | Placeholder<string, any>; channelId: string | SQL<unknown> | Placeholder<string, any>; webhookId: string | SQL<unknown> | Placeholder<...>; webhookToken: string | ... 1 more ... | Placeholder<...>; region: string | ... 1 more ... | Placeholder<...>; }[]'.
No overload matches this call.
Overload 2 of 2, '(values: { role: string | SQL<unknown> | Placeholder<string, any>; channelId: string | SQL<unknown> | Placeholder<string, any>; webhookId: string | SQL<unknown> | Placeholder<...>; webhookToken: string | ... 1 more ... | Placeholder<...>; region: string | ... 1 more ... | Placeholder<...>; }[]): PgInsertBase<...>', gave the following error.
Object literal may only specify known properties, and 'channelId' does not exist in type '{ role: string | SQL<unknown> | Placeholder<string, any>; channelId: string | SQL<unknown> | Placeholder<string, any>; webhookId: string | SQL<unknown> | Placeholder<...>; webhookToken: string | ... 1 more ... | Placeholder<...>; region: string | ... 1 more ... | Placeholder<...>; }[]'.
No description
1 Reply
Derock
DerockOP7mo ago
nvm im dumb its wanting an array not one object just noticed the little [] at the end nevermind again, its not expecting an array oh turns out webhook.token is of string | null but ive created it as a non-nullable column. dont know why the ts error was so misleading
Want results from more Discord servers?
Add your server