Open
Description
When using rc-select
with CSS Modules and Vite, the following error occurs with exactOptionalPropertyTypes: true
enabled:
CSS Module:
/* myStyles.module.css */
.selectBox {
/* styles */
}
Component:
import styles from "myStyles.module.css"
const MyComponent = () => (
<Select className={styles["selectBox"]} />
);
Error:
TS2375: Type { className: string | undefined; } is not assignable to type SelectProps<any, DefaultOptionType> with 'exactOptionalPropertyTypes: true'. Consider adding undefined to the types of the target's properties.
Types of property className are incompatible.
Type string | undefined is not assignable to type string
Type undefined is not assignable to type string
Metadata
Metadata
Assignees
Labels
No labels