@rickosborne/guard 2024.12.34 → 2024.12.35
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/README.md +2 -2
- package/package.json +2 -2
- package/types/ts/has-number.d.ts +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @rickosborne/guard
|
|
2
2
|
|
|
3
|
-
Basic type guards building on [@rickosborne/typical](https://www.npmjs.com/package/@rickosborne/typical).
|
|
3
|
+
Basic type guards building on helper types from [@rickosborne/typical](https://www.npmjs.com/package/@rickosborne/typical).
|
|
4
4
|
|
|
5
5
|
***
|
|
6
6
|
|
|
@@ -94,7 +94,7 @@ Guard for whether the given value is an object which has a property with its own
|
|
|
94
94
|
<a id="api-hasnumber"></a>
|
|
95
95
|
|
|
96
96
|
```typescript
|
|
97
|
-
hasNumber: <Name extends string>(obj: unknown, name: Name) => obj is { [k in Name]:
|
|
97
|
+
hasNumber: <Name extends string>(obj: unknown, name: Name) => obj is { [k in Name]: number; }
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
Guard for whether an object has a property with the given name and a numeric value.
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"url": "https://rickosborne.org"
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@rickosborne/typical": "2024.12.
|
|
7
|
+
"@rickosborne/typical": "2024.12.35"
|
|
8
8
|
},
|
|
9
9
|
"description": "Rick Osborne's collection of type guards.",
|
|
10
10
|
"engines": {
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
},
|
|
41
41
|
"types": "types/index.d.ts",
|
|
42
42
|
"typings": "types/index.d.ts",
|
|
43
|
-
"version": "2024.12.
|
|
43
|
+
"version": "2024.12.35"
|
|
44
44
|
}
|
package/types/ts/has-number.d.ts
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Guard for whether an object has a property with the given name
|
|
3
3
|
* and a numeric value.
|
|
4
4
|
*/
|
|
5
|
-
export declare const hasNumber: <Name extends string>(obj: unknown, name: Name) => obj is { [k in Name]:
|
|
5
|
+
export declare const hasNumber: <Name extends string>(obj: unknown, name: Name) => obj is { [k in Name]: number; };
|
|
6
6
|
//# sourceMappingURL=has-number.d.ts.map
|