fix(react-northstar, react-bindings, react-builder): Fix build errors in TypeScript 5.3.3#30817
Merged
behowell merged 1 commit intomicrosoft:masterfrom Mar 21, 2024
Merged
Conversation
This was referenced Mar 18, 2024
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
Collaborator
📊 Bundle size reportUnchanged fixtures
|
Collaborator
🕵 FluentUIV0 No visual regressions between this PR and main |
Collaborator
Perf Analysis (
|
| Scenario | Current PR Ticks | Baseline Ticks | Ratio | Regression Analysis |
|---|---|---|---|---|
| AttachmentMinimalPerf.default | 85 | 77 | 1.1:1 | analysis |
Perf tests with no regressions
| Scenario | Current PR Ticks | Baseline Ticks | Ratio |
|---|---|---|---|
| ButtonMinimalPerf.default | 96 | 84 | 1.14:1 |
| ChatDuplicateMessagesPerf.default | 161 | 142 | 1.13:1 |
| ChatWithPopoverPerf.default | 191 | 179 | 1.07:1 |
| LoaderMinimalPerf.default | 200 | 187 | 1.07:1 |
| TreeWith60ListItems.default | 91 | 85 | 1.07:1 |
| BoxMinimalPerf.default | 199 | 187 | 1.06:1 |
| HeaderSlotsPerf.default | 469 | 442 | 1.06:1 |
| ListMinimalPerf.default | 319 | 301 | 1.06:1 |
| PortalMinimalPerf.default | 91 | 86 | 1.06:1 |
| SkeletonMinimalPerf.default | 210 | 198 | 1.06:1 |
| TreeMinimalPerf.default | 497 | 470 | 1.06:1 |
| CardMinimalPerf.default | 318 | 302 | 1.05:1 |
| ListNestedPerf.default | 329 | 312 | 1.05:1 |
| CarouselMinimalPerf.default | 266 | 256 | 1.04:1 |
| GridMinimalPerf.default | 195 | 187 | 1.04:1 |
| LabelMinimalPerf.default | 225 | 216 | 1.04:1 |
| SplitButtonMinimalPerf.default | 2332 | 2234 | 1.04:1 |
| ButtonSlotsPerf.default | 318 | 308 | 1.03:1 |
| DialogMinimalPerf.default | 457 | 444 | 1.03:1 |
| EmbedMinimalPerf.default | 1930 | 1866 | 1.03:1 |
| InputMinimalPerf.default | 536 | 521 | 1.03:1 |
| MenuButtonMinimalPerf.default | 966 | 941 | 1.03:1 |
| RadioGroupMinimalPerf.default | 270 | 262 | 1.03:1 |
| ReactionMinimalPerf.default | 215 | 209 | 1.03:1 |
| ToolbarMinimalPerf.default | 553 | 537 | 1.03:1 |
| DropdownManyItemsPerf.default | 401 | 395 | 1.02:1 |
| FormMinimalPerf.default | 234 | 229 | 1.02:1 |
| ItemLayoutMinimalPerf.default | 717 | 705 | 1.02:1 |
| MenuMinimalPerf.default | 509 | 498 | 1.02:1 |
| ProviderMergeThemesPerf.default | 661 | 645 | 1.02:1 |
| ProviderMinimalPerf.default | 202 | 198 | 1.02:1 |
| TableMinimalPerf.default | 242 | 238 | 1.02:1 |
| TooltipMinimalPerf.default | 1321 | 1294 | 1.02:1 |
| DatepickerMinimalPerf.default | 3711 | 3686 | 1.01:1 |
| DropdownMinimalPerf.default | 1440 | 1428 | 1.01:1 |
| SliderMinimalPerf.default | 741 | 734 | 1.01:1 |
| AnimationMinimalPerf.default | 290 | 290 | 1:1 |
| AvatarMinimalPerf.default | 105 | 105 | 1:1 |
| ChatMinimalPerf.default | 443 | 444 | 1:1 |
| DividerMinimalPerf.default | 208 | 209 | 1:1 |
| AttachmentSlotsPerf.default | 648 | 655 | 0.99:1 |
| CheckboxMinimalPerf.default | 1112 | 1123 | 0.99:1 |
| HeaderMinimalPerf.default | 204 | 206 | 0.99:1 |
| PopupMinimalPerf.default | 354 | 357 | 0.99:1 |
| StatusMinimalPerf.default | 395 | 401 | 0.99:1 |
| TextMinimalPerf.default | 186 | 187 | 0.99:1 |
| CustomToolbarPrototype.default | 1481 | 1490 | 0.99:1 |
| FlexMinimalPerf.default | 157 | 160 | 0.98:1 |
| ImageMinimalPerf.default | 221 | 225 | 0.98:1 |
| ListWith60ListItems.default | 361 | 370 | 0.98:1 |
| RefMinimalPerf.default | 104 | 106 | 0.98:1 |
| IconMinimalPerf.default | 367 | 374 | 0.98:1 |
| LayoutMinimalPerf.default | 198 | 204 | 0.97:1 |
| RosterPerf.default | 1600 | 1658 | 0.97:1 |
| TableManyItemsPerf.default | 1104 | 1137 | 0.97:1 |
| TextAreaMinimalPerf.default | 285 | 293 | 0.97:1 |
| ButtonOverridesMissPerf.default | 629 | 652 | 0.96:1 |
| SegmentMinimalPerf.default | 192 | 200 | 0.96:1 |
| VideoMinimalPerf.default | 428 | 447 | 0.96:1 |
| AccordionMinimalPerf.default | 84 | 88 | 0.95:1 |
| AlertMinimalPerf.default | 150 | 161 | 0.93:1 |
| ListCommonPerf.default | 383 | 416 | 0.92:1 |
This was referenced Mar 18, 2024
layershifter
approved these changes
Mar 21, 2024
robertpenner
pushed a commit
to robertpenner/fluentui
that referenced
this pull request
Apr 11, 2024
… in TypeScript 5.3.3 (microsoft#30817)
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.
Previous Behavior
TypeScript 5 introduced some breaking changes to the way that implicit type coercion happens in templates, as well as a few other breaking changes. Although we don't currently use TypeScript 5.3.3 in the repo, experimental work in the
xplatbranch requires building against TypesScript 5+. There are also customers using TypeScript 5+, who are seeing build errors when importing FluentUI.New Behavior
Fix build errors seen if the repo is updated to TypeScript 5.3.3. This is part of a set of PRs intending to fix all build errors when building against TypeScript 5.3.3.
The fixes fall into a few major categories:
{}.extends {}constraint to template types that previously had no constraint (effectivelyextends unknown). The new constraint disallowsnullandundefinedas template parameters, which were never valid values for these type parameters anyways.<=,>, etc. betweenNumberandnumbervalues).Numberwhen it should have been returningnumber.ℹ️ Note: This is NOT updating the project to use TypeScript 5.3.3, and an update to the TypeScript version is not planned as part of this change. It is only fixing build errors that would occur if it were built against TypeScript 5.3.3.
Related Issue(s)
This PR was split out from a monolith PR that contains all of the changes. I'm not going to publish the monolith PR, but in case it helps to see all of the changes in one place:
Here are all of the split-out PRs: