Given
type Maybe<T> = T | undefined;
class Obj {
jbo: Maybe<Jbo>;
}
, is it possible to define a function that given a o: Maybe<Obj> asserts the types of both o and o.jbo?
I'm thinking of something like:
function everythingIsDefined(o: Maybe<Obj>):o is Obj && o.jbo is Jbo {
// checks in here
}