refactor(docs-infra): fix docs examples for tslint rules related to variable names (#38143)

This commit updates the docs examples to be compatible with the
`no-shadowed-variable` and `variable-name` tslint rules.

This is in preparation of updating the docs examples `tslint.json` to
match the one generated for new Angular CLI apps in a future commit.

PR Close #38143
This commit is contained in:
George Kalpakas
2020-07-30 13:03:16 +03:00
committed by Alex Rickabaugh
parent eb8f8c93c8
commit ac009d293d
13 changed files with 31 additions and 44 deletions

View File

@ -9,18 +9,18 @@ function sequenceSubscriber(observer) {
// Will run through an array of numbers, emitting one value
// per second until it gets to the end of the array.
function doSequence(arr, idx) {
function doInSequence(arr, idx) {
timeoutId = setTimeout(() => {
observer.next(arr[idx]);
if (idx === arr.length - 1) {
observer.complete();
} else {
doSequence(arr, ++idx);
doInSequence(arr, ++idx);
}
}, 1000);
}
doSequence(seq, 0);
doInSequence(seq, 0);
// Unsubscribe should clear the timeout to stop execution
return {unsubscribe() {