Skip to content

Commit 095b274

Browse files
committed
Fix react-select module augmentation and stop exporting incorrect type
1 parent 2208334 commit 095b274

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/index.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
/* eslint-disable @typescript-eslint/no-unused-vars */
22
import type { SystemStyleObject } from "@chakra-ui/system";
33
import 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";
124
import 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
@@ -324,7 +325,6 @@ export type {
324325

325326
// Forward all available exports from the original `react-select` package
326327
export * from "react-select";
327-
export type { Props };
328328
export { useAsync } from "react-select/async";
329329
export { useCreatable } from "react-select/creatable";
330330
export type { AsyncProps } from "react-select/async";

0 commit comments

Comments
 (0)