Skip to content

Commit 18d1679

Browse files
Don't be permissive with props
Don't allow `to` on other props objects either
1 parent bd99055 commit 18d1679

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ export class Keyframes<S extends object, DS extends object> extends PureComponen
245245
): (props: object) => Keyframes<S | Pick<SpringProps<S,DS>, Exclude<keyof SpringProps<S,DS>, "to">>, DS>
246246
static Trail<S extends object, DS extends object>(
247247
states: object
248-
): (props: object) => Keyframes<S | TrailProps<S,DS>, DS>
248+
): (props: object) => Keyframes<S | Pick<TrailProps<S,DS>, Exclude<keyof TrailProps<S,DS>, "to">>, DS>
249249
static Transition<S extends object, DS extends object>(
250250
states: object
251-
): (props: object) => Keyframes<S | TransitionProps<S,DS>, DS>
251+
): (props: object) => Keyframes<S | Pick<TransitionProps<S,DS>, Exclude<keyof TransitionProps<S,DS>, "to">>, DS>
252252
}

0 commit comments

Comments
 (0)