diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-01-29 18:54:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-29 18:54:23 +0100 |
commit | 161adfc51b750a7c8c62a898ea9948c2ad5b6cd9 (patch) | |
tree | 6d53db2a4acd30207372f665a3ba463e26db6fcf /cli/lib.rs | |
parent | d14864c57cebbd1d5bc18b8a9e05e522eb9987b0 (diff) |
workers: proper TS libs, more spec-compliant APIs (#3812)
* split lib.deno_main.d.ts into:
- lib.deno.shared_globals.d.ts
- lib.deno.window.d.ts
- lib.deno.worker.d.ts
* remove no longer used libs:
- lib.deno_main.d.ts
- lib.deno_worker.d.ts
* change module loading to use proper TS library for compilation
* align to Worker API spec:
- Worker.terminate()
- self.close()
- self.name
Diffstat (limited to 'cli/lib.rs')
-rw-r--r-- | cli/lib.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cli/lib.rs b/cli/lib.rs index 311d8ce30..56705289f 100644 --- a/cli/lib.rs +++ b/cli/lib.rs @@ -54,6 +54,7 @@ pub mod version; mod web_worker; pub mod worker; +use crate::compilers::TargetLib; use crate::deno_error::js_check; use crate::deno_error::{print_err_and_exit, print_msg_and_exit}; use crate::global_state::ThreadSafeGlobalState; @@ -146,7 +147,12 @@ fn create_worker_and_state( } fn types_command() { - println!("{}\n{}", crate::js::DENO_NS_LIB, crate::js::DENO_MAIN_LIB); + println!( + "{}\n{}\n{}", + crate::js::DENO_NS_LIB, + crate::js::SHARED_GLOBALS_LIB, + crate::js::WINDOW_LIB + ); } fn print_cache_info(worker: MainWorker) { @@ -198,7 +204,7 @@ async fn print_file_info( let maybe_compiled = global_state_ .clone() - .fetch_compiled_module(&module_specifier, None) + .fetch_compiled_module(&module_specifier, None, TargetLib::Main) .await; if let Err(e) = maybe_compiled { debug!("compiler error exiting!"); |