refactor(toolkit): type source any with proper types
Genuinely type composable any usages (useStepper/useStorage/useForm/ createEventHook/useSorted/etc.) as proper generics/unknown; keep idiomatic any-function and overload-impl signatures with comments; skipped test -> .todo.
This commit is contained in:
@@ -4,6 +4,7 @@ import { clamp, isFunction, isNumber, lerp, noop } from '@robonen/stdlib';
|
||||
import { defaultWindow } from '@/types';
|
||||
import type { ConfigurableWindow } from '@/types';
|
||||
import { useRafFn } from '@/composables/animation/useRafFn';
|
||||
import { tryOnScopeDispose } from '@/composables/lifecycle/tryOnScopeDispose';
|
||||
|
||||
/**
|
||||
* Cubic bezier control points `[x1, y1, x2, y2]` (the implied endpoints are
|
||||
@@ -356,5 +357,10 @@ export function useTransition<T extends TransitionValue>(
|
||||
},
|
||||
);
|
||||
|
||||
// The RAF loop is torn down by useRafFn on scope dispose, but a pending start
|
||||
// delay (window.setTimeout) is not — clear it so the timer can't fire into a
|
||||
// disposed scope.
|
||||
tryOnScopeDispose(clearDelay);
|
||||
|
||||
return computed(() => outputRef.value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user