Skip to content
This repository was archived by the owner on Oct 1, 2018. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 26 additions & 18 deletions src/operator-docs/combination/combineLatest.ts
Original file line number Diff line number Diff line change
@@ -1,34 +1,42 @@
import { OperatorDoc } from "../operator.model";
import { OperatorDoc } from '../operator.model';

export const combineLatest: OperatorDoc = {
name: "combineLatest",
operatorType: "combination",
name: 'combineLatest',
operatorType: 'combination',
signature:
"public combineLatest(observables: ...Observable, project: function): Observable",
'public combineLatest(observables: ...Observable, project: function): Observable',
useInteractiveMarbles: true,
parameters: [
{
name: "other",
type: "Observable",
attribute: "",
name: 'other',
type: 'Observable',
attribute: '',
description:
"An input Observable to combine with the source Observable. More than one input Observables may be given as argument."
'An input Observable to combine with the source Observable. More than one input Observables may be given as argument.'
},
{
name: "other",
type: "function",
attribute: "optional",
name: 'other',
type: 'function',
attribute: 'optional',
description:
"An optional function to project the values from the combined latest values into a new value on the output Observable."
'An optional function to project the values from the combined latest values into a new value on the output Observable.'
}
],
marbleUrl: "http://reactivex.io/rxjs/img/combineLatest.png",
marbleUrl: 'http://reactivex.io/rxjs/img/combineLatest.png',
shortDescription: {
description: `
Combines multiple Observables to create an Observable whose values
are calculated from the latest values of each of its input Observables.
`,
extras: []
extras: [
{
type: 'Tip',
text: `
Note: combineLatest will only start to emit when all sources have emitted at least once. By adding a default
start value to the sources with <a href="/operators#startWith">.startWith</a>, it will activate right away.
`
}
]
},
walkthrough: {
description: `
Expand All @@ -46,7 +54,7 @@ export const combineLatest: OperatorDoc = {
examples: [
{
name:
"Dynamically calculate the Body-Mass Index from an Observable of weight and one for height",
'Dynamically calculate the Body-Mass Index from an Observable of weight and one for height',
code: `
const weight = Rx.Observable.of(70, 72, 76, 79, 75);
const height = Rx.Observable.of(1.76, 1.77, 1.78);
Expand All @@ -60,11 +68,11 @@ export const combineLatest: OperatorDoc = {
bmi.subscribe(x => console.log('BMI is ' + x));
`,
externalLink: {
platform: "JSBin",
url: "http://jsbin.com/pivowunedu/1/embed?js,console"
platform: 'JSBin',
url: 'http://jsbin.com/pivowunedu/1/embed?js,console'
}
}
],
relatedOperators: ["combineAll", "merge", "withLatestFrom"],
relatedOperators: ['combineAll', 'merge', 'withLatestFrom'],
additionalResources: []
};
Loading