diff --git a/packages/jsii-calc/lib/documented.ts b/packages/jsii-calc/lib/documented.ts index d9d6c81ff0..2aefc8674b 100644 --- a/packages/jsii-calc/lib/documented.ts +++ b/packages/jsii-calc/lib/documented.ts @@ -66,3 +66,30 @@ export class Old { // Nothing to do } } + +/** + * > Don't use this interface + * An interface that shouldn't be used, with the annotation in a weird place. + */ +export interface DontUseMe { + /** + * > Don't set this parameter + * + * A parameter that shouldn't be set, with the annotation in a weird place. + */ + readonly dontSetMe?: string; +} + +/** + * > Don't use this class. + * + * A class that shouldn't be used, with the annotation in a weird place. + */ +export class WeirdDocs { + /** + * > Don't read this property + * + * A property that shouldn't be read, with the annotation in a weird place. + */ + public dontReadMe?: string; +} diff --git a/packages/jsii-calc/test/assembly.jsii b/packages/jsii-calc/test/assembly.jsii index bcffd9db93..aefdfc9d7c 100644 --- a/packages/jsii-calc/test/assembly.jsii +++ b/packages/jsii-calc/test/assembly.jsii @@ -5132,6 +5132,42 @@ "name": "DontComplainAboutVariadicAfterOptional", "symbolId": "lib/compliance:DontComplainAboutVariadicAfterOptional" }, + "jsii-calc.DontUseMe": { + "assembly": "jsii-calc", + "datatype": true, + "docs": { + "stability": "stable", + "summary": "> Don't use this interface An interface that shouldn't be used, with the annotation in a weird place." + }, + "fqn": "jsii-calc.DontUseMe", + "kind": "interface", + "locationInModule": { + "filename": "lib/documented.ts", + "line": 74 + }, + "name": "DontUseMe", + "properties": [ + { + "abstract": true, + "docs": { + "remarks": "A parameter that shouldn't be set, with the annotation in a weird place.", + "stability": "stable", + "summary": "> Don't set this parameter." + }, + "immutable": true, + "locationInModule": { + "filename": "lib/documented.ts", + "line": 80 + }, + "name": "dontSetMe", + "optional": true, + "type": { + "primitive": "string" + } + } + ], + "symbolId": "lib/documented:DontUseMe" + }, "jsii-calc.DoubleTrouble": { "assembly": "jsii-calc", "docs": { @@ -16010,6 +16046,45 @@ ], "symbolId": "lib/compliance:VoidCallback" }, + "jsii-calc.WeirdDocs": { + "assembly": "jsii-calc", + "docs": { + "remarks": "A class that shouldn't be used, with the annotation in a weird place.", + "stability": "stable", + "summary": "> Don't use this class." + }, + "fqn": "jsii-calc.WeirdDocs", + "initializer": { + "docs": { + "stability": "stable" + } + }, + "kind": "class", + "locationInModule": { + "filename": "lib/documented.ts", + "line": 88 + }, + "name": "WeirdDocs", + "properties": [ + { + "docs": { + "remarks": "A property that shouldn't be read, with the annotation in a weird place.", + "stability": "stable", + "summary": "> Don't read this property." + }, + "locationInModule": { + "filename": "lib/documented.ts", + "line": 94 + }, + "name": "dontReadMe", + "optional": true, + "type": { + "primitive": "string" + } + } + ], + "symbolId": "lib/documented:WeirdDocs" + }, "jsii-calc.WithPrivatePropertyInConstructor": { "assembly": "jsii-calc", "docs": { @@ -18909,5 +18984,5 @@ } }, "version": "3.20.120", - "fingerprint": "kOCIHox3N0mzJsbC3zUF0dELGRsdq5jP57dDIOu3fDE=" + "fingerprint": "KCZMc5FKKLI0JLhaAjlqS227RmusMVNRWt2UbgA5iOM=" } \ No newline at end of file diff --git a/packages/jsii-pacmak/lib/targets/java.ts b/packages/jsii-pacmak/lib/targets/java.ts index 09b8671e70..67a7ad36dd 100644 --- a/packages/jsii-pacmak/lib/targets/java.ts +++ b/packages/jsii-pacmak/lib/targets/java.ts @@ -1035,7 +1035,7 @@ class JavaGenerator extends Generator { this.code.openFile(packageInfoFile); this.code.line('/**'); if (mod.readme) { - for (const line of markDownToJavaDoc( + for (const line of myMarkDownToJavaDoc( this.convertSamplesInMarkdown(mod.readme.markdown, { api: 'moduleReadme', moduleFqn: mod.name, @@ -1069,7 +1069,7 @@ class JavaGenerator extends Generator { this.code.openFile(packageInfoFile); this.code.line('/**'); if (mod.readme) { - for (const line of markDownToJavaDoc( + for (const line of myMarkDownToJavaDoc( this.convertSamplesInMarkdown(mod.readme.markdown, { api: 'moduleReadme', moduleFqn, @@ -2294,7 +2294,7 @@ class JavaGenerator extends Generator { ); if (prop.docs?.remarks != null) { const indent = ' '.repeat(7 + prop.fieldName.length); - const remarks = markDownToJavaDoc( + const remarks = myMarkDownToJavaDoc( this.convertSamplesInMarkdown(prop.docs.remarks, { api: 'member', fqn: prop.definingType.fqn, @@ -2723,14 +2723,14 @@ class JavaGenerator extends Generator { const paras = []; if (docs.summary) { - paras.push(renderSummary(docs)); + paras.push(stripNewLines(myMarkDownToJavaDoc(renderSummary(docs)))); } else if (defaultText) { - paras.push(defaultText); + paras.push(myMarkDownToJavaDoc(defaultText)); } if (docs.remarks) { paras.push( - markDownToJavaDoc( + myMarkDownToJavaDoc( this.convertSamplesInMarkdown(docs.remarks, apiLoc), ).trimRight(), ); @@ -2757,14 +2757,14 @@ class JavaGenerator extends Generator { // Hence, we just resort to HTML-encoding everything (same as we do for code // examples that have been translated from MarkDown). paras.push( - markDownToJavaDoc(['```', convertedExample, '```'].join('\n')), + myMarkDownToJavaDoc(['```', convertedExample, '```'].join('\n')), ); } const tagLines = []; if (docs.returns) { - tagLines.push(`@return ${docs.returns}`); + tagLines.push(`@return ${myMarkDownToJavaDoc(docs.returns)}`); } if (docs.see) { tagLines.push( @@ -2772,7 +2772,7 @@ class JavaGenerator extends Generator { ); } if (docs.deprecated) { - tagLines.push(`@deprecated ${docs.deprecated}`); + tagLines.push(`@deprecated ${myMarkDownToJavaDoc(docs.deprecated)}`); } // Params @@ -3475,7 +3475,7 @@ function paramJavadoc( ): string { const parts = ['@param', name]; if (summary) { - parts.push(endWithPeriod(summary)); + parts.push(stripNewLines(myMarkDownToJavaDoc(endWithPeriod(summary)))); } if (!optional) { parts.push('This parameter is required.'); @@ -3653,3 +3653,19 @@ function containsUnionType( containsUnionType(typeRef.collection.elementtype)) ); } + +function myMarkDownToJavaDoc(source: string) { + if (source.includes('{@link') || source.includes('{@code')) { + // Slightly dirty hack: if we are seeing this, it means the docstring was provided literally + // in this file. These strings are safe to not be escaped, and in fact escaping them will + // break them: they will turn into `{@`, which breaks the JavaDoc markup. + // + // Since docstring do not (or at least should not) contain JavaDoc literals, this is safe. + return source; + } + return markDownToJavaDoc(source); +} + +function stripNewLines(x: string) { + return x.replace(/\n/g, ''); +} diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-dotnet.test.js.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-dotnet.test.js.snap index 7ae24c97e2..ddc5175c17 100644 --- a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-dotnet.test.js.snap +++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-dotnet.test.js.snap @@ -3038,6 +3038,7 @@ exports[`Generated code for "jsii-calc": / 1`] = ` ┃ ┣━ 📄 DoNotOverridePrivates.cs ┃ ┣━ 📄 DoNotRecognizeAnyAsOptional.cs ┃ ┣━ 📄 DontComplainAboutVariadicAfterOptional.cs + ┃ ┣━ 📄 DontUseMe.cs ┃ ┣━ 📄 DoubleTrouble.cs ┃ ┣━ 📄 DummyObj.cs ┃ ┣━ 📄 DynamicPropertyBearer.cs @@ -3090,6 +3091,7 @@ exports[`Generated code for "jsii-calc": / 1`] = ` ┃ ┣━ 📄 IDiamondInheritanceFirstMidLevelStruct.cs ┃ ┣━ 📄 IDiamondInheritanceSecondMidLevelStruct.cs ┃ ┣━ 📄 IDiamondInheritanceTopLevelStruct.cs + ┃ ┣━ 📄 IDontUseMe.cs ┃ ┣━ 📄 IDummyObj.cs ┃ ┣━ 📄 IEraseUndefinedHashValuesOptions.cs ┃ ┣━ 📄 IExperimentalInterface.cs @@ -3360,6 +3362,7 @@ exports[`Generated code for "jsii-calc": / 1`] = ` ┃ ┣━ 📄 VariadicTypeUnion.cs ┃ ┣━ 📄 VirtualMethodPlayground.cs ┃ ┣━ 📄 VoidCallback.cs + ┃ ┣━ 📄 WeirdDocs.cs ┃ ┗━ 📄 WithPrivatePropertyInConstructor.cs ┣━ 📄 Amazon.JSII.Tests.CalculatorPackageId.csproj ┣━ 📄 AssemblyInfo.cs @@ -7296,6 +7299,33 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; +exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DontUseMe.cs 1`] = ` +using Amazon.JSII.Runtime.Deputy; + +#pragma warning disable CS0672,CS0809,CS1591 + +namespace Amazon.JSII.Tests.CalculatorNamespace +{ + /// > Don't use this interface An interface that shouldn't be used, with the annotation in a weird place. + [JsiiByValue(fqn: "jsii-calc.DontUseMe")] + public class DontUseMe : Amazon.JSII.Tests.CalculatorNamespace.IDontUseMe + { + /// > Don't set this parameter. + /// + /// A parameter that shouldn't be set, with the annotation in a weird place. + /// + [JsiiOptional] + [JsiiProperty(name: "dontSetMe", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] + public string? DontSetMe + { + get; + set; + } + } +} + +`; + exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DoubleTrouble.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -9442,6 +9472,55 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; +exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDontUseMe.cs 1`] = ` +using Amazon.JSII.Runtime.Deputy; + +#pragma warning disable CS0672,CS0809,CS1591 + +namespace Amazon.JSII.Tests.CalculatorNamespace +{ + /// > Don't use this interface An interface that shouldn't be used, with the annotation in a weird place. + [JsiiInterface(nativeType: typeof(IDontUseMe), fullyQualifiedName: "jsii-calc.DontUseMe")] + public interface IDontUseMe + { + /// > Don't set this parameter. + /// + /// A parameter that shouldn't be set, with the annotation in a weird place. + /// + [JsiiProperty(name: "dontSetMe", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] + [Amazon.JSII.Runtime.Deputy.JsiiOptional] + string? DontSetMe + { + get + { + return null; + } + } + + /// > Don't use this interface An interface that shouldn't be used, with the annotation in a weird place. + [JsiiTypeProxy(nativeType: typeof(IDontUseMe), fullyQualifiedName: "jsii-calc.DontUseMe")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IDontUseMe + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + /// > Don't set this parameter. + /// + /// A parameter that shouldn't be set, with the annotation in a weird place. + /// + [JsiiOptional] + [JsiiProperty(name: "dontSetMe", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] + public string? DontSetMe + { + get => GetInstanceProperty(); + } + } + } +} + +`; + exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDummyObj.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -21267,6 +21346,60 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; +exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/WeirdDocs.cs 1`] = ` +using Amazon.JSII.Runtime.Deputy; + +#pragma warning disable CS0672,CS0809,CS1591 + +namespace Amazon.JSII.Tests.CalculatorNamespace +{ + /// > Don't use this class. + /// + /// A class that shouldn't be used, with the annotation in a weird place. + /// + [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.WeirdDocs), fullyQualifiedName: "jsii-calc.WeirdDocs")] + public class WeirdDocs : DeputyBase + { + public WeirdDocs(): base(_MakeDeputyProps()) + { + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + private static DeputyProps _MakeDeputyProps() + { + return new DeputyProps(System.Array.Empty()); + } + + /// Used by jsii to construct an instance of this class from a Javascript-owned object reference + /// The Javascript-owned object reference + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + protected WeirdDocs(ByRefValue reference): base(reference) + { + } + + /// Used by jsii to construct an instance of this class from DeputyProps + /// The deputy props + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + protected WeirdDocs(DeputyProps props): base(props) + { + } + + /// > Don't read this property. + /// + /// A property that shouldn't be read, with the annotation in a weird place. + /// + [JsiiOptional] + [JsiiProperty(name: "dontReadMe", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] + public virtual string? DontReadMe + { + get => GetInstanceProperty(); + set => SetInstanceProperty(value); + } + } +} + +`; + exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/WithPrivatePropertyInConstructor.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-go.test.js.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-go.test.js.snap index fe102414cb..61f54f6d5f 100644 --- a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-go.test.js.snap +++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-go.test.js.snap @@ -2729,6 +2729,7 @@ exports[`Generated code for "jsii-calc": / 1`] = ` ┣━ 📄 DoNotOverridePrivates.go ┣━ 📄 DoNotRecognizeAnyAsOptional.go ┣━ 📄 DontComplainAboutVariadicAfterOptional.go + ┣━ 📄 DontUseMe.go ┣━ 📄 DoubleTrouble.go ┣━ 📄 DummyObj.go ┣━ 📄 DynamicPropertyBearer.go @@ -3041,6 +3042,7 @@ exports[`Generated code for "jsii-calc": / 1`] = ` ┣━ 📄 version ┣━ 📄 VirtualMethodPlayground.go ┣━ 📄 VoidCallback.go + ┣━ 📄 WeirdDocs.go ┗━ 📄 WithPrivatePropertyInConstructor.go `; @@ -7423,6 +7425,21 @@ func (d *jsiiProxy_DontComplainAboutVariadicAfterOptional) OptionalAndVariadic(o } +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/DontUseMe.go 1`] = ` +package jsiicalc + + +// > Don't use this interface An interface that shouldn't be used, with the annotation in a weird place. +type DontUseMe struct { + // > Don't set this parameter. + // + // A parameter that shouldn't be set, with the annotation in a weird place. + DontSetMe *string \`field:"optional" json:"dontSetMe" yaml:"dontSetMe"\` +} + + `; exports[`Generated code for "jsii-calc": /go/jsiicalc/DoubleTrouble.go 1`] = ` @@ -17986,6 +18003,76 @@ func (v *jsiiProxy_VoidCallback) OverrideMe() { } +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/WeirdDocs.go 1`] = ` +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +// > Don't use this class. +// +// A class that shouldn't be used, with the annotation in a weird place. +type WeirdDocs interface { + // > Don't read this property. + // + // A property that shouldn't be read, with the annotation in a weird place. + DontReadMe() *string + SetDontReadMe(val *string) +} + +// The jsii proxy struct for WeirdDocs +type jsiiProxy_WeirdDocs struct { + _ byte // padding +} + +func (j *jsiiProxy_WeirdDocs) DontReadMe() *string { + var returns *string + _jsii_.Get( + j, + "dontReadMe", + &returns, + ) + return returns +} + + +func NewWeirdDocs() WeirdDocs { + _init_.Initialize() + + j := jsiiProxy_WeirdDocs{} + + _jsii_.Create( + "jsii-calc.WeirdDocs", + nil, // no parameters + &j, + ) + + return &j +} + +func NewWeirdDocs_Override(w WeirdDocs) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.WeirdDocs", + nil, // no parameters + w, + ) +} + +func (j *jsiiProxy_WeirdDocs)SetDontReadMe(val *string) { + _jsii_.Set( + j, + "dontReadMe", + val, + ) +} + + `; exports[`Generated code for "jsii-calc": /go/jsiicalc/WithPrivatePropertyInConstructor.go 1`] = ` @@ -19950,6 +20037,10 @@ func init() { return &jsiiProxy_DontComplainAboutVariadicAfterOptional{} }, ) + _jsii_.RegisterStruct( + "jsii-calc.DontUseMe", + reflect.TypeOf((*DontUseMe)(nil)).Elem(), + ) _jsii_.RegisterClass( "jsii-calc.DoubleTrouble", reflect.TypeOf((*DoubleTrouble)(nil)).Elem(), @@ -21705,6 +21796,16 @@ func init() { return &jsiiProxy_VoidCallback{} }, ) + _jsii_.RegisterClass( + "jsii-calc.WeirdDocs", + reflect.TypeOf((*WeirdDocs)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "dontReadMe", GoGetter: "DontReadMe"}, + }, + func() interface{} { + return &jsiiProxy_WeirdDocs{} + }, + ) _jsii_.RegisterClass( "jsii-calc.WithPrivatePropertyInConstructor", reflect.TypeOf((*WithPrivatePropertyInConstructor)(nil)).Elem(), diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-java.test.js.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-java.test.js.snap index 5c335f10d0..2d146a2608 100644 --- a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-java.test.js.snap +++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-java.test.js.snap @@ -2744,7 +2744,7 @@ exports[`Generated code for "@scope/jsii-calc-lib": /java/src/main/java/ package software.amazon.jsii.tests.calculator.lib; /** - * (deprecated) Check that enums from \\@scoped packages can be references. + * (deprecated) Check that enums from @scoped packages can be references. *

* See awslabs/jsii#138 */ @@ -3807,6 +3807,7 @@ exports[`Generated code for "jsii-calc": / 1`] = ` ┃ ┣━ 📄 DoNotOverridePrivates.java ┃ ┣━ 📄 DoNotRecognizeAnyAsOptional.java ┃ ┣━ 📄 DontComplainAboutVariadicAfterOptional.java + ┃ ┣━ 📄 DontUseMe.java ┃ ┣━ 📄 DoubleTrouble.java ┃ ┣━ 📄 DummyObj.java ┃ ┣━ 📄 DynamicPropertyBearer.java @@ -4070,6 +4071,7 @@ exports[`Generated code for "jsii-calc": / 1`] = ` ┃ ┣━ 📄 VariadicTypeUnion.java ┃ ┣━ 📄 VirtualMethodPlayground.java ┃ ┣━ 📄 VoidCallback.java + ┃ ┣━ 📄 WeirdDocs.java ┃ ┗━ 📄 WithPrivatePropertyInConstructor.java ┗━ 📁 resources ┗━ 📁 software @@ -4766,9 +4768,9 @@ public abstract class AbstractSuite extends software.amazon.jsii.JsiiObject { protected abstract @org.jetbrains.annotations.NotNull java.lang.String someMethod(final @org.jetbrains.annotations.NotNull java.lang.String str); /** - * Sets \`seed\` to \`this.property\`, then calls \`someMethod\` with \`this.property\` and returns the result. + * Sets seed to this.property, then calls someMethod with this.property and returns the result. *

- * @param seed a \`string\`. This parameter is required. + * @param seed a string. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String workItAll(final @org.jetbrains.annotations.NotNull java.lang.String seed) { @@ -5469,7 +5471,7 @@ public class AnyPropertyAccess extends software.amazon.jsii.JsiiObject { } /** - * Sets obj[resultProp] to \`\${obj[propA]}+\${obj[propB]}\`. + * Sets obj[resultProp] to \${obj[propA]}+\${obj[propB]}. *

* @param obj the receiver object. This parameter is required. * @param propA the first property to read. This parameter is required. @@ -5864,7 +5866,7 @@ public abstract class BurriedAnonymousObject extends software.amazon.jsii.JsiiOb /** * Implement this method and have it return it's parameter. *

- * @return \`value\` + * @return value * @param value the value that should be returned. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @@ -5882,7 +5884,7 @@ public abstract class BurriedAnonymousObject extends software.amazon.jsii.JsiiOb /** * Implement this method and have it return it's parameter. *

- * @return \`value\` + * @return value * @param value the value that should be returned. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @@ -8055,7 +8057,7 @@ exports[`Generated code for "jsii-calc": /java/src/main/java/software/am package software.amazon.jsii.tests.calculator; /** - * 1. + *

*

* call #takeThis() -> An ObjectRef will be provisioned for the value (it'll be re-used!) * 2. call #takeThisToo() -> The ObjectRef from before will need to be down-cased to the ParentStruct982 type @@ -9778,6 +9780,136 @@ public class DontComplainAboutVariadicAfterOptional extends software.amazon.jsii `; +exports[`Generated code for "jsii-calc": /java/src/main/java/software/amazon/jsii/tests/calculator/DontUseMe.java 1`] = ` +package software.amazon.jsii.tests.calculator; + +/** + *

Don't use this interface An interface that shouldn't be used, with the annotation in a weird place.

+ */ +@javax.annotation.Generated(value = "jsii-pacmak") +@software.amazon.jsii.Jsii(module = software.amazon.jsii.tests.calculator.$Module.class, fqn = "jsii-calc.DontUseMe") +@software.amazon.jsii.Jsii.Proxy(DontUseMe.Jsii$Proxy.class) +@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) +public interface DontUseMe extends software.amazon.jsii.JsiiSerializable { + + /** + *

Don't set this parameter.

+ *

+ * A parameter that shouldn't be set, with the annotation in a weird place. + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + default @org.jetbrains.annotations.Nullable java.lang.String getDontSetMe() { + return null; + } + + /** + * @return a {@link Builder} of {@link DontUseMe} + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + static Builder builder() { + return new Builder(); + } + /** + * A builder for {@link DontUseMe} + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public static final class Builder implements software.amazon.jsii.Builder { + java.lang.String dontSetMe; + + /** + * Sets the value of {@link DontUseMe#getDontSetMe} + * @param dontSetMe

Don't set this parameter.

+ * A parameter that shouldn't be set, with the annotation in a weird place. + * @return {@code this} + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public Builder dontSetMe(java.lang.String dontSetMe) { + this.dontSetMe = dontSetMe; + return this; + } + + /** + * Builds the configured instance. + * @return a new instance of {@link DontUseMe} + * @throws NullPointerException if any required attribute was not provided + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @Override + public DontUseMe build() { + return new Jsii$Proxy(this); + } + } + + /** + * An implementation for {@link DontUseMe} + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements DontUseMe { + private final java.lang.String dontSetMe; + + /** + * Constructor that initializes the object based on values retrieved from the JsiiObject. + * @param objRef Reference to the JSII managed object. + */ + protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { + super(objRef); + this.dontSetMe = software.amazon.jsii.Kernel.get(this, "dontSetMe", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + } + + /** + * Constructor that initializes the object based on literal property values passed by the {@link Builder}. + */ + protected Jsii$Proxy(final Builder builder) { + super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); + this.dontSetMe = builder.dontSetMe; + } + + @Override + public final java.lang.String getDontSetMe() { + return this.dontSetMe; + } + + @Override + @software.amazon.jsii.Internal + public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { + final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; + final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); + + if (this.getDontSetMe() != null) { + data.set("dontSetMe", om.valueToTree(this.getDontSetMe())); + } + + final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); + struct.set("fqn", om.valueToTree("jsii-calc.DontUseMe")); + struct.set("data", data); + + final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); + obj.set("$jsii.struct", struct); + + return obj; + } + + @Override + public final boolean equals(final Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + DontUseMe.Jsii$Proxy that = (DontUseMe.Jsii$Proxy) o; + + return this.dontSetMe != null ? this.dontSetMe.equals(that.dontSetMe) : that.dontSetMe == null; + } + + @Override + public final int hashCode() { + int result = this.dontSetMe != null ? this.dontSetMe.hashCode() : 0; + return result; + } + } +} + +`; + exports[`Generated code for "jsii-calc": /java/src/main/java/software/amazon/jsii/tests/calculator/DoubleTrouble.java 1`] = ` package software.amazon.jsii.tests.calculator; @@ -10033,7 +10165,7 @@ public class DynamicPropertyBearerChild extends software.amazon.jsii.tests.calcu } /** - * Sets \`this.dynamicProperty\` to the new value, and returns the old value. + * Sets this.dynamicProperty to the new value, and returns the old value. *

* @return the old value that was set. * @param newValue the new value to be set. This parameter is required. @@ -10057,7 +10189,7 @@ exports[`Generated code for "jsii-calc": /java/src/main/java/software/am package software.amazon.jsii.tests.calculator; /** - * This class is used to validate that serialization and deserialization does not interpret ISO-8601-formatted timestampts to the native date/time object, as the jsii protocol has a $jsii$date wrapper for this purpose (node's JSON parsing does *NOT* detect dates automatically in this way, so host libraries should not either). + * This class is used to validate that serialization and deserialization does not interpret ISO-8601-formatted timestampts to the native date/time object, as the jsii protocol has a $jsii$date wrapper for this purpose (node's JSON parsing does NOT detect dates automatically in this way, so host libraries should not either). */ @javax.annotation.Generated(value = "jsii-pacmak") @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @@ -10075,7 +10207,7 @@ public abstract class Entropy extends software.amazon.jsii.JsiiObject { /** * Creates a new instance of Entropy. *

- * @param clock your implementation of \`WallClock\`. This parameter is required. + * @param clock your implementation of WallClock. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) protected Entropy(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.IWallClock clock) { @@ -10086,7 +10218,7 @@ public abstract class Entropy extends software.amazon.jsii.JsiiObject { /** * Increases entropy by consuming time from the clock (yes, this is a long shot, please don't judge). *

- * @return the time from the \`WallClock\`. + * @return the time from the WallClock. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String increase() { @@ -10094,9 +10226,9 @@ public abstract class Entropy extends software.amazon.jsii.JsiiObject { } /** - * Implement this method such that it returns \`word\`. + * Implement this method such that it returns word. *

- * @return \`word\`. + * @return word. * @param word the value to return. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @@ -10112,9 +10244,9 @@ public abstract class Entropy extends software.amazon.jsii.JsiiObject { } /** - * Implement this method such that it returns \`word\`. + * Implement this method such that it returns word. *

- * @return \`word\`. + * @return word. * @param word the value to return. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @@ -10189,7 +10321,7 @@ public class EraseUndefinedHashValues extends software.amazon.jsii.JsiiObject { } /** - * Returns \`true\` if \`key\` is defined in \`opts\`. + * Returns true if key is defined in opts. *

* Used to check that undefined/null hash values * are being erased when sending values from native code to JS. @@ -17598,7 +17730,7 @@ package software.amazon.jsii.tests.calculator; public interface NestedStruct extends software.amazon.jsii.JsiiSerializable { /** - * When provided, must be > 0. + * When provided, must be > 0. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull java.lang.Number getNumberProp(); @@ -17619,7 +17751,7 @@ public interface NestedStruct extends software.amazon.jsii.JsiiSerializable { /** * Sets the value of {@link NestedStruct#getNumberProp} - * @param numberProp When provided, must be > 0. This parameter is required. + * @param numberProp When provided, must be > 0. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @@ -19673,9 +19805,9 @@ exports[`Generated code for "jsii-calc": /java/src/main/java/software/am package software.amazon.jsii.tests.calculator; /** - * Helps ensure the JSII kernel & runtime cooperate correctly when an un-exported instance of a class is returned with a declared type that is an exported interface, and the instance inherits from an exported class. + * Helps ensure the JSII kernel & runtime cooperate correctly when an un-exported instance of a class is returned with a declared type that is an exported interface, and the instance inherits from an exported class. *

- * @return an instance of an un-exported class that extends \`ExportedBaseClass\`, declared as \`IPrivatelyImplemented\`. + * @return an instance of an un-exported class that extends ExportedBaseClass, declared as IPrivatelyImplemented. * @see https://github.com/aws/jsii/issues/320 */ @javax.annotation.Generated(value = "jsii-pacmak") @@ -20294,7 +20426,7 @@ package software.amazon.jsii.tests.calculator; @software.amazon.jsii.Jsii(module = software.amazon.jsii.tests.calculator.$Module.class, fqn = "jsii-calc.SingletonStringEnum") public enum SingletonStringEnum { /** - * 1337. + *

*/ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) SINGLETON_STRING, @@ -20708,7 +20840,7 @@ exports[`Generated code for "jsii-calc": /java/src/main/java/software/am package software.amazon.jsii.tests.calculator; /** - * This is used to validate the ability to use \`this\` from within a static context. + * This is used to validate the ability to use this from within a static context. *

* https://github.com/awslabs/aws-cdk/issues/2304 */ @@ -22213,7 +22345,7 @@ public class SupportsNiceJavaBuilder extends software.amazon.jsii.tests.calculat /** * @param id some identifier. This parameter is required. - * @param defaultBar the default value of \`bar\`. + * @param defaultBar the default value of bar. * @param props some props once can provide. * @param rest a variadic continuation. This parameter is required. */ @@ -22247,7 +22379,7 @@ public class SupportsNiceJavaBuilder extends software.amazon.jsii.tests.calculat /** * @return a new instance of {@link Builder}. * @param id some identifier. This parameter is required. - * @param defaultBar the default value of \`bar\`. + * @param defaultBar the default value of bar. * @param rest a variadic continuation. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @@ -22287,12 +22419,12 @@ public class SupportsNiceJavaBuilder extends software.amazon.jsii.tests.calculat } /** - * An \`id\` field here is terrible API design, because the constructor of \`SupportsNiceJavaBuilder\` already has a parameter named \`id\`. + * An id field here is terrible API design, because the constructor of SupportsNiceJavaBuilder already has a parameter named id. *

* But here we are, doing it like we didn't care. *

* @return {@code this} - * @param id An \`id\` field here is terrible API design, because the constructor of \`SupportsNiceJavaBuilder\` already has a parameter named \`id\`. This parameter is required. + * @param id An id field here is terrible API design, because the constructor of SupportsNiceJavaBuilder already has a parameter named id. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder id(final java.lang.String id) { @@ -22343,7 +22475,7 @@ public interface SupportsNiceJavaBuilderProps extends software.amazon.jsii.JsiiS @org.jetbrains.annotations.NotNull java.lang.Number getBar(); /** - * An \`id\` field here is terrible API design, because the constructor of \`SupportsNiceJavaBuilder\` already has a parameter named \`id\`. + * An id field here is terrible API design, because the constructor of SupportsNiceJavaBuilder already has a parameter named id. *

* But here we are, doing it like we didn't care. */ @@ -22380,7 +22512,7 @@ public interface SupportsNiceJavaBuilderProps extends software.amazon.jsii.JsiiS /** * Sets the value of {@link SupportsNiceJavaBuilderProps#getId} - * @param id An \`id\` field here is terrible API design, because the constructor of \`SupportsNiceJavaBuilder\` already has a parameter named \`id\`. + * @param id An id field here is terrible API design, because the constructor of SupportsNiceJavaBuilder already has a parameter named id. * But here we are, doing it like we didn't care. * @return {@code this} */ @@ -22487,7 +22619,7 @@ exports[`Generated code for "jsii-calc": /java/src/main/java/software/am package software.amazon.jsii.tests.calculator; /** - * We can generate fancy builders in Java for classes which take a mix of positional & struct parameters. + * We can generate fancy builders in Java for classes which take a mix of positional & struct parameters. */ @javax.annotation.Generated(value = "jsii-pacmak") @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @@ -22569,12 +22701,12 @@ public class SupportsNiceJavaBuilderWithRequiredProps extends software.amazon.js } /** - * An \`id\` field here is terrible API design, because the constructor of \`SupportsNiceJavaBuilder\` already has a parameter named \`id\`. + * An id field here is terrible API design, because the constructor of SupportsNiceJavaBuilder already has a parameter named id. *

* But here we are, doing it like we didn't care. *

* @return {@code this} - * @param id An \`id\` field here is terrible API design, because the constructor of \`SupportsNiceJavaBuilder\` already has a parameter named \`id\`. This parameter is required. + * @param id An id field here is terrible API design, because the constructor of SupportsNiceJavaBuilder already has a parameter named id. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder id(final java.lang.String id) { @@ -22805,7 +22937,7 @@ public class TestStructWithEnum extends software.amazon.jsii.JsiiObject { } /** - * Returns true if \`foo\` is \`StringEnum.A\`. + * Returns true if foo is StringEnum.A. *

* @param input This parameter is required. */ @@ -22815,7 +22947,7 @@ public class TestStructWithEnum extends software.amazon.jsii.JsiiObject { } /** - * Returns true if \`foo\` is \`StringEnum.B\` and \`bar\` is \`AllTypesEnum.THIS_IS_GREAT\`. + * Returns true if foo is StringEnum.B and bar is AllTypesEnum.THIS_IS_GREAT. *

* @param input This parameter is required. */ @@ -22825,7 +22957,7 @@ public class TestStructWithEnum extends software.amazon.jsii.JsiiObject { } /** - * Returns \`foo: StringEnum.A\`. + * Returns foo: StringEnum.A. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.StructWithEnum getStructWithFoo() { @@ -22833,7 +22965,7 @@ public class TestStructWithEnum extends software.amazon.jsii.JsiiObject { } /** - * Returns \`foo: StringEnum.C\` and \`bar: AllTypesEnum.MY_ENUM_VALUE\`. + * Returns foo: StringEnum.C and bar: AllTypesEnum.MY_ENUM_VALUE. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.StructWithEnum getStructWithFooBar() { @@ -23671,7 +23803,7 @@ public class VariadicMethod extends software.amazon.jsii.JsiiObject { } /** - * @param prefix a prefix that will be use for all values returned by \`#asArray\`. This parameter is required. + * @param prefix a prefix that will be use for all values returned by #asArray. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public VariadicMethod(final @org.jetbrains.annotations.NotNull java.lang.Number... prefix) { @@ -23680,7 +23812,7 @@ public class VariadicMethod extends software.amazon.jsii.JsiiObject { } /** - * @param first the first element of the array to be returned (after the \`prefix\` provided at construction time). This parameter is required. + * @param first the first element of the array to be returned (after the prefix provided at construction time). This parameter is required. * @param others other elements to be included in the array. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @@ -23877,6 +24009,58 @@ public abstract class VoidCallback extends software.amazon.jsii.JsiiObject { `; +exports[`Generated code for "jsii-calc": /java/src/main/java/software/amazon/jsii/tests/calculator/WeirdDocs.java 1`] = ` +package software.amazon.jsii.tests.calculator; + +/** + *

Don't use this class.

+ *

+ * A class that shouldn't be used, with the annotation in a weird place. + */ +@javax.annotation.Generated(value = "jsii-pacmak") +@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) +@software.amazon.jsii.Jsii(module = software.amazon.jsii.tests.calculator.$Module.class, fqn = "jsii-calc.WeirdDocs") +public class WeirdDocs extends software.amazon.jsii.JsiiObject { + + protected WeirdDocs(final software.amazon.jsii.JsiiObjectRef objRef) { + super(objRef); + } + + protected WeirdDocs(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { + super(initializationMode); + } + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public WeirdDocs() { + super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); + software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this); + } + + /** + *

Don't read this property.

+ *

+ * A property that shouldn't be read, with the annotation in a weird place. + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public @org.jetbrains.annotations.Nullable java.lang.String getDontReadMe() { + return software.amazon.jsii.Kernel.get(this, "dontReadMe", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + } + + /** + *

Don't read this property.

+ *

+ * A property that shouldn't be read, with the annotation in a weird place. + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public void setDontReadMe(final @org.jetbrains.annotations.Nullable java.lang.String value) { + software.amazon.jsii.Kernel.set(this, "dontReadMe", value); + } +} + +`; + exports[`Generated code for "jsii-calc": /java/src/main/java/software/amazon/jsii/tests/calculator/WithPrivatePropertyInConstructor.java 1`] = ` package software.amazon.jsii.tests.calculator; @@ -24107,7 +24291,7 @@ public abstract class Cdk16625 extends software.amazon.jsii.JsiiObject { } /** - * Implement this functin to return \`gen.next()\`. It is extremely important that the \`donotimport\` submodule is NEVER explicitly loaded in the testing application (otherwise this test is void). + * Implement this functin to return gen.next(). It is extremely important that the donotimport submodule is NEVER explicitly loaded in the testing application (otherwise this test is void). *

* @param gen a VERY pseudo random number generator. This parameter is required. */ @@ -24124,7 +24308,7 @@ public abstract class Cdk16625 extends software.amazon.jsii.JsiiObject { } /** - * Implement this functin to return \`gen.next()\`. It is extremely important that the \`donotimport\` submodule is NEVER explicitly loaded in the testing application (otherwise this test is void). + * Implement this functin to return gen.next(). It is extremely important that the donotimport submodule is NEVER explicitly loaded in the testing application (otherwise this test is void). *

* @param gen a VERY pseudo random number generator. This parameter is required. */ @@ -29066,6 +29250,7 @@ jsii-calc.DoNotOverridePrivates=software.amazon.jsii.tests.calculator.DoNotOverr jsii-calc.DoNotRecognizeAnyAsOptional=software.amazon.jsii.tests.calculator.DoNotRecognizeAnyAsOptional jsii-calc.DocumentedClass=software.amazon.jsii.tests.calculator.DocumentedClass jsii-calc.DontComplainAboutVariadicAfterOptional=software.amazon.jsii.tests.calculator.DontComplainAboutVariadicAfterOptional +jsii-calc.DontUseMe=software.amazon.jsii.tests.calculator.DontUseMe jsii-calc.DoubleTrouble=software.amazon.jsii.tests.calculator.DoubleTrouble jsii-calc.DummyObj=software.amazon.jsii.tests.calculator.DummyObj jsii-calc.DynamicPropertyBearer=software.amazon.jsii.tests.calculator.DynamicPropertyBearer @@ -29239,6 +29424,7 @@ jsii-calc.VariadicMethod=software.amazon.jsii.tests.calculator.VariadicMethod jsii-calc.VariadicTypeUnion=software.amazon.jsii.tests.calculator.VariadicTypeUnion jsii-calc.VirtualMethodPlayground=software.amazon.jsii.tests.calculator.VirtualMethodPlayground jsii-calc.VoidCallback=software.amazon.jsii.tests.calculator.VoidCallback +jsii-calc.WeirdDocs=software.amazon.jsii.tests.calculator.WeirdDocs jsii-calc.WithPrivatePropertyInConstructor=software.amazon.jsii.tests.calculator.WithPrivatePropertyInConstructor jsii-calc.anonymous.IOptionA=software.amazon.jsii.tests.calculator.anonymous.IOptionA jsii-calc.anonymous.IOptionB=software.amazon.jsii.tests.calculator.anonymous.IOptionB diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.js.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.js.snap index 53f8f9ed1b..eb50eebd42 100644 --- a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.js.snap +++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.js.snap @@ -5257,6 +5257,46 @@ class DontComplainAboutVariadicAfterOptional( return typing.cast(builtins.str, jsii.invoke(self, "optionalAndVariadic", [optional, *things])) +@jsii.data_type( + jsii_type="jsii-calc.DontUseMe", + jsii_struct_bases=[], + name_mapping={"dont_set_me": "dontSetMe"}, +) +class DontUseMe: + def __init__(self, *, dont_set_me: typing.Optional[builtins.str] = None) -> None: + '''.. epigraph:: + + Don't use this interface An interface that shouldn't be used, with the annotation in a weird place. + + :param dont_set_me: .. epigraph:: Don't set this parameter. A parameter that shouldn't be set, with the annotation in a weird place. + ''' + self._values: typing.Dict[builtins.str, typing.Any] = {} + if dont_set_me is not None: + self._values["dont_set_me"] = dont_set_me + + @builtins.property + def dont_set_me(self) -> typing.Optional[builtins.str]: + '''.. epigraph:: + + Don't set this parameter. + + A parameter that shouldn't be set, with the annotation in a weird place. + ''' + result = self._values.get("dont_set_me") + return typing.cast(typing.Optional[builtins.str], result) + + def __eq__(self, rhs: typing.Any) -> builtins.bool: + return isinstance(rhs, self.__class__) and rhs._values == self._values + + def __ne__(self, rhs: typing.Any) -> builtins.bool: + return not (rhs == self) + + def __repr__(self) -> str: + return "DontUseMe(%s)" % ", ".join( + k + "=" + repr(v) for k, v in self._values.items() + ) + + @jsii.data_type( jsii_type="jsii-calc.DummyObj", jsii_struct_bases=[], @@ -10834,6 +10874,33 @@ class _VoidCallbackProxy(VoidCallback): typing.cast(typing.Any, VoidCallback).__jsii_proxy_class__ = lambda : _VoidCallbackProxy +class WeirdDocs(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.WeirdDocs"): + '''.. epigraph:: + + Don't use this class. + + A class that shouldn't be used, with the annotation in a weird place. + ''' + + def __init__(self) -> None: + jsii.create(self.__class__, self, []) + + @builtins.property + @jsii.member(jsii_name="dontReadMe") + def dont_read_me(self) -> typing.Optional[builtins.str]: + '''.. epigraph:: + + Don't read this property. + + A property that shouldn't be read, with the annotation in a weird place. + ''' + return typing.cast(typing.Optional[builtins.str], jsii.get(self, "dontReadMe")) + + @dont_read_me.setter + def dont_read_me(self, value: typing.Optional[builtins.str]) -> None: + jsii.set(self, "dontReadMe", value) + + class WithPrivatePropertyInConstructor( metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.WithPrivatePropertyInConstructor", @@ -11412,6 +11479,7 @@ __all__ = [ "DoNotRecognizeAnyAsOptional", "DocumentedClass", "DontComplainAboutVariadicAfterOptional", + "DontUseMe", "DoubleTrouble", "DummyObj", "DynamicPropertyBearer", @@ -11576,6 +11644,7 @@ __all__ = [ "VariadicTypeUnion", "VirtualMethodPlayground", "VoidCallback", + "WeirdDocs", "WithPrivatePropertyInConstructor", "anonymous", "cdk16625", @@ -15689,8 +15758,22 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.data_type( - jsii_type="jsii-calc.DummyObj", -@@ -2176,10 +2458,13 @@ + jsii_type="jsii-calc.DontUseMe", +@@ -2179,10 +2461,13 @@ + + Don't use this interface An interface that shouldn't be used, with the annotation in a weird place. + + :param dont_set_me: .. epigraph:: Don't set this parameter. A parameter that shouldn't be set, with the annotation in a weird place. + ''' ++ if __debug__: ++ type_hints = typing.get_type_hints(_typecheckingstub__feb33b34fd05e771c7e47c132104c701042acfdf4eb6753873c4463e01f3cd9c) ++ check_type(argname="argument dont_set_me", value=dont_set_me, expected_type=type_hints["dont_set_me"]) + self._values: typing.Dict[builtins.str, typing.Any] = {} + if dont_set_me is not None: + self._values["dont_set_me"] = dont_set_me + + @builtins.property +@@ -2216,10 +2501,13 @@ class DummyObj: def __init__(self, *, example: builtins.str) -> None: ''' @@ -15704,7 +15787,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } @builtins.property -@@ -2208,28 +2493,37 @@ +@@ -2248,28 +2536,37 @@ def __init__(self, value_store: builtins.str) -> None: ''' @@ -15742,7 +15825,7 @@ exports[`Generated code for "jsii-calc": /python/src/js class DynamicPropertyBearerChild( DynamicPropertyBearer, -@@ -2238,20 +2532,26 @@ +@@ -2278,20 +2575,26 @@ ): def __init__(self, original_value: builtins.str) -> None: ''' @@ -15769,7 +15852,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @builtins.property @jsii.member(jsii_name="originalValue") def original_value(self) -> builtins.str: -@@ -2264,10 +2564,13 @@ +@@ -2304,10 +2607,13 @@ def __init__(self, clock: "IWallClock") -> None: '''Creates a new instance of Entropy. @@ -15783,7 +15866,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="increase") def increase(self) -> builtins.str: '''Increases entropy by consuming time from the clock (yes, this is a long shot, please don't judge). -@@ -2295,10 +2598,13 @@ +@@ -2335,10 +2641,13 @@ :param word: the value to return. @@ -15797,7 +15880,7 @@ exports[`Generated code for "jsii-calc": /python/src/js # Adding a "__jsii_proxy_class__(): typing.Type" function to the abstract class typing.cast(typing.Any, Entropy).__jsii_proxy_class__ = lambda : _EntropyProxy -@@ -2335,10 +2641,14 @@ +@@ -2375,10 +2684,14 @@ are being erased when sending values from native code to JS. :param opts: - @@ -15812,7 +15895,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="prop1IsNull") @builtins.classmethod def prop1_is_null(cls) -> typing.Mapping[builtins.str, typing.Any]: -@@ -2366,10 +2676,14 @@ +@@ -2406,10 +2719,14 @@ ) -> None: ''' :param option1: @@ -15827,7 +15910,7 @@ exports[`Generated code for "jsii-calc": /python/src/js self._values["option1"] = option1 if option2 is not None: self._values["option2"] = option2 -@@ -2413,10 +2727,14 @@ +@@ -2453,10 +2770,14 @@ :param readonly_string: - :param mutable_number: - @@ -15842,7 +15925,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="method") def method(self) -> None: ''' -@@ -2440,10 +2758,13 @@ +@@ -2480,10 +2801,13 @@ ''' return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "mutableProperty")) @@ -15856,7 +15939,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.enum(jsii_type="jsii-calc.ExperimentalEnum") class ExperimentalEnum(enum.Enum): -@@ -2471,10 +2792,13 @@ +@@ -2511,10 +2835,13 @@ ''' :param readonly_property: @@ -15870,7 +15953,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } @builtins.property -@@ -2504,10 +2828,13 @@ +@@ -2544,10 +2871,13 @@ ): def __init__(self, success: builtins.bool) -> None: ''' @@ -15884,7 +15967,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @builtins.property @jsii.member(jsii_name="success") def success(self) -> builtins.bool: -@@ -2523,10 +2850,14 @@ +@@ -2563,10 +2893,14 @@ def __init__(self, *, boom: builtins.bool, prop: builtins.str) -> None: ''' :param boom: @@ -15899,7 +15982,7 @@ exports[`Generated code for "jsii-calc": /python/src/js "prop": prop, } -@@ -2568,10 +2899,14 @@ +@@ -2608,10 +2942,14 @@ :param readonly_string: - :param mutable_number: - @@ -15914,7 +15997,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="method") def method(self) -> None: ''' -@@ -2595,10 +2930,13 @@ +@@ -2635,10 +2973,13 @@ ''' return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "mutableProperty")) @@ -15928,7 +16011,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.enum(jsii_type="jsii-calc.ExternalEnum") class ExternalEnum(enum.Enum): -@@ -2626,10 +2964,13 @@ +@@ -2666,10 +3007,13 @@ ''' :param readonly_property: @@ -15942,7 +16025,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } @builtins.property -@@ -2772,10 +3113,13 @@ +@@ -2812,10 +3156,13 @@ def __init__(self, *, name: typing.Optional[builtins.str] = None) -> None: '''These are some arguments you can pass to a method. @@ -15956,7 +16039,7 @@ exports[`Generated code for "jsii-calc": /python/src/js self._values["name"] = name @builtins.property -@@ -2812,10 +3156,13 @@ +@@ -2852,10 +3199,13 @@ friendly: _scope_jsii_calc_lib_c61f082f.IFriendly, ) -> builtins.str: ''' @@ -15970,7 +16053,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.interface(jsii_type="jsii-calc.IAnonymousImplementationProvider") class IAnonymousImplementationProvider(typing_extensions.Protocol): -@@ -2895,10 +3242,13 @@ +@@ -2935,10 +3285,13 @@ def a(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "a")) @@ -15984,7 +16067,7 @@ exports[`Generated code for "jsii-calc": /python/src/js # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface typing.cast(typing.Any, IAnotherPublicInterface).__jsii_proxy_class__ = lambda : _IAnotherPublicInterfaceProxy -@@ -2941,10 +3291,13 @@ +@@ -2981,10 +3334,13 @@ @jsii.member(jsii_name="yourTurn") def your_turn(self, bell: IBell) -> None: ''' @@ -15998,7 +16081,7 @@ exports[`Generated code for "jsii-calc": /python/src/js # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface typing.cast(typing.Any, IBellRinger).__jsii_proxy_class__ = lambda : _IBellRingerProxy -@@ -2969,10 +3322,13 @@ +@@ -3009,10 +3365,13 @@ @jsii.member(jsii_name="yourTurn") def your_turn(self, bell: "Bell") -> None: ''' @@ -16012,7 +16095,7 @@ exports[`Generated code for "jsii-calc": /python/src/js # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface typing.cast(typing.Any, IConcreteBellRinger).__jsii_proxy_class__ = lambda : _IConcreteBellRingerProxy -@@ -3028,10 +3384,13 @@ +@@ -3068,10 +3427,13 @@ ''' return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "mutableProperty")) @@ -16026,7 +16109,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="method") def method(self) -> None: ''' -@@ -3086,10 +3445,13 @@ +@@ -3126,10 +3488,13 @@ ''' return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "mutableProperty")) @@ -16040,7 +16123,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="method") def method(self) -> None: ''' -@@ -3131,10 +3493,13 @@ +@@ -3171,10 +3536,13 @@ def private(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "private")) @@ -16054,7 +16137,7 @@ exports[`Generated code for "jsii-calc": /python/src/js # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface typing.cast(typing.Any, IExtendsPrivateInterface).__jsii_proxy_class__ = lambda : _IExtendsPrivateInterfaceProxy -@@ -3180,10 +3545,13 @@ +@@ -3220,10 +3588,13 @@ ''' return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "mutableProperty")) @@ -16068,7 +16151,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="method") def method(self) -> None: ''' -@@ -3365,10 +3733,14 @@ +@@ -3405,10 +3776,14 @@ ) -> None: ''' :param arg1: - @@ -16083,7 +16166,7 @@ exports[`Generated code for "jsii-calc": /python/src/js # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface typing.cast(typing.Any, IInterfaceWithOptionalMethodArguments).__jsii_proxy_class__ = lambda : _IInterfaceWithOptionalMethodArgumentsProxy -@@ -3403,10 +3775,13 @@ +@@ -3443,10 +3818,13 @@ def read_write_string(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "readWriteString")) @@ -16097,7 +16180,7 @@ exports[`Generated code for "jsii-calc": /python/src/js # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface typing.cast(typing.Any, IInterfaceWithProperties).__jsii_proxy_class__ = lambda : _IInterfaceWithPropertiesProxy -@@ -3436,10 +3811,13 @@ +@@ -3476,10 +3854,13 @@ def foo(self) -> jsii.Number: return typing.cast(jsii.Number, jsii.get(self, "foo")) @@ -16111,7 +16194,7 @@ exports[`Generated code for "jsii-calc": /python/src/js # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface typing.cast(typing.Any, IInterfaceWithPropertiesExtension).__jsii_proxy_class__ = lambda : _IInterfaceWithPropertiesExtensionProxy -@@ -3959,10 +4337,13 @@ +@@ -3999,10 +4380,13 @@ def value(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "value")) @@ -16125,7 +16208,7 @@ exports[`Generated code for "jsii-calc": /python/src/js # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface typing.cast(typing.Any, IMutableObjectLiteral).__jsii_proxy_class__ = lambda : _IMutableObjectLiteralProxy -@@ -3998,19 +4379,25 @@ +@@ -4038,19 +4422,25 @@ def b(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "b")) @@ -16151,7 +16234,7 @@ exports[`Generated code for "jsii-calc": /python/src/js # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface typing.cast(typing.Any, INonInternalInterface).__jsii_proxy_class__ = lambda : _INonInternalInterfaceProxy -@@ -4043,10 +4430,13 @@ +@@ -4083,10 +4473,13 @@ def property(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "property")) @@ -16165,7 +16248,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="wasSet") def was_set(self) -> builtins.bool: return typing.cast(builtins.bool, jsii.invoke(self, "wasSet", [])) -@@ -4239,10 +4629,13 @@ +@@ -4279,10 +4672,13 @@ def mutable_property(self) -> typing.Optional[jsii.Number]: return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "mutableProperty")) @@ -16179,7 +16262,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="method") def method(self) -> None: return typing.cast(None, jsii.invoke(self, "method", [])) -@@ -4309,10 +4702,13 @@ +@@ -4349,10 +4745,13 @@ def prop(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "prop")) @@ -16193,7 +16276,7 @@ exports[`Generated code for "jsii-calc": /python/src/js class Implementation(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Implementation"): def __init__(self) -> None: -@@ -4358,10 +4754,13 @@ +@@ -4398,10 +4797,13 @@ def private(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "private")) @@ -16207,7 +16290,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.data_type( jsii_type="jsii-calc.ImplictBaseOfBase", -@@ -4379,10 +4778,15 @@ +@@ -4419,10 +4821,15 @@ ''' :param foo: - :param bar: - @@ -16223,7 +16306,7 @@ exports[`Generated code for "jsii-calc": /python/src/js "bar": bar, "goo": goo, } -@@ -4457,10 +4861,13 @@ +@@ -4497,10 +4904,13 @@ count: jsii.Number, ) -> typing.List[_scope_jsii_calc_lib_c61f082f.IDoublable]: ''' @@ -16237,7 +16320,7 @@ exports[`Generated code for "jsii-calc": /python/src/js class Isomorphism(metaclass=jsii.JSIIAbstractClass, jsii_type="jsii-calc.Isomorphism"): '''Checks the "same instance" isomorphism is preserved within the constructor. -@@ -4565,19 +4972,25 @@ +@@ -4605,19 +5015,25 @@ def prop_a(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "propA")) @@ -16263,7 +16346,7 @@ exports[`Generated code for "jsii-calc": /python/src/js class JavaReservedWords( metaclass=jsii.JSIIMeta, -@@ -4799,10 +5212,13 @@ +@@ -4839,10 +5255,13 @@ def while_(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "while")) @@ -16277,7 +16360,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.implements(IJsii487External2, IJsii487External) class Jsii487Derived(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Jsii487Derived"): -@@ -4904,10 +5320,13 @@ +@@ -4944,10 +5363,13 @@ @builtins.classmethod def stringify(cls, value: typing.Any = None) -> typing.Optional[builtins.str]: ''' @@ -16291,7 +16374,7 @@ exports[`Generated code for "jsii-calc": /python/src/js class LevelOne(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.LevelOne"): '''Validates that nested classes get correct code generation for the occasional forward reference.''' -@@ -4937,10 +5356,13 @@ +@@ -4977,10 +5399,13 @@ class PropBooleanValue: def __init__(self, *, value: builtins.bool) -> None: ''' @@ -16305,7 +16388,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } @builtins.property -@@ -4974,10 +5396,13 @@ +@@ -5014,10 +5439,13 @@ ''' :param prop: ''' @@ -16319,7 +16402,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } @builtins.property -@@ -5012,10 +5437,13 @@ +@@ -5052,10 +5480,13 @@ ''' :param prop: ''' @@ -16333,7 +16416,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } @builtins.property -@@ -5063,10 +5491,17 @@ +@@ -5103,10 +5534,17 @@ :param cpu: The number of cpu units used by the task. Valid values, which determines your range of valid values for the memory parameter: 256 (.25 vCPU) - Available memory values: 0.5GB, 1GB, 2GB 512 (.5 vCPU) - Available memory values: 1GB, 2GB, 3GB, 4GB 1024 (1 vCPU) - Available memory values: 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB 2048 (2 vCPU) - Available memory values: Between 4GB and 16GB in 1GB increments 4096 (4 vCPU) - Available memory values: Between 8GB and 30GB in 1GB increments This default is set in the underlying FargateTaskDefinition construct. Default: 256 :param memory_mib: The amount (in MiB) of memory used by the task. This field is required and you must use one of the following values, which determines your range of valid values for the cpu parameter: 0.5GB, 1GB, 2GB - Available cpu values: 256 (.25 vCPU) 1GB, 2GB, 3GB, 4GB - Available cpu values: 512 (.5 vCPU) 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB - Available cpu values: 1024 (1 vCPU) Between 4GB and 16GB in 1GB increments - Available cpu values: 2048 (2 vCPU) Between 8GB and 30GB in 1GB increments - Available cpu values: 4096 (4 vCPU) This default is set in the underlying FargateTaskDefinition construct. Default: 512 :param public_load_balancer: Determines whether the Application Load Balancer will be internet-facing. Default: true @@ -16351,7 +16434,7 @@ exports[`Generated code for "jsii-calc": /python/src/js self._values["container_port"] = container_port if cpu is not None: self._values["cpu"] = cpu -@@ -5193,10 +5628,14 @@ +@@ -5233,10 +5671,14 @@ '''Creates a BinaryOperation. :param lhs: Left-hand side operand. @@ -16366,7 +16449,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="farewell") def farewell(self) -> builtins.str: '''Say farewell.''' -@@ -5244,10 +5683,13 @@ +@@ -5284,10 +5726,13 @@ class NestedStruct: def __init__(self, *, number_prop: jsii.Number) -> None: ''' @@ -16380,7 +16463,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } @builtins.property -@@ -5318,17 +5760,24 @@ +@@ -5358,17 +5803,24 @@ def __init__(self, _param1: builtins.str, optional: typing.Any = None) -> None: ''' :param _param1: - @@ -16405,7 +16488,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="giveMeUndefinedInsideAnObject") def give_me_undefined_inside_an_object( self, -@@ -5356,10 +5805,13 @@ +@@ -5396,10 +5848,13 @@ def change_me_to_undefined(self) -> typing.Optional[builtins.str]: return typing.cast(typing.Optional[builtins.str], jsii.get(self, "changeMeToUndefined")) @@ -16419,7 +16502,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.data_type( jsii_type="jsii-calc.NullShouldBeTreatedAsUndefinedData", -@@ -5378,10 +5830,14 @@ +@@ -5418,10 +5873,14 @@ ) -> None: ''' :param array_with_three_elements_and_undefined_as_second_argument: @@ -16434,7 +16517,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } if this_should_be_undefined is not None: self._values["this_should_be_undefined"] = this_should_be_undefined -@@ -5416,17 +5872,23 @@ +@@ -5456,17 +5915,23 @@ def __init__(self, generator: IRandomNumberGenerator) -> None: ''' @@ -16458,7 +16541,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="nextTimes100") def next_times100(self) -> jsii.Number: return typing.cast(jsii.Number, jsii.invoke(self, "nextTimes100", [])) -@@ -5436,10 +5898,13 @@ +@@ -5476,10 +5941,13 @@ def generator(self) -> IRandomNumberGenerator: return typing.cast(IRandomNumberGenerator, jsii.get(self, "generator")) @@ -16472,7 +16555,7 @@ exports[`Generated code for "jsii-calc": /python/src/js class ObjectRefsInCollections( metaclass=jsii.JSIIMeta, -@@ -5457,10 +5922,13 @@ +@@ -5497,10 +5965,13 @@ ) -> jsii.Number: '''Returns the sum of all values. @@ -16486,7 +16569,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="sumFromMap") def sum_from_map( self, -@@ -5468,10 +5936,13 @@ +@@ -5508,10 +5979,13 @@ ) -> jsii.Number: '''Returns the sum of all values in a map. @@ -16500,7 +16583,7 @@ exports[`Generated code for "jsii-calc": /python/src/js class ObjectWithPropertyProvider( metaclass=jsii.JSIIMeta, -@@ -5512,10 +5983,13 @@ +@@ -5552,10 +6026,13 @@ ): def __init__(self, delegate: IInterfaceWithOptionalMethodArguments) -> None: ''' @@ -16514,7 +16597,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="invokeWithOptional") def invoke_with_optional(self) -> None: return typing.cast(None, jsii.invoke(self, "invokeWithOptional", [])) -@@ -5538,10 +6012,15 @@ +@@ -5578,10 +6055,15 @@ ''' :param arg1: - :param arg2: - @@ -16530,7 +16613,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @builtins.property @jsii.member(jsii_name="arg1") def arg1(self) -> jsii.Number: -@@ -5566,10 +6045,13 @@ +@@ -5606,10 +6088,13 @@ class OptionalStruct: def __init__(self, *, field: typing.Optional[builtins.str] = None) -> None: ''' @@ -16544,7 +16627,7 @@ exports[`Generated code for "jsii-calc": /python/src/js self._values["field"] = field @builtins.property -@@ -5645,10 +6127,13 @@ +@@ -5685,10 +6170,13 @@ def _override_read_write(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "overrideReadWrite")) @@ -16558,7 +16641,7 @@ exports[`Generated code for "jsii-calc": /python/src/js class OverrideReturnsObject( metaclass=jsii.JSIIMeta, -@@ -5660,10 +6145,13 @@ +@@ -5700,10 +6188,13 @@ @jsii.member(jsii_name="test") def test(self, obj: IReturnsNumber) -> jsii.Number: ''' @@ -16572,7 +16655,7 @@ exports[`Generated code for "jsii-calc": /python/src/js class ParamShadowsBuiltins( metaclass=jsii.JSIIMeta, -@@ -5685,10 +6173,14 @@ +@@ -5725,10 +6216,14 @@ :param str: should be set to something that is NOT a valid expression in Python (e.g: "\${NOPE}""). :param boolean_property: :param string_property: @@ -16587,7 +16670,7 @@ exports[`Generated code for "jsii-calc": /python/src/js string_property=string_property, struct_property=struct_property, ) -@@ -5718,10 +6210,15 @@ +@@ -5758,10 +6253,15 @@ :param string_property: :param struct_property: ''' @@ -16603,7 +16686,7 @@ exports[`Generated code for "jsii-calc": /python/src/js "string_property": string_property, "struct_property": struct_property, } -@@ -5774,10 +6271,13 @@ +@@ -5814,10 +6314,13 @@ scope: _scope_jsii_calc_lib_c61f082f.Number, ) -> _scope_jsii_calc_lib_c61f082f.Number: ''' @@ -16617,7 +16700,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.data_type( jsii_type="jsii-calc.ParentStruct982", -@@ -5788,10 +6288,13 @@ +@@ -5828,10 +6331,13 @@ def __init__(self, *, foo: builtins.str) -> None: '''https://github.com/aws/jsii/issues/982. @@ -16631,7 +16714,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } @builtins.property -@@ -5846,10 +6349,15 @@ +@@ -5886,10 +6392,15 @@ ''' :param obj: - :param dt: - @@ -16647,7 +16730,7 @@ exports[`Generated code for "jsii-calc": /python/src/js # Adding a "__jsii_proxy_class__(): typing.Type" function to the abstract class typing.cast(typing.Any, PartiallyInitializedThisConsumer).__jsii_proxy_class__ = lambda : _PartiallyInitializedThisConsumerProxy -@@ -5864,10 +6372,13 @@ +@@ -5904,10 +6415,13 @@ friendly: _scope_jsii_calc_lib_c61f082f.IFriendly, ) -> builtins.str: ''' @@ -16661,7 +16744,7 @@ exports[`Generated code for "jsii-calc": /python/src/js class Power( _CompositeOperation_1c4d123b, -@@ -5884,10 +6395,14 @@ +@@ -5924,10 +6438,14 @@ '''Creates a Power operation. :param base: The base of the power. @@ -16676,7 +16759,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @builtins.property @jsii.member(jsii_name="base") def base(self) -> _scope_jsii_calc_lib_c61f082f.NumericValue: -@@ -6110,10 +6625,13 @@ +@@ -6150,10 +6668,13 @@ value: _scope_jsii_calc_lib_c61f082f.EnumFromScopedModule, ) -> None: ''' @@ -16690,7 +16773,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @builtins.property @jsii.member(jsii_name="foo") def foo( -@@ -6124,10 +6642,13 @@ +@@ -6164,10 +6685,13 @@ @foo.setter def foo( self, @@ -16704,7 +16787,7 @@ exports[`Generated code for "jsii-calc": /python/src/js class ReturnsPrivateImplementationOfInterface( metaclass=jsii.JSIIMeta, -@@ -6169,10 +6690,14 @@ +@@ -6209,10 +6733,14 @@ :param string_prop: May not be empty. :param nested_struct: ''' @@ -16719,7 +16802,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } if nested_struct is not None: self._values["nested_struct"] = nested_struct -@@ -6239,17 +6764,25 @@ +@@ -6279,17 +6807,25 @@ ''' :param arg1: - :param arg2: - @@ -16745,7 +16828,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="methodWithOptionalArguments") def method_with_optional_arguments( self, -@@ -6261,10 +6794,15 @@ +@@ -6301,10 +6837,15 @@ :param arg1: - :param arg2: - @@ -16761,7 +16844,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.data_type( jsii_type="jsii-calc.SecondLevelStruct", -@@ -6283,10 +6821,14 @@ +@@ -6323,10 +6864,14 @@ ) -> None: ''' :param deeper_required_prop: It's long and required. @@ -16776,7 +16859,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } if deeper_optional_prop is not None: self._values["deeper_optional_prop"] = deeper_optional_prop -@@ -6348,10 +6890,13 @@ +@@ -6388,10 +6933,13 @@ @jsii.member(jsii_name="isSingletonInt") def is_singleton_int(self, value: jsii.Number) -> builtins.bool: ''' @@ -16790,7 +16873,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.enum(jsii_type="jsii-calc.SingletonIntEnum") class SingletonIntEnum(enum.Enum): -@@ -6370,10 +6915,13 @@ +@@ -6410,10 +6958,13 @@ @jsii.member(jsii_name="isSingletonString") def is_singleton_string(self, value: builtins.str) -> builtins.bool: ''' @@ -16804,7 +16887,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.enum(jsii_type="jsii-calc.SingletonStringEnum") class SingletonStringEnum(enum.Enum): -@@ -6397,10 +6945,14 @@ +@@ -6437,10 +6988,14 @@ ) -> None: ''' :param property: @@ -16819,7 +16902,7 @@ exports[`Generated code for "jsii-calc": /python/src/js "yet_anoter_one": yet_anoter_one, } -@@ -6451,10 +7003,14 @@ +@@ -6491,10 +7046,14 @@ ) -> None: ''' :param readonly_string: - @@ -16834,7 +16917,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="method") def method(self) -> None: return typing.cast(None, jsii.invoke(self, "method", [])) -@@ -6469,10 +7025,13 @@ +@@ -6509,10 +7068,13 @@ def mutable_property(self) -> typing.Optional[jsii.Number]: return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "mutableProperty")) @@ -16848,7 +16931,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.enum(jsii_type="jsii-calc.StableEnum") class StableEnum(enum.Enum): -@@ -6488,10 +7047,13 @@ +@@ -6528,10 +7090,13 @@ class StableStruct: def __init__(self, *, readonly_property: builtins.str) -> None: ''' @@ -16862,7 +16945,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } @builtins.property -@@ -6528,10 +7090,13 @@ +@@ -6568,10 +7133,13 @@ def static_variable(cls) -> builtins.bool: # pyright: ignore [reportGeneralTypeIssues] return typing.cast(builtins.bool, jsii.sget(cls, "staticVariable")) @@ -16876,7 +16959,7 @@ exports[`Generated code for "jsii-calc": /python/src/js class StaticHelloParent( metaclass=jsii.JSIIMeta, -@@ -6561,19 +7126,25 @@ +@@ -6601,19 +7169,25 @@ class Statics(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Statics"): def __init__(self, value: builtins.str) -> None: ''' @@ -16902,7 +16985,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="justMethod") def just_method(self) -> builtins.str: return typing.cast(builtins.str, jsii.invoke(self, "justMethod", [])) -@@ -6610,19 +7181,25 @@ +@@ -6650,19 +7224,25 @@ ''' return typing.cast("Statics", jsii.sget(cls, "instance")) @@ -16928,7 +17011,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @builtins.property @jsii.member(jsii_name="value") def value(self) -> builtins.str: -@@ -6645,10 +7222,13 @@ +@@ -6685,10 +7265,13 @@ def you_see_me(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "youSeeMe")) @@ -16942,7 +17025,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.data_type( jsii_type="jsii-calc.StructA", -@@ -6671,10 +7251,15 @@ +@@ -6711,10 +7294,15 @@ :param required_string: :param optional_number: @@ -16958,7 +17041,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } if optional_number is not None: self._values["optional_number"] = optional_number -@@ -6732,10 +7317,15 @@ +@@ -6772,10 +7360,15 @@ :param optional_boolean: :param optional_struct_a: ''' @@ -16974,7 +17057,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } if optional_boolean is not None: self._values["optional_boolean"] = optional_boolean -@@ -6787,10 +7377,14 @@ +@@ -6827,10 +7420,14 @@ See: https://github.com/aws/aws-cdk/issues/4302 :param scope: @@ -16989,7 +17072,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } if props is not None: self._values["props"] = props -@@ -6833,10 +7427,14 @@ +@@ -6873,10 +7470,14 @@ ) -> jsii.Number: ''' :param _positional: - @@ -17004,7 +17087,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="roundTrip") @builtins.classmethod def round_trip( -@@ -6851,10 +7449,13 @@ +@@ -6891,10 +7492,13 @@ :param _positional: - :param required: This is a required field. :param second_level: A union to really stress test our serialization. @@ -17018,7 +17101,7 @@ exports[`Generated code for "jsii-calc": /python/src/js ) return typing.cast("TopLevelStruct", jsii.sinvoke(cls, "roundTrip", [_positional, input])) -@@ -6871,10 +7472,13 @@ +@@ -6911,10 +7515,13 @@ struct: typing.Union[typing.Union[StructA, typing.Dict[builtins.str, typing.Any]], typing.Union[StructB, typing.Dict[builtins.str, typing.Any]]], ) -> builtins.bool: ''' @@ -17032,7 +17115,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="isStructB") @builtins.classmethod def is_struct_b( -@@ -6882,18 +7486,24 @@ +@@ -6922,18 +7529,24 @@ struct: typing.Union[typing.Union[StructA, typing.Dict[builtins.str, typing.Any]], typing.Union[StructB, typing.Dict[builtins.str, typing.Any]]], ) -> builtins.bool: ''' @@ -17057,7 +17140,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.data_type( jsii_type="jsii-calc.StructWithCollectionOfUnionts", -@@ -6907,10 +7517,13 @@ +@@ -6947,10 +7560,13 @@ union_property: typing.Sequence[typing.Mapping[builtins.str, typing.Union[typing.Union[StructA, typing.Dict[builtins.str, typing.Any]], typing.Union[StructB, typing.Dict[builtins.str, typing.Any]]]]], ) -> None: ''' @@ -17071,7 +17154,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } @builtins.property -@@ -6947,10 +7560,14 @@ +@@ -6987,10 +7603,14 @@ ) -> None: ''' :param foo: An enum value. @@ -17086,7 +17169,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } if bar is not None: self._values["bar"] = bar -@@ -7006,10 +7623,16 @@ +@@ -7046,10 +7666,16 @@ :param default: :param assert_: :param result: @@ -17103,7 +17186,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } if assert_ is not None: self._values["assert_"] = assert_ -@@ -7079,10 +7702,13 @@ +@@ -7119,10 +7745,13 @@ @parts.setter def parts( self, @@ -17117,7 +17200,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.data_type( jsii_type="jsii-calc.SupportsNiceJavaBuilderProps", -@@ -7098,10 +7724,14 @@ +@@ -7138,10 +7767,14 @@ ) -> None: ''' :param bar: Some number, like 42. @@ -17132,7 +17215,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } if id is not None: self._values["id"] = id -@@ -7150,10 +7780,13 @@ +@@ -7190,10 +7823,13 @@ ''' :param id_: some identifier of your choice. :param bar: Some number, like 42. @@ -17146,7 +17229,7 @@ exports[`Generated code for "jsii-calc": /python/src/js jsii.create(self.__class__, self, [id_, props]) @builtins.property -@@ -7191,17 +7824,23 @@ +@@ -7231,17 +7867,23 @@ @jsii.member(jsii_name="modifyOtherProperty") def modify_other_property(self, value: builtins.str) -> None: ''' @@ -17170,7 +17253,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="readA") def read_a(self) -> jsii.Number: return typing.cast(jsii.Number, jsii.invoke(self, "readA", [])) -@@ -7221,17 +7860,23 @@ +@@ -7261,17 +7903,23 @@ @jsii.member(jsii_name="virtualMethod") def virtual_method(self, n: jsii.Number) -> jsii.Number: ''' @@ -17194,7 +17277,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @builtins.property @jsii.member(jsii_name="readonlyProperty") def readonly_property(self) -> builtins.str: -@@ -7242,46 +7887,61 @@ +@@ -7282,46 +7930,61 @@ def a(self) -> jsii.Number: return typing.cast(jsii.Number, jsii.get(self, "a")) @@ -17256,7 +17339,7 @@ exports[`Generated code for "jsii-calc": /python/src/js class TestStructWithEnum( metaclass=jsii.JSIIMeta, -@@ -7364,10 +8024,15 @@ +@@ -7404,10 +8067,15 @@ ''' :param required: This is a required field. :param second_level: A union to really stress test our serialization. @@ -17272,7 +17355,7 @@ exports[`Generated code for "jsii-calc": /python/src/js "second_level": second_level, } if optional is not None: -@@ -7458,10 +8123,13 @@ +@@ -7498,10 +8166,13 @@ def __init__(self, operand: _scope_jsii_calc_lib_c61f082f.NumericValue) -> None: ''' @@ -17286,7 +17369,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @builtins.property @jsii.member(jsii_name="operand") def operand(self) -> _scope_jsii_calc_lib_c61f082f.NumericValue: -@@ -7492,10 +8160,14 @@ +@@ -7532,10 +8203,14 @@ ) -> None: ''' :param bar: @@ -17301,7 +17384,7 @@ exports[`Generated code for "jsii-calc": /python/src/js } if foo is not None: self._values["foo"] = foo -@@ -7532,10 +8204,13 @@ +@@ -7572,10 +8247,13 @@ def __init__(self, delegate: typing.Mapping[builtins.str, typing.Any]) -> None: ''' @@ -17315,7 +17398,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.python.classproperty @jsii.member(jsii_name="reflector") def REFLECTOR(cls) -> _scope_jsii_calc_lib_custom_submodule_name_c61f082f.Reflector: -@@ -7578,10 +8253,13 @@ +@@ -7618,10 +8296,13 @@ ): def __init__(self, obj: IInterfaceWithProperties) -> None: ''' @@ -17329,7 +17412,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="justRead") def just_read(self) -> builtins.str: return typing.cast(builtins.str, jsii.invoke(self, "justRead", [])) -@@ -7592,17 +8270,23 @@ +@@ -7632,17 +8313,23 @@ ext: IInterfaceWithPropertiesExtension, ) -> builtins.str: ''' @@ -17353,7 +17436,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @builtins.property @jsii.member(jsii_name="obj") def obj(self) -> IInterfaceWithProperties: -@@ -7612,25 +8296,34 @@ +@@ -7652,25 +8339,34 @@ class VariadicInvoker(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.VariadicInvoker"): def __init__(self, method: "VariadicMethod") -> None: ''' @@ -17388,7 +17471,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="asArray") def as_array( self, -@@ -7639,10 +8332,14 @@ +@@ -7679,10 +8375,14 @@ ) -> typing.List[jsii.Number]: ''' :param first: the first element of the array to be returned (after the \`\`prefix\`\` provided at construction time). @@ -17403,7 +17486,7 @@ exports[`Generated code for "jsii-calc": /python/src/js class VariadicTypeUnion( metaclass=jsii.JSIIMeta, -@@ -7650,19 +8347,25 @@ +@@ -7690,19 +8390,25 @@ ): def __init__(self, *union: typing.Union[StructA, StructB]) -> None: ''' @@ -17429,7 +17512,7 @@ exports[`Generated code for "jsii-calc": /python/src/js class VirtualMethodPlayground( metaclass=jsii.JSIIMeta, -@@ -7674,38 +8377,53 @@ +@@ -7714,38 +8420,53 @@ @jsii.member(jsii_name="overrideMeAsync") def override_me_async(self, index: jsii.Number) -> jsii.Number: ''' @@ -17483,7 +17566,21 @@ exports[`Generated code for "jsii-calc": /python/src/js class VoidCallback( metaclass=jsii.JSIIAbstractClass, -@@ -7753,10 +8471,13 @@ +@@ -7807,10 +8528,13 @@ + ''' + return typing.cast(typing.Optional[builtins.str], jsii.get(self, "dontReadMe")) + + @dont_read_me.setter + def dont_read_me(self, value: typing.Optional[builtins.str]) -> None: ++ if __debug__: ++ type_hints = typing.get_type_hints(_typecheckingstub__54f5b2f0a61a7f2fafae719635a1408f7ff0a8f8a503e559bf0d6bc99772471f) ++ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) + jsii.set(self, "dontReadMe", value) + + + class WithPrivatePropertyInConstructor( + metaclass=jsii.JSIIMeta, +@@ -7820,10 +8544,13 @@ def __init__(self, private_field: typing.Optional[builtins.str] = None) -> None: ''' @@ -17497,7 +17594,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @builtins.property @jsii.member(jsii_name="success") def success(self) -> builtins.bool: -@@ -7797,10 +8518,13 @@ +@@ -7864,10 +8591,13 @@ @jsii.member(jsii_name="abstractMethod") def abstract_method(self, name: builtins.str) -> builtins.str: ''' @@ -17511,7 +17608,7 @@ exports[`Generated code for "jsii-calc": /python/src/js # Adding a "__jsii_proxy_class__(): typing.Type" function to the abstract class typing.cast(typing.Any, AbstractClass).__jsii_proxy_class__ = lambda : _AbstractClassProxy -@@ -7816,10 +8540,14 @@ +@@ -7883,10 +8613,14 @@ '''Creates a BinaryOperation. :param lhs: Left-hand side operand. @@ -17526,7 +17623,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="toString") def to_string(self) -> builtins.str: '''String representation of the value.''' -@@ -7863,10 +8591,13 @@ +@@ -7930,10 +8664,13 @@ def rung(self) -> builtins.bool: return typing.cast(builtins.bool, jsii.get(self, "rung")) @@ -17540,7 +17637,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.data_type( jsii_type="jsii-calc.ChildStruct982", -@@ -7877,10 +8608,14 @@ +@@ -7944,10 +8681,14 @@ def __init__(self, *, foo: builtins.str, bar: jsii.Number) -> None: ''' :param foo: @@ -17555,7 +17652,7 @@ exports[`Generated code for "jsii-calc": /python/src/js "bar": bar, } -@@ -7921,37 +8656,49 @@ +@@ -7988,37 +8729,49 @@ def a(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "a")) @@ -17605,7 +17702,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.implements(INonInternalInterface) class ClassThatImplementsThePrivateInterface( -@@ -7966,37 +8713,49 @@ +@@ -8033,37 +8786,49 @@ def a(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "a")) @@ -17655,7 +17752,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.implements(IInterfaceWithProperties) class ClassWithPrivateConstructorAndAutomaticProperties( -@@ -8014,10 +8773,14 @@ +@@ -8081,10 +8846,14 @@ ) -> "ClassWithPrivateConstructorAndAutomaticProperties": ''' :param read_only_string: - @@ -17670,7 +17767,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @builtins.property @jsii.member(jsii_name="readOnlyString") def read_only_string(self) -> builtins.str: -@@ -8028,10 +8791,13 @@ +@@ -8095,10 +8864,13 @@ def read_write_string(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "readWriteString")) @@ -17684,7 +17781,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.implements(IIndirectlyImplemented) class FullCombo(BaseClass, metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.FullCombo"): -@@ -8146,10 +8912,13 @@ +@@ -8213,10 +8985,13 @@ ): def __init__(self, property: builtins.str) -> None: ''' @@ -17698,7 +17795,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="bar") def bar(self) -> None: return typing.cast(None, jsii.invoke(self, "bar", [])) -@@ -8170,10 +8939,13 @@ +@@ -8237,10 +9012,13 @@ def __init__(self, operand: _scope_jsii_calc_lib_c61f082f.NumericValue) -> None: ''' @@ -17712,7 +17809,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @jsii.member(jsii_name="farewell") def farewell(self) -> builtins.str: '''Say farewell.''' -@@ -8233,10 +9005,16 @@ +@@ -8300,10 +9078,16 @@ :param id: some identifier. :param default_bar: the default value of \`\`bar\`\`. :param props: some props once can provide. @@ -17729,7 +17826,7 @@ exports[`Generated code for "jsii-calc": /python/src/js @builtins.property @jsii.member(jsii_name="id") def id(self) -> jsii.Number: -@@ -8533,5 +9311,1531 @@ +@@ -8602,5 +9386,1544 @@ from . import nodirect from . import onlystatic from . import python_self @@ -18281,6 +18378,13 @@ exports[`Generated code for "jsii-calc": /python/src/js + """Type checking stubs""" + pass + ++def _typecheckingstub__feb33b34fd05e771c7e47c132104c701042acfdf4eb6753873c4463e01f3cd9c( ++ *, ++ dont_set_me: typing.Optional[builtins.str] = None, ++) -> None: ++ """Type checking stubs""" ++ pass ++ +def _typecheckingstub__ae5d543014149876cec8b005abbb94c112981cccaf318870c7fe4e8353c2c675( + *, + example: builtins.str, @@ -19147,6 +19251,12 @@ exports[`Generated code for "jsii-calc": /python/src/js + """Type checking stubs""" + pass + ++def _typecheckingstub__54f5b2f0a61a7f2fafae719635a1408f7ff0a8f8a503e559bf0d6bc99772471f( ++ value: typing.Optional[builtins.str], ++) -> None: ++ """Type checking stubs""" ++ pass ++ +def _typecheckingstub__01fcbc911a24b1fa352275e1273526114db562d2c278b742181eba6e8cb11ad4( + private_field: typing.Optional[builtins.str] = None, +) -> None: diff --git a/packages/jsii-reflect/test/__snapshots__/jsii-tree.test.js.snap b/packages/jsii-reflect/test/__snapshots__/jsii-tree.test.js.snap index 0c6230220f..835e0e619b 100644 --- a/packages/jsii-reflect/test/__snapshots__/jsii-tree.test.js.snap +++ b/packages/jsii-reflect/test/__snapshots__/jsii-tree.test.js.snap @@ -2580,6 +2580,11 @@ exports[`jsii-tree --all 1`] = ` │ │ └─┬ methodWasCalled property (stable) │ │ ├── immutable │ │ └── type: boolean + │ ├─┬ class WeirdDocs (stable) + │ │ └─┬ members + │ │ ├── () initializer (stable) + │ │ └─┬ dontReadMe property (stable) + │ │ └── type: Optional │ ├─┬ class WithPrivatePropertyInConstructor (stable) │ │ └─┬ members │ │ ├─┬ (privateField) initializer (stable) @@ -2701,6 +2706,12 @@ exports[`jsii-tree --all 1`] = ` │ │ ├── abstract │ │ ├── immutable │ │ └── type: string + │ ├─┬ interface DontUseMe (stable) + │ │ └─┬ members + │ │ └─┬ dontSetMe property (stable) + │ │ ├── abstract + │ │ ├── immutable + │ │ └── type: Optional │ ├─┬ interface DummyObj (stable) │ │ └─┬ members │ │ └─┬ example property (stable) @@ -4033,6 +4044,7 @@ exports[`jsii-tree --inheritance 1`] = ` │ ├── class VariadicTypeUnion │ ├── class VirtualMethodPlayground │ ├── class VoidCallback + │ ├── class WeirdDocs │ ├── class WithPrivatePropertyInConstructor │ ├── interface CalculatorProps │ ├─┬ interface ChildStruct982 @@ -4059,6 +4071,7 @@ exports[`jsii-tree --inheritance 1`] = ` │ │ └─┬ interfaces │ │ ├── DiamondInheritanceFirstMidLevelStruct │ │ └── DiamondInheritanceSecondMidLevelStruct + │ ├── interface DontUseMe │ ├── interface DummyObj │ ├── interface EraseUndefinedHashValuesOptions │ ├── interface ExperimentalStruct @@ -5388,6 +5401,10 @@ exports[`jsii-tree --members 1`] = ` │ │ ├── callMe() method │ │ ├── overrideMe() method │ │ └── methodWasCalled property + │ ├─┬ class WeirdDocs + │ │ └─┬ members + │ │ ├── () initializer + │ │ └── dontReadMe property │ ├─┬ class WithPrivatePropertyInConstructor │ │ └─┬ members │ │ ├── (privateField) initializer @@ -5433,6 +5450,9 @@ exports[`jsii-tree --members 1`] = ` │ ├─┬ interface DiamondInheritanceTopLevelStruct │ │ └─┬ members │ │ └── topLevelProperty property + │ ├─┬ interface DontUseMe + │ │ └─┬ members + │ │ └── dontSetMe property │ ├─┬ interface DummyObj │ │ └─┬ members │ │ └── example property @@ -6227,6 +6247,7 @@ exports[`jsii-tree --types 1`] = ` │ ├── class VariadicTypeUnion │ ├── class VirtualMethodPlayground │ ├── class VoidCallback + │ ├── class WeirdDocs │ ├── class WithPrivatePropertyInConstructor │ ├── interface CalculatorProps │ ├── interface ChildStruct982 @@ -6239,6 +6260,7 @@ exports[`jsii-tree --types 1`] = ` │ ├── interface DiamondInheritanceFirstMidLevelStruct │ ├── interface DiamondInheritanceSecondMidLevelStruct │ ├── interface DiamondInheritanceTopLevelStruct + │ ├── interface DontUseMe │ ├── interface DummyObj │ ├── interface EraseUndefinedHashValuesOptions │ ├── interface ExperimentalStruct diff --git a/packages/jsii-reflect/test/__snapshots__/tree.test.js.snap b/packages/jsii-reflect/test/__snapshots__/tree.test.js.snap index 3ead91afc5..4e12655772 100644 --- a/packages/jsii-reflect/test/__snapshots__/tree.test.js.snap +++ b/packages/jsii-reflect/test/__snapshots__/tree.test.js.snap @@ -2757,6 +2757,11 @@ exports[`showAll 1`] = ` │ │ └─┬ methodWasCalled property │ │ ├── immutable │ │ └── type: boolean + │ ├─┬ class WeirdDocs + │ │ └─┬ members + │ │ ├── () initializer + │ │ └─┬ dontReadMe property + │ │ └── type: Optional │ ├─┬ class WithPrivatePropertyInConstructor │ │ └─┬ members │ │ ├─┬ (privateField) initializer @@ -2878,6 +2883,12 @@ exports[`showAll 1`] = ` │ │ ├── abstract │ │ ├── immutable │ │ └── type: string + │ ├─┬ interface DontUseMe + │ │ └─┬ members + │ │ └─┬ dontSetMe property + │ │ ├── abstract + │ │ ├── immutable + │ │ └── type: Optional │ ├─┬ interface DummyObj │ │ └─┬ members │ │ └─┬ example property @@ -4203,6 +4214,7 @@ exports[`types 1`] = ` │ ├── class VariadicTypeUnion │ ├── class VirtualMethodPlayground │ ├── class VoidCallback + │ ├── class WeirdDocs │ ├── class WithPrivatePropertyInConstructor │ ├── interface CalculatorProps │ ├── interface ChildStruct982 @@ -4215,6 +4227,7 @@ exports[`types 1`] = ` │ ├── interface DiamondInheritanceFirstMidLevelStruct │ ├── interface DiamondInheritanceSecondMidLevelStruct │ ├── interface DiamondInheritanceTopLevelStruct + │ ├── interface DontUseMe │ ├── interface DummyObj │ ├── interface EraseUndefinedHashValuesOptions │ ├── interface ExperimentalStruct diff --git a/packages/jsii-reflect/test/__snapshots__/type-system.test.js.snap b/packages/jsii-reflect/test/__snapshots__/type-system.test.js.snap index 60a408c9d9..0ad963b291 100644 --- a/packages/jsii-reflect/test/__snapshots__/type-system.test.js.snap +++ b/packages/jsii-reflect/test/__snapshots__/type-system.test.js.snap @@ -165,6 +165,7 @@ exports[`TypeSystem.classes lists all the classes in the typesystem 1`] = ` "jsii-calc.VariadicTypeUnion", "jsii-calc.VirtualMethodPlayground", "jsii-calc.VoidCallback", + "jsii-calc.WeirdDocs", "jsii-calc.WithPrivatePropertyInConstructor", "jsii-calc.anonymous.UseOptions", "jsii-calc.cdk16625.Cdk16625",