UNPKG

monad-ts

Version:

Monad-ts is a small library implements some of key monads and way to chain them in a pipe (flow) in JavaScript and TypeScript. Angular 2+ compatible.

9 lines (8 loc) 276 B
/** * Decreasing the dimension of an array by n. * @method cast * @param {any} arr - input array. * @param {number} n - decreasing factor. * @return {Array<any>|T[]|Error} */ export declare function cast<T, U>(arr: any, n?: number): Array<T> | Array<U> | Error;