-
Notifications
You must be signed in to change notification settings - Fork 221
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
fix: Fix mergeProps, createElemPropsHook, and composeHooks types #2980
Conversation
- Upgrade TypeScript to 5.0 - Upgrade ESLint to 5.61 - Fix `mergeProps` type signature - Fix `createElemProps` type signature - Fix `composeHooks` type signature
@@ -51,6 +52,7 @@ A note to the reader: | |||
- [Select](#select) | |||
- [Text Area](#text-area) | |||
- [Text Input](#text-input) | |||
- [Utility Updates](#utility-updates) |
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.
- [Utility Updates](#utility-updates) | |
- [Infrastructure](#infrastructure) | |
- [Utility Updates](#utility-updates) |
@@ -188,6 +190,14 @@ from Main instead. | |||
|
|||
--- | |||
|
|||
## TypeScript |
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.
## TypeScript | |
## Infrastructure | |
### TypeScript | |
**PR:** [#2908](https://github.com/Workday/canvas-kit/pull/2908) | |
@@ -569,6 +579,39 @@ const theme: PartialEmotionCanvasTheme = { | |||
</CanvasProvider>; | |||
``` | |||
|
|||
## Utility Updates |
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.
## Utility Updates | |
## Utility Updates | |
**PR:** [#2908](https://github.com/Workday/canvas-kit/pull/2908) | |
Workday/canvas-kit Run #7885
Run Properties:
|
Project |
Workday/canvas-kit
|
Run status |
Passed #7885
|
Run duration | 05m 02s |
Commit |
768fd3f644 ℹ️: Merge 1b3de1f916398369e7e436bfc04268977f9126f4 into c47cf7cb9a1a597a6ab33fb8f173...
|
Committer | Nicholas Boll |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
33
|
Pending |
24
|
Skipped |
0
|
Passing |
1082
|
UI Coverage
21.8%
|
|
---|---|
Untested elements |
1619
|
Tested elements |
449
|
Accessibility
99.18%
|
|
---|---|
Failed rules |
5 critical
5 serious
0 moderate
2 minor
|
Failed elements |
182
|
@@ -600,7 +600,7 @@ export const createComponent = | |||
*/ | |||
export const createElemPropsHook = | |||
<TModelHook extends (config: any) => Model<any, any>>(modelHook: TModelHook) => | |||
<PO extends {}, PI extends {}>( | |||
<const PO extends {}, const PI extends {}>( |
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.
it's not happy about these const in here for some reason
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.
The dependency checker doesn't understand the new syntax... It uses an AST parser to function.
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.
great
We've upgrade to TypeScript 5.0 and make use of | ||
[const Type Parameters](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-0.html#const-type-parameters). | ||
You will need to upgrade to TypeScript 5.0+ to avoid TypeScript syntax errors. TypeScript does not | ||
follow semver, so 5.0 doesn't mean a large breaking change from 4.9. TypeScript doesn't have a | ||
`x.10` release, they bump the `x.9` to `{x+1}.0`. |
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.
We've upgrade to TypeScript 5.0 and make use of | |
[const Type Parameters](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-0.html#const-type-parameters). | |
You will need to upgrade to TypeScript 5.0+ to avoid TypeScript syntax errors. TypeScript does not | |
follow semver, so 5.0 doesn't mean a large breaking change from 4.9. TypeScript doesn't have a | |
`x.10` release, they bump the `x.9` to `{x+1}.0`. | |
We've upgraded to TypeScript 5.0 to make use of | |
[const Type Parameters](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-0.html#const-type-parameters). | |
You will need to upgrade to TypeScript 5.0+ to avoid any TypeScript syntax errors. TypeScript does not | |
follow semver, so 5.0 doesn't mean a large breaking change from 4.9. TypeScript doesn't have a | |
`x.10` release, they bump the `x.9` to `{x+1}.0`. |
Summary
mergeProps
type signaturecreateElemProps
type signaturecomposeHooks
type signatureMore info: #2979
Release Category
Components
BREAKING CHANGES
elemProps
hooks usingcomposeHooks
have more accurate type signatures which may lead to new type errors. For information, view our discussion.Checklist
ready for review
has been added to PRFor the Reviewer