type-guardians 1.2.2--canary.5.181a8ea.0 → 1.2.2--canary.5.b71d944.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/error.ts +1 -1
- package/package.json +1 -1
package/error.ts
CHANGED
|
@@ -5,6 +5,6 @@ export function isError(value: unknown): value is Error {
|
|
|
5
5
|
export function assertError(
|
|
6
6
|
value: unknown,
|
|
7
7
|
message = `Expected an error, received ${typeof value}`,
|
|
8
|
-
): asserts value is
|
|
8
|
+
): asserts value is Error {
|
|
9
9
|
if (!isError(value)) throw new TypeError(message);
|
|
10
10
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "type-guardians",
|
|
3
|
-
"version": "1.2.2--canary.5.
|
|
3
|
+
"version": "1.2.2--canary.5.b71d944.0",
|
|
4
4
|
"description": "A lightweight, zero-dependency TypeScript library providing type guards and assertions for safer and more readable code",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|