Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"lint-staged": "^15.2.2",
"markdownlint-cli": "^0.46.0",
"nx": "22.1.1",
"prettier": "3.6.2",
"prettier": "3.7.2",
"rimraf": "^5.0.5",
"semver": "7.7.0",
"tsx": "*",
Expand Down
6 changes: 2 additions & 4 deletions packages/ast-spec/src/base/MethodDefinitionBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,12 @@ export interface MethodDefinitionComputedNameBase extends MethodDefinitionBase {
key: PropertyNameComputed;
}

export interface MethodDefinitionNonComputedNameBase
extends MethodDefinitionBase {
export interface MethodDefinitionNonComputedNameBase extends MethodDefinitionBase {
computed: false;
key: PropertyNameNonComputed;
}

export interface ClassMethodDefinitionNonComputedNameBase
extends MethodDefinitionBase {
export interface ClassMethodDefinitionNonComputedNameBase extends MethodDefinitionBase {
computed: false;
key: ClassPropertyNameNonComputed;
}
9 changes: 3 additions & 6 deletions packages/ast-spec/src/base/PropertyDefinitionBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,17 @@ interface PropertyDefinitionBase extends BaseNode {
value: Expression | null;
}

export interface PropertyDefinitionComputedNameBase
extends PropertyDefinitionBase {
export interface PropertyDefinitionComputedNameBase extends PropertyDefinitionBase {
computed: true;
key: PropertyNameComputed;
}

export interface PropertyDefinitionNonComputedNameBase
extends PropertyDefinitionBase {
export interface PropertyDefinitionNonComputedNameBase extends PropertyDefinitionBase {
computed: false;
key: PropertyNameNonComputed;
}

export interface ClassPropertyDefinitionNonComputedNameBase
extends PropertyDefinitionBase {
export interface ClassPropertyDefinitionNonComputedNameBase extends PropertyDefinitionBase {
computed: false;
key: ClassPropertyNameNonComputed;
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ interface ExportNamedDeclarationBase extends BaseNode {
* export { a, b };
* ```
*/
export interface ExportNamedDeclarationWithoutSourceWithMultiple
extends ExportNamedDeclarationBase {
export interface ExportNamedDeclarationWithoutSourceWithMultiple extends ExportNamedDeclarationBase {
/**
* This will always be an empty array.
* @deprecated Replaced with {@link `attributes`}.
Expand All @@ -88,8 +87,7 @@ export interface ExportNamedDeclarationWithoutSourceWithMultiple
* export const x = 1;
* ```
*/
export interface ExportNamedDeclarationWithoutSourceWithSingle
extends ExportNamedDeclarationBase {
export interface ExportNamedDeclarationWithoutSourceWithSingle extends ExportNamedDeclarationBase {
/**
* This will always be an empty array.
* @deprecated Replaced with {@link `attributes`}.
Expand All @@ -113,8 +111,7 @@ export interface ExportNamedDeclarationWithoutSourceWithSingle
* export { a, b } from 'mod';
* ```
*/
export interface ExportNamedDeclarationWithSource
extends ExportNamedDeclarationBase {
export interface ExportNamedDeclarationWithSource extends ExportNamedDeclarationBase {
declaration: null;
source: StringLiteral;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ export interface FunctionDeclarationWithName extends FunctionDeclarationBase {
* export default function () {}
* ```
*/
export interface FunctionDeclarationWithOptionalName
extends FunctionDeclarationBase {
export interface FunctionDeclarationWithOptionalName extends FunctionDeclarationBase {
id: Identifier | null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ interface TSImportEqualsDeclarationBase extends BaseNode {
moduleReference: Identifier | TSExternalModuleReference | TSQualifiedName;
}

export interface TSImportEqualsNamespaceDeclaration
extends TSImportEqualsDeclarationBase {
export interface TSImportEqualsNamespaceDeclaration extends TSImportEqualsDeclarationBase {
/**
* The kind of the import.
*/
Expand All @@ -44,8 +43,7 @@ export interface TSImportEqualsNamespaceDeclaration
moduleReference: Identifier | TSQualifiedName;
}

export interface TSImportEqualsRequireDeclaration
extends TSImportEqualsDeclarationBase {
export interface TSImportEqualsRequireDeclaration extends TSImportEqualsDeclarationBase {
/**
* The kind of the import.
*/
Expand Down
9 changes: 3 additions & 6 deletions packages/ast-spec/src/declaration/TSModuleDeclaration/spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ interface TSModuleDeclarationModuleBase extends TSModuleDeclarationBase {
* module 'foo' {}
* ```
*/
export interface TSModuleDeclarationModuleWithStringIdNotDeclared
extends TSModuleDeclarationModuleBase {
export interface TSModuleDeclarationModuleWithStringIdNotDeclared extends TSModuleDeclarationModuleBase {
body: TSModuleBlock;
declare: false;
id: StringLiteral;
Expand All @@ -100,8 +99,7 @@ export interface TSModuleDeclarationModuleWithStringIdNotDeclared
* declare module 'foo';
* ```
*/
export interface TSModuleDeclarationModuleWithStringIdDeclared
extends TSModuleDeclarationModuleBase {
export interface TSModuleDeclarationModuleWithStringIdDeclared extends TSModuleDeclarationModuleBase {
body?: TSModuleBlock;
declare: true;
id: StringLiteral;
Expand All @@ -113,8 +111,7 @@ export interface TSModuleDeclarationModuleWithStringIdDeclared
* module A {}
* ```
*/
export interface TSModuleDeclarationModuleWithIdentifierId
extends TSModuleDeclarationModuleBase {
export interface TSModuleDeclarationModuleWithIdentifierId extends TSModuleDeclarationModuleBase {
// Maybe not worth fixing since it's legacy
body: TSModuleBlock;
id: Identifier;
Expand Down
6 changes: 2 additions & 4 deletions packages/ast-spec/src/declaration/VariableDeclaration/spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ interface LetOrConstOrVarDeclarationBase extends BaseNode {
kind: 'const' | 'let' | 'var';
}

export interface LetOrVarDeclaredDeclaration
extends LetOrConstOrVarDeclarationBase {
export interface LetOrVarDeclaredDeclaration extends LetOrConstOrVarDeclarationBase {
/**
* In a `declare let` declaration, the declarators must not have definite assignment
* assertions or initializers.
Expand All @@ -58,8 +57,7 @@ export interface LetOrVarDeclaredDeclaration
kind: 'let' | 'var';
}

export interface LetOrVarNonDeclaredDeclaration
extends LetOrConstOrVarDeclarationBase {
export interface LetOrVarNonDeclaredDeclaration extends LetOrConstOrVarDeclarationBase {
/**
* In a `let`/`var` declaration, the declarators may have definite assignment
* assertions or initializers, but not both.
Expand Down
6 changes: 2 additions & 4 deletions packages/ast-spec/src/element/AccessorProperty/spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ import type {
PropertyDefinitionNonComputedNameBase,
} from '../../base/PropertyDefinitionBase';

export interface AccessorPropertyComputedName
extends PropertyDefinitionComputedNameBase {
export interface AccessorPropertyComputedName extends PropertyDefinitionComputedNameBase {
type: AST_NODE_TYPES.AccessorProperty;
}

export interface AccessorPropertyNonComputedName
extends PropertyDefinitionNonComputedNameBase {
export interface AccessorPropertyNonComputedName extends PropertyDefinitionNonComputedNameBase {
type: AST_NODE_TYPES.AccessorProperty;
}

Expand Down
6 changes: 2 additions & 4 deletions packages/ast-spec/src/element/MethodDefinition/spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ import type {
MethodDefinitionComputedNameBase,
} from '../../base/MethodDefinitionBase';

export interface MethodDefinitionComputedName
extends MethodDefinitionComputedNameBase {
export interface MethodDefinitionComputedName extends MethodDefinitionComputedNameBase {
type: AST_NODE_TYPES.MethodDefinition;
}

export interface MethodDefinitionNonComputedName
extends ClassMethodDefinitionNonComputedNameBase {
export interface MethodDefinitionNonComputedName extends ClassMethodDefinitionNonComputedNameBase {
type: AST_NODE_TYPES.MethodDefinition;
}

Expand Down
6 changes: 2 additions & 4 deletions packages/ast-spec/src/element/PropertyDefinition/spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ import type {
PropertyDefinitionComputedNameBase,
} from '../../base/PropertyDefinitionBase';

export interface PropertyDefinitionComputedName
extends PropertyDefinitionComputedNameBase {
export interface PropertyDefinitionComputedName extends PropertyDefinitionComputedNameBase {
type: AST_NODE_TYPES.PropertyDefinition;
}

export interface PropertyDefinitionNonComputedName
extends ClassPropertyDefinitionNonComputedNameBase {
export interface PropertyDefinitionNonComputedName extends ClassPropertyDefinitionNonComputedNameBase {
type: AST_NODE_TYPES.PropertyDefinition;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import type {
PropertyDefinitionNonComputedNameBase,
} from '../../base/PropertyDefinitionBase';

export interface TSAbstractAccessorPropertyComputedName
extends PropertyDefinitionComputedNameBase {
export interface TSAbstractAccessorPropertyComputedName extends PropertyDefinitionComputedNameBase {
type: AST_NODE_TYPES.TSAbstractAccessorProperty;
value: null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import type {
MethodDefinitionNonComputedNameBase,
} from '../../base/MethodDefinitionBase';

export interface TSAbstractMethodDefinitionComputedName
extends MethodDefinitionComputedNameBase {
export interface TSAbstractMethodDefinitionComputedName extends MethodDefinitionComputedNameBase {
type: AST_NODE_TYPES.TSAbstractMethodDefinition;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import type {
PropertyDefinitionNonComputedNameBase,
} from '../../base/PropertyDefinitionBase';

export interface TSAbstractPropertyDefinitionComputedName
extends PropertyDefinitionComputedNameBase {
export interface TSAbstractPropertyDefinitionComputedName extends PropertyDefinitionComputedNameBase {
type: AST_NODE_TYPES.TSAbstractPropertyDefinition;
value: null;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { AST_NODE_TYPES } from '../../ast-node-types';
import type { TSFunctionSignatureBase } from '../../base/TSFunctionSignatureBase';

export interface TSConstructSignatureDeclaration
extends TSFunctionSignatureBase {
export interface TSConstructSignatureDeclaration extends TSFunctionSignatureBase {
type: AST_NODE_TYPES.TSConstructSignatureDeclaration;
}
3 changes: 1 addition & 2 deletions packages/ast-spec/src/element/TSMethodSignature/spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ export interface TSMethodSignatureComputedName extends TSMethodSignatureBase {
computed: true;
key: PropertyNameComputed;
}
export interface TSMethodSignatureNonComputedName
extends TSMethodSignatureBase {
export interface TSMethodSignatureNonComputedName extends TSMethodSignatureBase {
computed: false;
key: PropertyNameNonComputed;
}
Expand Down
6 changes: 2 additions & 4 deletions packages/ast-spec/src/element/TSPropertySignature/spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,12 @@ interface TSPropertySignatureBase extends BaseNode {
typeAnnotation: TSTypeAnnotation | undefined;
}

export interface TSPropertySignatureComputedName
extends TSPropertySignatureBase {
export interface TSPropertySignatureComputedName extends TSPropertySignatureBase {
computed: true;
key: PropertyNameComputed;
}

export interface TSPropertySignatureNonComputedName
extends TSPropertySignatureBase {
export interface TSPropertySignatureNonComputedName extends TSPropertySignatureBase {
computed: false;
key: PropertyNameNonComputed;
}
Expand Down
5 changes: 3 additions & 2 deletions packages/ast-spec/src/expression/UnaryExpression/spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import type { AST_NODE_TYPES } from '../../ast-node-types';
import type { UnaryExpressionBase } from '../../base/UnaryExpressionBase';

interface UnaryExpressionSpecific<T extends string>
extends UnaryExpressionBase {
interface UnaryExpressionSpecific<
T extends string,
> extends UnaryExpressionBase {
type: AST_NODE_TYPES.UnaryExpression;
operator: T;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ class foo2<
/* aaa */ A /* bbb */ = 2 /* bbb */,
> extends bar</* aaa */ A /* bbb */> {}
interface bar</* aaa */ A /* bbb */> extends bar2</* aaa */ A /* bbb */> {}
interface bar2</* aaa */ A /* bbb */ = 2 /* bbb */>
extends bar</* aaa */ A /* bbb */> {}
interface bar2<
/* aaa */ A /* bbb */ = 2 /* bbb */,
> extends bar</* aaa */ A /* bbb */> {}
Loading