suretype icon indicating copy to clipboard operation
suretype copied to clipboard

Fix incompatibility with TS4.7

Open hborchardt opened this issue 3 years ago • 0 comments

Hi, after upgrading to TypeScript 4.7 I got this error:

Error: node_modules/suretype/dist/validators/functional.d.ts:25:96 - error TS2344: Type 'T' does not satisfy the constraint '{}'.

25 export declare type AdditionalProperties<T, U> = FlattenObject<T & Record<string, U | ValuesOf<T>>>;
                                                                                                  ~

  node_modules/suretype/dist/validators/functional.d.ts:25:42
    25 export declare type AdditionalProperties<T, U> = FlattenObject<T & Record<string, U | ValuesOf<T>>>;
                                                ~
    This type parameter might need an `extends {}` constraint.

I am implementing the suggested resolution.

hborchardt avatar Sep 07 '22 18:09 hborchardt