Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a new build step that takes the bundled type definitions generated by TypeScript and API Extractor, and "down-levels" them to be compatible with older versions of TypeScript. This allows us to compile with the latest and greatest version of TypeScript, while still preserving backwards compatibility.
The implementation was adapted from sandersn/downlevel-dts, which already handled converting
get
/set
accessors to regular properties for TypeScript 3.5 and below. I've added an extra step to convert lib references fores2018.asynciterable
toesnext.asynciterable
for TypeScript 3.3 and below, to avoid regressing on #39.By default, users will get the down-leveled type definitions from
dist/types/polyfill.d.ts
. If they are on TypeScript 3.6 or above, they will get the unmodified type definitions fromdist/types/ts3.6/polyfill.d.ts
using typesVersions.