I'm trying to write a Sveltekit application but running into errors upon compiling my TS. When it tries to compile export async function invalidateSession(sessionId: string): Promise<void> {}
for example, I get the error error TS2705: An async function or method in ES5 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option
But my TSConfig file is configured like so.
{"extends": "./.svelte-kit/tsconfig.json","compilerOptions": {"allowJs": true, "checkJs": false, //was previously set to true"esModuleInterop": true,"forceConsistentCasingInFileNames": true,"resolveJsonModule": true,"skipLibCheck": true,"sourceMap": true,"strict": true,"moduleResolution": "bundler","lib": ["ES2021","dom"],"target": "ES2015" }}
Which as you can see, DOES in fact include ES2015 in its lib option. I think maybe something might be going wrong here with my VSC client not properly recognising my TSConfig file extending the sveltekit default, but this is located in my root directory so I'm not sure.
Any help is appreciated, thanks.