changing the lib compiler to es2017 in Webstorm?

I have a typescript scrap file inside a larger project.
somehow it is complaining:

TS2550: Property 'values' does not exist on type 'ObjectConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2017' or later.

that is supposed to be done inside of preferences > languages > typescript (at least it used to)

but on 2021.2.2 it looks like this:

or in the javascript settings:


not sure what to do.

perhaps my problem is, that I'm inside a scrap file?


This has to be normally done in tsconfig.json; if you don't have any, try passing --lib in Options: field


under Languages & Frameworks > TypeScript I changed the path to the ´/client folder within my project, which contains a tsconfig.

This is what it looks like:


the scrap file doesn't seem to care about it.

I also tried changing esnext to es2017 with no avail


sure, only the files in the client dir are a part of your typescript project (tsconfig.json should always be placed in Typescript project root), it can't be used for scratches linting


in Typescript options just set `--target es2019` or other value at your needs: