Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const eventList = new pmCollection.EventList(null, [event]);
eventList.listeners("string"); // $ExpectType Event[]
eventList.listenersOwn("string"); // $ExpectType Event[]
pmCollection.EventList.isEventList(eventList); // $ExpectType boolean
// FormParamDefinition Tests
const fpDef: pmCollection.FormParamDefinition = {};
fpDef.key; // $ExpectType string | undefined
fpDef.value; // $ExpectType any
// FormParam Tests
const fp = new pmCollection.FormParam(fpDef);
fp.key; // $ExpectType string
fp.value; // $ExpectType any
fp.toString(); // $ExpectType string
fp.valueOf(); // $ExpectType any
// HeaderDefinition Tests
const headerDef: pmCollection.HeaderDefinition = {
key: "string",
value: "string"
};
headerDef.key; // $ExpectType string | undefined
headerDef.value; // $ExpectType string | undefined
headerDef.system; // $ExpectType boolean | undefined
_.forEach(results, function (result) {
// Insert individual param above the current formparam
result && formdata.insert(new sdk.FormParam(_.assign(formparam.toJSON(), result)),
formparam);
});
_.forOwn(bodyData, (value, key) => {
if (encoding.hasOwnProperty(key)) {
_.forOwn(encoding[key].headers, (value, key) => {
if (key !== 'Content-Type') {
if (encoding[key].headers[key].hasOwnProperty('$ref')) {
encoding[key].headers[key] = getRefObject(encoding[key].headers[key].$ref);
}
encoding[key].headers[key].name = key;
formHeaders.push(this.convertToPmHeader(encoding[key].headers[key]));
}
});
}
if (typeof value === 'object') { value = JSON.stringify(value); }
param = new sdk.FormParam({
key: key,
value: value
});
paramArray.push(param);
});
updateOptions = {