Skip to main content
Deno 2 is finally here ๐ŸŽ‰๏ธ
Learn more
Module

x/unitest/matcher/utils.ts>last

๐Ÿƒ Deno-first universal unit testing framework
Latest
function last
import { last } from "https://deno.land/x/unitest@v1.0.0-beta.82/matcher/utils.ts";

take last element of array

Type Parameters

T extends readonly unknown[]

Returns

IsTuple<T> extends true ? T[Minus<T["length"]>] : T[number] | undefined