Skip to main content
Version: Next

SnippetStore

Index

Properties

activeSnippet

activeSnippet: Snippet

activeSnippetName

activeSnippetName: string

isExecuting

isExecuting: boolean

snippets

snippets: Map<string, Snippet>

publicstaticreadonlyToasterTimeout

ToasterTimeout: 1500 = 1500

Accessors

numSavedSnippets

  • get numSavedSnippets(): number
  • Returns number

validInput

  • get validInput(): boolean
  • Returns boolean

staticInstance

Methods

clearActiveSnippet

  • clearActiveSnippet(): void
  • Returns void

deleteSnippet

  • deleteSnippet(name: string, silent?: boolean): Generator<Promise<any>, boolean, unknown>
  • Parameters

    • name: string
    • silent: boolean = false

    Returns Generator<Promise<any>, boolean, unknown>

executeCurrentSnippet

  • executeCurrentSnippet(): Generator<any, boolean, unknown>
  • Returns Generator<any, boolean, unknown>

fetchSnippets

  • fetchSnippets(): Generator<Promise<Map<string, Snippet>>, void, unknown>
  • Returns Generator<Promise<Map<string, Snippet>>, void, unknown>

saveSnippet

  • saveSnippet(name: string, snippet: Snippet, silent?: boolean): Generator<Promise<any>, boolean, unknown>
  • Parameters

    • name: string
    • snippet: Snippet
    • silent: boolean = false

    Returns Generator<Promise<any>, boolean, unknown>

setActiveSnippet

  • setActiveSnippet(snippet: Snippet, name: string): void
  • Parameters

    Returns void

setDefaultSnippets

  • setDefaultSnippets(): void
  • Returns void

setSnippetString

  • setSnippetString(val: string): void
  • Parameters

    • val: string

    Returns void

publicsnippetExists

  • snippetExists(name: string): boolean
  • Parameters

    • name: string

    Returns boolean