Skip to content

Instantly share code, notes, and snippets.

View paparent's full-sized avatar

PA Parent paparent

  • Shiptrack
  • Sorel-Tracy, QC
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: