diff --git a/.changeset/fresh-tips-yell.md b/.changeset/fresh-tips-yell.md new file mode 100644 index 0000000..2ad706d --- /dev/null +++ b/.changeset/fresh-tips-yell.md @@ -0,0 +1,5 @@ +--- +'wonka': patch +--- + +Add missing `Symbol.observable` global declaration back to typings. diff --git a/src/helpers.ts b/src/helpers.ts index c237eb7..f195aef 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -1,11 +1,5 @@ import { TalkbackFn, TeardownFn, Start, Push, SignalKind } from './types'; -declare global { - interface SymbolConstructor { - readonly observable: symbol; - } -} - /** Placeholder {@link TeardownFn | teardown functions} that's a no-op. * @see {@link TeardownFn} for the definition and usage of teardowns. * @internal diff --git a/src/observable.ts b/src/observable.ts index b80c079..6593a32 100644 --- a/src/observable.ts +++ b/src/observable.ts @@ -1,6 +1,14 @@ import { Source, SignalKind, TalkbackKind } from './types'; import { push, start, talkbackPlaceholder, observableSymbol } from './helpers'; +// NOTE: This must be placed in an exported file for `rollup-plugin-dts` +// to include it in output typings files +declare global { + interface SymbolConstructor { + readonly observable: symbol; + } +} + /** A definition of the ES Observable Subscription type that is returned by * {@link Observable.subscribe} *