Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/ts_essentials/lib/types.ts>ElementOf

All basic TypeScript types in one place 🤙
Latest
type alias ElementOf
import { type ElementOf } from "https://deno.land/x/ts_essentials@v9.1.2/lib/types.ts";

Easily extract the type of a given array's elements

Type Parameters

T extends readonly any[]
definition: T extends readonly (infer ET)[] ? ET : never