Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require Minimum Typescript Version 4.5.2 #23

Open
anthonyjoeseph opened this issue Apr 7, 2022 · 1 comment
Open

Require Minimum Typescript Version 4.5.2 #23

anthonyjoeseph opened this issue Apr 7, 2022 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@anthonyjoeseph
Copy link
Owner

anthonyjoeseph commented Apr 7, 2022

🚀 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
Copy link
Owner Author

Thanks @ahrjarrett for the suggestion!

@anthonyjoeseph anthonyjoeseph added enhancement New feature or request good first issue Good for newcomers labels Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant