From d78862433211e6ae693df6728adbf37c57562ee6 Mon Sep 17 00:00:00 2001 From: Jason Freeman Date: Tue, 27 Jan 2015 17:38:14 -0800 Subject: [PATCH] Move hasDynamicName to utilities.ts --- src/compiler/binder.ts | 11 ----------- src/compiler/utilities.ts | 11 +++++++++++ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index c1b9d76f1b5..78fe4af0a1e 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -51,17 +51,6 @@ module ts { } } - /** - * A declaration has a dynamic name if both of the following are true: - * 1. The declaration has a computed property name - * 2. The computed name is *not* expressed as Symbol., where name - * is a property of the Symbol constructor that denotes a built in - * Symbol. - */ - export function hasDynamicName(declaration: Declaration): boolean { - return declaration.name && declaration.name.kind === SyntaxKind.ComputedPropertyName; - } - export function bindSourceFile(file: SourceFile): void { var start = new Date().getTime(); bindSourceFileWorker(file); diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index d543c749089..c9d3dfc94ba 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -835,6 +835,17 @@ module ts { return SyntaxKind.FirstTriviaToken <= token && token <= SyntaxKind.LastTriviaToken; } + /** + * A declaration has a dynamic name if both of the following are true: + * 1. The declaration has a computed property name + * 2. The computed name is *not* expressed as Symbol., where name + * is a property of the Symbol constructor that denotes a built in + * Symbol. + */ + export function hasDynamicName(declaration: Declaration): boolean { + return declaration.name && declaration.name.kind === SyntaxKind.ComputedPropertyName; + } + export function isWellKnownSymbolSyntactically(node: Node): boolean { return node.kind === SyntaxKind.PropertyAccessExpression && isESSymbolIdentifier((node).expression); }