mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-11 20:37:46 -05:00
fix isParameterDeclaration changes
This commit is contained in:
@@ -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