apply suggestion from review

effect-active
ComputerGuy 2 months ago
parent ab91795ac8
commit 3345ed0782

@ -41,8 +41,3 @@ export const ELEMENT_NODE = 1;
export const TEXT_NODE = 3; export const TEXT_NODE = 3;
export const COMMENT_NODE = 8; export const COMMENT_NODE = 8;
export const DOCUMENT_FRAGMENT_NODE = 11; export const DOCUMENT_FRAGMENT_NODE = 11;
export const VALID_EFFECT_PARENT = 0;
export const EFFECT_ORPHAN = 1;
export const UNOWNED_DERIVED_PARENT = 2;
export const EFFECT_TEARDOWN = 3;

@ -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.

Loading…
Cancel
Save