You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The order of inference that would be needed here -- first check the return type of useGetThing, then check field_name, then figure out render's parameter type -- is pretty far off from a supported ordering of inference steps. See #30134
What I don't understand here though is that in the playground it looks like ts is correctly identifying it as a number. If it can give me the intelisense on what that value should be why does it matter if I do or do not specify it explictily
Intellisense doesn't compute the entire type flow of the program -- instead, it tries to compute the minimum amount possible so that results can come back faster. In some cases like this, these shortcuts can produce slightly inaccurate results compared to what would be produced from a proper inference.
Bug Report
number annotation is required despite typescript correctly identifying that same type
π Version & Regression Information
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
typescript is throwing an error off of the generic
π Expected behavior
If typescript can correctly identify the type of the function arguments it should make no difference if I manually add or remove that annotation
The text was updated successfully, but these errors were encountered: