import type { None, Option, OptionL, Some } from "."; import type { Args, Fn } from "../HKT"; import type { Show, TypeClass$$Show } from "../typeclass"; import type { Show as Show_ } from "../typeclass/Show/Show"; declare module "../typeclass/Show" { interface ShowImpl { Option: ImplShowFor, Option$$Show>; } } /** * Implementation of the {@link Show} type class for {@link Option}. */ export interface Option$$Show extends TypeClass$$Show> { Show: Option$$Show$ShowFn; } /** * [Fn] Show an {@link Option}. */ interface Option$$Show$ShowFn extends Fn<[Option], string> { // @ts-ignore - Return type annotation circularly references itself. def: ([xs]: Args) => Option$$Show$Show; } /** * Show an {@link Option}. */ type Option$$Show$Show> = [O] extends [Some] ? // @ts-ignore - Type instantiation is excessively deep and possibly infinite. `Some<${Show_}>` : [O] extends [None] ? "None" : [O] extends [Option] ? `Option<${Show_}>` : never;