Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

ValueFromArray

Extracts the generic value from an Array type. If you have T extends Array<any>, and pass a string[] to it, ValueFromArray<T> will return the actual type of string.

type ValueFromArray<A extends readonly unknown[]> = A extends Array<infer T> ? T : never;

§Type Parameters

§
A extends readonly unknown[]
[src]

§Type

§
A extends Array<infer T> ? T : never
[src]