Run formatter

This commit is contained in:
Ron Buckton
2024-04-05 16:32:21 -04:00
parent 1bb7e2f4e5
commit 1a48252385
9 changed files with 32 additions and 26 deletions

View File

@@ -320,8 +320,8 @@ import {
WhileStatement,
WithStatement,
} from "./_namespaces/ts";
import { SymbolObject as SymbolObject } from "./objectConstructors";
import * as performance from "./_namespaces/ts.performance";
import { SymbolObject as SymbolObject } from "./objectConstructors";
/** @internal */
export const enum ModuleInstanceState {

View File

@@ -93,17 +93,17 @@ import {
VarianceFlags,
zipWith,
} from "./_namespaces/ts";
import {
SignatureObject,
SymbolObject,
TypeObject,
} from "./objectConstructors";
import {
IdentifierObject,
NodeObject,
SourceFileObject,
TokenObject,
} from "./nodeConstructors";
import {
SignatureObject,
SymbolObject,
TypeObject,
} from "./objectConstructors";
/** @internal */
export enum LogLevel {
@@ -372,7 +372,8 @@ export namespace Debug {
!positionIsSynthesized(range.pos) && !positionIsSynthesized(range.end),
message ?? "Node must have a real position for this operation",
/*verboseDebugInfo*/ undefined,
stackCrawlMark);
stackCrawlMark,
);
}
/**

View File

@@ -461,9 +461,7 @@ import {
SourceFileObject,
TokenObject,
} from "../nodeConstructors";
import {
SourceMapSourceObject,
} from "../objectConstructors";
import { SourceMapSourceObject } from "../objectConstructors";
let nextAutoGenerateId = 0;

View File

@@ -96,7 +96,9 @@ import {
/** @internal */
export abstract class BaseSyntaxObject implements Node {
static { this.prototype.kind = SyntaxKind.Unknown; }
static {
this.prototype.kind = SyntaxKind.Unknown;
}
declare kind: SyntaxKind;
pos: number = -1;
@@ -207,7 +209,9 @@ export class TokenObject<TKind extends SyntaxKind> extends BaseTokenObject imple
/** @internal */
export class IdentifierObject extends BaseTokenObject implements Identifier {
static { this.prototype.kind = SyntaxKind.Identifier; }
static {
this.prototype.kind = SyntaxKind.Identifier;
}
declare kind: SyntaxKind.Identifier;
declare _primaryExpressionBrand: any;
@@ -235,7 +239,9 @@ export class IdentifierObject extends BaseTokenObject implements Identifier {
/** @internal */
export class PrivateIdentifierObject extends BaseTokenObject implements PrivateIdentifier {
static { PrivateIdentifierObject.prototype.kind = SyntaxKind.PrivateIdentifier; }
static {
PrivateIdentifierObject.prototype.kind = SyntaxKind.PrivateIdentifier;
}
declare kind: SyntaxKind.PrivateIdentifier;
declare _primaryExpressionBrand: any;
@@ -312,7 +318,9 @@ export class NodeObject<TKind extends SyntaxKind> extends BaseNodeObject impleme
/** @internal */
export class SourceFileObject extends BaseNodeObject implements SourceFile {
static { this.prototype.kind = SyntaxKind.SourceFile; }
static {
this.prototype.kind = SyntaxKind.SourceFile;
}
declare kind: SyntaxKind.SourceFile;
declare _declarationBrand: any;
@@ -379,7 +387,7 @@ export class SourceFileObject extends BaseNodeObject implements SourceFile {
declare scriptSnapshot: IScriptSnapshot;
declare nameTable: UnderscoreEscapedMap<number> | undefined;
private declare namedDeclarations: Map<string, Declaration[]> | undefined;
declare private namedDeclarations: Map<string, Declaration[]> | undefined;
public update(newText: string, textChangeRange: TextChangeRange): SourceFile {
return updateSourceFile(this, newText, textChangeRange);
@@ -582,7 +590,9 @@ function createChildren(node: Node, sourceFile: SourceFileLike | undefined): rea
if (isJSDocCommentContainingNode(node)) {
/** Don't add trivia for "tokens" since this is in a comment. */
forEachChild(node, child => { children = append(children, child); });
forEachChild(node, child => {
children = append(children, child);
});
return children ?? emptyArray;
}

View File

@@ -322,7 +322,7 @@ export class SignatureObject implements Signature {
export class SourceMapSourceObject implements SourceMapSource {
fileName: string;
text: string;
skipTrivia: ((pos: number) => number);
skipTrivia: (pos: number) => number;
// TODO: Review for polymorphism:
declare lineMap: readonly number[];

View File

@@ -6192,7 +6192,6 @@ export interface Type {
widened?: Type; // Cached widened form of the type
}
/** @internal */
// Intrinsic types (TypeFlags.Intrinsic)
export interface IntrinsicType extends Type {
@@ -10147,21 +10146,21 @@ export interface EvaluationResolver {
* Resolves to a type only when the 'services' project is loaded. Otherwise, results in `never`.
* @internal
*/
export type ServicesOnlyType<T, Fallback = never> = ServicesForwardRefs extends { __services: true } ? T : Fallback;
export type ServicesOnlyType<T, Fallback = never> = ServicesForwardRefs extends { __services: true; } ? T : Fallback;
/**
* Resolves a forward-reference to a type declared in the 'services' project.
* If 'services' is not present, results in `never`.
* @internal
*/
export type ServicesForwardRef<K extends string> = ServicesForwardRefs extends { [P in K]: infer T } ? T : never;
export type ServicesForwardRef<K extends string> = ServicesForwardRefs extends { [P in K]: infer T; } ? T : never;
/**
* Resolves a forward-reference to an array of a type declared in the 'services' project.
* If 'services' is not present, results in `never`.
* @internal
*/
export type ServicesForwardRefArray<K extends string> = ServicesOnlyType<ServicesForwardRef<K>[]>;
export type ServicesForwardRefArray<K extends string> = ServicesOnlyType<ServicesForwardRef<K>[]>;
/**
* A registry of forward references declared in the 'services' project.

View File

@@ -205,8 +205,8 @@ import {
HasExpressionInitializer,
hasExtension,
HasFlowNode,
hasInitializer,
HasInitializer,
hasInitializer,
HasJSDoc,
hasJSDocNodes,
HasModifiers,
@@ -5295,7 +5295,6 @@ export function getNameFromPropertyName(name: PropertyName): string | undefined
: isPrivateIdentifier(name) ? idText(name) : getTextOfIdentifierOrLiteral(name);
}
// TODO(jakebailey): this function should not be named this. While it does technically
// return true if the argument is a ParameterDeclaration, it also returns true for nodes
// that are children of ParameterDeclarations inside binding elements.

View File

@@ -1374,8 +1374,7 @@ function isTrivia(s: string) {
// are more aggressive than is strictly necessary.
const textChangesTransformationContext: TransformationContext = {
...nullTransformationContext,
factory: createNodeFactory(nullTransformationContext.factory.flags | NodeFactoryFlags.NoParenthesizerRules,
),
factory: createNodeFactory(nullTransformationContext.factory.flags | NodeFactoryFlags.NoParenthesizerRules),
};
/** @internal */

View File

@@ -14,8 +14,8 @@ import {
GetEffectiveTypeRootsHost,
HasChangedAutomaticTypeDirectiveNames,
HasInvalidatedResolutions,
JSDocParsingMode,
IScriptSnapshot,
JSDocParsingMode,
LineAndCharacter,
MinimalResolutionCacheHost,
ModuleResolutionCache,