aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/api/transpiler.classes.ts
blob: d10090f35c2135719bb72f2b5becbc0b5fc06c8f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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>>`,
      },
    },
  }),
];