UNPKG

1.19 kBTypeScriptView Raw
1/// <reference types="react" />
2/**
3 * ---
4 * category: utilities/react
5 * ---
6 * Flag React component props as hack props.
7 * Warnings will display in the console when hack props are used.
8 *
9 * ```js
10 * class Example extends Component {
11 * static propTypes = {
12 * currentProp: PropTypes.func
13 * }
14 * }
15 * export default hack(['hackProp'])(Example)
16 * ```
17 *
18 * @module hack
19 * @param {array} hackProps
20 * @param {string} message
21 * @return {function} React component flagged as having hack props
22 */
23declare const hack: (...args: unknown[]) => (ComposedComponent: import("react").ComponentClass<any, any>) => any;
24export default hack;
25export {
26/**
27 * ---
28 * category: utilities/react
29 * ---
30 * Flag React component props as hack props.
31 * Warnings will display in the console when hack props are used.
32 *
33 * ```js
34 * class Example extends Component {
35 * static propTypes = {
36 * currentProp: PropTypes.func
37 * }
38 * }
39 * export default hack(['hackProp'])(Example)
40 * ```
41 *
42 * @module hack
43 * @param {array} hackProps
44 * @param {string} message
45 * @return {function} React component flagged as having hack props
46 */
47hack };
48//# sourceMappingURL=hack.d.ts.map
\No newline at end of file