nl_tokens: Check if a property with the given name is known anywhere in the given type . In an object type a property is considered known if the object type is empty and the check is for assignability if the object type has index signatures or if the property is actually declared in the object type . In a union or intersection type a property is considered known if it is known in any constituent type .
pl_tokens: function isKnownProperty ( type , name ) { if ( type . flags & 80896 /* ObjectType */ ) { var resolved = resolveStructuredTypeMembers ( type ) ; if ( relation === assignableRelation && ( type === globalObjectType || resolved . <mask> . length === 0 ) || resolved . stringIndexType || resolved . numberIndexType || getPropertyOfType ( type , name ) ) { return true ; } return false ; } if ( type . flags & 49152 /* UnionOrIntersection */ ) { for ( var _i = 0 , _a = type . types ; _i < _a . length ; _i ++ ) { var t = _a [ _i ] ; if ( isKnownProperty ( t , name ) ) { return true ; } } return false ; } return true ; }