persona-community-5/.pnpm-store/v3/files/43/cd3c2311040898b3bc06f4a4de1b3d29d19dff233be0f87e7a828065b2d3e175aadb01d023c908a198ea76dcb7dde0ee49fad64b9e34391f973f924c86c230
rdev-worker a1d0d1bf1c
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
build: /implement-feature community-ui --requirements 'Build the React commu...
2026-02-24 08:22:30 +00:00

23 lines
648 B
Plaintext

/**
Provides all values for a constant array or tuple.
Use-case: This type is useful when working with constant arrays or tuples and you want to enforce type-safety with their values.
@example
```
import type {ArrayValues, ArrayIndices} from 'type-fest';
const weekdays = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'] as const;
type WeekdayName = ArrayValues<typeof weekdays>;
type Weekday = ArrayIndices<typeof weekdays>;
const getWeekdayName = (day: Weekday): WeekdayName => weekdays[day];
```
@see {@link ArrayIndices}
@category Array
*/
export type ArrayValues<T extends readonly unknown[]> = T[number];