Mateusz Burzyński
Mateusz Burzyński
@RyanCavanaugh hm, I'm not sure if this bisect result is correct. The referenced PR has been included since 5.4.0-dev.20231201 but the reported change is between 4.9 and 5.0
This changed between 5.0.0-dev.20221103 and 5.0.0-dev.20221108 . Looking at the commits within that range, I think the change was caused by https://github.com/microsoft/TypeScript/pull/51405
I can confirm that https://github.com/microsoft/TypeScript/pull/51405 changed this and it looks like working by design to me. Matching types are eliminated from inference here as per the comment close to that...
> Do you think we can show a warning so this case wouldn't look like unexpected? Where you'd like to show a warning? Inference is incapable of raising warnings
`T` is unknown at the beginning and TS tries to infer what it could be to satisfy your constraints. It's all heuristics here. Both `{ message: string }` and `Foo`...
You have a synthetic import to `solid-js/jsx-runtime` here. It's an ESM file but you are importing it from a CJS one. TS crashes when trying to raise 1479 diagnostic: >...
@sandersn done
@jakebailey could u rerun extended tests here?
The webpack break above is correct in a sense that it brings the JS behavior closer to the TS behavior: 1. [TS playground](https://www.typescriptlang.org/play/?ts=5.8.0-dev.20250215#code/C4TwDgpgBAygxgCwgWwIZQLxQEoTgewCcATAHgGdhCBLAOwHMAaKAV1oGtb8B3WgPgDcAKCGhIOCOXwAbAG4QAwqmnSARqjjtMUABTViALiiUaDAJSY+UWfn3ChdYBEIAzDdAByRNNICy+YhZpCAAZfFRiZwV8WicAD2BSAHkwYGoY8gAVcAgrAG8hKCh6CGAUtIydMyNy9NosnOEikrLUuvIdckQUVCN4JDRqqFqM7Mh7ZtLcKTkIKqMdHUKiqAJYiASjEzomZaLCCABHFklgLaodxj3V5TUNdiNpmXklFXVNK6KLDCsbfQsAGTXRZreJnYwXBjMA7HU7nUz0b5WAAKhHwyGo5AgFEh9D4ZmEAF8RHBpKhyOQoF5CD5-IFglACkUAPpwA6oJxhCJRGJg0iZPhVRnXNaUKDScKRQjRdabKneZR0oKhSU82WJAXaJkrSatCr1BZdAaoJHCnU6g7AFiEWhQWhBaRQclO2ggJrmwmfc0tJ6zIXa81QS3W206UEbYDQo4nSjMOC3d7sU0BwNQaguXTxt73Cwp1NB0oh1i0SIuOgQYju-OEqAQaRYs35lbBm12iDcKCo9GYuY6A4zeRRgBWeGAycJBOugeJ1arK0910J7uJxKAA) - it has 2 errors 2. [JS...
The generated function has `SignatureFlags.IsUntypedSignatureInJSFile` assigned to it. So its min argument count gets computed as 0. Based on that calls without any arguments are allowed as the provided number...