Type Alias Interpolation<T, U>

Interpolation: {
    easing?: EasingCurve;
    input: [InterpolateOn[T][number], ...InterpolateOn[T]];
    on: T;
    output: [U[number], ...U];
}

Define interpolation behavior for a value.

Type Parameters

Type declaration

// Interpolate a value from 1 to 2 between zoom levels 17 and 18 with easing
const value: Interpolation<'zoom-level', [number, number]> = {
on: 'zoom-level',
input: [17, 18],
output: [1, 2],
easing: 'ease-in',