2 ms·
I've been getting more mixed about Typescript lately. Quite often, you end up with everything being `any`, and every time you write something, the compiler make
by mcv 6y ago
I've been getting more mixed about Typescript lately. Quite often, you end up with everything being `any`, and every time you write something, the compiler makes you hunt down the missing types.
But being able to specify interfaces for lambdas is absolutely fantastic. Something like: "this function takes an object and returns a function that can take either a string or a number and returns a number" is easy to do in Typescript, and useful for figuring out where the lego block fits.
- crimsonalucard5 6y agoI just go strict. Never use Any unless I absolutely must. Hunting down the types is just the price you pay for what is basically a huge reduction in hidden runtime errors.