I'm new to TypeScript. I have a project created via create-react-app with TypeScript on board. Also I'm using JSS there.
At some point I found out that some CSS properties throw an error.
For example, here are pointerEvents and position. Any time I use them, I get an error.
(42,28): Argument of type '{ placeholder: { pointerEvents: string; }; wrapper: { '& select': { position: string; }; }; }' is not assignable to parameter of type 'Record<"wrapper" | "placeholder", CSSProperties> | StyleCreator<"wrapper" | "placeholder", {}>'.
Type '{ placeholder: { pointerEvents: string; }; wrapper: { '& select': { position: string; }; }; }' is not assignable to type 'StyleCreator<"wrapper" | "placeholder", {}>'.
Type '{ placeholder: { pointerEvents: string; }; wrapper: { '& select': { position: string; }; }; }' provides no match for the signature '(theme: {}): Record<"wrapper" | "placeholder", CSSProperties>'.
Replacing pointerEvents with 'pointer-events' did the trick. But there's no way doing this with the position property.
So I actually have to either solve this issue or find a workaround.
'absolute' as 'absolute'. If you'd be interested in my help to find a better solution, please add sufficient code to reproduce the original problem to the question.