The reference provider interface defines the contract between extensions and the find references-feature.

Fields

provideReferences(document:TextDocument, position:Position, context:ReferenceContext, token:CancellationToken):ProviderResult<Array<Location>>

Provide a set of project-wide references for the given position and document.

Parameters:

document

The document in which the command was invoked.

position

The position at which the command was invoked.

token

A cancellation token.

Returns:

An array of locations or a thenable that resolves to such. The lack of a result can be signaled by returning undefined, null, or an empty array.