Skip to content

Commit 0ba0ed1

Browse files
Rick Valdesclaude
andcommitted
Type the BUILD_TARGETS filter params (fix typecheck / pre-push hook)
targetKey's parameter was implicitly any, which failed `bun typecheck` and blocked the pre-push hook, so the 1.3.13 Windows fix never reached the remote. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent d40c01e commit 0ba0ed1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/opencode/script/build.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ const allTargets: {
120120
// (matched as "<os>-<arch>[-baseline][-<abi>]"). Used for testing one platform
121121
// without a full matrix build.
122122
const onlyTargets = process.env.BUILD_TARGETS?.split(",").map((x) => x.trim()).filter(Boolean)
123-
const targetKey = (t) =>
123+
const targetKey = (t: (typeof allTargets)[number]) =>
124124
`${t.os}-${t.arch}${t.avx2 === false ? "-baseline" : ""}${t.abi ? "-" + t.abi : ""}`
125125
const targets = onlyTargets
126-
? allTargets.filter((item) => onlyTargets.includes(targetKey(item)))
126+
? allTargets.filter((item: (typeof allTargets)[number]) => onlyTargets.includes(targetKey(item)))
127127
: singleFlag
128128
? allTargets.filter((item) => {
129129
if (item.os !== process.platform || item.arch !== process.arch) {

0 commit comments

Comments
 (0)