/** * @packageDocumentation * @module std.ranges */ import { IForwardContainer } from "./IForwardContainer"; import { IReverseIterator } from "../../iterator/IReverseIterator"; import { IReversableIterator } from "../../iterator/IReversableIterator"; import { IPointer } from "../../functional/IPointer"; import { Vector } from "../../container/Vector"; /** * Bidirection iterable container. * * @template Iterator Iterator type * @author Jeongho Nam - https://github.com/samchon */ export interface IBidirectionalContainer, IteratorT, ReverseIteratorT>, ReverseIteratorT extends IReverseIterator, IteratorT, ReverseIteratorT>> extends IForwardContainer { /** * Reverse iterator to the first element in reverse. * * @return Reverse iterator to the first. */ rbegin(): ReverseIteratorT; /** * Reverse iterator to the reverse end. * * @return Reverse iterator to the end. */ rend(): ReverseIteratorT; } export declare namespace IBidirectionalContainer { /** * Deduct iterator type. */ type IteratorType | IBidirectionalContainer> = Container extends Array ? Vector.Iterator : Container extends IBidirectionalContainer ? Iterator : unknown; /** * Deduct reverse iterator type. */ type ReverseIteratorType | IBidirectionalContainer> = Container extends Array ? Vector.ReverseIterator : Container extends IBidirectionalContainer ? ReverseIterator : unknown; /** * Deduct value type. */ type ValueType | IBidirectionalContainer> = IPointer.ValueType>; } //# sourceMappingURL=IBidirectionalContainer.d.ts.map