spectacles-ts icon indicating copy to clipboard operation
spectacles-ts copied to clipboard

Require Minimum Typescript Version 4.5.2

Open anthonyjoeseph opened this issue 3 years ago • 1 comments

🚀 Feature request

Current Behavior

spectacles-ts requires a TS version 4.5.2 or greater. Users with an unsupported version get "type instantiation is infinitely deep" errors

Desired Behavior

Users with an unsupported TS version should get a clearer error

Suggested Solution

Since this is not officially supported in Typescript, use this workaround suggested by their team, using package.json typeVersions

Who does this impact? Who is this for?

Users with a TS version lower than TS 4.5 - spectacles-ts should fail more gracefully for them

Describe alternatives you've considered

We could set the minimum as low as TS 4.3.2

afaict this exposes us to possible "type instantiation is infinitely deep" errors, since tail-recursion didn't start suppressing those errors until 4.5, though I have no evidence to support that

Additional context

Your environment

Software Version(s)
spectacles-ts 1.0.6
fp-ts 2.11
TypeScript >4.5

anthonyjoeseph avatar Apr 07 '22 13:04 anthonyjoeseph

Thanks @ahrjarrett for the suggestion!

anthonyjoeseph avatar Apr 07 '22 13:04 anthonyjoeseph