aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/api/bun.classes.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/bun.js/api/bun.classes.ts')
-rw-r--r--src/bun.js/api/bun.classes.ts51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/bun.js/api/bun.classes.ts b/src/bun.js/api/bun.classes.ts
new file mode 100644
index 000000000..3a74549d2
--- /dev/null
+++ b/src/bun.js/api/bun.classes.ts
@@ -0,0 +1,51 @@
+import { define } from "../scripts/class-definitions";
+
+export default [
+ define({
+ name: "Subprocess",
+ construct: true,
+ finalize: true,
+ klass: {},
+ JSType: "0b11101110",
+ proto: {
+ pid: {
+ getter: "getPid",
+ },
+ stdin: {
+ getter: "getStdin",
+ cache: true,
+ },
+ stdout: {
+ getter: "getStdout",
+ cache: true,
+ },
+ stderr: {
+ getter: "getStderr",
+ cache: true,
+ },
+
+ ref: {
+ fn: "doRef",
+ length: 0,
+ },
+ unref: {
+ fn: "doUnref",
+ length: 0,
+ },
+
+ kill: {
+ fn: "kill",
+ length: 1,
+ },
+
+ killed: {
+ getter: "getKilled",
+ },
+
+ exitStatus: {
+ getter: "getExitStatus",
+ cache: true,
+ },
+ },
+ }),
+];