mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-29 21:11:38 +01:00
type converters, use namespace for DocumentHighlight
This commit is contained in:
@@ -222,18 +222,11 @@ class DocumentHighlightAdapter {
|
||||
|
||||
return asWinJsPromise(token => this._provider.provideDocumentHighlights(doc, pos, token)).then(value => {
|
||||
if (Array.isArray(value)) {
|
||||
return value.map(DocumentHighlightAdapter._convertDocumentHighlight);
|
||||
return value.map(typeConvert.DocumentHighlight.from);
|
||||
}
|
||||
return undefined;
|
||||
});
|
||||
}
|
||||
|
||||
private static _convertDocumentHighlight(documentHighlight: vscode.DocumentHighlight): modes.DocumentHighlight {
|
||||
return {
|
||||
range: typeConvert.Range.from(documentHighlight.range),
|
||||
kind: documentHighlight.kind
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
class ReferenceAdapter {
|
||||
|
||||
Reference in New Issue
Block a user