-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
171 additions
and
26 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
diff --git a/node_modules/@stitches/react/types/css-util.d.ts b/node_modules/@stitches/react/types/css-util.d.ts | ||
index 1668fc2ab56c421894c547b2e5a988166cd90e5f..cfdad3f208ef7f57c89de7fb94cdaecbd7378c63 100644 | ||
--- a/node_modules/@stitches/react/types/css-util.d.ts | ||
+++ b/node_modules/@stitches/react/types/css-util.d.ts | ||
@@ -117,3 +117,11 @@ export type $$ScaleValue = typeof $$ScaleValue | ||
export declare const $$ThemeValue: unique symbol | ||
|
||
export type $$ThemeValue = typeof $$ThemeValue | ||
+ | ||
+// https://github.com/microsoft/TypeScript/issues/37888#issuecomment-846638356 | ||
+export type WithPropertyValue<T> = { | ||
+ readonly [K in $$PropertyValue]: T | ||
+} | ||
+export type WithScaleValue<T> = { | ||
+ readonly [K in $$ScaleValue]: T; | ||
+} | ||
\ No newline at end of file | ||
diff --git a/node_modules/@stitches/react/types/index.d.ts b/node_modules/@stitches/react/types/index.d.ts | ||
index 8dbcc9cad3f6c556a3f370065dd95300a02dd973..dafadd22e8b6285aadee2630936a7918c9c5b02b 100644 | ||
--- a/node_modules/@stitches/react/types/index.d.ts | ||
+++ b/node_modules/@stitches/react/types/index.d.ts | ||
@@ -35,7 +35,7 @@ export type ComponentProps<Component> = Component extends ((...args: any[]) => a | ||
/** Returns a type that expects a value to be a kind of CSS property value. */ | ||
export type PropertyValue<Property extends keyof CSSUtil.CSSProperties, Config = null> = ( | ||
Config extends null | ||
- ? { readonly [K in CSSUtil.$$PropertyValue]: Property } | ||
+ ? CSSUtil.WithPropertyValue<Property> | ||
: Config extends { [K: string]: any } | ||
? CSSUtil.CSS< | ||
Config['media'], | ||
@@ -49,7 +49,7 @@ export type PropertyValue<Property extends keyof CSSUtil.CSSProperties, Config = | ||
/** Returns a type that expects a value to be a kind of theme scale value. */ | ||
export type ScaleValue<Scale, Config = null> = ( | ||
Config extends null | ||
- ? { readonly [K in CSSUtil.$$ScaleValue]: Scale } | ||
+ ? CSSUtil.WithScaleValue<Scale> | ||
: Config extends { [K: string]: any } | ||
? Scale extends keyof Config['theme'] | ||
? `$${string & keyof Config['theme'][Scale]}` |
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.