Skip to content

Invalid ES2023 target suggested #57683

Closed

Description

🔎 Search Terms

es2023

🕗 Version & Regression Information

  • This is the behavior in every version I tried

⏯ Playground Link

No response

💻 Code

// tsconfig.json
{
    "compilerOptions": {
        "target": |
    }
}

🙁 Actual behavior

We get completions for "target" that include "ES2023".
If we accept that, we get the following error:
"error TS6046: Argument for '--target' option must be: 'es5', 'es6', 'es2015', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'esnext'."

🙂 Expected behavior

No suggestion of "ES2023".

Additional information about the issue

Activity

  1. whzx5byb commented on Mar 7, 2024

    @whzx5byb

    Duplicate of #56303?

  2. changed the title [-]Missing ES2023 target[/-] [+]Invalid ES2023 target suggested[/+] on Mar 7, 2024
  3. gabritto commented on Mar 7, 2024

    @gabritto
    MemberAuthor

    Ron Buckton (@rbuckton) suggested we should add ES2023 so that we can include ES2023 as a lib if your target is ES2023, but Ryan Cavanaugh (@RyanCavanaugh) said we shouldn't have it as a target, so I just wanted to double check.

    If we do want to remove it, we need to remove it here.

  4. RyanCavanaugh commented on Mar 7, 2024

    @RyanCavanaugh
    Member

    I think I was wrong in that one and we should just have targets for every named spec version; even if in practice a few are identical syntaxwise for some stuff, it's way less confusing.

  5. added
    Fix Available
    on Apr 10, 2024
  6. locked as resolved and limited conversation to collaborators on Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugFix Available

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions