Skip to content

Commit 31acde2

Browse files
authored
Merge pull request microsoft#189188 from microsoft/tyriar/189187
Use readonly for hover options as they should not be touched
2 parents 5f9fc78 + a3d2eb5 commit 31acde2

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)