Skip to content

Commit ac172de

Browse files
Address stylistic-ish feedback.
1 parent 716e136 commit ac172de

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/compiler/checker.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23120,10 +23120,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
2312023120
const param = declaration as ParameterDeclaration;
2312123121
let keywordKind: SyntaxKind | undefined;
2312223122
if (isIdentifier(param.name) &&
23123-
(isCallSignatureDeclaration(param.parent) || isMethodSignature(param.parent) || isFunctionTypeNode(param.parent)) &&
23124-
param.parent.parameters.indexOf(param) > -1 &&
23125-
(resolveName(param, param.name.escapedText, SymbolFlags.Type, undefined, param.name.escapedText, /*isUse*/ true) ||
23126-
(keywordKind = stringToToken(param.name.escapedText as string)) && isTypeNodeKind(keywordKind))) {
23123+
(isCallSignatureDeclaration(param.parent) || isMethodSignature(param.parent) || isFunctionTypeNode(param.parent)) &&
23124+
param.parent.parameters.indexOf(param) > -1 &&
23125+
(resolveName(param, param.name.escapedText, SymbolFlags.Type, undefined, param.name.escapedText, /*isUse*/ true) ||
23126+
(keywordKind = stringToToken(param.name.escapedText as string)) && isTypeNodeKind(keywordKind))
23127+
) {
2312723128
const newName = "arg" + param.parent.parameters.indexOf(param);
2312823129
const typeName = declarationNameToString(param.name) + (param.dotDotDotToken ? "[]" : "");
2312923130
errorOrSuggestion(noImplicitAny, declaration, Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1, newName, typeName);

src/harness/harnessUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ export function sourceFileToJSON(file: ts.Node): string {
206206
break;
207207

208208
case "hasExtendedUnicodeEscape":
209-
if ((n as ts.Identifier).hasExtendedUnicodeEscape) {
209+
if ((n as ts.Identifier | ts.LiteralLikeNode).hasExtendedUnicodeEscape) {
210210
o.hasExtendedUnicodeEscape = true;
211211
}
212212
break;

0 commit comments

Comments
 (0)