chore(comments): dep changed from set to map (#10019) [ci skip]

This commit is contained in:
LiuSeen 2024-01-08 14:19:07 +08:00 committed by GitHub
parent 78f8db78bd
commit 96fffe6ec3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ import {
// The main WeakMap that stores {target -> key -> dep} connections. // The main WeakMap that stores {target -> key -> dep} connections.
// Conceptually, it's easier to think of a dependency as a Dep class // Conceptually, it's easier to think of a dependency as a Dep class
// which maintains a Set of subscribers, but we simply store them as // which maintains a Set of subscribers, but we simply store them as
// raw Sets to reduce memory overhead. // raw Maps to reduce memory overhead.
type KeyToDepMap = Map<any, Dep> type KeyToDepMap = Map<any, Dep>
const targetMap = new WeakMap<object, KeyToDepMap>() const targetMap = new WeakMap<object, KeyToDepMap>()