Skip to content
This repository was archived by the owner on Apr 15, 2026. It is now read-only.

Commit fd252fa

Browse files
not-my-profilemarijnh
authored andcommitted
Change WidgetType.updateDOM from type to this
With `this` TypeScript understands that it's the same type as the subclass.
1 parent 9373f52 commit fd252fa

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/decoration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export abstract class WidgetType {
121121
/// true to indicate that it could update, false to indicate it
122122
/// couldn't (in which case the widget will be redrawn). The default
123123
/// implementation just returns false.
124-
updateDOM(dom: HTMLElement, view: EditorView, from: WidgetType): boolean { return false }
124+
updateDOM(dom: HTMLElement, view: EditorView, from: this): boolean { return false }
125125

126126
/// @internal
127127
compare(other: WidgetType): boolean {

0 commit comments

Comments
 (0)