@types/statuses
TypeScript definitions for statuses
Last updated 10 months ago by types .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @types/statuses 
SYNC missed versions from official npm registry.

Installation

npm install --save @types/statuses

Summary

This package contains type definitions for statuses (https://github.com/jshttp/statuses).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/statuses.

index.d.ts

type NumericAscii = "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "0";
type NonNumericAscii<S> = S extends `${NumericAscii}` ? never : any;

type IsNumericString<S extends string> = S extends `${number}` ? any : never;

type IsNonNumericString<S extends string> = S extends `${NonNumericAscii<S>}${infer _}` ? any : never;

export = status;

declare const status: status;

interface status {
    (code: number): string;
    <S extends string>(code: S): status.Result<S>;

    codes: number[];
    code: { [msg: string]: number | undefined };
    empty: { [code: number]: boolean | undefined };
    message: { [code: number]: string | undefined };
    redirect: { [code: number]: boolean | undefined };
    retry: { [code: number]: boolean | undefined };
}

declare namespace status {
    type Result<S extends string> = S extends IsNumericString<S> ? string
        : S extends IsNonNumericString<S> ? number
        : string | number;
}

Additional Details

  • Last updated: Sat, 07 Jun 2025 02:15:25 GMT
  • Dependencies: none

Credits

These definitions were written by Tanguy Krotoff, BendingBender, and Sebastian Beltran.

Current Tags

  • 2.0.6                                ...           latest (10 months ago)
  • 1.5.0                                ...           ts2.0 (7 years ago)
  • 1.5.0                                ...           ts2.1 (7 years ago)
  • 1.5.0                                ...           ts2.2 (7 years ago)
  • 1.5.0                                ...           ts2.3 (7 years ago)
  • 1.5.0                                ...           ts2.4 (7 years ago)
  • 1.5.0                                ...           ts2.5 (7 years ago)
  • 1.5.0                                ...           ts2.6 (7 years ago)
  • 1.5.0                                ...           ts2.7 (7 years ago)
  • 1.5.0                                ...           ts2.8 (7 years ago)
  • 1.5.0                                ...           ts2.9 (7 years ago)
  • 2.0.0                                ...           ts3.0 (6 years ago)
  • 2.0.0                                ...           ts3.1 (6 years ago)
  • 2.0.0                                ...           ts3.2 (6 years ago)
  • 2.0.0                                ...           ts3.3 (6 years ago)
  • 2.0.0                                ...           ts3.4 (6 years ago)
  • 2.0.0                                ...           ts3.5 (6 years ago)
  • 2.0.0                                ...           ts3.6 (6 years ago)
  • 2.0.0                                ...           ts3.7 (6 years ago)
  • 2.0.0                                ...           ts3.8 (6 years ago)
  • 2.0.0                                ...           ts3.9 (6 years ago)
  • 2.0.0                                ...           ts4.0 (6 years ago)
  • 2.0.0                                ...           ts4.1 (6 years ago)
  • 2.0.0                                ...           ts4.2 (6 years ago)
  • 2.0.0                                ...           ts4.3 (6 years ago)
  • 2.0.0                                ...           ts4.4 (6 years ago)
  • 2.0.0                                ...           ts4.5 (6 years ago)
  • 2.0.0                                ...           ts4.6 (6 years ago)
  • 2.0.5                                ...           ts4.7 (2 years ago)
  • 2.0.5                                ...           ts4.8 (2 years ago)
  • 2.0.5                                ...           ts4.9 (2 years ago)
  • 2.0.5                                ...           ts5.0 (2 years ago)
  • 2.0.6                                ...           ts5.1 (10 months ago)
  • 2.0.6                                ...           ts5.2 (10 months ago)
  • 2.0.6                                ...           ts5.3 (10 months ago)
  • 2.0.6                                ...           ts5.4 (10 months ago)
  • 2.0.6                                ...           ts5.5 (10 months ago)
  • 2.0.6                                ...           ts5.6 (10 months ago)
  • 2.0.6                                ...           ts5.7 (10 months ago)
  • 2.0.6                                ...           ts5.8 (10 months ago)
  • 2.0.6                                ...           ts5.9 (10 months ago)
  • 2.0.6                                ...           ts6.0 (10 months ago)

24 Versions

  • 1.5.4                                ...           10 months ago
  • 2.0.6                                ...           10 months ago
  • 2.0.5                                ...           2 years ago
  • 1.5.3                                ...           2 years ago
  • 2.0.4                                ...           2 years ago
  • 1.5.2                                ...           2 years ago
  • 2.0.3                                ...           2 years ago
  • 2.0.2                                ...           3 years ago
  • 2.0.1                                ...           3 years ago
  • 1.5.1                                ...           6 years ago
  • 2.0.0                                ...           6 years ago
  • 1.5.0                                ...           7 years ago
  • 1.3.0                                ...           9 years ago
  • 1.2.28                                ...           10 years ago
  • 1.2.27                                ...           10 years ago
  • 1.2.26-alpha                                ...           10 years ago
  • 1.2.25-alpha                                ...           10 years ago
  • 1.2.24-alpha                                ...           10 years ago
  • 1.2.23-alpha                                ...           10 years ago
  • 1.2.22-alpha                                ...           10 years ago
  • 1.2.21-alpha                                ...           10 years ago
  • 1.2.20-alpha                                ...           10 years ago
  • 1.2.15-alpha                                ...           10 years ago
  • 1.2.14-alpha                                ...           10 years ago
Maintainers (1)
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
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |