3 ms·
Kwargs is a feature I miss now I work in a typescript/nodejs code base. Sure you can objects bits it not the same.
by vorticalbox 4y ago
Kwargs is a feature I miss now I work in a typescript/nodejs code base.
Sure you can objects bits it not the same.
- goodoldneon 4y agoIn TS, an object is close to being kwargs. My main issue is that it’s much more verbose since you separately write the destructure and type, so you have to write the args twice. But one nice thing is that consumption is less verbose than Python. In Python you write “greet(name=name)” but in TS you write “greet({name})”