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
@RyanCavanaugh@ahejlsberg mind taking a quick look (at least to triage)? This is basically the same issue as #32230 (which was put in the 3.6 milestone and partially fixed, but this variant of the issue remains).
TypeScript Version: 3.5.1
Search Terms: inconsistent shorthand methods
Code
Expected behavior:
Both calls to assignPartial are typechecked the same, with no
any
types or errors.Actual behavior:
In the second call,
args
is given the typeany[]
, causingnoImplicitAny
to fail.Additional notes:
Partial<T>
to justT
, the error goes away (playground link).Partial
but hardcode the type instead of using generics, the error also goes away (playground link).Playground Link:
https://www.typescriptlang.org/play/#code/ATBmFcDsGMBcEsD2lgEMDO74HNIAVUAnBVAGwB4AVAPgApYjsBTWALmEoBpgAHIk0uwLF4ZKtQCU7SsADeAKBAhCLcIRQB5AEYArJnAB0GLLnqMW3PiLITFwAL527pFsES7gAXjl2QoRIi0WkTs6LCE8JDYEnKOII52xjj4-KKktO463LL+iOy0BoWM6DGe1LH2tiBJuMICGbrZuQVFhNglFbZAA
Related Issues: #11062, but it's a different inconsistency (and has been fixed).
The text was updated successfully, but these errors were encountered: