?? GreyFile — Mystic File Browser

Current path: home/webdevt/www/wdp/wp-content/plugins/brizy/public/editor-client/src/utils/



?? Go up: /home/webdevt/www/wdp/wp-content/plugins/brizy/public/editor-client/src

?? Viewing: throwOnNullish.ts

import { isNullish } from "./isNullish";
import { MValue } from "./types";

export const throwOnNullish =
  <T>(msg: string) =>
  (t: MValue<T>): T => {
    if (isNullish(t)) {
      throw new Error(msg);
    }

    return t;
  };


??

??