Skip to content

Commit d788624

Browse files
committed
Move hasDynamicName to utilities.ts
1 parent 39952b1 commit d788624

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/compiler/binder.ts

-11
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,6 @@ module ts {
5151
}
5252
}
5353

54-
/**
55-
* A declaration has a dynamic name if both of the following are true:
56-
* 1. The declaration has a computed property name
57-
* 2. The computed name is *not* expressed as Symbol.<name>, where name
58-
* is a property of the Symbol constructor that denotes a built in
59-
* Symbol.
60-
*/
61-
export function hasDynamicName(declaration: Declaration): boolean {
62-
return declaration.name && declaration.name.kind === SyntaxKind.ComputedPropertyName;
63-
}
64-
6554
export function bindSourceFile(file: SourceFile): void {
6655
var start = new Date().getTime();
6756
bindSourceFileWorker(file);

src/compiler/utilities.ts

+11
Original file line numberDiff line numberDiff line change
@@ -835,6 +835,17 @@ module ts {
835835
return SyntaxKind.FirstTriviaToken <= token && token <= SyntaxKind.LastTriviaToken;
836836
}
837837

838+
/**
839+
* A declaration has a dynamic name if both of the following are true:
840+
* 1. The declaration has a computed property name
841+
* 2. The computed name is *not* expressed as Symbol.<name>, where name
842+
* is a property of the Symbol constructor that denotes a built in
843+
* Symbol.
844+
*/
845+
export function hasDynamicName(declaration: Declaration): boolean {
846+
return declaration.name && declaration.name.kind === SyntaxKind.ComputedPropertyName;
847+
}
848+
838849
export function isWellKnownSymbolSyntactically(node: Node): boolean {
839850
return node.kind === SyntaxKind.PropertyAccessExpression && isESSymbolIdentifier((<PropertyAccessExpression>node).expression);
840851
}

0 commit comments

Comments
 (0)