Mary
Mary

Reputation: 1145

Why does my TypeScript give error TS2394?

I have a very simple function:

function open(callback) {

}

On the command line, when I run tsc, I get:

../../../../npm/lib/node_modules/typescript/lib/lib.es6.d.ts(20833,18): error TS2394: Overload signature is not compatible with function implementation.

My tsc version is 2.6.1

Why am I getting the above error message?

Upvotes: 1

Views: 294

Answers (1)

basarat
basarat

Reputation: 276303

Why am I getting the above error message?

Your tsconfig is stuffed. Make sure you have setup include with some src folder e.g.

{
    "include":[
        "src"
    ]
}

More

https://basarat.gitbooks.io/typescript/content/docs/project/compilation-context.html

Upvotes: 2

Related Questions