import { Option, PresentArray } from '@glimmer/interfaces'; export interface OptionalList { map(callback: (input: T) => U): MapList>; filter(predicate: (value: T, index: number, array: T[]) => value is S): AnyOptionalList; toArray(): T[]; toPresentArray(): Option>; into(options: { ifPresent: (array: PresentList) => U; ifEmpty: () => V; }): U | V; } export declare class PresentList implements OptionalList { readonly list: PresentArray; constructor(list: PresentArray); toArray(): PresentArray; map(callback: (input: T) => U): MapList>; filter(predicate: (value: T) => value is S): AnyOptionalList; toPresentArray(): PresentArray; into({ ifPresent }: { ifPresent: (array: PresentList) => U; ifEmpty: () => V; }): U | V; } export declare class EmptyList implements OptionalList { readonly list: T[]; map(_callback: (input: T) => U): MapList>; filter(_predicate: (value: T) => value is S): AnyOptionalList; toArray(): T[]; toPresentArray(): Option>; into({ ifEmpty }: { ifPresent: (array: PresentList) => U; ifEmpty: () => V; }): U | V; } export declare function OptionalList(value: readonly T[]): AnyOptionalList; export declare type AnyOptionalList = (PresentList | EmptyList) & OptionalList; export declare type MapList> = L extends PresentList ? PresentList : L extends EmptyList ? EmptyList : never; //# sourceMappingURL=list.d.ts.map