From 14b13d7668321d56777470a93bee163cd18e5938 Mon Sep 17 00:00:00 2001 From: Alessio Coser <18616553+AlessioCoser@users.noreply.github.com> Date: Fri, 5 Apr 2024 16:49:13 +0200 Subject: [PATCH] rename MapSet to MapArray --- src/reactivity/utils/{MapSet.ts => MapArray.ts} | 2 +- src/reactivity/utils/Subscriptions.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) rename src/reactivity/utils/{MapSet.ts => MapArray.ts} (90%) diff --git a/src/reactivity/utils/MapSet.ts b/src/reactivity/utils/MapArray.ts similarity index 90% rename from src/reactivity/utils/MapSet.ts rename to src/reactivity/utils/MapArray.ts index 8385cea..55b4d00 100644 --- a/src/reactivity/utils/MapSet.ts +++ b/src/reactivity/utils/MapArray.ts @@ -1,4 +1,4 @@ -export class MapSet { +export class MapArray { private map = new Map(); addTo(key: K, newValue: V) { diff --git a/src/reactivity/utils/Subscriptions.ts b/src/reactivity/utils/Subscriptions.ts index a1563cf..4922512 100644 --- a/src/reactivity/utils/Subscriptions.ts +++ b/src/reactivity/utils/Subscriptions.ts @@ -1,10 +1,10 @@ -import { MapSet } from "./MapSet"; +import { MapArray } from "./MapArray"; import { Subscriber, _Signal } from "../types"; export class Subscriptions { private currentSubscriber: Subscriber | null = null; - private ancestors = new MapSet<_Signal, _Signal>(); - private subscriptions = new MapSet<_Signal, Subscriber>(); + private ancestors = new MapArray<_Signal, _Signal>(); + private subscriptions = new MapArray<_Signal, Subscriber>(); run(subscriber: Subscriber, fn: () => void): void { this.currentSubscriber = subscriber;