diff options
Diffstat (limited to 'src/bun.js/api/transpiler.classes.ts')
-rw-r--r-- | src/bun.js/api/transpiler.classes.ts | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/bun.js/api/transpiler.classes.ts b/src/bun.js/api/transpiler.classes.ts new file mode 100644 index 000000000..d10090f35 --- /dev/null +++ b/src/bun.js/api/transpiler.classes.ts @@ -0,0 +1,40 @@ +import { define } from "../scripts/class-definitions"; + +export default [ + define({ + name: "Transpiler", + construct: true, + finalize: true, + hasPendingActivity: false, + klass: {}, + JSType: "0b11101110", + proto: { + scanImports: { + fn: "scanImports", + length: 2, + }, + scan: { + fn: "scan", + length: 2, + }, + transform: { + fn: "transform", + length: 2, + }, + transformSync: { + fn: "transformSync", + length: 2, + }, + }, + custom: { + onLoadPlugins: { + extraHeaderIncludes: ["BunPlugin.h"], + impl: "JSTranspiler+BunPlugin-impl.h", + type: `WTF::Vector<std::unique_ptr<BunPlugin::OnLoad>>`, + }, + onResolvePlugins: { + type: `WTF::Vector<std::unique_ptr<BunPlugin::OnResolve>>`, + }, + }, + }), +]; |