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 is narrowed, but foo remains the same type
π Expected behavior
foo is narrowed to Foo
The text was updated successfully, but these errors were encountered:
Bug Report
π Search Terms
π Version & Regression Information
4.3.0-dev.20210406
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
foo.bar
is narrowed, butfoo
remains the same typeπ Expected behavior
foo
is narrowed to FooThe text was updated successfully, but these errors were encountered: