Skip to content

[Bug]: mergeStyles types lead to "error TS2589: Type instantiation is excessively deep and possibly infinite" #31477

Description

@spmonahan

Library

React / v8 (@fluentui/react)

System Info

n/a

Are you reporting Accessibility issue?

no

Reproduction

https://github.com/microsoft/fluentui/blob/master/packages/merge-styles/src/mergeStyles.ts#L9

Bug Description

Actual Behavior

Type changes in #30689 can lead to TS build errors due to the complexity of the types.

mergeStyles.ts

IStyle.ts and IRawStyle.ts

Expected Behavior

Types should build.

Logs

No response

Requested priority

Blocking

Products/sites affected

No response

Are you willing to submit a PR to fix?

yes

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • The provided reproduction is a minimal reproducible example of the bug.

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions