1- /** @import { ClassBody, Expression, Identifier, Literal, MethodDefinition, PrivateIdentifier, PropertyDefinition } from 'estree' */
1+ /** @import { ClassBody, Expression, Identifier, Literal, MethodDefinition, PrivateIdentifier, PropertyDefinition, StaticBlock } from 'estree' */
22/** @import { } from '#compiler' */
33/** @import { Context, StateField } from '../types' */
44import { dev , is_ignored } from '../../../../state.js' ;
@@ -13,8 +13,17 @@ import { build_proxy_reassignment, should_proxy } from '../utils.js';
1313 */
1414export function ClassBody ( node , context ) {
1515 if ( ! context . state . analysis . runes ) {
16- context . next ( ) ;
17- return ;
16+ /** @type {Array<MethodDefinition | PropertyDefinition | StaticBlock> } */
17+ const body = [ ] ;
18+
19+ for ( const definition of node . body ) {
20+ if ( definition . type == 'MethodDefinition' && definition . abstract ) {
21+ continue ;
22+ }
23+ body . push ( definition ) ;
24+ }
25+
26+ return { ...node , body } ;
1827 }
1928
2029 /** @type {Map<string, StateField> } */
@@ -30,6 +39,10 @@ export function ClassBody(node, context) {
3039 const private_ids = [ ] ;
3140
3241 for ( const definition of node . body ) {
42+ if ( definition . type == 'MethodDefinition' && definition . abstract ) {
43+ continue ;
44+ }
45+
3346 if (
3447 ( definition . type === 'PropertyDefinition' || definition . type === 'MethodDefinition' ) &&
3548 ( definition . key . type === 'Identifier' ||
@@ -96,6 +109,10 @@ export function ClassBody(node, context) {
96109
97110 // Replace parts of the class body
98111 for ( const definition of node . body ) {
112+ if ( definition . type == 'MethodDefinition' && definition . abstract ) {
113+ continue ;
114+ }
115+
99116 if (
100117 definition . type === 'PropertyDefinition' &&
101118 ( definition . key . type === 'Identifier' ||
0 commit comments