Skip to content

Commit

Permalink
Merge pull request #172 from chyzwar/fix-cherio-type
Browse files Browse the repository at this point in the history
fix(): fix cherio types following DT changes
  • Loading branch information
VincentLanglet authored Sep 28, 2020
2 parents 6e8c591 + 63f4026 commit b80ae29
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ export interface JestSerializer {
* @param wrapper any Enzyme wrapper
* @param [options] an option object which accepts `map`, `noKey` and `mode` as keys
*/
export declare function toJson(wrapper: CommonWrapper | Cheerio, options?: Options): Json;
export declare function toJson<P, S>(wrapper: CommonWrapper<P, S> | Cheerio, options?: Options): Json;
export declare function toJson(wrapper: CommonWrapper | cheerio.Cheerio, options?: Options): Json;
export declare function toJson<P, S>(wrapper: CommonWrapper<P, S> | cheerio.Cheerio, options?: Options): Json;

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

/**
* createSerializer helper is used to create snapshot serializers for Jest
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
},
"license": "MIT",
"dependencies": {
"@types/cheerio": "^0.22.22",
"lodash": "^4.17.15",
"react-is": "^16.12.0"
},
Expand Down
7 changes: 7 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1087,6 +1087,13 @@
dependencies:
"@babel/types" "^7.3.0"

"@types/cheerio@^0.22.22":
version "0.22.22"
resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.22.tgz#ae71cf4ca59b8bbaf34c99af7a5d6c8894988f5f"
integrity sha512-05DYX4zU96IBfZFY+t3Mh88nlwSMtmmzSYaQkKN48T495VV1dkHSah6qYyDTN5ngaS0i0VonH37m+RuzSM0YiA==
dependencies:
"@types/node" "*"

"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0":
version "2.0.1"
resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz#42995b446db9a48a11a07ec083499a860e9138ff"
Expand Down

0 comments on commit b80ae29

Please sign in to comment.