You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the case where I have two defaults, if none of them are present I want an exception to happen, for example:
// this is just an example with imaginary code (from the tests I know it does work)
const project = env.require(['FIRST_ENV', 'SECOND_ENV'])
The project variable, in this case, would also benefit because it could be typed as a string and not as a string | undefined as when I use just .require
The text was updated successfully, but these errors were encountered:
Yeah, that name makes sense! I had the same idea :)
I think it is important to make sure that the type returned is T and not T | undefined so that we don't have to perform any checks afterward (since it is either there or an exception was thrown)
I have the case where I have two defaults, if none of them are present I want an exception to happen, for example:
The
project
variable, in this case, would also benefit because it could be typed as astring
and not as astring | undefined
as when I use just.require
The text was updated successfully, but these errors were encountered: