Skip to content

Commit

Permalink
refactor(tsc): split TS compiler into multiple files, use ESM (denola…
Browse files Browse the repository at this point in the history
…nd#27784)

This is a pure refactor, the `99_main_compiler.js` file
was getting out of hand, being over 1500 lines and serving
3 distinct purposes:
- snapshotting
- type-checking
- running LSP

The file was split into:
- 97_ts_host.js
- 98_lsp.js
- 99_main_compiler.js
  • Loading branch information
bartlomieju authored Jan 23, 2025
1 parent 80a6179 commit ab18dac
Show file tree
Hide file tree
Showing 4 changed files with 1,566 additions and 1,470 deletions.
8 changes: 7 additions & 1 deletion cli/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,16 @@ mod ts {

deno_core::extension!(deno_tsc,
ops = [op_build_info, op_is_node_file, op_load, op_script_version],
esm_entry_point = "ext:deno_tsc/99_main_compiler.js",
esm = [
dir "tsc",
"97_ts_host.js",
"98_lsp.js",
"99_main_compiler.js",
],
js = [
dir "tsc",
"00_typescript.js",
"99_main_compiler.js",
],
options = {
op_crate_libs: HashMap<&'static str, PathBuf>,
Expand Down
Loading

0 comments on commit ab18dac

Please sign in to comment.