Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
item.getEvents(); // $ExpectType Event[]
item.getEvents("string"); // $ExpectType Event[]
pmCollection.Item.isItem(item); // $ExpectType boolean
// ProxyConfigDefinition Tests
const proxyConfDef: pmCollection.ProxyConfigDefinition = {};
proxyConfDef.match; // $ExpectType string | { pattern: string; } | UrlMatchPattern | undefined
proxyConfDef.host; // $ExpectType string | undefined
proxyConfDef.port; // $ExpectType number | undefined
proxyConfDef.tunnel; // $ExpectType boolean | undefined
// ProxyConfig Tests
let proxyConf = new pmCollection.ProxyConfig();
proxyConf = new pmCollection.ProxyConfig(proxyConfDef);
proxyConf.host; // $ExpectType string
proxyConf.match; // $ExpectType UrlMatchPattern
proxyConf.port; // $ExpectType number
proxyConf.tunnel; // $ExpectType boolean
proxyConf.getProtocols(); // $ExpectType string[]
proxyConf.getProxyUrl(); // $ExpectType string
proxyConf.test("string"); // $ExpectType boolean
proxyConf.update(proxyConfDef); // $ExpectType void
proxyConf.updateProtocols(["string"]); // $ExpectType void
item.getEvents("string"); // $ExpectType Event[]
pmCollection.Item.isItem(item); // $ExpectType boolean
// ProxyConfigDefinition Tests
const proxyConfDef: pmCollection.ProxyConfigDefinition = {};
proxyConfDef.match; // $ExpectType string | { pattern: string; } | UrlMatchPattern | undefined
proxyConfDef.host; // $ExpectType string | undefined
proxyConfDef.port; // $ExpectType number | undefined
proxyConfDef.tunnel; // $ExpectType boolean | undefined
// ProxyConfig Tests
let proxyConf = new pmCollection.ProxyConfig();
proxyConf = new pmCollection.ProxyConfig(proxyConfDef);
proxyConf.host; // $ExpectType string
proxyConf.match; // $ExpectType UrlMatchPattern
proxyConf.port; // $ExpectType number
proxyConf.tunnel; // $ExpectType boolean
proxyConf.getProtocols(); // $ExpectType string[]
proxyConf.getProxyUrl(); // $ExpectType string
proxyConf.test("string"); // $ExpectType boolean
proxyConf.update(proxyConfDef); // $ExpectType void
proxyConf.updateProtocols(["string"]); // $ExpectType void
], function (err, config) {
if (err) {
run.triggers.console(context.coords, 'warn', 'proxy lookup error: ' + (err.message || err));
}
config && (request.proxy = sdk.ProxyConfig.isProxyConfig(config) ? config : new sdk.ProxyConfig(config));
return done();
});
},