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
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?