Skip to content

Commit f2163fe

Browse files
author
Arthur Ozga
committed
use length helper
1 parent f9123aa commit f2163fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/services/codefixes/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ namespace ts.codefix {
147147

148148
let typeParameters: TypeParameterDeclaration[];
149149
if (includeTypeScriptSyntax) {
150-
const typeArgCount = callExpression.typeArguments ? callExpression.typeArguments.length : 0;
150+
const typeArgCount = length(callExpression.typeArguments);
151151
for (let i = 0; i < typeArgCount; i++) {
152152
const name = typeArgCount < 8 ? String.fromCharCode(CharacterCodes.T + i) : `T${i}`;
153153
const typeParameter = createTypeParameterDeclaration(name, /*constraint*/ undefined, /*defaultType*/ undefined);

0 commit comments

Comments
 (0)