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.