@kensio/smartass 1.19.0 → 1.20.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/dist/assert/object-has-property/object-has-property.assert.d.ts +1 -1
- package/dist/assert/object-has-property/object-has-property.assert.d.ts.map +1 -1
- package/dist/assert/object-has-property/object-has-property.type.d.ts +3 -1
- package/dist/assert/object-has-property/object-has-property.type.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ObjectWithProperty } from "./object-has-property.type.js";
|
|
2
|
-
export declare function assertObjectHasProperty<T extends object, K extends PropertyKey>(value: T, key: K, message?: string): asserts value is T & ObjectWithProperty<K>;
|
|
2
|
+
export declare function assertObjectHasProperty<T extends object, K extends PropertyKey>(value: T, key: K, message?: string): asserts value is T & ObjectWithProperty<K, T>;
|
|
3
3
|
export declare function assertObjectHasProperty<K extends PropertyKey>(value: unknown, key: K, message?: string): asserts value is ObjectWithProperty<K>;
|
|
4
4
|
//# sourceMappingURL=object-has-property.assert.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-has-property.assert.d.ts","sourceRoot":"","sources":["../../../src/assert/object-has-property/object-has-property.assert.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAExE,wBAAgB,uBAAuB,CACrC,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,WAAW,EAErB,KAAK,EAAE,CAAC,EACR,GAAG,EAAE,CAAC,EACN,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,KAAK,IAAI,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"object-has-property.assert.d.ts","sourceRoot":"","sources":["../../../src/assert/object-has-property/object-has-property.assert.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAExE,wBAAgB,uBAAuB,CACrC,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,WAAW,EAErB,KAAK,EAAE,CAAC,EACR,GAAG,EAAE,CAAC,EACN,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,KAAK,IAAI,CAAC,GAAG,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAEjD,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,WAAW,EAC3D,KAAK,EAAE,OAAO,EACd,GAAG,EAAE,CAAC,EACN,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,KAAK,IAAI,kBAAkB,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { AssertionMatcher } from "../../match/match.js";
|
|
2
2
|
declare const objectWithPropertyMatcher: unique symbol;
|
|
3
|
-
export type ObjectWithProperty<K extends PropertyKey> = object &
|
|
3
|
+
export type ObjectWithProperty<K extends PropertyKey, T = unknown> = object & {
|
|
4
|
+
[P in K]: T extends object ? (P extends keyof T ? T[P] : unknown) : unknown;
|
|
5
|
+
};
|
|
4
6
|
export type ObjectWithPropertyMatcher<K extends PropertyKey> = AssertionMatcher<ObjectWithProperty<K>> & {
|
|
5
7
|
readonly [objectWithPropertyMatcher]: K;
|
|
6
8
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-has-property.type.d.ts","sourceRoot":"","sources":["../../../src/assert/object-has-property/object-has-property.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,CAAC,MAAM,yBAAyB,EAAE,OAAO,MAAM,CAAC;AAEvD,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,WAAW,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"object-has-property.type.d.ts","sourceRoot":"","sources":["../../../src/assert/object-has-property/object-has-property.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,CAAC,MAAM,yBAAyB,EAAE,OAAO,MAAM,CAAC;AAEvD,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,WAAW,EAAE,CAAC,GAAG,OAAO,IAAI,MAAM,GAAG;KAC3E,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,MAAM,GAAG,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,GAAG,OAAO;CAC5E,CAAC;AAEF,MAAM,MAAM,yBAAyB,CAAC,CAAC,SAAS,WAAW,IAAI,gBAAgB,CAC7E,kBAAkB,CAAC,CAAC,CAAC,CACtB,GAAG;IACF,QAAQ,CAAC,CAAC,yBAAyB,CAAC,EAAE,CAAC,CAAC;CACzC,CAAC"}
|