UNPKG

@instructure/ui-react-utils

Version:

A React utility library made by Instructure Inc.

16 lines 708 B
/** * --- * category: utilities/react * --- * Return a props object with only specified propTypes. * @module pickProps * @param {Object} props React component props * @param {Object|Array<string>} propTypesOrAllowedPropList React component propTypes or the list of allowed prop keys * @param {Array} include an optional array of prop names to include * @returns {Object} props object with only the included props * @module pickProps */ declare function pickProps<T extends Record<string, any>>(props: T, propTypesOrAllowedPropList: Record<string, any> | string[], include?: string[]): Record<string, unknown>; export default pickProps; export { pickProps }; //# sourceMappingURL=pickProps.d.ts.map