Utilizing the NPM package ssh2-sftp-client
, I have also installed the types for it from @types/ssh2-sftp-client
. Despite having both installed, the types do not seem to be recognized. Here is an example of my package.json
:
{
"name": "name",
"version": "0.1.0",
"description": "description",
"devDependencies": {
"@types/ssh2": "^1.11.7",
"@types/ssh2-sftp-client": "^9.0.0"
},
"dependencies": {
"ssh2-sftp-client": "^9.0.4"
}
}
I came across this related answer, which seems to focus on types that are manually declared. Is there any additional setup required after installing any @typings
package?
Edit... I forgot to include the tsconfig.json
file:
"compilerOptions": {
"lib": ["ES2022"],
"module": "commonjs",
"target": "ES2022",
"declaration": true,
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"noImplicitThis": true,
"alwaysStrict": true,
"noUnusedLocals": false,
"noUnusedParameters": false,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": false,
"inlineSourceMap": true,
"inlineSources": true,
"experimentalDecorators": true,
"skipLibCheck": true,
"strictPropertyInitialization": false,
"typeRoots": [
"./node_modules/@types"
]
},
"exclude": [
"node_modules/**/*",
"cdk.out"
]
}