From 24d6bf6aeb2b9ac929808e2b8ae4cd5e844a9f8b Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Fri, 8 Mar 2019 13:56:56 +1100 Subject: Remove 'deno' builtin module (#1895) --- js/compiler.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'js/compiler.ts') diff --git a/js/compiler.ts b/js/compiler.ts index 27890babd..39a32bc24 100644 --- a/js/compiler.ts +++ b/js/compiler.ts @@ -477,15 +477,7 @@ class Compiler implements ts.LanguageServiceHost, ts.FormatDiagnosticsHost { this._log("resolveModuleNames()", { moduleNames, containingFile }); const resolvedModuleNames: ts.ResolvedModuleFull[] = []; for (const moduleName of moduleNames) { - let moduleMetaData: ModuleMetaData; - if (moduleName === "deno") { - // builtin modules are part of the runtime lib - moduleMetaData = this._getModuleMetaData(LIB_RUNTIME)!; - } else if (moduleName === "typescript") { - moduleMetaData = this._getModuleMetaData(`${ASSETS}/typescript.d.ts`)!; - } else { - moduleMetaData = this._resolveModule(moduleName, containingFile); - } + const moduleMetaData = this._resolveModule(moduleName, containingFile); // According to the interface we shouldn't return `undefined` but if we // fail to return the same length of modules to those we cannot resolve // then TypeScript fails on an assertion that the lengths can't be -- cgit v1.2.3