Immutable.d.ts 598 B

12345678910
  1. import * as React from 'react';
  2. export type CompareProps<T extends React.ComponentType<any>> = (prevProps: Readonly<React.ComponentProps<T>>, nextProps: Readonly<React.ComponentProps<T>>) => boolean;
  3. /**
  4. * Create Immutable pair for `makeImmutable` and `responseImmutable`.
  5. */
  6. export default function createImmutable(): {
  7. makeImmutable: <T extends React.ComponentType<any>>(Component: T, shouldTriggerRender?: CompareProps<T>) => T;
  8. responseImmutable: <T_1 extends React.ComponentType<any>>(Component: T_1, propsAreEqual?: CompareProps<T_1>) => T_1;
  9. useImmutableMark: () => number;
  10. };