diff options
Diffstat (limited to 'js/build.ts')
-rw-r--r-- | js/build.ts | 23 |
1 files changed, 10 insertions, 13 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 |