/** * A port of `newtype-ts` to schemata-ts. Unliked branded types, newtypes are not * assignable to the underlying type. * * Schemata-ts uses Newtypes for UUIDs. * * @since 1.4.0 */ /** * Represents a wrapped type that's not assignable to its underlying type. * * @since 1.4.0 * @category Model */ export interface Newtype { readonly _URI: URI; readonly _A: A; } /** * @since 2.0.0 * @category Model */ export interface NewtypeIso { readonly wrap: (B: B) => A; readonly unwrap: (A: A) => B; } /** * @since 1.4.0 * @category Type Helpers */ export type URIOf> = N['_URI']; /** * @since 1.4.0 * @category Type Helpers */ export type CarrierOf> = N['_A']; /** * @since 1.4.0 * @category Type Helpers */ export type CombineURIs, N2 extends Newtype>> = Newtype & URIOf, CarrierOf>; /** * @since 1.4.0 * @category Constructors */ export declare const iso: >() => NewtypeIso>; //# sourceMappingURL=newtype.d.ts.map