mirror of
https://github.com/denoland/deno.git
synced 2024-11-24 15:19:26 -05:00
30 lines
536 B
TypeScript
30 lines
536 B
TypeScript
// Copyright 2018-2024 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 };
|