diff --git a/rx-core-binding/index.d.ts b/rx-core-binding/index.d.ts
new file mode 100644
index 0000000000..cf283070e9
--- /dev/null
+++ b/rx-core-binding/index.d.ts
@@ -0,0 +1,100 @@
+// Type definitions for rx-core-binding 4.0
+// Project: https://github.com/Reactive-Extensions/RxJS
+// Definitions by: Carl de Billy , Igor Oleinikov
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+///
+
+declare namespace Rx {
+ interface ISubject extends Observable, Observer, IDisposable {
+ hasObservers(): boolean;
+ }
+
+ export interface Subject extends ISubject {
+ }
+
+ interface SubjectStatic {
+ new (): Subject;
+ create(observer?: Observer, observable?: Observable): ISubject;
+ }
+
+ export var Subject: SubjectStatic;
+
+ export interface AsyncSubject extends Subject {
+ }
+
+ interface AsyncSubjectStatic {
+ new (): AsyncSubject;
+ }
+
+ export var AsyncSubject: AsyncSubjectStatic;
+
+ export interface BehaviorSubject extends Subject {
+ getValue(): T;
+ }
+
+ interface BehaviorSubjectStatic {
+ new (initialValue: T): BehaviorSubject;
+ }
+
+ export var BehaviorSubject: BehaviorSubjectStatic;
+
+ export interface ReplaySubject extends Subject {
+ }
+
+ interface ReplaySubjectStatic {
+ new (bufferSize?: number, window?: number, scheduler?: IScheduler): ReplaySubject;
+ }
+
+ export var ReplaySubject: ReplaySubjectStatic;
+
+ interface ConnectableObservable extends Observable {
+ connect(): IDisposable;
+ refCount(): Observable;
+ }
+
+ interface ConnectableObservableStatic {
+ new (): ConnectableObservable;
+ }
+
+ export var ConnectableObservable: ConnectableObservableStatic;
+
+ export interface Observable {
+ multicast(subject: Observable): ConnectableObservable;
+ multicast(subjectSelector: () => ISubject, selector: (source: ConnectableObservable) => Observable): Observable;
+ publish(): ConnectableObservable;
+ publish(selector: (source: ConnectableObservable) => Observable): Observable;
+ /**
+ * Returns an observable sequence that shares a single subscription to the underlying sequence.
+ * This operator is a specialization of publish which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed.
+ *
+ * @example
+ * var res = source.share();
+ *
+ * @returns An observable sequence that contains the elements of a sequence produced by multicasting the source sequence.
+ */
+ share(): Observable;
+ publishLast(): ConnectableObservable;
+ publishLast(selector: (source: ConnectableObservable) => Observable): Observable;
+ publishValue(initialValue: T): ConnectableObservable;
+ publishValue(selector: (source: ConnectableObservable) => Observable, initialValue: T): Observable;
+ /**
+ * Returns an observable sequence that shares a single subscription to the underlying sequence and starts with an initialValue.
+ * This operator is a specialization of publishValue which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed.
+ *
+ * @example
+ * var res = source.shareValue(42);
+ *
+ * @param initialValue Initial value received by observers upon subscription.
+ * @returns An observable sequence that contains the elements of a sequence produced by multicasting the source sequence.
+ */
+ shareValue(initialValue: T): Observable;
+ replay(selector?: boolean, bufferSize?: number, window?: number, scheduler?: IScheduler): ConnectableObservable; // hack to catch first omitted parameter
+ replay(selector: (source: ConnectableObservable) => Observable, bufferSize?: number, window?: number, scheduler?: IScheduler): Observable;
+ shareReplay(bufferSize?: number, window?: number, scheduler?: IScheduler): Observable;
+ }
+}
+
+declare module "rx-core-binding" {
+ export = Rx;
+}
diff --git a/rx-core-binding/tsconfig.json b/rx-core-binding/tsconfig.json
new file mode 100644
index 0000000000..87eb6217d4
--- /dev/null
+++ b/rx-core-binding/tsconfig.json
@@ -0,0 +1,19 @@
+{
+ "compilerOptions": {
+ "module": "commonjs",
+ "target": "es6",
+ "noImplicitAny": true,
+ "noImplicitThis": true,
+ "strictNullChecks": true,
+ "baseUrl": "../",
+ "typeRoots": [
+ "../"
+ ],
+ "types": [],
+ "noEmit": true,
+ "forceConsistentCasingInFileNames": true
+ },
+ "files": [
+ "index.d.ts"
+ ]
+}
diff --git a/rx-core-binding/tslint.json b/rx-core-binding/tslint.json
new file mode 100644
index 0000000000..c169b612d0
--- /dev/null
+++ b/rx-core-binding/tslint.json
@@ -0,0 +1,8 @@
+{
+ "extends": "../tslint.json",
+ "rules": {
+ "no-empty-interface": false,
+ "interface-name": false,
+ "no-single-declare-module": false
+ }
+}
diff --git a/rx-core/index.d.ts b/rx-core/index.d.ts
new file mode 100644
index 0000000000..62ef95ff80
--- /dev/null
+++ b/rx-core/index.d.ts
@@ -0,0 +1,75 @@
+// Type definitions for rx-core 4.0
+// Project: https://github.com/Reactive-Extensions/RxJS
+// Definitions by: gsino , Igor Oleinikov , Mizunashi Mana
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+declare namespace Rx {
+ /**
+ * Promise A+
+ */
+ export interface IPromise {
+ then(onFulfilled: (value: T) => IPromise, onRejected: (reason: any) => IPromise): IPromise;
+ then(onFulfilled: (value: T) => IPromise, onRejected?: (reason: any) => R): IPromise;
+ then(onFulfilled: (value: T) => R, onRejected: (reason: any) => IPromise): IPromise;
+ then(onFulfilled?: (value: T) => R, onRejected?: (reason: any) => R): IPromise;
+ }
+
+ export interface IDisposable {
+ dispose(): void;
+ }
+
+ export interface IScheduler {
+ catch(handler: (exception: any) => boolean): IScheduler;
+ catchException(handler: (exception: any) => boolean): IScheduler;
+ }
+
+ // Observer
+ export interface Observer {
+ checked(): Observer;
+ }
+
+ interface ObserverStatic {
+ /**
+ * Schedules the invocation of observer methods on the given scheduler.
+ * @param scheduler Scheduler to schedule observer messages on.
+ * @returns Observer whose messages are scheduled on the given scheduler.
+ */
+ notifyOn(scheduler: IScheduler): Observer;
+ }
+
+ export interface Observable {
+ observeOn(scheduler: IScheduler): Observable;
+ subscribeOn(scheduler: IScheduler): Observable;
+
+ amb(rightSource: IPromise | Observable): Observable;
+ onErrorResumeNext(second: IPromise | Observable): Observable;
+ bufferWithCount(count: number, skip?: number): Observable;
+ windowWithCount(count: number, skip?: number): Observable>;
+ defaultIfEmpty(defaultValue?: T): Observable;
+ distinct(skipParameter: boolean, valueSerializer: (value: T) => string): Observable;
+ distinct(keySelector?: (value: T) => TKey, keySerializer?: (key: TKey) => string): Observable;
+ groupBy(keySelector: (value: T) => TKey, skipElementSelector?: boolean, keySerializer?: (key: TKey) => string): Observable>;
+ groupBy(keySelector: (value: T) => TKey, elementSelector: (value: T) => TElement, keySerializer?: (key: TKey) => string): Observable>;
+ groupByUntil(keySelector: (value: T) => TKey, skipElementSelector: boolean, durationSelector: (group: GroupedObservable) => Observable, keySerializer?: (key: TKey) => string): Observable>;
+ groupByUntil(keySelector: (value: T) => TKey, elementSelector: (value: T) => TElement, durationSelector: (group: GroupedObservable) => Observable, keySerializer?: (key: TKey) => string): Observable>;
+ }
+
+ interface ObservableStatic {
+ using(resourceFactory: () => TResource, observableFactory: (resource: TResource) => Observable): Observable;
+ amb(...sources: Array>): Observable;
+ amb(...sources: Array>): Observable;
+ amb(sources: Array> | Array>): Observable;
+ onErrorResumeNext(...sources: Array>): Observable;
+ onErrorResumeNext(...sources: Array>): Observable;
+ onErrorResumeNext(sources: Array> | Array>): Observable;
+ }
+
+ interface GroupedObservable extends Observable {
+ key: TKey;
+ underlyingObservable: Observable;
+ }
+}
+
+declare module "rx-core" {
+ export = Rx;
+}
diff --git a/rx-core/tsconfig.json b/rx-core/tsconfig.json
new file mode 100644
index 0000000000..87eb6217d4
--- /dev/null
+++ b/rx-core/tsconfig.json
@@ -0,0 +1,19 @@
+{
+ "compilerOptions": {
+ "module": "commonjs",
+ "target": "es6",
+ "noImplicitAny": true,
+ "noImplicitThis": true,
+ "strictNullChecks": true,
+ "baseUrl": "../",
+ "typeRoots": [
+ "../"
+ ],
+ "types": [],
+ "noEmit": true,
+ "forceConsistentCasingInFileNames": true
+ },
+ "files": [
+ "index.d.ts"
+ ]
+}
diff --git a/rx-core/tslint.json b/rx-core/tslint.json
new file mode 100644
index 0000000000..e601518a4d
--- /dev/null
+++ b/rx-core/tslint.json
@@ -0,0 +1,9 @@
+{
+ "extends": "../tslint.json",
+ "rules": {
+ "unified-signatures": false,
+ "no-empty-interface": false,
+ "interface-name": false,
+ "no-single-declare-module": false
+ }
+}
diff --git a/rx-dom/index.d.ts b/rx-dom/index.d.ts
index d3897a2c47..00fca183d9 100644
--- a/rx-dom/index.d.ts
+++ b/rx-dom/index.d.ts
@@ -137,6 +137,6 @@ declare module Rx.DOM {
}
}
-declare module "rx.DOM" {
+declare module "rx-dom" {
export default Rx.DOM;
}
\ No newline at end of file
diff --git a/rx-dom/rx-dom-tests.ts b/rx-dom/rx-dom-tests.ts
index fb834ee9c6..4a97a9d0d4 100644
--- a/rx-dom/rx-dom-tests.ts
+++ b/rx-dom/rx-dom-tests.ts
@@ -1,4 +1,2 @@
-///
-
import * as Rx from 'rx';
-import * as DOM from 'rx.DOM';
\ No newline at end of file
+import * as DOM from 'rx-dom';
\ No newline at end of file
diff --git a/rx-lite-aggregates/index.d.ts b/rx-lite-aggregates/index.d.ts
new file mode 100644
index 0000000000..d09a4868f2
--- /dev/null
+++ b/rx-lite-aggregates/index.d.ts
@@ -0,0 +1,53 @@
+// Type definitions for rx-lite-aggregates 4.0
+// Project: https://github.com/Reactive-Extensions/RxJS
+// Definitions by: Carl de Billy , Igor Oleinikov
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+///
+
+declare namespace Rx {
+ export interface Observable {
+ finalValue(): Observable;
+ aggregate(accumulator: (acc: T, value: T) => T): Observable;
+ aggregate(seed: TAcc, accumulator: (acc: TAcc, value: T) => TAcc): Observable;
+
+ reduce(accumulator: (acc: T, value: T) => T): Observable;
+ reduce(accumulator: (acc: TAcc, value: T) => TAcc, seed: TAcc): Observable; // TS0.9.5: won't work https://typescript.codeplex.com/discussions/471751
+
+ any(predicate?: (value: T, index: number, source: Observable) => boolean, thisArg?: any): Observable;
+ some(predicate?: (value: T, index: number, source: Observable) => boolean, thisArg?: any): Observable; // alias for any
+
+ isEmpty(): Observable;
+ all(predicate?: (value: T) => boolean, thisArg?: any): Observable;
+ every(predicate?: (value: T) => boolean, thisArg?: any): Observable; // alias for all
+ contains(value: T): Observable;
+ contains(value: TOther, comparer: (value1: T, value2: TOther) => boolean): Observable;
+ count(predicate?: (value: T, index: number, source: Observable) => boolean, thisArg?: any): Observable;
+ sum(keySelector?: (value: T, index: number, source: Observable) => number, thisArg?: any): Observable;
+ minBy(keySelector: (item: T) => TKey, comparer: (value1: TKey, value2: TKey) => number): Observable;
+ minBy(keySelector: (item: T) => number): Observable;
+ min(comparer?: (value1: T, value2: T) => number): Observable;
+ maxBy(keySelector: (item: T) => TKey, comparer: (value1: TKey, value2: TKey) => number): Observable;
+ maxBy(keySelector: (item: T) => number): Observable;
+ max(comparer?: (value1: T, value2: T) => number): Observable;
+ average(keySelector?: (value: T, index: number, source: Observable) => number, thisArg?: any): Observable;
+
+ sequenceEqual(second: Observable, comparer: (value1: T, value2: TOther) => number): Observable;
+ sequenceEqual(second: IPromise, comparer: (value1: T, value2: TOther) => number): Observable;
+ sequenceEqual(second: Observable): Observable;
+ sequenceEqual(second: IPromise): Observable;
+ sequenceEqual(second: TOther[], comparer: (value1: T, value2: TOther) => number): Observable;
+ sequenceEqual(second: T[]): Observable;
+
+ elementAt(index: number): Observable;
+ single(predicate?: (value: T, index: number, source: Observable) => boolean, thisArg?: any): Observable;
+ first(predicate?: (value: T, index: number, source: Observable) => boolean, thisArg?: any): Observable;
+ last(predicate?: (value: T, index: number, source: Observable) => boolean, thisArg?: any): Observable;
+ find(predicate: (value: T, index: number, source: Observable) => boolean, thisArg?: any): Observable;
+ findIndex(predicate: (value: T, index: number, source: Observable) => boolean, thisArg?: any): Observable;
+ }
+}
+
+declare module "rx-lite-aggregates" {
+ export = Rx;
+}
diff --git a/rx-lite-aggregates/tsconfig.json b/rx-lite-aggregates/tsconfig.json
new file mode 100644
index 0000000000..87eb6217d4
--- /dev/null
+++ b/rx-lite-aggregates/tsconfig.json
@@ -0,0 +1,19 @@
+{
+ "compilerOptions": {
+ "module": "commonjs",
+ "target": "es6",
+ "noImplicitAny": true,
+ "noImplicitThis": true,
+ "strictNullChecks": true,
+ "baseUrl": "../",
+ "typeRoots": [
+ "../"
+ ],
+ "types": [],
+ "noEmit": true,
+ "forceConsistentCasingInFileNames": true
+ },
+ "files": [
+ "index.d.ts"
+ ]
+}
diff --git a/rx-lite-aggregates/tslint.json b/rx-lite-aggregates/tslint.json
new file mode 100644
index 0000000000..bd7d2217e3
--- /dev/null
+++ b/rx-lite-aggregates/tslint.json
@@ -0,0 +1,7 @@
+{
+ "extends": "../tslint.json",
+ "rules": {
+ "unified-signatures": false,
+ "no-single-declare-module": false
+ }
+}
diff --git a/rx-lite-async/index.d.ts b/rx-lite-async/index.d.ts
new file mode 100644
index 0000000000..d912f56d39
--- /dev/null
+++ b/rx-lite-async/index.d.ts
@@ -0,0 +1,49 @@
+// Type definitions for rx-lite-async 4.0
+// Project: https://github.com/Reactive-Extensions/RxJS
+// Definitions by: zoetrope , Igor Oleinikov
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+///
+
+declare namespace Rx {
+ interface ObservableStatic {
+ /**
+ * Invokes the asynchronous function, surfacing the result through an observable sequence.
+ * @param functionAsync Asynchronous function which returns a Promise to run.
+ * @returns An observable sequence exposing the function's result value, or an exception.
+ */
+ startAsync(functionAsync: () => IPromise): Observable;
+
+ start(func: () => T, context?: any, scheduler?: IScheduler): Observable;
+
+ toAsync(func: () => TResult, context?: any, scheduler?: IScheduler): () => Observable;
+ toAsync(func: (arg1: T1) => TResult, context?: any, scheduler?: IScheduler): (arg1: T1) => Observable;
+ toAsync(func: (arg1?: T1) => TResult, context?: any, scheduler?: IScheduler): (arg1?: T1) => Observable;
+ toAsync(func: (...args: T1[]) => TResult, context?: any, scheduler?: IScheduler): (...args: T1[]) => Observable;
+ toAsync(func: (arg1: T1, arg2: T2) => TResult, context?: any, scheduler?: IScheduler): (arg1: T1, arg2: T2) => Observable;
+ toAsync(func: (arg1: T1, arg2?: T2) => TResult, context?: any, scheduler?: IScheduler): (arg1: T1, arg2?: T2) => Observable;
+ toAsync(func: (arg1?: T1, arg2?: T2) => TResult, context?: any, scheduler?: IScheduler): (arg1?: T1, arg2?: T2) => Observable;
+ toAsync(func: (arg1: T1, ...args: T2[]) => TResult, context?: any, scheduler?: IScheduler): (arg1: T1, ...args: T2[]) => Observable;
+ toAsync(func: (arg1?: T1, ...args: T2[]) => TResult, context?: any, scheduler?: IScheduler): (arg1?: T1, ...args: T2[]) => Observable;
+ toAsync(func: (arg1: T1, arg2: T2, arg3: T3) => TResult, context?: any, scheduler?: IScheduler): (arg1: T1, arg2: T2, arg3: T3) => Observable;
+ toAsync(func: (arg1: T1, arg2: T2, arg3?: T3) => TResult, context?: any, scheduler?: IScheduler): (arg1: T1, arg2: T2, arg3?: T3) => Observable;
+ toAsync(func: (arg1: T1, arg2?: T2, arg3?: T3) => TResult, context?: any, scheduler?: IScheduler): (arg1: T1, arg2?: T2, arg3?: T3) => Observable;
+ toAsync(func: (arg1?: T1, arg2?: T2, arg3?: T3) => TResult, context?: any, scheduler?: IScheduler): (arg1?: T1, arg2?: T2, arg3?: T3) => Observable;
+ toAsync(func: (arg1: T1, arg2: T2, ...args: T3[]) => TResult, context?: any, scheduler?: IScheduler): (arg1: T1, arg2: T2, ...args: T3[]) => Observable;
+ toAsync(func: (arg1: T1, arg2?: T2, ...args: T3[]) => TResult, context?: any, scheduler?: IScheduler): (arg1: T1, arg2?: T2, ...args: T3[]) => Observable;
+ toAsync(func: (arg1?: T1, arg2?: T2, ...args: T3[]) => TResult, context?: any, scheduler?: IScheduler): (arg1?: T1, arg2?: T2, ...args: T3[]) => Observable;
+ toAsync(func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => TResult, context?: any, scheduler?: IScheduler): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Observable;
+ toAsync(func: (arg1: T1, arg2: T2, arg3: T3, arg4?: T4) => TResult, context?: any, scheduler?: IScheduler): (arg1: T1, arg2: T2, arg3: T3, arg4?: T4) => Observable;
+ toAsync(func: (arg1: T1, arg2: T2, arg3?: T3, arg4?: T4) => TResult, context?: any, scheduler?: IScheduler): (arg1: T1, arg2: T2, arg3?: T3, arg4?: T4) => Observable;
+ toAsync(func: (arg1: T1, arg2?: T2, arg3?: T3, arg4?: T4) => TResult, context?: any, scheduler?: IScheduler): (arg1: T1, arg2?: T2, arg3?: T3, arg4?: T4) => Observable;
+ toAsync(func: (arg1?: T1, arg2?: T2, arg3?: T3, arg4?: T4) => TResult, context?: any, scheduler?: IScheduler): (arg1?: T1, arg2?: T2, arg3?: T3, arg4?: T4) => Observable;
+ toAsync(func: (arg1: T1, arg2: T2, arg3: T3, ...args: T4[]) => TResult, context?: any, scheduler?: IScheduler): (arg1: T1, arg2: T2, arg3: T3, ...args: T4[]) => Observable;
+ toAsync(func: (arg1: T1, arg2: T2, arg3?: T3, ...args: T4[]) => TResult, context?: any, scheduler?: IScheduler): (arg1: T1, arg2: T2, arg3?: T3, ...args: T4[]) => Observable;
+ toAsync(func: (arg1: T1, arg2?: T2, arg3?: T3, ...args: T4[]) => TResult, context?: any, scheduler?: IScheduler): (arg1: T1, arg2?: T2, arg3?: T3, ...args: T4[]) => Observable;
+ toAsync(func: (arg1?: T1, arg2?: T2, arg3?: T3, ...args: T4[]) => TResult, context?: any, scheduler?: IScheduler): (arg1?: T1, arg2?: T2, arg3?: T3, ...args: T4[]) => Observable;
+ }
+}
+
+declare module "rx-lite-async" {
+ export = Rx;
+}
diff --git a/rx-lite-async/rx-lite-async-tests.ts b/rx-lite-async/rx-lite-async-tests.ts
new file mode 100644
index 0000000000..a8119fbb82
--- /dev/null
+++ b/rx-lite-async/rx-lite-async-tests.ts
@@ -0,0 +1,27 @@
+// Tests for RxJS-Async TypeScript definitions
+// Tests by Igor Oleinikov
+
+namespace Rx.Tests.Async {
+
+ var obsNum: Rx.Observable;
+ var obsStr: Rx.Observable;
+ var sch: Rx.IScheduler;
+
+ function start() {
+ obsNum = Rx.Observable.start(()=> 10, obsStr, sch);
+ obsNum = Rx.Observable.start(() => 10, obsStr);
+ obsNum = Rx.Observable.start(()=> 10);
+ }
+
+ function toAsync() {
+ obsNum = Rx.Observable.toAsync(()=> 1, sch)();
+ obsNum = Rx.Observable.toAsync((a1: number)=> a1)(1);
+ obsStr = Rx.Observable.toAsync((a1: string, a2: number)=> a1 + a2.toFixed(0))("", 1);
+ obsStr = Rx.Observable.toAsync((a1: string, a2: number, a3: Date)=> a1 + a2.toFixed(0) + a3.toDateString())("", 1, new Date());
+ obsStr = Rx.Observable.toAsync((a1: string, a2: number, a3: Date, a4: boolean)=> a1 + a2.toFixed(0) + a3.toDateString() + (a4 ? 1 : 0))("", 1, new Date(), false);
+ }
+
+ function startAsync() {
+ var o: Rx.Observable = Rx.Observable.startAsync(() => >{});
+ }
+}
diff --git a/rx-lite-async/tsconfig.json b/rx-lite-async/tsconfig.json
new file mode 100644
index 0000000000..24c1c4d4c3
--- /dev/null
+++ b/rx-lite-async/tsconfig.json
@@ -0,0 +1,20 @@
+{
+ "compilerOptions": {
+ "module": "commonjs",
+ "target": "es6",
+ "noImplicitAny": true,
+ "noImplicitThis": true,
+ "strictNullChecks": true,
+ "baseUrl": "../",
+ "typeRoots": [
+ "../"
+ ],
+ "types": [],
+ "noEmit": true,
+ "forceConsistentCasingInFileNames": true
+ },
+ "files": [
+ "index.d.ts",
+ "rx-lite-async-tests.ts"
+ ]
+}
diff --git a/rx-lite-async/tslint.json b/rx-lite-async/tslint.json
new file mode 100644
index 0000000000..cfdf2986e5
--- /dev/null
+++ b/rx-lite-async/tslint.json
@@ -0,0 +1,6 @@
+{
+ "extends": "../tslint.json",
+ "rules": {
+ "no-single-declare-module": false
+ }
+}
diff --git a/rx-lite-backpressure/index.d.ts b/rx-lite-backpressure/index.d.ts
new file mode 100644
index 0000000000..2584cb8a36
--- /dev/null
+++ b/rx-lite-backpressure/index.d.ts
@@ -0,0 +1,52 @@
+// Type definitions for rx-lite-backpressure 4.0
+// Project: https://github.com/Reactive-Extensions/RxJS
+// Definitions by: Igor Oleinikov