diff options
Diffstat (limited to 'runtime/js/01_version.ts')
-rw-r--r-- | runtime/js/01_version.ts | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/runtime/js/01_version.ts b/runtime/js/01_version.ts new file mode 100644 index 000000000..cbbbd8d03 --- /dev/null +++ b/runtime/js/01_version.ts @@ -0,0 +1,30 @@ +// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. + +const primordials = globalThis.__bootstrap.primordials; +const { ObjectFreeze } = primordials; + +interface Version { + deno: string; + v8: string; + typescript: string; +} + +const version: Version = { + deno: "", + v8: "", + typescript: "", +}; + +function setVersions( + denoVersion, + v8Version, + tsVersion, +) { + version.deno = denoVersion; + version.v8 = v8Version; + version.typescript = tsVersion; + + ObjectFreeze(version); +} + +export { setVersions, version }; |