mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-15 02:54:07 +00:00
firmware/actions: reuse isError from utils
Remove duplicate isError function.
This commit is contained in:
+2
-2
@@ -1,5 +1,5 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (c) 2020-2022 The Pybricks Authors
|
||||
// Copyright (c) 2020-2026 The Pybricks Authors
|
||||
|
||||
/**
|
||||
* Asserts that an assumption is true. This is used to detect programmer errors
|
||||
@@ -43,7 +43,7 @@ export function hex(n: number, pad: number): string {
|
||||
return `0x${n.toString(16).padStart(pad, '0')}`;
|
||||
}
|
||||
|
||||
function isError(err: unknown): err is Error {
|
||||
export function isError(err: unknown): err is Error {
|
||||
const maybeError = err as Error;
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user