diff --git a/packages/core/src/types/props.ts b/packages/core/src/types/props.ts index 02f69d9062..f50b76ad3b 100644 --- a/packages/core/src/types/props.ts +++ b/packages/core/src/types/props.ts @@ -314,10 +314,11 @@ export type PickAnimated = unknown & : [object] extends [Props] ? Lookup : ObjectFromUnion< - | FromValues - | (TransitionKey & keyof Props extends never - ? ToValues - : TransitionValues) + Props extends { from: infer From } // extract prop from the `from` prop if it exists + ? ObjectType + : TransitionKey & keyof Props extends never + ? ToValues + : TransitionValues >) /** @@ -330,10 +331,3 @@ type ToValues = unknown & ? ForwardProps<[To] extends [object] ? To : Partial>> : never : unknown) - -/** - * Pick the values of the `from` prop. - */ -type FromValues = ForwardProps< - Props extends { from?: infer From } ? ObjectType : object ->