Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

csstype bump to 3.1.3 causing BREAKING CHANGEs on type-level #510

Closed
Hotell opened this issue Mar 4, 2024 · 0 comments · Fixed by #511
Closed

csstype bump to 3.1.3 causing BREAKING CHANGEs on type-level #510

Hotell opened this issue Mar 4, 2024 · 0 comments · Fixed by #511

Comments

@Hotell
Copy link
Contributor

Hotell commented Mar 4, 2024

While bumping griffel build dependencies within fluent core, I run into unexpected type errors.

I was able to troubleshoot it deeper and I can confirm that the culprit of this issue is csstype package bump from 3.1.2 to 3.1.3 which happened in @griffel/core@1.15.2 ( and related packages to that release ).

Also other folks run into this issue: frenic/csstype#189

I dont have context if that package minor bump is required, but if not I'd recommend to revert to 3.1.2 until the package authors will release a fixed version.

Reproduction:

Repro:

checkout: microsoft/fluentui#30694

yarn workspace @fluentui/react-positioning type-check

src/createArrowStyles.ts:93:34 - error TS2769: No overload matches this call.
  Overload 1 of 6, '(width: BorderWidthInput, style: BorderStyleInput, color: BorderColorInput): BorderBottomStyle', gave the following error.
    Argument of type 'BorderBottomWidth<GriffelStylesCSSValue> | readonly BorderBottomWidth<GriffelStylesCSSValue>[]' is not assignable to parameter of type 'BorderWidthInput'.
      Type 'readonly BorderBottomWidth<GriffelStylesCSSValue>[]' is not assignable to type 'BorderWidthInput'.
        The type 'readonly BorderBottomWidth<GriffelStylesCSSValue>[]' is 'readonly' and cannot be assigned to the mutable type 'BorderWidth<GriffelStylesCSSValue>[]'.
  Overload 2 of 6, '(style: BorderStyleInput, width: BorderWidthInput, color: BorderColorInput): BorderBottomStyle', gave the following error.
    Argument of type 'BorderBottomWidth<GriffelStylesCSSValue> | readonly BorderBottomWidth<GriffelStylesCSSValue>[]' is not assignable to parameter of type 'BorderStyleInput'.
      Type '0' is not assignable to type 'BorderStyleInput'.

93       ...shorthands.borderBottom(borderWidth, borderStyle, borderColor),
                                    ~~~~~~~~~~~
@Hotell Hotell changed the title csstype bump to 3.1.3 is causing BREAKING CHANGE on type-level csstype bump to 3.1.3 causing BREAKING CHANGEs on type-level Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant