/** * Runs a function on an item then returns the item, similarly to Kotlin's apply * function (https://kotlinlang.org/docs/scope-functions.html#apply). Great for * modifying properties on an item you just created in situations where you need * to write the whole block as an expression. * @param item The item to run the function on. * @param func The function to run on the item. */ export declare function apply(item: T, func: (item: T) => void): T; /** * A type guard for nulls. Useful for `array.filter(nonNull)` to get correct * Typescript type. * @param value The value that might be null. */ export declare function nonNull(value: T | null): value is T; /** * Promises the value won't be null. Throws if it is. Should be used to stop * typescript yelling at you when you're ABSOLUTELY SURE this value CANNOT be * null. * @param val The value. */ export declare function itsOk(val: T | undefined | null): T; /** * Returns true if both items equal, even if that's because both are null. * @param a The first value. * @param b The second value. * @param equalsFunc When the values are non-null, this checks if they're equal. */ export declare function nullableEquals(a: T | null, b: T | null, equalsFunc: (a: T, b: T) => boolean): boolean;