diff --git a/packages/jsii-calc/lib/compliance.ts b/packages/jsii-calc/lib/compliance.ts index 4e1e788afc..31d30e3ca0 100644 --- a/packages/jsii-calc/lib/compliance.ts +++ b/packages/jsii-calc/lib/compliance.ts @@ -1464,8 +1464,8 @@ export class InternalClass { /** * @internal */ -export interface IInternalInterface { - prop: string; +export interface InternalInterface { + readonly prop: string; } /** @@ -1516,11 +1516,11 @@ interface IPrivateInterface { private: string; } -export interface ExtendsInternalInterface extends IInternalInterface { +export interface ExtendsInternalInterface extends InternalInterface { readonly boom: boolean } -export class ImplementInternalInterface implements IInternalInterface { +export class ImplementInternalInterface implements InternalInterface { prop = 'implement me' } @@ -1528,7 +1528,7 @@ export class ImplementsPrivateInterface implements IPrivateInterface { public private = 'i came from private into the light' } -export interface ExtendsPrivateInterface extends IPrivateInterface { +export interface IExtendsPrivateInterface extends IPrivateInterface { readonly moreThings: string[]; } diff --git a/packages/jsii-calc/lib/erasures.ts b/packages/jsii-calc/lib/erasures.ts index dd6459d1ed..eaf6e1ebcf 100644 --- a/packages/jsii-calc/lib/erasures.ts +++ b/packages/jsii-calc/lib/erasures.ts @@ -23,3 +23,17 @@ export class JSII417Derived extends JSII417PrivateBase { } public baz() { return; } } +// Same thing with interfaces +interface IJSII417PrivateRoot { + readonly hasRoot: boolean; +} +export interface IJSII417PublicBaseOfBase extends IJSII417PrivateRoot { + foo(): void; +} +interface IJSII417PrivateBase extends IJSII417PublicBaseOfBase { + readonly property: string; + bar(): void; +} +export interface IJSII417Derived extends IJSII417PrivateBase { + baz(): void; +} diff --git a/packages/jsii-calc/package.json b/packages/jsii-calc/package.json index b2c5ed8a1b..6a941b5ffd 100644 --- a/packages/jsii-calc/package.json +++ b/packages/jsii-calc/package.json @@ -30,7 +30,8 @@ "scripts": { "build": "jsii", "watch": "jsii -w", - "test": "node test/test.calc.js && diff-test test/assembly.jsii .jsii" + "test": "node test/test.calc.js && diff-test test/assembly.jsii .jsii", + "test:update": "npm run build && UPDATE_DIFF=1 npm run test" }, "bundledDependencies": [ "jsii-calc-bundled" diff --git a/packages/jsii-calc/test/assembly.jsii b/packages/jsii-calc/test/assembly.jsii index 29460bee26..994126629e 100644 --- a/packages/jsii-calc/test/assembly.jsii +++ b/packages/jsii-calc/test/assembly.jsii @@ -1135,6 +1135,9 @@ }, { "name": "b", + "overrides": { + "fqn": "jsii-calc.INonInternalInterface" + }, "type": { "primitive": "string" } @@ -1181,6 +1184,9 @@ }, { "name": "b", + "overrides": { + "fqn": "jsii-calc.INonInternalInterface" + }, "type": { "primitive": "string" } @@ -1895,27 +1901,13 @@ "type": { "primitive": "boolean" } - } - ] - }, - "jsii-calc.ExtendsPrivateInterface": { - "assembly": "jsii-calc", - "datatype": true, - "fqn": "jsii-calc.ExtendsPrivateInterface", - "kind": "interface", - "name": "ExtendsPrivateInterface", - "properties": [ + }, { "abstract": true, "immutable": true, - "name": "moreThings", + "name": "prop", "type": { - "collection": { - "elementtype": { - "primitive": "string" - }, - "kind": "array" - } + "primitive": "string" } } ] @@ -2056,6 +2048,34 @@ } ] }, + "jsii-calc.IExtendsPrivateInterface": { + "assembly": "jsii-calc", + "fqn": "jsii-calc.IExtendsPrivateInterface", + "kind": "interface", + "name": "IExtendsPrivateInterface", + "properties": [ + { + "abstract": true, + "immutable": true, + "name": "moreThings", + "type": { + "collection": { + "elementtype": { + "primitive": "string" + }, + "kind": "array" + } + } + }, + { + "abstract": true, + "name": "private", + "type": { + "primitive": "string" + } + } + ] + }, "jsii-calc.IFriendlier": { "assembly": "jsii-calc", "docs": { @@ -2257,6 +2277,59 @@ } ] }, + "jsii-calc.IJSII417Derived": { + "assembly": "jsii-calc", + "fqn": "jsii-calc.IJSII417Derived", + "interfaces": [ + { + "fqn": "jsii-calc.IJSII417PublicBaseOfBase" + } + ], + "kind": "interface", + "methods": [ + { + "abstract": true, + "name": "bar" + }, + { + "abstract": true, + "name": "baz" + } + ], + "name": "IJSII417Derived", + "properties": [ + { + "abstract": true, + "immutable": true, + "name": "property", + "type": { + "primitive": "string" + } + } + ] + }, + "jsii-calc.IJSII417PublicBaseOfBase": { + "assembly": "jsii-calc", + "fqn": "jsii-calc.IJSII417PublicBaseOfBase", + "kind": "interface", + "methods": [ + { + "abstract": true, + "name": "foo" + } + ], + "name": "IJSII417PublicBaseOfBase", + "properties": [ + { + "abstract": true, + "immutable": true, + "name": "hasRoot", + "type": { + "primitive": "boolean" + } + } + ] + }, "jsii-calc.IMutableObjectLiteral": { "assembly": "jsii-calc", "fqn": "jsii-calc.IMutableObjectLiteral", @@ -2283,6 +2356,13 @@ "kind": "interface", "name": "INonInternalInterface", "properties": [ + { + "abstract": true, + "name": "b", + "type": { + "primitive": "string" + } + }, { "abstract": true, "name": "c", @@ -4800,5 +4880,5 @@ } }, "version": "0.8.2", - "fingerprint": "5kMI3UzT9N2sovIndhAmSefEqtrUStnpb0hmWwfLjOs=" + "fingerprint": "WJgwH2kAeJLVBMQx/Ek9JLty5tmfiy5sHAz0T8eMX7o=" } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/.jsii b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/.jsii index 29460bee26..994126629e 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/.jsii +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/.jsii @@ -1135,6 +1135,9 @@ }, { "name": "b", + "overrides": { + "fqn": "jsii-calc.INonInternalInterface" + }, "type": { "primitive": "string" } @@ -1181,6 +1184,9 @@ }, { "name": "b", + "overrides": { + "fqn": "jsii-calc.INonInternalInterface" + }, "type": { "primitive": "string" } @@ -1895,27 +1901,13 @@ "type": { "primitive": "boolean" } - } - ] - }, - "jsii-calc.ExtendsPrivateInterface": { - "assembly": "jsii-calc", - "datatype": true, - "fqn": "jsii-calc.ExtendsPrivateInterface", - "kind": "interface", - "name": "ExtendsPrivateInterface", - "properties": [ + }, { "abstract": true, "immutable": true, - "name": "moreThings", + "name": "prop", "type": { - "collection": { - "elementtype": { - "primitive": "string" - }, - "kind": "array" - } + "primitive": "string" } } ] @@ -2056,6 +2048,34 @@ } ] }, + "jsii-calc.IExtendsPrivateInterface": { + "assembly": "jsii-calc", + "fqn": "jsii-calc.IExtendsPrivateInterface", + "kind": "interface", + "name": "IExtendsPrivateInterface", + "properties": [ + { + "abstract": true, + "immutable": true, + "name": "moreThings", + "type": { + "collection": { + "elementtype": { + "primitive": "string" + }, + "kind": "array" + } + } + }, + { + "abstract": true, + "name": "private", + "type": { + "primitive": "string" + } + } + ] + }, "jsii-calc.IFriendlier": { "assembly": "jsii-calc", "docs": { @@ -2257,6 +2277,59 @@ } ] }, + "jsii-calc.IJSII417Derived": { + "assembly": "jsii-calc", + "fqn": "jsii-calc.IJSII417Derived", + "interfaces": [ + { + "fqn": "jsii-calc.IJSII417PublicBaseOfBase" + } + ], + "kind": "interface", + "methods": [ + { + "abstract": true, + "name": "bar" + }, + { + "abstract": true, + "name": "baz" + } + ], + "name": "IJSII417Derived", + "properties": [ + { + "abstract": true, + "immutable": true, + "name": "property", + "type": { + "primitive": "string" + } + } + ] + }, + "jsii-calc.IJSII417PublicBaseOfBase": { + "assembly": "jsii-calc", + "fqn": "jsii-calc.IJSII417PublicBaseOfBase", + "kind": "interface", + "methods": [ + { + "abstract": true, + "name": "foo" + } + ], + "name": "IJSII417PublicBaseOfBase", + "properties": [ + { + "abstract": true, + "immutable": true, + "name": "hasRoot", + "type": { + "primitive": "boolean" + } + } + ] + }, "jsii-calc.IMutableObjectLiteral": { "assembly": "jsii-calc", "fqn": "jsii-calc.IMutableObjectLiteral", @@ -2283,6 +2356,13 @@ "kind": "interface", "name": "INonInternalInterface", "properties": [ + { + "abstract": true, + "name": "b", + "type": { + "primitive": "string" + } + }, { "abstract": true, "name": "c", @@ -4800,5 +4880,5 @@ } }, "version": "0.8.2", - "fingerprint": "5kMI3UzT9N2sovIndhAmSefEqtrUStnpb0hmWwfLjOs=" + "fingerprint": "WJgwH2kAeJLVBMQx/Ek9JLty5tmfiy5sHAz0T8eMX7o=" } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExtendsInternalInterface.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExtendsInternalInterface.cs index 3390465081..d1efd44009 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExtendsInternalInterface.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExtendsInternalInterface.cs @@ -11,5 +11,12 @@ public bool Boom get; set; } + + [JsiiProperty("prop", "{\"primitive\":\"string\"}", true)] + public string Prop + { + get; + set; + } } } \ No newline at end of file diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExtendsInternalInterfaceProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExtendsInternalInterfaceProxy.cs index b6f0b9d2d7..f214aa05c2 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExtendsInternalInterfaceProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExtendsInternalInterfaceProxy.cs @@ -14,5 +14,11 @@ public bool Boom { get => GetInstanceProperty(); } + + [JsiiProperty("prop", "{\"primitive\":\"string\"}")] + public string Prop + { + get => GetInstanceProperty(); + } } } \ No newline at end of file diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExtendsPrivateInterface.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExtendsPrivateInterface.cs deleted file mode 100644 index dad46ad0ca..0000000000 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExtendsPrivateInterface.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Amazon.JSII.Runtime.Deputy; - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiByValue] - public class ExtendsPrivateInterface : IExtendsPrivateInterface - { - [JsiiProperty("moreThings", "{\"collection\":{\"kind\":\"array\",\"elementtype\":{\"primitive\":\"string\"}}}", true)] - public string[] MoreThings - { - get; - set; - } - } -} \ No newline at end of file diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExtendsPrivateInterfaceProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExtendsPrivateInterfaceProxy.cs deleted file mode 100644 index 4d89970881..0000000000 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExtendsPrivateInterfaceProxy.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Amazon.JSII.Runtime.Deputy; - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(typeof(IExtendsPrivateInterface), "jsii-calc.ExtendsPrivateInterface")] - internal sealed class ExtendsPrivateInterfaceProxy : DeputyBase, IExtendsPrivateInterface - { - private ExtendsPrivateInterfaceProxy(ByRefValue reference): base(reference) - { - } - - [JsiiProperty("moreThings", "{\"collection\":{\"kind\":\"array\",\"elementtype\":{\"primitive\":\"string\"}}}")] - public string[] MoreThings - { - get => GetInstanceProperty(); - } - } -} \ No newline at end of file diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExtendsInternalInterface.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExtendsInternalInterface.cs index a993480080..ef49e96699 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExtendsInternalInterface.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExtendsInternalInterface.cs @@ -10,5 +10,11 @@ bool Boom { get; } + + [JsiiProperty("prop", "{\"primitive\":\"string\"}")] + string Prop + { + get; + } } } \ No newline at end of file diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExtendsPrivateInterfaceProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExtendsPrivateInterfaceProxy.cs new file mode 100644 index 0000000000..9a276d3811 --- /dev/null +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExtendsPrivateInterfaceProxy.cs @@ -0,0 +1,25 @@ +using Amazon.JSII.Runtime.Deputy; + +namespace Amazon.JSII.Tests.CalculatorNamespace +{ + [JsiiTypeProxy(typeof(IIExtendsPrivateInterface), "jsii-calc.IExtendsPrivateInterface")] + internal sealed class IExtendsPrivateInterfaceProxy : DeputyBase, IIExtendsPrivateInterface + { + private IExtendsPrivateInterfaceProxy(ByRefValue reference): base(reference) + { + } + + [JsiiProperty("moreThings", "{\"collection\":{\"kind\":\"array\",\"elementtype\":{\"primitive\":\"string\"}}}")] + public string[] MoreThings + { + get => GetInstanceProperty(); + } + + [JsiiProperty("private", "{\"primitive\":\"string\"}")] + public string Private + { + get => GetInstanceProperty(); + set => SetInstanceProperty(value); + } + } +} \ No newline at end of file diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExtendsPrivateInterface.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IIExtendsPrivateInterface.cs similarity index 50% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExtendsPrivateInterface.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IIExtendsPrivateInterface.cs index c3e1ec2dc8..c9fe06ae42 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExtendsPrivateInterface.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IIExtendsPrivateInterface.cs @@ -2,13 +2,20 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { - [JsiiInterface(typeof(IExtendsPrivateInterface), "jsii-calc.ExtendsPrivateInterface")] - public interface IExtendsPrivateInterface + [JsiiInterface(typeof(IIExtendsPrivateInterface), "jsii-calc.IExtendsPrivateInterface")] + public interface IIExtendsPrivateInterface { [JsiiProperty("moreThings", "{\"collection\":{\"kind\":\"array\",\"elementtype\":{\"primitive\":\"string\"}}}")] string[] MoreThings { get; } + + [JsiiProperty("private", "{\"primitive\":\"string\"}")] + string Private + { + get; + set; + } } } \ No newline at end of file diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IIJSII417Derived.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IIJSII417Derived.cs new file mode 100644 index 0000000000..22b7b37324 --- /dev/null +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IIJSII417Derived.cs @@ -0,0 +1,19 @@ +using Amazon.JSII.Runtime.Deputy; + +namespace Amazon.JSII.Tests.CalculatorNamespace +{ + [JsiiInterface(typeof(IIJSII417Derived), "jsii-calc.IJSII417Derived")] + public interface IIJSII417Derived : IIJSII417PublicBaseOfBase + { + [JsiiProperty("property", "{\"primitive\":\"string\"}")] + string Property + { + get; + } + + [JsiiMethod("bar", null, "[]")] + void Bar(); + [JsiiMethod("baz", null, "[]")] + void Baz(); + } +} \ No newline at end of file diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IIJSII417PublicBaseOfBase.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IIJSII417PublicBaseOfBase.cs new file mode 100644 index 0000000000..921528a252 --- /dev/null +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IIJSII417PublicBaseOfBase.cs @@ -0,0 +1,17 @@ +using Amazon.JSII.Runtime.Deputy; + +namespace Amazon.JSII.Tests.CalculatorNamespace +{ + [JsiiInterface(typeof(IIJSII417PublicBaseOfBase), "jsii-calc.IJSII417PublicBaseOfBase")] + public interface IIJSII417PublicBaseOfBase + { + [JsiiProperty("hasRoot", "{\"primitive\":\"boolean\"}")] + bool HasRoot + { + get; + } + + [JsiiMethod("foo", null, "[]")] + void Foo(); + } +} \ No newline at end of file diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IINonInternalInterface.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IINonInternalInterface.cs index f3ef2fce90..57f7fe3be2 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IINonInternalInterface.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IINonInternalInterface.cs @@ -5,6 +5,13 @@ namespace Amazon.JSII.Tests.CalculatorNamespace [JsiiInterface(typeof(IINonInternalInterface), "jsii-calc.INonInternalInterface")] public interface IINonInternalInterface : IIAnotherPublicInterface { + [JsiiProperty("b", "{\"primitive\":\"string\"}")] + string B + { + get; + set; + } + [JsiiProperty("c", "{\"primitive\":\"string\"}")] string C { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJSII417DerivedProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJSII417DerivedProxy.cs new file mode 100644 index 0000000000..367f83af2a --- /dev/null +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJSII417DerivedProxy.cs @@ -0,0 +1,42 @@ +using Amazon.JSII.Runtime.Deputy; + +namespace Amazon.JSII.Tests.CalculatorNamespace +{ + [JsiiTypeProxy(typeof(IIJSII417Derived), "jsii-calc.IJSII417Derived")] + internal sealed class IJSII417DerivedProxy : DeputyBase, IIJSII417Derived + { + private IJSII417DerivedProxy(ByRefValue reference): base(reference) + { + } + + [JsiiProperty("property", "{\"primitive\":\"string\"}")] + public string Property + { + get => GetInstanceProperty(); + } + + [JsiiProperty("hasRoot", "{\"primitive\":\"boolean\"}")] + public bool HasRoot + { + get => GetInstanceProperty(); + } + + [JsiiMethod("bar", null, "[]")] + public void Bar() + { + InvokeInstanceVoidMethod(new object[]{}); + } + + [JsiiMethod("baz", null, "[]")] + public void Baz() + { + InvokeInstanceVoidMethod(new object[]{}); + } + + [JsiiMethod("foo", null, "[]")] + public void Foo() + { + InvokeInstanceVoidMethod(new object[]{}); + } + } +} \ No newline at end of file diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJSII417PublicBaseOfBaseProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJSII417PublicBaseOfBaseProxy.cs new file mode 100644 index 0000000000..bff3c8bdab --- /dev/null +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJSII417PublicBaseOfBaseProxy.cs @@ -0,0 +1,24 @@ +using Amazon.JSII.Runtime.Deputy; + +namespace Amazon.JSII.Tests.CalculatorNamespace +{ + [JsiiTypeProxy(typeof(IIJSII417PublicBaseOfBase), "jsii-calc.IJSII417PublicBaseOfBase")] + internal sealed class IJSII417PublicBaseOfBaseProxy : DeputyBase, IIJSII417PublicBaseOfBase + { + private IJSII417PublicBaseOfBaseProxy(ByRefValue reference): base(reference) + { + } + + [JsiiProperty("hasRoot", "{\"primitive\":\"boolean\"}")] + public bool HasRoot + { + get => GetInstanceProperty(); + } + + [JsiiMethod("foo", null, "[]")] + public void Foo() + { + InvokeInstanceVoidMethod(new object[]{}); + } + } +} \ No newline at end of file diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/INonInternalInterfaceProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/INonInternalInterfaceProxy.cs index 1abf519b85..ac5a375478 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/INonInternalInterfaceProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/INonInternalInterfaceProxy.cs @@ -9,6 +9,13 @@ private INonInternalInterfaceProxy(ByRefValue reference): base(reference) { } + [JsiiProperty("b", "{\"primitive\":\"string\"}")] + public string B + { + get => GetInstanceProperty(); + set => SetInstanceProperty(value); + } + [JsiiProperty("c", "{\"primitive\":\"string\"}")] public string C { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/$Module.java b/packages/jsii-pacmak/test/expected.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/$Module.java index 93243b9b76..3a89338736 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/$Module.java +++ b/packages/jsii-pacmak/test/expected.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/$Module.java @@ -50,11 +50,11 @@ protected Class resolveClass(final String fqn) throws ClassNotFoundException case "jsii-calc.EraseUndefinedHashValuesOptions": return software.amazon.jsii.tests.calculator.EraseUndefinedHashValuesOptions.class; case "jsii-calc.ExportedBaseClass": return software.amazon.jsii.tests.calculator.ExportedBaseClass.class; case "jsii-calc.ExtendsInternalInterface": return software.amazon.jsii.tests.calculator.ExtendsInternalInterface.class; - case "jsii-calc.ExtendsPrivateInterface": return software.amazon.jsii.tests.calculator.ExtendsPrivateInterface.class; case "jsii-calc.GiveMeStructs": return software.amazon.jsii.tests.calculator.GiveMeStructs.class; case "jsii-calc.Greetee": return software.amazon.jsii.tests.calculator.Greetee.class; case "jsii-calc.GreetingAugmenter": return software.amazon.jsii.tests.calculator.GreetingAugmenter.class; case "jsii-calc.IAnotherPublicInterface": return software.amazon.jsii.tests.calculator.IAnotherPublicInterface.class; + case "jsii-calc.IExtendsPrivateInterface": return software.amazon.jsii.tests.calculator.IExtendsPrivateInterface.class; case "jsii-calc.IFriendlier": return software.amazon.jsii.tests.calculator.IFriendlier.class; case "jsii-calc.IFriendlyRandomGenerator": return software.amazon.jsii.tests.calculator.IFriendlyRandomGenerator.class; case "jsii-calc.IInterfaceImplementedByAbstractClass": return software.amazon.jsii.tests.calculator.IInterfaceImplementedByAbstractClass.class; @@ -64,6 +64,8 @@ protected Class resolveClass(final String fqn) throws ClassNotFoundException case "jsii-calc.IInterfaceWithOptionalMethodArguments": return software.amazon.jsii.tests.calculator.IInterfaceWithOptionalMethodArguments.class; case "jsii-calc.IInterfaceWithProperties": return software.amazon.jsii.tests.calculator.IInterfaceWithProperties.class; case "jsii-calc.IInterfaceWithPropertiesExtension": return software.amazon.jsii.tests.calculator.IInterfaceWithPropertiesExtension.class; + case "jsii-calc.IJSII417Derived": return software.amazon.jsii.tests.calculator.IJSII417Derived.class; + case "jsii-calc.IJSII417PublicBaseOfBase": return software.amazon.jsii.tests.calculator.IJSII417PublicBaseOfBase.class; case "jsii-calc.IMutableObjectLiteral": return software.amazon.jsii.tests.calculator.IMutableObjectLiteral.class; case "jsii-calc.INonInternalInterface": return software.amazon.jsii.tests.calculator.INonInternalInterface.class; case "jsii-calc.IPrivatelyImplemented": return software.amazon.jsii.tests.calculator.IPrivatelyImplemented.class; diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/ClassThatImplementsTheInternalInterface.java b/packages/jsii-pacmak/test/expected.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/ClassThatImplementsTheInternalInterface.java index 0230e6c473..3d6078a6d2 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/ClassThatImplementsTheInternalInterface.java +++ b/packages/jsii-pacmak/test/expected.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/ClassThatImplementsTheInternalInterface.java @@ -21,10 +21,12 @@ public void setA(final java.lang.String value) { this.jsiiSet("a", java.util.Objects.requireNonNull(value, "a is required")); } + @Override public java.lang.String getB() { return this.jsiiGet("b", java.lang.String.class); } + @Override public void setB(final java.lang.String value) { this.jsiiSet("b", java.util.Objects.requireNonNull(value, "b is required")); } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/ClassThatImplementsThePrivateInterface.java b/packages/jsii-pacmak/test/expected.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/ClassThatImplementsThePrivateInterface.java index 1eb7b12275..c6d358f514 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/ClassThatImplementsThePrivateInterface.java +++ b/packages/jsii-pacmak/test/expected.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/ClassThatImplementsThePrivateInterface.java @@ -21,10 +21,12 @@ public void setA(final java.lang.String value) { this.jsiiSet("a", java.util.Objects.requireNonNull(value, "a is required")); } + @Override public java.lang.String getB() { return this.jsiiGet("b", java.lang.String.class); } + @Override public void setB(final java.lang.String value) { this.jsiiSet("b", java.util.Objects.requireNonNull(value, "b is required")); } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/ExtendsInternalInterface.java b/packages/jsii-pacmak/test/expected.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/ExtendsInternalInterface.java index 2147ac9850..00c01407b5 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/ExtendsInternalInterface.java +++ b/packages/jsii-pacmak/test/expected.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/ExtendsInternalInterface.java @@ -3,6 +3,7 @@ @javax.annotation.Generated(value = "jsii-pacmak") public interface ExtendsInternalInterface extends software.amazon.jsii.JsiiSerializable { java.lang.Boolean getBoom(); + java.lang.String getProp(); /** * @return a {@link Builder} of {@link ExtendsInternalInterface} @@ -16,6 +17,7 @@ static Builder builder() { */ final class Builder { private java.lang.Boolean _boom; + private java.lang.String _prop; /** * Sets the value of Boom @@ -26,6 +28,15 @@ public Builder withBoom(final java.lang.Boolean value) { this._boom = java.util.Objects.requireNonNull(value, "boom is required"); return this; } + /** + * Sets the value of Prop + * @param value the value to be set + * @return {@code this} + */ + public Builder withProp(final java.lang.String value) { + this._prop = java.util.Objects.requireNonNull(value, "prop is required"); + return this; + } /** * Builds the configured instance. @@ -35,16 +46,23 @@ public Builder withBoom(final java.lang.Boolean value) { public ExtendsInternalInterface build() { return new ExtendsInternalInterface() { private final java.lang.Boolean $boom = java.util.Objects.requireNonNull(_boom, "boom is required"); + private final java.lang.String $prop = java.util.Objects.requireNonNull(_prop, "prop is required"); @Override public java.lang.Boolean getBoom() { return this.$boom; } + @Override + public java.lang.String getProp() { + return this.$prop; + } + public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); obj.set("boom", om.valueToTree(this.getBoom())); + obj.set("prop", om.valueToTree(this.getProp())); return obj; } @@ -64,5 +82,10 @@ final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements public java.lang.Boolean getBoom() { return this.jsiiGet("boom", java.lang.Boolean.class); } + + @Override + public java.lang.String getProp() { + return this.jsiiGet("prop", java.lang.String.class); + } } } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/ExtendsPrivateInterface.java b/packages/jsii-pacmak/test/expected.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/ExtendsPrivateInterface.java deleted file mode 100644 index a54e9c9b96..0000000000 --- a/packages/jsii-pacmak/test/expected.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/ExtendsPrivateInterface.java +++ /dev/null @@ -1,68 +0,0 @@ -package software.amazon.jsii.tests.calculator; - -@javax.annotation.Generated(value = "jsii-pacmak") -public interface ExtendsPrivateInterface extends software.amazon.jsii.JsiiSerializable { - java.util.List getMoreThings(); - - /** - * @return a {@link Builder} of {@link ExtendsPrivateInterface} - */ - static Builder builder() { - return new Builder(); - } - - /** - * A builder for {@link ExtendsPrivateInterface} - */ - final class Builder { - private java.util.List _moreThings; - - /** - * Sets the value of MoreThings - * @param value the value to be set - * @return {@code this} - */ - public Builder withMoreThings(final java.util.List value) { - this._moreThings = java.util.Objects.requireNonNull(value, "moreThings is required"); - return this; - } - - /** - * Builds the configured instance. - * @return a new instance of {@link ExtendsPrivateInterface} - * @throws NullPointerException if any required attribute was not provided - */ - public ExtendsPrivateInterface build() { - return new ExtendsPrivateInterface() { - private final java.util.List $moreThings = java.util.Objects.requireNonNull(_moreThings, "moreThings is required"); - - @Override - public java.util.List getMoreThings() { - return this.$moreThings; - } - - public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { - com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; - com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); - obj.set("moreThings", om.valueToTree(this.getMoreThings())); - return obj; - } - - }; - } - } - - /** - * A proxy class which represents a concrete javascript instance of this type. - */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.ExtendsPrivateInterface { - protected Jsii$Proxy(final software.amazon.jsii.JsiiObject.InitializationMode mode) { - super(mode); - } - - @Override - public java.util.List getMoreThings() { - return this.jsiiGet("moreThings", java.util.List.class); - } - } -} diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/IExtendsPrivateInterface.java b/packages/jsii-pacmak/test/expected.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/IExtendsPrivateInterface.java new file mode 100644 index 0000000000..fb35c17aff --- /dev/null +++ b/packages/jsii-pacmak/test/expected.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/IExtendsPrivateInterface.java @@ -0,0 +1,32 @@ +package software.amazon.jsii.tests.calculator; + +@javax.annotation.Generated(value = "jsii-pacmak") +public interface IExtendsPrivateInterface extends software.amazon.jsii.JsiiSerializable { + java.util.List getMoreThings(); + java.lang.String getPrivate(); + void setPrivate(final java.lang.String value); + + /** + * A proxy class which represents a concrete javascript instance of this type. + */ + final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IExtendsPrivateInterface { + protected Jsii$Proxy(final software.amazon.jsii.JsiiObject.InitializationMode mode) { + super(mode); + } + + @Override + public java.util.List getMoreThings() { + return this.jsiiGet("moreThings", java.util.List.class); + } + + @Override + public java.lang.String getPrivate() { + return this.jsiiGet("private", java.lang.String.class); + } + + @Override + public void setPrivate(final java.lang.String value) { + this.jsiiSet("private", java.util.Objects.requireNonNull(value, "private is required")); + } + } +} diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/IJSII417Derived.java b/packages/jsii-pacmak/test/expected.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/IJSII417Derived.java new file mode 100644 index 0000000000..3aec8033d0 --- /dev/null +++ b/packages/jsii-pacmak/test/expected.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/IJSII417Derived.java @@ -0,0 +1,42 @@ +package software.amazon.jsii.tests.calculator; + +@javax.annotation.Generated(value = "jsii-pacmak") +public interface IJSII417Derived extends software.amazon.jsii.JsiiSerializable, software.amazon.jsii.tests.calculator.IJSII417PublicBaseOfBase { + java.lang.String getProperty(); + void bar(); + void baz(); + + /** + * A proxy class which represents a concrete javascript instance of this type. + */ + final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IJSII417Derived { + protected Jsii$Proxy(final software.amazon.jsii.JsiiObject.InitializationMode mode) { + super(mode); + } + + @Override + public java.lang.String getProperty() { + return this.jsiiGet("property", java.lang.String.class); + } + + @Override + public java.lang.Boolean getHasRoot() { + return this.jsiiGet("hasRoot", java.lang.Boolean.class); + } + + @Override + public void bar() { + this.jsiiCall("bar", Void.class); + } + + @Override + public void baz() { + this.jsiiCall("baz", Void.class); + } + + @Override + public void foo() { + this.jsiiCall("foo", Void.class); + } + } +} diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/IJSII417PublicBaseOfBase.java b/packages/jsii-pacmak/test/expected.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/IJSII417PublicBaseOfBase.java new file mode 100644 index 0000000000..3103875849 --- /dev/null +++ b/packages/jsii-pacmak/test/expected.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/IJSII417PublicBaseOfBase.java @@ -0,0 +1,26 @@ +package software.amazon.jsii.tests.calculator; + +@javax.annotation.Generated(value = "jsii-pacmak") +public interface IJSII417PublicBaseOfBase extends software.amazon.jsii.JsiiSerializable { + java.lang.Boolean getHasRoot(); + void foo(); + + /** + * A proxy class which represents a concrete javascript instance of this type. + */ + final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IJSII417PublicBaseOfBase { + protected Jsii$Proxy(final software.amazon.jsii.JsiiObject.InitializationMode mode) { + super(mode); + } + + @Override + public java.lang.Boolean getHasRoot() { + return this.jsiiGet("hasRoot", java.lang.Boolean.class); + } + + @Override + public void foo() { + this.jsiiCall("foo", Void.class); + } + } +} diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/INonInternalInterface.java b/packages/jsii-pacmak/test/expected.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/INonInternalInterface.java index dc6cb905af..ca3576db03 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/INonInternalInterface.java +++ b/packages/jsii-pacmak/test/expected.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/INonInternalInterface.java @@ -2,6 +2,8 @@ @javax.annotation.Generated(value = "jsii-pacmak") public interface INonInternalInterface extends software.amazon.jsii.JsiiSerializable, software.amazon.jsii.tests.calculator.IAnotherPublicInterface { + java.lang.String getB(); + void setB(final java.lang.String value); java.lang.String getC(); void setC(final java.lang.String value); @@ -13,6 +15,16 @@ final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements super(mode); } + @Override + public java.lang.String getB() { + return this.jsiiGet("b", java.lang.String.class); + } + + @Override + public void setB(final java.lang.String value) { + this.jsiiSet("b", java.util.Objects.requireNonNull(value, "b is required")); + } + @Override public java.lang.String getC() { return this.jsiiGet("c", java.lang.String.class); diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/python/src/jsii_calc/__init__.py b/packages/jsii-pacmak/test/expected.jsii-calc/python/src/jsii_calc/__init__.py index a3a5377f51..81cd9a4955 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/python/src/jsii_calc/__init__.py +++ b/packages/jsii-pacmak/test/expected.jsii-calc/python/src/jsii_calc/__init__.py @@ -567,10 +567,7 @@ def success(self) -> bool: @jsii.data_type(jsii_type="jsii-calc.ExtendsInternalInterface") class ExtendsInternalInterface(jsii.compat.TypedDict): boom: bool - -@jsii.data_type(jsii_type="jsii-calc.ExtendsPrivateInterface") -class ExtendsPrivateInterface(jsii.compat.TypedDict): - moreThings: typing.List[str] + prop: str class GiveMeStructs(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.GiveMeStructs"): def __init__(self) -> None: @@ -668,6 +665,44 @@ def a(self, value: str): return jsii.set(self, "a", value) +@jsii.interface(jsii_type="jsii-calc.IExtendsPrivateInterface") +class IExtendsPrivateInterface(jsii.compat.Protocol): + @staticmethod + def __jsii_proxy_class__(): + return _IExtendsPrivateInterfaceProxy + + @property + @jsii.member(jsii_name="moreThings") + def more_things(self) -> typing.List[str]: + ... + + @property + @jsii.member(jsii_name="private") + def private(self) -> str: + ... + + @private.setter + def private(self, value: str): + ... + + +class _IExtendsPrivateInterfaceProxy(): + __jsii_type__ = "jsii-calc.IExtendsPrivateInterface" + @property + @jsii.member(jsii_name="moreThings") + def more_things(self) -> typing.List[str]: + return jsii.get(self, "moreThings") + + @property + @jsii.member(jsii_name="private") + def private(self) -> str: + return jsii.get(self, "private") + + @private.setter + def private(self, value: str): + return jsii.set(self, "private", value) + + @jsii.interface(jsii_type="jsii-calc.IFriendlier") class IFriendlier(scope.jsii_calc_lib.IFriendly, jsii.compat.Protocol): @staticmethod @@ -916,6 +951,70 @@ def foo(self, value: jsii.Number): return jsii.set(self, "foo", value) +@jsii.interface(jsii_type="jsii-calc.IJSII417PublicBaseOfBase") +class IJSII417PublicBaseOfBase(jsii.compat.Protocol): + @staticmethod + def __jsii_proxy_class__(): + return _IJSII417PublicBaseOfBaseProxy + + @property + @jsii.member(jsii_name="hasRoot") + def has_root(self) -> bool: + ... + + @jsii.member(jsii_name="foo") + def foo(self) -> None: + ... + + +class _IJSII417PublicBaseOfBaseProxy(): + __jsii_type__ = "jsii-calc.IJSII417PublicBaseOfBase" + @property + @jsii.member(jsii_name="hasRoot") + def has_root(self) -> bool: + return jsii.get(self, "hasRoot") + + @jsii.member(jsii_name="foo") + def foo(self) -> None: + return jsii.invoke(self, "foo", []) + + +@jsii.interface(jsii_type="jsii-calc.IJSII417Derived") +class IJSII417Derived(IJSII417PublicBaseOfBase, jsii.compat.Protocol): + @staticmethod + def __jsii_proxy_class__(): + return _IJSII417DerivedProxy + + @property + @jsii.member(jsii_name="property") + def property(self) -> str: + ... + + @jsii.member(jsii_name="bar") + def bar(self) -> None: + ... + + @jsii.member(jsii_name="baz") + def baz(self) -> None: + ... + + +class _IJSII417DerivedProxy(jsii.proxy_for(IJSII417PublicBaseOfBase)): + __jsii_type__ = "jsii-calc.IJSII417Derived" + @property + @jsii.member(jsii_name="property") + def property(self) -> str: + return jsii.get(self, "property") + + @jsii.member(jsii_name="bar") + def bar(self) -> None: + return jsii.invoke(self, "bar", []) + + @jsii.member(jsii_name="baz") + def baz(self) -> None: + return jsii.invoke(self, "baz", []) + + @jsii.interface(jsii_type="jsii-calc.IMutableObjectLiteral") class IMutableObjectLiteral(jsii.compat.Protocol): @staticmethod @@ -950,6 +1049,15 @@ class INonInternalInterface(IAnotherPublicInterface, jsii.compat.Protocol): def __jsii_proxy_class__(): return _INonInternalInterfaceProxy + @property + @jsii.member(jsii_name="b") + def b(self) -> str: + ... + + @b.setter + def b(self, value: str): + ... + @property @jsii.member(jsii_name="c") def c(self) -> str: @@ -962,6 +1070,15 @@ def c(self, value: str): class _INonInternalInterfaceProxy(jsii.proxy_for(IAnotherPublicInterface)): __jsii_type__ = "jsii-calc.INonInternalInterface" + @property + @jsii.member(jsii_name="b") + def b(self) -> str: + return jsii.get(self, "b") + + @b.setter + def b(self, value: str): + return jsii.set(self, "b", value) + @property @jsii.member(jsii_name="c") def c(self) -> str: @@ -2491,6 +2608,6 @@ def parts(self, value: typing.List[scope.jsii_calc_lib.Value]): return jsii.set(self, "parts", value) -__all__ = ["AbstractClass", "AbstractClassBase", "AbstractClassReturner", "Add", "AllTypes", "AllTypesEnum", "AllowedMethodNames", "AsyncVirtualMethods", "AugmentableClass", "BinaryOperation", "Calculator", "CalculatorProps", "ClassThatImplementsTheInternalInterface", "ClassThatImplementsThePrivateInterface", "ClassWithMutableObjectLiteralProperty", "ClassWithPrivateConstructorAndAutomaticProperties", "ConstructorPassesThisOut", "Constructors", "ConsumersOfThisCrazyTypeSystem", "DefaultedConstructorArgument", "DerivedClassHasNoProperties", "DerivedStruct", "DoNotOverridePrivates", "DoNotRecognizeAnyAsOptional", "DocumentedClass", "DontComplainAboutVariadicAfterOptional", "DoubleTrouble", "EraseUndefinedHashValues", "EraseUndefinedHashValuesOptions", "ExportedBaseClass", "ExtendsInternalInterface", "ExtendsPrivateInterface", "GiveMeStructs", "Greetee", "GreetingAugmenter", "IAnotherPublicInterface", "IFriendlier", "IFriendlyRandomGenerator", "IInterfaceImplementedByAbstractClass", "IInterfaceThatShouldNotBeADataType", "IInterfaceWithInternal", "IInterfaceWithMethods", "IInterfaceWithOptionalMethodArguments", "IInterfaceWithProperties", "IInterfaceWithPropertiesExtension", "IMutableObjectLiteral", "INonInternalInterface", "IPrivatelyImplemented", "IPublicInterface", "IPublicInterface2", "IRandomNumberGenerator", "IReturnsNumber", "ImplementInternalInterface", "ImplementsInterfaceWithInternal", "ImplementsInterfaceWithInternalSubclass", "ImplementsPrivateInterface", "ImplictBaseOfBase", "InbetweenClass", "InterfaceInNamespaceIncludesClasses", "InterfaceInNamespaceOnlyInterface", "JSII417Derived", "JSII417PublicBaseOfBase", "JSObjectLiteralForInterface", "JSObjectLiteralToNative", "JSObjectLiteralToNativeClass", "JavaReservedWords", "JsiiAgent", "LoadBalancedFargateServiceProps", "Multiply", "Negate", "NodeStandardLibrary", "NullShouldBeTreatedAsUndefined", "NullShouldBeTreatedAsUndefinedData", "NumberGenerator", "ObjectRefsInCollections", "Old", "OptionalConstructorArgument", "OptionalStruct", "OptionalStructConsumer", "OverrideReturnsObject", "PartiallyInitializedThisConsumer", "Polymorphism", "Power", "PublicClass", "PythonReservedWords", "ReferenceEnumFromScopedPackage", "ReturnsPrivateImplementationOfInterface", "RuntimeTypeChecking", "SingleInstanceTwoTypes", "Statics", "StringEnum", "StripInternal", "Sum", "SyncVirtualMethods", "Thrower", "UnaryOperation", "UnionProperties", "UseBundledDependency", "UseCalcBase", "UsesInterfaceWithProperties", "VariadicMethod", "VirtualMethodPlayground", "__jsii_assembly__", "composition"] +__all__ = ["AbstractClass", "AbstractClassBase", "AbstractClassReturner", "Add", "AllTypes", "AllTypesEnum", "AllowedMethodNames", "AsyncVirtualMethods", "AugmentableClass", "BinaryOperation", "Calculator", "CalculatorProps", "ClassThatImplementsTheInternalInterface", "ClassThatImplementsThePrivateInterface", "ClassWithMutableObjectLiteralProperty", "ClassWithPrivateConstructorAndAutomaticProperties", "ConstructorPassesThisOut", "Constructors", "ConsumersOfThisCrazyTypeSystem", "DefaultedConstructorArgument", "DerivedClassHasNoProperties", "DerivedStruct", "DoNotOverridePrivates", "DoNotRecognizeAnyAsOptional", "DocumentedClass", "DontComplainAboutVariadicAfterOptional", "DoubleTrouble", "EraseUndefinedHashValues", "EraseUndefinedHashValuesOptions", "ExportedBaseClass", "ExtendsInternalInterface", "GiveMeStructs", "Greetee", "GreetingAugmenter", "IAnotherPublicInterface", "IExtendsPrivateInterface", "IFriendlier", "IFriendlyRandomGenerator", "IInterfaceImplementedByAbstractClass", "IInterfaceThatShouldNotBeADataType", "IInterfaceWithInternal", "IInterfaceWithMethods", "IInterfaceWithOptionalMethodArguments", "IInterfaceWithProperties", "IInterfaceWithPropertiesExtension", "IJSII417Derived", "IJSII417PublicBaseOfBase", "IMutableObjectLiteral", "INonInternalInterface", "IPrivatelyImplemented", "IPublicInterface", "IPublicInterface2", "IRandomNumberGenerator", "IReturnsNumber", "ImplementInternalInterface", "ImplementsInterfaceWithInternal", "ImplementsInterfaceWithInternalSubclass", "ImplementsPrivateInterface", "ImplictBaseOfBase", "InbetweenClass", "InterfaceInNamespaceIncludesClasses", "InterfaceInNamespaceOnlyInterface", "JSII417Derived", "JSII417PublicBaseOfBase", "JSObjectLiteralForInterface", "JSObjectLiteralToNative", "JSObjectLiteralToNativeClass", "JavaReservedWords", "JsiiAgent", "LoadBalancedFargateServiceProps", "Multiply", "Negate", "NodeStandardLibrary", "NullShouldBeTreatedAsUndefined", "NullShouldBeTreatedAsUndefinedData", "NumberGenerator", "ObjectRefsInCollections", "Old", "OptionalConstructorArgument", "OptionalStruct", "OptionalStructConsumer", "OverrideReturnsObject", "PartiallyInitializedThisConsumer", "Polymorphism", "Power", "PublicClass", "PythonReservedWords", "ReferenceEnumFromScopedPackage", "ReturnsPrivateImplementationOfInterface", "RuntimeTypeChecking", "SingleInstanceTwoTypes", "Statics", "StringEnum", "StripInternal", "Sum", "SyncVirtualMethods", "Thrower", "UnaryOperation", "UnionProperties", "UseBundledDependency", "UseCalcBase", "UsesInterfaceWithProperties", "VariadicMethod", "VirtualMethodPlayground", "__jsii_assembly__", "composition"] publication.publish() diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/sphinx/jsii-calc.rst b/packages/jsii-pacmak/test/expected.jsii-calc/sphinx/jsii-calc.rst index 2654e12ce3..aac0802564 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/sphinx/jsii-calc.rst +++ b/packages/jsii-pacmak/test/expected.jsii-calc/sphinx/jsii-calc.rst @@ -1107,6 +1107,8 @@ ClassThatImplementsTheInternalInterface .. py:attribute:: b + *Implements* :py:meth:`jsii-calc.INonInternalInterface.b` + :type: string @@ -1160,6 +1162,8 @@ ClassThatImplementsThePrivateInterface .. py:attribute:: b + *Implements* :py:meth:`jsii-calc.INonInternalInterface.b` + :type: string @@ -2041,38 +2045,9 @@ ExtendsInternalInterface (interface) :type: boolean *(readonly)* -ExtendsPrivateInterface (interface) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. py:class:: ExtendsPrivateInterface - - **Language-specific names:** - - .. tabs:: - - .. code-tab:: c# - - using Amazon.JSII.Tests.CalculatorNamespace; - - .. code-tab:: java - - import software.amazon.jsii.tests.calculator.ExtendsPrivateInterface; - - .. code-tab:: javascript - - // ExtendsPrivateInterface is an interface - - .. code-tab:: typescript - - import { ExtendsPrivateInterface } from 'jsii-calc'; - - - - - - .. py:attribute:: moreThings + .. py:attribute:: prop - :type: string[] *(readonly)* + :type: string *(readonly)* GiveMeStructs @@ -2253,6 +2228,45 @@ IAnotherPublicInterface (interface) :type: string +IExtendsPrivateInterface (interface) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. py:class:: IExtendsPrivateInterface + + **Language-specific names:** + + .. tabs:: + + .. code-tab:: c# + + using Amazon.JSII.Tests.CalculatorNamespace; + + .. code-tab:: java + + import software.amazon.jsii.tests.calculator.IExtendsPrivateInterface; + + .. code-tab:: javascript + + // IExtendsPrivateInterface is an interface + + .. code-tab:: typescript + + import { IExtendsPrivateInterface } from 'jsii-calc'; + + + + + + .. py:attribute:: moreThings + + :type: string[] *(readonly)* + + + .. py:attribute:: private + + :type: string + + IFriendlier (interface) ^^^^^^^^^^^^^^^^^^^^^^^ @@ -2670,6 +2684,104 @@ IInterfaceWithPropertiesExtension (interface) :type: string +IJSII417Derived (interface) +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. py:class:: IJSII417Derived + + **Language-specific names:** + + .. tabs:: + + .. code-tab:: c# + + using Amazon.JSII.Tests.CalculatorNamespace; + + .. code-tab:: java + + import software.amazon.jsii.tests.calculator.IJSII417Derived; + + .. code-tab:: javascript + + // IJSII417Derived is an interface + + .. code-tab:: typescript + + import { IJSII417Derived } from 'jsii-calc'; + + + + :extends: :py:class:`~jsii-calc.IJSII417PublicBaseOfBase`\ + + + .. py:attribute:: property + + :type: string *(readonly)* + + + .. py:method:: bar() + + :abstract: Yes + + + .. py:method:: baz() + + :abstract: Yes + + + .. py:method:: foo() + + *Inherited from* :py:meth:`jsii-calc.IJSII417PublicBaseOfBase ` + + :abstract: Yes + + + .. py:attribute:: hasRoot + + *Inherited from* :py:attr:`jsii-calc.IJSII417PublicBaseOfBase ` + + :type: boolean *(readonly)* + + +IJSII417PublicBaseOfBase (interface) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. py:class:: IJSII417PublicBaseOfBase + + **Language-specific names:** + + .. tabs:: + + .. code-tab:: c# + + using Amazon.JSII.Tests.CalculatorNamespace; + + .. code-tab:: java + + import software.amazon.jsii.tests.calculator.IJSII417PublicBaseOfBase; + + .. code-tab:: javascript + + // IJSII417PublicBaseOfBase is an interface + + .. code-tab:: typescript + + import { IJSII417PublicBaseOfBase } from 'jsii-calc'; + + + + + + .. py:attribute:: hasRoot + + :type: boolean *(readonly)* + + + .. py:method:: foo() + + :abstract: Yes + + IMutableObjectLiteral (interface) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -2734,6 +2846,11 @@ INonInternalInterface (interface) :extends: :py:class:`~jsii-calc.IAnotherPublicInterface`\ + .. py:attribute:: b + + :type: string + + .. py:attribute:: c :type: string diff --git a/packages/jsii-reflect/test/jsii-tree.test.all.expected.txt b/packages/jsii-reflect/test/jsii-tree.test.all.expected.txt index af0f6df45d..dea9290bcb 100644 --- a/packages/jsii-reflect/test/jsii-tree.test.all.expected.txt +++ b/packages/jsii-reflect/test/jsii-tree.test.all.expected.txt @@ -1284,16 +1284,14 @@ assemblies │ │ └── type: string? │ ├─┬ interface ExtendsInternalInterface │ │ └─┬ members - │ │ └─┬ boom property - │ │ ├── abstract - │ │ ├── immutable - │ │ └── type: boolean - │ ├─┬ interface ExtendsPrivateInterface - │ │ └─┬ members - │ │ └─┬ moreThings property + │ │ ├─┬ boom property + │ │ │ ├── abstract + │ │ │ ├── immutable + │ │ │ └── type: boolean + │ │ └─┬ prop property │ │ ├── abstract │ │ ├── immutable - │ │ └── type: Array + │ │ └── type: string │ ├─┬ interface Greetee │ │ └─┬ members │ │ └─┬ name property @@ -1305,6 +1303,15 @@ assemblies │ │ └─┬ a property │ │ ├── abstract │ │ └── type: string + │ ├─┬ interface IExtendsPrivateInterface + │ │ └─┬ members + │ │ ├─┬ moreThings property + │ │ │ ├── abstract + │ │ │ ├── immutable + │ │ │ └── type: Array + │ │ └─┬ private property + │ │ ├── abstract + │ │ └── type: string │ ├─┬ interface IFriendlier │ │ ├─┬ interfaces │ │ │ └── IFriendly @@ -1374,6 +1381,29 @@ assemblies │ │ └─┬ foo property │ │ ├── abstract │ │ └── type: number + │ ├─┬ interface IJSII417Derived + │ │ ├─┬ interfaces + │ │ │ └── IJSII417PublicBaseOfBase + │ │ └─┬ members + │ │ ├─┬ bar() method + │ │ │ ├── abstract + │ │ │ └── returns: void + │ │ ├─┬ baz() method + │ │ │ ├── abstract + │ │ │ └── returns: void + │ │ └─┬ property property + │ │ ├── abstract + │ │ ├── immutable + │ │ └── type: string + │ ├─┬ interface IJSII417PublicBaseOfBase + │ │ └─┬ members + │ │ ├─┬ foo() method + │ │ │ ├── abstract + │ │ │ └── returns: void + │ │ └─┬ hasRoot property + │ │ ├── abstract + │ │ ├── immutable + │ │ └── type: boolean │ ├─┬ interface IMutableObjectLiteral │ │ └─┬ members │ │ └─┬ value property @@ -1383,6 +1413,9 @@ assemblies │ │ ├─┬ interfaces │ │ │ └── IAnotherPublicInterface │ │ └─┬ members + │ │ ├─┬ b property + │ │ │ ├── abstract + │ │ │ └── type: string │ │ └─┬ c property │ │ ├── abstract │ │ └── type: string diff --git a/packages/jsii-reflect/test/jsii-tree.test.inheritance.expected.txt b/packages/jsii-reflect/test/jsii-tree.test.inheritance.expected.txt index 7314fd81f9..44fef32619 100644 --- a/packages/jsii-reflect/test/jsii-tree.test.inheritance.expected.txt +++ b/packages/jsii-reflect/test/jsii-tree.test.inheritance.expected.txt @@ -104,9 +104,9 @@ assemblies │ │ └── MyFirstStruct │ ├── interface EraseUndefinedHashValuesOptions │ ├── interface ExtendsInternalInterface - │ ├── interface ExtendsPrivateInterface │ ├── interface Greetee │ ├── interface IAnotherPublicInterface + │ ├── interface IExtendsPrivateInterface │ ├─┬ interface IFriendlier │ │ └─┬ interfaces │ │ └── IFriendly @@ -125,6 +125,10 @@ assemblies │ ├─┬ interface IInterfaceWithPropertiesExtension │ │ └─┬ interfaces │ │ └── IInterfaceWithProperties + │ ├─┬ interface IJSII417Derived + │ │ └─┬ interfaces + │ │ └── IJSII417PublicBaseOfBase + │ ├── interface IJSII417PublicBaseOfBase │ ├── interface IMutableObjectLiteral │ ├─┬ interface INonInternalInterface │ │ └─┬ interfaces diff --git a/packages/jsii-reflect/test/jsii-tree.test.members.expected.txt b/packages/jsii-reflect/test/jsii-tree.test.members.expected.txt index 760adca226..230b56b875 100644 --- a/packages/jsii-reflect/test/jsii-tree.test.members.expected.txt +++ b/packages/jsii-reflect/test/jsii-tree.test.members.expected.txt @@ -532,16 +532,18 @@ assemblies │ │ └── option2 property │ ├─┬ interface ExtendsInternalInterface │ │ └─┬ members - │ │ └── boom property - │ ├─┬ interface ExtendsPrivateInterface - │ │ └─┬ members - │ │ └── moreThings property + │ │ ├── boom property + │ │ └── prop property │ ├─┬ interface Greetee │ │ └─┬ members │ │ └── name property │ ├─┬ interface IAnotherPublicInterface │ │ └─┬ members │ │ └── a property + │ ├─┬ interface IExtendsPrivateInterface + │ │ └─┬ members + │ │ ├── moreThings property + │ │ └── private property │ ├─┬ interface IFriendlier │ │ └─┬ members │ │ ├── farewell() method @@ -571,11 +573,21 @@ assemblies │ ├─┬ interface IInterfaceWithPropertiesExtension │ │ └─┬ members │ │ └── foo property + │ ├─┬ interface IJSII417Derived + │ │ └─┬ members + │ │ ├── bar() method + │ │ ├── baz() method + │ │ └── property property + │ ├─┬ interface IJSII417PublicBaseOfBase + │ │ └─┬ members + │ │ ├── foo() method + │ │ └── hasRoot property │ ├─┬ interface IMutableObjectLiteral │ │ └─┬ members │ │ └── value property │ ├─┬ interface INonInternalInterface │ │ └─┬ members + │ │ ├── b property │ │ └── c property │ ├─┬ interface IPrivatelyImplemented │ │ └─┬ members diff --git a/packages/jsii-reflect/test/jsii-tree.test.types.expected.txt b/packages/jsii-reflect/test/jsii-tree.test.types.expected.txt index 6c70eb5d4e..9064401cf4 100644 --- a/packages/jsii-reflect/test/jsii-tree.test.types.expected.txt +++ b/packages/jsii-reflect/test/jsii-tree.test.types.expected.txt @@ -78,9 +78,9 @@ assemblies │ ├── interface DerivedStruct │ ├── interface EraseUndefinedHashValuesOptions │ ├── interface ExtendsInternalInterface - │ ├── interface ExtendsPrivateInterface │ ├── interface Greetee │ ├── interface IAnotherPublicInterface + │ ├── interface IExtendsPrivateInterface │ ├── interface IFriendlier │ ├── interface IFriendlyRandomGenerator │ ├── interface IInterfaceImplementedByAbstractClass @@ -90,6 +90,8 @@ assemblies │ ├── interface IInterfaceWithOptionalMethodArguments │ ├── interface IInterfaceWithProperties │ ├── interface IInterfaceWithPropertiesExtension + │ ├── interface IJSII417Derived + │ ├── interface IJSII417PublicBaseOfBase │ ├── interface IMutableObjectLiteral │ ├── interface INonInternalInterface │ ├── interface IPrivatelyImplemented diff --git a/packages/jsii/lib/assembler.ts b/packages/jsii/lib/assembler.ts index ed951f5a80..206d709ace 100644 --- a/packages/jsii/lib/assembler.ts +++ b/packages/jsii/lib/assembler.ts @@ -346,8 +346,9 @@ export class Assembler implements Emitter { } private async _processBaseInterfaces(fqn: string, baseTypes?: ts.Type[]) { + const erasedBases = new Array(); if (!baseTypes) { - return undefined; + return { erasedBases }; } const result = new Array(); @@ -358,11 +359,11 @@ export class Assembler implements Emitter { // base is private/internal, so we continue recursively with it's own bases if (this._isPrivateOrInternal(iface.symbol)) { + erasedBases.push(iface); const bases = iface.getBaseTypes(); if (bases) { processBaseTypes(bases); } - continue; } @@ -394,7 +395,7 @@ export class Assembler implements Emitter { result.push(typeRef); } - return result.length === 0 ? undefined : result; + return { interfaces: result.length === 0 ? undefined : result, erasedBases }; } private async _visitClass(type: ts.Type, namespace: string[]): Promise { @@ -469,7 +470,8 @@ export class Assembler implements Emitter { continue; } - jsiiType.interfaces = await this._processBaseInterfaces(fqn, clause.types.map(t => this._typeChecker.getTypeFromTypeNode(t))); + const { interfaces } = await this._processBaseInterfaces(fqn, clause.types.map(t => this._typeChecker.getTypeFromTypeNode(t))); + jsiiType.interfaces = interfaces; if (jsiiType.interfaces) { this._deferUntilTypesAvailable(jsiiType.fqn, jsiiType.interfaces, type.symbol.valueDeclaration, (...ifaces) => { for (const iface of ifaces) { @@ -687,25 +689,28 @@ export class Assembler implements Emitter { docs: this._visitDocumentation(type.symbol), }; - jsiiType.interfaces = await this._processBaseInterfaces(fqn, type.getBaseTypes()); + const { interfaces, erasedBases } = await this._processBaseInterfaces(fqn, type.getBaseTypes()); + jsiiType.interfaces = interfaces; - for (const member of type.getProperties()) { - if (!(type.symbol.getDeclarations() || []).find(decl => decl === member.valueDeclaration.parent)) { continue; } + for (const declaringType of [type, ...erasedBases]) { + for (const member of declaringType.getProperties()) { + if (!(declaringType.symbol.getDeclarations() || []).find(decl => decl === member.valueDeclaration.parent)) { continue; } - if (this._isPrivateOrInternal(member, member.valueDeclaration)) { - continue; - } + if (this._isPrivateOrInternal(member, member.valueDeclaration)) { + continue; + } - if (ts.isMethodDeclaration(member.valueDeclaration) || ts.isMethodSignature(member.valueDeclaration)) { - await this._visitMethod(member, jsiiType); - } else if (ts.isPropertyDeclaration(member.valueDeclaration) - || ts.isPropertySignature(member.valueDeclaration) - || ts.isAccessor(member.valueDeclaration)) { - await this._visitProperty(member, jsiiType); - } else { - this._diagnostic(member.valueDeclaration, - ts.DiagnosticCategory.Warning, - `Ignoring un-handled ${ts.SyntaxKind[member.valueDeclaration.kind]} member`); + if (ts.isMethodDeclaration(member.valueDeclaration) || ts.isMethodSignature(member.valueDeclaration)) { + await this._visitMethod(member, jsiiType); + } else if (ts.isPropertyDeclaration(member.valueDeclaration) + || ts.isPropertySignature(member.valueDeclaration) + || ts.isAccessor(member.valueDeclaration)) { + await this._visitProperty(member, jsiiType); + } else { + this._diagnostic(member.valueDeclaration, + ts.DiagnosticCategory.Warning, + `Ignoring un-handled ${ts.SyntaxKind[member.valueDeclaration.kind]} member`); + } } }