Skip to content

Commit b80ae29

Browse files
authoredSep 28, 2020
Merge pull request #172 from chyzwar/fix-cherio-type
fix(): fix cherio types following DT changes
2 parents 6e8c591 + 63f4026 commit b80ae29

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed
 

‎index.d.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ export interface JestSerializer {
2929
* @param wrapper any Enzyme wrapper
3030
* @param [options] an option object which accepts `map`, `noKey` and `mode` as keys
3131
*/
32-
export declare function toJson(wrapper: CommonWrapper | Cheerio, options?: Options): Json;
33-
export declare function toJson<P, S>(wrapper: CommonWrapper<P, S> | Cheerio, options?: Options): Json;
32+
export declare function toJson(wrapper: CommonWrapper | cheerio.Cheerio, options?: Options): Json;
33+
export declare function toJson<P, S>(wrapper: CommonWrapper<P, S> | cheerio.Cheerio, options?: Options): Json;
3434

3535
/**
3636
* shallowToJson helper is used to convert Enzyme shallow wrappers to a format compatible with Jest snapshot
@@ -53,7 +53,7 @@ export declare function mountToJson<P, S>(wrapper: ReactWrapper<P, S>, options?:
5353
* @param wrapper an Enzyme render wrapper
5454
* @param [options] an option object which accepts `map`, `noKey` and `mode` as keys
5555
*/
56-
export declare function renderToJson(wrapper: Cheerio, options?: Options): Json;
56+
export declare function renderToJson(wrapper: cheerio.Cheerio, options?: Options): Json;
5757

5858
/**
5959
* createSerializer helper is used to create snapshot serializers for Jest

‎package.json

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
},
4141
"license": "MIT",
4242
"dependencies": {
43+
"@types/cheerio": "^0.22.22",
4344
"lodash": "^4.17.15",
4445
"react-is": "^16.12.0"
4546
},

‎yarn.lock

+7
Original file line numberDiff line numberDiff line change
@@ -1087,6 +1087,13 @@
10871087
dependencies:
10881088
"@babel/types" "^7.3.0"
10891089

1090+
"@types/cheerio@^0.22.22":
1091+
version "0.22.22"
1092+
resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.22.tgz#ae71cf4ca59b8bbaf34c99af7a5d6c8894988f5f"
1093+
integrity sha512-05DYX4zU96IBfZFY+t3Mh88nlwSMtmmzSYaQkKN48T495VV1dkHSah6qYyDTN5ngaS0i0VonH37m+RuzSM0YiA==
1094+
dependencies:
1095+
"@types/node" "*"
1096+
10901097
"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0":
10911098
version "2.0.1"
10921099
resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz#42995b446db9a48a11a07ec083499a860e9138ff"

0 commit comments

Comments
 (0)
Please sign in to comment.