MCPcopy Create free account
hub / github.com/activejs/activejs / checkAsyncSystemConfig

Function checkAsyncSystemConfig

packages/core/src/checks/common.ts:6–20  ·  view source on GitHub ↗
(config: AsyncSystemConfig<any, any, any>)

Source from the content-addressed store, hash-verified

4import {logWarn} from '../utils/logger';
5
6export function checkAsyncSystemConfig(config: AsyncSystemConfig<any, any, any>): () => void {
7 if (config) {
8 if (config.clearDataOnError === true && config.clearDataOnQuery === true) {
9 return logWarn(`When "clearDataOnQuery" is set to true,
10"clearDataOnError" stops working, as only one of them can work at a time\n
11Consider only setting one at a time.`);
12 }
13 if (config.clearErrorOnData === true && config.clearErrorOnQuery === true) {
14 return logWarn(`When "clearErrorOnQuery" is set to true,
15"clearErrorOnData" stops working, as only one of them can work at a time\n
16Consider only setting one at a time.`);
17 }
18 }
19 return NOOP;
20}
21
22export function checkSerializability<T>(o: T): void {
23 const [serializable, nonSerializableVal] = isSerializable(o);

Callers 2

constructorMethod · 0.90
extras.spec.tsFile · 0.90

Calls 1

logWarnFunction · 0.90

Tested by

no test coverage detected