Files
dario-piotrowicz 835987b78b refactor(docs-infra): use eslint in aio's example-lint script (#43218)
Instead of the deprecated tslint use eslint in the aio's example-lint
script

PR Close #43218
2021-12-15 12:28:46 -05:00

28 lines
545 B
TypeScript

// #docplaster
/*
Because of how the code is merged together using the doc regions,
we need to indent the imports with the function below.
*/
// #docregion
import { of } from 'rxjs';
import { map } from 'rxjs/operators';
// #enddocregion
export function docRegionDefault(console: Console) {
// #docregion
const nums = of(1, 2, 3);
const squareValues = map((val: number) => val * val);
const squaredNums = squareValues(nums);
squaredNums.subscribe(x => console.log(x));
// Logs
// 1
// 4
// 9
// #enddocregion
}