UNPKG

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