Skip to content

Commit

Permalink
Cleanup typings
Browse files Browse the repository at this point in the history
  • Loading branch information
Temzasse committed Oct 31, 2021
1 parent 41ee9f5 commit 55c3678
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 68 deletions.
2 changes: 1 addition & 1 deletion example/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"resolveJsonModule": true,
"strict": true,
"paths": {
"stitches-native": ["../src/index"]
"stitches-native": ["../src/types/index.d.ts"]
},
}
}
63 changes: 0 additions & 63 deletions src/index.ts

This file was deleted.

9 changes: 5 additions & 4 deletions src/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@ export type PropertyValue<K extends keyof CSSUtil.CSSProperties> = {
export type ScaleValue<K> = { readonly [CSSUtil.$$ScaleValue]: K };

/** Returns a type that suggests variants from a component as possible prop values. */
export type VariantProps<Component> = StyledComponent.TransformProps<
Component[StyledComponent.$$StyledComponentProps],
Component[StyledComponent.$$StyledComponentMedia]
>;
export type VariantProps<Component extends { [key: symbol | string]: any }> =
StyledComponent.TransformProps<
Component[StyledComponent.$$StyledComponentProps],
Component[StyledComponent.$$StyledComponentMedia]
>;

/** Map of CSS properties to token scales. */
export declare const defaultThemeMap: DefaultThemeMap;
Expand Down

0 comments on commit 55c3678

Please sign in to comment.