GeoLeaf Core API - v3.0.0
    Preparing search index...

    Function asFn

    • 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.

      Parameters

      • value: unknown

      Returns AnyFn | undefined