fix some todos

This commit is contained in:
Kyle Buzby
2018-03-11 21:13:02 -05:00
parent 45b3a22d74
commit fd99d9184e
2 changed files with 9 additions and 10 deletions
+3 -3
View File
@@ -186,9 +186,9 @@ export class Collection extends ItemGroup<Request> {
constructor(definition?: CollectionDefinition, environments?: any[]);
syncVariablesFrom(obj: any, track?: boolean): any;
syncVariablesFrom(obj: {[key: string]: VariableDefinition}, track?: boolean, prune?: boolean): {created: string[], updated: string[], deleted: string[]} | undefined;
syncVariablesTo(obj: any): any;
syncVariablesTo(obj?: {[key: string]: VariableDefinition}): {[key: string]: VariableDefinition};
toJSON(): CollectionDefinition;
@@ -466,7 +466,7 @@ export class Request extends Property<RequestDefinition> implements RequestDefin
removeHeader(toRemove: string | Header, options?: {ignoreCase: boolean}): void;
removeQueryParams(params: string | string[] | QueryParamDefinition[]): void;
removeQueryParams(params: string | string[] | QueryParamDefinition[] | QueryParamDefinition): void;
toJSON(): RequestDefinition;
@@ -164,13 +164,12 @@ collection = new pmCollection.Collection({}, []);
collection.events; // $ExpectType EventList
collection.variables; // $ExpectType VariableList
collection.version; // $ExpectType Version | undefined
// TODO update when get to VariableList
collection.syncVariablesFrom({}); // $ExpectType any
// TODO update
collection.syncVariablesFrom({}, true); // ExpectType any
// TODO update
collection.syncVariablesTo({}); // ExpectType any
collection.syncVariablesFrom({}); // $ExpectType { created: string[]; updated: string[]; deleted: string[]; } | undefined
collection.syncVariablesFrom({}, true); // $ExpectType { created: string[]; updated: string[]; deleted: string[]; } | undefined
collection.syncVariablesTo({}); // ExpectType $ExpectType { [key: string]: VariableDefinition; }
collection.toJSON(); // $ExpectType CollectionDefinition
pmCollection.Collection.isCollection(collection); // $ExpectType boolean
@@ -492,10 +491,10 @@ req.upsertHeader(headerDef); // $ExpectType void
req.addQueryParams("string"); // $ExpectType void
req.addQueryParams([qpDef]); // $ExpectType void
// TODO check these - they might also need plain qpDef as a parameter
req.removeQueryParams("string"); // $ExpectType void
req.removeQueryParams(["string"]); // $ExpectType void
req.removeQueryParams([qpDef]); // $ExpectType void
req.removeQueryParams(qpDef); // $ExpectType void
req.toJSON(); // $ExpectType RequestDefinition