Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "sourcegraph"

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.

Index

Type aliases

Badged

Badged<T>: T & Badge

A wrapper around a providable type (hover text and locations) with additional context to enable displaying badges next to the wrapped result value in the UI.

Type parameters

  • T: object

ChartContent

ChartContent: LineChartContent<any, string> | BarChartContent<any, string> | PieChartContent<any>

Definition

Definition: Badged<Location> | Badged<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

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.

example

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

PartialObserver

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

Type parameters

  • T

ProviderResult

ProviderResult<T>: T | undefined | null | Promise<T | undefined | null> | Subscribable<T | undefined | null> | AsyncIterable<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, a Subscribable that emits zero or more values, or an AsyncIterable that yields zero or more values.

Type parameters

  • T

URI

URI: URL
deprecated

Use the global native URL API

ViewComponent

ViewComponent: CodeEditor | DirectoryViewer

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.).

ViewProvider

A view provider registered with {@link sourcegraph.app.registerViewProvider}.

Variables

Const URI

URI: typeof URL
deprecated

Use the global native URL API

Const configuration

configuration: ConfigurationService

The configuration settings.

It may be merged from the following sources of settings, in order:

Default settings Global settings Organization settings (for all organizations the user is a member of) User settings Repository settings Directory settings

todo

Add a way to get/update configuration for a specific scope or subject.

todo

Support applying defaults to the configuration values.

Generated using TypeDoc