-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modernize method binding patterns across the codebase #1173
Comments
williamsyang-work
added a commit
to williamsyang-work/theia-trace-extension
that referenced
this issue
Feb 11, 2025
Remove redundant method delegation patterns and explicit .bind(this) usage in favor of arrow functions. This modernization aligns with TypeScript best practices and reduces unnecessary code complexity while maintaining identical functionality. Changes: Replace method delegation pattern with direct arrow function implementation Remove explicit .bind(this) calls where arrow functions are used Maintain existing behavior and functionality Improve code readability Related to eclipse-cdt-cloud#1173 Signed-off-by: Will Yang <william.yang@ericsson.com>
1 task
williamsyang-work
added a commit
to williamsyang-work/theia-trace-extension
that referenced
this issue
Feb 11, 2025
Remove redundant method delegation patterns and explicit .bind(this) usage in favor of arrow functions. This modernization aligns with TypeScript best practices and reduces unnecessary code complexity while maintaining identical functionality. Changes: Replace method delegation pattern with direct arrow function implementation Remove explicit .bind(this) calls where arrow functions are used Maintain existing behavior and functionality Improve code readability Related to eclipse-cdt-cloud#1173 Signed-off-by: Will Yang <william.yang@ericsson.com>
1 task
williamsyang-work
added a commit
to williamsyang-work/theia-trace-extension
that referenced
this issue
Feb 11, 2025
Remove redundant method delegation patterns and explicit .bind(this) usage in favor of arrow functions. This modernization aligns with TypeScript best practices and reduces unnecessary code complexity while maintaining identical functionality. Changes: Replace method delegation pattern with direct arrow function implementation Remove explicit .bind(this) calls where arrow functions are used Maintain existing behavior and functionality Improve code readability Related to eclipse-cdt-cloud#1173 Signed-off-by: Will Yang <william.yang@ericsson.com>
bhufmann
pushed a commit
that referenced
this issue
Feb 13, 2025
Remove redundant method delegation patterns and explicit .bind(this) usage in favor of arrow functions. This modernization aligns with TypeScript best practices and reduces unnecessary code complexity while maintaining identical functionality. Changes: Replace method delegation pattern with direct arrow function implementation Remove explicit .bind(this) calls where arrow functions are used Maintain existing behavior and functionality Improve code readability Related to #1173 Signed-off-by: Will Yang <william.yang@ericsson.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description:
Our codebase contains legacy method binding patterns that add unnecessary complexity. These patterns, likely originating from Java development practices, include method delegation and explicit .bind(this) usage. Since we're using TypeScript with arrow functions, these binding patterns are redundant and can be safely removed.
Current patterns we want to modernize:
Proposed modern approach:
Implementation Strategy:
Individual PRs will target specific modules or related components
Each PR will be tagged with this issue for tracking
Changes will be purely structural with no functional modifications
Existing tests will validate that behavior remains unchanged
Success Criteria:
All method delegation patterns replaced with direct arrow function implementations
All explicit .bind(this) calls removed where arrow functions are used
No regression in functionality
Improved code readability and reduced complexity
This modernization effort will help align our codebase with current TypeScript and React best practices while making it more maintainable for the team.
Labels: technical-debt, enhancement, cleanup
The text was updated successfully, but these errors were encountered: