ValueFromArray

type-alias stable

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;

© 2015–2021 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors.
Code licensed under an Apache-2.0 License. Documentation licensed under CC BY 4.0.
https://rxjs.dev/api/index/type-alias/ValueFromArray