deepujain opened a new pull request, #44559: URL: https://github.com/apache/superset/pull/44559
### SUMMARY Part of #39539, Phase D. The shared-controls registry currently annotates every entry as the same generic control. TypeScript 6 rejects four entries whose option renderers accept different option types. Infer the registered control types from the existing entries, retain each named control's specific type, and expose their union for dynamic string lookups. This removes those four errors without adding casts or weakening renderer parameter types. The registry values and runtime behavior are unchanged. With TypeScript 6.0.3, the chart-controls package goes from 23 errors to 19. The remaining 19 errors are in the unchanged color formatter comparators, so this PR does not complete Phase D or make the package fully TypeScript 6 compatible. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF Not applicable: type annotations only. ### TESTING INSTRUCTIONS - Compile chart-controls with the repository's TypeScript 5.4.5: passes. - Compile the same package with TypeScript 6.0.3 and `--ignoreDeprecations 6.0`: four registry errors disappear; the same 19 comparator errors remain. - Run `npm run plugins:build`: passes, including declaration builds for all 21 packages and downstream Table, AG Grid, and Handlebars consumers. - Run the chart-controls index, types, shouldMapStateToProps, and customControls Jest suites: 27 tests pass. - Run staged pre-commit checks: passes, including frontend type checking. ### ADDITIONAL INFORMATION - [x] Has associated issue: #39539 - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
