Skip to content

Commit

Permalink
Expose type definitions
Browse files Browse the repository at this point in the history
Exports which are for the jest transformer interface are not exposed.
  • Loading branch information
remcohaszing committed Nov 24, 2021
1 parent 7f3c1c4 commit c5be6d8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
coverage/
node_modules/
*.d.ts
*.log
*.tgz
jest-axios-snapshot.js
Expand Down
2 changes: 2 additions & 0 deletions jest-axios-snapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ function serializeResponse(response: AxiosResponse, toString: Stringify): string
}

/**
* @internal
* @param actual - The actual value passed to expect.
* @returns Whether or not the actual input is an axios response.
*/
Expand Down Expand Up @@ -115,6 +116,7 @@ let transformResponse = defaultTransformer;
/**
* Serialize an axios response as a string.
*
* @internal
* @param response - The axios response to serialize.
* @param config - THe jest snapshot configuration.
* @param indentation - The intentation to use for serializing entities.
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"url": "https://github.com/remcohaszing/jest-axios-snapshot/issues"
},
"homepage": "https://github.com/remcohaszing/jest-axios-snapshot#readme",
"files": [],
"files": [
"jest-axios-snapshot.js",
"jest-axios-snapshot.d.ts"
],
"engines": {
"node": ">=12"
},
Expand Down
2 changes: 2 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"compilerOptions": {
"declaration": true,
"forceConsistentCasingInFileNames": true,
"lib": ["esnext"],
"module": "commonjs",
"noEmit": true,
"noImplicitAny": true,
"strict": true,
"stripInternal": true,
"target": "es2018"
}
}

0 comments on commit c5be6d8

Please sign in to comment.