Function promptUserEditJsonInTextEditorSync

  • Edit a JSON-stringify-compatible value in the user's editor and return the (JSON.parse'd) result.

    Type Parameters

    Parameters

    • value: T = ...

      The value to edit (NOT a json string). Defaults to an empty object.

    • Optional editor: string

      Launch command to start your editor. Defaults to VSCode: 'code -w' (if installed).

      • Otherwise this logic: isWindows() ? 'notepad' : isOSX() ? 'open vi' : 'xdg-open'

    Returns R

    Example

    promptUserEditJsonInTextEditorSync([1, 2])
    

Generated using TypeDoc