The DidYouMean action creators.

interface DidYouMeanActionCreators {
    applyDidYouMeanCorrection(
        correction: string,
    ): { payload: string; type: string };
    disableAutomaticQueryCorrection(): { payload: void; type: string };
    disableDidYouMean(): { payload: void; type: string };
    enableAutomaticQueryCorrection(): { payload: void; type: string };
    enableDidYouMean(): { payload: void; type: string };
    setCorrectionMode(
        mode: CorrectionMode,
    ): { payload: CorrectionMode; type: string };
}

Methods

  • Applies a did-you-mean correction.

    Parameters

    • correction: string

      The target correction (e.g., "corrected string").

    Returns { payload: string; type: string }

    A dispatchable action.

  • Disables automatic query correction

    Returns { payload: void; type: string }

    A dispatchable action.

  • Disables did-you-mean.

    Returns { payload: void; type: string }

    A dispatchable action.

  • Enables automatic query correction

    Returns { payload: void; type: string }

    A dispatchable action.

  • Enables did-you-mean.

    Returns { payload: void; type: string }

    A dispatchable action.

  • Sets the query correction mode.

    Parameters

    • mode: CorrectionMode

      The query correction mode to use. Must be either "legacy" (index based) or "next" (query suggestions based).

    Returns { payload: CorrectionMode; type: string }

    A dispatchable action.