microsoft / tslib

Runtime library for TypeScript helpers.
BSD Zero Clause License
1.24k stars 124 forks source link

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

Closed osher closed 3 months ago

osher commented 3 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 3 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