@types/range-parser
TypeScript definitions for range-parser
Last updated 3 years ago by types .
MIT · Repository · Original npm · Tarball · package.json
$ gnpm install @types/range-parser 
SYNC missed versions from official npm registry.

Installation

npm install --save @types/range-parser

Summary

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

Details

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

index.d.ts

// Type definitions for range-parser 1.2
// Project: https://github.com/jshttp/range-parser
// Definitions by: Tomek Łaziuk <https://github.com/tlaziuk>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/**
 * When ranges are returned, the array has a "type" property which is the type of
 * range that is required (most commonly, "bytes"). Each array element is an object
 * with a "start" and "end" property for the portion of the range.
 *
 * @returns `-1` when unsatisfiable and `-2` when syntactically invalid, ranges otherwise.
 */
declare function RangeParser(size: number, str: string, options?: RangeParser.Options): RangeParser.Result | RangeParser.Ranges;

declare namespace RangeParser {
    interface Ranges extends Array<Range> {
        type: string;
    }
    interface Range {
        start: number;
        end: number;
    }
    interface Options {
        /**
         * The "combine" option can be set to `true` and overlapping & adjacent ranges
         * will be combined into a single range.
         */
        combine?: boolean | undefined;
    }
    type ResultUnsatisfiable = -1;
    type ResultInvalid = -2;
    type Result = ResultUnsatisfiable | ResultInvalid;
}

export = RangeParser;

Additional Details

  • Last updated: Wed, 07 Jul 2021 17:02:53 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Tomek Łaziuk.

Current Tags

  • 1.2.4                                ...           latest (3 years ago)
  • 1.2.3                                ...           ts2.0 (6 years ago)
  • 1.2.3                                ...           ts2.1 (6 years ago)
  • 1.2.3                                ...           ts2.2 (6 years ago)
  • 1.2.3                                ...           ts2.3 (6 years ago)
  • 1.2.3                                ...           ts2.4 (6 years ago)
  • 1.2.3                                ...           ts2.5 (6 years ago)
  • 1.2.3                                ...           ts2.6 (6 years ago)
  • 1.2.3                                ...           ts2.7 (6 years ago)
  • 1.2.3                                ...           ts2.8 (6 years ago)
  • 1.2.3                                ...           ts2.9 (6 years ago)
  • 1.2.3                                ...           ts3.0 (6 years ago)
  • 1.2.3                                ...           ts3.1 (6 years ago)
  • 1.2.3                                ...           ts3.2 (6 years ago)
  • 1.2.3                                ...           ts3.3 (6 years ago)
  • 1.2.3                                ...           ts3.4 (6 years ago)
  • 1.2.3                                ...           ts3.5 (6 years ago)
  • 1.2.4                                ...           ts3.6 (3 years ago)
  • 1.2.4                                ...           ts3.7 (3 years ago)
  • 1.2.4                                ...           ts3.8 (3 years ago)
  • 1.2.4                                ...           ts3.9 (3 years ago)
  • 1.2.4                                ...           ts4.0 (3 years ago)
  • 1.2.4                                ...           ts4.1 (3 years ago)
  • 1.2.4                                ...           ts4.2 (3 years ago)
  • 1.2.4                                ...           ts4.3 (3 years ago)
  • 1.2.4                                ...           ts4.4 (3 years ago)
  • 1.2.4                                ...           ts4.5 (3 years ago)
  • 1.2.4                                ...           ts4.6 (3 years ago)
  • 1.2.4                                ...           ts4.7 (3 years ago)
  • 1.2.4                                ...           ts4.8 (3 years ago)
  • 1.2.4                                ...           ts4.9 (3 years ago)
  • 1.2.4                                ...           ts5.0 (3 years ago)
  • 1.2.4                                ...           ts5.1 (3 years ago)

5 Versions

  • 1.2.4                                ...           3 years ago
  • 1.2.3                                ...           6 years ago
  • 1.2.2                                ...           7 years ago
  • 1.2.1                                ...           8 years ago
  • 1.2.0                                ...           8 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None

Copyright 2013 - present © cnpmjs.org | Home |