File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1
1
declare module 'react-element-to-jsx-string' {
2
2
import { ReactNode } from 'react' ;
3
3
4
+ type FilterPropsFunction = ( value : any , key : string ) => boolean
5
+
4
6
interface ReactElementToJSXStringOptions {
5
7
displayName ?: ( element : ReactNode ) => string ;
6
- filterProps ?: string [ ] ;
8
+ filterProps ?: string [ ] | FilterPropsFunction ;
7
9
showDefaultProps ?: boolean ;
8
10
showFunctions ?: boolean ;
9
11
functionValue ?: ( fn : any ) => any ;
@@ -15,5 +17,8 @@ declare module 'react-element-to-jsx-string' {
15
17
}
16
18
17
19
const reactElementToJSXString : ( element : ReactNode , options ?: ReactElementToJSXStringOptions ) => string ;
18
- export = reactElementToJSXString ;
20
+
21
+ export { ReactElementToJSXStringOptions as Options } ;
22
+
23
+ export default reactElementToJSXString ;
19
24
}
You can’t perform that action at this time.
0 commit comments