Commit 4f6b1ed
Update serializer types to support enzyme-to-json (#109)
Current type declaration for serializer causes errors when used with
`enzyme-to-json`. Changes:
* `diffOptions` is now an optional parameter (as it is in code).
* Type declaration for the second `serialize` parameter of the `print`
function has been weakened to `any` due to incorrect type used in
`enzyme-to-json` (should be function, but has been typed serializer)
* Return type declaration from `print` function has been weakened to
`any`; this function is not limited to only returning strings.
Conflicting `enzyme-to-json` declaration:
https://github.com/adriantoine/enzyme-to-json/blob/d1f86ee82ce014bb3d63f521a5d553307948eff0/index.d.ts#L22-L25
Mismatch of `enzyme-to-json` `serializer` type in `print` function:
https://github.com/adriantoine/enzyme-to-json/blob/d1f86ee82ce014bb3d63f521a5d553307948eff0/src/createSerializer.js#L9-L11
Fixes #1081 parent b03936d commit 4f6b1ed
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
| 28 | + | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
0 commit comments