[FIX] Fix TypeScript errors in common/pcui/element components#1699
Merged
willeastcott merged 5 commits intomainfrom Jan 22, 2026
Merged
[FIX] Fix TypeScript errors in common/pcui/element components#1699willeastcott merged 5 commits intomainfrom
willeastcott merged 5 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request fixes TypeScript compilation errors across 14 PCUI element components by adding proper type declarations, standardizing argument interfaces, and declaring private class properties with explicit types.
Changes:
- Converted
typealiases tointerfacedeclarations extending appropriate PCUI base types (ElementArgs,ContainerArgs,SelectInputArgs) - Added explicit type declarations for all private class properties
- Fixed spelling errors in comments ('Neutralise' → 'Neutralize', 'optimisations' → 'optimizations', 'seach' → 'search', 'mouesup' → 'mouseup')
- Removed unused
_isColorPickerOpenproperty fromColorInput
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| template-thumbnail-renderer.ts | Fixed spelling of "Neutralise" to "Neutralize" in comment |
| element-table.ts | Extended ContainerArgs, added TableColumn interface, declared all private properties with types, added type casts for DOM manipulation |
| element-table-row.ts | Extended ContainerArgs, declared all private properties with types |
| element-table-cell.ts | Extended ContainerArgs, updated constructor arg handling |
| element-layers-input.ts | Extended SelectInputArgs, declared private properties, added proper type annotations |
| element-gradient-input.ts | Extended ElementArgs, declared all private properties, added canvas type casts |
| element-entity-input.ts | Extended ElementArgs, declared private properties, changed flexGrow from number to string |
| element-drop-target.ts | Extended ElementArgs, declared private properties, added type annotations |
| element-drop-manager.ts | Extended ContainerArgs, declared private properties, fixed 'mouesup' → 'mouseup' typo |
| element-curve-input.ts | Extended ElementArgs, declared all private properties with types |
| element-color-input.ts | Extended ElementArgs, declared private properties, removed unused _isColorPickerOpen |
| element-bundles-input.ts | Extended SelectInputArgs, declared private properties, added return type to _addTag |
| element-batchgroup-input.ts | Extended SelectInputArgs, declared private properties with types |
| element-asset-thumbnail.ts | Fixed spelling of "optimisations" to "optimizations" in comment |
| element-asset-list.ts | Extended ElementArgs, fixed spelling of "seach" to "search" in comment |
| element-asset-input.ts | Extended ElementArgs, simplified constructor argument handling |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
kpal81xd
approved these changes
Jan 22, 2026
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
Argsinterface definitions to extend base PCUI types (ElementArgs,ContainerArgs,SelectInputArgs)_isColorPickerOpenproperty fromColorInputChanges
Type Definition Pattern
Changed all component argument types from
typealiases tointerfaceextending the appropriate base PCUIArgsinterface:Files Updated
element-asset-input.ts- Args interface consistencyelement-asset-list.ts- Args interface consistencyelement-batchgroup-input.ts- ExtendSelectInputArgs, declare propertieselement-bundles-input.ts- ExtendSelectInputArgs, declare propertieselement-color-input.ts- ExtendElementArgs, declare properties, remove dead codeelement-curve-input.ts- ExtendElementArgs, declare propertieselement-drop-manager.ts- ExtendContainerArgs, declare propertieselement-drop-target.ts- ExtendElementArgs, declare propertieselement-entity-input.ts- ExtendElementArgs, declare propertieselement-gradient-input.ts- ExtendElementArgs, declare propertieselement-layers-input.ts- ExtendSelectInputArgs, declare propertieselement-table.ts- ExtendContainerArgs, declare properties, defineTableColumninterfaceelement-table-row.ts- ExtendContainerArgs, declare propertieselement-table-cell.ts- ExtendContainerArgsCommon Fixes Applied
Constructor parameters now have default values (
args = {})Use spread syntax for merging args with defaults
Cast
Canvas.domtoHTMLCanvasElementforgetContext()callsCast DOM elements (
ChildNode,parentNode) to appropriate types for property accessAdd explicit types to event handler functions
I confirm I have read the contributing guidelines