|
|
@ -33,11 +33,7 @@ import {
|
|
|
|
EFFECT_PRESERVED,
|
|
|
|
EFFECT_PRESERVED,
|
|
|
|
STALE_REACTION,
|
|
|
|
STALE_REACTION,
|
|
|
|
USER_EFFECT,
|
|
|
|
USER_EFFECT,
|
|
|
|
ASYNC,
|
|
|
|
ASYNC
|
|
|
|
EFFECT_ORPHAN,
|
|
|
|
|
|
|
|
EFFECT_TEARDOWN,
|
|
|
|
|
|
|
|
UNOWNED_DERIVED_PARENT,
|
|
|
|
|
|
|
|
VALID_EFFECT_PARENT
|
|
|
|
|
|
|
|
} from '#client/constants';
|
|
|
|
} from '#client/constants';
|
|
|
|
import * as e from '../errors.js';
|
|
|
|
import * as e from '../errors.js';
|
|
|
|
import { DEV } from 'esm-env';
|
|
|
|
import { DEV } from 'esm-env';
|
|
|
@ -47,6 +43,11 @@ import { component_context, dev_current_component_function, dev_stack } from '..
|
|
|
|
import { Batch, schedule_effect } from './batch.js';
|
|
|
|
import { Batch, schedule_effect } from './batch.js';
|
|
|
|
import { flatten } from './async.js';
|
|
|
|
import { flatten } from './async.js';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const VALID_EFFECT_PARENT = 0;
|
|
|
|
|
|
|
|
const EFFECT_ORPHAN = 1;
|
|
|
|
|
|
|
|
const UNOWNED_DERIVED_PARENT = 2;
|
|
|
|
|
|
|
|
const EFFECT_TEARDOWN = 3;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* If an effect can be created in the current context, `VALID_EFFECT_PARENT` is returned.
|
|
|
|
* If an effect can be created in the current context, `VALID_EFFECT_PARENT` is returned.
|
|
|
|
* If not, a value indicating why is returned.
|
|
|
|
* If not, a value indicating why is returned.
|
|
|
|