jsii-reflect 1.113.0 → 1.114.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/lib/type-ref.d.ts +1 -0
- package/lib/type-ref.js +11 -0
- package/package.json +9 -8
package/lib/type-ref.d.ts
CHANGED
|
@@ -14,5 +14,6 @@ export declare class TypeReference {
|
|
|
14
14
|
get arrayOfType(): TypeReference | undefined;
|
|
15
15
|
get mapOfType(): TypeReference | undefined;
|
|
16
16
|
get unionOfTypes(): TypeReference[] | undefined;
|
|
17
|
+
get intersectionOfTypes(): TypeReference[] | undefined;
|
|
17
18
|
}
|
|
18
19
|
//# sourceMappingURL=type-ref.d.ts.map
|
package/lib/type-ref.js
CHANGED
|
@@ -28,6 +28,11 @@ class TypeReference {
|
|
|
28
28
|
union.sort();
|
|
29
29
|
return union.join(' | ');
|
|
30
30
|
}
|
|
31
|
+
if (this.intersectionOfTypes) {
|
|
32
|
+
const inter = this.intersectionOfTypes.map((x) => x.toString());
|
|
33
|
+
inter.sort();
|
|
34
|
+
return inter.join(' & ');
|
|
35
|
+
}
|
|
31
36
|
throw new Error('Invalid type reference');
|
|
32
37
|
}
|
|
33
38
|
get void() {
|
|
@@ -75,6 +80,12 @@ class TypeReference {
|
|
|
75
80
|
}
|
|
76
81
|
return this.spec.union.types.map((t) => new TypeReference(this.system, t));
|
|
77
82
|
}
|
|
83
|
+
get intersectionOfTypes() {
|
|
84
|
+
if (!jsii.isIntersectionTypeReference(this.spec)) {
|
|
85
|
+
return undefined;
|
|
86
|
+
}
|
|
87
|
+
return this.spec.intersection.types.map((t) => new TypeReference(this.system, t));
|
|
88
|
+
}
|
|
78
89
|
}
|
|
79
90
|
exports.TypeReference = TypeReference;
|
|
80
91
|
//# sourceMappingURL=type-ref.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jsii-reflect",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.114.1",
|
|
4
4
|
"description": "strongly-typed reflection library and tools for jsii",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -34,18 +34,19 @@
|
|
|
34
34
|
"package": "package-js"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@jsii/check-node": "1.
|
|
38
|
-
"@jsii/spec": "
|
|
37
|
+
"@jsii/check-node": "1.114.1",
|
|
38
|
+
"@jsii/spec": "1.114.1",
|
|
39
39
|
"chalk": "^4",
|
|
40
40
|
"fs-extra": "^10.1.0",
|
|
41
|
-
"oo-ascii-tree": "^1.
|
|
42
|
-
"yargs": "^
|
|
41
|
+
"oo-ascii-tree": "^1.114.1",
|
|
42
|
+
"yargs": "^17.7.2"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@scope/jsii-calc-lib": "^1.
|
|
45
|
+
"@scope/jsii-calc-lib": "^1.114.1",
|
|
46
46
|
"@types/fs-extra": "^9.0.13",
|
|
47
|
-
"
|
|
48
|
-
"jsii
|
|
47
|
+
"@types/yargs": "^17.0.33",
|
|
48
|
+
"jsii": "^5.9.1",
|
|
49
|
+
"jsii-build-tools": "^1.114.1",
|
|
49
50
|
"jsii-calc": "^3.20.120"
|
|
50
51
|
}
|
|
51
52
|
}
|