mirror of
https://github.com/ferdikoomen/openapi-typescript-codegen.git
synced 2025-12-08 20:16:21 +00:00
- Fixed #389
This commit is contained in:
parent
427c138c39
commit
bf30cbfb85
10
README.md
10
README.md
@ -441,6 +441,16 @@ npm install node-fetch --save-dev
|
||||
npm install form-data --save-dev
|
||||
```
|
||||
|
||||
In order to compile the project and resolve the imports, you will need to enable the `allowSyntheticDefaultImports`
|
||||
in your `tsconfig.json` file.
|
||||
|
||||
```json
|
||||
{
|
||||
"allowSyntheticDefaultImports": true
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
[npm-url]: https://npmjs.org/package/openapi-typescript-codegen
|
||||
[npm-image]: https://img.shields.io/npm/v/openapi-typescript-codegen.svg
|
||||
[license-url]: LICENSE
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{{>header}}
|
||||
|
||||
import * as FormData from 'form-data';
|
||||
import FormData from 'form-data';
|
||||
import fetch, { BodyInit, Headers, RequestInit, Response } from 'node-fetch';
|
||||
import { types } from 'util';
|
||||
|
||||
|
||||
@ -12,6 +12,16 @@ function compileWithTypescript(dir) {
|
||||
module: 'es6',
|
||||
moduleResolution: 'node',
|
||||
lib: ['es6', 'es2017', 'dom'],
|
||||
declaration: false,
|
||||
declarationMap: false,
|
||||
sourceMap: false,
|
||||
noImplicitReturns: true,
|
||||
noImplicitThis: true,
|
||||
noImplicitAny: true,
|
||||
strict: true,
|
||||
strictNullChecks: true,
|
||||
strictFunctionTypes: true,
|
||||
allowSyntheticDefaultImports: true,
|
||||
},
|
||||
include: ['./index.ts'],
|
||||
};
|
||||
|
||||
@ -14,7 +14,8 @@
|
||||
"noImplicitAny": true,
|
||||
"strict": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true
|
||||
"strictFunctionTypes": true,
|
||||
"allowSyntheticDefaultImports": true
|
||||
},
|
||||
|
||||
"files": [
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user