People who code: we want your input. Take the Survey
4

While it can sometimes be useful to expose only static members and not allow instances of your class to be constructed, I don't see what you're gaining by doing that here. But by not allowing multiple different ScannerInputs, you do lose out on the ability to have them operate on streams other than System.in. If you'd made a constructor public and the ...


1

It would be much easier for TS to infer the types if you put your callback in second place. I mean const map = obj => f => {} Also I slightly refactored your function in order to reduce complexity: type Primitives = string | number; const apply = < Key extends string, Value, >(obj: Record<Key, Value>) => <Result,>(...


Only top voted, non community-wiki answers of a minimum length are eligible