You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
% npm run build
> example@0.0.0 build
> tsc
node_modules/io-ts/lib/index.d.ts:1387:29 - error TS2344: Type 'O' does not satisfy the constraint 'Exact<O, O>'.
Type 'O' is not assignable to type '{ [K in ({ [K in keyof O]: K; } & { [K in keyof O]: never; } & { [key: string]: never; })[keyof O]]?: undefined; }'.
1387 OO extends Exact<O, OO> = O,
~
node_modules/io-ts/lib/index.d.ts:1383:34
1383 export declare function alias<A, O, P, I>(
~
This type parameter probably needs an `extends object` constraint.
node_modules/io-ts/lib/index.d.ts:1388:29 - error TS2344: Type 'P' does not satisfy the constraint 'Exact<P, P>'.
Type 'P' is not assignable to type '{ [K in ({ [K in keyof P]: K; } & { [K in keyof P]: never; } & { [key: string]: never; })[keyof P]]?: undefined; }'.
1388 PP extends Exact<P, PP> = P,
~
node_modules/io-ts/lib/index.d.ts:1383:37
1383 export declare function alias<A, O, P, I>(
~
This type parameter probably needs an `extends object` constraint.
node_modules/io-ts/lib/index.d.ts:1395:29 - error TS2344: Type 'O' does not satisfy the constraint 'Exact<O, O>'.
Type 'O' is not assignable to type '{ [K in ({ [K in keyof O]: K; } & { [K in keyof O]: never; } & { [key: string]: never; })[keyof O]]?: undefined; }'.
1395 OO extends Exact<O, OO> = O,
~
node_modules/io-ts/lib/index.d.ts:1391:34
1391 export declare function alias<A, O, P, I>(
~
This type parameter probably needs an `extends object` constraint.
node_modules/io-ts/lib/index.d.ts:1396:29 - error TS2344: Type 'P' does not satisfy the constraint 'Exact<P, P>'.
Type 'P' is not assignable to type '{ [K in ({ [K in keyof P]: K; } & { [K in keyof P]: never; } & { [key: string]: never; })[keyof P]]?: undefined; }'.
1396 PP extends Exact<P, PP> = P,
~
node_modules/io-ts/lib/index.d.ts:1391:37
1391 export declare function alias<A, O, P, I>(
~
This type parameter probably needs an `extends object` constraint.
node_modules/io-ts/lib/index.d.ts:1403:29 - error TS2344: Type 'O' does not satisfy the constraint 'Exact<O, O>'.
Type 'O' is not assignable to type '{ [K in ({ [K in keyof O]: K; } & { [K in keyof O]: never; } & { [key: string]: never; })[keyof O]]?: undefined; }'.
1403 OO extends Exact<O, OO> = O,
~
node_modules/io-ts/lib/index.d.ts:1399:34
1399 export declare function alias<A, O, P, I>(
~
This type parameter probably needs an `extends object` constraint.
node_modules/io-ts/lib/index.d.ts:1404:29 - error TS2344: Type 'P' does not satisfy the constraint 'Exact<P, P>'.
Type 'P' is not assignable to type '{ [K in ({ [K in keyof P]: K; } & { [K in keyof P]: never; } & { [key: string]: never; })[keyof P]]?: undefined; }'.
1404 PP extends Exact<P, PP> = P,
~
node_modules/io-ts/lib/index.d.ts:1399:37
1399 export declare function alias<A, O, P, I>(
~
This type parameter probably needs an `extends object` constraint.
Found 6 errors in the same file, starting at: node_modules/io-ts/lib/index.d.ts:1387
Suggested solution(s)
The errors show a couple suggestions but I don't understand them very well.
Additional context
Your environment
Which versions of io-ts are affected by this issue? Did this work in previous versions of io-ts?
Software
Version(s)
io-ts
2.2.16
fp-ts
2.12.1
TypeScript
4.7.0-beta
The text was updated successfully, but these errors were encountered:
There is another 4.7 related error in #644 Not sure if they are related, but with 4.7 came some changes/improvements to the type inference, so there might be a connection.
🐛 Bug report
This is a separate issue from #644, not related to ESM compatibility (as far as I can tell).
Current Behavior
io-ts
fails to compile under the new TypeScript 4.7 beta.Expected behavior
io-ts
compiles without emitting any errors.Reproducible example
package.json
:tsconfig.json
:index.ts
:Suggested solution(s)
The errors show a couple suggestions but I don't understand them very well.
Additional context
Your environment
Which versions of io-ts are affected by this issue? Did this work in previous versions of io-ts?
The text was updated successfully, but these errors were encountered: