INIT
CI / build (push) Has been skipped
CI / deploy (push) Successful in 1m11s

This commit is contained in:
eewing
2026-02-18 15:17:47 -06:00
parent e74c106f85
commit ec317eb17c
11532 changed files with 1631690 additions and 1 deletions
+1
View File
@@ -0,0 +1 @@
export * from "./is-mounted.svelte.js";
+1
View File
@@ -0,0 +1 @@
export * from "./is-mounted.svelte.js";
+11
View File
@@ -0,0 +1,11 @@
/**
* Returns an object with the mounted state of the component
* that invokes this function.
*
* @see {@link https://runed.dev/docs/utilities/is-mounted}
*/
export declare class IsMounted {
#private;
constructor();
get current(): boolean;
}
+21
View File
@@ -0,0 +1,21 @@
import { untrack } from "svelte";
/**
* Returns an object with the mounted state of the component
* that invokes this function.
*
* @see {@link https://runed.dev/docs/utilities/is-mounted}
*/
export class IsMounted {
#isMounted = $state(false);
constructor() {
$effect(() => {
untrack(() => (this.#isMounted = true));
return () => {
this.#isMounted = false;
};
});
}
get current() {
return this.#isMounted;
}
}