From 1f78345e0ed4f31ae5aee8c01798d90d518f7b3d Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Fri, 17 Feb 2017 06:13:33 +0200 Subject: [PATCH] docs(*): several fixes * docs(bindCallback): fix typo * docs(bindNodeCallback): fix typo * docs(max): add missing param name * docs(min): add missing param name * docs(multicast): add missing param names * docs(publish): add missing param name * docs(repeat): remove non-existent `scheduler` param * docs(reduce): remove redundant, ignored `@return` tag * docs(retry): add missing param name and improve description * docs(repeatWhen): fix docs Fixes include: - Remove non-existent `scheduler` param. - Add missing param name and type for `notifier`. - Fix some typos. - Improve description (model after `retryWhen` for consistency). fixup! docs(repeatWhen): fix docs * docs(single): add missing param name * docs(retryWhen): fix docs Fixes include: - Remove non-existent `scheduler` param. - Add missing param name and type for `notifier`. - Fix some typos. - Improve description. * docs(skip): add missing param name * docs(skipUntil): add missing param name * docs(startWith): fix docs Fixes include: - Add missing, optional param `scheduler`. - Add missing param name for `values`. - Change param type (`Values` --> .`..T`) and description (new description based on that of `Observable#of()`). * docs(subscribeOn): add missing param name * docs(switchMapTo): remove redundant, ignored `@return` tag * docs(throw): fix typo * docs(*): ensure param descriptions are capitalized --- src/observable/BoundCallbackObservable.ts | 2 +- src/observable/BoundNodeCallbackObservable.ts | 2 +- src/observable/ErrorObservable.ts | 2 +- src/operator/catch.ts | 2 +- src/operator/concatMap.ts | 2 +- src/operator/distinct.ts | 6 +++--- src/operator/distinctUntilChanged.ts | 4 ++-- src/operator/distinctUntilKeyChanged.ts | 6 +++--- src/operator/every.ts | 6 +++--- src/operator/exhaust.ts | 5 ++--- src/operator/finally.ts | 4 ++-- src/operator/first.ts | 2 +- src/operator/groupBy.ts | 8 ++++---- src/operator/ignoreElements.ts | 2 +- src/operator/isEmpty.ts | 2 +- src/operator/last.ts | 4 ++-- src/operator/max.ts | 6 +++--- src/operator/merge.ts | 2 +- src/operator/min.ts | 5 +++-- src/operator/multicast.ts | 6 +++--- src/operator/pluck.ts | 3 +-- src/operator/publish.ts | 6 +++--- src/operator/race.ts | 6 +++--- src/operator/reduce.ts | 1 - src/operator/repeat.ts | 7 +++---- src/operator/repeatWhen.ts | 16 +++++++--------- src/operator/retry.ts | 11 +++++------ src/operator/retryWhen.ts | 16 +++++++--------- src/operator/sequenceEqual.ts | 4 ++-- src/operator/share.ts | 2 +- src/operator/single.ts | 4 ++-- src/operator/skip.ts | 10 +++++----- src/operator/skipUntil.ts | 4 ++-- src/operator/skipWhile.ts | 4 ++-- src/operator/startWith.ts | 10 ++++++---- src/operator/subscribeOn.ts | 4 ++-- src/operator/switchMapTo.ts | 2 -- 37 files changed, 90 insertions(+), 98 deletions(-) diff --git a/src/observable/BoundCallbackObservable.ts b/src/observable/BoundCallbackObservable.ts index dcc95cac5e..df51a17da0 100644 --- a/src/observable/BoundCallbackObservable.ts +++ b/src/observable/BoundCallbackObservable.ts @@ -74,7 +74,7 @@ export class BoundCallbackObservable extends Observable { * * @param {function} func Function with a callback as the last parameter. * @param {function} [selector] A function which takes the arguments from the - * callback and maps those a value to emit on the output Observable. + * callback and maps those to a value to emit on the output Observable. * @param {Scheduler} [scheduler] The scheduler on which to schedule the * callbacks. * @return {function(...params: *): Observable} A function which returns the diff --git a/src/observable/BoundNodeCallbackObservable.ts b/src/observable/BoundNodeCallbackObservable.ts index 8eac5e1533..3bc7574155 100644 --- a/src/observable/BoundNodeCallbackObservable.ts +++ b/src/observable/BoundNodeCallbackObservable.ts @@ -61,7 +61,7 @@ export class BoundNodeCallbackObservable extends Observable { * * @param {function} func Function with a callback as the last parameter. * @param {function} [selector] A function which takes the arguments from the - * callback and maps those a value to emit on the output Observable. + * callback and maps those to a value to emit on the output Observable. * @param {Scheduler} [scheduler] The scheduler on which to schedule the * callbacks. * @return {function(...params: *): Observable} A function which returns the diff --git a/src/observable/ErrorObservable.ts b/src/observable/ErrorObservable.ts index c76bd85f38..b369921f31 100644 --- a/src/observable/ErrorObservable.ts +++ b/src/observable/ErrorObservable.ts @@ -31,7 +31,7 @@ export class ErrorObservable extends Observable { * var result = Rx.Observable.throw(new Error('oops!')).startWith(7); * result.subscribe(x => console.log(x), e => console.error(e)); * - * @example Map and flattens numbers to the sequence 'a', 'b', 'c', but throw an error for 13 + * @example Map and flatten numbers to the sequence 'a', 'b', 'c', but throw an error for 13 * var interval = Rx.Observable.interval(1000); * var result = interval.mergeMap(x => * x === 13 ? diff --git a/src/operator/catch.ts b/src/operator/catch.ts index 961ff4f953..7624fc7191 100644 --- a/src/operator/catch.ts +++ b/src/operator/catch.ts @@ -58,7 +58,7 @@ import { subscribeToResult } from '../util/subscribeToResult'; * @param {function} selector a function that takes as arguments `err`, which is the error, and `caught`, which * is the source observable, in case you'd like to "retry" that observable by returning it again. Whatever observable * is returned by the `selector` will be used to continue the observable chain. - * @return {Observable} an observable that originates from either the source or the observable returned by the + * @return {Observable} An observable that originates from either the source or the observable returned by the * catch `selector` function. * @method catch * @name catch diff --git a/src/operator/concatMap.ts b/src/operator/concatMap.ts index fc0280bb23..fcf5aa260c 100644 --- a/src/operator/concatMap.ts +++ b/src/operator/concatMap.ts @@ -58,7 +58,7 @@ export function concatMap(this: Observable, project: (value: T, inde * - `innerValue`: the value that came from the projected Observable * - `outerIndex`: the "index" of the value that came from the source * - `innerIndex`: the "index" of the value from the projected Observable - * @return {Observable} an observable of values merged from the projected + * @return {Observable} An observable of values merged from the projected * Observables as they were subscribed to, one at a time. Optionally, these * values may have been projected from a passed `projectResult` argument. * @return {Observable} An Observable that emits the result of applying the diff --git a/src/operator/distinct.ts b/src/operator/distinct.ts index b89ff14289..a781dbd1b4 100644 --- a/src/operator/distinct.ts +++ b/src/operator/distinct.ts @@ -46,9 +46,9 @@ import { ISet, Set } from '../util/Set'; * @see {@link distinctUntilChanged} * @see {@link distinctUntilKeyChanged} * - * @param {function} [keySelector] optional function to select which value you want to check as distinct. - * @param {Observable} [flushes] optional Observable for flushing the internal HashSet of the operator. - * @return {Observable} an Observable that emits items from the source Observable with distinct values. + * @param {function} [keySelector] Optional function to select which value you want to check as distinct. + * @param {Observable} [flushes] Optional Observable for flushing the internal HashSet of the operator. + * @return {Observable} An Observable that emits items from the source Observable with distinct values. * @method distinct * @owner Observable */ diff --git a/src/operator/distinctUntilChanged.ts b/src/operator/distinctUntilChanged.ts index 354cda140f..525067fea2 100644 --- a/src/operator/distinctUntilChanged.ts +++ b/src/operator/distinctUntilChanged.ts @@ -44,8 +44,8 @@ export function distinctUntilChanged(this: Observable, compare: (x: K, * @see {@link distinct} * @see {@link distinctUntilKeyChanged} * - * @param {function} [compare] optional comparison function called to test if an item is distinct from the previous item in the source. - * @return {Observable} an Observable that emits items from the source Observable with distinct values. + * @param {function} [compare] Optional comparison function called to test if an item is distinct from the previous item in the source. + * @return {Observable} An Observable that emits items from the source Observable with distinct values. * @method distinctUntilChanged * @owner Observable */ diff --git a/src/operator/distinctUntilKeyChanged.ts b/src/operator/distinctUntilKeyChanged.ts index 7447d75391..147fc8f40f 100644 --- a/src/operator/distinctUntilKeyChanged.ts +++ b/src/operator/distinctUntilKeyChanged.ts @@ -57,9 +57,9 @@ export function distinctUntilKeyChanged(this: Observable, key: string, * @see {@link distinct} * @see {@link distinctUntilChanged} * - * @param {string} key string key for object property lookup on each item. - * @param {function} [compare] optional comparison function called to test if an item is distinct from the previous item in the source. - * @return {Observable} an Observable that emits items from the source Observable with distinct values based on the key specified. + * @param {string} key String key for object property lookup on each item. + * @param {function} [compare] Optional comparison function called to test if an item is distinct from the previous item in the source. + * @return {Observable} An Observable that emits items from the source Observable with distinct values based on the key specified. * @method distinctUntilKeyChanged * @owner Observable */ diff --git a/src/operator/every.ts b/src/operator/every.ts index 963dae16dd..9bdcbf76c3 100644 --- a/src/operator/every.ts +++ b/src/operator/every.ts @@ -11,9 +11,9 @@ import { Subscriber } from '../Subscriber'; * .every(x => x < 5) * .subscribe(x => console.log(x)); // -> false * - * @param {function} predicate a function for determining if an item meets a specified condition. - * @param {any} [thisArg] optional object to use for `this` in the callback - * @return {Observable} an Observable of booleans that determines if all items of the source Observable meet the condition specified. + * @param {function} predicate A function for determining if an item meets a specified condition. + * @param {any} [thisArg] Optional object to use for `this` in the callback. + * @return {Observable} An Observable of booleans that determines if all items of the source Observable meet the condition specified. * @method every * @owner Observable */ diff --git a/src/operator/exhaust.ts b/src/operator/exhaust.ts index 930b6bb376..7cd9f5f1b8 100644 --- a/src/operator/exhaust.ts +++ b/src/operator/exhaust.ts @@ -35,9 +35,8 @@ import { subscribeToResult } from '../util/subscribeToResult'; * @see {@link exhaustMap} * @see {@link zipAll} * - * @return {Observable} Returns an Observable that takes a source of Observables - * and propagates the first observable exclusively until it completes before - * subscribing to the next. + * @return {Observable} An Observable that takes a source of Observables and propagates the first observable + * exclusively until it completes before subscribing to the next. * @method exhaust * @owner Observable */ diff --git a/src/operator/finally.ts b/src/operator/finally.ts index 2ccd7b6934..269858a580 100644 --- a/src/operator/finally.ts +++ b/src/operator/finally.ts @@ -6,8 +6,8 @@ import { Observable } from '../Observable'; /** * Returns an Observable that mirrors the source Observable, but will call a specified function when * the source terminates on complete or error. - * @param {function} callback function to be called when source terminates. - * @return {Observable} an Observable that mirrors the source, but will call the specified function on termination. + * @param {function} callback Function to be called when source terminates. + * @return {Observable} An Observable that mirrors the source, but will call the specified function on termination. * @method finally * @owner Observable */ diff --git a/src/operator/first.ts b/src/operator/first.ts index e5a42afe01..cb6d09baf4 100644 --- a/src/operator/first.ts +++ b/src/operator/first.ts @@ -68,7 +68,7 @@ export function first(this: Observable, * - `index`: the "index" of the value from the source. * @param {R} [defaultValue] The default value emitted in case no valid value * was found on the source. - * @return {Observable} an Observable of the first item that matches the + * @return {Observable} An Observable of the first item that matches the * condition. * @method first * @owner Observable diff --git a/src/operator/groupBy.ts b/src/operator/groupBy.ts index a64a12f749..594f8cb2cc 100644 --- a/src/operator/groupBy.ts +++ b/src/operator/groupBy.ts @@ -20,14 +20,14 @@ export function groupBy(this: Observable, keySelector: (value: T) => * * * - * @param {function(value: T): K} keySelector a function that extracts the key + * @param {function(value: T): K} keySelector A function that extracts the key * for each item. - * @param {function(value: T): R} [elementSelector] a function that extracts the + * @param {function(value: T): R} [elementSelector] A function that extracts the * return element for each item. * @param {function(grouped: GroupedObservable): Observable} [durationSelector] - * a function that returns an Observable to determine how long each group should + * A function that returns an Observable to determine how long each group should * exist. - * @return {Observable>} an Observable that emits + * @return {Observable>} An Observable that emits * GroupedObservables, each of which corresponds to a unique key value and each * of which emits those items from the source Observable that share that key * value. diff --git a/src/operator/ignoreElements.ts b/src/operator/ignoreElements.ts index e3ddb8e3ad..23727ead2e 100644 --- a/src/operator/ignoreElements.ts +++ b/src/operator/ignoreElements.ts @@ -8,7 +8,7 @@ import { noop } from '../util/noop'; * * * - * @return {Observable} an empty Observable that only calls `complete` + * @return {Observable} An empty Observable that only calls `complete` * or `error`, based on which one is called by the source Observable. * @method ignoreElements * @owner Observable diff --git a/src/operator/isEmpty.ts b/src/operator/isEmpty.ts index beeeec61c4..b086d45183 100644 --- a/src/operator/isEmpty.ts +++ b/src/operator/isEmpty.ts @@ -7,7 +7,7 @@ import { Observable } from '../Observable'; * * * - * @return {Observable} an Observable that emits a Boolean. + * @return {Observable} An Observable that emits a Boolean. * @method isEmpty * @owner Observable */ diff --git a/src/operator/last.ts b/src/operator/last.ts index ac4c21bc47..04a298964b 100644 --- a/src/operator/last.ts +++ b/src/operator/last.ts @@ -35,8 +35,8 @@ export function last(this: Observable, * * @throws {EmptyError} Delivers an EmptyError to the Observer's `error` * callback if the Observable completes before any `next` notification was sent. - * @param {function} predicate - the condition any source emitted item has to satisfy. - * @return {Observable} an Observable that emits only the last item satisfying the given condition + * @param {function} predicate - The condition any source emitted item has to satisfy. + * @return {Observable} An Observable that emits only the last item satisfying the given condition * from the source, or an NoSuchElementException if no such items are emitted. * @throws - Throws if no items that match the predicate are emitted by the source Observable. * @method last diff --git a/src/operator/max.ts b/src/operator/max.ts index fa9b53970b..eedcd7b97a 100644 --- a/src/operator/max.ts +++ b/src/operator/max.ts @@ -26,9 +26,9 @@ import { ReduceOperator } from './reduce'; * * @see {@link min} * - * @param {Function} optional comparer function that it will use instead of its default to compare the value of two - * items. - * @return {Observable} an Observable that emits item with the largest value. + * @param {Function} [comparer] - Optional comparer function that it will use instead of its default to compare the + * value of two items. + * @return {Observable} An Observable that emits item with the largest value. * @method max * @owner Observable */ diff --git a/src/operator/merge.ts b/src/operator/merge.ts index 51f9b4ab60..25568fd5ff 100644 --- a/src/operator/merge.ts +++ b/src/operator/merge.ts @@ -62,7 +62,7 @@ export function merge(this: Observable, ...observables: Array} an Observable that emits item with the smallest value. + * @param {Function} [comparer] - Optional comparer function that it will use instead of its default to compare the + * value of two items. + * @return {Observable} An Observable that emits item with the smallest value. * @method min * @owner Observable */ diff --git a/src/operator/multicast.ts b/src/operator/multicast.ts index 4cbece5292..75a71cf0c5 100644 --- a/src/operator/multicast.ts +++ b/src/operator/multicast.ts @@ -15,14 +15,14 @@ export function multicast(SubjectFactory: (this: Observable) => Subject * * * - * @param {Function|Subject} Factory function to create an intermediate subject through + * @param {Function|Subject} subjectOrSubjectFactory - Factory function to create an intermediate subject through * which the source sequence's elements will be multicast to the selector function * or Subject to push source elements into. - * @param {Function} Optional selector function that can use the multicasted source stream + * @param {Function} [selector] - Optional selector function that can use the multicasted source stream * as many times as needed, without causing multiple subscriptions to the source stream. * Subscribers to the given source will receive all notifications of the source from the * time of the subscription forward. - * @return {Observable} an Observable that emits the results of invoking the selector + * @return {Observable} An Observable that emits the results of invoking the selector * on the items emitted by a `ConnectableObservable` that shares a single subscription to * the underlying stream. * @method multicast diff --git a/src/operator/pluck.ts b/src/operator/pluck.ts index acc5b77f8b..f2597070da 100644 --- a/src/operator/pluck.ts +++ b/src/operator/pluck.ts @@ -23,8 +23,7 @@ import { map } from './map'; * * @param {...string} properties The nested properties to pluck from each source * value (an object). - * @return {Observable} Returns a new Observable of property values from the - * source values. + * @return {Observable} A new Observable of property values from the source values. * @method pluck * @owner Observable */ diff --git a/src/operator/publish.ts b/src/operator/publish.ts index c18b6bf7b2..a2e8dc1c95 100644 --- a/src/operator/publish.ts +++ b/src/operator/publish.ts @@ -14,10 +14,10 @@ export function publish(this: Observable, selector: selector): Observab * * * - * @param {Function} Optional selector function which can use the multicasted source sequence as many times as needed, - * without causing multiple subscriptions to the source sequence. + * @param {Function} [selector] - Optional selector function which can use the multicasted source sequence as many times + * as needed, without causing multiple subscriptions to the source sequence. * Subscribers to the given source will receive all notifications of the source from the time of the subscription on. - * @return a ConnectableObservable that upon connection causes the source Observable to emit items to its Observers. + * @return A ConnectableObservable that upon connection causes the source Observable to emit items to its Observers. * @method publish * @owner Observable */ diff --git a/src/operator/race.ts b/src/operator/race.ts index a36f3fd83b..f9c30854f4 100644 --- a/src/operator/race.ts +++ b/src/operator/race.ts @@ -15,9 +15,9 @@ export function race(this: Observable, ...observables: Array(this: Observable, accumulator: (acc: R, value: T * @param {function(acc: R, value: T, index: number): R} accumulator The accumulator function * called on each source value. * @param {R} [seed] The initial accumulation value. - * @return {Observable} An observable of the accumulated values. * @return {Observable} An Observable that emits a single value that is the * result of accumulating the values emitted by the source Observable. * @method reduce diff --git a/src/operator/repeat.ts b/src/operator/repeat.ts index 82ea20aacf..315a2173f3 100644 --- a/src/operator/repeat.ts +++ b/src/operator/repeat.ts @@ -5,14 +5,13 @@ import { EmptyObservable } from '../observable/EmptyObservable'; import { TeardownLogic } from '../Subscription'; /** - * Returns an Observable that repeats the stream of items emitted by the source Observable at most count times, - * on a particular IScheduler. + * Returns an Observable that repeats the stream of items emitted by the source Observable at most count times. * * * - * @param {number} [count] the number of times the source Observable items are repeated, a count of 0 will yield + * @param {number} [count] The number of times the source Observable items are repeated, a count of 0 will yield * an empty Observable. - * @return {Observable} an Observable that repeats the stream of items emitted by the source Observable at most + * @return {Observable} An Observable that repeats the stream of items emitted by the source Observable at most * count times. * @method repeat * @owner Observable diff --git a/src/operator/repeatWhen.ts b/src/operator/repeatWhen.ts index e70c316763..75b03fb0a9 100644 --- a/src/operator/repeatWhen.ts +++ b/src/operator/repeatWhen.ts @@ -11,18 +11,16 @@ import { InnerSubscriber } from '../InnerSubscriber'; import { subscribeToResult } from '../util/subscribeToResult'; /** - * Returns an Observable that emits the same values as the source observable with the exception of a `complete`. - * A `complete` will cause the emission of the Throwable that cause the complete to the Observable returned from - * notificationHandler. If that Observable calls onComplete or `complete` then retry will call `complete` or `error` - * on the child subscription. Otherwise, this Observable will resubscribe to the source observable, on a particular - * IScheduler. + * Returns an Observable that mirrors the source Observable with the exception of a `complete`. If the source + * Observable calls `complete`, this method will emit to the Observable returned from `notifier`. If that Observable + * calls `complete` or `error`, then this method will call `complete` or `error` on the child subscription. Otherwise + * this method will resubscribe to the source Observable. * * * - * @param {notificationHandler} receives an Observable of notifications with which a user can `complete` or `error`, - * aborting the retry. - * @param {scheduler} the IScheduler on which to subscribe to the source Observable. - * @return {Observable} the source Observable modified with retry logic. + * @param {function(notifications: Observable): Observable} notifier - Receives an Observable of notifications with + * which a user can `complete` or `error`, aborting the repetition. + * @return {Observable} The source Observable modified with repeat logic. * @method repeatWhen * @owner Observable */ diff --git a/src/operator/retry.ts b/src/operator/retry.ts index 30acb31d0d..d262d0ab8c 100644 --- a/src/operator/retry.ts +++ b/src/operator/retry.ts @@ -4,10 +4,9 @@ import { Observable } from '../Observable'; import { TeardownLogic } from '../Subscription'; /** - * Returns an Observable that mirrors the source Observable, resubscribing to it if it calls `error` and the - * predicate returns true for that specific exception and retry count. - * If the source Observable calls `error`, this method will resubscribe to the source Observable for a maximum of - * count resubscriptions (given as a number parameter) rather than propagating the `error` call. + * Returns an Observable that mirrors the source Observable with the exception of an `error`. If the source Observable + * calls `error`, this method will resubscribe to the source Observable for a maximum of `count` resubscriptions (given + * as a number parameter) rather than propagating the `error` call. * * * @@ -15,8 +14,8 @@ import { TeardownLogic } from '../Subscription'; * during failed subscriptions. For example, if an Observable fails at first but emits [1, 2] then succeeds the second * time and emits: [1, 2, 3, 4, 5] then the complete stream of emissions and notifications * would be: [1, 2, 1, 2, 3, 4, 5, `complete`]. - * @param {number} number of retry attempts before failing. - * @return {Observable} the source Observable modified with the retry logic. + * @param {number} count - Number of retry attempts before failing. + * @return {Observable} The source Observable modified with the retry logic. * @method retry * @owner Observable */ diff --git a/src/operator/retryWhen.ts b/src/operator/retryWhen.ts index 2f7c1a6db3..e28b86c419 100644 --- a/src/operator/retryWhen.ts +++ b/src/operator/retryWhen.ts @@ -11,18 +11,16 @@ import { InnerSubscriber } from '../InnerSubscriber'; import { subscribeToResult } from '../util/subscribeToResult'; /** - * Returns an Observable that emits the same values as the source observable with the exception of an `error`. - * An `error` will cause the emission of the Throwable that cause the error to the Observable returned from - * notificationHandler. If that Observable calls onComplete or `error` then retry will call `complete` or `error` - * on the child subscription. Otherwise, this Observable will resubscribe to the source observable, on a particular - * IScheduler. + * Returns an Observable that mirrors the source Observable with the exception of an `error`. If the source Observable + * calls `error`, this method will emit the Throwable that caused the error to the Observable returned from `notifier`. + * If that Observable calls `complete` or `error` then this method will call `complete` or `error` on the child + * subscription. Otherwise this method will resubscribe to the source Observable. * * * - * @param {notificationHandler} receives an Observable of notifications with which a user can `complete` or `error`, - * aborting the retry. - * @param {scheduler} the IScheduler on which to subscribe to the source Observable. - * @return {Observable} the source Observable modified with retry logic. + * @param {function(errors: Observable): Observable} notifier - Receives an Observable of notifications with which a + * user can `complete` or `error`, aborting the retry. + * @return {Observable} The source Observable modified with retry logic. * @method retryWhen * @owner Observable */ diff --git a/src/operator/sequenceEqual.ts b/src/operator/sequenceEqual.ts index 2bcf69f6a9..ed4444405b 100644 --- a/src/operator/sequenceEqual.ts +++ b/src/operator/sequenceEqual.ts @@ -50,10 +50,10 @@ import { errorObject } from '../util/errorObject'; * @see {@link zip} * @see {@link withLatestFrom} * - * @param {Observable} compareTo the observable sequence to compare the source sequence to. + * @param {Observable} compareTo The observable sequence to compare the source sequence to. * @param {function} [comparor] An optional function to compare each value pair * @return {Observable} An Observable of a single boolean value representing whether or not - * the values emitted by both observables were equal in sequence + * the values emitted by both observables were equal in sequence. * @method sequenceEqual * @owner Observable */ diff --git a/src/operator/share.ts b/src/operator/share.ts index 98d218af68..973a672963 100644 --- a/src/operator/share.ts +++ b/src/operator/share.ts @@ -14,7 +14,7 @@ function shareSubjectFactory() { * * * - * @return {Observable} an Observable that upon connection causes the source Observable to emit items to its Observers + * @return {Observable} An Observable that upon connection causes the source Observable to emit items to its Observers. * @method share * @owner Observable */ diff --git a/src/operator/single.ts b/src/operator/single.ts index 0bb67b5ad6..385f2b85da 100644 --- a/src/operator/single.ts +++ b/src/operator/single.ts @@ -14,8 +14,8 @@ import { TeardownLogic } from '../Subscription'; * * @throws {EmptyError} Delivers an EmptyError to the Observer's `error` * callback if the Observable completes before any `next` notification was sent. - * @param {Function} a predicate function to evaluate items emitted by the source Observable. - * @return {Observable} an Observable that emits the single item emitted by the source Observable that matches + * @param {Function} predicate - A predicate function to evaluate items emitted by the source Observable. + * @return {Observable} An Observable that emits the single item emitted by the source Observable that matches * the predicate. . * @method single diff --git a/src/operator/skip.ts b/src/operator/skip.ts index 0a4515c85c..7b1cb7d89b 100644 --- a/src/operator/skip.ts +++ b/src/operator/skip.ts @@ -4,18 +4,18 @@ import { Observable } from '../Observable'; import { TeardownLogic } from '../Subscription'; /** - * Returns an Observable that skips `n` items emitted by an Observable. + * Returns an Observable that skips the first `count` items emitted by the source Observable. * * * - * @param {Number} the `n` of times, items emitted by source Observable should be skipped. - * @return {Observable} an Observable that skips values emitted by the source Observable. + * @param {Number} count - The number of times, items emitted by source Observable should be skipped. + * @return {Observable} An Observable that skips values emitted by the source Observable. * * @method skip * @owner Observable */ -export function skip(this: Observable, total: number): Observable { - return this.lift(new SkipOperator(total)); +export function skip(this: Observable, count: number): Observable { + return this.lift(new SkipOperator(count)); } class SkipOperator implements Operator { diff --git a/src/operator/skipUntil.ts b/src/operator/skipUntil.ts index c4cd29db34..993499c371 100644 --- a/src/operator/skipUntil.ts +++ b/src/operator/skipUntil.ts @@ -11,9 +11,9 @@ import { subscribeToResult } from '../util/subscribeToResult'; * * * - * @param {Observable} the second Observable that has to emit an item before the source Observable's elements begin to + * @param {Observable} notifier - The second Observable that has to emit an item before the source Observable's elements begin to * be mirrored by the resulting Observable. - * @return {Observable} an Observable that skips items from the source Observable until the second Observable emits + * @return {Observable} An Observable that skips items from the source Observable until the second Observable emits * an item, then emits the remaining items. * @method skipUntil * @owner Observable diff --git a/src/operator/skipWhile.ts b/src/operator/skipWhile.ts index 24d108e90a..6f93e723f5 100644 --- a/src/operator/skipWhile.ts +++ b/src/operator/skipWhile.ts @@ -9,8 +9,8 @@ import { TeardownLogic } from '../Subscription'; * * * - * @param {Function} predicate - a function to test each item emitted from the source Observable. - * @return {Observable} an Observable that begins emitting items emitted by the source Observable when the + * @param {Function} predicate - A function to test each item emitted from the source Observable. + * @return {Observable} An Observable that begins emitting items emitted by the source Observable when the * specified predicate becomes false. * @method skipWhile * @owner Observable diff --git a/src/operator/startWith.ts b/src/operator/startWith.ts index 55b540c7ee..e4a33b06d5 100644 --- a/src/operator/startWith.ts +++ b/src/operator/startWith.ts @@ -17,13 +17,15 @@ export function startWith(this: Observable, ...array: Array * - * @param {Values} an Iterable that contains the items you want the modified Observable to emit first. - * @return {Observable} an Observable that emits the items in the specified Iterable and then emits the items + * @param {...T} values - Items you want the modified Observable to emit first. + * @param {Scheduler} [scheduler] - A {@link IScheduler} to use for scheduling + * the emissions of the `next` notifications. + * @return {Observable} An Observable that emits the items in the specified Iterable and then emits the items * emitted by the source Observable. * @method startWith * @owner Observable diff --git a/src/operator/subscribeOn.ts b/src/operator/subscribeOn.ts index 17a4b595f5..f68b7a644a 100644 --- a/src/operator/subscribeOn.ts +++ b/src/operator/subscribeOn.ts @@ -10,8 +10,8 @@ import { SubscribeOnObservable } from '../observable/SubscribeOnObservable'; * * * - * @param {Scheduler} the IScheduler to perform subscription actions on. - * @return {Observable} the source Observable modified so that its subscriptions happen on the specified IScheduler + * @param {Scheduler} scheduler - The IScheduler to perform subscription actions on. + * @return {Observable} The source Observable modified so that its subscriptions happen on the specified IScheduler. . * @method subscribeOn * @owner Observable diff --git a/src/operator/switchMapTo.ts b/src/operator/switchMapTo.ts index 7d44126949..63cc5a2855 100644 --- a/src/operator/switchMapTo.ts +++ b/src/operator/switchMapTo.ts @@ -47,8 +47,6 @@ export function switchMapTo(this: Observable, observable: Observable * - `outerIndex`: the "index" of the value that came from the source * - `innerIndex`: the "index" of the value from the projected Observable * @return {Observable} An Observable that emits items from the given - * `innerObservable` every time a value is emitted on the source Observable. - * @return {Observable} An Observable that emits items from the given * `innerObservable` (and optionally transformed through `resultSelector`) every * time a value is emitted on the source Observable, and taking only the values * from the most recently projected inner Observable.