ngrx / core

Core functionality for the ngrx platform
MIT License
72 stars 25 forks source link

No implicit any errors #15

Open timruffles opened 7 years ago

timruffles commented 7 years ago

I'm having the following errors:

 ERROR in node_modules/@ngrx/core/src/compose.ts (12,43): Rest parameter 'functions' implicitly has an 'any[]' type.
  node_modules/@ngrx/core/src/compose.ts (13,19): Parameter 'arg' implicitly has an 'any' type.

when using this repo with: Typescript 2.2.2 and the below tsconfig. From looking at the code there is a type annotation, but TS seems to be failing at inferring the types from it.

I've not dug into best-practices for publishing TS modules, but is the lack of explicit declaration file in package.json, or a index.d.ts forcing TypeScript to dig through the package and re-validate it? I note the TypeScript docs suggests either types in package.json or a index.d.ts (the approach Angular itself takes).

{
  "compilerOptions": {
    "baseUrl": "",
    "declaration": false,
    "emitDecoratorMetadata": true,
    "skipLibCheck": true,
    "noImplicitAny": true,
    "noEmitHelpers": true,
    "importHelpers": true,
    "strictNullChecks": false,
    "noImplicitReturns": false,
    "noImplicitThis": false,
    "forceConsistentCasingInFileNames": true,
    "experimentalDecorators": true,
    "lib": ["es2016", "dom"],
    "mapRoot": "./",
    "module": "es6",
    "moduleResolution": "node",
    "outDir": "../dist/out-tsc",
    "sourceMap": true,
    "target": "es5",
    "typeRoots": [
      "../node_modules/@types"
    ]
  }
}