-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(reorganize): Move observable implementations under internal dire…
…ctory - Moves all files from `src/observables` to `src/internal/observables` - Updates some tests to reference those internal files, this is temprorary - Adds an `index.ts` file at root that exports the static observable creation functions BREAKING CHANGE: You can no longer import observables from `rxjs/observable/*`, now you must import them from `rxjs` directly, like so: `import { fromEvent, timer } from 'rxjs';` BREAKING CHANGE: You should no longer deep import custom Observable implementations BREAKING CHANGE: `_throw` is now exported as `throwError` BREAKING CHANGE: `if` is now exported as `iif`
- Loading branch information
Showing
120 changed files
with
364 additions
and
403 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import * as index from '../src/index'; | ||
import { expect } from 'chai'; | ||
|
||
describe('index', () => { | ||
it('should export static observable creator functions', () => { | ||
expect(index.bindCallback).to.exist; | ||
expect(index.bindNodeCallback).to.exist; | ||
expect(index.combineLatest).to.exist; | ||
expect(index.concat).to.exist; | ||
expect(index.defer).to.exist; | ||
expect(index.empty).to.exist; | ||
expect(index.forkJoin).to.exist; | ||
expect(index.from).to.exist; | ||
expect(index.fromEvent).to.exist; | ||
expect(index.fromEventPattern).to.exist; | ||
expect(index.generate).to.exist; | ||
expect(index.iif).to.exist; | ||
expect(index.interval).to.exist; | ||
expect(index.merge).to.exist; | ||
expect(index.never).to.exist; | ||
expect(index.of).to.exist; | ||
expect(index.onErrorResumeNext).to.exist; | ||
expect(index.pairs).to.exist; | ||
expect(index.race).to.exist; | ||
expect(index.range).to.exist; | ||
expect(index.throwError).to.exist; | ||
expect(index.timer).to.exist; | ||
expect(index.using).to.exist; | ||
expect(index.zip).to.exist; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { Observable } from '../../Observable'; | ||
import { bindNodeCallback as staticBindNodeCallback } from '../../observable/bindNodeCallback'; | ||
import { bindNodeCallback as staticBindNodeCallback } from '../../internal/observable/bindNodeCallback'; | ||
|
||
Observable.bindNodeCallback = staticBindNodeCallback; | ||
|
||
declare module '../../Observable' { | ||
namespace Observable { | ||
export let bindNodeCallback: typeof staticBindNodeCallback; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { Observable } from '../../Observable'; | ||
import { combineLatest as combineLatestStatic } from '../../observable/combineLatest'; | ||
import { combineLatest as combineLatestStatic } from '../../internal/observable/combineLatest'; | ||
|
||
Observable.combineLatest = combineLatestStatic; | ||
|
||
declare module '../../Observable' { | ||
namespace Observable { | ||
export let combineLatest: typeof combineLatestStatic; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { Observable } from '../../Observable'; | ||
import { concat as concatStatic } from '../../observable/concat'; | ||
import { concat as concatStatic } from '../../internal/observable/concat'; | ||
|
||
Observable.concat = concatStatic; | ||
|
||
declare module '../../Observable' { | ||
namespace Observable { | ||
export let concat: typeof concatStatic; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { Observable } from '../../Observable'; | ||
import { defer as staticDefer } from '../../observable/defer'; | ||
import { defer as staticDefer } from '../../internal/observable/defer'; | ||
|
||
Observable.defer = staticDefer; | ||
|
||
declare module '../../Observable' { | ||
namespace Observable { | ||
export let defer: typeof staticDefer; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import { Observable } from '../../../Observable'; | ||
import { ajax as staticAjax } from '../../../observable/dom/ajax'; | ||
import { AjaxCreationMethod } from '../../../observable/dom/AjaxObservable'; | ||
import { ajax as staticAjax } from '../../../internal/observable/dom/ajax'; | ||
import { AjaxCreationMethod } from '../../../internal/observable/dom/AjaxObservable'; | ||
|
||
Observable.ajax = staticAjax; | ||
|
||
declare module '../../../Observable' { | ||
namespace Observable { | ||
export let ajax: AjaxCreationMethod; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { Observable } from '../../../Observable'; | ||
import { webSocket as staticWebSocket } from '../../../observable/dom/webSocket'; | ||
import { webSocket as staticWebSocket } from '../../../internal/observable/dom/webSocket'; | ||
|
||
Observable.webSocket = staticWebSocket; | ||
|
||
declare module '../../../Observable' { | ||
namespace Observable { | ||
export let webSocket: typeof staticWebSocket; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { Observable } from '../../Observable'; | ||
import { empty as staticEmpty } from '../../observable/empty'; | ||
import { empty as staticEmpty } from '../../internal/observable/empty'; | ||
|
||
Observable.empty = staticEmpty; | ||
|
||
declare module '../../Observable' { | ||
namespace Observable { | ||
export let empty: typeof staticEmpty; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { Observable } from '../../Observable'; | ||
import { forkJoin as staticForkJoin } from '../../observable/forkJoin'; | ||
import { forkJoin as staticForkJoin } from '../../internal/observable/forkJoin'; | ||
|
||
Observable.forkJoin = staticForkJoin; | ||
|
||
declare module '../../Observable' { | ||
namespace Observable { | ||
export let forkJoin: typeof staticForkJoin; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { Observable } from '../../Observable'; | ||
import { from as staticFrom } from '../../observable/from'; | ||
import { from as staticFrom } from '../../internal/observable/from'; | ||
|
||
Observable.from = staticFrom; | ||
|
||
declare module '../../Observable' { | ||
namespace Observable { | ||
export let from: typeof staticFrom; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { Observable } from '../../Observable'; | ||
import { fromEvent as staticFromEvent } from '../../observable/fromEvent'; | ||
import { fromEvent as staticFromEvent } from '../../internal/observable/fromEvent'; | ||
|
||
Observable.fromEvent = staticFromEvent; | ||
|
||
declare module '../../Observable' { | ||
namespace Observable { | ||
export let fromEvent: typeof staticFromEvent; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { Observable } from '../../Observable'; | ||
import { fromEventPattern as staticFromEventPattern } from '../../observable/fromEventPattern'; | ||
import { fromEventPattern as staticFromEventPattern } from '../../internal/observable/fromEventPattern'; | ||
|
||
Observable.fromEventPattern = staticFromEventPattern; | ||
|
||
declare module '../../Observable' { | ||
namespace Observable { | ||
export let fromEventPattern: typeof staticFromEventPattern; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { Observable } from '../../Observable'; | ||
import { fromPromise as staticFromPromise } from '../../observable/fromPromise'; | ||
import { fromPromise as staticFromPromise } from '../../internal/observable/fromPromise'; | ||
|
||
Observable.fromPromise = staticFromPromise; | ||
|
||
declare module '../../Observable' { | ||
namespace Observable { | ||
export let fromPromise: typeof staticFromPromise; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { Observable } from '../../Observable'; | ||
import { generate as staticGenerate } from '../../observable/generate'; | ||
import { generate as staticGenerate } from '../../internal/observable/generate'; | ||
|
||
Observable.generate = staticGenerate; | ||
|
||
declare module '../../Observable' { | ||
namespace Observable { | ||
export let generate: typeof staticGenerate; | ||
} | ||
} | ||
} |
Oops, something went wrong.