How to use the io-ts-types/lib/setFromArray.setFromArray function in io-ts-types

To help you get started, we’ve selected a few io-ts-types examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github devexperts / swagger-codegen-ts / src / utils / io-ts.ts View on Github external
export const nonEmptySetFromArray = (
	codec: C,
	ord: Ord>,
): Type>, OutputOf[]> =>
	brand(setFromArray(codec, ord), (s): s is NonEmptySet> => s.size > 0, 'NonEmptySet');