Tracking de l'application VApp (IHM du jeu)
This commit is contained in:
17
VApp/node_modules/rxjs/dist/esm/internal/observable/using.js
generated
vendored
Normal file
17
VApp/node_modules/rxjs/dist/esm/internal/observable/using.js
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
import { Observable } from '../Observable';
|
||||
import { innerFrom } from './innerFrom';
|
||||
import { EMPTY } from './empty';
|
||||
export function using(resourceFactory, observableFactory) {
|
||||
return new Observable((subscriber) => {
|
||||
const resource = resourceFactory();
|
||||
const result = observableFactory(resource);
|
||||
const source = result ? innerFrom(result) : EMPTY;
|
||||
source.subscribe(subscriber);
|
||||
return () => {
|
||||
if (resource) {
|
||||
resource.unsubscribe();
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=using.js.map
|
Reference in New Issue
Block a user