Skip to content

TSConfig schema is outdated! does not support ES2023 for compilerOptions.target and lib #5152

@muhammad-fiaz

Description

@muhammad-fiaz

Description of the JSON schema.

The current tsconfig.json schema in SchemaStore is outdated and does not allow newer ECMAScript versions such as "ES2023" in the fields:

  • compilerOptions.target
  • compilerOptions.lib

This results in false validation errors inside editors like VS Code and Microsoft Edge DevTools, even though the latest TypeScript compiler fully supports ES2023+ features.

Examples of the current error shown by VS Code:

'compilerOptions/target' must be equal to one of the allowed values 'ES3, ES5, ES6, ES2015, ES2016, ES2017, ES2018, ES2019, ES2020, ES2021, ES2022, ESNext'. Value found '"ES2023"'. Or 'compilerOptions/target' must match pattern '^([Ee][Ss]([356]|(20(1[56789]|2[012]))|[Nn][Ee][Xx][Tt]))$'. Value found 'ES2023'Microsoft Edge Tools[typescript-config/is-valid](https://webhint.io/docs/user-guide/hints/hint-typescript-config/is-valid/)
Set the JavaScript language version for emitted JavaScript and include compatible library declarations.

See more: [https://www.typescriptlang.org/tsconfig#target](vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/workbench.html)

and:


'compilerOptions/lib/0' must be equal to one of the allowed values 'ES5, ES6, ES2015, ES2015.Collection, ES2015.Core, ES2015.Generator, ES2015.Iterable, ES2015.Promise, ES2015.Proxy, ES2015.Reflect, ES2015.Symbol.WellKnown, ES2015.Symbol, ES2016, ES2016.Array.Include, ES2017, ES2017.Intl, ES2017.Object, ES2017.SharedMemory, ES2017.String, ES2017.TypedArrays, ES2018, ES2018.AsyncGenerator, ES2018.AsyncIterable, ES2018.Intl, ES2018.Promise, ES2018.Regexp, ES2019, ES2019.Array, ES2019.Intl, ES2019.Object, ES2019.String, ES2019.Symbol, ES2020, ES2020.BigInt, ES2020.Promise, ES2020.String, ES2020.Symbol.WellKnown, ESNext, ESNext.Array, ESNext.AsyncIterable, ESNext.BigInt, ESNext.Intl, ESNext.Promise, ESNext.String, ESNext.Symbol, DOM, DOM.Iterable, ScriptHost, WebWorker, WebWorker.ImportScripts, Webworker.Iterable, ES7, ES2021, ES2020.SharedMemory, ES2020.Intl, ES2021.Promise, ES2021.String, ES2021.WeakRef, ESNext.WeakRef, es2021.intl, ES2022, ES2022.Array, ES2022.Error, ES2022.Intl, ES2022.Object, ES2022.String'. Value found '"ES2023"'. Or 'compilerOptions/lib/0' must match pattern '^[Ee][Ss]5|[Ee][Ss]6|[Ee][Ss]7$'. Value found 'ES2023' Or 'compilerOptions/lib/0' must match pattern '^[Ee][Ss]2015(\.([Cc][Oo][Ll][Ll][Ee][Cc][Tt][Ii][Oo][Nn]|[Cc][Oo][Rr][Ee]|[Gg][Ee][Nn][Ee][Rr][Aa][Tt][Oo][Rr]|[Ii][Tt][Ee][Rr][Aa][Bb][Ll][Ee]|[Pp][Rr][Oo][Mm][Ii][Ss][Ee]|[Pp][Rr][Oo][Xx][Yy]|[Rr][Ee][Ff][Ll][Ee][Cc][Tt]|[Ss][Yy][Mm][Bb][Oo][Ll].[Ww][Ee][Ll][Ll][Kk][Nn][Oo][Ww][Nn]|[Ss][Yy][Mm][Bb][Oo][Ll]))?$'. Value found 'ES2023' Or 'compilerOptions/lib/0' must match pattern '^[Ee][Ss]2016(\.[Aa][Rr][Rr][Aa][Yy].[Ii][Nn][Cc][Ll][Uu][Dd][Ee])?$'. Value found 'ES2023' Or 'compilerOptions/lib/0' must match pattern '^[Ee][Ss]2017(\.([Ii][Nn][Tt][Ll]|[Oo][Bb][Jj][Ee][Cc][Tt]|[Ss][Hh][Aa][Rr][Ee][Dd][Mm][Ee][Mm][Oo][Rr][Yy]|[Ss][Tt][Rr][Ii][Nn][Gg]|[Tt][Yy][Pp][Ee][Dd][Aa][Rr][Rr][Aa][Yy][Ss]))?$'. Value found 'ES2023' Or 'compilerOptions/lib/0' must match pattern '^[Ee][Ss]2018(\.([Aa][Ss][Yy][Nn][Cc][Ii][Tt][Ee][Rr][Aa][Bb][Ll][Ee]|[Ii][Nn][Tt][Ll]|[Pp][Rr][Oo][Mm][Ii][Ss][Ee]|[Rr][Ee][Gg][Ee][Xx][Pp]))?$'. Value found 'ES2023' Or 'compilerOptions/lib/0' must match pattern '^[Ee][Ss]2019(\.([Aa][Rr][Rr][Aa][Yy]|[Oo][Bb][Jj][Ee][Cc][Tt]|[Ss][Tt][Rr][Ii][Nn][Gg]|[Ss][Yy][Mm][Bb][Oo][Ll]))?$'. Value found 'ES2023' Or 'compilerOptions/lib/0' must match pattern '^[Ee][Ss]2020(\.([Bb][Ii][Gg][Ii][Nn][Tt]|[Pp][Rr][Oo][Mm][Ii][Ss][Ee]|[Ss][Tt][Rr][Ii][Nn][Gg]|[Ss][Yy][Mm][Bb][Oo][Ll].[Ww][Ee][Ll][Ll][Kk][Nn][Oo][Ww][Nn]))?$'. Value found 'ES2023' Or 'compilerOptions/lib/0' must match pattern '^[Ee][Ss]2021(\.([Ii][Nn][Tt][Ll]|[Pp][Rr][Oo][Mm][Ii][Ss][Ee]|[Ss][Tt][Rr][Ii][Nn][Gg]|[Ww][Ee][Aa][Kk][Rr][Ee][Ff]))?$'. Value found 'ES2023' Or 'compilerOptions/lib/0' must match pattern '^[Ee][Ss]2022(\.([Aa][Rr][Rr][Aa][Yy]|[Ee][Rr][Rr][Oo][Rr]|[Ii][Nn][Tt][Ll]|[Oo][Bb][Jj][Ee][Cc][Tt]|[Ss][Tt][Rr][Ii][Nn][Gg]))?$'. Value found 'ES2023' Or 'compilerOptions/lib/0' must match pattern '^[Ee][Ss][Nn][Ee][Xx][Tt](\.([Aa][Rr][Rr][Aa][Yy]|[Aa][Ss][Yy][Nn][Cc][Ii][Tt][Ee][Rr][Aa][Bb][Ll][Ee]|[Bb][Ii][Gg][Ii][Nn][Tt]|[Ii][Nn][Tt][Ll]|[Pp][Rr][Oo][Mm][Ii][Ss][Ee]|[Ss][Tt][Rr][Ii][Nn][Gg]|[Ss][Yy][Mm][Bb][Oo][Ll]|[Ww][Ee][Aa][Kk][Rr][Ee][Ff]))?$'. Value found 'ES2023' Or 'compilerOptions/lib/0' must match pattern '^[Dd][Oo][Mm](\.[Ii][Tt][Ee][Rr][Aa][Bb][Ll][Ee])?$'. Value found 'ES2023' Or 'compilerOptions/lib/0' must match pattern '^[Ss][Cc][Rr][Ii][Pp][Tt][Hh][Oo][Ss][Tt]$'. Value found 'ES2023' Or 'compilerOptions/lib/0' must match pattern '^[Ww][Ee][Bb][Ww][Oo][Rr][Kk][Ee][Rr](\.[Ii][Mm][Pp][Oo][Rr][Tt][Ss][Cc][Rr][Ii][Pp][Tt][Ss])?$'. Value found 'ES2023'Microsoft Edge Tools[typescript-config/is-valid](https://webhint.io/docs/user-guide/hints/hint-typescript-config/is-valid/)

These errors occur even though TypeScript 5.x supports ES2023+ targets, because the SchemaStore JSON schema has not yet been updated.

Request
Please update the TSConfig schema to include:


ES2023+

in both compilerOptions.target and compilerOptions.lib.

This will remove false errors in VS Code / Edge Tools and reflect the actual capabilities of modern TypeScript.

Thank you!

Supporting information.

Image

Are you making a PR for this?

No, someone else must create the PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions