Skip to content

Instantly share code, notes, and snippets.

View shawngustaw's full-sized avatar
🇨🇦

Shawn Gustaw shawngustaw

🇨🇦
  • Los Angeles
View GitHub Profile
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: