Using React and TypeScript I'm trying to type a function that passes arguments to Date.toLocaleString but when I try to use Intl.LocalesArgument I get an error saying Namespace 'Intl' has no exported member 'LocalesArgument'. My tsconfig.json is below and I have tried changing target to es2020 and restarting the dev server to no avail.
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext",
],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
"useUnknownInCatchVariables": false
},
"include": [
"src"
]
}