notistack icon indicating copy to clipboard operation
notistack copied to clipboard

fix: Omit content from SharedProps to resolve type incompatibility with @types/react v18.2.x+

Open katsuya opened this issue 1 year ago • 1 comments

Due to the changes in @types/react, the type of content in HTMLAttributes has been modified. This has caused the following error to occur in versions of @types/react v18.2.x and later. I've made adjustments by omitting content.

../node_modules/notistack/dist/index.d.ts(174,18): error TS2430: Interface 'SharedProps' incorrectly extends interface 'Omit<SnackbarProps, "classes">'.
  Types of property 'content' are incompatible.
    Type 'SnackbarContentCallback' is not assignable to type 'string | undefined'.
      Type 'null' is not assignable to type 'string | undefined'.

katsuya avatar Aug 14 '23 06:08 katsuya

Guys merge this fix on time please! I had to edit my node modules so my application could build successfully! This is the third time 😭😭

AdedigbaOluwad1 avatar Aug 20 '23 15:08 AdedigbaOluwad1