open-api icon indicating copy to clipboard operation
open-api copied to clipboard

TypeScript 4.8 fails with `openapi-types`

Open tvardy opened this issue 3 years ago • 2 comments

When updated from TS 4.7.4 to 4.8.2 I'm getting this error during the build:

node_modules/openapi-types/dist/index.d.ts:16:28 - error TS2344: Type 'T' does not satisfy the constraint '{}'.

16         paths: PathsObject<T>;
                              ~

  node_modules/openapi-types/dist/index.d.ts:15:34
    15     type PathsWebhooksComponents<T> = {
                                        ~
    This type parameter might need an `extends {}` constraint.


Found 1 error in node_modules/openapi-types/dist/index.d.ts:16

I checked the TypeScripts changelog and this was actually introduced with the 4.8.0-beta version. Check here: https://devblogs.microsoft.com/typescript/announcing-typescript-4-8-beta/#unconstrained-generics-no-longer-assignable-to

tvardy avatar Sep 21 '22 05:09 tvardy

@tvardy please submit a PR to fix this

jsdevel avatar Oct 01 '22 07:10 jsdevel

I'm pretty sure this is fixed by #830

brianphillips avatar Oct 26 '22 21:10 brianphillips