ive a problem in my SolidJS project. I am using SUID as UI library and want to extend the colors by using typescripts module augmentation.
I created a declaration file with the extended property.
declare module '@suid/material/styles/createPalette' {
interface PaletteColorOptions {
lighter: string;
}
}
and expected to get the "lighter" property + the default properties of the PaletteColorOptions. Sadly it overrides the original type and only the "lighter" property is available.
The strange behavior on my local machine it works if i add the import to the original module in the declaration file, then i get a "duplicate identifier" error. If i ingore it it works fine.
On my Stackblitz example it only overrides the original type and its not working even adding the import in the declaration.
Didn't get it to work, any ideas?
Thanks a lot
I tried:
- Adding the import to declaration file
- adding includes, typeroots etc. to tsconfig.json in all variations. But obv. ts uses the declaration otherwise it wouldn't be overriding the original type.