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

Separate lib file for the subset of es2023.array methods implemented in Node 18 and 19 #56796

Closed
alexeyr-ci opened this issue Dec 15, 2023 · 3 comments
Labels
Declined The issue was declined as something which matches the TypeScript vision Suggestion An idea for TypeScript

Comments

@alexeyr-ci
Copy link

alexeyr-ci commented Dec 15, 2023

⚙ Compilation target

es2022

⚙ Library

["es2023"]

Missing / Incorrect Definition

See this issue tsconfig/bases#217. @tsconfig/node18 should be able to include findLast and findLastIndex while avoiding the copying methods unavailable in Node 18.

Sample Code

If tsconfig.json contains "extends": "@tsconfig/node18", code using toReversed(), toSorted(), etc. shouldn't compile but it does.

Documentation Link

No response

@alexeyr-ci alexeyr-ci changed the title Separate lib files for es2023.array methods implemented in Node 18 and 19 and not Separate lib file for the subset of es2023.array methods implemented in Node 18 and 19 Dec 15, 2023
@RyanCavanaugh RyanCavanaugh added Suggestion An idea for TypeScript Declined The issue was declined as something which matches the TypeScript vision labels Dec 15, 2023
@RyanCavanaugh
Copy link
Member

There's no way to tractably do this in a way that accounts for all possible runtimes' variations of support levels. If something doesn't support the full 2023 suite yet, it should be set to 2022.

@alexeyr-ci
Copy link
Author

Could a config use its own files in lib? That would solve the problem as well.

@alexeyr-ci
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Declined The issue was declined as something which matches the TypeScript vision Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

2 participants