Sequerlize model data type issue

24 views Asked by At

I am currently using sequelize version 6 for a project I inherited. In the code I see we are importing Json data type from a project :

import { Json } from 'aws-sdk/clients/robomaker';

In the code we have

import { DataTypes, Model, Optional } from 'sequelize';

export interface formQuestionsAttributes {
  id?: number;
   ....
  answerValues?: Json;
}

export type formQuestionsOptionalAttributes =
  | 'id'
  .....
  | 'answerValues';

export class formQuestions
  extends Model<formQuestionsAttributes, formQuestionsCreationAttributes>
  implements formQuestionsAttributes
{
  id?: number;
  ....
  answerValues?: Json;

It looks like we are only importing the Json data type from aws-sdk/clients/robomaker and nothing else. We are currently converting aws-sdk version 2 to aws-sdk version 3 and it looks like in aws-sdk/client-robomaker Json type is gone. Can I use the data type 'any' to replace 'Json' ?

 answerValues?: any;

would it cause any problems? Please advise, Thanks

0

There are 0 answers