Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 370 Bytes

optional-tuple-last.md

File metadata and controls

19 lines (13 loc) · 370 Bytes
category
Basic Operation

OptionalTupleLast

Make the last element of a tuple optional.

Usage

import type { OptionalTupleLast } from '@utype/core'

type Tuple = [string, number, boolean];
// Expect: [string, number, boolean?] // [!code highlight]
type OptionalTuple = OptionalTupleLast<Tuple>;