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

typescript non-strict #369

Closed
akomm opened this issue Jun 25, 2021 · 1 comment
Closed

typescript non-strict #369

akomm opened this issue Jun 25, 2021 · 1 comment

Comments

@akomm
Copy link

akomm commented Jun 25, 2021

I just realized why so many errors in the typing could remain unnoticed. Its because you run on strict: false. No serious typescript project, except those migrating from pure JS to TS incrementally, will have it set to false, otherwise its totally pointless.

Are there amy plans changing this? Also what makes some things to fix for strict now hard is the fact that you mutate objects like for example the request, making it harder to proper type it, wit hout copy & pasting vendor (next) types to adjust them, which makes code more prone to changes on nextjs side of typings. But I think changing this is due to huge BC break it would need is not to debate ;(

@akomm akomm changed the title typescript examples non-strict typescript non-strict Jun 25, 2021
@vvo
Copy link
Owner

vvo commented Jun 29, 2021

Are there amy plans changing this?
No plans but definitely up for it. I wrote next-iron-session before I learned about TypeScript. I run on strict: true nowadays in my own projects. Even if I don't even know what it does yet.

But I think changing this is due to huge BC break it would need is not to debate ;(

If you find a good new API that won't mutate the Next.js request object then I am all in yes as this would simplify things a lot yup.

Thanks again for jumping in on those subjects

@vvo vvo closed this as completed in cfa5c80 Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants