Skip to content

Commit

Permalink
fix: theme typings
Browse files Browse the repository at this point in the history
  • Loading branch information
diegohaz committed Aug 30, 2018
1 parent 13f5570 commit 68e22bd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ export function prop<T = undefined>(
export function theme<T = undefined>(
path: string,
defaultValue?: T
): <Props, Theme>(props: Props & { theme: Theme }) => Theme[keyof Theme] | T;
): <Props, Theme extends { [key: string]: any }>(
props: Props & { theme: Theme }
) => Theme[keyof Theme] | T;

type ThemeWithPalette = {
palette?: { [key: string]: any };
Expand Down

0 comments on commit 68e22bd

Please sign in to comment.