1 | import { Subscriber } from './Subscriber';
|
2 | import { ObservableNotification } from './types';
|
3 |
|
4 |
|
5 |
|
6 |
|
7 | export declare const config: GlobalConfig;
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 | export interface GlobalConfig {
|
14 | |
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | onUnhandledError: ((err: any) => void) | null;
|
24 | /**
|
25 | * A registration point for notifications that cannot be sent to subscribers because they
|
26 | * have completed, errored or have been explicitly unsubscribed. By default, next, complete
|
27 | * and error notifications sent to stopped subscribers are noops. However, sometimes callers
|
28 | * might want a different behavior. For example, with sources that attempt to report errors
|
29 | * to stopped subscribers, a caller can configure RxJS to throw an unhandled error instead.
|
30 | * This will _always_ be called asynchronously on another job in the runtime. This is because
|
31 | * we do not want errors thrown in this user-configured handler to interfere with the
|
32 | * behavior of the library.
|
33 | */
|
34 | onStoppedNotification: ((notification: ObservableNotification<any>, subscriber: Subscriber<any>) => void) | null;
|
35 | /**
|
36 | * The promise constructor used by default for {@link Observable#toPromise toPromise} and {@link Observable#forEach forEach}
|
37 | * methods.
|
38 | *
|
39 | * @deprecated As of version 8, RxJS will no longer support this sort of injection of a
|
40 | * Promise constructor. If you need a Promise implementation other than native promises,
|
41 | * please polyfill/patch Promise as you see appropriate. Will be removed in v8.
|
42 | */
|
43 | Promise?: PromiseConstructorLike;
|
44 | /**
|
45 | * If true, turns on synchronous error rethrowing, which is a deprecated behavior
|
46 | * in v6 and higher. This behavior enables bad patterns like wrapping a subscribe
|
47 | * call in a try/catch block. It also enables producer interference, a nasty bug
|
48 | * where a multicast can be broken for all observers by a downstream consumer with
|
49 | * an unhandled error. DO NOT USE THIS FLAG UNLESS IT'S NEEDED TO BUY TIME
|
50 | * FOR MIGRATION REASONS.
|
51 | *
|
52 | * @deprecated As of version 8, RxJS will no longer support synchronous throwing
|
53 | * of unhandled errors. All errors will be thrown on a separate call stack to prevent bad
|
54 | * behaviors described above. Will be removed in v8.
|
55 | */
|
56 | useDeprecatedSynchronousErrorHandling: boolean;
|
57 | /**
|
58 | * If true, enables an as-of-yet undocumented feature from v5: The ability to access
|
59 | * `unsubscribe()` via `this` context in `next` functions created in observers passed
|
60 | * to `subscribe`.
|
61 | *
|
62 | * This is being removed because the performance was severely problematic, and it could also cause
|
63 | * issues when types other than POJOs are passed to subscribe as subscribers, as they will likely have
|
64 | * their `this` context overwritten.
|
65 | *
|
66 | * @deprecated As of version 8, RxJS will no longer support altering the
|
67 | * context of next functions provided as part of an observer to Subscribe. Instead,
|
68 | * you will have access to a subscription or a signal or token that will allow you to do things like
|
69 | * unsubscribe and test closed status. Will be removed in v8.
|
70 | */
|
71 | useDeprecatedNextContext: boolean;
|
72 | }
|
73 | //# sourceMappingURL=config.d.ts.map |
\ | No newline at end of file |