@uxf/core 10.4.0 → 10.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxf/core",
3
- "version": "10.4.0",
3
+ "version": "10.10.0",
4
4
  "description": "UXF Core",
5
5
  "author": "Petr Vejvoda <vejvoda@uxf.cz>",
6
6
  "homepage": "https://gitlab.com/uxf-npm/core#readme",
@@ -0,0 +1,2 @@
1
+ import { Nullish } from "../types";
2
+ export declare function assertNotNil<T>(value: T | Nullish, errorMessage?: string): asserts value is T;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.assertNotNil = void 0;
4
+ const is_nil_1 = require("./is-nil");
5
+ function assertNotNil(value, errorMessage = "Value is nil.") {
6
+ if ((0, is_nil_1.isNil)(value)) {
7
+ throw new Error(errorMessage);
8
+ }
9
+ }
10
+ exports.assertNotNil = assertNotNil;