• Reads and parses a JSON file synchronously.

    Type Parameters

    • T

      The type of the parsed JSON object.

    Parameters

    • path: string

      The path to the JSON file.

    • Optionalreviver: Reviver<any>

      Optional reviver function for JSON.parse.

    Returns T

    • The parsed JSON object.