@@ -32,13 +32,13 @@ import { popScope, pushScope, ScopeType } from "../../utils/scope";
3232import { isAmbientNode } from "../../utils/typescript" ;
3333import { transformIdentifier } from "../identifier" ;
3434import { transformPropertyName } from "../literal" ;
35- import { createClassCreationMethods } from "./creation" ;
3635import { createConstructorDecorationStatement } from "./decorators" ;
3736import { isGetAccessorOverride , transformAccessorDeclaration } from "./members/accessors" ;
3837import { createConstructorName , transformConstructorDeclaration } from "./members/constructor" ;
3938import { transformClassInstanceFields } from "./members/fields" ;
4039import { transformMethodDeclaration } from "./members/method" ;
4140import { checkForLuaLibType } from "./new" ;
41+ import { createClassSetup } from "./setup" ;
4242import { getExtendedType , getExtendedTypeNode , isStaticNode } from "./utils" ;
4343
4444export function transformClassAsExpression (
@@ -204,15 +204,9 @@ export function transformClassDeclaration(
204204 }
205205
206206 if ( ! isExtension && ! isMetaExtension ) {
207- const classCreationMethods = createClassCreationMethods (
208- context ,
209- classDeclaration ,
210- className ,
211- localClassName ,
212- classNameText ,
213- extendsType
207+ result . push (
208+ ...createClassSetup ( context , classDeclaration , className , localClassName , classNameText , extendsType )
214209 ) ;
215- result . push ( ...classCreationMethods ) ;
216210 } else {
217211 for ( const f of instanceFields ) {
218212 const fieldName = transformPropertyName ( context , f . name ) ;
0 commit comments