From bc4802f2613c61d1da8ade1b43d49a5e2121fb08 Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Sun, 16 Apr 2023 13:27:17 -0500 Subject: [PATCH] chore:remove const function --- src/core/utilities/functions.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/core/utilities/functions.ts b/src/core/utilities/functions.ts index ab67f99..18df085 100644 --- a/src/core/utilities/functions.ts +++ b/src/core/utilities/functions.ts @@ -1,14 +1,6 @@ import * as Files from '../module-loading/readFile'; import { basename } from 'path'; import { Err, Ok } from 'ts-results-es'; -/** - * A function that returns whatever value is provided. - * Warning: this evaluates { @param value }. It does not defer a value. - * @param value - * @__PURE__ - */ -// prettier-ignore -export const _const = (value: T) => () => value; /** * * @param modName @@ -19,8 +11,8 @@ export function nameOrFilename(modName: string | undefined, absPath: string) { } //function wrappers for empty ok / err -export const ok = _const(Ok.EMPTY); -export const err = _const(Err.EMPTY); +export const ok = () => Ok.EMPTY; +export const err = () => Err.EMPTY; export function partition(arr: (T & V)[], condition: (e: T & V) => boolean): [T[], V[]] { const t: T[] = [];