@types/fill-range

TypeScript definitions for fill-range

  • Types
  • ESM
  • CJS
License
MIT
Deps
0
Install Size
4.6 kB
Vulns
0
Published

Get started

$npm install @types/fill-range
$pnpm add @types/fill-range
$yarn add @types/fill-range
$bun add @types/fill-range
$deno add npm:@types/fill-range
$vlt install @types/fill-range
$vp add @types/fill-range
# Usually installed as a dev dependency
$npm install -D @types/fill-range
$pnpm add -D @types/fill-range
$yarn add -D @types/fill-range
$bun add -d @types/fill-range
$deno add -D npm:@types/fill-range
$vlt install -D @types/fill-range
$vp add -D @types/fill-range

Weekly DownloadsAcross all versions

Versions

View all versions
7.0.3
latestts4.5ts4.6ts4.7ts4.8ts4.9ts5.0ts5.1ts5.2ts5.3ts5.4ts5.5ts5.6ts5.7ts5.8ts5.9ts6.0
7.0.0
ts3.7ts3.8ts3.9ts4.0ts4.1ts4.2ts4.3ts4.4

Readme

Installation

npm install --save @types/fill-range

Summary

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

Details

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

index.d.ts

declare namespace fill {
    interface Options<ValueType, TransformValueType> {
        step?: number;
        strictRanges?: boolean;
        stringify?: boolean;
        toRegex?: boolean;
        transform?: (value: ValueType) => TransformValueType;
    }
}

type FilledArray<ValueType, TransformValueType> = ValueType extends TransformValueType ? ValueType[]
    : TransformValueType[];

declare function fill<
    ValueType = string | number,
    TransformValueType = unknown,
>(
    start: ValueType,
    end?: ValueType | null,
    step?: number,
    options?: fill.Options<ValueType, TransformValueType>,
): FilledArray<ValueType, TransformValueType>;

declare function fill<
    ValueType = string | number,
    TransformValueType = unknown,
>(
    start: ValueType,
    end?: ValueType | null,
    transformOrOptions?:
        | fill.Options<ValueType, TransformValueType>["transform"]
        | fill.Options<ValueType, TransformValueType>,
): FilledArray<ValueType, TransformValueType>;

export = fill;
Additional Details
  • Last updated: Tue, 07 Nov 2023 03:09:37 GMT
  • Dependencies: none

Credits

These definitions were written by Richie Bendall.