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
declarefunctionisBar(object: unknown): object is BartypeBar={qux: number}typeFoo<TextendsBar|{}>={bar: Tbaz: number}declareconstfoo: Foo<Bar|{}>declarefunctionfooBar(value: Foo<Bar>): voidif(isBar(foo.bar)){//foo.bar correctly narrowed to Bar:consta=foo.barconstb=foo.bar.qux//foo doesn't get narrowed and is still Foo<{} | Bar>, even though we know it's a Foo<Bar>fooBar(foo)}
π Actual behavior
foo.bar gets narrowed but foo doesn't
π Expected behavior
foo is narrowed to Foo<Bar>
The text was updated successfully, but these errors were encountered:
Bug Report
π Search Terms
predicate parent object type
π Version & Regression Information
4.3.0-dev.20210406
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
foo.bar
gets narrowed butfoo
doesn'tπ Expected behavior
foo
is narrowed toFoo<Bar>
The text was updated successfully, but these errors were encountered: