diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/build.ts | 23 | ||||
-rw-r--r-- | js/deno.ts | 2 |
2 files changed, 11 insertions, 14 deletions
diff --git a/js/build.ts b/js/build.ts index e883cdba0..6866e42a2 100644 --- a/js/build.ts +++ b/js/build.ts @@ -1,33 +1,30 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. +export type OperatingSystem = "mac" | "win" | "linux"; + +export type Arch = "x64" | "arm64"; + // Do not add unsupported platforms. /** Build related information */ export interface BuildInfo { - /** The operating system CPU architecture. */ - arch: "x64"; + /** The CPU architecture. */ + arch: Arch; - /** The operating system platform. */ - os: OSType; + /** The operating system. */ + os: OperatingSystem; /** The arguments passed to GN during build. See `gn help buildargs`. */ args: string; } -/** The operating system platform. */ -export enum OSType { - mac = "mac", - win = "win", - linux = "linux" -} - // 'build' is injected by rollup.config.js at compile time. export const build: BuildInfo = { - /* eslint-disable @typescript-eslint/no-explicit-any */ // These string will be replaced by rollup + /* eslint-disable-next-line @typescript-eslint/no-explicit-any */ arch: `ROLLUP_REPLACE_ARCH` as any, + /* eslint-disable-next-line @typescript-eslint/no-explicit-any */ os: `ROLLUP_REPLACE_OS` as any, args: `ROLLUP_REPLACE_GN_ARGS` - /* eslint-enable @typescript-eslint/no-explicit-any */ }; // TODO(kevinkassimo): deprecate Deno.platform diff --git a/js/deno.ts b/js/deno.ts index a9f5f2018..d663ca55c 100644 --- a/js/deno.ts +++ b/js/deno.ts @@ -63,7 +63,7 @@ export { metrics, Metrics } from "./metrics"; export { resources } from "./resources"; export { run, RunOptions, Process, ProcessStatus } from "./process"; export { inspect } from "./console"; -export { build, platform, OSType } from "./build"; +export { build, platform, OperatingSystem, Arch } from "./build"; export { version } from "./version"; export const args: string[] = []; |