Comments (2)
tsconfig.json
{
"extends": "@tsconfig/node20/tsconfig.json",
"compilerOptions": {
"outDir": "./dist"
},
"include": ["src"]
}
Example using pet store swagger file and lib: ['ES2023']:
![Screenshot 2024-08-07 at 2 33 52 AM](https://private-user-images.githubusercontent.com/8138654/355686788-e7f558db-a356-4f5b-8391-8f4c16ab11ed.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyMDQ0NzUsIm5iZiI6MTcyNDIwNDE3NSwicGF0aCI6Ii84MTM4NjU0LzM1NTY4Njc4OC1lN2Y1NThkYi1hMzU2LTRmNWItODM5MS04ZjRjMTZhYjExZWQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgyMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MjFUMDEzNjE1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Yzc0ODdjYjJlNzAzMmU2ZmFhNWQ3MTY0YWM0MTcxYzI4MDhkOTc3ZTU4NWRkMDBhOTE0MDE5NjVmOTRhMTU1MSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.MyOcVOa8eICR7V1vfX_fbQvk0zS45jx3VP_JFGUUMDE)
Example using pet store swagger file without lib:
![Screenshot 2024-08-07 at 2 35 49 AM](https://private-user-images.githubusercontent.com/8138654/355687358-d1c7eba2-ac5b-4831-b139-5c329f590070.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyMDQ0NzUsIm5iZiI6MTcyNDIwNDE3NSwicGF0aCI6Ii84MTM4NjU0LzM1NTY4NzM1OC1kMWM3ZWJhMi1hYzViLTQ4MzEtYjEzOS01YzMyOWY1OTAwNzAucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgyMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MjFUMDEzNjE1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NzFjYTY1ODg0MWY4MzhiMjhhMjMyMjc4NGUxNDJkNWMzMzcwNmM1MjFhMWE4MDM4MWI0NTgzNzNjN2NiYWQwYyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.fv0apruQn4Ya_1sLbkKMPrgsHgS2svSUF2M6feTiXkg)
from openapi-typescript.
This appears to be broken by a change in [email protected]
, specifically microsoft/TypeScript#58610, which first shipped in [email protected]
. However, the underlying cause is the typing issue noted in #1823.
I can reproduce this issue in a project with:
typescript@>=5.5
@types/node@>=18
- tsconfig.json declares (or extends a config with) a
lib
array that does not include"DOM"
from openapi-typescript.
Related Issues (20)
- Document Japanese support HOT 2
- Alternate version of `createClient` that takes `operationId` HOT 4
- Better Benchmarking for openapi-fetch? HOT 3
- Missing codes in the errors union HOT 3
- [openapi-typescript] Incorrect type generated for nullable objects HOT 2
- [openapi-fetch] HeadersInit support in Node.JS
- openapi-react-query: support for useInfiniteQuery() HOT 1
- ResolveError: Failed to load https://****.*****.com/****/****: 404 Not Found HOT 4
- Replace `Array<T>` with `Iterable<T>` in request parameters HOT 2
- PathBasedClient cannot be (directly) used with generated paths
- Wrong type in openapi-react-query when using select to transform data HOT 5
- onRequest: must return new Request() when modifying the request
- Allowing Cookies Access in Middleware
- Help wanted: split type & runtime tests for openapi-fetch HOT 1
- Help wanted: add size-limit check in CI
- `SuccessResponseJSON` returns item instead of array of items
- Array of Enum with --enum-values creates 2-D Type, but 1-D values
- client.GET response type is "never" with apis that only define a default response type
- Why is data an empty object for a 204 response?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openapi-typescript.