I installed @types/spotify-api and made the following changes to my tsconfig.json
"typeRoots": [
"node_modules/@types"
],
"types": [
"spotify-api"
],
Typescript can't find PlaylistTrackResponse for example. I can't figure out why because it works the same way with types like @types/node in other projects. I'm using typescript 3.7.5.
my full tsconfig.json
{
"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
}
}
