@types/range-inclusive
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Installation

npm install --save @types/range-inclusive

Summary

This package contains type definitions for range-inclusive (https://github.com/emilbayes/range-inclusive).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/range-inclusive.

index.d.ts

export = rangeInclusive;

/**
 * Generate a closed range of numbers `[a, b]` with step size `d`.
 *
 * @example
 * import rangeInclusive = require('range-inclusive')
 *
 * rangeInclusive(10) // [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
 * rangeInclusive(3, 9, 3) // [3, 6, 9]
 * rangeInclusive(7, 5, -1) // [7, 6, 5]
 */
declare function rangeInclusive(stop: number): number[];
declare function rangeInclusive(
    /** @default 1 */
    start: number,
    stop: number,
    /** @default 1 */
    // tslint:disable-next-line unified-signatures
    stepSize?: number,
): number[];

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: none

Credits

These definitions were written by BendingBender.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/range-inclusive

Weekly Downloads

4

Version

1.0.2

License

MIT

Unpacked Size

3.74 kB

Total Files

5

Last publish

Collaborators

  • types