1- import type { Property } from 'jscodeshift' ;
1+ import type { EOProperty } from '../ast' ;
2+ import {
3+ isEOPropertyForActionsObject ,
4+ isEOPropertyForClassDecorator ,
5+ isEOPropertySimple ,
6+ isEOPropertyWithCallExpression ,
7+ isEOPropertyWithFunctionExpression ,
8+ } from '../ast' ;
29import type { DecoratorImportInfoMap } from '../decorator-info' ;
310import type { RuntimeData } from '../runtime-data' ;
411import { assert } from '../util/types' ;
5- import EOActionsObjectProp , {
6- isEOActionsPropProperty ,
7- } from './private/actions-object' ;
8- import EOBaseProp , { isEOProperty } from './private/base' ;
9- import EOCallExpressionProp , {
10- isCallExpressionProperty ,
11- } from './private/call-expression' ;
12- import EOClassDecoratorProp , {
13- isClassDecoratorProperty ,
14- } from './private/class-decorator' ;
15- import EOFunctionExpressionProp , {
16- isFunctionExpressionProperty ,
17- } from './private/function-expression' ;
12+ import EOActionsObjectProp from './private/actions-object' ;
13+ import EOCallExpressionProp from './private/call-expression' ;
14+ import EOClassDecoratorProp from './private/class-decorator' ;
15+ import EOFunctionExpressionProp from './private/function-expression' ;
16+ import EOSimpleProp from './private/simple' ;
1817
1918export { default as EOActionsObjectProp } from './private/actions-object' ;
20- export type { Action } from './private/actions-object' ;
21- export { default as EOBaseProp } from './private/base' ;
2219export { default as EOCallExpressionProp } from './private/call-expression' ;
2320export { default as EOClassDecoratorProp } from './private/class-decorator' ;
2421export { default as EOFunctionExpressionProp } from './private/function-expression' ;
22+ export { default as EOSimpleProp } from './private/simple' ;
2523
2624export type EOProp =
2725 | EOActionsObjectProp
28- | EOBaseProp
26+ | EOSimpleProp
2927 | EOCallExpressionProp
3028 | EOClassDecoratorProp
3129 | EOFunctionExpressionProp ;
@@ -39,24 +37,24 @@ export interface EOProps {
3937 * Property, RuntimeData, and ImportPropDecoratorMap.
4038 */
4139export default function makeEOProp (
42- eoProp : Property ,
40+ eoProp : EOProperty ,
4341 runtimeData : RuntimeData | undefined ,
4442 existingDecoratorImportInfos : DecoratorImportInfoMap
4543) : EOProp {
46- if ( isCallExpressionProperty ( eoProp ) ) {
44+ if ( isEOPropertyWithCallExpression ( eoProp ) ) {
4745 return new EOCallExpressionProp (
4846 eoProp ,
4947 runtimeData ,
5048 existingDecoratorImportInfos
5149 ) ;
52- } else if ( isFunctionExpressionProperty ( eoProp ) ) {
50+ } else if ( isEOPropertyWithFunctionExpression ( eoProp ) ) {
5351 return new EOFunctionExpressionProp ( eoProp , runtimeData ) ;
54- } else if ( isClassDecoratorProperty ( eoProp ) ) {
52+ } else if ( isEOPropertyForClassDecorator ( eoProp ) ) {
5553 return new EOClassDecoratorProp ( eoProp , runtimeData ) ;
56- } else if ( isEOActionsPropProperty ( eoProp ) ) {
54+ } else if ( isEOPropertyForActionsObject ( eoProp ) ) {
5755 return new EOActionsObjectProp ( eoProp , runtimeData ) ;
5856 } else {
59- assert ( isEOProperty ( eoProp ) ) ;
60- return new EOBaseProp ( eoProp , runtimeData ) ;
57+ assert ( isEOPropertySimple ( eoProp ) ) ;
58+ return new EOSimpleProp ( eoProp , runtimeData ) ;
6159 }
6260}
0 commit comments