Skip to content

importHelpers option causes compiler errors #14468

Description

TypeScript Version: 2.2.1

Environment:

  • Windows 10
  • Node 7.6.0
  • NPM 4.1.2
  • TypeScript 2.2.1
  • tslib 1.6.0

The recently added compiler option "importHelpers" causes compiler errors. There are several other closed issues where this problem was described: #12724, #12775, #12. This should be fixed, in TS 2.1.5 or 2.2.x but it still occurs.
It's a simple compiler error in the CLI. In vscode (latest version 1.10.1) the "extends" keyword causes the error.

I created a small skeleton which demonstrates this bug: https://github.com/code-chris/tslib-compile-error. This was tested on a windows machine with the specs above.

Expected behavior:
There's no compilation error when "importHelpers" option is enabled.

Actual behavior:
The compilation result is runnable and correct, but there's a compilation error like this:

src/main.ts(5,19): error TS2354: This syntax requires an imported helper but module 'tslib' cannot be found.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScript

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions