wave-ai/frontend/.angular/cache/18.2.21/babel-webpack/e9ce0826dc0e14a8871d4f52a9f2723058580f6111646ef5d14afe557e16a35d.json

1 line
760 B
JSON

{"ast":null,"code":"import { EmptyError } from './util/EmptyError';\nimport { SafeSubscriber } from './Subscriber';\nexport function firstValueFrom(source, config) {\n const hasConfig = typeof config === 'object';\n return new Promise((resolve, reject) => {\n const subscriber = new SafeSubscriber({\n next: value => {\n resolve(value);\n subscriber.unsubscribe();\n },\n error: reject,\n complete: () => {\n if (hasConfig) {\n resolve(config.defaultValue);\n } else {\n reject(new EmptyError());\n }\n }\n });\n source.subscribe(subscriber);\n });\n}\n//# sourceMappingURL=firstValueFrom.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}