microsoft / tslib

Runtime library for TypeScript helpers.
BSD Zero Clause License
1.25k stars 126 forks source link

Remove System.register from UMD header #18

Closed rbuckton closed 7 years ago

rbuckton commented 7 years ago

This PR removes System.register from the UMD header of tslib.js in favor of System's built in module format detection. This fixes an issue with how tslib.js loads when running inside of JSPM/SystemJS.

Fixes: https://github.com/Microsoft/TypeScript/issues/12887

rbuckton commented 7 years ago

@DanielRosenwasser can you publish an update to npm?

aluanhaddad commented 7 years ago

@rbuckton Just FYI, the global System is currently slated to be removed so as to not conflict with the System global proposed in TC39. The current recommendation is to use the SystemJS global. This shouldn't affect module emit, at least for the time being, as a wrapper providing both names is currently injected.

You can see SystemJS rename to window.SystemJS over window.System for details.

Thanks! ❤️