Skip to content

Commit d519e04

Browse files
aspeddrocknitt
authored andcommitted
cleanup
1 parent dcde05f commit d519e04

File tree

2 files changed

+0
-33
lines changed

2 files changed

+0
-33
lines changed

tests/docstrings_examples/Node.res

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,13 @@
11
module Path = {
2-
@module("path") external join2: (string, string) => string = "join"
32
@module("path") @variadic external join: array<string> => string = "join"
43
@module("path") external dirname: string => string = "dirname"
54
}
65

76
module Process = {
8-
@scope("process") external exit: int => unit = "exit"
9-
@scope(("process", "stderr"))
10-
external stderrWrite: string => unit = "write"
117
@scope("process") external cwd: unit => string = "cwd"
12-
@val @scope("process")
13-
external argv: array<string> = "argv"
148
}
159

1610
module Fs = {
17-
@module("fs") external existsSync: string => bool = "existsSync"
1811
@module("fs") external readdirSync: string => array<string> = "readdirSync"
1912
@module("node:fs/promises") external writeFile: (string, string) => promise<unit> = "writeFile"
2013
}
@@ -25,46 +18,23 @@ module Buffer = {
2518
}
2619

2720
module ChildProcess = {
28-
type spawnSyncReturns = {stdout: Buffer.t}
29-
@module("child_process")
30-
external spawnSync: (string, array<string>) => spawnSyncReturns = "spawnSync"
31-
3221
type readable
3322
type spawnReturns = {stderr: readable, stdout: readable}
3423
type options = {cwd?: string, env?: Dict.t<string>, timeout?: int}
3524
@module("child_process")
3625
external spawn: (string, array<string>, ~options: options=?) => spawnReturns = "spawn"
3726

3827
@send external on: (readable, string, Buffer.t => unit) => unit = "on"
39-
@send external onFromSpawn: (spawnReturns, string, Js.Null.t<float> => unit) => unit = "on"
4028
@send
4129
external once: (spawnReturns, string, (Js.Null.t<float>, Js.Null.t<string>) => unit) => unit =
4230
"once"
43-
@send
44-
external onceError: (spawnReturns, string, Js.Exn.t => unit) => unit = "once"
4531
}
4632

4733
module OS = {
48-
@module("os")
49-
external tmpdir: unit => string = "tmpdir"
50-
5134
@module("os")
5235
external cpus: unit => array<{.}> = "cpus"
5336
}
5437

55-
module Util = {
56-
type arg = {@as("type") type_: string}
57-
type config = {
58-
args: array<string>,
59-
options: Dict.t<arg>,
60-
}
61-
type parsed = {
62-
values: Dict.t<string>,
63-
positionals: array<string>,
64-
}
65-
@module("node:util") external parseArgs: config => parsed = "parseArgs"
66-
}
67-
6838
module URL = {
6939
@module("url") external fileURLToPath: string => string = "fileURLToPath"
7040
}

tests/docstrings_examples/Node.res.mjs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ let ChildProcess = {};
1313

1414
let OS = {};
1515

16-
let Util = {};
17-
1816
let URL = {};
1917

2018
export {
@@ -24,7 +22,6 @@ export {
2422
Buffer,
2523
ChildProcess,
2624
OS,
27-
Util,
2825
URL,
2926
}
3027
/* No side effect */

0 commit comments

Comments
 (0)