UNPKG

@sv-use/core

Version:

A collection of Svelte 5 utilities.

9 lines (8 loc) 522 B
import type { Getter } from './types.js'; export declare const noop: () => void; export declare function toArray<T>(v: T): T extends Array<unknown> ? T : T[]; /** If function, return function value. Else, return value. */ export declare function normalizeValue<T>(v: T | Getter<T>): T; /** `true` if the value is not `null` nor `undefined`. `false` otherwise. */ export declare function notNullish<T>(v: T | null | undefined): v is T; export declare function asyncEffectRoot(cb: () => Promise<void>): () => Promise<void>;