Refactor camera initialization into the camera engines.

This commit is contained in:
Dermot Duffy
2023-02-12 16:10:22 -08:00
parent 587f483f40
commit 06b4cc914c
30 changed files with 1249 additions and 842 deletions
+5 -5
View File
@@ -167,11 +167,11 @@ export function getDurationString(start: Date, end: Date): string {
return duration;
}
export const allPromises = async <T>(
items: T[],
func: (arg: T) => void,
): Promise<void> => {
await Promise.all(Array.from(items).map((item) => func(item)));
export const allPromises = async <T, R>(
items: Iterable<T>,
func: (arg: T) => R,
): Promise<Awaited<R>[]> => {
return await Promise.all(Array.from(items).map((item) => func(item)));
};
/**