The function isWeakKey checks if the input is an object or a function in TypeScript.

  • Parameters

    • input: unknown

      The input parameter in the isWeakKey function is of type unknown, which means it can be any type. The function checks if the input is an object (excluding null) or a function, and returns a boolean indicating whether the input is a weak

    Returns input is object

    The function isWeakKey returns a boolean value indicating whether the input is an object or a function.