Skip to content

Commit 32a648f

Browse files
authored
🤖 Merge PR DefinitelyTyped#73393 [chrome] update runtime namespace by @erwanjugand
1 parent b2af2b5 commit 32a648f

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

types/chrome/index.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8589,6 +8589,8 @@ declare namespace chrome {
85898589
MIPS = "mips",
85908590
/** Specifies the processer architecture as mips64. */
85918591
MIPS64 = "mips64",
8592+
/** Specifies the processer architecture as riscv64. */
8593+
RISCV64 = "riscv64",
85928594
}
85938595

85948596
/**
@@ -8755,7 +8757,7 @@ declare namespace chrome {
87558757
/** The machine's processor architecture. */
87568758
arch: `${PlatformArch}`;
87578759
/** The native client architecture. This may be different from arch on some platforms. */
8758-
nacl_arch: `${PlatformNaclArch}`;
8760+
nacl_arch?: `${PlatformNaclArch}`;
87598761
}
87608762

87618763
/** An object which allows two way communication with other pages. */

types/chrome/test/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,7 @@ function testRuntime() {
638638
chrome.runtime.PlatformArch.MIPS64 === "mips64";
639639
chrome.runtime.PlatformArch.X86_32 === "x86-32";
640640
chrome.runtime.PlatformArch.X86_64 === "x86-64";
641+
chrome.runtime.PlatformArch.RISCV64 === "riscv64";
641642

642643
chrome.runtime.PlatformNaclArch.ARM === "arm";
643644
chrome.runtime.PlatformNaclArch.MIPS === "mips";
@@ -709,8 +710,8 @@ function testRuntime() {
709710

710711
chrome.runtime.getPlatformInfo(); // $ExpectType Promise<PlatformInfo>
711712
chrome.runtime.getPlatformInfo((platformInfo) => { // $ExpectType void
712-
platformInfo.arch; // $ExpectType "arm" | "arm64" | "x86-32" | "x86-64" | "mips" | "mips64"
713-
platformInfo.nacl_arch; // $ExpectType "arm" | "mips" | "mips64" | "x86-32" | "x86-64"
713+
platformInfo.arch; // $ExpectType "arm" | "arm64" | "x86-32" | "x86-64" | "mips" | "mips64" | "riscv64"
714+
platformInfo.nacl_arch; // $ExpectType "arm" | "mips" | "mips64" | "x86-32" | "x86-64" | undefined
714715
platformInfo.os; // $ExpectType "android" | "cros" | "fuchsia" | "linux" | "mac" | "openbsd" | "win"
715716
});
716717
// @ts-expect-error

0 commit comments

Comments
 (0)