summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/assets.ts8
-rw-r--r--js/compiler.ts10
-rw-r--r--js/libdeno.ts3
-rw-r--r--js/main.ts5
-rw-r--r--js/permissions_test.ts9
5 files changed, 9 insertions, 26 deletions
diff --git a/js/assets.ts b/js/assets.ts
index 773612b26..18bf97548 100644
--- a/js/assets.ts
+++ b/js/assets.ts
@@ -39,9 +39,6 @@ import libEsnextBigintDts from "/third_party/node_modules/typescript/lib/lib.esn
import libEsnextDts from "/third_party/node_modules/typescript/lib/lib.esnext.d.ts!string";
import libEsnextIntlDts from "/third_party/node_modules/typescript/lib/lib.esnext.intl.d.ts!string";
import libEsnextSymbolDts from "/third_party/node_modules/typescript/lib/lib.esnext.symbol.d.ts!string";
-
-// Static definitions
-import typescriptDts from "/third_party/node_modules/typescript/lib/typescript.d.ts!string";
// tslint:enable:max-line-length
// @internal
@@ -78,8 +75,5 @@ export const assetSourceCode: { [key: string]: string } = {
"lib.esnext.asynciterable.d.ts": libEsnextAsynciterablesDts,
"lib.esnext.bigint.d.ts": libEsnextBigintDts,
"lib.esnext.intl.d.ts": libEsnextIntlDts,
- "lib.esnext.symbol.d.ts": libEsnextSymbolDts,
-
- // Static definitions
- "typescript.d.ts": typescriptDts
+ "lib.esnext.symbol.d.ts": libEsnextSymbolDts
};
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
diff --git a/js/libdeno.ts b/js/libdeno.ts
index 61e259b54..ee43413f3 100644
--- a/js/libdeno.ts
+++ b/js/libdeno.ts
@@ -24,9 +24,6 @@ interface Libdeno {
shared: ArrayBuffer;
- // DEPRECATED
- builtinModules: { [s: string]: object };
-
/** Evaluate provided code in the current context.
* It differs from eval(...) in that it does not create a new context.
* Returns an array: [output, errInfo].
diff --git a/js/main.ts b/js/main.ts
index b67f188ac..830c77eb6 100644
--- a/js/main.ts
+++ b/js/main.ts
@@ -6,7 +6,6 @@ import "./globals";
import { assert, log } from "./util";
import * as os from "./os";
-import { libdeno } from "./libdeno";
import { args } from "./deno";
import { replLoop } from "./repl";
import { setVersions } from "./version";
@@ -22,10 +21,6 @@ import libDts from "gen/lib/lib.deno_runtime.d.ts!string";
export default function denoMain() {
const startResMsg = os.start();
- // TODO(kitsonk) remove when import "deno" no longer supported
- libdeno.builtinModules["deno"] = deno;
- Object.freeze(libdeno.builtinModules);
-
setVersions(startResMsg.denoVersion()!, startResMsg.v8Version()!);
// handle `--version`
diff --git a/js/permissions_test.ts b/js/permissions_test.ts
index 21c21aa94..e44be79bb 100644
--- a/js/permissions_test.ts
+++ b/js/permissions_test.ts
@@ -1,8 +1,13 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
import { testPerm, assert, assertEquals } from "./test_util.ts";
-import { Permission } from "deno";
-const knownPermissions: Permission[] = ["run", "read", "write", "net", "env"];
+const knownPermissions: Deno.Permission[] = [
+ "run",
+ "read",
+ "write",
+ "net",
+ "env"
+];
for (let grant of knownPermissions) {
testPerm({ [grant]: true }, function envGranted() {