import { OperatorFunction } from 'rxjs'; /** * Creates an operator function that throws an error if the source Observable emits an empty value. * * This function is a higher-order function that returns an operator function specifically designed to be used with Observables. * When applied to an Observable, the operator function checks each emitted value, and if any value is `null` or `undefined`, * it throws an error with the provided message. This ensures that the resulting Observable only emits non-nullable values. * * @param {string} message - The error message to be thrown if the Observable emits an empty value. * @returns {OperatorFunction>} An operator function that can be applied to an Observable of type T, * resulting in an Observable of type NonNullable. * * @template T - The type of items emitted by the source Observable. * * @example * // Usage with an RxJS Observable * import { of } from 'rxjs'; * import { throwIfEmpty } from './path/to/this/function'; * * const source$ = of(null); * const result$ = source$.pipe(throwIfEmpty('Value cannot be empty')); * result$.subscribe({ * next: value => console.log(value), * error: err => console.error(err) * }); */ export declare function throwIfEmpty(message: string): OperatorFunction>;