this is just incorrect

pull/10760/head
Rich Harris 3 years ago
parent bcaea0af44
commit d265f1b3f5

@ -1,12 +1,6 @@
import type { Block, ComponentContext, EqualsFunctions } from '#client'; import type { Block, ComponentContext, EqualsFunctions } from '#client';
import type { DERIVED, EFFECT, PRE_EFFECT, RENDER_EFFECT, SOURCE } from '../constants'; import type { DERIVED, EFFECT, PRE_EFFECT, RENDER_EFFECT, SOURCE } from '../constants';
export type SignalFlags =
| typeof SOURCE
| typeof DERIVED
| typeof EFFECT
| typeof PRE_EFFECT
| typeof RENDER_EFFECT;
export type EffectType = typeof EFFECT | typeof PRE_EFFECT | typeof RENDER_EFFECT; export type EffectType = typeof EFFECT | typeof PRE_EFFECT | typeof RENDER_EFFECT;
export interface Source<V = unknown> { export interface Source<V = unknown> {
@ -14,8 +8,8 @@ export interface Source<V = unknown> {
reactions: null | Reaction[]; reactions: null | Reaction[];
/** Equality function */ /** Equality function */
eq: EqualsFunctions; eq: EqualsFunctions;
/** flags: The types that the signal represent, as a bitwise value */ /** Flags bitmask */
f: SignalFlags; f: number;
/** value: The latest value for this signal */ /** value: The latest value for this signal */
v: V; v: V;
// write version // write version
@ -55,8 +49,8 @@ export type Effect = {
d: null | Value[]; d: null | Value[];
/** destroy: Thing(s) that need destroying */ /** destroy: Thing(s) that need destroying */
y: null | (() => void); y: null | (() => void);
/** The types that the signal represent, as a bitwise value */ /** Flags bitmask */
f: SignalFlags; f: number;
/** init: The function that we invoke for effects and computeds */ /** init: The function that we invoke for effects and computeds */
i: null | (() => void | (() => void)) | ((b: Block, s: Signal) => void | (() => void)); i: null | (() => void | (() => void)) | ((b: Block, s: Signal) => void | (() => void));
/** references: Anything that a signal owns */ /** references: Anything that a signal owns */

Loading…
Cancel
Save