Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

161
Visualizações
Sequelize where issue with 6.19.1 version

With braking changes that sequelize introduced in new version 6.19.1

async findByUuid(uuid: string, options?: Omit<FindOptions<T>, 'where'>): Promise<T | null> {
  return this.model.findOne<T>({ where: { uuid }, ...options });
}

I am getting error for "where"

No overload matches this call. Overload 1 of 2, '(this: ModelStatic, options: NonNullFindOptions<Attributes>): Promise', gave the following error. Type '{ uuid: string; }' is not assignable to type 'WhereOptions<Attributes>'. Types of property 'uuid' are incompatible. Type 'string' is not assignable to type 'WhereAttributeHashValue<Attributes[string]>'. Overload 2 of 2, '(this: ModelStatic, options?: FindOptions<Attributes>): Promise', gave the following error. Type '{ uuid: string; }' is not assignable to type 'WhereOptions<Attributes>'. Types of property 'uuid' are incompatible. Type 'string' is not assignable to type 'WhereAttributeHashValue<Attributes[string]>'.ts(2769) model.d.ts(52, 3): The expected type comes from property 'where' which is declared here on type 'NonNullFindOptions<Attributes>' model.d.ts(52, 3): The expected type comes from property 'where' which is declared here on type 'FindOptions<Attributes>'

about 4 years ago · Santiago Gelvez
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda