Fix KubeObjectStore not correctly tracking loading of namespaces (#2266)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-04-29 08:32:29 -04:00
1 parent 2c3750c240
commit 082885cabf
4 files changed
+73 -54

No files matched your search

+2
View File
@@ -11,10 +11,12 @@ export * from "./debouncePromise";
export * from "./defineGlobal";
export * from "./delay";
export * from "./disposer";
export * from "./disposer";
export * from "./downloadFile";
export * from "./escapeRegExp";
export * from "./getRandId";
export * from "./openExternal";
export * from "./reject-promise";
export * from "./saveToAppFiles";
export * from "./singleton";
export * from "./splitArray";
+13
View File
@@ -0,0 +1,13 @@
import "abort-controller/polyfill";
/**
* Creates a new promise that will be rejected when the signal rejects.
*
* Useful for `Promise.race()` applications.
* @param signal The AbortController's signal to reject with
*/
export function rejectPromiseBy(signal: AbortSignal): Promise<void> {
return new Promise((_, reject) => {
signal.addEventListener("abort", reject);
});
}