From 170403fc531122da4954021afd33d9a5a58e20e5 Mon Sep 17 00:00:00 2001 From: Yui T Date: Tue, 5 May 2015 13:49:06 -0700 Subject: [PATCH] Remove isParameterDeclaration to utilities --- src/compiler/checker.ts | 7 ------- src/compiler/utilities.ts | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 04766f22c4e..3e694bc4a1a 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -9149,13 +9149,6 @@ module ts { } } - function isParameterDeclaration(node: VariableLikeDeclaration) { - while (node.kind === SyntaxKind.BindingElement) { - node = node.parent.parent; - } - return node.kind === SyntaxKind.Parameter; - } - // Check that a parameter initializer contains no references to parameters declared to the right of itself function checkParameterInitializer(node: VariableLikeDeclaration): void { if (getRootDeclaration(node).kind !== SyntaxKind.Parameter) { diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 3e825c6802c..a3f6676119f 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1149,6 +1149,13 @@ module ts { } return false; } + + export function isParameterDeclaration(node: VariableLikeDeclaration) { + while (node.kind === SyntaxKind.BindingElement) { + node = node.parent.parent; + } + return node.kind === SyntaxKind.Parameter; + } export function nodeStartsNewLexicalEnvironment(n: Node): boolean { return isFunctionLike(n) || n.kind === SyntaxKind.ModuleDeclaration || n.kind === SyntaxKind.SourceFile;