UNPKG

typescript-functional-extensions

Version:

A TypeScript implementation of synchronous and asynchronous Maybe and Result monads

20 lines (19 loc) 411 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Unit = void 0; class Unit { static instance; constructor() { if (!Unit.instance) { Unit.instance = this; } return Unit.instance; } static get Instance() { return this.instance ?? new Unit(); } toString() { return 'Unit'; } } exports.Unit = Unit;