Skip to content

noImplicitAny checks node_modules despite skipLibCheck #15363

@sciolizer

Description

@sciolizer

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:

$ npm install
$ tsc

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    ExternalRelates to another program, environment, or user action which we cannot control.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions