fix(cli): resolve repo-wide tsc --noEmit type errors (#512)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -350,7 +350,7 @@ function applyPermissions(
|
||||
}
|
||||
}
|
||||
|
||||
const permission: Record<string, "allow" | "deny"> = {}
|
||||
const permission: Record<string, "allow" | "deny" | Record<string, "allow" | "deny">> = {}
|
||||
const tools: Record<string, boolean> = {}
|
||||
|
||||
for (const tool of sourceTools) {
|
||||
@@ -369,7 +369,7 @@ function applyPermissions(
|
||||
for (const pattern of toolPatterns) {
|
||||
patternPermission[pattern] = "allow"
|
||||
}
|
||||
;(permission as Record<string, typeof patternPermission>)[tool] = patternPermission
|
||||
;(permission)[tool] = patternPermission
|
||||
} else {
|
||||
permission[tool] = enabled.has(tool) ? "allow" : "deny"
|
||||
}
|
||||
@@ -383,7 +383,7 @@ function applyPermissions(
|
||||
for (const pattern of toolPatterns) {
|
||||
patternPermission[pattern] = "allow"
|
||||
}
|
||||
;(permission as Record<string, typeof patternPermission>)[tool] = patternPermission
|
||||
;(permission)[tool] = patternPermission
|
||||
}
|
||||
}
|
||||
|
||||
@@ -399,8 +399,8 @@ function applyPermissions(
|
||||
for (const pattern of combined) {
|
||||
combinedPermission[pattern] = "allow"
|
||||
}
|
||||
;(permission as Record<string, typeof combinedPermission>).edit = combinedPermission
|
||||
;(permission as Record<string, typeof combinedPermission>).write = combinedPermission
|
||||
;(permission).edit = combinedPermission
|
||||
;(permission).write = combinedPermission
|
||||
}
|
||||
|
||||
config.permission = permission
|
||||
|
||||
Reference in New Issue
Block a user