Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

196
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!