The SmartSnippet controller lets you display the excerpt of a document that would be most likely to answer a particular query.

Example: smart-snippet.fn.tsx

interface SmartSnippet {
    state: SmartSnippetState;
    beginDelayedSelectInlineLink(link: InlineLink): void;
    beginDelayedSelectSource(): void;
    cancelPendingSelectInlineLink(link: InlineLink): void;
    cancelPendingSelectSource(): void;
    closeFeedbackModal(): void;
    collapse(): void;
    dislike(): void;
    expand(): void;
    like(): void;
    openFeedbackModal(): void;
    selectInlineLink(link: InlineLink): void;
    selectSource(): void;
    sendDetailedFeedback(details: string): void;
    sendFeedback(feedback: SmartSnippetFeedback): void;
    subscribe(listener: () => void): Unsubscribe;
}

Hierarchy (View Summary)

Methods

Properties

The state of the SmartSnippet controller.