UNPKG

rivo

Version:

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

19 lines (16 loc) • 443 B
import type { Args, Fn } from "../HKT"; import type { AssertStr, IsNever } from "../helpers"; /** * Convert `null` to a string. * * Sig: `(n: null) => string` */ export type ToStr<N extends null> = AssertStr<IsNever<N> extends true ? never : "null">; /** * [Fn] Convert `null` to a string. * * Sig: `(n: null) => string` */ export default interface ToStrFn extends Fn<[null], string> { def: ([n]: Args<this>) => ToStr<typeof n>; }