Skip to content

Commit 7915ddb

Browse files
committed
Clean up EOComputedObjectExpressionProp kind determination
1 parent 3433985 commit 7915ddb

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

transforms/helpers/eo-prop/private/computed/object-expression.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,12 @@ export default class EOComputedObjectExpressionProp extends AbstractEOComputedPr
6060
lastArg && lastArg.type === 'ObjectExpression',
6161
'expected lastArg to be a ObjectExpression'
6262
);
63-
// FIXME: In this case, existing decorators should probably fail validation
6463
const classMethods = lastArg.properties.map((property) => {
6564
assert(AST.isEOMethod(property), 'expected EOMethod');
66-
// FIXME: Is `init` valid here? Seems wrong.
6765
assert(
68-
(['init', 'get', 'set'] as const).includes(
69-
property.key.name as 'init' | 'get' | 'set'
70-
)
66+
(['get', 'set'] as const).includes(property.key.name as 'get' | 'set')
7167
);
72-
const rawKind = property.key.name as 'init' | 'get' | 'set';
73-
const kind = rawKind === 'init' ? 'method' : rawKind;
74-
68+
const kind = property.key.name as 'get' | 'set';
7569
const key = this.key;
7670

7771
const params = [...property.params];

0 commit comments

Comments
 (0)