@theredhead — Frontend Library - v1.0.0
    Preparing search index...

    Interface AutocompleteDatasource<T>

    Contract for an autocomplete suggestion provider.

    completeFor receives the current query string and the items that are already selected (so the implementation can exclude them) and returns an array of suggestions.

    interface AutocompleteDatasource<T> {
        completeFor(query: string, selection: readonly T[]): T[];
    }

    Type Parameters

    • T

      The suggestion item type.

    Index

    Methods

    Methods

    • Parameters

      • query: string
      • selection: readonly T[]

      Returns T[]