-
Notifications
You must be signed in to change notification settings - Fork 60
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
Updated to csstype@3 #38
Updated to csstype@3 #38
Conversation
…ncement/csstype-update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, that really helps ❤️
In meantime I added proper type checking to this repo (#42) and it discovered few problems:
Error: ../core/src/types.ts(59,65): error TS2694: Namespace '"/home/runner/work/griffel/griffel/node_modules/csstype/index"' has no exported member 'AnimationProperty'.
This is a problem indeed, just perform that same change:
// packages/core/src/types.ts
export type GriffelStylesStrictCSSObject = GriffelStylesCSSProperties &
GriffelStylesCSSPseudos & {
- animationName?: GriffelAnimation | GriffelAnimation[] | CSS.AnimationProperty;
+ animationName?: GriffelAnimation | GriffelAnimation[] | CSS.Property.AnimationName;
Error: src/types.test.ts(86,5): error TS2578: Unused '@ts-expect-error' directive.
Error: src/types.test.ts(98,9): error TS2578: Unused '@ts-expect-error' directive.
Error: src/types.test.ts(112,9): error TS2578: Unused '@ts-expect-error' directive.
Error: src/types.test.ts(127,11): error TS2578: Unused '@ts-expect-error' directive.
These are in tests, please update all of them in this way:
-// @ts-expect-error "1" is invalid value for "flexShrink"
-flexShrink: '1',
+// @ts-expect-error "1" is invalid value for "overflow"
+overflow: '1',
I'll fix the issues mentioned in the comments as soon as possible and request a new review. |
…sunil2/griffel into enhancement/csstype-update
@layershifter Sorry, I have no experience writing tests in js but I would love to learn how to. Can you please tell me what I should do and provide me with some reference material? I will work on it at the earliest. |
@rahulsunil2 in the previous message I meant to update these usages as was suggested: griffel/packages/core/src/types.test.ts Lines 86 to 87 in 95b0a74
-// @ts-expect-error "1" is invalid value for "flexShrink"
-flexShrink: '1',
+// @ts-expect-error "1" is invalid value for "overflow"
+overflow: '1', There is no need to write new ones 😃 |
I have made the fixes for both types.test.ts and types.ts. |
There is an Can you please confirm, whether this is caused due to my updates? |
Thanks @layershifter, I will go through the solution. 👍 |
@rahulsunil2 it's related and not related 😸
I pushed a minor refactor in 8432f3f and now CI is passing ✅ |
@@ -2,7 +2,7 @@ import * as CSS from 'csstype'; | |||
|
|||
export type GriffelStylesCSSValue = string | 0; | |||
|
|||
type GriffeltylesUnsupportedCSSProperties = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These was a typo before. As type was not exported, we can fix it 😇
Thanks a lot @layershifter for explaining and letting me contribute to this awesome repo! I hope I could contribute more. Before I really need to understand a lot more about TS. 😄 |
Closing Issue #31 Update to csstype@3