UNPKG

@arthurgubaidullin/nx-embed-dependencies

Version:

This plugin for [Nx](https://nx.dev) helps injecting local dependencies into a package.

19 lines (18 loc) 420 B
import * as t from 'io-ts'; var None = t.strict({ _tag: t.literal('None') }, 'None'); var someLiteral = t.literal('Some'); /** * @since 0.5.0 */ export function option(codec, name) { if (name === void 0) { name = "Option<" + codec.name + ">"; } return t.union([ None, t.strict({ _tag: someLiteral, value: codec }, "Some<" + codec.name + ">") ], name); }