Sequelize-typescript: Question: type checking on create/find/update/delete input props

Created on 6 Jan 2020  路  2Comments  路  Source: RobinBuschmann/sequelize-typescript

Is it possible somehow to have type checking on these situations?

import  { User } from './models/User';

await User.create({
    // <-- type checking here for User props
});

User.destroy({
            where: {
                // <-- type checking here for User props
            }
        });

// etc

Most helpful comment

Hey @spinlud, yeah it is indeed possible, but need to be implemented in sequelize. (Since version 1.0.0 sequelize-typescript uses the official typings provided by sequelize). I'm planning to create a PR for that.

All 2 comments

Hey @spinlud, yeah it is indeed possible, but need to be implemented in sequelize. (Since version 1.0.0 sequelize-typescript uses the official typings provided by sequelize). I'm planning to create a PR for that.

Ok! Let me know if I can help in anyway ;-)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

YaroslavOsetrov picture YaroslavOsetrov  路  3Comments

josecolella picture josecolella  路  4Comments

lverledens picture lverledens  路  4Comments

lilling picture lilling  路  4Comments

libvirtadept picture libvirtadept  路  4Comments