microsoft / tslib

Runtime library for TypeScript helpers.
BSD Zero Clause License
1.26k stars 130 forks source link

this appears to be a dev-dependency, but the instructions point it to be a dependency #251

Closed osher closed 7 months ago

osher commented 7 months ago

The README.md recommends to npm install tslib - which results in adding the lib to the production runtime dependencies.

If I understand correctly, this is a helper for the tsc - which is a dev-dependency.

Yes, there are some peculiar cases where your production runtime deals with tsc transpiling, but this is far from the norm...

I should expect the default instructions to propose npm install tslib -D :)

orta commented 7 months ago

Afraid not, this is the library of all the possible runtime JS which TypeScript could use during TS->JS as a single dependency (instead of many different projects including it)

Being a runtime dependency is correct