-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Improve type-safety by using generics * Update TypeScript version and migrate from eslint-plugin-shopify to @shopify/eslint-plugin * Update gitignore for Jetbrains IDE folder * Remove Omit helper No longer necessary since TS includes this out of the box * Improve TypeSafety of useRestyle hook This ensures that the output props from useRestyle are actually typed properly instead of casting them to `any` * Cleanup / improve typings of useRestyle and RestyleFunction * Improve typings for restyleFunctions and createRestyleFunction to have typesafe return values and prop names * Improve typings of createRestyleComponent to include generics, allowing the restyleFunctions param to be typesafe * Improve typesafety of createVariant Enforces correct values for property, themeKey and the return type * Fix type safety of themeKey * Fix createVariant types to work when no property is defined * Fix README typo * Improve typesafety of createVariant using overloads This separates the types for createVariant into two overloads, one for when a custom property is defined and one when its not. The result of this is perfect inference of types when used in createRestyleComponent while not requiring the user to define the generic types if they dont want to.
- Loading branch information
1 parent
2a59dcc
commit 19ec0a8
Showing
18 changed files
with
1,025 additions
and
651 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,6 @@ npm-debug.log | |
.jest | ||
|
||
dist | ||
|
||
# IDE | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.