2 ms·
Many TS advanced features are not designed for everyday end-products. They’re designed for: - more accurately and more maintainably typing existing JS interfac
by eyelidlessness 6y ago
Many TS advanced features are not designed for everyday end-products. They’re designed for:
- more accurately and more maintainably typing existing JS interfaces
- enabling more advanced compile time features for libraries
I’m probably one of these “typstronauts” you reference, I have extensively used nearly every advanced type feature in library code. But I’ve seldom found a need for any of them in consuming code. My approach since I adopted TS has always been:
- libraries can and should provide types at whatever level of complexity necessary to make library usage flexible, safe and simple
- end product code should use simple types wherever possible and depend as much as possible on the flexibility, safety and simplicity of the interfaces provided by those more complex libraries