summaryrefslogtreecommitdiff
path: root/cli/js/lib.deno.ns.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/js/lib.deno.ns.d.ts')
-rw-r--r--cli/js/lib.deno.ns.d.ts16
1 files changed, 16 insertions, 0 deletions
diff --git a/cli/js/lib.deno.ns.d.ts b/cli/js/lib.deno.ns.d.ts
index f3ee04243..cd82b4adf 100644
--- a/cli/js/lib.deno.ns.d.ts
+++ b/cli/js/lib.deno.ns.d.ts
@@ -3,6 +3,22 @@
/// <reference no-default-lib="true" />
/// <reference lib="esnext" />
+declare interface ImportMeta {
+ /** A string representation of the fully qualified module URL. */
+ url: string;
+
+ /** A flag that indicates if the current module is the main module that was
+ * called when starting the program under Deno.
+ *
+ * ```ts
+ * if (import.meta.main) {
+ * // this was loaded as the main module, maybe do some bootstrapping
+ * }
+ * ```
+ */
+ main: boolean;
+}
+
declare namespace Deno {
/** A set of error constructors that are raised by Deno APIs. */
export const errors: {