UNPKG

hkt-toolbelt

Version:

Functional and composable type utilities

20 lines (19 loc) 461 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.display = void 0; /** * Given a value, return the value unchanged, while performing type inference * on the type to fully display it. * * Acts as an identity function. * * @param {unknown} x - The value to display. * * @example * ```ts * import { Type } from "hkt-toolbelt"; * * const result = Type.display('foo') // 'foo' * ``` */ exports.display = ((x) => x);