microsoft / tslib

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

feat: Add class private field helper methods #79

Closed ExE-Boss closed 4 years ago

ExE-Boss commented 5 years ago

Companion PR to TypeScript#30829.

mheiber commented 4 years ago

@ExE-Boss thanks for looking into this.

@neuroboy23 opened https://github.com/microsoft/tslib/pull/77 earlier to use the same helpers as in https://github.com/microsoft/TypeScript/pull/30829

I see that the helpers in this PR (#79) are different from the ones in https://github.com/microsoft/TypeScript/pull/30829. My understanding is that ideally the helpers would match, so TS users don't get different behavior dependong on whether or not they are using tslib.

Am I understanding correctly? I haven't contributed to tslib before, so don't know what's normal.

ExE-Boss commented 4 years ago

I created this with the expectation that https://github.com/microsoft/TypeScript/pull/30829 would be changed to use property descriptors like what Babel does.