Reorganize repo structure and standards references

This commit is contained in:
david committed 2026-06-29 05:03:42 +02:00
1 parent 3cb93a81be
commit be2054274d
5885 files changed
+2588 -195

No files matched your search

@@ -0,0 +1,12 @@
// import { TimeFunction } from "../performance/timing.server";
export type PromiseHash = Record<string, Promise<unknown>>;
export type AwaitedPromiseHash<Hash extends PromiseHash> = {
[Key in keyof Hash]: Awaited<Hash[Key]>;
};
export async function promiseHash<Hash extends PromiseHash>(hash: Hash): Promise<AwaitedPromiseHash<Hash>> {
return Object.fromEntries(await Promise.all(Object.entries(hash).map(async ([key, promise]) => [key, await promise])));
}
// export async function promiseHashTimed<Hash extends PromiseHash>(hash: Hash, logger: { name: string; time: TimeFunction }): Promise<AwaitedPromiseHash<Hash>> {
// return Object.fromEntries(await Promise.all(Object.entries(hash).map(async ([key, promise]) => [key, await logger.time(`[${logger.name}]`, promise)])));
// }