@augmentcode/ag-redux-toolkit
Version:
Redux + Saga state management for Svelte apps — designed for AI agents. Includes runtime TypeScript source, AI skills, and reference documentation for robust, observable, high-performance state management.
20 lines • 899 B
TypeScript
/**
* Asserts that a value is not null or undefined, throwing an error if it is.
* This is a type guard that narrows the type to exclude null and undefined.
*
* @param value - The value to check
* @returns The value with null and undefined excluded from its type
* @throws Error if the value is null or undefined
*/
export declare const assertValue: <T>(value: T) => NonNullable<T>;
/**
* Removes a key from an object immutably without using `delete`.
* Using destructuring instead of `delete` avoids V8 de-optimization
* that can occur when objects have properties deleted.
*
* @param obj - The object to remove the key from
* @param key - The key to remove
* @returns A new object without the specified key, or the original object if key doesn't exist
*/
export declare function omitKey<T extends Record<string, unknown>>(obj: T, key: string): T;
//# sourceMappingURL=utils.d.ts.map