Skip to content

Commit aab5684

Browse files
amankansal-ltclaude
andcommitted
fix(kernel): type the AppError brand lookup on a narrowed Error
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 694e4d5 commit aab5684

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎packages/kernel/src/errors.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ const APP_ERROR_BRAND = Symbol.for('agent-device.AppError');
4141
export class AppError extends Error {
4242
static [Symbol.hasInstance](value: unknown): boolean {
4343
if (this !== AppError) return Function.prototype[Symbol.hasInstance].call(this, value);
44-
return value instanceof Error && (value as Record<symbol, unknown>)[APP_ERROR_BRAND] === true;
44+
return (
45+
value instanceof Error && (value as Error & Record<symbol, unknown>)[APP_ERROR_BRAND] === true
46+
);
4547
}
4648

4749
code: AppErrorCode;

0 commit comments

Comments
 (0)