Skip to content

Conversation

@dword-design
Copy link

@dword-design dword-design commented Dec 4, 2025

Currently only string is allowed as values for env. But the variables will be stringified by Node.js, so actually anything can be passed.

I removed a test that imho isn't needed anymore. Alternatively, env could get a generic type arg, but as long as the type isn't used in any way in the lib, there isn't a need for it imho.

@ehmicky
Copy link
Collaborator

ehmicky commented Dec 4, 2025

Hi @dword-design,

This makes sense to me. Although arguably, some might consider relying on implicit transtyping to be bad practice, do we still want to allow it with our types?

What are your thoughts on this @sindresorhus?

@sindresorhus
Copy link
Owner

It's intentionally strict. That's the point of using TS. Lots of things are implicitly coerced in JS, but the types should not reflect that. So I would not merge this.

@dword-design
Copy link
Author

It's fine for me not to merge it. At least the discussion is here in case there are people asking. Alternatively, I thought about having the primitive types like number or boolean in it but again, discusable.

@ehmicky
Copy link
Collaborator

ehmicky commented Dec 5, 2025

Thanks for your understanding @dword-design. 🙏
If someone else has some feedback on this, please feel free to continue discussing here or on a new issue.

@ehmicky ehmicky closed this Dec 5, 2025
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

Successfully merging this pull request may close these issues.

3 participants