// @ts-ignore - Only used in doc comments import type { List } from "."; import type { Args, GenericFn, GenericResolver } from ".."; // @ts-ignore - Only used in doc comments import type { Of1 } from "../Tuple/Of1"; // @ts-ignore - Only used in doc comments import type Of1Fn from "../Tuple/Of1"; import type { Broaden } from "../helpers"; /** * Create a {@link List} with one element. * * Sig: `(x: T) => List` * * @example * ```typescript * type R1 = Create<1>; * // ^?: readonly [1] * type R2 = Create<"foo" | false>; * // ^?: readonly ["foo" | false] * ``` * * @see {@link Of1} if you want a version with more precise function signature. */ export type Create = readonly [T]; interface Resolver extends GenericResolver<[unknown], List> { on1: ([x]: Args) => [[], List>]; } /** * [Fn] Create a {@link List} with one element. * * Sig: `(x: T) => List` * * @see {@link Of1Fn} if you want a version with more precise function signature. */ export default interface CreateFn extends GenericFn { def: ([x]: Args) => Create; }