2024-01-01 19:58:21 +00:00
|
|
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2020-07-19 17:49:44 +00:00
|
|
|
|
2024-01-10 22:37:25 +00:00
|
|
|
import { primordials } from "ext:core/mod.js";
|
|
|
|
const {
|
|
|
|
ObjectFreeze,
|
|
|
|
} = primordials;
|
2021-07-03 14:58:08 +00:00
|
|
|
|
2023-02-08 21:40:18 +00:00
|
|
|
interface Version {
|
|
|
|
deno: string;
|
|
|
|
v8: string;
|
|
|
|
typescript: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
const version: Version = {
|
2023-02-07 19:22:46 +00:00
|
|
|
deno: "",
|
|
|
|
v8: "",
|
|
|
|
typescript: "",
|
|
|
|
};
|
2020-07-19 17:49:44 +00:00
|
|
|
|
2023-02-07 19:22:46 +00:00
|
|
|
function setVersions(
|
|
|
|
denoVersion,
|
|
|
|
v8Version,
|
|
|
|
tsVersion,
|
|
|
|
) {
|
|
|
|
version.deno = denoVersion;
|
|
|
|
version.v8 = v8Version;
|
|
|
|
version.typescript = tsVersion;
|
2020-07-19 17:49:44 +00:00
|
|
|
|
2023-02-07 19:22:46 +00:00
|
|
|
ObjectFreeze(version);
|
|
|
|
}
|
2020-07-19 17:49:44 +00:00
|
|
|
|
2023-02-07 19:22:46 +00:00
|
|
|
export { setVersions, version };
|