OneOf type to handle one of types (non-union way as union combines type).
The array of types to combine
The result type
The union of all properties
function test(data: OneOf<[{data1: string}, {data2: string}]>) {} Copy
function test(data: OneOf<[{data1: string}, {data2: string}]>) {}
v0.2.6
OneOf type to handle one of types (non-union way as union combines type).