chore: add missing TypeScript field declarations to UI classes#1897
Merged
chore: add missing TypeScript field declarations to UI classes#1897
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Add explicit field declarations to 20 legacy UI classes in src/common/ui/ that were assigning properties in constructors without declaring them, causing ~894 TS2339/TS2551/TS2425 errors. Key changes: - Convert _onLinkChange from field to method in base LegacyElement class to fix TS2425 field/method conflicts in 9 subclasses - Convert innerElement from plain property to getter/setter backed by _innerElement to fix TS2611 accessor override in LegacyContainer - Move _observerOptions from prototype assignment into constructor - Add field declarations for all constructor-assigned properties across all 20 UI classes - Fix ancillary type errors (Webkit prefixes, number-to-string assignments, EventTarget comparisons, DOM element casts) Resolves all 894 TS errors in src/common/ui/.
d4608ff to
f256239
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/common/ui/that assigned properties in constructors without declaring them, causing ~894 TS2339/TS2551/TS2425 errors_onLinkChangefrom a field declaration to a protected method in baseLegacyElementclass, fixing TS2425 field/method conflicts in 9 subclasses (checkbox, color-field, curve-field, image-field, label, number-field, select-field, slider, text-field, textarea-field)innerElementfrom a plain property to a getter/setter backed by_innerElementto fix TS2611 accessor override conflict inLegacyContainer_observerOptionsfrom prototype assignment into the constructor and add field declarations for_observer,_observerChanged,_observerOptionsinLegacyContainerTest plan
npm run type:checkshows 0 errors insrc/common/ui/(down from 894)npm run lintpassesnpm run buildsucceedsnpm testpasses (157 tests)