79607829

Date: 2025-05-06 01:21:34
Score: 1
Natty:
Report link

This is what you want:

import type {} from 'react-select/base';
// This import is necessary for module augmentation.
// It allows us to extend the 'Props' interface in the 'react-select/base' module
// and add our custom property 'myCustomProp' to it.

declare module 'react-select/base' {
  export interface Props <
    Option,
    IsMulti extends boolean,
    Group extends GroupBase < Option >
    >
    {
      myCustomProp: string;
    }
}

Reference: https://react-select.com/typescript#custom-select-props

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: GuTheR