diff --git a/.gitignore b/.gitignore index c615f32539..fab7bff263 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ typings/ # Generated dist/ +dist-compat/ tmp/ coverage/ img/ diff --git a/.make-compat-package.js b/.make-compat-package.js new file mode 100644 index 0000000000..ae7b6e2816 --- /dev/null +++ b/.make-compat-package.js @@ -0,0 +1,53 @@ +"use strict"; + +let pkg = require('./compat/package.json'); +let fs = require('fs-extra'); +let mkdirp = require('mkdirp'); +let path = require('path'); +let klawSync = require('klaw-sync'); +let licenseTool = require('./tools/add-license-to-file'); +let addLicenseToFile = licenseTool.addLicenseToFile; +let addLicenseTextToFile = licenseTool.addLicenseTextToFile; + +const ROOT = 'dist-compat/'; +const CJS_ROOT = ROOT + 'cjs/compat/'; +const ESM5_ROOT = ROOT + 'esm5/compat/'; +const ESM2015_ROOT = ROOT + 'esm2015/compat/'; +const TYPE_ROOT = ROOT + 'typings/compat/'; +const PKG_ROOT = ROOT + 'package/'; +const CJS_PKG = PKG_ROOT + ''; +const ESM5_PKG = PKG_ROOT + '_esm5/'; +const ESM2015_PKG = PKG_ROOT + '_esm2015/'; +const UMD_PKG = PKG_ROOT + 'bundles/'; +const TYPE_PKG = PKG_ROOT; + +// License info for minified files +let licenseUrl = 'https://github.com/ReactiveX/RxJS/blob/master/LICENSE.txt'; +let license = 'Apache License 2.0 ' + licenseUrl; + +// Recreate the distribution folder +fs.removeSync(PKG_ROOT); +mkdirp.sync(PKG_ROOT); + +// Copy over the sources +fs.copySync(TYPE_ROOT, TYPE_PKG); +copySources(CJS_ROOT, CJS_PKG); +copySources(ESM5_ROOT, ESM5_PKG, true); +copySources(ESM2015_ROOT, ESM2015_PKG, true); + +fs.copySync('compat/package.json', PKG_ROOT + '/package.json'); + +function copySources(rootDir, packageDir, ignoreMissing) { + // If we are ignoring missing directories, early return when source doesn't exist + if (!fs.existsSync(rootDir)) { + if (ignoreMissing) { + return; + } else { + throw "Source root dir does not exist!"; + } + } + // Copy over the CommonJS files + fs.copySync(rootDir, packageDir); + fs.copySync('./LICENSE.txt', packageDir + 'LICENSE.txt'); + fs.copySync('./compat/README.md', packageDir + 'README.md'); +} diff --git a/compat/README.md b/compat/README.md new file mode 100644 index 0000000000..e5bb718791 --- /dev/null +++ b/compat/README.md @@ -0,0 +1,15 @@ +# RxJS Compatibility Package + +This package is required to get backwards compatibility with RxJS pervious to version 6. It contains the imports to add operators to `Observable.prototype` and creation methods to `Observable`. This is what allows, for instance, dot-chaining: + +``` +Observable.interval(1) + .map(i => i * i) +``` + +vs + +``` +Observable.interval(1) + .pipe(map(i => i * i)) +``` diff --git a/compat/index.ts b/compat/Rx.ts similarity index 85% rename from compat/index.ts rename to compat/Rx.ts index 1ee75393b6..14289a9c4d 100644 --- a/compat/index.ts +++ b/compat/Rx.ts @@ -157,23 +157,21 @@ export { export {TestScheduler} from 'rxjs/testing'; -export {Operator} from 'rxjs/internal/Operator'; -export {Subscriber} from 'rxjs/internal/Subscriber'; -export {AsyncSubject} from 'rxjs/internal/AsyncSubject'; -export {ConnectableObservable} from 'rxjs/internal/observable/ConnectableObservable'; -export {TimeoutError} from 'rxjs/internal/util/TimeoutError'; -export {TimeInterval} from 'rxjs/internal/patching/operator/timeInterval'; -export {Timestamp} from 'rxjs/internal/operators/timestamp'; -export {VirtualTimeScheduler} from 'rxjs/internal/scheduler/VirtualTimeScheduler'; -export {AjaxRequest, AjaxResponse, AjaxError, AjaxTimeoutError} from 'rxjs/internal/observable/dom/AjaxObservable'; +export { Operator } from 'rxjs/internal/Operator'; +export { Subscriber } from 'rxjs/internal/Subscriber'; +export { AsyncSubject } from 'rxjs/internal/AsyncSubject'; +export { ConnectableObservable } from 'rxjs/internal/observable/ConnectableObservable'; +export { TimeoutError } from 'rxjs/internal/util/TimeoutError'; +export { TimeInterval } from 'rxjs/internal/patching/operator/timeInterval'; +export { Timestamp } from 'rxjs/internal/operators/timestamp'; +export { VirtualTimeScheduler } from 'rxjs/internal/scheduler/VirtualTimeScheduler'; +export { AjaxRequest, AjaxResponse, AjaxError, AjaxTimeoutError } from 'rxjs/internal/observable/dom/AjaxObservable'; +import { AsapScheduler } from 'rxjs/internal/scheduler/AsapScheduler'; +import { AsyncScheduler } from 'rxjs/internal/scheduler/AsyncScheduler'; +import { QueueScheduler } from 'rxjs/internal/scheduler/QueueScheduler'; +import { AnimationFrameScheduler } from 'rxjs/internal/scheduler/AnimationFrameScheduler'; -import { - asapScheduler as asap, - asyncScheduler as async, - queueScheduler as queue, - animationFrameScheduler as animationFrame, - -} from 'rxjs'; +import { asapScheduler, asyncScheduler, queueScheduler, animationFrameScheduler } from 'rxjs'; import { rxSubscriber } from 'rxjs/internal/symbol/rxSubscriber'; import { iterator } from 'rxjs/internal/symbol/iterator'; @@ -199,10 +197,10 @@ export const operators = _operators; * Use this for synchronizing with the platform's painting */ let Scheduler = { - asap, - queue, - animationFrame, - async + asap: asapScheduler, + queue: queueScheduler, + animationFrame: animationFrameScheduler, + async: asyncScheduler }; /** diff --git a/compat/add/observable/bindCallback.ts b/compat/add/observable/bindCallback.ts index 773606a355..add5eb5975 100644 --- a/compat/add/observable/bindCallback.ts +++ b/compat/add/observable/bindCallback.ts @@ -1,9 +1,8 @@ -import { Observable } from '../../internal/Observable'; -import { bindCallback as staticBindCallback } from '../../internal/observable/bindCallback'; +import { Observable, bindCallback as staticBindCallback } from 'rxjs'; Observable.bindCallback = staticBindCallback; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { namespace Observable { export let bindCallback: typeof staticBindCallback; } diff --git a/compat/add/observable/bindNodeCallback.ts b/compat/add/observable/bindNodeCallback.ts index afc5a8cd85..65a380a0ba 100644 --- a/compat/add/observable/bindNodeCallback.ts +++ b/compat/add/observable/bindNodeCallback.ts @@ -1,9 +1,8 @@ -import { Observable } from '../../internal/Observable'; -import { bindNodeCallback as staticBindNodeCallback } from '../../internal/observable/bindNodeCallback'; +import { Observable, bindNodeCallback as staticBindNodeCallback } from 'rxjs'; Observable.bindNodeCallback = staticBindNodeCallback; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { namespace Observable { export let bindNodeCallback: typeof staticBindNodeCallback; } diff --git a/compat/add/observable/combineLatest.ts b/compat/add/observable/combineLatest.ts index 89ebc707ae..0d77a00f6f 100644 --- a/compat/add/observable/combineLatest.ts +++ b/compat/add/observable/combineLatest.ts @@ -1,9 +1,8 @@ -import { Observable } from '../../internal/Observable'; -import { combineLatest as combineLatestStatic } from '../../internal/observable/combineLatest'; +import { Observable, combineLatest as combineLatestStatic } from 'rxjs'; Observable.combineLatest = combineLatestStatic; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { namespace Observable { export let combineLatest: typeof combineLatestStatic; } diff --git a/compat/add/observable/concat.ts b/compat/add/observable/concat.ts index d5605fb9ed..f32c1a52d5 100644 --- a/compat/add/observable/concat.ts +++ b/compat/add/observable/concat.ts @@ -1,9 +1,8 @@ -import { Observable } from '../../internal/Observable'; -import { concat as concatStatic } from '../../internal/observable/concat'; +import { Observable, concat as concatStatic } from 'rxjs'; Observable.concat = concatStatic; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { namespace Observable { export let concat: typeof concatStatic; } diff --git a/compat/add/observable/defer.ts b/compat/add/observable/defer.ts index 6cb3e10351..9733c19c56 100644 --- a/compat/add/observable/defer.ts +++ b/compat/add/observable/defer.ts @@ -1,9 +1,9 @@ -import { Observable } from '../../internal/Observable'; -import { defer as staticDefer } from '../../internal/observable/defer'; +import { Observable } from 'rxjs'; +import { defer as staticDefer } from 'rxjs/observable/defer'; Observable.defer = staticDefer; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { namespace Observable { export let defer: typeof staticDefer; } diff --git a/compat/add/observable/dom/ajax.ts b/compat/add/observable/dom/ajax.ts index 7b8bdb3fac..15f4114fc9 100644 --- a/compat/add/observable/dom/ajax.ts +++ b/compat/add/observable/dom/ajax.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../../internal/Observable'; -import { ajax as staticAjax } from '../../../internal/observable/dom/ajax'; -import { AjaxCreationMethod } from '../../../internal/observable/dom/AjaxObservable'; +import { Observable } from 'rxjs'; +import { ajax as staticAjax } from 'rxjs/ajax'; +import { AjaxCreationMethod } from 'rxjs/internal/observable/dom/AjaxObservable'; Observable.ajax = staticAjax; -declare module '../../../internal/Observable' { +declare module 'rxjs/internal/Observable' { namespace Observable { export let ajax: AjaxCreationMethod; } diff --git a/compat/add/observable/dom/webSocket.ts b/compat/add/observable/dom/webSocket.ts index b0e31c4b4a..9d5c338491 100644 --- a/compat/add/observable/dom/webSocket.ts +++ b/compat/add/observable/dom/webSocket.ts @@ -1,9 +1,9 @@ -import { Observable } from '../../../internal/Observable'; -import { webSocket as staticWebSocket } from '../../../internal/observable/dom/webSocket'; +import { Observable } from 'rxjs'; +import { websocket as staticWebSocket } from 'rxjs/websocket'; Observable.webSocket = staticWebSocket; -declare module '../../../internal/Observable' { +declare module 'rxjs/internal/Observable' { namespace Observable { export let webSocket: typeof staticWebSocket; } diff --git a/compat/add/observable/empty.ts b/compat/add/observable/empty.ts index f9f4faa24a..bd922dd4dd 100644 --- a/compat/add/observable/empty.ts +++ b/compat/add/observable/empty.ts @@ -1,9 +1,8 @@ -import { Observable } from '../../internal/Observable'; -import { empty as staticEmpty } from '../../internal/observable/empty'; +import { Observable, empty as staticEmpty } from 'rxjs'; Observable.empty = staticEmpty; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { namespace Observable { export let empty: typeof staticEmpty; } diff --git a/compat/add/observable/forkJoin.ts b/compat/add/observable/forkJoin.ts index 0f1aa5988a..9cf144c306 100644 --- a/compat/add/observable/forkJoin.ts +++ b/compat/add/observable/forkJoin.ts @@ -1,9 +1,8 @@ -import { Observable } from '../../internal/Observable'; -import { forkJoin as staticForkJoin } from '../../internal/observable/forkJoin'; +import { Observable, forkJoin as staticForkJoin } from 'rxjs'; Observable.forkJoin = staticForkJoin; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { namespace Observable { export let forkJoin: typeof staticForkJoin; } diff --git a/compat/add/observable/from.ts b/compat/add/observable/from.ts index b50847a6c6..7b3565eda3 100644 --- a/compat/add/observable/from.ts +++ b/compat/add/observable/from.ts @@ -1,9 +1,8 @@ -import { Observable } from '../../internal/Observable'; -import { from as staticFrom } from '../../internal/observable/from'; +import { Observable, from as staticFrom } from 'rxjs'; Observable.from = staticFrom; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { namespace Observable { export let from: typeof staticFrom; } diff --git a/compat/add/observable/fromEvent.ts b/compat/add/observable/fromEvent.ts index 0f03dcf8d0..3f95111cfd 100644 --- a/compat/add/observable/fromEvent.ts +++ b/compat/add/observable/fromEvent.ts @@ -1,9 +1,8 @@ -import { Observable } from '../../internal/Observable'; -import { fromEvent as staticFromEvent } from '../../internal/observable/fromEvent'; +import { Observable, fromEvent as staticFromEvent } from 'rxjs'; Observable.fromEvent = staticFromEvent; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { namespace Observable { export let fromEvent: typeof staticFromEvent; } diff --git a/compat/add/observable/fromEventPattern.ts b/compat/add/observable/fromEventPattern.ts index 7bd25a00d5..752d28bcf4 100644 --- a/compat/add/observable/fromEventPattern.ts +++ b/compat/add/observable/fromEventPattern.ts @@ -1,9 +1,8 @@ -import { Observable } from '../../internal/Observable'; -import { fromEventPattern as staticFromEventPattern } from '../../internal/observable/fromEventPattern'; +import { Observable, fromEventPattern as staticFromEventPattern } from 'rxjs'; Observable.fromEventPattern = staticFromEventPattern; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { namespace Observable { export let fromEventPattern: typeof staticFromEventPattern; } diff --git a/compat/add/observable/fromPromise.ts b/compat/add/observable/fromPromise.ts index 2bdd586ab8..2b705dd379 100644 --- a/compat/add/observable/fromPromise.ts +++ b/compat/add/observable/fromPromise.ts @@ -1,9 +1,9 @@ -import { Observable } from '../../internal/Observable'; -import { fromPromise as staticFromPromise } from '../../internal/observable/fromPromise'; +import { Observable } from 'rxjs'; +import { fromPromise as staticFromPromise } from 'rxjs/internal/observable/fromPromise'; -Observable.fromPromise = staticFromPromise; +(Observable as any).fromPromise = staticFromPromise; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { namespace Observable { export let fromPromise: typeof staticFromPromise; } diff --git a/compat/add/observable/generate.ts b/compat/add/observable/generate.ts index 4855f12f1b..dc9e0118c3 100644 --- a/compat/add/observable/generate.ts +++ b/compat/add/observable/generate.ts @@ -1,9 +1,8 @@ -import { Observable } from '../../internal/Observable'; -import { generate as staticGenerate } from '../../internal/observable/generate'; +import { Observable, generate as staticGenerate } from 'rxjs'; Observable.generate = staticGenerate; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { namespace Observable { export let generate: typeof staticGenerate; } diff --git a/compat/add/observable/if.ts b/compat/add/observable/if.ts index 271595ed14..9314971233 100644 --- a/compat/add/observable/if.ts +++ b/compat/add/observable/if.ts @@ -1,5 +1,4 @@ -import { Observable } from '../../internal/Observable'; -import { iif } from '../../internal/observable/iif'; +import { Observable, iif } from 'rxjs'; //tslint:disable-next-line:no-any TypeScript doesn't like `if` (Observable as any).if = iif; diff --git a/compat/add/observable/interval.ts b/compat/add/observable/interval.ts index 517c60210e..1a0164525b 100644 --- a/compat/add/observable/interval.ts +++ b/compat/add/observable/interval.ts @@ -1,9 +1,8 @@ -import { Observable } from '../../internal/Observable'; -import { interval as staticInterval } from '../../internal/observable/interval'; +import { Observable, interval as staticInterval } from 'rxjs'; Observable.interval = staticInterval; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { namespace Observable { export let interval: typeof staticInterval; } diff --git a/compat/add/observable/merge.ts b/compat/add/observable/merge.ts index 6fd8446c24..34fc685ef6 100644 --- a/compat/add/observable/merge.ts +++ b/compat/add/observable/merge.ts @@ -1,9 +1,8 @@ -import { Observable } from '../../internal/Observable'; -import { merge as mergeStatic } from '../../internal/observable/merge'; +import { Observable, merge as mergeStatic } from 'rxjs'; Observable.merge = mergeStatic; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { namespace Observable { export let merge: typeof mergeStatic; } diff --git a/compat/add/observable/never.ts b/compat/add/observable/never.ts index bc1950fa11..3b32889941 100644 --- a/compat/add/observable/never.ts +++ b/compat/add/observable/never.ts @@ -1,5 +1,5 @@ -import { Observable } from '../../internal/Observable'; -import { NEVER } from '../../internal/observable/never'; +import { Observable, interval } from 'rxjs'; +import { NEVER } from 'rxjs/internal/observable/never'; export function staticNever() { return NEVER; @@ -7,7 +7,7 @@ export function staticNever() { Observable.never = staticNever; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { namespace Observable { export let never: typeof staticNever; } diff --git a/compat/add/observable/of.ts b/compat/add/observable/of.ts index 24742ca0c5..7acc3ede35 100644 --- a/compat/add/observable/of.ts +++ b/compat/add/observable/of.ts @@ -1,9 +1,8 @@ -import { Observable } from '../../internal/Observable'; -import { of as staticOf } from '../../internal/observable/of'; +import { Observable, of as staticOf } from 'rxjs'; Observable.of = staticOf; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { namespace Observable { export let of: typeof staticOf; //formOf an iceberg! } diff --git a/compat/add/observable/onErrorResumeNext.ts b/compat/add/observable/onErrorResumeNext.ts index 2ebce0f2e7..e0be75708a 100644 --- a/compat/add/observable/onErrorResumeNext.ts +++ b/compat/add/observable/onErrorResumeNext.ts @@ -1,9 +1,8 @@ -import { Observable } from '../../internal/Observable'; -import { onErrorResumeNext as staticOnErrorResumeNext } from '../../internal/observable/onErrorResumeNext'; +import { Observable, onErrorResumeNext as staticOnErrorResumeNext } from 'rxjs'; Observable.onErrorResumeNext = staticOnErrorResumeNext; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { namespace Observable { export let onErrorResumeNext: typeof staticOnErrorResumeNext; } diff --git a/compat/add/observable/pairs.ts b/compat/add/observable/pairs.ts index 4377030b78..13f67fc149 100644 --- a/compat/add/observable/pairs.ts +++ b/compat/add/observable/pairs.ts @@ -1,9 +1,8 @@ -import { Observable } from '../../internal/Observable'; -import { pairs as staticPairs } from '../../internal/observable/pairs'; +import { Observable, pairs as staticPairs } from 'rxjs'; Observable.pairs = staticPairs; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { namespace Observable { export let pairs: typeof staticPairs; } diff --git a/compat/add/observable/race.ts b/compat/add/observable/race.ts index c5cdcff1ee..b4dd7b63b9 100644 --- a/compat/add/observable/race.ts +++ b/compat/add/observable/race.ts @@ -1,9 +1,8 @@ -import { Observable } from '../../internal/Observable'; -import { race as staticRace } from '../../internal/observable/race'; +import { Observable, race as staticRace } from 'rxjs'; Observable.race = staticRace; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { namespace Observable { export let race: typeof staticRace; } diff --git a/compat/add/observable/range.ts b/compat/add/observable/range.ts index ac889a7713..45a03770e4 100644 --- a/compat/add/observable/range.ts +++ b/compat/add/observable/range.ts @@ -1,9 +1,8 @@ -import { Observable } from '../../internal/Observable'; -import { range as staticRange } from '../../internal/observable/range'; +import { Observable, range as staticRange } from 'rxjs'; Observable.range = staticRange; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { namespace Observable { export let range: typeof staticRange; } diff --git a/compat/add/observable/throw.ts b/compat/add/observable/throw.ts index ab097bda73..44fa0a0d35 100644 --- a/compat/add/observable/throw.ts +++ b/compat/add/observable/throw.ts @@ -1,10 +1,9 @@ -import { Observable } from '../../internal/Observable'; -import { throwError as staticThrowError } from '../../internal/observable/throwError'; +import { Observable, throwError as staticThrowError } from 'rxjs'; (Observable as any).throw = staticThrowError; (Observable as any).throwError = staticThrowError; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { namespace Observable { export let throwError: typeof staticThrowError; } diff --git a/compat/add/observable/timer.ts b/compat/add/observable/timer.ts index 34b061ce26..641f45e746 100644 --- a/compat/add/observable/timer.ts +++ b/compat/add/observable/timer.ts @@ -1,9 +1,8 @@ -import { Observable } from '../../internal/Observable'; -import { timer as staticTimer } from '../../internal/observable/timer'; +import { Observable, timer as staticTimer } from 'rxjs'; Observable.timer = staticTimer; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { namespace Observable { export let timer: typeof staticTimer; } diff --git a/compat/add/observable/using.ts b/compat/add/observable/using.ts index 8bc4ed502c..e56025298c 100644 --- a/compat/add/observable/using.ts +++ b/compat/add/observable/using.ts @@ -1,9 +1,8 @@ -import { Observable } from '../../internal/Observable'; -import { using as staticUsing } from '../../internal/observable/using'; +import { Observable, using as staticUsing } from 'rxjs'; Observable.using = staticUsing; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { namespace Observable { export let using: typeof staticUsing; } diff --git a/compat/add/observable/zip.ts b/compat/add/observable/zip.ts index 787764d0d2..5693e96f69 100644 --- a/compat/add/observable/zip.ts +++ b/compat/add/observable/zip.ts @@ -1,9 +1,8 @@ -import { Observable } from '../../internal/Observable'; -import { zip as zipStatic } from '../../internal/observable/zip'; +import { Observable, zip as zipStatic } from 'rxjs'; Observable.zip = zipStatic; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { namespace Observable { export let zip: typeof zipStatic; } diff --git a/compat/add/operator/audit.ts b/compat/add/operator/audit.ts index a139d66b01..8a0af6e3c2 100644 --- a/compat/add/operator/audit.ts +++ b/compat/add/operator/audit.ts @@ -1,9 +1,9 @@ -import { Observable } from '../../internal/Observable'; -import { audit } from '../../internal/patching/operator/audit'; +import { Observable } from 'rxjs'; +import { audit } from 'rxjs/internal/patching/operator/audit'; -Observable.prototype.audit = audit; +(Observable as any).prototype.audit = audit; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { audit: typeof audit; } diff --git a/compat/add/operator/auditTime.ts b/compat/add/operator/auditTime.ts index 5e2f601101..4db1bb6567 100644 --- a/compat/add/operator/auditTime.ts +++ b/compat/add/operator/auditTime.ts @@ -1,9 +1,9 @@ -import { Observable } from '../../internal/Observable'; -import { auditTime } from '../../internal/patching/operator/auditTime'; +import { Observable } from 'rxjs'; +import { auditTime } from 'rxjs/internal/patching/operator/auditTime'; -Observable.prototype.auditTime = auditTime; +(Observable as any).prototype.auditTime = auditTime; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { auditTime: typeof auditTime; } diff --git a/compat/add/operator/buffer.ts b/compat/add/operator/buffer.ts index 853ad3d189..9586f7b4b4 100644 --- a/compat/add/operator/buffer.ts +++ b/compat/add/operator/buffer.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { buffer } from '../../internal/patching/operator/buffer'; +import { Observable } from 'rxjs'; +import { buffer } from 'rxjs/internal/patching/operator/buffer'; -Observable.prototype.buffer = buffer; +(Observable as any).prototype.buffer = buffer; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { buffer: typeof buffer; } diff --git a/compat/add/operator/bufferCount.ts b/compat/add/operator/bufferCount.ts index 6ccedb97d6..b53e7d16c0 100644 --- a/compat/add/operator/bufferCount.ts +++ b/compat/add/operator/bufferCount.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { bufferCount } from '../../internal/patching/operator/bufferCount'; +import { Observable } from 'rxjs'; +import { bufferCount } from 'rxjs/internal/patching/operator/bufferCount'; -Observable.prototype.bufferCount = bufferCount; +(Observable as any).prototype.bufferCount = bufferCount; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { bufferCount: typeof bufferCount; } diff --git a/compat/add/operator/bufferTime.ts b/compat/add/operator/bufferTime.ts index a490c19fa7..f464096566 100644 --- a/compat/add/operator/bufferTime.ts +++ b/compat/add/operator/bufferTime.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { bufferTime } from '../../internal/patching/operator/bufferTime'; +import { Observable } from 'rxjs'; +import { bufferTime } from 'rxjs/internal/patching/operator/bufferTime'; -Observable.prototype.bufferTime = bufferTime; +(Observable as any).prototype.bufferTime = bufferTime; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { bufferTime: typeof bufferTime; } diff --git a/compat/add/operator/bufferToggle.ts b/compat/add/operator/bufferToggle.ts index 45afe94df8..373f9a077f 100644 --- a/compat/add/operator/bufferToggle.ts +++ b/compat/add/operator/bufferToggle.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { bufferToggle } from '../../internal/patching/operator/bufferToggle'; +import { Observable } from 'rxjs'; +import { bufferToggle } from 'rxjs/internal/patching/operator/bufferToggle'; -Observable.prototype.bufferToggle = bufferToggle; +(Observable as any).prototype.bufferToggle = bufferToggle; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { bufferToggle: typeof bufferToggle; } diff --git a/compat/add/operator/bufferWhen.ts b/compat/add/operator/bufferWhen.ts index 8471555118..f36a9dff1f 100644 --- a/compat/add/operator/bufferWhen.ts +++ b/compat/add/operator/bufferWhen.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { bufferWhen } from '../../internal/patching/operator/bufferWhen'; +import { Observable } from 'rxjs'; +import { bufferWhen } from 'rxjs/internal/patching/operator/bufferWhen'; -Observable.prototype.bufferWhen = bufferWhen; +(Observable as any).prototype.bufferWhen = bufferWhen; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { bufferWhen: typeof bufferWhen; } diff --git a/compat/add/operator/catch.ts b/compat/add/operator/catch.ts index d4e2c7ab5e..880daaf467 100644 --- a/compat/add/operator/catch.ts +++ b/compat/add/operator/catch.ts @@ -1,11 +1,11 @@ -import { Observable } from '../../internal/Observable'; -import { _catch } from '../../internal/patching/operator/catch'; +import { Observable } from 'rxjs'; +import { _catch } from 'rxjs/internal/patching/operator/catch'; -Observable.prototype.catch = _catch; -Observable.prototype._catch = _catch; +(Observable as any).prototype.catch = _catch; +(Observable as any).prototype._catch = _catch; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { catch: typeof _catch; _catch: typeof _catch; diff --git a/compat/add/operator/combineAll.ts b/compat/add/operator/combineAll.ts index 16433e777f..773dea083e 100644 --- a/compat/add/operator/combineAll.ts +++ b/compat/add/operator/combineAll.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { combineAll } from '../../internal/patching/operator/combineAll'; +import { Observable } from 'rxjs'; +import { combineAll } from 'rxjs/internal/patching/operator/combineAll'; -Observable.prototype.combineAll = combineAll; +(Observable as any).prototype.combineAll = combineAll; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { combineAll: typeof combineAll; } diff --git a/compat/add/operator/combineLatest.ts b/compat/add/operator/combineLatest.ts index a53076ca4c..3ca8de56d1 100644 --- a/compat/add/operator/combineLatest.ts +++ b/compat/add/operator/combineLatest.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { combineLatest } from '../../internal/patching/operator/combineLatest'; +import { Observable } from 'rxjs'; +import { combineLatest } from 'rxjs/internal/patching/operator/combineLatest'; -Observable.prototype.combineLatest = combineLatest; +(Observable as any).prototype.combineLatest = combineLatest; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { combineLatest: typeof combineLatest; } diff --git a/compat/add/operator/concat.ts b/compat/add/operator/concat.ts index 32eab2bc17..a1aa396d5d 100644 --- a/compat/add/operator/concat.ts +++ b/compat/add/operator/concat.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { concat } from '../../internal/patching/operator/concat'; +import { Observable } from 'rxjs'; +import { concat } from 'rxjs/internal/patching/operator/concat'; -Observable.prototype.concat = concat; +(Observable as any).prototype.concat = concat; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { concat: typeof concat; } diff --git a/compat/add/operator/concatAll.ts b/compat/add/operator/concatAll.ts index 2ac63ee03e..92b49659be 100644 --- a/compat/add/operator/concatAll.ts +++ b/compat/add/operator/concatAll.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { concatAll } from '../../internal/patching/operator/concatAll'; +import { Observable } from 'rxjs'; +import { concatAll } from 'rxjs/internal/patching/operator/concatAll'; -Observable.prototype.concatAll = concatAll; +(Observable as any).prototype.concatAll = concatAll; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { concatAll: typeof concatAll; } diff --git a/compat/add/operator/concatMap.ts b/compat/add/operator/concatMap.ts index 26fe660cfc..d284111e94 100644 --- a/compat/add/operator/concatMap.ts +++ b/compat/add/operator/concatMap.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { concatMap } from '../../internal/patching/operator/concatMap'; +import { Observable } from 'rxjs'; +import { concatMap } from 'rxjs/internal/patching/operator/concatMap'; -Observable.prototype.concatMap = concatMap; +(Observable as any).prototype.concatMap = concatMap; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { concatMap: typeof concatMap; } diff --git a/compat/add/operator/concatMapTo.ts b/compat/add/operator/concatMapTo.ts index 78ff76da80..79aff35468 100644 --- a/compat/add/operator/concatMapTo.ts +++ b/compat/add/operator/concatMapTo.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { concatMapTo } from '../../internal/patching/operator/concatMapTo'; +import { Observable } from 'rxjs'; +import { concatMapTo } from 'rxjs/internal/patching/operator/concatMapTo'; -Observable.prototype.concatMapTo = concatMapTo; +(Observable as any).prototype.concatMapTo = concatMapTo; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { concatMapTo: typeof concatMapTo; } diff --git a/compat/add/operator/count.ts b/compat/add/operator/count.ts index 228457a326..f231d52162 100644 --- a/compat/add/operator/count.ts +++ b/compat/add/operator/count.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { count } from '../../internal/patching/operator/count'; +import { Observable } from 'rxjs'; +import { count } from 'rxjs/internal/patching/operator/count'; -Observable.prototype.count = count; +(Observable as any).prototype.count = count; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { count: typeof count; } diff --git a/compat/add/operator/debounce.ts b/compat/add/operator/debounce.ts index d3e9a46524..b9e22b8f08 100644 --- a/compat/add/operator/debounce.ts +++ b/compat/add/operator/debounce.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { debounce } from '../../internal/patching/operator/debounce'; +import { Observable } from 'rxjs'; +import { debounce } from 'rxjs/internal/patching/operator/debounce'; -Observable.prototype.debounce = debounce; +(Observable as any).prototype.debounce = debounce; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { debounce: typeof debounce; } diff --git a/compat/add/operator/debounceTime.ts b/compat/add/operator/debounceTime.ts index 08b9caba82..720f00403a 100644 --- a/compat/add/operator/debounceTime.ts +++ b/compat/add/operator/debounceTime.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { debounceTime } from '../../internal/patching/operator/debounceTime'; +import { Observable } from 'rxjs'; +import { debounceTime } from 'rxjs/internal/patching/operator/debounceTime'; -Observable.prototype.debounceTime = debounceTime; +(Observable as any).prototype.debounceTime = debounceTime; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { debounceTime: typeof debounceTime; } diff --git a/compat/add/operator/defaultIfEmpty.ts b/compat/add/operator/defaultIfEmpty.ts index 745f10b1d8..e35980c045 100644 --- a/compat/add/operator/defaultIfEmpty.ts +++ b/compat/add/operator/defaultIfEmpty.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { defaultIfEmpty } from '../../internal/patching/operator/defaultIfEmpty'; +import { Observable } from 'rxjs'; +import { defaultIfEmpty } from 'rxjs/internal/patching/operator/defaultIfEmpty'; -Observable.prototype.defaultIfEmpty = defaultIfEmpty; +(Observable as any).prototype.defaultIfEmpty = defaultIfEmpty; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { defaultIfEmpty: typeof defaultIfEmpty; } diff --git a/compat/add/operator/delay.ts b/compat/add/operator/delay.ts index 33ce9104c3..7527ebd603 100644 --- a/compat/add/operator/delay.ts +++ b/compat/add/operator/delay.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { delay } from '../../internal/patching/operator/delay'; +import { Observable } from 'rxjs'; +import { delay } from 'rxjs/internal/patching/operator/delay'; -Observable.prototype.delay = delay; +(Observable as any).prototype.delay = delay; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { delay: typeof delay; } diff --git a/compat/add/operator/delayWhen.ts b/compat/add/operator/delayWhen.ts index 6bc092a387..61482ce842 100644 --- a/compat/add/operator/delayWhen.ts +++ b/compat/add/operator/delayWhen.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { delayWhen } from '../../internal/patching/operator/delayWhen'; +import { Observable } from 'rxjs'; +import { delayWhen } from 'rxjs/internal/patching/operator/delayWhen'; -Observable.prototype.delayWhen = delayWhen; +(Observable as any).prototype.delayWhen = delayWhen; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { delayWhen: typeof delayWhen; } diff --git a/compat/add/operator/dematerialize.ts b/compat/add/operator/dematerialize.ts index d5f4e1bbe4..e8875654ad 100644 --- a/compat/add/operator/dematerialize.ts +++ b/compat/add/operator/dematerialize.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { dematerialize } from '../../internal/patching/operator/dematerialize'; +import { Observable } from 'rxjs'; +import { dematerialize } from 'rxjs/internal/patching/operator/dematerialize'; -Observable.prototype.dematerialize = dematerialize; +(Observable as any).prototype.dematerialize = dematerialize; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { dematerialize: typeof dematerialize; } diff --git a/compat/add/operator/distinct.ts b/compat/add/operator/distinct.ts index d7b61b03c9..5c2a418048 100644 --- a/compat/add/operator/distinct.ts +++ b/compat/add/operator/distinct.ts @@ -1,9 +1,9 @@ -import { Observable } from '../../internal/Observable'; -import { distinct } from '../../internal/patching/operator/distinct'; +import { Observable } from 'rxjs'; +import { distinct } from 'rxjs/internal/patching/operator/distinct'; -Observable.prototype.distinct = distinct; +(Observable as any).prototype.distinct = distinct; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { distinct: typeof distinct; } diff --git a/compat/add/operator/distinctUntilChanged.ts b/compat/add/operator/distinctUntilChanged.ts index bee4d48c40..67cae53132 100644 --- a/compat/add/operator/distinctUntilChanged.ts +++ b/compat/add/operator/distinctUntilChanged.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { distinctUntilChanged } from '../../internal/patching/operator/distinctUntilChanged'; +import { Observable } from 'rxjs'; +import { distinctUntilChanged } from 'rxjs/internal/patching/operator/distinctUntilChanged'; -Observable.prototype.distinctUntilChanged = distinctUntilChanged; +(Observable as any).prototype.distinctUntilChanged = distinctUntilChanged; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { distinctUntilChanged: typeof distinctUntilChanged; } diff --git a/compat/add/operator/distinctUntilKeyChanged.ts b/compat/add/operator/distinctUntilKeyChanged.ts index 1ee66146cd..eb70cc2527 100644 --- a/compat/add/operator/distinctUntilKeyChanged.ts +++ b/compat/add/operator/distinctUntilKeyChanged.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { distinctUntilKeyChanged } from '../../internal/patching/operator/distinctUntilKeyChanged'; +import { Observable } from 'rxjs'; +import { distinctUntilKeyChanged } from 'rxjs/internal/patching/operator/distinctUntilKeyChanged'; -Observable.prototype.distinctUntilKeyChanged = distinctUntilKeyChanged; +(Observable as any).prototype.distinctUntilKeyChanged = distinctUntilKeyChanged; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { distinctUntilKeyChanged: typeof distinctUntilKeyChanged; } diff --git a/compat/add/operator/do.ts b/compat/add/operator/do.ts index 0e43320ff9..5927b97813 100644 --- a/compat/add/operator/do.ts +++ b/compat/add/operator/do.ts @@ -1,11 +1,11 @@ -import { Observable } from '../../internal/Observable'; -import { _do } from '../../internal/patching/operator/do'; +import { Observable } from 'rxjs'; +import { _do } from 'rxjs/internal/patching/operator/do'; -Observable.prototype.do = _do; -Observable.prototype._do = _do; +(Observable as any).prototype.do = _do; +(Observable as any).prototype._do = _do; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { do: typeof _do; _do: typeof _do; diff --git a/compat/add/operator/elementAt.ts b/compat/add/operator/elementAt.ts index f333faf047..587adb259a 100644 --- a/compat/add/operator/elementAt.ts +++ b/compat/add/operator/elementAt.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { elementAt } from '../../internal/patching/operator/elementAt'; +import { Observable } from 'rxjs'; +import { elementAt } from 'rxjs/internal/patching/operator/elementAt'; -Observable.prototype.elementAt = elementAt; +(Observable as any).prototype.elementAt = elementAt; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { elementAt: typeof elementAt; } diff --git a/compat/add/operator/every.ts b/compat/add/operator/every.ts index 42eca774a8..c604fd57ca 100644 --- a/compat/add/operator/every.ts +++ b/compat/add/operator/every.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { every } from '../../internal/patching/operator/every'; +import { Observable } from 'rxjs'; +import { every } from 'rxjs/internal/patching/operator/every'; -Observable.prototype.every = every; +(Observable as any).prototype.every = every; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { every: typeof every; } diff --git a/compat/add/operator/exhaust.ts b/compat/add/operator/exhaust.ts index b5919838a1..dbe3d6335d 100644 --- a/compat/add/operator/exhaust.ts +++ b/compat/add/operator/exhaust.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { exhaust } from '../../internal/patching/operator/exhaust'; +import { Observable } from 'rxjs'; +import { exhaust } from 'rxjs/internal/patching/operator/exhaust'; -Observable.prototype.exhaust = exhaust; +(Observable as any).prototype.exhaust = exhaust; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { exhaust: typeof exhaust; } diff --git a/compat/add/operator/exhaustMap.ts b/compat/add/operator/exhaustMap.ts index 0d5bdf94a9..c0be85452b 100644 --- a/compat/add/operator/exhaustMap.ts +++ b/compat/add/operator/exhaustMap.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { exhaustMap } from '../../internal/patching/operator/exhaustMap'; +import { Observable } from 'rxjs'; +import { exhaustMap } from 'rxjs/internal/patching/operator/exhaustMap'; -Observable.prototype.exhaustMap = exhaustMap; +(Observable as any).prototype.exhaustMap = exhaustMap; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { exhaustMap: typeof exhaustMap; } diff --git a/compat/add/operator/expand.ts b/compat/add/operator/expand.ts index e6e726023e..ff8509577c 100644 --- a/compat/add/operator/expand.ts +++ b/compat/add/operator/expand.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { expand } from '../../internal/patching/operator/expand'; +import { Observable } from 'rxjs'; +import { expand } from 'rxjs/internal/patching/operator/expand'; -Observable.prototype.expand = expand; +(Observable as any).prototype.expand = expand; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { expand: typeof expand; } diff --git a/compat/add/operator/filter.ts b/compat/add/operator/filter.ts index 7cd60841c1..88d2c10271 100644 --- a/compat/add/operator/filter.ts +++ b/compat/add/operator/filter.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { filter } from '../../internal/patching/operator/filter'; +import { Observable } from 'rxjs'; +import { filter } from 'rxjs/internal/patching/operator/filter'; -Observable.prototype.filter = filter; +(Observable as any).prototype.filter = filter; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { filter: typeof filter; } diff --git a/compat/add/operator/finally.ts b/compat/add/operator/finally.ts index 6db2fa2d52..8858b8a2c0 100644 --- a/compat/add/operator/finally.ts +++ b/compat/add/operator/finally.ts @@ -1,11 +1,11 @@ -import { Observable } from '../../internal/Observable'; -import { _finally } from '../../internal/patching/operator/finally'; +import { Observable } from 'rxjs'; +import { _finally } from 'rxjs/internal/patching/operator/finally'; -Observable.prototype.finally = _finally; -Observable.prototype._finally = _finally; +(Observable as any).prototype.finally = _finally; +(Observable as any).prototype._finally = _finally; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { finally: typeof _finally; _finally: typeof _finally; diff --git a/compat/add/operator/find.ts b/compat/add/operator/find.ts index cdefd1303b..3723b4041f 100644 --- a/compat/add/operator/find.ts +++ b/compat/add/operator/find.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { find } from '../../internal/patching/operator/find'; +import { Observable } from 'rxjs'; +import { find } from 'rxjs/internal/patching/operator/find'; -Observable.prototype.find = find; +(Observable as any).prototype.find = find; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { find: typeof find; } diff --git a/compat/add/operator/findIndex.ts b/compat/add/operator/findIndex.ts index 6c4a83bfe5..3c8fa1c8bf 100644 --- a/compat/add/operator/findIndex.ts +++ b/compat/add/operator/findIndex.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { findIndex } from '../../internal/patching/operator/findIndex'; +import { Observable } from 'rxjs'; +import { findIndex } from 'rxjs/internal/patching/operator/findIndex'; -Observable.prototype.findIndex = findIndex; +(Observable as any).prototype.findIndex = findIndex; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { findIndex: typeof findIndex; } diff --git a/compat/add/operator/first.ts b/compat/add/operator/first.ts index 8e890b0d66..c6ec4c8709 100644 --- a/compat/add/operator/first.ts +++ b/compat/add/operator/first.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { first } from '../../internal/patching/operator/first'; +import { Observable } from 'rxjs'; +import { first } from 'rxjs/internal/patching/operator/first'; -Observable.prototype.first = first; +(Observable as any).prototype.first = first; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { first: typeof first; } diff --git a/compat/add/operator/groupBy.ts b/compat/add/operator/groupBy.ts index 966b703635..ca93d4be8a 100644 --- a/compat/add/operator/groupBy.ts +++ b/compat/add/operator/groupBy.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { groupBy } from '../../internal/patching/operator/groupBy'; +import { Observable } from 'rxjs'; +import { groupBy } from 'rxjs/internal/patching/operator/groupBy'; -Observable.prototype.groupBy = groupBy; +(Observable as any).prototype.groupBy = groupBy; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { groupBy: typeof groupBy; } diff --git a/compat/add/operator/ignoreElements.ts b/compat/add/operator/ignoreElements.ts index b78054e033..0641f032eb 100644 --- a/compat/add/operator/ignoreElements.ts +++ b/compat/add/operator/ignoreElements.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { ignoreElements } from '../../internal/patching/operator/ignoreElements'; +import { Observable } from 'rxjs'; +import { ignoreElements } from 'rxjs/internal/patching/operator/ignoreElements'; -Observable.prototype.ignoreElements = ignoreElements; +(Observable as any).prototype.ignoreElements = ignoreElements; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { ignoreElements: typeof ignoreElements; } diff --git a/compat/add/operator/isEmpty.ts b/compat/add/operator/isEmpty.ts index cd634048cc..7d6511d86b 100644 --- a/compat/add/operator/isEmpty.ts +++ b/compat/add/operator/isEmpty.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { isEmpty } from '../../internal/patching/operator/isEmpty'; +import { Observable } from 'rxjs'; +import { isEmpty } from 'rxjs/internal/patching/operator/isEmpty'; -Observable.prototype.isEmpty = isEmpty; +(Observable as any).prototype.isEmpty = isEmpty; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { isEmpty: typeof isEmpty; } diff --git a/compat/add/operator/last.ts b/compat/add/operator/last.ts index 2056cc8fd1..b80cf0b877 100644 --- a/compat/add/operator/last.ts +++ b/compat/add/operator/last.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { last } from '../../internal/patching/operator/last'; +import { Observable } from 'rxjs'; +import { last } from 'rxjs/internal/patching/operator/last'; -Observable.prototype.last = last; +(Observable as any).prototype.last = last; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { last: typeof last; } diff --git a/compat/add/operator/let.ts b/compat/add/operator/let.ts index 06e36da073..efb9380f73 100644 --- a/compat/add/operator/let.ts +++ b/compat/add/operator/let.ts @@ -1,11 +1,11 @@ -import { Observable } from '../../internal/Observable'; -import { letProto } from '../../internal/patching/operator/let'; +import { Observable } from 'rxjs'; +import { letProto } from 'rxjs/internal/patching/operator/let'; -Observable.prototype.let = letProto; -Observable.prototype.letBind = letProto; +(Observable as any).prototype.let = letProto; +(Observable as any).prototype.letBind = letProto; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { let: typeof letProto; letBind: typeof letProto; diff --git a/compat/add/operator/map.ts b/compat/add/operator/map.ts index 900a56d5a9..725b3c6864 100644 --- a/compat/add/operator/map.ts +++ b/compat/add/operator/map.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { map } from '../../internal/patching/operator/map'; +import { Observable } from 'rxjs'; +import { map } from 'rxjs/internal/patching/operator/map'; -Observable.prototype.map = map; +(Observable as any).prototype.map = map; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { map: typeof map; } diff --git a/compat/add/operator/mapTo.ts b/compat/add/operator/mapTo.ts index 6722f40ed4..9eb81a9136 100644 --- a/compat/add/operator/mapTo.ts +++ b/compat/add/operator/mapTo.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { mapTo } from '../../internal/patching/operator/mapTo'; +import { Observable } from 'rxjs'; +import { mapTo } from 'rxjs/internal/patching/operator/mapTo'; -Observable.prototype.mapTo = mapTo; +(Observable as any).prototype.mapTo = mapTo; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { mapTo: typeof mapTo; } diff --git a/compat/add/operator/materialize.ts b/compat/add/operator/materialize.ts index e72d4a8bd4..fba8f4c220 100644 --- a/compat/add/operator/materialize.ts +++ b/compat/add/operator/materialize.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { materialize } from '../../internal/patching/operator/materialize'; +import { Observable } from 'rxjs'; +import { materialize } from 'rxjs/internal/patching/operator/materialize'; -Observable.prototype.materialize = materialize; +(Observable as any).prototype.materialize = materialize; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { materialize: typeof materialize; } diff --git a/compat/add/operator/max.ts b/compat/add/operator/max.ts index 256de5b8bb..81d906f0a0 100644 --- a/compat/add/operator/max.ts +++ b/compat/add/operator/max.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { max } from '../../internal/patching/operator/max'; +import { Observable } from 'rxjs'; +import { max } from 'rxjs/internal/patching/operator/max'; -Observable.prototype.max = max; +(Observable as any).prototype.max = max; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { max: typeof max; } diff --git a/compat/add/operator/merge.ts b/compat/add/operator/merge.ts index 2d39e1713a..3a155eb2d9 100644 --- a/compat/add/operator/merge.ts +++ b/compat/add/operator/merge.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { merge } from '../../internal/patching/operator/merge'; +import { Observable } from 'rxjs'; +import { merge } from 'rxjs/internal/patching/operator/merge'; -Observable.prototype.merge = merge; +(Observable as any).prototype.merge = merge; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { merge: typeof merge; } diff --git a/compat/add/operator/mergeAll.ts b/compat/add/operator/mergeAll.ts index e61bde2458..f92ad1f169 100644 --- a/compat/add/operator/mergeAll.ts +++ b/compat/add/operator/mergeAll.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { mergeAll } from '../../internal/patching/operator/mergeAll'; +import { Observable } from 'rxjs'; +import { mergeAll } from 'rxjs/internal/patching/operator/mergeAll'; -Observable.prototype.mergeAll = mergeAll; +(Observable as any).prototype.mergeAll = mergeAll; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { mergeAll: typeof mergeAll; } diff --git a/compat/add/operator/mergeMap.ts b/compat/add/operator/mergeMap.ts index 7b4e27f8ca..1d8dc1753c 100644 --- a/compat/add/operator/mergeMap.ts +++ b/compat/add/operator/mergeMap.ts @@ -1,11 +1,11 @@ -import { Observable } from '../../internal/Observable'; -import { mergeMap } from '../../internal/patching/operator/mergeMap'; +import { Observable } from 'rxjs'; +import { mergeMap } from 'rxjs/internal/patching/operator/mergeMap'; -Observable.prototype.mergeMap = mergeMap; -Observable.prototype.flatMap = mergeMap; +(Observable as any).prototype.mergeMap = mergeMap; +(Observable as any).prototype.flatMap = mergeMap; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { flatMap: typeof mergeMap; mergeMap: typeof mergeMap; diff --git a/compat/add/operator/mergeMapTo.ts b/compat/add/operator/mergeMapTo.ts index 2d6a90e083..8d3cef56de 100644 --- a/compat/add/operator/mergeMapTo.ts +++ b/compat/add/operator/mergeMapTo.ts @@ -1,11 +1,11 @@ -import { Observable } from '../../internal/Observable'; -import { mergeMapTo } from '../../internal/patching/operator/mergeMapTo'; +import { Observable } from 'rxjs'; +import { mergeMapTo } from 'rxjs/internal/patching/operator/mergeMapTo'; -Observable.prototype.flatMapTo = mergeMapTo; -Observable.prototype.mergeMapTo = mergeMapTo; +(Observable as any).prototype.flatMapTo = mergeMapTo; +(Observable as any).prototype.mergeMapTo = mergeMapTo; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { flatMapTo: typeof mergeMapTo; mergeMapTo: typeof mergeMapTo; diff --git a/compat/add/operator/mergeScan.ts b/compat/add/operator/mergeScan.ts index 6d80680af8..e6d418e013 100644 --- a/compat/add/operator/mergeScan.ts +++ b/compat/add/operator/mergeScan.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { mergeScan } from '../../internal/patching/operator/mergeScan'; +import { Observable } from 'rxjs'; +import { mergeScan } from 'rxjs/internal/patching/operator/mergeScan'; -Observable.prototype.mergeScan = mergeScan; +(Observable as any).prototype.mergeScan = mergeScan; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { mergeScan: typeof mergeScan; } diff --git a/compat/add/operator/min.ts b/compat/add/operator/min.ts index 6849139d26..c36d0b1a82 100644 --- a/compat/add/operator/min.ts +++ b/compat/add/operator/min.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { min } from '../../internal/patching/operator/min'; +import { Observable } from 'rxjs'; +import { min } from 'rxjs/internal/patching/operator/min'; -Observable.prototype.min = min; +(Observable as any).prototype.min = min; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { min: typeof min; } diff --git a/compat/add/operator/multicast.ts b/compat/add/operator/multicast.ts index f724a61fdc..3919794946 100644 --- a/compat/add/operator/multicast.ts +++ b/compat/add/operator/multicast.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { multicast } from '../../internal/patching/operator/multicast'; +import { Observable } from 'rxjs'; +import { multicast } from 'rxjs/internal/patching/operator/multicast'; -Observable.prototype.multicast = multicast; +(Observable as any).prototype.multicast = multicast; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { multicast: typeof multicast; } diff --git a/compat/add/operator/observeOn.ts b/compat/add/operator/observeOn.ts index df71a52bdc..b4c4eda6ad 100644 --- a/compat/add/operator/observeOn.ts +++ b/compat/add/operator/observeOn.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { observeOn } from '../../internal/patching/operator/observeOn'; +import { Observable } from 'rxjs'; +import { observeOn } from 'rxjs/internal/patching/operator/observeOn'; -Observable.prototype.observeOn = observeOn; +(Observable as any).prototype.observeOn = observeOn; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { observeOn: typeof observeOn; } diff --git a/compat/add/operator/onErrorResumeNext.ts b/compat/add/operator/onErrorResumeNext.ts index b45fd78b0a..9d19325c81 100644 --- a/compat/add/operator/onErrorResumeNext.ts +++ b/compat/add/operator/onErrorResumeNext.ts @@ -1,9 +1,9 @@ -import { Observable } from '../../internal/Observable'; -import { onErrorResumeNext } from '../../internal/patching/operator/onErrorResumeNext'; +import { Observable } from 'rxjs'; +import { onErrorResumeNext } from 'rxjs/internal/patching/operator/onErrorResumeNext'; -Observable.prototype.onErrorResumeNext = onErrorResumeNext; +(Observable as any).prototype.onErrorResumeNext = onErrorResumeNext; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { onErrorResumeNext: typeof onErrorResumeNext; } diff --git a/compat/add/operator/pairwise.ts b/compat/add/operator/pairwise.ts index f7f9f8861f..934d2ee9e2 100644 --- a/compat/add/operator/pairwise.ts +++ b/compat/add/operator/pairwise.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { pairwise } from '../../internal/patching/operator/pairwise'; +import { Observable } from 'rxjs'; +import { pairwise } from 'rxjs/internal/patching/operator/pairwise'; -Observable.prototype.pairwise = pairwise; +(Observable as any).prototype.pairwise = pairwise; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { pairwise: typeof pairwise; } diff --git a/compat/add/operator/partition.ts b/compat/add/operator/partition.ts index f4e87e1d80..344de678f9 100644 --- a/compat/add/operator/partition.ts +++ b/compat/add/operator/partition.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { partition } from '../../internal/patching/operator/partition'; +import { Observable } from 'rxjs'; +import { partition } from 'rxjs/internal/patching/operator/partition'; -Observable.prototype.partition = partition; +(Observable as any).prototype.partition = partition; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { partition: typeof partition; } diff --git a/compat/add/operator/pluck.ts b/compat/add/operator/pluck.ts index f988e087d9..003cb99ff5 100644 --- a/compat/add/operator/pluck.ts +++ b/compat/add/operator/pluck.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { pluck } from '../../internal/patching/operator/pluck'; +import { Observable } from 'rxjs'; +import { pluck } from 'rxjs/internal/patching/operator/pluck'; -Observable.prototype.pluck = pluck; +(Observable as any).prototype.pluck = pluck; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { pluck: typeof pluck; } diff --git a/compat/add/operator/publish.ts b/compat/add/operator/publish.ts index 99b5f6663e..84c0586267 100644 --- a/compat/add/operator/publish.ts +++ b/compat/add/operator/publish.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { publish } from '../../internal/patching/operator/publish'; +import { Observable } from 'rxjs'; +import { publish } from 'rxjs/internal/patching/operator/publish'; -Observable.prototype.publish = publish; +(Observable as any).prototype.publish = publish; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { publish: typeof publish; } diff --git a/compat/add/operator/publishBehavior.ts b/compat/add/operator/publishBehavior.ts index 3889527bf5..5ad467da6f 100644 --- a/compat/add/operator/publishBehavior.ts +++ b/compat/add/operator/publishBehavior.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { publishBehavior } from '../../internal/patching/operator/publishBehavior'; +import { Observable } from 'rxjs'; +import { publishBehavior } from 'rxjs/internal/patching/operator/publishBehavior'; -Observable.prototype.publishBehavior = publishBehavior; +(Observable as any).prototype.publishBehavior = publishBehavior; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { publishBehavior: typeof publishBehavior; } diff --git a/compat/add/operator/publishLast.ts b/compat/add/operator/publishLast.ts index 6297c1e715..6baa52fcf8 100644 --- a/compat/add/operator/publishLast.ts +++ b/compat/add/operator/publishLast.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { publishLast } from '../../internal/patching/operator/publishLast'; +import { Observable } from 'rxjs'; +import { publishLast } from 'rxjs/internal/patching/operator/publishLast'; -Observable.prototype.publishLast = publishLast; +(Observable as any).prototype.publishLast = publishLast; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { publishLast: typeof publishLast; } diff --git a/compat/add/operator/publishReplay.ts b/compat/add/operator/publishReplay.ts index c35edc04b3..b507fb4db5 100644 --- a/compat/add/operator/publishReplay.ts +++ b/compat/add/operator/publishReplay.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { publishReplay } from '../../internal/patching/operator/publishReplay'; +import { Observable } from 'rxjs'; +import { publishReplay } from 'rxjs/internal/patching/operator/publishReplay'; -Observable.prototype.publishReplay = publishReplay; +(Observable as any).prototype.publishReplay = publishReplay; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { publishReplay: typeof publishReplay; } diff --git a/compat/add/operator/race.ts b/compat/add/operator/race.ts index 3857be2a99..74d5c3dcf9 100644 --- a/compat/add/operator/race.ts +++ b/compat/add/operator/race.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { race } from '../../internal/patching/operator/race'; +import { Observable } from 'rxjs'; +import { race } from 'rxjs/internal/patching/operator/race'; -Observable.prototype.race = race; +(Observable as any).prototype.race = race; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { race: typeof race; } diff --git a/compat/add/operator/reduce.ts b/compat/add/operator/reduce.ts index 90d8767ff3..33872bd2ff 100644 --- a/compat/add/operator/reduce.ts +++ b/compat/add/operator/reduce.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { reduce } from '../../internal/patching/operator/reduce'; +import { Observable } from 'rxjs'; +import { reduce } from 'rxjs/internal/patching/operator/reduce'; -Observable.prototype.reduce = reduce; +(Observable as any).prototype.reduce = reduce; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { reduce: typeof reduce; } diff --git a/compat/add/operator/repeat.ts b/compat/add/operator/repeat.ts index 354ee3aa37..53e168801f 100644 --- a/compat/add/operator/repeat.ts +++ b/compat/add/operator/repeat.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { repeat } from '../../internal/patching/operator/repeat'; +import { Observable } from 'rxjs'; +import { repeat } from 'rxjs/internal/patching/operator/repeat'; -Observable.prototype.repeat = repeat; +(Observable as any).prototype.repeat = repeat; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { repeat: typeof repeat; } diff --git a/compat/add/operator/repeatWhen.ts b/compat/add/operator/repeatWhen.ts index 8c333ec5fa..ea18f4c139 100644 --- a/compat/add/operator/repeatWhen.ts +++ b/compat/add/operator/repeatWhen.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { repeatWhen } from '../../internal/patching/operator/repeatWhen'; +import { Observable } from 'rxjs'; +import { repeatWhen } from 'rxjs/internal/patching/operator/repeatWhen'; -Observable.prototype.repeatWhen = repeatWhen; +(Observable as any).prototype.repeatWhen = repeatWhen; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { repeatWhen: typeof repeatWhen; } diff --git a/compat/add/operator/retry.ts b/compat/add/operator/retry.ts index dffa2678fa..8a28705384 100644 --- a/compat/add/operator/retry.ts +++ b/compat/add/operator/retry.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { retry } from '../../internal/patching/operator/retry'; +import { Observable } from 'rxjs'; +import { retry } from 'rxjs/internal/patching/operator/retry'; -Observable.prototype.retry = retry; +(Observable as any).prototype.retry = retry; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { retry: typeof retry; } diff --git a/compat/add/operator/retryWhen.ts b/compat/add/operator/retryWhen.ts index 0d74265daf..d1d1ffb50c 100644 --- a/compat/add/operator/retryWhen.ts +++ b/compat/add/operator/retryWhen.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { retryWhen } from '../../internal/patching/operator/retryWhen'; +import { Observable } from 'rxjs'; +import { retryWhen } from 'rxjs/internal/patching/operator/retryWhen'; -Observable.prototype.retryWhen = retryWhen; +(Observable as any).prototype.retryWhen = retryWhen; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { retryWhen: typeof retryWhen; } diff --git a/compat/add/operator/sample.ts b/compat/add/operator/sample.ts index 9f020c4a3f..c569d93961 100644 --- a/compat/add/operator/sample.ts +++ b/compat/add/operator/sample.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { sample } from '../../internal/patching/operator/sample'; +import { Observable } from 'rxjs'; +import { sample } from 'rxjs/internal/patching/operator/sample'; -Observable.prototype.sample = sample; +(Observable as any).prototype.sample = sample; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { sample: typeof sample; } diff --git a/compat/add/operator/sampleTime.ts b/compat/add/operator/sampleTime.ts index 4bea1b7cef..2c860bec5f 100644 --- a/compat/add/operator/sampleTime.ts +++ b/compat/add/operator/sampleTime.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { sampleTime } from '../../internal/patching/operator/sampleTime'; +import { Observable } from 'rxjs'; +import { sampleTime } from 'rxjs/internal/patching/operator/sampleTime'; -Observable.prototype.sampleTime = sampleTime; +(Observable as any).prototype.sampleTime = sampleTime; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { sampleTime: typeof sampleTime; } diff --git a/compat/add/operator/scan.ts b/compat/add/operator/scan.ts index a797032ba1..e8201e3cfc 100644 --- a/compat/add/operator/scan.ts +++ b/compat/add/operator/scan.ts @@ -1,11 +1,11 @@ -import { Observable } from '../../internal/Observable'; +import { Observable } from 'rxjs'; -import { scan } from '../../internal/patching/operator/scan'; +import { scan } from 'rxjs/internal/patching/operator/scan'; -Observable.prototype.scan = scan; +(Observable as any).prototype.scan = scan; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { scan: typeof scan; } diff --git a/compat/add/operator/sequenceEqual.ts b/compat/add/operator/sequenceEqual.ts index 0767cd1bf1..52fa0862de 100644 --- a/compat/add/operator/sequenceEqual.ts +++ b/compat/add/operator/sequenceEqual.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { sequenceEqual } from '../../internal/patching/operator/sequenceEqual'; +import { Observable } from 'rxjs'; +import { sequenceEqual } from 'rxjs/internal/patching/operator/sequenceEqual'; -Observable.prototype.sequenceEqual = sequenceEqual; +(Observable as any).prototype.sequenceEqual = sequenceEqual; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { sequenceEqual: typeof sequenceEqual; } diff --git a/compat/add/operator/share.ts b/compat/add/operator/share.ts index 4473e876c4..3f5a9eb9f0 100644 --- a/compat/add/operator/share.ts +++ b/compat/add/operator/share.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { share } from '../../internal/patching/operator/share'; +import { Observable } from 'rxjs'; +import { share } from 'rxjs/internal/patching/operator/share'; -Observable.prototype.share = share; +(Observable as any).prototype.share = share; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { share: typeof share; } diff --git a/compat/add/operator/shareReplay.ts b/compat/add/operator/shareReplay.ts index 9587373626..54d3c5ecd3 100644 --- a/compat/add/operator/shareReplay.ts +++ b/compat/add/operator/shareReplay.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { shareReplay } from '../../internal/patching/operator/shareReplay'; +import { Observable } from 'rxjs'; +import { shareReplay } from 'rxjs/internal/patching/operator/shareReplay'; -Observable.prototype.shareReplay = shareReplay; +(Observable as any).prototype.shareReplay = shareReplay; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { shareReplay: typeof shareReplay; } diff --git a/compat/add/operator/single.ts b/compat/add/operator/single.ts index 8122dc29d7..725cf56166 100644 --- a/compat/add/operator/single.ts +++ b/compat/add/operator/single.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { single } from '../../internal/patching/operator/single'; +import { Observable } from 'rxjs'; +import { single } from 'rxjs/internal/patching/operator/single'; -Observable.prototype.single = single; +(Observable as any).prototype.single = single; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { single: typeof single; } diff --git a/compat/add/operator/skip.ts b/compat/add/operator/skip.ts index 54902a49a3..433074b477 100644 --- a/compat/add/operator/skip.ts +++ b/compat/add/operator/skip.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { skip } from '../../internal/patching/operator/skip'; +import { Observable } from 'rxjs'; +import { skip } from 'rxjs/internal/patching/operator/skip'; -Observable.prototype.skip = skip; +(Observable as any).prototype.skip = skip; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { skip: typeof skip; } diff --git a/compat/add/operator/skipLast.ts b/compat/add/operator/skipLast.ts index a71a55af99..f1e51d2fe4 100644 --- a/compat/add/operator/skipLast.ts +++ b/compat/add/operator/skipLast.ts @@ -1,9 +1,9 @@ -import { Observable } from '../../internal/Observable'; -import { skipLast } from '../../internal/patching/operator/skipLast'; +import { Observable } from 'rxjs'; +import { skipLast } from 'rxjs/internal/patching/operator/skipLast'; -Observable.prototype.skipLast = skipLast; +(Observable as any).prototype.skipLast = skipLast; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { skipLast: typeof skipLast; } diff --git a/compat/add/operator/skipUntil.ts b/compat/add/operator/skipUntil.ts index 730151edaa..bad31225d3 100644 --- a/compat/add/operator/skipUntil.ts +++ b/compat/add/operator/skipUntil.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { skipUntil } from '../../internal/patching/operator/skipUntil'; +import { Observable } from 'rxjs'; +import { skipUntil } from 'rxjs/internal/patching/operator/skipUntil'; -Observable.prototype.skipUntil = skipUntil; +(Observable as any).prototype.skipUntil = skipUntil; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { skipUntil: typeof skipUntil; } diff --git a/compat/add/operator/skipWhile.ts b/compat/add/operator/skipWhile.ts index 2f85cd2bc7..6bcee97e21 100644 --- a/compat/add/operator/skipWhile.ts +++ b/compat/add/operator/skipWhile.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { skipWhile } from '../../internal/patching/operator/skipWhile'; +import { Observable } from 'rxjs'; +import { skipWhile } from 'rxjs/internal/patching/operator/skipWhile'; -Observable.prototype.skipWhile = skipWhile; +(Observable as any).prototype.skipWhile = skipWhile; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { skipWhile: typeof skipWhile; } diff --git a/compat/add/operator/startWith.ts b/compat/add/operator/startWith.ts index f7a0d06186..e822c99494 100644 --- a/compat/add/operator/startWith.ts +++ b/compat/add/operator/startWith.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { startWith } from '../../internal/patching/operator/startWith'; +import { Observable } from 'rxjs'; +import { startWith } from 'rxjs/internal/patching/operator/startWith'; -Observable.prototype.startWith = startWith; +(Observable as any).prototype.startWith = startWith; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { startWith: typeof startWith; } diff --git a/compat/add/operator/subscribeOn.ts b/compat/add/operator/subscribeOn.ts index 838858b2f2..57388cf7c0 100644 --- a/compat/add/operator/subscribeOn.ts +++ b/compat/add/operator/subscribeOn.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { subscribeOn } from '../../internal/patching/operator/subscribeOn'; +import { Observable } from 'rxjs'; +import { subscribeOn } from 'rxjs/internal/patching/operator/subscribeOn'; -Observable.prototype.subscribeOn = subscribeOn; +(Observable as any).prototype.subscribeOn = subscribeOn; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { subscribeOn: typeof subscribeOn; } diff --git a/compat/add/operator/switch.ts b/compat/add/operator/switch.ts index f08be66fe0..8a8d9cea3b 100644 --- a/compat/add/operator/switch.ts +++ b/compat/add/operator/switch.ts @@ -1,11 +1,11 @@ -import { Observable } from '../../internal/Observable'; -import { _switch } from '../../internal/patching/operator/switch'; +import { Observable } from 'rxjs'; +import { _switch } from 'rxjs/internal/patching/operator/switch'; -Observable.prototype.switch = _switch; -Observable.prototype._switch = _switch; +(Observable as any).prototype.switch = _switch; +(Observable as any).prototype._switch = _switch; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { switch: typeof _switch; _switch: typeof _switch; diff --git a/compat/add/operator/switchMap.ts b/compat/add/operator/switchMap.ts index b3914fe028..198da1c852 100644 --- a/compat/add/operator/switchMap.ts +++ b/compat/add/operator/switchMap.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { switchMap } from '../../internal/patching/operator/switchMap'; +import { Observable } from 'rxjs'; +import { switchMap } from 'rxjs/internal/patching/operator/switchMap'; -Observable.prototype.switchMap = switchMap; +(Observable as any).prototype.switchMap = switchMap; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { switchMap: typeof switchMap; } diff --git a/compat/add/operator/switchMapTo.ts b/compat/add/operator/switchMapTo.ts index e3a1bdedf7..6a96dcdcbe 100644 --- a/compat/add/operator/switchMapTo.ts +++ b/compat/add/operator/switchMapTo.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { switchMapTo } from '../../internal/patching/operator/switchMapTo'; +import { Observable } from 'rxjs'; +import { switchMapTo } from 'rxjs/internal/patching/operator/switchMapTo'; -Observable.prototype.switchMapTo = switchMapTo; +(Observable as any).prototype.switchMapTo = switchMapTo; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { switchMapTo: typeof switchMapTo; } diff --git a/compat/add/operator/take.ts b/compat/add/operator/take.ts index a923f891ca..da4f6a9b82 100644 --- a/compat/add/operator/take.ts +++ b/compat/add/operator/take.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { take } from '../../internal/patching/operator/take'; +import { Observable } from 'rxjs'; +import { take } from 'rxjs/internal/patching/operator/take'; -Observable.prototype.take = take; +(Observable as any).prototype.take = take; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { take: typeof take; } diff --git a/compat/add/operator/takeLast.ts b/compat/add/operator/takeLast.ts index 0db99e7a34..daeb7f5420 100644 --- a/compat/add/operator/takeLast.ts +++ b/compat/add/operator/takeLast.ts @@ -1,9 +1,9 @@ -import { Observable } from '../../internal/Observable'; -import { takeLast } from '../../internal/patching/operator/takeLast'; +import { Observable } from 'rxjs'; +import { takeLast } from 'rxjs/internal/patching/operator/takeLast'; -Observable.prototype.takeLast = takeLast; +(Observable as any).prototype.takeLast = takeLast; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { takeLast: typeof takeLast; } diff --git a/compat/add/operator/takeUntil.ts b/compat/add/operator/takeUntil.ts index b5bf91f3f7..2cab3a79b5 100644 --- a/compat/add/operator/takeUntil.ts +++ b/compat/add/operator/takeUntil.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { takeUntil } from '../../internal/patching/operator/takeUntil'; +import { Observable } from 'rxjs'; +import { takeUntil } from 'rxjs/internal/patching/operator/takeUntil'; -Observable.prototype.takeUntil = takeUntil; +(Observable as any).prototype.takeUntil = takeUntil; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { takeUntil: typeof takeUntil; } diff --git a/compat/add/operator/takeWhile.ts b/compat/add/operator/takeWhile.ts index 2743e8cf6e..4895e95b95 100644 --- a/compat/add/operator/takeWhile.ts +++ b/compat/add/operator/takeWhile.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { takeWhile } from '../../internal/patching/operator/takeWhile'; +import { Observable } from 'rxjs'; +import { takeWhile } from 'rxjs/internal/patching/operator/takeWhile'; -Observable.prototype.takeWhile = takeWhile; +(Observable as any).prototype.takeWhile = takeWhile; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { takeWhile: typeof takeWhile; } diff --git a/compat/add/operator/throttle.ts b/compat/add/operator/throttle.ts index 8d5bd8655c..c577695c7c 100644 --- a/compat/add/operator/throttle.ts +++ b/compat/add/operator/throttle.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { throttle } from '../../internal/patching/operator/throttle'; +import { Observable } from 'rxjs'; +import { throttle } from 'rxjs/internal/patching/operator/throttle'; -Observable.prototype.throttle = throttle; +(Observable as any).prototype.throttle = throttle; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { throttle: typeof throttle; } diff --git a/compat/add/operator/throttleTime.ts b/compat/add/operator/throttleTime.ts index 81b580b8d7..7082b7335b 100644 --- a/compat/add/operator/throttleTime.ts +++ b/compat/add/operator/throttleTime.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { throttleTime } from '../../internal/patching/operator/throttleTime'; +import { Observable } from 'rxjs'; +import { throttleTime } from 'rxjs/internal/patching/operator/throttleTime'; -Observable.prototype.throttleTime = throttleTime; +(Observable as any).prototype.throttleTime = throttleTime; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { throttleTime: typeof throttleTime; } diff --git a/compat/add/operator/timeInterval.ts b/compat/add/operator/timeInterval.ts index c630519c37..ec618b3655 100644 --- a/compat/add/operator/timeInterval.ts +++ b/compat/add/operator/timeInterval.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { timeInterval } from '../../internal/patching/operator/timeInterval'; +import { Observable } from 'rxjs'; +import { timeInterval } from 'rxjs/internal/patching/operator/timeInterval'; -Observable.prototype.timeInterval = timeInterval; +(Observable as any).prototype.timeInterval = timeInterval; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { timeInterval: typeof timeInterval; } diff --git a/compat/add/operator/timeout.ts b/compat/add/operator/timeout.ts index 18ee862bb2..dd16b518b5 100644 --- a/compat/add/operator/timeout.ts +++ b/compat/add/operator/timeout.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { timeout } from '../../internal/patching/operator/timeout'; +import { Observable } from 'rxjs'; +import { timeout } from 'rxjs/internal/patching/operator/timeout'; -Observable.prototype.timeout = timeout; +(Observable as any).prototype.timeout = timeout; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { timeout: typeof timeout; } diff --git a/compat/add/operator/timeoutWith.ts b/compat/add/operator/timeoutWith.ts index ed45771679..ecf8d9459d 100644 --- a/compat/add/operator/timeoutWith.ts +++ b/compat/add/operator/timeoutWith.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { timeoutWith } from '../../internal/patching/operator/timeoutWith'; +import { Observable } from 'rxjs'; +import { timeoutWith } from 'rxjs/internal/patching/operator/timeoutWith'; -Observable.prototype.timeoutWith = timeoutWith; +(Observable as any).prototype.timeoutWith = timeoutWith; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { timeoutWith: typeof timeoutWith; } diff --git a/compat/add/operator/timestamp.ts b/compat/add/operator/timestamp.ts index 5e17672b64..198df47637 100644 --- a/compat/add/operator/timestamp.ts +++ b/compat/add/operator/timestamp.ts @@ -1,9 +1,9 @@ -import { Observable } from '../../internal/Observable'; -import { timestamp } from '../../internal/patching/operator/timestamp'; +import { Observable } from 'rxjs'; +import { timestamp } from 'rxjs/internal/patching/operator/timestamp'; -Observable.prototype.timestamp = timestamp; +(Observable as any).prototype.timestamp = timestamp; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { timestamp: typeof timestamp; } diff --git a/compat/add/operator/toArray.ts b/compat/add/operator/toArray.ts index c95d60df9a..8ee9b82bcf 100644 --- a/compat/add/operator/toArray.ts +++ b/compat/add/operator/toArray.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { toArray } from '../../internal/patching/operator/toArray'; +import { Observable } from 'rxjs'; +import { toArray } from 'rxjs/internal/patching/operator/toArray'; -Observable.prototype.toArray = toArray; +(Observable as any).prototype.toArray = toArray; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { toArray: typeof toArray; } diff --git a/compat/add/operator/window.ts b/compat/add/operator/window.ts index cb8857fe6b..00312db273 100644 --- a/compat/add/operator/window.ts +++ b/compat/add/operator/window.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { window } from '../../internal/patching/operator/window'; +import { Observable } from 'rxjs'; +import { window } from 'rxjs/internal/patching/operator/window'; -Observable.prototype.window = window; +(Observable as any).prototype.window = window; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { window: typeof window; } diff --git a/compat/add/operator/windowCount.ts b/compat/add/operator/windowCount.ts index fb34027b43..f3b99502c1 100644 --- a/compat/add/operator/windowCount.ts +++ b/compat/add/operator/windowCount.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { windowCount } from '../../internal/patching/operator/windowCount'; +import { Observable } from 'rxjs'; +import { windowCount } from 'rxjs/internal/patching/operator/windowCount'; -Observable.prototype.windowCount = windowCount; +(Observable as any).prototype.windowCount = windowCount; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { windowCount: typeof windowCount; } diff --git a/compat/add/operator/windowTime.ts b/compat/add/operator/windowTime.ts index deabc6d3ec..7cc2b837e9 100644 --- a/compat/add/operator/windowTime.ts +++ b/compat/add/operator/windowTime.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { windowTime } from '../../internal/patching/operator/windowTime'; +import { Observable } from 'rxjs'; +import { windowTime } from 'rxjs/internal/patching/operator/windowTime'; -Observable.prototype.windowTime = windowTime; +(Observable as any).prototype.windowTime = windowTime; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { windowTime: typeof windowTime; } diff --git a/compat/add/operator/windowToggle.ts b/compat/add/operator/windowToggle.ts index a476291216..b79adf1bb9 100644 --- a/compat/add/operator/windowToggle.ts +++ b/compat/add/operator/windowToggle.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { windowToggle } from '../../internal/patching/operator/windowToggle'; +import { Observable } from 'rxjs'; +import { windowToggle } from 'rxjs/internal/patching/operator/windowToggle'; -Observable.prototype.windowToggle = windowToggle; +(Observable as any).prototype.windowToggle = windowToggle; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { windowToggle: typeof windowToggle; } diff --git a/compat/add/operator/windowWhen.ts b/compat/add/operator/windowWhen.ts index 48ab024fd2..1d1d3ca147 100644 --- a/compat/add/operator/windowWhen.ts +++ b/compat/add/operator/windowWhen.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { windowWhen } from '../../internal/patching/operator/windowWhen'; +import { Observable } from 'rxjs'; +import { windowWhen } from 'rxjs/internal/patching/operator/windowWhen'; -Observable.prototype.windowWhen = windowWhen; +(Observable as any).prototype.windowWhen = windowWhen; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { windowWhen: typeof windowWhen; } diff --git a/compat/add/operator/withLatestFrom.ts b/compat/add/operator/withLatestFrom.ts index 208bcc181e..d2eeb1da2c 100644 --- a/compat/add/operator/withLatestFrom.ts +++ b/compat/add/operator/withLatestFrom.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { withLatestFrom } from '../../internal/patching/operator/withLatestFrom'; +import { Observable } from 'rxjs'; +import { withLatestFrom } from 'rxjs/internal/patching/operator/withLatestFrom'; -Observable.prototype.withLatestFrom = withLatestFrom; +(Observable as any).prototype.withLatestFrom = withLatestFrom; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { withLatestFrom: typeof withLatestFrom; } diff --git a/compat/add/operator/zip.ts b/compat/add/operator/zip.ts index 587e70ebd3..cd893b7247 100644 --- a/compat/add/operator/zip.ts +++ b/compat/add/operator/zip.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { zipProto } from '../../internal/patching/operator/zip'; +import { Observable } from 'rxjs'; +import { zipProto } from 'rxjs/internal/patching/operator/zip'; -Observable.prototype.zip = zipProto; +(Observable as any).prototype.zip = zipProto; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { zip: typeof zipProto; } diff --git a/compat/add/operator/zipAll.ts b/compat/add/operator/zipAll.ts index 6808162712..604dcec353 100644 --- a/compat/add/operator/zipAll.ts +++ b/compat/add/operator/zipAll.ts @@ -1,10 +1,10 @@ -import { Observable } from '../../internal/Observable'; -import { zipAll } from '../../internal/patching/operator/zipAll'; +import { Observable } from 'rxjs'; +import { zipAll } from 'rxjs/internal/patching/operator/zipAll'; -Observable.prototype.zipAll = zipAll; +(Observable as any).prototype.zipAll = zipAll; -declare module '../../internal/Observable' { +declare module 'rxjs/internal/Observable' { interface Observable { zipAll: typeof zipAll; } diff --git a/compat/package.json b/compat/package.json index 77565dab5e..cdc832bdf1 100644 --- a/compat/package.json +++ b/compat/package.json @@ -1,7 +1,8 @@ { "name": "rxjs-compat", "version": "6.0.0-alpha.3", - "main": "index.js", + "main": "./Rx.js", + "typings": "./Rx.d.ts", "dependencies": { "rxjs": "^6.0.0-alpha.3" } diff --git a/package.json b/package.json index 15c74b03e7..f2bb2f3c20 100644 --- a/package.json +++ b/package.json @@ -117,7 +117,24 @@ "test:circular": "dependency-cruise --validate .dependency-cruiser.json -x \"^node_modules\" src", "test:systemjs": "node integration/systemjs/systemjs-compatibility-spec.js", "tests2png": "mkdirp tmp/docs/img && cross-env TS_NODE_FAST=true mocha --compilers ts:ts-node/register --opts spec/support/tests2png.opts \"spec/**/*-spec.ts\"", - "watch": "watch \"echo triggering build && npm run test && echo build completed\" src -d -u -w=15" + "watch": "watch \"echo triggering build && npm run test && echo build completed\" src -d -u -w=15", + + "compat_build_all": "npm-run-all compat_clean_dist compat_build_cjs compat_build_esm5 compat_build_esm2015 compat_generate_packages", + "compat_build_cjs": "npm-run-all compat_clean_dist_cjs compat_compile_dist_cjs", + "compat_build_esm5": "npm-run-all compat_clean_dist_esm5 compat_compile_dist_esm5", + "compat_build_esm2015": "npm-run-all compat_clean_dist_esm2015 compat_compile_dist_esm2015", + + "compat_clean_dist": "shx rm -rf ./dist-compat", + "compat_clean_dist_cjs": "shx rm -rf ./dist-compat/cjs", + "compat_clean_dist_esm5": "shx rm -rf ./dist-compat/esm5", + "compat_clean_dist_esm2015": "shx rm -rf ./dist-compat/esm2015", + + "compat_compile_dist_cjs": "tsc -p ./tsconfig/compat/tsconfig.cjs.json", + "compat_compile_dist_esm5": "tsc -p ./tsconfig/compat/tsconfig.esm5.json", + "compat_compile_dist_esm2015": "tsc -p ./tsconfig/compat/tsconfig.esm2015.json", + + "compat_copy_sources": "mkdirp dist-compat && shx cp -r ./compat/ ./dist-compat/", + "compat_generate_packages": "node .make-compat-package.js" }, "repository": { "type": "git", diff --git a/tsconfig/compat/tsconfig.base.json b/tsconfig/compat/tsconfig.base.json new file mode 100644 index 0000000000..deaf02d6dd --- /dev/null +++ b/tsconfig/compat/tsconfig.base.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "noEmit": false + }, + "include": [ + "../../compat/**/*.ts" + ] +} \ No newline at end of file diff --git a/tsconfig/compat/tsconfig.cjs.json b/tsconfig/compat/tsconfig.cjs.json new file mode 100644 index 0000000000..e6b197ff8d --- /dev/null +++ b/tsconfig/compat/tsconfig.cjs.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "declaration": true, + "declarationDir": "../../dist-compat/typings", + "outDir": "../../dist-compat/cjs" + } +} \ No newline at end of file diff --git a/tsconfig/compat/tsconfig.esm2015.json b/tsconfig/compat/tsconfig.esm2015.json new file mode 100644 index 0000000000..27c524f4c9 --- /dev/null +++ b/tsconfig/compat/tsconfig.esm2015.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "module": "es2015", + "target": "es2015", + "outDir": "../../dist-compat/esm2015" + } +} \ No newline at end of file diff --git a/tsconfig/compat/tsconfig.esm5.json b/tsconfig/compat/tsconfig.esm5.json new file mode 100644 index 0000000000..41187707a4 --- /dev/null +++ b/tsconfig/compat/tsconfig.esm5.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "module": "es2015", + "target": "es5", + "outDir": "../../dist-compat/esm5" + } +} \ No newline at end of file diff --git a/tsconfig/tsconfig.base.json b/tsconfig/tsconfig.base.json index 74674baaa7..2c6ab234f8 100644 --- a/tsconfig/tsconfig.base.json +++ b/tsconfig/tsconfig.base.json @@ -13,9 +13,13 @@ // legacy entry-points "../dist/src/internal/Rx.ts", - "../dist/src/add/observable/of.ts", // umd entry-point "../dist/src/internal/umd.ts", + "../dist/src/index.ts", + "../dist/src/operators.ts", + "../dist/src/ajax.ts", + "../dist/src/websocket.ts", + "../dist/src/testing.ts" ] }