Tracking de l'application VApp (IHM du jeu)

This commit is contained in:
2025-05-11 18:04:12 +02:00
commit 89e9db9b62
17763 changed files with 3718499 additions and 0 deletions

View File

@ -0,0 +1,24 @@
import { EmptyError } from './util/EmptyError';
import { SafeSubscriber } from './Subscriber';
export function firstValueFrom(source, config) {
const hasConfig = typeof config === 'object';
return new Promise((resolve, reject) => {
const subscriber = new SafeSubscriber({
next: (value) => {
resolve(value);
subscriber.unsubscribe();
},
error: reject,
complete: () => {
if (hasConfig) {
resolve(config.defaultValue);
}
else {
reject(new EmptyError());
}
},
});
source.subscribe(subscriber);
});
}
//# sourceMappingURL=firstValueFrom.js.map