//#region src/internal.d.ts declare const stableBrand: unique symbol; //#endregion //#region src/core.d.ts /** A JavaScript primitive, whose equality is already value-based. */ type Primitive = bigint | boolean | null | number | string | symbol | undefined; type StableMarker = { readonly [stableBrand]: true; }; /** * Proof that an object or function has a stable identity. Primitives pass * through unchanged because React and Preact compare them by value. */ type Stable = T extends object ? T & StableMarker : T; /** A value that is safe to put in a hook dependency list. */ type StableDependency = Primitive | (object & StableMarker); /** A dependency list containing only primitives or proven-stable references. */ type StableDeps = readonly StableDependency[]; /** * Bless a value whose lifetime is already stable, such as a module-scope * constant. Calls should remain at module scope. */ declare function stable(value: T): Stable; //#endregion export { stable as a, StableDeps as i, Stable as n, StableDependency as r, Primitive as t };