Skip to content

Commit 945e65f

Browse files
committed
Object rest skips only class methods
Previously, it skipped all methods
1 parent c9e301f commit 945e65f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3125,9 +3125,8 @@ namespace ts {
31253125
for (const prop of getPropertiesOfType(source)) {
31263126
const inNamesToRemove = prop.name in names;
31273127
const isPrivate = getDeclarationModifierFlagsFromSymbol(prop) & (ModifierFlags.Private | ModifierFlags.Protected);
3128-
const isMethod = prop.flags & SymbolFlags.Method;
31293128
const isSetOnlyAccessor = prop.flags & SymbolFlags.SetAccessor && !(prop.flags & SymbolFlags.GetAccessor);
3130-
if (!inNamesToRemove && !isPrivate && !isMethod && !isSetOnlyAccessor) {
3129+
if (!inNamesToRemove && !isPrivate && !isClassMethod(prop) && !isSetOnlyAccessor) {
31313130
members[prop.name] = prop;
31323131
}
31333132
}

0 commit comments

Comments
 (0)