Skip to content

Commit d2cb910

Browse files
committed
fix: Fix small problem with TypeScript 5.0
1 parent 0efbb57 commit d2cb910

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@essquare/typescript-openapi-codegen",
3-
"version": "0.3.1",
3+
"version": "0.3.2",
44
"description": "Library that generates Typescript clients based on the OpenAPI specification.",
55
"author": "Ferdi Koomen",
66
"homepage": "https://github.com/essquare/typescript-openapi-codegen",

src/templates/core/axios/sendRequest.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const sendRequest = async <T>(
2121
const transformers: AxiosResponseTransformer[] = [];
2222

2323
transformers.push(function binaryData(data, headers) {
24-
const contentType = (headers.getContentType() as string) || '';
24+
const contentType = headers.getContentType()?.toString() || '';
2525
const hasJSONContentType = contentType.indexOf('application/json') > -1;
2626
const hasTextContentType = contentType.indexOf('text/plain') > -1;
2727
if (!hasJSONContentType && !hasTextContentType) {

0 commit comments

Comments
 (0)