Custom Sequelize datatype in TypeScript

Viewed 235

I would like to create a custom datatype that parse a BINARY(9) value from the database to a workable 2D number array.

The documentation explains how to do it in JavaScript, But the given example doesn't work in TypeScript. I tried several things to adapt the example in TypeScript, but couldn't even make something that compiles.

Is it possible to make a custom Sequelize datatype in TypeScript? If so, how to do it?

0 Answers
Related