diff options
author | Ry Dahl <ry@tinyclouds.org> | 2020-01-21 14:57:56 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-21 14:57:56 -0500 |
commit | fa7f34eb8cec07f4c68ca4e9c46a983bc3e2308f (patch) | |
tree | 821263579dd75de3c16508fdecfdcaba52987373 /cli/js/compiler.ts | |
parent | 7fd50065a7d8a4c6ed1b1090703a7baaabdbd6aa (diff) |
Revert "Create an old program to be used in snapshot. (#3644)"
Ref #3712. This change allowed the deno_typescript crate to reference
cli/js/lib.deno_runtime.d.ts which breaks "cargo package". We intend to
reintroduce a revised version of this patch later once "cargo
package" is working and tested.
This reverts commit 737ab94ea1bdf65eeef323ea37e84bcf430fb92c.
Diffstat (limited to 'cli/js/compiler.ts')
-rw-r--r-- | cli/js/compiler.ts | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/cli/js/compiler.ts b/cli/js/compiler.ts index 54861f713..3cebf24b2 100644 --- a/cli/js/compiler.ts +++ b/cli/js/compiler.ts @@ -6,7 +6,6 @@ import "./globals.ts"; import "./ts_global.d.ts"; import { TranspileOnlyResult } from "./compiler_api.ts"; -import { oldProgram } from "./compiler_bootstrap.ts"; import { setRootExports } from "./compiler_bundler.ts"; import { defaultBundlerOptions, @@ -143,12 +142,7 @@ self.bootstrapTsCompiler = function tsCompilerMain(): void { // to generate the program and possibly emit it. if (!diagnostics || (diagnostics && diagnostics.length === 0)) { const options = host.getCompilationSettings(); - const program = ts.createProgram({ - rootNames, - options, - host, - oldProgram - }); + const program = ts.createProgram(rootNames, options, host); diagnostics = ts .getPreEmitDiagnostics(program) @@ -226,12 +220,11 @@ self.bootstrapTsCompiler = function tsCompilerMain(): void { } host.mergeOptions(...compilerOptions); - const program = ts.createProgram({ + const program = ts.createProgram( rootNames, - options: host.getCompilationSettings(), - host, - oldProgram - }); + host.getCompilationSettings(), + host + ); if (bundle) { setRootExports(program, rootNames[0]); |