UNPKG

rivo

Version:

🤖 The ultimate library you need for composable type-level programming in TypeScript, powered by HKT.

20 lines (17 loc) • 593 B
import type { Args, AssertStr, Fn1 } from ".."; import type { TypeClass$$Show } from "../typeclass"; declare module "../typeclass/Show" { interface ShowImpl { string: ImplShowFor<string, Str$$Show>; } } /** * Implementation of the {@link Show} type class for `string`. */ export interface Str$$Show extends TypeClass$$Show<string> { Show: string$$Show$ShowFn; } interface string$$Show$ShowFn extends Fn1<string, string> { def: ([s]: Args<this>) => string$$Show$Show<typeof s>; } type string$$Show$Show<S extends string> = AssertStr<[string] extends [S] ? "string" : `'${S}'`>;