• Public
  • Public/Protected
  • All

Module "sourcegraph"

The Sourcegraph extension API

Sourcegraph extensions enhance your code host, code reviews, and Sourcegraph itself by adding features such as:

  • Code intelligence (go-to-definition, find references, hovers, etc.)
  • Test coverage overlays
  • Links to live traces, log output, and performance data for a line of code
  • Git blame
  • Usage examples for functions

Check out the extension authoring documentation to get started.


Type aliases


Definition: Location | Location[] | null

The definition of a symbol represented as one or many locations. For most programming languages there is only one location at which a symbol is defined. If no definition can be found null is returned.


DocumentSelector: (string | DocumentFilter)[]

A document selector is the combination of one or many document filters. A document matches the selector if any of the given filters matches. If the filter is a string and not a DocumentFilter, it will be treated as a language id.


let sel: DocumentSelector = [{ language: 'typescript' }, { language: 'json', pattern: '**∕tsconfig.json' }];


PartialObserver: NextObserver<T> | ErrorObserver<T> | CompletionObserver<T>


ProviderResult: T | undefined | null | Promise<T | undefined | null> | Subscribable<T | undefined | null>

A provider result represents the values that a provider, such as the HoverProvider, may return. The result may be a single value, a Promise that resolves to a single value, or a Subscribable that emits zero or more values.


ViewComponent: CodeEditor

A user interface component in an application window.

Each ViewComponent has a distinct {@link ViewComponent#type} value that indicates what kind of component it is (CodeEditor, etc.).

Generated using TypeDoc