MCPcopy
hub / github.com/sveltejs/svelte / unmount

Function unmount

packages/svelte/src/internal/client/render.js:317–334  ·  view source on GitHub ↗
(component, options)

Source from the content-addressed store, hash-verified

315 * @returns {Promise<void>}
316 */
317export function unmount(component, options) {
318 const fn = mounted_components.get(component);
319
320 if (fn) {
321 mounted_components.delete(component);
322 return fn(options);
323 }
324
325 if (DEV) {
326 if (STATE_SYMBOL in component) {
327 w.state_proxy_unmount();
328 } else {
329 w.lifecycle_double_unmount();
330 }
331 }
332
333 return Promise.resolve();
334}

Callers 1

constructorMethod · 0.90

Calls 3

fnFunction · 0.50
getMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected