npm.io
2.0.3 • Published 2 years ago

@types/protocols

Licence
MIT
Version
2.0.3
Deps
1
Size
3 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/protocols

Summary

This package contains type definitions for protocols (https://github.com/IonicaBizau/protocols).

Details

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

index.d.ts

/// <reference types="node" />

import { URL } from "url";

/**
 * @param input The input url.
 * @param first If `true`, the first protocol will be returned. If number, it will represent the zero-based index of the protocols array.
 * @returns The array of protocols or the specified protocol.
 */
declare function protocols(input: string | URL, first: true | number): string;
declare function protocols(input: string | URL, first?: false): string[];

export = protocols;

Additional Details

  • Last updated: Tue, 07 Nov 2023 0939 GMT
  • Dependencies: @types/node

Credits

These definitions were written by Florian Imdahl.