core-api: add global definition of Symbol.observable
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/core-api': patch
|
||||
---
|
||||
|
||||
Add a global type definition for `Symbol.observable`, fix type checking in projects that didn't already have it defined.
|
||||
@@ -42,6 +42,14 @@ export type Subscription = {
|
||||
readonly closed: boolean;
|
||||
};
|
||||
|
||||
// Declares the global well-known Symbol.observable
|
||||
// We get the actual runtime polyfill from zen-observable
|
||||
declare global {
|
||||
interface SymbolConstructor {
|
||||
readonly observable: symbol;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Observable sequence of values and errors, see TC39.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user