commit | ffd1424ae5737c0035102b48fe2bd8e888091c6b | [log] [tgz] |
---|---|---|
author | Randolf Jung <[email protected]> | Wed Apr 19 00:32:25 2023 |
committer | Devtools-frontend LUCI CQ <devtools-frontend-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Apr 19 09:56:42 2023 |
tree | f6c96307e73be490aad9a68dea75ad8c7908d0e8 | |
parent | 1f38275ef3e38c6603d7be4b96672ceb9a158c2c [diff] [blame] |
Add `noImplicitOverride` `noImplicitOverride` guarantees type safety when overriding a class method. This also improves refactoring behavior. The primary motivation for `noImplicitOverride` is for using with Lit elements where overriding methods is important. Bug: 1402569 Change-Id: Ia095c38a6d1fc160f9b08c350d6f7248daab38a4 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4443322 Reviewed-by: Jack Franklin <[email protected]> Commit-Queue: Randolf Jung <[email protected]>
diff --git a/front_end/ui/components/buttons/Button.ts b/front_end/ui/components/buttons/Button.ts index 6138336..23441bf 100644 --- a/front_end/ui/components/buttons/Button.ts +++ b/front_end/ui/components/buttons/Button.ts
@@ -154,7 +154,7 @@ void ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender); } - set title(title: string) { + override set title(title: string) { this.#props.title = title; void ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender); } @@ -179,7 +179,7 @@ this.toggleAttribute('disabled', disabled); } - focus(): void { + override focus(): void { this.#shadow.querySelector('button')?.focus(); }