Could you provide an example for node-pg-types with the "import" statement and not "require" so that type translators get registered for node-postgres?
Could you provide an example for node-pg-types with the "import" statement and not "require" so that type translators get registered for node-postgres?
Currently it's not possible, because it's not being exported. The best you can do is.
import pg from 'pg'
const { types } = pg