Re:An introduction to type programming in TypeScript
by antholeole on Wednesday February 02, 2022 @09:34AM
(#30178081)
This is why I think non-null assertion should be accepted by default. If you forget to set the DB connection string, my backend is essentially useless! I can’t persist anything. I do process.env.DB_CONN! - at runtime I’ll get an error that the string is undefined, but that’s actually what I want - I want my app to throw an error so I can quickly find the error, slap my forehead and put the variable in the .env file.
[ Parent
| on HN ]
There are no comments on this comment yet.