UNPKG

ts-prims

Version:
20 lines 494 B
import { lengthConstraint } from './length.js'; import { Prim } from './prim.js'; /** * The prim type constructor function for `memo`. * * Extends {@link Text}. * * ```ts * import { type memo, Memo } from 'ts-prims' * * // narrow using cast * let x: memo = 'Hello World!' as memo * // or using runtime check by constructor * x = Memo('Hello World!') * ``` * * @see {@link memo} */ export const Memo = Prim('memo', String, [lengthConstraint(11)]); //# sourceMappingURL=memo.js.map