Try compiling the below code with typescript 3.9.2.
// Repro.ts
import { mergeStyleSets, concatStyleSets } from '@uifabric/merge-styles';
mergeStyleSets();
concatStyleSets();
Similar to #9280
node_modules/@uifabric/merge-styles/lib/concatStyleSets.d.ts:12:226 - error TS2590: Expression produces a union type that is too complex to represent.
node_modules/@uifabric/merge-styles/lib/concatStyleSets.d.ts:19:318 - error TS2590: Expression produces a union type that is too complex to represent.
node_modules/@uifabric/merge-styles/lib/concatStyleSets.d.ts:27:410 - error TS2590: Expression produces a union type that is too complex to represent.
node_modules/@uifabric/merge-styles/lib/concatStyleSets.d.ts:35:410 - error TS2590: Expression produces a union type that is too complex to represent.
node_modules/@uifabric/merge-styles/lib/concatStyleSets.d.ts:44:502 - error TS2590: Expression produces a union type that is too complex to represent.
node_modules/@uifabric/merge-styles/lib/concatStyleSets.d.ts:54:594 - error TS2590: Expression produces a union type that is too complex to represent.
node_modules/@uifabric/merge-styles/lib/mergeStyleSets.d.ts:21:225 - error TS2590: Expression produces a union type that is too complex to represent.
node_modules/@uifabric/merge-styles/lib/mergeStyleSets.d.ts:32:317 - error TS2590: Expression produces a union type that is too complex to represent.
node_modules/@uifabric/merge-styles/lib/mergeStyleSets.d.ts:44:409 - error TS2590: Expression produces a union type that is too complex to represent.
node_modules/@uifabric/merge-styles/lib/mergeStyleSets.d.ts:73:239 - error TS2590: Expression produces a union type that is too complex to represent.
node_modules/@uifabric/merge-styles/lib/mergeStyleSets.d.ts:83:320 - error TS2590: Expression produces a union type that is too complex to represent.
node_modules/@uifabric/merge-styles/lib/mergeStyleSets.d.ts:93:401 - error TS2590: Expression produces a union type that is too complex to represent.
The above code compiles successfully.
Are you willing to submit a PR to fix? Yes, but not sure how to fix this after looking at it for several hours.
Requested priority: Normal. This is blocking our ability to upgrade to the latest version of typescript.
Products/sites affected: N/A
We're aware of this and working on finding a fix ASAP, since it's blocking a bunch of our partners from upgrading. cc @dzearing
@ecraig12345 Is there a package version (either @fluentui/react or typescript) that will work before the fix goes out? Just trying to unblock locally while this is getting fixed.
You might be able to work around it with skipLibCheck
, casts to any
, or // @ts-ignore
depending on the situation. We don't have a package version with the fix since we're still working on finding a fix.
I managed to get something building by literally moving the offending files out of the way:
mv node_modules/@uifabric/merge-styles/lib/concatStyleSets.d.ts ../
mv node_modules/@uifabric/merge-styles/lib/mergeStyleSets.d.ts ../
fix incoming :D
Fixed by #13165. We're running a release now--should be done in an hour or less.
This has been updated in @uifabric/[email protected]
. Our test cases pass, and our repro scenarios have passed. We think this should resolve the issue. Let us know if it does or does not fix this for you.
We found one additional case this morning where the more strict typescript typings were creating new errors around expecting subComponentStyles to be fully defined in scenarios where they didn't need to be. We've addressed this as well.
If any of you who were previously having issues could try with the updated @uifabric/[email protected]
package, please let us know if your issues are resolved or if you're still hitting some issues. Thanks again for reporting!
@JustinDao Does it work for you with the latest version or are you still seeing an issue?
This issue has been automatically marked as stale because it has marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your contributions to Fluent UI!
@ecraig12345 Updated to @fluent-ui/[email protected]
and it is working! :) Thank you!
Most helpful comment
This has been updated in
@uifabric/[email protected]
. Our test cases pass, and our repro scenarios have passed. We think this should resolve the issue. Let us know if it does or does not fix this for you.