mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Added type definitions for proxy-from-env 1.0 (#35881)
This commit is contained in:
parent
d38d5b4a42
commit
26bc39581d
13
types/proxy-from-env/index.d.ts
vendored
Normal file
13
types/proxy-from-env/index.d.ts
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
// Type definitions for proxy-from-env 1.0
|
||||
// Project: https://github.com/Rob--W/proxy-from-env#readme
|
||||
// Definitions by: JasonHK <https://github.com/JasonHK>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* Takes an input URL and returns the desired proxy URL. If no proxy is set, an
|
||||
* empty string is returned.
|
||||
* @param url The URL
|
||||
* @returns The URL of the proxy that should handle the request to the given
|
||||
* URL.
|
||||
*/
|
||||
export function getProxyForUrl(url: string): string;
|
||||
4
types/proxy-from-env/proxy-from-env-tests.ts
Normal file
4
types/proxy-from-env/proxy-from-env-tests.ts
Normal file
@ -0,0 +1,4 @@
|
||||
import { getProxyForUrl } from "proxy-from-env";
|
||||
|
||||
// $ExpectType string
|
||||
getProxyForUrl("http://microsoft.github.io/TypeSearch/");
|
||||
23
types/proxy-from-env/tsconfig.json
Normal file
23
types/proxy-from-env/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"proxy-from-env-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/proxy-from-env/tslint.json
Normal file
1
types/proxy-from-env/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user