Skip to content

Documentation / AnimatableTypes / AnimatableOf

AnimatableOf<Anim> ​

ts
type AnimatableOf<Anim> = Anim extends Animation<infer T> ? T : never;

Defined in: Animate/AnimatableTypes.ts:42

Lets you get the Animatable type out of the Animation type.

Type Parameters ​

Anim ​

Anim extends UnknownAnimation

Example ​

ts
const particle = createParticle();
type Particle = AnimatableOf<(typeof particle)['anim']>;
const updateLayer = getUpdateLayer<Particle>();
updateLayer.mount(particle.anim)