Skip to content

Commit 8cbf42c

Browse files
committed
Fix lint errors
1 parent 129ace5 commit 8cbf42c

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

src/compiler/symbolWalker.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,17 @@ namespace ts {
1313
return getSymbolWalker;
1414

1515
function getSymbolWalker(accept: (symbol: Symbol) => boolean = () => true): SymbolWalker {
16-
let visitedTypes = createMap<Type>(); // Key is id as string
17-
let visitedSymbols = createMap<Symbol>(); // Key is id as string
16+
const visitedTypes = createMap<Type>(); // Key is id as string
17+
const visitedSymbols = createMap<Symbol>(); // Key is id as string
1818

1919
return {
20-
walkType: type =>
21-
{
20+
walkType: type => {
2221
visitedTypes.clear();
2322
visitedSymbols.clear();
2423
visitType(type);
2524
return { visitedTypes: arrayFrom(visitedTypes.values()), visitedSymbols: arrayFrom(visitedSymbols.values()) };
2625
},
27-
walkSymbol: symbol =>
28-
{
26+
walkSymbol: symbol => {
2927
visitedTypes.clear();
3028
visitedSymbols.clear();
3129
visitSymbol(symbol);

src/compiler/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2674,9 +2674,9 @@ namespace ts {
26742674
/* @internal */
26752675
export interface SymbolWalker {
26762676
/** Note: Return values are not ordered. */
2677-
walkType(root: Type) : { visitedTypes: ReadonlyArray<Type>, visitedSymbols: ReadonlyArray<Symbol> };
2677+
walkType(root: Type): { visitedTypes: ReadonlyArray<Type>, visitedSymbols: ReadonlyArray<Symbol> };
26782678
/** Note: Return values are not ordered. */
2679-
walkSymbol(root: Symbol) : { visitedTypes: ReadonlyArray<Type>, visitedSymbols: ReadonlyArray<Symbol> };
2679+
walkSymbol(root: Symbol): { visitedTypes: ReadonlyArray<Type>, visitedSymbols: ReadonlyArray<Symbol> };
26802680
}
26812681

26822682
export interface SymbolDisplayBuilder {

src/harness/unittests/symbolWalker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default function foo(a: number, b: Bar): void {}`, (file, checker) => {
2828
let foundCount = 0;
2929
let stdLibRefSymbols = 0;
3030
const expectedSymbols = ["default", "a", "b", "Bar", "x", "y", "history"];
31-
let walker = checker.getSymbolWalker(symbol => {
31+
const walker = checker.getSymbolWalker(symbol => {
3232
const isStdLibSymbol = forEach(symbol.declarations, d => {
3333
return getSourceFileOfNode(d).hasNoDefaultLib;
3434
});

0 commit comments

Comments
 (0)