File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ declare module 'pryv' {
1717 name : string ;
1818 parentId ?: Identifier ;
1919 clientData ?: KeyValue ;
20- children : Identifier [ ] ;
20+ children : Stream [ ] ;
2121 trashed ?: boolean ;
2222 created : Timestamp ;
2323 createdBy : Identifier ;
@@ -577,15 +577,15 @@ declare module 'pryv' {
577577 apiCalls : Calls ,
578578 progress ?: APICallProgressHandler ,
579579 ) : Promise < Array < TypedAPICallResult > > ;
580- apiOne (
581- method : keyof APICallMethods ,
582- params : APICallMethods [ keyof APICallMethods ] ,
583- ) : Promise < TypedAPICallResult > ;
584- apiOne (
585- method : keyof APICallMethods ,
586- params : APICallMethods [ keyof APICallMethods ] ,
587- expectedKey : string
588- ) : Promise < TypedAPICallResult [ keyof TypedAPICallResult ] > ;
580+ apiOne < T extends keyof APICallMethods > (
581+ method : T ,
582+ params : APICallMethods [ T ] [ 'params' ] ,
583+ ) : Promise < APICallMethods [ T ] [ 'res' ] > ;
584+ apiOne < T extends keyof APICallMethods , U extends keyof APICallMethods [ T ] [ 'res' ] > (
585+ method : T ,
586+ params : APICallMethods [ T ] [ 'params' ] ,
587+ expectedKey : U
588+ ) : Promise < APICallMethods [ T ] [ 'res' ] [ U ] > ;
589589 getEventsStreamed (
590590 queryParams : Partial < EventQueryParamsStreamQuery > ,
591591 forEachEvent : StreamedEventsHandler ,
You can’t perform that action at this time.
0 commit comments