Skip to content

Fix dual stream with factory API.#5861

Open
michelinewu wants to merge 5 commits intostagingfrom
mw_dual_stream
Open

Fix dual stream with factory API.#5861
michelinewu wants to merge 5 commits intostagingfrom
mw_dual_stream

Conversation

@michelinewu
Copy link
Copy Markdown
Contributor

@michelinewu michelinewu commented Apr 23, 2026

@bundlemon
Copy link
Copy Markdown

bundlemon Bot commented Apr 23, 2026

BundleMon

Files added (4)
Status Path Size Limits
renderer.(hash).js
+7.73MB -
vendors~renderer.(hash).js
+4.67MB -
updater.js
+115.29KB -
guest-api.js
+40.23KB -

Total files change +12.54MB

Final result: ✅

View report in BundleMon website ➡️


Current branch size history

}),
);

this.contexts[context][type] = (null as unknown) as (
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This cast has a code smell to me. Is there a reason we don't have the | null type annotation on this.contexts[c][t], if it's expected to get nulled out here? Where is contexts defined?

Copy link
Copy Markdown
Contributor Author

@michelinewu michelinewu Apr 24, 2026

Choose a reason for hiding this comment

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

contexts is defined on line 192 to be used as a private store for the instances. The casting is for strictnulls. Without it there is the error:
TS2352: Conversion of type 'null' to type '(ISimpleStreaming | IAdvancedStreaming) & ((ISimpleRecording | IAdvancedRecording) & (ISimpleReplayBuffer | IAdvancedReplayBuffer))' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.

@michelinewu michelinewu requested a review from wesrupert April 24, 2026 19:56
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