UNPKG

ts-data-forge

Version:

[![npm version](https://img.shields.io/npm/v/ts-data-forge.svg)](https://www.npmjs.com/package/ts-data-forge) [![npm downloads](https://img.shields.io/npm/dm/ts-data-forge.svg)](https://www.npmjs.com/package/ts-data-forge) [![License](https://img.shields.

21 lines 532 B
/** * Creates an {@link Some} containing the given value. * * @example * * ```ts * const someValue = Optional.some({ id: 1 }); * * const noneValue = Optional.none; * * assert.isTrue(Optional.isSome(someValue)); * * assert.isTrue(Optional.isNone(noneValue)); * ``` * * @template S The type of the value. * @param value The value to wrap in an {@link Some}. * @returns An {@link Some}<S> containing the value. */ export declare const some: <const S>(value: S) => Some<S>; //# sourceMappingURL=optional-some.d.mts.map