Fault in tsc --noEmit
on mixed up params in complex function
#49966
Labels
Duplicate
An existing issue was already created
Bug Report
π Search Terms
fault
Object
parameter
symbol
cached
type
differs
assigned
π Version & Regression Information
β― Playground Link
Please find an example reproduction here
π» Code
This is correct and passes
tsc --noEmit
as expected! πThis is incorrect but instead of printing a diagnostic tsc faults. Unfortunately without a good diagnostic.
π Actual behavior
π Expected behavior
Normally
tsc
should print a diagnostic instead of failing its assertion.I bet it's because these functions have complex types.
Here in a simple case with
then it behaves like this
$ tsc --noEmit /src/simpleParamsError.ts(2,3): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'.
The text was updated successfully, but these errors were encountered: