sqliteTable wrapper which modifies fields, with proper types
More of a TypeScript question, but I'm trying to create a wrapper for sqliteTable to add a set of standard fields (and keys) to the fields provided:
This results in a type error on
wrapper
as the generics applied to SQLiteTableFn
and the return value of wrapper
return value sqliteTable
on modified fields) no longer correspond. How can I create a type for wrapper
which returns object properly typed?2 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I was doing something like that previously, but my goal is to create a function which returns two tables: one with the fields as is, and a second table with extra fields added. The part I am struggling with is the return type of table2, which is intended to be the modified version of the second table.