From e60348be46ad6e14c43c5606b295a2f4a16fc33d Mon Sep 17 00:00:00 2001 From: Andy Date: Tue, 27 Mar 2018 20:15:43 -0700 Subject: [PATCH] Inline isParameterOfConstructorDeclaration (#22838) --- src/services/completions.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/services/completions.ts b/src/services/completions.ts index ebc3674129e..e7bbb47513f 100644 --- a/src/services/completions.ts +++ b/src/services/completions.ts @@ -1644,14 +1644,9 @@ namespace ts.Completions { return undefined; } - function isParameterOfConstructorDeclaration(node: Node) { - return isParameter(node) && isConstructorDeclaration(node.parent); - } - - function isConstructorParameterCompletion(node: Node) { - return node.parent && - isParameterOfConstructorDeclaration(node.parent) && - (isParameterPropertyModifier(node.kind) || isDeclarationName(node)); + function isConstructorParameterCompletion(node: Node): boolean { + return !!node.parent && isParameter(node.parent) && isConstructorDeclaration(node.parent.parent) + && (isParameterPropertyModifier(node.kind) || isDeclarationName(node)); } /**