From 18e7240788bb763d1dfec11e5284ab95e3ccf436 Mon Sep 17 00:00:00 2001 From: Kanchalai Tanglertsampan Date: Thu, 1 Sep 2016 16:21:56 -0700 Subject: [PATCH] Fix error from merging --- src/compiler/core.ts | 2 ++ src/compiler/transformers/ts.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 8b654c16b9c..f344fa08704 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -203,6 +203,8 @@ namespace ts { * Filters an array by a predicate function. Returns the same array instance if the predicate is * true for all elements, otherwise returns a new array instance containing the filtered subset. */ + export function filter(array: T[], f: (x: T) => x is U): U[]; + export function filter(array: T[], f: (x: T) => boolean): T[] export function filter(array: T[], f: (x: T) => boolean): T[] { if (array) { const len = array.length; diff --git a/src/compiler/transformers/ts.ts b/src/compiler/transformers/ts.ts index efb247ba663..191966aa779 100644 --- a/src/compiler/transformers/ts.ts +++ b/src/compiler/transformers/ts.ts @@ -1034,7 +1034,7 @@ namespace ts { * @param isStatic A value indicating whether to get properties from the static or instance side of the class. */ function getInitializedProperties(node: ClassExpression | ClassDeclaration, isStatic: boolean): PropertyDeclaration[] { - return filter(node.members, isStatic ? isStaticInitializedProperty : isInstanceInitializedProperty); + return filter(node.members, isStatic ? isStaticInitializedProperty : isInstanceInitializedProperty); } /**