Skip to content

Commit

Permalink
Fix react-select module augmentation and stop exporting incorrect type
Browse files Browse the repository at this point in the history
  • Loading branch information
csandman committed Jul 4, 2024
1 parent 2208334 commit 095b274
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import type { SystemStyleObject } from "@chakra-ui/system";
import type { GroupBase, StylesConfig, ThemeConfig } from "react-select";

/**
* This is necessary for the module `react-select/base` to be seen by TypeScript.
* Without it the module augmentation will not work properly.
*
* @see {@link https://github.com/JedWatson/react-select/pull/5762#issuecomment-1765467219}
*/
import type { Props } from "react-select/base";
import type {
ChakraStylesConfig,
ColorScheme,
Expand All @@ -18,6 +10,15 @@ import type {
Variant,
} from "./types";

/**
* This is necessary for the module `react-select/base` to be seen by TypeScript.
* Without it the module augmentation will not work properly.
*
* @see {@link https://github.com/JedWatson/react-select/pull/5762#issuecomment-1765467219}
* @see {@link https://github.com/JedWatson/react-select/pull/5762#issuecomment-1766814503}
*/
export type { Props as ReactSelectBaseProps } from "react-select/base";

/**
* Module augmentation is used to add extra props to the existing interfaces
* from `react-select` as per the docs
Expand Down Expand Up @@ -324,7 +325,6 @@ export type {

// Forward all available exports from the original `react-select` package
export * from "react-select";
export type { Props };
export { useAsync } from "react-select/async";
export { useCreatable } from "react-select/creatable";
export type { AsyncProps } from "react-select/async";
Expand Down

0 comments on commit 095b274

Please sign in to comment.