Skip to content

8.2.0 regression #884

@nazar-pc

Description

@nazar-pc

Here is my tsconfig.json:

Details
{
  "compilerOptions": {
    "module": "umd",
    "target": "esnext",
    "sourceMap": true,
    "forceConsistentCasingInFileNames": true,
    "noImplicitReturns": true,
    "noImplicitAny": true,
    "skipLibCheck": true,
    "moduleResolution": "node",
    "allowSyntheticDefaultImports": false,
    "declaration": true,
    "sourceRoot": "src",
    "baseUrl": "src",
    "outDir": "dist",
    "strict": true,
    "noUnusedParameters": true,
    "noUnusedLocals": true,
    "lib": [
      "es2015",
      "es2017.object",
      "dom"
    ],
    "typeRoots": [
      "node_modules/@types",
      "types"
    ],
    "plugins": [
      {
        "name": "typescript-tslint-plugin"
      }
    ]
  },
  "typedocOptions": {
    "mode": "modules",
    "out": "docs"
  },
  "include": [
    "src"
  ]
}

Code sample:

const timeout = setTimeout(() => {}, 0);
if (timeout.unref) {
  timeout.unref();
}

With 8.1.1 it works fine, with 8.2.0 and 8.3.0 it fails with:

error TS2339: Property 'unref' does not exist on type 'number'.

Even though project has @types/node installed and tsc -b works fine and tslint in strict mode doesn't complain either.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions