11/* eslint-disable @typescript-eslint/no-unused-vars */
22import type { SystemStyleObject } from "@chakra-ui/system" ;
33import type { GroupBase , StylesConfig , ThemeConfig } from "react-select" ;
4-
5- /**
6- * This is necessary for the module `react-select/base` to be seen by TypeScript.
7- * Without it the module augmentation will not work properly.
8- *
9- * @see {@link https://github.com/JedWatson/react-select/pull/5762#issuecomment-1765467219 }
10- */
11- import type { Props } from "react-select/base" ;
124import type {
135 ChakraStylesConfig ,
146 ColorScheme ,
@@ -18,6 +10,15 @@ import type {
1810 Variant ,
1911} from "./types" ;
2012
13+ /**
14+ * This is necessary for the module `react-select/base` to be seen by TypeScript.
15+ * Without it the module augmentation will not work properly.
16+ *
17+ * @see {@link https://github.com/JedWatson/react-select/pull/5762#issuecomment-1765467219 }
18+ * @see {@link https://github.com/JedWatson/react-select/pull/5762#issuecomment-1766814503 }
19+ */
20+ export type { Props as ReactSelectBaseProps } from "react-select/base" ;
21+
2122/**
2223 * Module augmentation is used to add extra props to the existing interfaces
2324 * from `react-select` as per the docs
@@ -211,34 +212,34 @@ declare module "react-select/base" {
211212
212213declare module "react-select" {
213214 export interface MultiValueProps <
214- Option ,
215- IsMulti extends boolean ,
216- Group extends GroupBase < Option > ,
215+ Option = unknown ,
216+ IsMulti extends boolean = boolean ,
217+ Group extends GroupBase < Option > = GroupBase < Option > ,
217218 > {
218219 sx : SystemStyleObject ;
219220 }
220221
221222 export interface MultiValueGenericProps <
222- Option ,
223- IsMulti extends boolean ,
224- Group extends GroupBase < Option > ,
223+ Option = unknown ,
224+ IsMulti extends boolean = boolean ,
225+ Group extends GroupBase < Option > = GroupBase < Option > ,
225226 > {
226227 sx : SystemStyleObject ;
227228 }
228229
229230 export interface MultiValueRemoveProps <
230- Option ,
231- IsMulti extends boolean ,
232- Group extends GroupBase < Option > ,
231+ Option = unknown ,
232+ IsMulti extends boolean = boolean ,
233+ Group extends GroupBase < Option > = GroupBase < Option > ,
233234 > {
234235 isFocused : boolean ;
235236 sx : SystemStyleObject ;
236237 }
237238
238239 export interface LoadingIndicatorProps <
239- Option ,
240- IsMulti extends boolean ,
241- Group extends GroupBase < Option > ,
240+ Option = unknown ,
241+ IsMulti extends boolean = boolean ,
242+ Group extends GroupBase < Option > = GroupBase < Option > ,
242243 > {
243244 /**
244245 * The color of the filled in area of the spinner.
@@ -324,7 +325,6 @@ export type {
324325
325326// Forward all available exports from the original `react-select` package
326327export * from "react-select" ;
327- export type { Props } ;
328328export { useAsync } from "react-select/async" ;
329329export { useCreatable } from "react-select/creatable" ;
330330export type { AsyncProps } from "react-select/async" ;
0 commit comments