Update frontend/src/ts/utils/misc.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Jack 2025-12-20 21:29:05 +01:00 committed by GitHub
parent b32693926d
commit e6ff6c50d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -598,6 +598,7 @@ export function applyReducedMotion(animationTime: number): number {
* Creates a promise with resolvers.
* This is useful for creating a promise that can be resolved or rejected from outside the promise itself.
* The returned promise reference stays constant even after reset() - it will always await the current internal promise.
* Note: Promise chains created via .then()/.catch()/.finally() will always follow the current internal promise state, even if created before reset().
*/
export function promiseWithResolvers<T = void>(): {
resolve: (value: T) => void;