Skip to content

Sequelize v5 types problem #8

Description

@francessco410

Hello,

I was following yours great tutorial but I tried to set up my project using Sequelize v5, instead of v4, however, I got many errors regarding types incompatibility. Please check my code below.

import * as Sequelize from 'sequelize';

export interface UserAttributes {
    id?: number;
    name: string;
    createdAt?: Date;
    updatedAt?: Date;
}

export interface UserInstance extends Sequelize.Instance<UserAttributes>, UserAttributes {}

Error: TS2694: Namespace "... /node_modules/sequelize/types/index" has no exported member "Instance"

Similar issue on StackOverflow:

I would be grateful if you could help me solve this problem.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions