Function getFunctionKeyBySource

  • Search for a function within a module by its source code. Returns the key of the function.

    Type Parameters

    • T

    Parameters

    • module: T

      The module to search.

    • match: string | RegExp | ((func) => boolean)

      The string or regex to match against the function's source code.

    Returns Extract<keyof T, string> | undefined

    Remarks

    Useful for getting the prop name to inject into.

Generated using TypeDoc