Interface ISearchPromptOptions

Hierarchy

  • ISearchPromptOptions

Properties

filtering?: {
    includes?: boolean;
    startsWith?: boolean;
}

Filtering options.

Type declaration

  • Optional includes?: boolean
  • Optional startsWith?: boolean
initial?: string

Return this default value if the user enters nothing.

limit?: number

The maximum number of search results to show simultanously on the command line. Defaults to 15.

preRender?: ((original) => string[])

Type declaration

    • (original): string[]
    • A function to pre-render each string in the search data before searching has begun. This is useful if the same string formatting will be applied to all returned search results.

      Parameters

      • original: string[]

        The original (or pre-rendered) string.

      Returns string[]

render?: ((original, keywords) => string)

Type declaration

    • (original, keywords): string
    • A function to render the search results.

      Parameters

      • original: string[]

        The original (or pre-rendered) string.

      • keywords: string[]

        The keywords that matched the original string.

      Returns string

searchStopSequence?: string

When this string is encountered, the input coming after will not be considered for searching. Defaults to ':'

separator?: string

The delimiter to use to split the user input into keywords. Defaults to ' ' (space).

Generated using TypeDoc