Conversation
Co-authored-by: Copilot <copilot@github.com>
BundleMonFiles added (4)
Total files change +12.54MB Final result: ✅ View report in BundleMon website ➡️ |
| }), | ||
| ); | ||
|
|
||
| this.contexts[context][type] = (null as unknown) as ( |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
Fixes for: