Skip to content

Commit

Permalink
restore syntax highlighting in slot by rebuilding yarn.lock
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuahhh committed May 2, 2023
1 parent 3036626 commit 3de7ee4
Show file tree
Hide file tree
Showing 2 changed files with 2,589 additions and 2,030 deletions.
11 changes: 0 additions & 11 deletions packages/core/src/EngraftPromise.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import ZipObject from "lodash-es/zipObject.js";
import { hasProperty } from "@engraft/shared/lib/hasProperty.js";
import { SynchronousPromise } from "synchronous-promise";

const zipObject = ZipObject.default;

// In this file, we re-type SynchronousPromise as EngraftPromise, and give it better types.

export interface EngraftPromise<T> extends Promise<T> {
Expand Down Expand Up @@ -205,14 +202,6 @@ export const EngraftPromise = Object.assign(SynchronousPromise as any as Synchro
});
},

allValues<T>(promiseObject: {[key: string]: EngraftPromise<T>}): EngraftPromise<{[key: string]: T}> {
const keys = Object.keys(promiseObject);
const promises = Object.values(promiseObject);
return EngraftPromise.all(promises).then((values) => {
return zipObject(keys, values);
});
},

// It would be nice to have something comparable to async/await for EngraftPromise.
// You can't use async/await itself – it always returns a normal Promise.
// You can pull this off with generators, but not with correct types.
Expand Down
Loading

0 comments on commit 3de7ee4

Please sign in to comment.