Skip to content

aninest root / AnimatableTypes / PartialRecursiveAnimatable

PartialRecursiveAnimatable<T>

ts
type PartialRecursiveAnimatable<T>: { [P in keyof T]?: T[P] extends UnknownRoot ? Root<T[P]> | undefined : PartialRecursiveAnimatable<T[P]> };

A subtree of the Animatable type.

Type Parameters

T

Example

ts
const startingState: RecursiveAnimatable<{a: number, b: number}> = {a: {x: 0, y: 0}}
// the following are all valid partial states of the type of the startingState:
// example 3
{
 a: {x: 1, y: 1}
}
// example 2
{
 a: {x: 1}
}
// example 1
{}

Defined in

Animate/AnimatableTypes.ts:99