Fix build warnings and enable warnings as errors - #1415
Draft
bingenito wants to merge 1 commit into
Draft
Conversation
bingenito
marked this pull request as draft
July 22, 2026 14:09
There was a problem hiding this comment.
Pull request overview
This PR tightens TypeScript compiler strictness across several JS/TS packages to reduce build warnings and enforce stricter correctness checks, and it makes small runtime-safety adjustments in MessageRouterClient to better tolerate undefined values introduced by stricter index-access typing.
Changes:
- Enabled additional TS compiler checks (
noImplicitReturns,noFallthroughCasesInSwitch) in multiple packagetsconfigfiles. - Enabled stricter index-access options (
noUncheckedIndexedAccess,noPropertyAccessFromIndexSignature) in the messaging client/abstractions base tsconfigs. - Updated
MessageRouterClientto guard indexed lookups when failing pending requests/subscribers.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/shell/js/composeui-node-launcher/tsconfig.json | Adds stricter TS checks to turn more warning-prone patterns into compile-time failures. |
| src/messaging/js/composeui-messaging-message-router/tsconfig.json | Adds stricter TS checks to enforce more exhaustive control-flow correctness. |
| src/messaging/js/composeui-messaging-client/tsconfig.base.json | Enables stricter index-access and control-flow checks for the messaging client package. |
| src/messaging/js/composeui-messaging-client/src/client/MessageRouterClient.ts | Adds null/undefined guards around indexed map access to satisfy stricter typing. |
| src/messaging/js/composeui-messaging-abstractions/tsconfig.base.json | Aligns abstractions package with the stricter index-access and control-flow checks. |
| src/fdc3/js/composeui-fdc3/tsconfig.json | Adds stricter TS checks for better compile-time correctness guarantees. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
268
to
+270
| private failPendingRequests(error: any) { | ||
| for (let requestId in this.pendingRequests) { | ||
| this.pendingRequests[requestId].reject(error); | ||
| const requestIds = Object.keys(this.pendingRequests); | ||
| for (let requestId of requestIds) { |
Comment on lines
279
to
+284
| private async failSubscribers(error: any) { | ||
| for (let topicName in this.topics) { | ||
| const topic = this.topics[topicName]; | ||
| topic.error(error); | ||
| if (topic) { | ||
| topic.error(error); | ||
| } |
Comment on lines
268
to
276
| private failPendingRequests(error: any) { | ||
| for (let requestId in this.pendingRequests) { | ||
| this.pendingRequests[requestId].reject(error); | ||
| const requestIds = Object.keys(this.pendingRequests); | ||
| for (let requestId of requestIds) { | ||
| const deferred = this.pendingRequests[requestId]; | ||
| if (deferred) { | ||
| deferred.reject(error); | ||
| } | ||
| delete this.pendingRequests[requestId]; | ||
| } |
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.
Address build warnings by adding strict TypeScript compiler options and ensuring proper error handling in the code. This change improves code quality and reliability.