@sap-cloud-sdk/util 4.7.1-20260708014604.0 → 4.7.1-20260711014657.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/types.d.ts +11 -1
- package/package.json +2 -2
package/dist/types.d.ts
CHANGED
|
@@ -15,8 +15,18 @@ export declare function caps(oDataVersion: any): 'V2' | 'V4';
|
|
|
15
15
|
export type Without<T> = {
|
|
16
16
|
[P in keyof T]?: never;
|
|
17
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* Manual XOR between a destination and fetch options.
|
|
20
|
+
*
|
|
21
|
+
* `WithoutExclusive<T, U>` nevers every key of `T` that is NOT also in `U` — so the discriminators
|
|
22
|
+
* shared by both branches stay accessible, while exclusive keys are correctly forbidden
|
|
23
|
+
* on the opposite branch.
|
|
24
|
+
*/
|
|
25
|
+
export type WithoutExclusive<T, U> = {
|
|
26
|
+
[P in Exclude<keyof T, keyof U>]?: never;
|
|
27
|
+
};
|
|
18
28
|
/**
|
|
19
29
|
* XOR of two types containing keys with different names.
|
|
20
30
|
* If the two types show an overlap the type is `never`.
|
|
21
31
|
*/
|
|
22
|
-
export type Xor<T, U> = (
|
|
32
|
+
export type Xor<T, U> = (WithoutExclusive<T, U> & U) | (WithoutExclusive<U, T> & T);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-cloud-sdk/util",
|
|
3
|
-
"version": "4.7.1-
|
|
3
|
+
"version": "4.7.1-20260711014657.0",
|
|
4
4
|
"description": "SAP Cloud SDK for JavaScript general utilities",
|
|
5
5
|
"homepage": "https://sap.github.io/cloud-sdk/docs/js/overview",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"nock": "^14.0.11",
|
|
41
41
|
"prettier": "^3.8.1",
|
|
42
42
|
"typescript": "~5.9.3",
|
|
43
|
-
"@sap-cloud-sdk/test-util-internal": "^4.7.1-
|
|
43
|
+
"@sap-cloud-sdk/test-util-internal": "^4.7.1-20260711014657.0"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"compile": "tsc -b",
|