tscodegen is a minimal TypeScript port of Facebook's Hack Codegen. It provides a fluent API that allows you to build human-readable TypeScript source files from strings of code, with optional manually editable sections and tamper detection.
/**
* This file is generated with manually editable sections. Only make
* modifications between BEGIN MANUAL SECTION and END MANUAL SECTION
* designators.
*
* @generated-editable Codelock<<jF8gPj9IVq16NXBAtEzJj0rrD9HR7Q6V>>
*/
import path from "path";
import fs from "fs";
/* BEGIN MANUAL SECTION custom_imports */
/* END MANUAL SECTION */
class Steam extends Water {
constructor() {
this.boil();
}
boil() {
/* BEGIN MANUAL SECTION boil_body */
new Magician().magic(); // This line was retrieved from the original file.ts
/* END MANUAL SECTION */
}
}
Submission Details
Type of Submission:
Links to open-source project:
Additional information (optional):
(Copied from README)
tscodegen is a minimal TypeScript port of Facebook's Hack Codegen. It provides a fluent API that allows you to build human-readable TypeScript source files from strings of code, with optional manually editable sections and tamper detection.
Sample:
Codegen script
Output