Fixing typescript error: Overload signatures must all be ambient or non-ambient.

../../../usr/local/lib/node_modules/typescript/lib/lib.d.ts(16893,18): 
error TS2394: Overload signature is not compatible with function implementation.

index.tsx(3,10): error TS2384: 

Overload signatures must all be ambient or non-ambient.

For instance, you can cause it with just this:

function print(x: String) { 
}

This is an indication that you’re creating a function that overloads another function, but the other one doesn’t have types. The correct fix is to rename your item.

Interested in JavaScript? I send out weekly, personalized emails with articles and conference talks. Click here to see an example and subscribe.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *