Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Add downlevel dts #9902

Merged
merged 4 commits into from Feb 18, 2020
Merged

Fix: Add downlevel dts #9902

merged 4 commits into from Feb 18, 2020

Conversation

gaetanmaisse
Copy link
Member

Issue:
Cherry-picks of #9847 to fix #9463 on next

What I did

Just cherry-picked the 4 commits of #9847 and fix the conflicts to apply them to next.

See #9847 for details.

TLDR;

While there are incompatible declaration outputs between TypeScript 3.7+ and TS3.5, there is a workaround to use the latest TypeScript version while still maintaining compatible d.ts files. This is accomplished by using downlevel-dts to generate alternative typings for users on a certain version of TypeScript.

In this PR, any users who are on TS3.5 and below, TypeScript will automatically look at the package.json for a field called typesVersions and utilize the typings in that folder via a mapping.

@gaetanmaisse gaetanmaisse merged commit 7e486a5 into next Feb 18, 2020
@gaetanmaisse gaetanmaisse deleted the add-downlevel-dts branch February 18, 2020 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TS1086: An accessor cannot be declared in an ambient context
3 participants