From 945e65f4d8d79dc7bd25a9e818a1999a48664ad7 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Tue, 10 Jan 2017 08:55:46 -0800 Subject: [PATCH] Object rest skips only class methods Previously, it skipped all methods --- src/compiler/checker.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 54f0758b3a9..f828fb02c0c 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -3125,9 +3125,8 @@ namespace ts { for (const prop of getPropertiesOfType(source)) { const inNamesToRemove = prop.name in names; const isPrivate = getDeclarationModifierFlagsFromSymbol(prop) & (ModifierFlags.Private | ModifierFlags.Protected); - const isMethod = prop.flags & SymbolFlags.Method; const isSetOnlyAccessor = prop.flags & SymbolFlags.SetAccessor && !(prop.flags & SymbolFlags.GetAccessor); - if (!inNamesToRemove && !isPrivate && !isMethod && !isSetOnlyAccessor) { + if (!inNamesToRemove && !isPrivate && !isClassMethod(prop) && !isSetOnlyAccessor) { members[prop.name] = prop; } }