Type safe function to unzip an option of a tuple of 2 into a tuple of 2 options.
Any type
Option to unzip
a tuple of 2 options.
const opt: Option<[number, string]> = Option.Some([10, 'foo'])const [optA, optB] =unzip(opt)optA.unwrap() === 10 // trueoptB.unwrap() === 'foo' // true Copy
const opt: Option<[number, string]> = Option.Some([10, 'foo'])const [optA, optB] =unzip(opt)optA.unwrap() === 10 // trueoptB.unwrap() === 'foo' // true
Generated using TypeDoc
Type safe function to unzip an option of a tuple of 2 into a tuple of 2 options.