Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Apply VueUse composables in Vue 3/Nuxt projects to replace custom implementations with battle-tested utilities.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/createGenericProjection.md
1---2category: '@Math'3---45# createGenericProjection67Generic version of `createProjection`. Accepts a custom projector function to map arbitrary type of domains.89Refer to `createProjection` and `useProjection`1011## Type Declarations1213```ts14export type ProjectorFunction<F, T> = (15input: F,16from: readonly [F, F],17to: readonly [T, T],18) => T19export type UseProjection<F, T> = (input: MaybeRefOrGetter<F>) => ComputedRef<T>20export declare function createGenericProjection<F = number, T = number>(21fromDomain: MaybeRefOrGetter<readonly [F, F]>,22toDomain: MaybeRefOrGetter<readonly [T, T]>,23projector: ProjectorFunction<F, T>,24): UseProjection<F, T>25```26