MCPcopy Create free account
hub / github.com/alibaba/lowcode-engine / invariant

Function invariant

packages/utils/src/misc.ts:104–108  ·  view source on GitHub ↗
(check: any, message: string, thing?: any)

Source from the content-addressed store, hash-verified

102}
103
104export function invariant(check: any, message: string, thing?: any) {
105 if (!check) {
106 throw new Error(`Invariant failed: ${ message }${thing ? ` in '${thing}'` : ''}`);
107 }
108}
109
110export function deprecate(fail: any, message: string, alterative?: string) {
111 if (fail) {

Callers 1

misc.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…