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

1 line
752 B
JSON

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