@termun/core - v0.0.0
    Preparing search index...

    Class MenuEditorConfigs

    Index

    Constructors

    Methods

    • Returns true when the screen is cleared before opening the editor.

      Returns boolean | undefined

    • Sets whether the screen is cleared before opening the editor.

      Parameters

      • v: NonNullable<boolean | undefined>

      Returns this

    • Returns the file extension postfix used for the temp file (e.g. ".env").

      Returns string

    • Sets the file extension postfix for the temp file.

      Parameters

      • v: string

      Returns this

    • Returns true when the editor waits for user confirmation before opening.

      Returns NonNullable<boolean | undefined>

    • Sets whether the prompt waits for a keypress before opening the editor.

      Parameters

      • v: NonNullable<boolean | undefined>

      Returns this

    • Returns the validation function, or undefined if not configured.

      Returns ((value: string) => string | boolean | Promise<string | boolean>) | undefined

    • Sets a custom validation function for the editor content.

      Parameters

      • v: ((value: string) => string | boolean | Promise<string | boolean>) | undefined

      Returns this

    • Returns the submission callback, or undefined if not configured.

      Returns
          | (
              (
                  data: {
                      menu: MenuEditor;
                      value: string;
                      language?: string;
                      parent?: string;
                  },
              ) => Promise<void>
          )
          | undefined

    • Sets the callback invoked after successful submission.

      Parameters

      • v:
            | (
                (
                    data: {
                        menu: MenuEditor;
                        value: string;
                        language?: string;
                        parent?: string;
                    },
                ) => Promise<void>
            )
            | undefined

      Returns this

    Properties

    clear: NonNullable<boolean | undefined> = true
    postfix: string = ".env"
    waitForUserInput: NonNullable<boolean | undefined> = true
    validate?: (value: string) => string | boolean | Promise<string | boolean>
    callback?: (
        data: {
            menu: MenuEditor;
            value: string;
            language?: string;
            parent?: string;
        },
    ) => Promise<void>