@sheerid/jslib
    Preparing search index...

    Function getSafe

    • Avoid "can't access property of undefined" errors in a more readable way.

      Type Parameters

      • T

      Parameters

      • fn: () => T

        Function that wraps a nested property access

      • OptionaldefaultVal: T

        Optional - the value to return if property access failed

      Returns T