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

Base config for Node 18 wrong lib #60965

Closed
Catatomik opened this issue Jan 13, 2025 · 2 comments · Fixed by microsoft/TypeScript-wiki#343
Closed

Base config for Node 18 wrong lib #60965

Catatomik opened this issue Jan 13, 2025 · 2 comments · Fixed by microsoft/TypeScript-wiki#343
Labels
Bug A bug in TypeScript Help Wanted You can do this
Milestone

Comments

@Catatomik
Copy link

⚙ Compilation target

ES2022

⚙ Library

ES2023

Missing / Incorrect Definition

Every Change Array by copy methods defined in ES2023 are not present in node versions <= 20.
Therefore, the base tsconfig should be updated to have lib ES2022 instead of ES2023.

Wiki should also be updated to follow this fix.

Sample Code

const arr = [1,2,3];
const reversed = arr.toReversed();

Documentation Link

@Catatomik
Copy link
Author

@RyanCavanaugh RyanCavanaugh added Bug A bug in TypeScript Help Wanted You can do this labels Jan 13, 2025
@RyanCavanaugh RyanCavanaugh added this to the Backlog milestone Jan 13, 2025
@jakebailey
Copy link
Member

jakebailey commented Jan 13, 2025

I sent microsoft/TypeScript-wiki#343 to undo my change; I honestly do not remember why I did that (microsoft/TypeScript-wiki@fc10f93).

(Maybe at that date, ES2023 hadn't been finalized? And so node.green did not include them?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Help Wanted You can do this
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants