diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2018-09-06 07:05:14 -0700 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-09-06 11:04:56 -0400 |
commit | 1e709aa3486ff0700f45c78c07fa57e2c0fd1985 (patch) | |
tree | 52189ffd080258689e24ee335639bded48232f2a /js/compiler.ts | |
parent | fcdfacc2de72e52b3f82dbce37746d371c3ad3ab (diff) |
Fix TypeScript exports in bundle
Diffstat (limited to 'js/compiler.ts')
-rw-r--r-- | js/compiler.ts | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/js/compiler.ts b/js/compiler.ts index d92838652..3c2e3e4d1 100644 --- a/js/compiler.ts +++ b/js/compiler.ts @@ -137,13 +137,6 @@ function throwResolutionError( ); } -// ts.ScriptKind is not available at runtime, so local enum definition -enum ScriptKind { - JS = 1, - TS = 3, - JSON = 6 -} - /** * A singleton class that combines the TypeScript Language Service host API * with Deno specific APIs to provide an interface for compiling and running @@ -626,13 +619,13 @@ export class DenoCompiler implements ts.LanguageServiceHost { const suffix = fileName.substr(fileName.lastIndexOf(".") + 1); switch (suffix) { case "ts": - return ScriptKind.TS; + return ts.ScriptKind.TS; case "js": - return ScriptKind.JS; + return ts.ScriptKind.JS; case "json": - return ScriptKind.JSON; + return ts.ScriptKind.JSON; default: - return this._options.allowJs ? ScriptKind.JS : ScriptKind.TS; + return this._options.allowJs ? ts.ScriptKind.JS : ts.ScriptKind.TS; } } |