Skip to content

Commit

Permalink
more precise type error for invalid properties
Browse files Browse the repository at this point in the history
  • Loading branch information
nsaunders authored May 16, 2024
1 parent 6dd2f9e commit 18909e4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/react/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,12 @@ export type Config<ConditionName extends string, ConfigProperties> = {
[P in ConditionName]: ValidConditionName<P> & Condition<Selector>;
};
properties?: {
[P in keyof ConfigProperties]: ValidPropertyName<P> & ConfigProperties[P];
} & Record<string, (value: any) => CSSProperties>;
[P in keyof ConfigProperties]: ValidPropertyName<P> &
(ConfigProperties[P] extends (value: any) => CSSProperties
? unknown
: never) &
ConfigProperties[P];
};
fallback?: "revert-layer" | "unset";
debug?: boolean;
};
Expand Down

0 comments on commit 18909e4

Please sign in to comment.