1 | import { Option, PresentArray } from '@glimmer/interfaces';
|
2 | export declare function isPresent<T>(list: readonly T[]): list is PresentArray<T>;
|
3 | export declare function ifPresent<T, U, V>(list: T[], ifPresent: (input: PresentArray<T>) => U, otherwise: () => V): U | V;
|
4 | export declare function toPresentOption<T>(list: T[]): Option<PresentArray<T>>;
|
5 | export declare function assertPresent<T>(list: T[], message?: string): asserts list is PresentArray<T>;
|
6 | export declare function mapPresent<T, U>(list: PresentArray<T>, callback: (input: T) => U): PresentArray<U>;
|
7 | export declare function mapPresent<T, U>(list: PresentArray<T> | null, callback: (input: T) => U): PresentArray<U> | null;
|
8 |
|
\ | No newline at end of file |