We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove this comment out , switch yaml from remote instead of local.
run bun i && bun ./gen.ts && npx tsc --noEmit ./src/client.ts in repo.
bun i && bun ./gen.ts && npx tsc --noEmit ./src/client.ts
/accounts/{accountId}/urlscanner/scan/{scanId}/screenshot: get: ... 200: content: "image/png": 202: content: "application/json":
This generate types
type ResponseContentType$urlscanner$get$scan$screenshot = "image/png" | "application/json
export const urlscanner$get$scan$screenshot = <RequestOption>(apiClient: ApiClient<RequestOption>) => <ResponseContentType extends ResponseContentType$urlscanner$get$scan$screenshot>(params: Params$urlscanner$get$scan$screenshot<ResponseContentType>, option?: RequestOption): Promise<(Response$urlscanner$get$scan$screenshot$Status$200 | Response$urlscanner$get$scan$screenshot$Status$202)[ResponseContentType]>
This emits an error because ResponseContentType keys require both types above to have all properties .
As ever described.
Generate each ResponseContentType and union
<200ResponseContentType, 202ResponseContentType> ... Promise< Response$urlscanner$get$scan$screenshot$Status$200[200ResponseContentType] | Response$urlscanner$get$scan$screenshot$Status$202)[202ResponseContentType] >
or
Promise< Response$urlscanner$get$scan$screenshot$Status$200[keyof Response$urlscanner$get$scan$screenshot$Status$200] | Response$urlscanner$get$scan$screenshot$Status$202[keyof Response$urlscanner$get$scan$screenshot$Status$202] >
<ResponseContentType extends {200: keyof 200Response, 202: keyof 202Response}> Promise< Response$urlscanner$get$scan$screenshot$Status$200[ResponseContentType['200']] | Response$urlscanner$get$scan$screenshot$Status$202)[ResponseContentType['202']] >
Final approach looks suitable for me.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
Steps To Reproduce
Remove this comment out , switch yaml from remote instead of local.
run
bun i && bun ./gen.ts && npx tsc --noEmit ./src/client.ts
in repo.This generate types
This emits an error because ResponseContentType keys require both types above to have all properties .
The current behavior
As ever described.
The expected behavior
Generate each ResponseContentType and union
or
or
Final approach looks suitable for me.
The text was updated successfully, but these errors were encountered: