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 6334749d2c
commit 1db4f508e6
13 changed files with 31 additions and 44 deletions

View File

@ -44,8 +44,8 @@ export class RequestCacheWithMap implements RequestCache {
const url = req.urlWithParams;
this.messenger.add(`Caching response from "${url}".`);
const entry = { url, response, lastRead: Date.now() };
this.cache.set(url, entry);
const newEntry = { url, response, lastRead: Date.now() };
this.cache.set(url, newEntry);
// remove expired cache entries
const expired = Date.now() - maxAge;

View File

@ -83,7 +83,7 @@ describe('HttpClient testing', () => {
// #docregion predicate
// Expect one request with an authorization header
const req = httpTestingController.expectOne(
req => req.headers.has('Authorization')
request => request.headers.has('Authorization')
);
// #enddocregion predicate
req.flush(testData);