fix gitignore again
This commit is contained in:
parent
ce5a1e330b
commit
5da5c2afe2
3329 changed files with 364540 additions and 3 deletions
24
electron/node_modules/rxjs/dist/esm5/internal/firstValueFrom.js
generated
vendored
Normal file
24
electron/node_modules/rxjs/dist/esm5/internal/firstValueFrom.js
generated
vendored
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import { EmptyError } from './util/EmptyError';
|
||||
import { SafeSubscriber } from './Subscriber';
|
||||
export function firstValueFrom(source, config) {
|
||||
var hasConfig = typeof config === 'object';
|
||||
return new Promise(function (resolve, reject) {
|
||||
var subscriber = new SafeSubscriber({
|
||||
next: function (value) {
|
||||
resolve(value);
|
||||
subscriber.unsubscribe();
|
||||
},
|
||||
error: reject,
|
||||
complete: function () {
|
||||
if (hasConfig) {
|
||||
resolve(config.defaultValue);
|
||||
}
|
||||
else {
|
||||
reject(new EmptyError());
|
||||
}
|
||||
},
|
||||
});
|
||||
source.subscribe(subscriber);
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=firstValueFrom.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue