Skip to content

Commit

Permalink
Fix typing issue for CSS properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Temzasse committed Oct 31, 2021
1 parent cb260d3 commit 41ee9f5
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/types/stitches.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,6 @@ import type * as Native from './react-native';
import type * as Util from './util';
import type * as ThemeUtil from './theme';

/** Remove an index signature from a type */
export type RemoveIndex<T> = {
[k in keyof T as string extends k
? never
: number extends k
? never
: k]: T[k];
};

/** Stitches interface. */
export default interface Stitches<
Media extends {} = {},
Expand Down Expand Up @@ -82,7 +73,7 @@ export default interface Stitches<
| React.JSXElementConstructor<any>
| Util.Function
? Composers[K]
: RemoveIndex<CSS> & {
: CSS & {
/** The **variants** property lets you set a subclass of styles based on a key-value pair.
*
* [Read Documentation](https://stitches.dev/docs/variants)
Expand Down Expand Up @@ -156,7 +147,7 @@ export default interface Stitches<
| React.ComponentType<any>
| Util.Function
? Composers[K]
: RemoveIndex<CSS> & {
: CSS & {
/** The **variants** property lets you set a subclass of styles based on a key-value pair.
*
* [Read Documentation](https://stitches.dev/docs/variants)
Expand Down

0 comments on commit 41ee9f5

Please sign in to comment.