Repository navigation
Fix type errors in the published typings with skipLibCheck turned off - #5978
Merged
Merged
Conversation
added 7 commits
October 28, 2026 14:33
@types/dom-speech-recognition is a devDependency of botframework-webchat-api, so consumers type-checking our declarations (skipLibCheck: false) got TS2304 for SpeechGrammarList and SpeechRecognition.
InferMiddleware/InferProps/InferRequest of templateDecorator and the component's ContextOf constrained on types that are invariant (ComponentType, Context), so their use in our declarations failed with TS2344 for consumers with strict: true.
Our typings bundler emits a type imported from another package as `declare const X: typeof X` inside `export * as` namespaces (decorator, internal, Components, hooks), which fails with TS2693 when consumers type-check our declarations. These namespace members were never usable as types and do not exist at runtime. The entry points (decorator.js, internal.js, component.js, hook.js) still export the same types.
…encing typing The expando `render.createStreamingRenderer = createStreamingRenderer` emitted `var createStreamingRenderer: typeof createStreamingRenderer` inside `declare namespace render`, which refers to itself (TS2502).
…hared TypeOfGlobal type GlobalScopeClock used typeof setImmediate/clearImmediate, which are Node.js globals: consumers with only TypeScript's DOM library got "Cannot find name" in core's typings. TypeOfGlobal<Name, Fallback> in @msinternal/botframework-webchat-base (inlined in each package's typings) replaces the lookup duplicated in WebSpeechPonyfill.
…e.js types TypeOfGlobal's never default turned GlobalScopeClock's setImmediate/clearImmediate into undefined/never for consumers without @types/node, breaking ponyfill options and calls that compiled on main. Pass the types declared in env.d.ts as fallbacks and require a fallback at every call site.
Eugene (OEvgeny)
marked this pull request as ready for review
October 28, 2026 23:08
Eugene (OEvgeny)
requested review from
William Wong (compulim),
Chris Whitten (cwhitten) and
Thomas Durnford (tdurnford)
as code owners
October 28, 2026 23:08
William Wong (compulim)
previously approved these changes
Oct 28, 2026
William Wong (compulim)
left a comment
Collaborator
There was a problem hiding this comment.
Nitpick.
Eugene (OEvgeny)
dismissed
William Wong (compulim)’s stale review
via
October 28, 2026 23:33
ac7ff6b
William Wong (compulim)
approved these changes
Oct 28, 2026
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.
Changelog Entry
Fixed
skipLibCheckis turned off, in PR #5978, by @OEvgenyDescription
The typings had type-only members emitted as values in namespaces, a self-referencing
renderMarkdown.createStreamingRenderer, non-DOM globals, and 2 constraints failing understrict. JavaScript output only changes by the renamed function.Design
export * asnamespaces instead of getting local aliases: they never worked as types there; entry points still export them.globalThis, instead of adding@types/dom-speech-recognitionand@types/nodetodependencies.Specific Changes
bundle/src/boot: types exported byexports/*.ts, notactual/*renderMarkdown.ts,createMarkdownStreamingRenderer.ts: file and function renamed tocreateMarkdownStreamingRendererWebSpeechPonyfill.ts,GlobalScopeClock.ts: globals via new baseTypeOfGlobaltemplateDecorator.tsx, componentContextOf.ts: constraints no longer invariantprop-typesTS7016, fixed by Remove propTypes statics that break typings with @types/react@19 #5973)NetworkInformation(botframework-directlinejs),Buffer(@types/node@10viabotframework-streaming),type-fest(undeclared byreact-chain-of-responsibility).changelog/<PR#>-<slug>.mdReview Checklist
z-index)package.jsonandpackage-lock.jsonreviewed