![](/static/66c60d9f/assets/icons/icon-96x96.png)
![](https://lemmy.ml/pictrs/image/d3d059e3-fa3d-45af-ac93-ac894beba378.png)
1·
11 months agoPeople love to complain about npm
and node_modules
, but I think they were on to something with the simplicity of it.
People love to complain about npm
and node_modules
, but I think they were on to something with the simplicity of it.
Return undefined.
Typescript.
Why error? Just return undefined. Simple, no try/catch needed.
I had to use Python for a bit at work and it was confusing
pipenv, venv, virtualenv, poetry…wtf is all this shit
a.b
vs a['b']
vs a.get('b')
…wtf is a KeyError
Is it? It’s just an optional property. And Typescript will tell you that it’s optional.