Skip to content

Commit

Permalink
fix(TSC): Fixing TSC errors. Fixes #3020
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkpiano committed Oct 30, 2017
1 parent 2f395da commit 01d1575
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 22 deletions.
42 changes: 22 additions & 20 deletions spec/helpers/test-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,27 @@ export function lowerCaseO<T>(...args: Array<any>): Rx.Observable<T> {
return <any>o;
};

export const createObservableInputs = <T>(value: T) => Rx.Observable.of<ObservableInput<T>>(
Rx.Observable.of<T>(value),
Rx.Observable.of<T>(value, Rx.Scheduler.async),
[value],
Promise.resolve(value),
<any>({
[$$iterator]: () => {
const iteratorResults = [
{ value, done: false },
{ done: true }
];
return {
next: () => {
return iteratorResults.shift();
}
};
}
}),
<any>({ [$$symbolObservable]: () => Rx.Observable.of(value) })
);
export function createObservableInputs<T>(value: T): Rx.Observable<ObservableInput<T>> {
return Rx.Observable.of<ObservableInput<T>>(
Rx.Observable.of<T>(value),
Rx.Observable.of<T>(value, Rx.Scheduler.async),
[value],
Promise.resolve(value),
<any>({
[$$iterator]: () => {
const iteratorResults = [
{ value, done: false },
{ done: true }
];
return {
next: () => {
return iteratorResults.shift();
}
};
}
}),
<any>({ [$$symbolObservable]: () => Rx.Observable.of(value) })
);
}

global.__root__ = root;
5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@
"es2015.collection",
"es2015.promise",
"dom"
]
],
"types": ["mocha", "node"]
},
"formatCodeOptions": {
"indentSize": 2,
"tabSize": 2
}
}
}

0 comments on commit 01d1575

Please sign in to comment.