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

Method isValidRuntime

packages/renderer-core/src/adapter/index.ts:61–73  ·  view source on GitHub ↗
(runtime: IRuntime)

Source from the content-addressed store, hash-verified

59 }
60
61 isValidRuntime(runtime: IRuntime) {
62 if (typeof runtime !== 'object' || Array.isArray(runtime)) {
63 return false;
64 }
65
66 return this.builtinModules.every((m) => {
67 const flag = !!runtime[m];
68 if (!flag) {
69 throw new Error(`runtime is invalid, module '${m}' does not exist`);
70 }
71 return flag;
72 });
73 }
74
75 getRuntime() {
76 return this.runtime;

Callers 2

setRuntimeMethod · 0.95
adapter.test.tsFile · 0.80

Calls 1

everyMethod · 0.65

Tested by

no test coverage detected