Skip to content

Fix build warnings and enable warnings as errors - #1415

Draft
bingenito wants to merge 1 commit into
morganstanley:mainfrom
bingenito:warings-as-errors
Draft

Fix build warnings and enable warnings as errors#1415
bingenito wants to merge 1 commit into
morganstanley:mainfrom
bingenito:warings-as-errors

Conversation

@bingenito

Copy link
Copy Markdown
Member

Address build warnings by adding strict TypeScript compiler options and ensuring proper error handling in the code. This change improves code quality and reliability.

@bingenito
bingenito requested a review from a team as a code owner July 22, 2026 14:08
Copilot AI review requested due to automatic review settings July 22, 2026 14:08
@bingenito
bingenito marked this pull request as draft July 22, 2026 14:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 package tsconfig files.
  • Enabled stricter index-access options (noUncheckedIndexedAccess, noPropertyAccessFromIndexSignature) in the messaging client/abstractions base tsconfigs.
  • Updated MessageRouterClient to 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];
}

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants