import { ProviderToken } from '@angular/core'; import { Observable } from 'rxjs'; import { Logger } from '../angular-terminal/logger'; export type TODO = any; /** * @example * TODO: use Assert.ts instead * assert(false, "throw this error message") * assert(true, "nothing happens") * @deprecated */ export declare function assert(condition?: any, message?: any): void; /** * Stops the execution and opens the debugger. */ export declare function assertDebug(condition?: any): void; export declare const filterNulls: import("rxjs").MonoTypeOperatorFunction; export declare function longest(array: any): any; export declare function moveToLast(array: any, item: any): any; export declare function removeLastMatch(array: any, item: any): any; export declare function remove(array: Array, item: T): T[]; export declare function last(array: any): any; /** * Loop over an object [key,value] and the key or the value. * Creates a new object. * If `undefined` is returned, the key is removed from the object. */ export declare function mapKeyValue(object: any, func: (key: any, value: any) => [key: string, value: any] | undefined): {}; export interface AnyObject { [prop: string]: any; } /** * Waits for an observable to become "truthy" * @example await waitFor(observable) */ export declare function waitFor(observable: Observable): Promise; /** * Listens for changes on a property and exposes it as a Signal. * Replaces the property with a getter/setter so it can detect changes. * * Example: listens for a property `text` and creates an Signal `$text`. * ```ts * this.text = 'blabla' * this.$text = new BehaviorSubject(null) * inputToSignal(this, 'text', '$text') * ``` */ export declare function inputToSignal(_component: T, key: K, signalKey: K): void; export type InjectFunction = (token: ProviderToken) => T; export declare function async(func: (...args: any[]) => T): Promise; export declare function detectInfiniteLoop(nb?: number): void; export declare function stringifyReplacer({ depth }?: { depth?: number; }): (key: any, value: any) => any; export declare function removeFromArray(array: any, item: any): any[]; export declare function logError(logger: Logger, thing: any): void; export declare function unwrapIfSignal(value: any): any; export declare function unwrapIfFunction(value: any): any;