import { Span } from "../language/Span" ; import * as Completion from "../vscodeIntegration/Completion" ; import { InsertionContext } from "./InsertionContext" ; import { ISnippet } from "./ISnippet" ; import { Context } from "./KnownContexts" ; /**
 * Manages snippets and creates completion items for them.  We do this rather
 * than allowing them to be handled by vscode so that:
 * 1) We can control the context into which snippets can be inserted
 * 2) We can receive telemetry about snippet usage
 */ export interface ISnippetManager { /**
     * Retrieve all snippets that support the given context
     */ getSnippets ( context ) : Promise < ISnippet [ ] > ; /**
     * Retrieve all snippets regardless of context
     */ getAllSnippets ( ) : Promise < ISnippet [ ] > ; /**
     * Retrieve completion items for all snippets
     */ getSnippetsAsCompletionItems ( insertionContext , span ) : Promise < Completion . Item [ ] > ; }