Skip to content

Commit a3d2eb5

Browse files
committed
Use readonly for hover options as they should not be touched
Fixes microsoft#189187
1 parent f6a5c0c commit a3d2eb5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/vs/workbench/services/hover/browser/hover.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export interface IHoverService {
3030
* });
3131
* ```
3232
*/
33-
showHover(options: IHoverOptions, focus?: boolean): IHoverWidget | undefined;
33+
showHover(options: Readonly<IHoverOptions>, focus?: boolean): IHoverWidget | undefined;
3434

3535
/**
3636
* Hides the hover if it was visible. This call will be ignored if the the hover is currently

src/vs/workbench/services/hover/browser/hoverService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export class HoverService implements IHoverService {
3636
contextMenuService.onDidShowContextMenu(() => this.hideHover());
3737
}
3838

39-
showHover(options: IHoverOptions, focus?: boolean): IHoverWidget | undefined {
39+
showHover(options: Readonly<IHoverOptions>, focus?: boolean): IHoverWidget | undefined {
4040
if (getHoverOptionsIdentity(this._currentHoverOptions) === getHoverOptionsIdentity(options)) {
4141
return undefined;
4242
}

0 commit comments

Comments
 (0)