Send LensMainExtension.nagivate calls to renderer before navigating (#3082)

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-06-17 12:59:27 +03:00
1 parent dc2d7a08d3
commit c3c944cd30
12 files changed
+100 -51

No files matched your search

+2 -2
View File
@@ -21,9 +21,9 @@
import { observable } from "mobx";
export type ClusterFrameInfo = {
export interface ClusterFrameInfo {
frameId: number;
processId: number
};
}
export const clusterFrameMap = observable.map<string, ClusterFrameInfo>();
+16
View File
@@ -140,3 +140,19 @@ export function* filterMapStrict<T, U>(src: Iterable<T>, fn: (from: T) => U | nu
}
}
}
/**
* Iterate through `src` until `match` returns a truthy value
* @param src A type that can be iterated over
* @param match A function that should return a truthy value for the item that you want to find
* @returns The first entry that `match` returns a truthy value for, or `undefined`
*/
export function find<T>(src: Iterable<T>, match: (i: T) => any): T | undefined {
for (const from of src) {
if (match(from)) {
return from;
}
}
return void 0;
}