index.d.ts 780 B

123456789101112131415161718192021222324
  1. declare module 'react-element-to-jsx-string' {
  2. import { ReactNode } from 'react';
  3. type FilterPropsFunction = (value: any, key: string) => boolean
  4. interface ReactElementToJSXStringOptions {
  5. displayName?: (element: ReactNode) => string;
  6. filterProps?: string[] | FilterPropsFunction;
  7. showDefaultProps?: boolean;
  8. showFunctions?: boolean;
  9. functionValue?: (fn: any) => any;
  10. tabStop?: number;
  11. useBooleanShorthandSyntax?: boolean;
  12. maxInlineAttributesLineLength?: number;
  13. sortProps?: boolean;
  14. useFragmentShortSyntax?: boolean;
  15. }
  16. const reactElementToJSXString: (element: ReactNode, options?: ReactElementToJSXStringOptions) => string;
  17. export { ReactElementToJSXStringOptions as Options };
  18. export default reactElementToJSXString;
  19. }