type Tuple = N extends N ? number extends N ? T[] : TupleOf : never; type TupleOf = R["length"] extends N ? R : TupleOf; /** * Branches the given async iterable into the n branches. * * @example * ```ts * import { tee } from "https://deno.land/std@$STD_VERSION/async/tee.ts"; * * const gen = async function* gen() { * yield 1; * yield 2; * yield 3; * }; * * const [branch1, branch2] = tee(gen()); * * for await (const n of branch1) { * console.log(n); // => 1, 2, 3 * } * * for await (const n of branch2) { * console.log(n); // => 1, 2, 3 * } * ``` */ export declare function tee(iterable: AsyncIterable, n?: N): Tuple, N>; export {};