Try ts-morph. Only been working with it for about an hour but it seems really capable.
import {Project, Scope, SourceFile} from "ts-morph";
const project = new Project();
const sourceFile = project.createSourceFile(`./target/file.ts`);
const classDeclaration = sourceFile.addClass({
name: 'SomeClass'
});
const constr = classDeclaration.addConstructor({});
constr.setBodyText('this.myProp = myProp');
classDeclaration.addProperty({
name: 'myProp',
type: 'string',
initializer: 'hello world!',
scope: Scope.Public
});
sourceFile.formatText();
console.log(sourceFile.getText());