summaryrefslogtreecommitdiff
path: root/js/version.ts
diff options
context:
space:
mode:
authorYoshiya Hinosawa <stibium121@gmail.com>2019-02-19 08:43:02 +0900
committerRyan Dahl <ry@tinyclouds.org>2019-02-18 18:43:02 -0500
commit55edc06218f080aa5ba83302d2642dabb599418e (patch)
treea1d5385df80d85ab1d0be96a2125cba9b218abe7 /js/version.ts
parent077af20ceb0869ddff9e08f5db1055138450fe2e (diff)
Add back typescript version number and add Deno.version object. (#1788)
Diffstat (limited to 'js/version.ts')
-rw-r--r--js/version.ts23
1 files changed, 23 insertions, 0 deletions
diff --git a/js/version.ts b/js/version.ts
new file mode 100644
index 000000000..805e565a0
--- /dev/null
+++ b/js/version.ts
@@ -0,0 +1,23 @@
+// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
+interface Version {
+ deno: string;
+ v8: string;
+ typescript: string;
+}
+
+export const version: Version = {
+ deno: "",
+ v8: "",
+ typescript: "TS_VERSION" // This string will be replaced by rollup
+};
+
+/**
+ * Sets the deno and v8 versions and freezes the version object.
+ * @internal
+ */
+export function setVersions(denoVersion: string, v8Version: string): void {
+ version.deno = denoVersion;
+ version.v8 = v8Version;
+
+ Object.freeze(version);
+}