gcanti / io-ts

Runtime type system for IO decoding/encoding
https://gcanti.github.io/io-ts/
MIT License
6.71k stars 329 forks source link

RangeError: Maximum call stack size exceeded #630

Open YoungLion opened 2 years ago

YoungLion commented 2 years ago

🐛 Bug report

Current Behavior

RangeError: Maximum call stack size exceeded

    at RefinementType.is (/Users/newlark/lark/tweety/node_modules/io-ts/lib/index.js:1614:46)
    at InterfaceType.is (/Users/newlark/lark/tweety/node_modules/io-ts/lib/index.js:975:83)
    at /Users/newlark/lark/tweety/node_modules/io-ts/lib/index.js:1254:104
    at Array.every (<anonymous>)
    at IntersectionType.is (/Users/newlark/lark/tweety/node_modules/io-ts/lib/index.js:1254:68)
    at /Users/newlark/lark/tweety/node_modules/io-ts/lib/index.js:1254:104
    at Array.every (<anonymous>)
    at IntersectionType.is (/Users/newlark/lark/tweety/node_modules/io-ts/lib/index.js:1254:68)
    at /Users/newlark/lark/tweety/node_modules/io-ts/lib/index.js:1177:52
    at Array.every (<anonymous>)
    at ArrayType.is (/Users/newlark/lark/tweety/node_modules/io-ts/lib/index.js:915:86)
    at InterfaceType.is (/Users/newlark/lark/tweety/node_modules/io-ts/lib/index.js:975:83)
    at /Users/newlark/lark/tweety/node_modules/io-ts/lib/index.js:1254:104
    at Array.every (<anonymous>)
    at IntersectionType.is (/Users/newlark/lark/tweety/node_modules/io-ts/lib/index.js:1254:68)
    at /Users/newlark/lark/tweety/node_modules/io-ts/lib/index.js:1254:104

Expected behavior

No error

Reproducible example

Suggested solution(s)

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.10.5
TypeScript 4.3.5
mlegenhausen commented 2 years ago

Could you please provide a reproducible example?