tsconfig not honored - "Property 'at' does not exist on type 'SomeType[]'"
Describe the bug
When using this plugin I get a number of type errors that don't seem to be honoring my tsconfig.json.
I'm using TS 4.6 and when I specify es2022 in lib of tsconfig.json it generates this error which doesn't make sense since TS 4.6 is when es2022 was added to it (it also displays es2022 when I do --help of tsc).
error TS6046: Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'esnext', 'dom', 'dom.iterable', 'webworker', 'webworker.importscripts', 'webworker.iterable', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'es2018.asyncgenerator', 'es2018.asynciterable', 'es2018.intl', 'es2018.promise', 'es2018.regexp', 'es2019.array', 'es2019.object', 'es2019.string', 'es2019.symbol', 'es2020.bigint', 'es2020.promise', 'es2020.sharedmemory', 'es2020.string', 'es2020.symbol.wellknown', 'es2020.intl', 'es2021.promise', 'es2021.string', 'es2021.weakref', 'esnext.array', 'esnext.symbol', 'esnext.asynciterable', 'esnext.intl', 'esnext.bigint', 'esnext.string', 'esnext.promise', 'esnext.weakref'
And... I found the problem and solution: I was using an old version of tsd that was using an old version of typescript.
So if someone runs into this error, just upgrade tsd.
Reproduction
Make a vite app using latest version of TS 4.6 that uses an array with the at method and use version 0.17 of tsd
Expected behavior
No errors
System Info
n/a
Additional context
No response
Validations
- [X] Read the docs.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
One way to address this is to compare the version of typescript that is installed in node_module vs the version of typescript used by tsd?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is a bug report, please provide a minimal re-production repository or use path to reproduce. Thank you for your contributions.
I guess this issue is not caused by the plugin. Feel free to reopen with a minimal reproduction.