Mateusz Burzyński
Mateusz Burzyński
It works OK as intended, the input that you configure for your promise actor is its input - not the input given to the outer machine. Please take a look...
Providing explicit generic to `fromPromise` is probably the easiest.
I was just reading your issue before you pinged me and I thought that it totally looks like something I could change behavior of 😉
I meant to write "something I could have changed behavior of" - but nevertheless, I'll see why this has changed and if something can be done about it
Simpler repro ([TS playground](https://www.typescriptlang.org/play/?ts=5.9.0-dev.20250309&ssl=7&ssc=11&pln=1&pc=1#code/GYVwdgxgLglg9mABFApgZygRgBQEMBOA5gFyIDeiADvnJaQETBxz2IC+AlOWwFCoY4K1WgwBGBVpwDcPAPSzEipQD0A-Dx6hIsBMnRQATHiKkhNOokbNJiAD6JwAExTAYYFI65le-Q9jMiluL4khwy8koq6kA)): ```ts function test1(arg: { prop: "foo" }) {} test1({ prop: "bar" }); // ^? (property) prop: "foo" function test2(arg: { prop: "foo" } | undefined) {}...
There are two types here though - otherwise you wouldn't get the error in the first place. In reality, the `prop` has the `"bar"` type here. Even in the case...
There is some inconsistency here since https://github.com/microsoft/TypeScript/pull/57847 though: [TS playground](https://www.typescriptlang.org/play/?noUncheckedIndexedAccess=true&ts=5.9.0-dev.20250310#code/PTAEAEDsHsFVIMYAsCmCDWKAmBJSWUAPbAQQQRQGdKAuUAFwCcBXFAKDYDNnF6BLaJAZV6ARgAUAWwCGABzoAlNNEZYAPJSZ9IAcwA0oSM0kAjFIwB8BzAE86mxtp0BKUAG82oUH06hx9G1kUaF8ZWQBtWwBdUABeeNAAIgcnRNcPLy8EQU1QQjojU3M40DDIlBsogG5PTOzISmgAGxQAOiboHXFCZxqvAF82Qa4eBH5BYU0AJik5RWVVDS1dA0KzS2sK+2WXd1qfP1tvITD02qyc+jyC43WSsui+upzmto6unqfBwaA)
Please always try to share a repro case in a runnable form - either by providing a git repository to clone or a codesandbox. OSS maintainers usually can't afford the...
This all works on existing narrowing capabilities. So, in a sense, you are not asking about a type predicate inference improvement but for a narrowing improvement. No narrowing happens today...
I have a better working fix for this locally - but I need to add more tests to it and I'm currently occupied with some other stuff. I plan to...