Returns value typed as a callable when it is a function, else undefined.
Replaces the GeoLeaf.X.method() calls that : any used to allow on the
loosely-typed (unknown) tail of the GeoLeaf namespace. The classic guard
typeof obj.method === "function" does not narrow a fresh unknown access, so
this helper performs the narrowing once at the call site — behavior-identical
to the original typeof … === "function" check.
Returns
valuetyped as a callable when it is a function, elseundefined.Replaces the
GeoLeaf.X.method()calls that: anyused to allow on the loosely-typed (unknown) tail of theGeoLeafnamespace. The classic guardtypeof obj.method === "function"does not narrow a freshunknownaccess, so this helper performs the narrowing once at the call site — behavior-identical to the originaltypeof … === "function"check.