Skip to content

Conversation

@abalmush
Copy link

Add the TypeScript override keyword to all Lit component methods that override parent class methods. This is required for Google's internal repository compilation.

Methods updated:

  • render()
  • connectedCallback()
  • disconnectedCallback()
  • firstUpdated()
  • willUpdate()

Fixes #463

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly adds the override keyword to Lit component lifecycle methods across multiple files, which is a great improvement for code clarity and to satisfy compiler requirements. My review focuses on a related improvement: adding explicit return types to these same lifecycle methods. Many methods like render, firstUpdated, and willUpdate are missing explicit return types, and adding them would further enhance type safety and maintainability. I've added several suggestions for render and firstUpdated methods. The same principle applies to the multi-line willUpdate signatures, which should also be updated to include a : void return type.

abalmush and others added 7 commits January 23, 2026 17:49
Add the TypeScript `override` keyword to all Lit component methods
that override parent class methods. This is required for Google's
internal repository compilation.

Methods updated:
- render()
- connectedCallback()
- disconnectedCallback()
- firstUpdated()
- willUpdate()

Fixes google#463
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@abalmush abalmush force-pushed the abalmus/fix/lit-override-keywords branch from c03e86d to 6f10a1f Compare January 23, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

All lit components should have override prefixing method/property names if the method/property are inherited from parent

1 participant