mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 03:29:00 +01:00
Mark array params in vscode.d.ts readonly (#124599)
I recently ran into an issue where I was trying to call showQuickPick with a readonly array. This is currently not allowed, even though `showQuickPick` never mutates the input This change marks a few places in `vscode.d.ts` where we take arrays as parameters as `readonly []`. It also caught a potential bug with`getSession` modifying the input array
This commit is contained in:
@@ -167,7 +167,7 @@ export interface MainThreadAuthenticationShape extends IDisposable {
|
||||
$unregisterAuthenticationProvider(id: string): void;
|
||||
$ensureProvider(id: string): Promise<void>;
|
||||
$sendDidChangeSessions(providerId: string, event: modes.AuthenticationSessionsChangeEvent): void;
|
||||
$getSession(providerId: string, scopes: string[], extensionId: string, extensionName: string, options: { createIfNone?: boolean, clearSessionPreference?: boolean }): Promise<modes.AuthenticationSession | undefined>;
|
||||
$getSession(providerId: string, scopes: readonly string[], extensionId: string, extensionName: string, options: { createIfNone?: boolean, clearSessionPreference?: boolean }): Promise<modes.AuthenticationSession | undefined>;
|
||||
$removeSession(providerId: string, sessionId: string): Promise<void>;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user