Merge pull request #33099 from kbuzby/fix-pm-itemgroup-items

@types/postman-collection - Fix ItemGroup items to allow items to be ItemGroup<T>
This commit is contained in:
Mine Starks
2019-02-15 08:29:34 -08:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -154,7 +154,7 @@ export interface ItemGroupDefinition extends PropertyDefinition {
export class ItemGroup<TItem> extends Property<ItemGroupDefinition> {
auth?: RequestAuth;
items: PropertyList<TItem>;
items: PropertyList<TItem | ItemGroup<TItem>>;
events: EventList;
constructor(definition?: ItemGroupDefinition);
@@ -137,7 +137,7 @@ igDef.event; // $ExpectType EventDefinition[] | undefined
// ItemGroup Tests
const ig = new pmCollection.ItemGroup<pmCollection.Certificate>();
ig.auth; // $ExpectType RequestAuth | undefined
ig.items; // $ExpectType PropertyList<Certificate>
ig.items; // $ExpectType PropertyList<Certificate | ItemGroup<Certificate>>
ig.events; // $ExpectType EventList
ig.authorizeRequestsUsing("string"); // $ExpectType void