DefinitelyTyped/types/proxy-from-env/proxy-from-env-tests.ts
F.P 8d98dc86af
proxy-from-env: Add missing URL type for input parameter (#42447)
* Add missing type for input parameter

Allow `URL` objects as parameter (see https://github.com/Rob--W/proxy-from-env/blob/master/index.js#L24 )

* Update types and tests

* Add missing reference type
2020-02-19 11:20:34 -08:00

9 lines
247 B
TypeScript

import { getProxyForUrl } from "proxy-from-env";
import { parse } from "url";
// $ExpectType string
getProxyForUrl("http://microsoft.github.io/TypeSearch/");
// $ExpectType string
getProxyForUrl(parse("http://microsoft.github.io/TypeSearch/"));