@@ -151,7 +151,7 @@ To disable sorting of dictionary keys in output object set the
151151
152152---
153153
154- ##### ~~ ` isConstruct ` ~~ <a name =" isConstruct " id =" cdk8s.ApiObject.isConstruct " ></a >
154+ ##### ` isConstruct ` <a name =" isConstruct " id =" cdk8s.ApiObject.isConstruct " ></a >
155155
156156``` java
157157import org.cdk8s.ApiObject ;
@@ -161,6 +161,20 @@ ApiObject.isConstruct(java.lang.Object x)
161161
162162Checks if ` x ` is a construct.
163163
164+ Use this method instead of ` instanceof ` to properly detect ` Construct `
165+ instances, even when the construct library is symlinked.
166+
167+ Explanation: in JavaScript, multiple copies of the ` constructs ` library on
168+ disk are seen as independent, completely different libraries. As a
169+ consequence, the class ` Construct ` in each copy of the ` constructs ` library
170+ is seen as a different class, and an instance of one class will not test as
171+ ` instanceof ` the other class. ` npm install ` will not create installations
172+ like this, but users may manually symlink construct libraries together or
173+ use a monorepo tool: in those cases, multiple copies of the ` constructs `
174+ library can be accidentally installed, and ` instanceof ` will behave
175+ unpredictably. It is safest to avoid using ` instanceof ` , and using
176+ this type-testing method instead.
177+
164178###### ` x ` <sup >Required</sup > <a name =" x " id =" cdk8s.ApiObject.isConstruct.parameter.x " ></a >
165179
166180- * Type:* java.lang.Object
@@ -445,7 +459,7 @@ Synthesizes the app into a YAML string.
445459
446460---
447461
448- ##### ~~ ` isConstruct ` ~~ <a name =" isConstruct " id =" cdk8s.App.isConstruct " ></a >
462+ ##### ` isConstruct ` <a name =" isConstruct " id =" cdk8s.App.isConstruct " ></a >
449463
450464``` java
451465import org.cdk8s.App ;
@@ -455,6 +469,20 @@ App.isConstruct(java.lang.Object x)
455469
456470Checks if ` x ` is a construct.
457471
472+ Use this method instead of ` instanceof ` to properly detect ` Construct `
473+ instances, even when the construct library is symlinked.
474+
475+ Explanation: in JavaScript, multiple copies of the ` constructs ` library on
476+ disk are seen as independent, completely different libraries. As a
477+ consequence, the class ` Construct ` in each copy of the ` constructs ` library
478+ is seen as a different class, and an instance of one class will not test as
479+ ` instanceof ` the other class. ` npm install ` will not create installations
480+ like this, but users may manually symlink construct libraries together or
481+ use a monorepo tool: in those cases, multiple copies of the ` constructs `
482+ library can be accidentally installed, and ` instanceof ` will behave
483+ unpredictably. It is safest to avoid using ` instanceof ` , and using
484+ this type-testing method instead.
485+
458486###### ` x ` <sup >Required</sup > <a name =" x " id =" cdk8s.App.isConstruct.parameter.x " ></a >
459487
460488- * Type:* java.lang.Object
@@ -722,7 +750,7 @@ Renders this chart to a set of Kubernetes JSON resources.
722750
723751---
724752
725- ##### ~~ ` isConstruct ` ~~ <a name =" isConstruct " id =" cdk8s.Chart.isConstruct " ></a >
753+ ##### ` isConstruct ` <a name =" isConstruct " id =" cdk8s.Chart.isConstruct " ></a >
726754
727755``` java
728756import org.cdk8s.Chart ;
@@ -732,6 +760,20 @@ Chart.isConstruct(java.lang.Object x)
732760
733761Checks if ` x ` is a construct.
734762
763+ Use this method instead of ` instanceof ` to properly detect ` Construct `
764+ instances, even when the construct library is symlinked.
765+
766+ Explanation: in JavaScript, multiple copies of the ` constructs ` library on
767+ disk are seen as independent, completely different libraries. As a
768+ consequence, the class ` Construct ` in each copy of the ` constructs ` library
769+ is seen as a different class, and an instance of one class will not test as
770+ ` instanceof ` the other class. ` npm install ` will not create installations
771+ like this, but users may manually symlink construct libraries together or
772+ use a monorepo tool: in those cases, multiple copies of the ` constructs `
773+ library can be accidentally installed, and ` instanceof ` will behave
774+ unpredictably. It is safest to avoid using ` instanceof ` , and using
775+ this type-testing method instead.
776+
735777###### ` x ` <sup >Required</sup > <a name =" x " id =" cdk8s.Chart.isConstruct.parameter.x " ></a >
736778
737779- * Type:* java.lang.Object
@@ -1004,7 +1046,7 @@ Returns a string representation of this construct.
10041046
10051047---
10061048
1007- ##### ~~ ` isConstruct ` ~~ <a name =" isConstruct " id =" cdk8s.Helm.isConstruct " ></a >
1049+ ##### ` isConstruct ` <a name =" isConstruct " id =" cdk8s.Helm.isConstruct " ></a >
10081050
10091051``` java
10101052import org.cdk8s.Helm ;
@@ -1014,6 +1056,20 @@ Helm.isConstruct(java.lang.Object x)
10141056
10151057Checks if ` x ` is a construct.
10161058
1059+ Use this method instead of ` instanceof ` to properly detect ` Construct `
1060+ instances, even when the construct library is symlinked.
1061+
1062+ Explanation: in JavaScript, multiple copies of the ` constructs ` library on
1063+ disk are seen as independent, completely different libraries. As a
1064+ consequence, the class ` Construct ` in each copy of the ` constructs ` library
1065+ is seen as a different class, and an instance of one class will not test as
1066+ ` instanceof ` the other class. ` npm install ` will not create installations
1067+ like this, but users may manually symlink construct libraries together or
1068+ use a monorepo tool: in those cases, multiple copies of the ` constructs `
1069+ library can be accidentally installed, and ` instanceof ` will behave
1070+ unpredictably. It is safest to avoid using ` instanceof ` , and using
1071+ this type-testing method instead.
1072+
10171073###### ` x ` <sup >Required</sup > <a name =" x " id =" cdk8s.Helm.isConstruct.parameter.x " ></a >
10181074
10191075- * Type:* java.lang.Object
@@ -1146,7 +1202,7 @@ Returns a string representation of this construct.
11461202
11471203---
11481204
1149- ##### ~~ ` isConstruct ` ~~ <a name =" isConstruct " id =" cdk8s.Include.isConstruct " ></a >
1205+ ##### ` isConstruct ` <a name =" isConstruct " id =" cdk8s.Include.isConstruct " ></a >
11501206
11511207``` java
11521208import org.cdk8s.Include ;
@@ -1156,6 +1212,20 @@ Include.isConstruct(java.lang.Object x)
11561212
11571213Checks if ` x ` is a construct.
11581214
1215+ Use this method instead of ` instanceof ` to properly detect ` Construct `
1216+ instances, even when the construct library is symlinked.
1217+
1218+ Explanation: in JavaScript, multiple copies of the ` constructs ` library on
1219+ disk are seen as independent, completely different libraries. As a
1220+ consequence, the class ` Construct ` in each copy of the ` constructs ` library
1221+ is seen as a different class, and an instance of one class will not test as
1222+ ` instanceof ` the other class. ` npm install ` will not create installations
1223+ like this, but users may manually symlink construct libraries together or
1224+ use a monorepo tool: in those cases, multiple copies of the ` constructs `
1225+ library can be accidentally installed, and ` instanceof ` will behave
1226+ unpredictably. It is safest to avoid using ` instanceof ` , and using
1227+ this type-testing method instead.
1228+
11591229###### ` x ` <sup >Required</sup > <a name =" x " id =" cdk8s.Include.isConstruct.parameter.x " ></a >
11601230
11611231- * Type:* java.lang.Object
0 commit comments