Skip to content

Commit

Permalink
Merge pull request #3022 from davidkpiano/issue-3020
Browse files Browse the repository at this point in the history
fix(TSC): Fixing TSC errors. Fixes #3020
  • Loading branch information
kwonoj authored Nov 5, 2017
2 parents 8275cef + 01d1575 commit be70534
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 be70534

Please sign in to comment.