Skip to content

Commit d002e9e

Browse files
committed
run hereby format
1 parent 85401e6 commit d002e9e

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

src/compiler/binder.ts

-1
Original file line numberDiff line numberDiff line change
@@ -3676,7 +3676,6 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void {
36763676
appendIfUnique(varSymbol.declarations, node);
36773677
}
36783678

3679-
36803679
function bindVariableDeclarationOrBindingElement(node: VariableDeclaration | BindingElement) {
36813680
if (inStrictMode) {
36823681
checkStrictModeEvalOrArguments(node, node.name);

src/compiler/checker.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ import {
169169
EntityNameOrEntityNameExpression,
170170
entityNameToString,
171171
EnumDeclaration,
172+
EnumLiteralExpression,
172173
EnumMember,
173174
EnumType,
174175
equateValues,
@@ -536,7 +537,11 @@ import {
536537
isEntityNameExpression,
537538
isEnumConst,
538539
isEnumDeclaration,
540+
isEnumLiteralDeclaration,
541+
isEnumLiteralExpression,
539542
isEnumMember,
543+
isEnumTypeAnnotation,
544+
isEnumTypeReference,
540545
isExclusivelyTypeOnlyImportOrExport,
541546
isExpandoPropertyDeclaration,
542547
isExportAssignment,
@@ -1133,11 +1138,6 @@ import {
11331138
WideningContext,
11341139
WithStatement,
11351140
YieldExpression,
1136-
EnumLiteralExpression,
1137-
isEnumLiteralExpression,
1138-
isEnumTypeReference,
1139-
isEnumTypeAnnotation,
1140-
isEnumLiteralDeclaration,
11411141
} from "./_namespaces/ts.js";
11421142
import * as moduleSpecifiers from "./_namespaces/ts.moduleSpecifiers.js";
11431143
import * as performance from "./_namespaces/ts.performance.js";
@@ -47045,7 +47045,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
4704547045
}
4704647046
}
4704747047

47048-
function computeEnumMemberValues(node: EnumDeclaration|EnumLiteralExpression) {
47048+
function computeEnumMemberValues(node: EnumDeclaration | EnumLiteralExpression) {
4704947049
const nodeLinks = getNodeLinks(node);
4705047050
if (!(nodeLinks.flags & NodeCheckFlags.EnumValuesComputed)) {
4705147051
nodeLinks.flags |= NodeCheckFlags.EnumValuesComputed;

src/compiler/transformers/ts.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1951,7 +1951,8 @@ export function transformTypeScript(context: TransformationContext): Transformer
19511951
const properties: readonly ObjectLiteralElementLike[] = node.members.map((member: EnumMember): ObjectLiteralElementLike => {
19521952
if (member.initializer) {
19531953
return factory.createPropertyAssignment(member.name, member.initializer);
1954-
} else {
1954+
}
1955+
else {
19551956
return factory.createShorthandPropertyAssignment(idText(member.name as Identifier));
19561957
}
19571958
});

src/compiler/utilities.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6809,7 +6809,7 @@ export function getAllAccessorDeclarations(declarations: readonly Declaration[]
68096809
export function getEffectiveTypeAnnotationNode(node: Node): TypeNode | undefined {
68106810
if (!isInJSFile(node) && isFunctionDeclaration(node)) return undefined;
68116811
if (isTypeAliasDeclaration(node)) return undefined; // has a .type, is not a type annotation
6812-
if (isEnumLiteralDeclaration(node)) return undefined;// has a type reference, but is not used as a hint about the meaning of the initializer.
6812+
if (isEnumLiteralDeclaration(node)) return undefined; // has a type reference, but is not used as a hint about the meaning of the initializer.
68136813
const type = (node as HasType).type;
68146814
if (type || !isInJSFile(node)) return type;
68156815
return isJSDocPropertyLikeTag(node) ? node.typeExpression && node.typeExpression.type : getJSDocType(node);

src/compiler/visitorPublic.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1489,7 +1489,6 @@ const visitEachChildTable: VisitEachChildTable = {
14891489
);
14901490
},
14911491

1492-
14931492
[SyntaxKind.ModuleDeclaration]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
14941493
return context.factory.updateModuleDeclaration(
14951494
node,

0 commit comments

Comments
 (0)