2024-01-01 14:58:21 -05:00
|
|
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2020-07-19 13:49:44 -04:00
|
|
|
|
2023-02-07 14:22:46 -05:00
|
|
|
const primordials = globalThis.__bootstrap.primordials;
|
|
|
|
const { ObjectFreeze } = primordials;
|
2021-07-03 10:58:08 -04:00
|
|
|
|
2023-02-08 16:40:18 -05:00
|
|
|
interface Version {
|
|
|
|
deno: string;
|
|
|
|
v8: string;
|
|
|
|
typescript: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
const version: Version = {
|
2023-02-07 14:22:46 -05:00
|
|
|
deno: "",
|
|
|
|
v8: "",
|
|
|
|
typescript: "",
|
|
|
|
};
|
2020-07-19 13:49:44 -04:00
|
|
|
|
2023-02-07 14:22:46 -05:00
|
|
|
function setVersions(
|
|
|
|
denoVersion,
|
|
|
|
v8Version,
|
|
|
|
tsVersion,
|
|
|
|
) {
|
|
|
|
version.deno = denoVersion;
|
|
|
|
version.v8 = v8Version;
|
|
|
|
version.typescript = tsVersion;
|
2020-07-19 13:49:44 -04:00
|
|
|
|
2023-02-07 14:22:46 -05:00
|
|
|
ObjectFreeze(version);
|
|
|
|
}
|
2020-07-19 13:49:44 -04:00
|
|
|
|
2023-02-07 14:22:46 -05:00
|
|
|
export { setVersions, version };
|