polyfill

Code that adds a missing built-in feature to an older runtime, such as a Promise implementation for an old browser.

In more detail

A polyfill adds missing objects or methods at run time, while downleveling rewrites syntax at compile time. tsc does not add polyfills itself; it only rewrites syntax and assumes the lib objects exist.

Related terms

Taught in

References