Feature: Basic Events, Models and Projections #2
@ -5,4 +5,5 @@ export * from "./result/index.js";
|
|||||||
export * from "./run/index.js";
|
export * from "./run/index.js";
|
||||||
export * from "./time/index.js";
|
export * from "./time/index.js";
|
||||||
export * from "./types/index.js";
|
export * from "./types/index.js";
|
||||||
|
export * from "./utils/index.js";
|
||||||
export * from "./variant/index.js";
|
export * from "./variant/index.js";
|
||||||
|
|||||||
8
packages/fabric/core/src/utils/ensure-value.ts
Normal file
8
packages/fabric/core/src/utils/ensure-value.ts
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import { UnexpectedError } from "../error/unexpected-error.js";
|
||||||
|
|
||||||
|
export function ensureValue<T>(value?: T): T {
|
||||||
|
if (!value) {
|
||||||
|
throw new UnexpectedError("Value is undefined");
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
1
packages/fabric/core/src/utils/index.ts
Normal file
1
packages/fabric/core/src/utils/index.ts
Normal file
@ -0,0 +1 @@
|
|||||||
|
export * from "./ensure-value.js";
|
||||||
Loading…
Reference in New Issue
Block a user