diff options
author | Luca Casonato <lucacasonato@yahoo.com> | 2020-04-30 17:23:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-30 11:23:40 -0400 |
commit | 80e22111416751ce34dbc5cb32ffa9f293517370 (patch) | |
tree | 5b3fe5d16ee07143e5dcb2c766a1f48c296ad9d6 /cli/compilers/ts.rs | |
parent | 4993a6504b4b447e0e02454094cffb02ee18c081 (diff) |
Unstable methods should not appear in runtime or d.ts (#4957)
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
Diffstat (limited to 'cli/compilers/ts.rs')
-rw-r--r-- | cli/compilers/ts.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cli/compilers/ts.rs b/cli/compilers/ts.rs index 0560ad292..bad2be5b2 100644 --- a/cli/compilers/ts.rs +++ b/cli/compilers/ts.rs @@ -175,6 +175,7 @@ fn req( out_file: Option<PathBuf>, target: &str, bundle: bool, + unstable: bool, ) -> Buf { let j = match (compiler_config.path, compiler_config.content) { (Some(config_path), Some(config_data)) => json!({ @@ -183,6 +184,7 @@ fn req( "rootNames": root_names, "outFile": out_file, "bundle": bundle, + "unstable": unstable, "configPath": config_path, "config": str::from_utf8(&config_data).unwrap(), }), @@ -192,6 +194,7 @@ fn req( "rootNames": root_names, "outFile": out_file, "bundle": bundle, + "unstable": unstable, }), }; @@ -290,6 +293,7 @@ impl TsCompiler { out_file, "main", true, + global_state.flags.unstable, ); let msg = execute_in_thread(global_state.clone(), req_msg).await?; @@ -371,6 +375,7 @@ impl TsCompiler { None, target, false, + global_state.flags.unstable, ); let ts_compiler = self.clone(); @@ -655,6 +660,7 @@ pub fn runtime_compile<S: BuildHasher>( "sources": sources, "options": options, "bundle": bundle, + "unstable": global_state.flags.unstable, }) .to_string() .into_boxed_str() |