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

202
Visualizações
Typescript: How do you add a type declaration to the severity property in React Alert?

I've created a type declaration object for the data that is coming in, but no matter what I seem to try and define as the type for the property "severity", it's upset. What it wants (as shown below) doesn't seem to be an option. I was just wondering if there is a type I can use besides "any" that would work for this ? Or, because it is custom, any is my only option?

Here's what I have that is throwing the below error:

type ticketData = {
  name: string;
  title: string;
  onClose: () => void;
  message: string[];
}

enter image description here

https://mui.com/components/snackbars/

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

you have to mention any of these below options for colors provided by muiAlert:

name: 'success' | 'info' | 'warning' | 'error' | undefined

check api Link - https://mui.com/api/alert/

about 4 years ago · Juan Pablo Isaza Relatório
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