Type 'string | number' is not assignable to type 'never'. Type 'string' is not assignable to type 'never'. #44909
Labels
Working as Intended
The behavior described is the intended behavior; this is not a bug
Bug Report
π Version & Regression Information
β― Playground Link
Playground link with relevant code
π» Code
π Actual behaviour
There's an error in
fun1
. We can't doitem[name] = value
otherwise we have the errorType 'string | number' is not assignable to type 'never'. Type 'string' is not assignable to type 'never'.
But the fun2 works perfectly.
π Expected behaviour
We should have the same behaviour in fun1 and fun2.
The text was updated successfully, but these errors were encountered: