import { Code } from './ast/types'; /** Generate an integer series from 0 to `count` (non-inclusive). */ export declare const countTo: (count: number) => number[]; /** * @returns Generates a new object with the same keys as `src` and whose * values are the result of mapping `src`'s values with `func`. * * @todo : fix typings so that keys of SrcType appear in DestType. */ export declare const mapObject: (src: { [key: string]: SrcType; }, func: (value: SrcType, key: string, index: number) => DestType) => { [key: string]: DestType; }; /** * @param func Called for each element in `src`. Returns a pair `[, ]`. * @returns A new object whoses keys and values are the result of * applying `func` to each element in `src`. */ export declare const mapArray: (src: readonly SrcType[], func: (srcValue: SrcType, index: number) => [string, DestType]) => { [key: string]: DestType; }; /** * Renders one of several alternative bits of code. * * @param routes A list of alternatives `[, ]` * @returns The first `code` whose `test` evaluated to true. */ export declare const renderSwitch: (...routes: Array<[boolean, Code | Array]>) => string | string[];