mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-21 18:59:15 +00:00
Merge pull request #75092 from microsoft/dev/mjbvz/readonly-diagnostics-api
Use readonly arrays for the vscode.DiagnosticCollection api
This commit is contained in:
@@ -208,7 +208,7 @@ export class DiagnosticsManager extends Disposable {
|
||||
|
||||
public configFileDiagnosticsReceived(
|
||||
file: vscode.Uri,
|
||||
diagnostics: vscode.Diagnostic[]
|
||||
diagnostics: ReadonlyArray<vscode.Diagnostic>
|
||||
): void {
|
||||
this._currentDiagnostics.set(file, diagnostics);
|
||||
}
|
||||
@@ -218,7 +218,7 @@ export class DiagnosticsManager extends Disposable {
|
||||
this._diagnostics.delete(resource);
|
||||
}
|
||||
|
||||
public getDiagnostics(file: vscode.Uri): vscode.Diagnostic[] {
|
||||
public getDiagnostics(file: vscode.Uri): ReadonlyArray<vscode.Diagnostic> {
|
||||
return this._currentDiagnostics.get(file) || [];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user