UNPKG

593 BTypeScriptView Raw
1// Type definitions for requires-port 1.0
2// Project: https://github.com/unshiftio/requires-port
3// Definitions by: BendingBender <https://github.com/BendingBender>
4// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
6export = requiresPort;
7
8declare function requiresPort(port: string | number, protocol: requiresPort.Protocol): boolean;
9declare function requiresPort(port: string | number, protocol: string): boolean; // tslint:disable-line:unified-signatures
10
11declare namespace requiresPort {
12 type Protocol = 'http' | 'https' | 'ws' | 'wss' | 'ftp' | 'gopher' | 'file';
13}