@param {K} key
(key)
| 94 | |
| 95 | /** @param {K} key */ |
| 96 | has(key) { |
| 97 | var sources = this.#sources; |
| 98 | var s = sources.get(key); |
| 99 | |
| 100 | if (s === undefined) { |
| 101 | if (super.has(key)) { |
| 102 | s = this.#source(0); |
| 103 | |
| 104 | if (DEV) { |
| 105 | tag(s, `SvelteMap get(${label(key)})`); |
| 106 | } |
| 107 | |
| 108 | sources.set(key, s); |
| 109 | } else { |
| 110 | // We should always track the version in case |
| 111 | // the Set ever gets this value in the future. |
| 112 | get(this.#version); |
| 113 | return false; |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | get(s); |
| 118 | return true; |
| 119 | } |
| 120 | |
| 121 | /** |
| 122 | * @param {(value: V, key: K, map: Map<K, V>) => void} callbackfn |