How to use custom date (1082) type parser in postgres.js for >0.30.0?

I have the following parser when creating the connection, to parse postgres date from string to JS Date.

        types: {
          date: {
            to: 1082,
            from: [1082],
            serialize: (x: any) => x,
            parse: (x: any) => new Date(`${x} 00:00:00`),
          },
        },


It works in 0.29.5 (I know there's a breaking change in 0.30.0), but Is there a way to update and still have the custom parser working?
Was this page helpful?