This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import PropTypes from 'prop-types'; | |
type Omit<T, K> = Pick<T, Exclude<keyof T, K>>; | |
type Defined<T> = T extends undefined ? never : T; | |
/** | |
* Get the type that represents the props with the defaultProps included. | |
* | |
* Alternatively, we could have done something like this: |