@@ -13,24 +13,6 @@ type Property =
1313type Accessor = TSESTree . TSAbstractAccessorProperty | TSESTree . AccessorProperty
1414type Method = TSESTree . TSAbstractMethodDefinition | TSESTree . MethodDefinition
1515
16- export function computeAbstractModifier (
17- node : Accessor | Property | Method ,
18- ) : Modifier [ ] {
19- switch ( node . type ) {
20- case AST_NODE_TYPES . TSAbstractPropertyDefinition :
21- case AST_NODE_TYPES . TSAbstractMethodDefinition :
22- case AST_NODE_TYPES . TSAbstractAccessorProperty :
23- return [ 'abstract' ]
24- case AST_NODE_TYPES . PropertyDefinition :
25- case AST_NODE_TYPES . MethodDefinition :
26- case AST_NODE_TYPES . AccessorProperty :
27- return [ ]
28- /* v8 ignore next 2 -- @preserve Exhaustive guard. */
29- default :
30- throw new UnreachableCaseError ( node )
31- }
32- }
33-
3416export function computeAccessibilityModifier ( {
3517 hasPrivateHash,
3618 node,
@@ -68,6 +50,24 @@ export function computeAccessibilityModifier({
6850 }
6951}
7052
53+ export function computeAbstractModifier (
54+ node : Accessor | Property | Method ,
55+ ) : Modifier [ ] {
56+ switch ( node . type ) {
57+ case AST_NODE_TYPES . TSAbstractPropertyDefinition :
58+ case AST_NODE_TYPES . TSAbstractMethodDefinition :
59+ case AST_NODE_TYPES . TSAbstractAccessorProperty :
60+ return [ 'abstract' ]
61+ case AST_NODE_TYPES . PropertyDefinition :
62+ case AST_NODE_TYPES . MethodDefinition :
63+ case AST_NODE_TYPES . AccessorProperty :
64+ return [ ]
65+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
66+ default :
67+ throw new UnreachableCaseError ( node )
68+ }
69+ }
70+
7171export function computeAsyncModifier (
7272 node :
7373 | TSESTree . TSEmptyBodyFunctionExpression
0 commit comments