Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions bin/core/src/ts_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ const ALLOWED_FILES: &[&str] = &[
"lib.d.ts",
"types.js",
"types.d.ts",
"types_namespace.js",
"types_namespace.d.ts",
"responses.js",
"responses.d.ts",
"terminal.js",
Expand Down
5 changes: 5 additions & 0 deletions client/core/ts/generate_types.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ exec(gen_command, (error, _stdout, _stderr) => {

function fix_types() {
const types_path = __dirname + "/src/types.ts";
const types_namespace_path = __dirname + "/src/types_namespace.ts";
const contents = readFileSync(types_path);
const fixed = contents
.toString()
Expand All @@ -43,4 +44,8 @@ function fix_types() {
)
.replaceAll("IndexMap", "Record");
writeFileSync(types_path, fixed);
const types_namespace = `declare namespace Types {
${fixed}
}`;
writeFileSync(types_namespace_path, types_namespace);
}
Loading