File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
packages/api/src/submittable Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,15 @@ export default class SubmittableResult implements SubmittableResultImpl {
2727 return this . status . isFinalized ;
2828 }
2929
30+ /**
31+ * @description Filters EventRecords for the specified method & section (there could be multiple)
32+ */
33+ public filterRecords ( section : string , method : string ) : EventRecord [ ] {
34+ return this . events . filter ( ( { event } ) : boolean =>
35+ event . section === section && event . method === method
36+ ) ;
37+ }
38+
3039 /**
3140 * @description Finds an EventRecord for the specified method & section
3241 */
Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ export interface SubmittableResultImpl {
1515 readonly isError : boolean ;
1616 readonly isFinalized : boolean ;
1717
18- findRecord ( section : string , method : string ) : EventRecord | undefined ;
18+ filterRecords ( section : string , method : string ) : EventRecord [ ] ;
19+ findRecord ( section : string , method : string ) : EventRecord | undefined ;
1920}
2021
2122export interface SubmittableResultValue {
You can’t perform that action at this time.
0 commit comments