You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During review of #448, we considered simplifying several interfaces/types related to UserDatabase.
exportinterfaceUserDatabase{transaction<R,Textendsunknown[]>(transactionFunction: UserDatabaseTransaction<R,T>,config: TransactionConfig, ...args: T): Promise<R>;queryFunction<CextendsUserDatabaseClient,R,Textendsunknown[]>(queryFunction: UserDatabaseQuery<C,R,T>, ...params: T): Promise<R>;query<R,Textendsunknown[]>(sql: string, ...params: T): Promise<R[]>;queryWithClient<R,Textendsunknown[]=unknown[]>(client: UserDatabaseClient,sql: string, ...params: T): Promise<R[]>;// other members omitted for clarity}typeUserDatabaseQuery<CextendsUserDatabaseClient,R,Textendsunknown[]>=(ctxt: C, ...args: T)=>Promise<R>;typeUserDatabaseTransaction<R,Textendsunknown[]>=(ctxt: UserDatabaseClient, ...args: T)=>Promise<R>;
Having a type argument T extending unknown[] doesn't provide much value. I think this type argument could be removed, simplifying the definitions. The new definitions would look something like this:
exportinterfaceUserDatabase{transaction<R>(transactionFunction: UserDatabaseTransaction<R,T>,config: TransactionConfig, ...args: unknown[]): Promise<R>;queryFunction<CextendsUserDatabaseClient,R>(queryFunction: UserDatabaseQuery<C,R,T>, ...params: unknown[]): Promise<R>;query<R>(sql: string, ...params: unknown[]): Promise<R[]>;queryWithClient<R>(client: UserDatabaseClient,sql: string, ...params: unknown[]): Promise<R[]>;// other members omitted for clarity}typeUserDatabaseQuery<CextendsUserDatabaseClient,R>=(ctxt: C, ...args: unknown[])=>Promise<R>;typeUserDatabaseTransaction<R>=(ctxt: UserDatabaseClient, ...args: unknown[])=>Promise<R>;
The text was updated successfully, but these errors were encountered:
During review of #448, we considered simplifying several interfaces/types related to UserDatabase.
Having a type argument T extending unknown[] doesn't provide much value. I think this type argument could be removed, simplifying the definitions. The new definitions would look something like this:
The text was updated successfully, but these errors were encountered: