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
classExample{getfoo(){returntrue;}baz(example: Example){example.foo;}bar(example: Example|Object){example.foo;// error TS2339: Property 'foo' does not exist on type 'Example | Object'.}}
Expected behavior:
example.foo would not throw an error in either method.
Actual behavior:
example.foo when example is Example | Object throws:
error TS2339: Property 'foo' does not exist on type 'Example | Object'.
The text was updated successfully, but these errors were encountered:
TypeScript Version:
nightly (1.9.0-dev.20160217)
Code
Expected behavior:
example.foo
would not throw an error in either method.Actual behavior:
example.foo
whenexample
isExample | Object
throws:The text was updated successfully, but these errors were encountered: