mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
fix isParameterDeclaration changes
This commit is contained in:
1 parent
35c1ea384f
commit
a639aef0a7
2 files changed
+2
-2
No files matched your search
@@ -3346,7 +3346,7 @@ namespace ts {
|
||||
return node.escapedText === "push" || node.escapedText === "unshift";
|
||||
}
|
||||
|
||||
export function isParameterDeclaration(node: VariableLikeDeclaration): node is ParameterDeclaration {
|
||||
export function isParameterDeclaration(node: VariableLikeDeclaration): boolean {
|
||||
const root = getRootDeclaration(node);
|
||||
return root.kind === SyntaxKind.Parameter;
|
||||
}
|
||||
|
||||
@@ -981,7 +981,7 @@ namespace ts.Completions {
|
||||
}
|
||||
|
||||
function addSnippetsWorker(node: Node, parent: Node | undefined) {
|
||||
if (isVariableLike(node) && isParameterDeclaration(node)) {
|
||||
if (isVariableLike(node) && node.kind === SyntaxKind.Parameter) {
|
||||
// Placeholder
|
||||
setSnippetElement(node.name, { kind: SnippetKind.Placeholder, order });
|
||||
order += 1;
|
||||
|
||||
Reference in new issue
Block a user