TypeScript Version: 2.2.2
Code
package.json:
{
"devDependencies": {
"@types/es6-promise": "0.0.32",
"@types/node": "^7.0.12",
"typescript": "^2.2.2"
},
"dependencies": {
"k8s": "^0.4.13"
}
}
tsconfig.json:
{
"compilerOptions": {
"noImplicitAny": true,
"strictNullChecks": true,
"outDir": "dist",
"skipDefaultLibCheck": true,
"skipLibCheck": true
},
"include": [
"index.ts"
]
}
index.ts:
import * as K8s from 'k8s';
async function main() {
const api = K8s.api({
endpoint: 'http://localhost:8000'
, version: '/api/v1'
});
console.log(await api.get('namespaces/default/pods'));
}
main().then(() => { }).catch((e) => console.error(e));
Steps to reproduce:
Expected behavior:
Compilation succeeds.
Actual behavior:
Compilation fails with errors about ignored library k8s:
node_modules/k8s/index.ts(5,23): error TS7006: Parameter 'conf' implicitly has an 'any' type.
node_modules/k8s/lib/request.ts(8,13): error TS7005: Variable 'Buffer' implicitly has an 'any' type.
node_modules/k8s/lib/request.ts(12,5): error TS7008: Member 'strictSSL' implicitly has an 'any' type.
node_modules/k8s/lib/request.ts(13,5): error TS7008: Member 'domain' implicitly has an 'any' type.
node_modules/k8s/lib/request.ts(14,5): error TS7008: Member 'auth' implicitly has an 'any' type.
node_modules/k8s/lib/request.ts(42,25): error TS7006: Parameter 'kubeconfig' implicitly has an 'any' type.
... etc