import type { Initial, IsomorphicIterable, ReadOnlyArray, } from "@vangware/types"; import type { GeneratorOutput } from "./types/GeneratorOutput.js"; import type { ReadOnlyIterableIterator } from "./types/ReadOnlyIterableIterator.js"; /** * Get all elements except the last one of an iterable or asynchronous iterable. * * @category Generators * @example * ```typescript * initial([1, 2, 3]); // [1, 2] * ``` * @param iterable Iterable to get the items from. * @returns Iterable with all items except the last one. */ export declare const initial: ( iterable: Iterable_1, ) => Iterable_1 extends ReadOnlyArray ? { readonly [Symbol.iterator]: () => IterableIterator< Initial[number] >; readonly next: ( ...args: [] | [undefined] ) => IteratorResult[number], any>; readonly return?: | (( value?: any, ) => IteratorResult[number], any>) | undefined; readonly throw?: | (( e?: any, ) => IteratorResult[number], any>) | undefined; } : GeneratorOutput;