Inline isParameterOfConstructorDeclaration (#22838)

This commit is contained in:
Andy authored and GitHub committed 2018-03-27 20:15:43 -07:00
1 parent 659dc03f68
commit e60348be46
1 file changed
+3 -8
+3 -8
View File
@@ -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));
}
/**