openapi-ts
openapi-ts copied to clipboard
fix: add explicit type annotations to `Interceptors`
This is to make the generated code work with TS's new isolatedDeclarations config.
https://devblogs.microsoft.com/typescript/announcing-typescript-5-5-beta/#isolated-declarations
src/api/requests/core/OpenAPI.ts:14:3 - error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations.
14 eject(fn: Middleware<T>) {
~~~~~
src/api/requests/core/OpenAPI.ts:14:3
14 eject(fn: Middleware<T>) {
~~~~~
Add a return type to the method
src/api/requests/core/OpenAPI.ts:21:3 - error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations.
21 use(fn: Middleware<T>) {
~~~
src/api/requests/core/OpenAPI.ts:21:3
21 use(fn: Middleware<T>) {
~~~
Add a return type to the method
Run & review this pull request in StackBlitz Codeflow.
π¦ Changeset detected
Latest commit: ac966fe794cd8a8e6a65879361499615a86c387d
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
| Name | Type |
|---|---|
| @hey-api/openapi-ts | Patch |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
The latest updates on your projects. Learn more about Vercel for Git βοΈ
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| hey-api-docs | β Ready (Inspect) | Visit Preview | π¬ Add feedback | May 24, 2024 3:30pm |
Note: I should add tsconfig tests because this is too easy to break and hard to see what it actually fixes
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 75.45%. Comparing base (
3c97054) to head (ac966fe).
Additional details and impacted files
@@ Coverage Diff @@
## main #594 +/- ##
=======================================
Coverage 75.45% 75.45%
=======================================
Files 75 75
Lines 7312 7312
Branches 663 663
=======================================
Hits 5517 5517
Misses 1792 1792
Partials 3 3
| Flag | Coverage Ξ | |
|---|---|---|
| unittests | 75.45% <ΓΈ> (ΓΈ) |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Can this land in the meantime? π I agree tests to prevent regressions is ideal, but this doesn't hurt on its own, and allows me to drop a floated patch
Merged, thanks! Is it okay if it's released on Monday/weekend?
Yeah, no rush at all π
Thanks!