@silvermine/toolbox 0.5.0 → 0.5.1
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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [our coding standards][commit-messages] for commit guidelines.
|
|
5
5
|
|
|
6
|
+
### [0.5.1](https://github.com/silvermine/toolbox/compare/v0.5.0...v0.5.1) (2025-11-08)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* ensure hasDefined is called on an object ([e532ebf](https://github.com/silvermine/toolbox/commit/e532ebf571481d38a0a6d22890e08e18eba3f807))
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [0.5.0](https://github.com/silvermine/toolbox/compare/v0.4.0...v0.5.0) (2025-10-24)
|
|
7
15
|
|
|
8
16
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"has-defined.js","sourceRoot":"","sources":["../../../src/utils/has-defined.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAI7C;;;;;;;;;;;;;;;;GAgBG;AACH,SAAgB,UAAU,
|
|
1
|
+
{"version":3,"file":"has-defined.js","sourceRoot":"","sources":["../../../src/utils/has-defined.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAI7C;;;;;;;;;;;;;;;;GAgBG;AACH,SAAgB,UAAU,CAAqD,CAAI,EAAE,QAAW;IAC7F,OAAO,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,0BAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;AACzF,CAAC;AAFD,gCAEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"has-defined.js","sourceRoot":"","sources":["../../../src/utils/has-defined.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI7C;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,UAAU,
|
|
1
|
+
{"version":3,"file":"has-defined.js","sourceRoot":"","sources":["../../../src/utils/has-defined.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI7C;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,UAAU,CAAqD,CAAI,EAAE,QAAW;IAC7F,OAAO,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;AACzF,CAAC"}
|
|
@@ -17,6 +17,6 @@ import { UnionKeys } from '../types/UnionKeys';
|
|
|
17
17
|
* @param propName the name of the optional or possibly-undefined property that you want
|
|
18
18
|
* to be required
|
|
19
19
|
*/
|
|
20
|
-
export declare function hasDefined<T, U extends keyof T | UnionKeys<T>>(o: T, propName: U): o is RequireDefined<Extract<T, {
|
|
20
|
+
export declare function hasDefined<T extends object, U extends keyof T | UnionKeys<T>>(o: T, propName: U): o is RequireDefined<Extract<T, {
|
|
21
21
|
[key in U]?: unknown;
|
|
22
22
|
}>, U>;
|
package/package.json
CHANGED
package/src/utils/has-defined.ts
CHANGED
|
@@ -19,6 +19,6 @@ import { UnionKeys } from '../types/UnionKeys';
|
|
|
19
19
|
* @param propName the name of the optional or possibly-undefined property that you want
|
|
20
20
|
* to be required
|
|
21
21
|
*/
|
|
22
|
-
export function hasDefined<T, U extends keyof T | UnionKeys<T>>(o: T, propName: U): o is RequireDefined<Extract<T, { [key in U]?: unknown }>, U> {
|
|
22
|
+
export function hasDefined<T extends object, U extends keyof T | UnionKeys<T>>(o: T, propName: U): o is RequireDefined<Extract<T, { [key in U]?: unknown }>, U> {
|
|
23
23
|
return Object.prototype.hasOwnProperty.call(o, propName) && !isUndefined(o[propName]);
|
|
24
24
|
}
|