Skip to content

Commit e60348b

Browse files
author
Andy
authored
Inline isParameterOfConstructorDeclaration (microsoft#22838)
1 parent 659dc03 commit e60348b

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

src/services/completions.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1644,14 +1644,9 @@ namespace ts.Completions {
16441644
return undefined;
16451645
}
16461646

1647-
function isParameterOfConstructorDeclaration(node: Node) {
1648-
return isParameter(node) && isConstructorDeclaration(node.parent);
1649-
}
1650-
1651-
function isConstructorParameterCompletion(node: Node) {
1652-
return node.parent &&
1653-
isParameterOfConstructorDeclaration(node.parent) &&
1654-
(isParameterPropertyModifier(node.kind) || isDeclarationName(node));
1647+
function isConstructorParameterCompletion(node: Node): boolean {
1648+
return !!node.parent && isParameter(node.parent) && isConstructorDeclaration(node.parent.parent)
1649+
&& (isParameterPropertyModifier(node.kind) || isDeclarationName(node));
16551650
}
16561651

16571652
/**

0 commit comments

Comments
 (0)