I recently added @types/spotify-api
to my project and updated my tsconfig.json file as follows:
"typeRoots": [
"node_modules/@types"
],
"types": [
"spotify-api"
],
However, I am encountering issues with Typescript not being able to find PlaylistTrackResponse
. This is confusing to me because it usually works fine with types like @types/node
in my other projects. I am currently using version 3.7.5 of Typescript.
Here is my complete tsconfig.json configuration:
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"module": "esnext",
"moduleResolution": "node",
"importHelpers": true,
"target": "es2015",
"typeRoots": [
"node_modules/@types"
],
"types": [
"spotify-api"
],
"lib": [
"es2018",
"dom"
]
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"disableTypeScriptVersionCheck": true
}
}