/** * @tsplus type PlainMake * @tsplus derive nominal */ export interface PlainMake { readonly make: (value: A) => A } /** * @tsplus type Make/Ops */ export interface MakeOps {} export const Make: MakeOps = {} /** * @tsplus static Make/Ops __call */ export function make(): PlainMake { return { make: (a) => a } } /** * @tsplus derive PlainMake<_> 10 */ export function deriveMake( ..._: [] ): PlainMake { return { make: (a) => a } } export type Make = ([X] extends [Brand.Valid] ? Brand.MakeValidated : [X] extends [Brand] ? Brand.Make : PlainMake)