Using generics with Table type

hey there, I'm trying to create a generic function, something like this:
function insertWithLogger<DataType>(data: DataType[], table: SomeTableType<Data>) {
  logger.info("Inserting data, wow!")
  db.insert(table).values(data)
  logger.info("inserted data, amazing!")
}

Somebody know how to type SomeTableType<DataType> properly?
Was this page helpful?