renamed NOTIFY_WITH_ALL_PARAMS to NOTIFY_WITH_ALL_REGISTERED_PARAMS

pull/11504/head
godzylinux 2 years ago committed by FoHoOV
parent 968d0d6e0d
commit 353184c2ba

@ -1,4 +1,4 @@
import { make_reactive, NOTIFY_WITH_ALL_PARAMS } from './utils.js'; import { make_reactive, NOTIFY_WITH_ALL_REGISTERED_PARAMS } from './utils.js';
export const ReactiveMap = make_reactive(Map, { export const ReactiveMap = make_reactive(Map, {
write_properties: ['clear', 'delete', 'set'], write_properties: ['clear', 'delete', 'set'],
@ -18,7 +18,7 @@ export const ReactiveMap = make_reactive(Map, {
if (value.size === 0) { if (value.size === 0) {
return false; return false;
} }
notify_read_properties(['get', 'keys', 'has'], NOTIFY_WITH_ALL_PARAMS); notify_read_properties(['get', 'keys', 'has'], NOTIFY_WITH_ALL_REGISTERED_PARAMS);
return true; return true;
}, },
delete: (notify_read_properties, value, property, ...params) => { delete: (notify_read_properties, value, property, ...params) => {

@ -1,4 +1,4 @@
import { make_reactive, NOTIFY_WITH_ALL_PARAMS } from './utils.js'; import { make_reactive, NOTIFY_WITH_ALL_REGISTERED_PARAMS } from './utils.js';
export const ReactiveSet = make_reactive(Set, { export const ReactiveSet = make_reactive(Set, {
write_properties: ['add', 'clear', 'delete'], write_properties: ['add', 'clear', 'delete'],
@ -15,7 +15,7 @@ export const ReactiveSet = make_reactive(Set, {
if (value.size == 0) { if (value.size == 0) {
return false; return false;
} }
notify_read_properties(['has'], NOTIFY_WITH_ALL_PARAMS); notify_read_properties(['has'], NOTIFY_WITH_ALL_REGISTERED_PARAMS);
return true; return true;
}, },
delete: (notify_read_properties, value, property, ...params) => { delete: (notify_read_properties, value, property, ...params) => {

@ -2,7 +2,7 @@ import { DEV } from 'esm-env';
import { source, set } from '../internal/client/reactivity/sources.js'; import { source, set } from '../internal/client/reactivity/sources.js';
import { get } from '../internal/client/runtime.js'; import { get } from '../internal/client/runtime.js';
export const NOTIFY_WITH_ALL_PARAMS = Symbol(); export const NOTIFY_WITH_ALL_REGISTERED_PARAMS = Symbol();
export const INTERNAL_OBJECT = Symbol(); export const INTERNAL_OBJECT = Symbol();
/** /**
@ -253,7 +253,7 @@ function notify_read_properties(
`when trying to notify reactions got a read method that wasn't defined in options: ${name.toString()}` `when trying to notify reactions got a read method that wasn't defined in options: ${name.toString()}`
); );
} }
if (params.length == 1 && params[0] == NOTIFY_WITH_ALL_PARAMS) { if (params.length == 1 && params[0] == NOTIFY_WITH_ALL_REGISTERED_PARAMS) {
read_methods_signals.get(name)?.forEach((sig) => { read_methods_signals.get(name)?.forEach((sig) => {
increment_signal(initial_version_signal_v, version_signal, sig); increment_signal(initial_version_signal_v, version_signal, sig);
}); });

Loading…
Cancel
Save