@stimulus-library/controllers
Version:
A library of useful controllers for Stimulus
36 lines (35 loc) • 1.13 kB
TypeScript
import { BaseController, EasingFunction, EasingFunctions } from "@stimulus-library/utilities";
export declare class TweenNumberController extends BaseController {
static values: {
start: NumberConstructor;
end: NumberConstructor;
duration: NumberConstructor;
easing: StringConstructor;
formatting: {
type: ObjectConstructor;
default: {};
};
};
startValue: number;
readonly hasStartValue: boolean;
endValue: number;
readonly hasEndValue: boolean;
durationValue: number;
readonly hasDurationValue: boolean;
easingValue: keyof typeof EasingFunctions;
readonly hasEasingValue: boolean;
formattingValue: Intl.NumberFormatOptions;
formatter: Intl.NumberFormat;
readonly hasFormattingValue: boolean;
private observer?;
private observe?;
private unobserve?;
private teardownObserver?;
get start(): number;
get end(): number;
get durationMs(): number;
get easingFunction(): EasingFunction;
connect(): void;
appear(_entry: IntersectionObserverEntry): void;
tween(): void;
}