Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
always return new array
Browse files Browse the repository at this point in the history
Kingwl committed Mar 25, 2021

Verified

This commit was signed with the committer’s verified signature.
bclement-ocp Basile Clément
1 parent 23cbc31 commit f5508e1
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/compiler/checker.ts
Original file line number Diff line number Diff line change
@@ -3890,14 +3890,7 @@ namespace ts {
function getNamedOrIndexSignatureMembers(members: SymbolTable): Symbol[] {
const result = getNamedMembers(members);
const index = getIndexSymbolFromSymbolTable(members);
if (!index) {
return result;
}
if (result === emptyArray) {
return [index];
}
result.push(index);
return result;
return index ? concatenate(result, [index]) : result;
}

function setStructuredTypeMembers(type: StructuredType, members: SymbolTable, callSignatures: readonly Signature[], constructSignatures: readonly Signature[], stringIndexInfo: IndexInfo | undefined, numberIndexInfo: IndexInfo | undefined): ResolvedType {

0 comments on commit f5508e1

Please sign in to comment.