Function
push
packages/svelte/src/internal/client/context.js:177–194
· packages/svelte/src/internal/client/context.js::push
(props, runes = false, fn)
Source from the content-addressed store, hash-verified
| 175 | * @returns {void} |
| 176 | */ |
| 177 | export function push(props, runes = false, fn) { |
| 178 | component_context = { |
| 179 | p: component_context, |
| 180 | i: false, |
| 181 | c: null, |
| 182 | e: null, |
| 183 | s: props, |
| 184 | x: null, |
| 185 | r: /** @type {Effect} */ (active_effect), |
| 186 | l: legacy_mode_flag && !runes ? { s: null, u: null, $: [] } : null |
| 187 | }; |
| 188 | |
| 189 | if (DEV) { |
| 190 | class="cm">// component function |
| 191 | component_context.function = fn; |
| 192 | dev_current_component_function = fn; |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | /** |
| 197 | * @template {Record<string, any>} T |
Tested by
no test coverage detected