diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f01d30d3a9..e7df1a3ff7 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -43,3 +43,8 @@ updates: labels: - dependencies - language/python + + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: daily diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.yml index 1715ec10dd..319b3c41b3 100644 --- a/.github/workflows/dependabot.yml +++ b/.github/workflows/dependabot.yml @@ -16,6 +16,6 @@ jobs: if: github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'dependabot-preview[bot]' runs-on: ubuntu-latest steps: - - uses: hmarr/auto-approve-action@7782c7e2bdf62b4d79bdcded8332808fd2f179cd + - uses: hmarr/auto-approve-action@v2.0.0 with: github-token: "${{ secrets.AUTO_APPROVE_GITHUB_TOKEN }}" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 36ce31b860..dae563c3c2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -374,21 +374,54 @@ jobs: run: |- npm install --no-save ${{ runner.temp }}/js/*.tgz npm install --no-save ${{ runner.temp }}/private/*.tgz --only=prod - - name: Integration Test + + # Setting environment variables for next jobs + echo "::set-env name=JSII::${{ github.workspace }}/node_modules/.bin/jsii" + echo "::set-env name=CDK_BUILD_JSII::${{ github.workspace }}/node_modules/.bin/jsii" + + echo "::set-env name=PACMAK::${{ github.workspace }}/node_modules/.bin/jsii-pacmak" + echo "::set-env name=CDK_PACKAGE_JSII_PACMAK::${{ github.workspace }}/node_modules/.bin/jsii-pacmak" + + echo "::set-env name=ROSETTA::${{ github.workspace }}/node_modules/.bin/jsii-rosetta" + echo "::set-env name=CDK_PACKAGE_JSII_ROSETTA::${{ github.workspace }}/node_modules/.bin/jsii-rosetta" + + - name: Integration Test (build) + run: |- + npx lerna run build --stream 2>&1 > ${{ runner.temp }}/build.log + working-directory: aws-cdk + + # In the interest of speed, only process monocdk-experiment / aws-cdk-lib from now on + - name: Integration Test (jsii-rosetta) run: |- - npx lerna run build - ./pack.sh - env: - CDK_BUILD_JSII: ${{ github.workspace }}/node_modules/.bin/jsii - CDK_PACKAGE_JSII_PACMAK: ${{ github.workspace }}/node_modules/.bin/jsii-pacmak - CDK_PACKAGE_JSII_ROSETTA: ${{ github.workspace }}/node_modules/.bin/jsii-rosetta - # Alternative environment variables: - JSII: ${{ github.workspace }}/node_modules/.bin/jsii - PACMAK: ${{ github.workspace }}/node_modules/.bin/jsii-pacmak - ROSETTA: ${{ github.workspace }}/node_modules/.bin/jsii-rosetta + npx lerna exec --scope=monocdk-experiment --scope=aws-cdk-lib --stream -- \ + ${ROSETTA} \ + --compile \ + --output ./dist/samples.tabl.json \ + --directory . \ + --verbose \ + 2>&1 > ${{ runner.temp }}/rosetta.log working-directory: aws-cdk + - name: Integration Test (jsii-pacmak) + run: |- + npx lerna exec --scope=monocdk-experiment --scope=aws-cdk-lib --stream -- \ + ${PACMAK} \ + --rosetta-tablet ./dist/samples.tabl.json \ + --verbose \ + 2>&1 > ${{ runner.temp }}/pacmak.log + working-directory: aws-cdk + + - name: Upload Logs + # Upload logs whether successful or failed (not using always because we don't care about cancellations) + if: success() || failure() + uses: actions/upload-artifact@v2 + with: + name: integ-test-logs + path: ${{ runner.temp }}/*.log + - name: Upload Result uses: actions/upload-artifact@v2 with: name: integ-test-result - path: ${{ github.workspace }}/aws-cdk/dist/ + path: |- + ${{ github.workspace }}/aws-cdk/dist/ + ${{ github.workspace }}/aws-cdk/**/dist/ diff --git a/.github/workflows/yarn-upgrade.yml b/.github/workflows/yarn-upgrade.yml index d9385658ba..7248c1115a 100644 --- a/.github/workflows/yarn-upgrade.yml +++ b/.github/workflows/yarn-upgrade.yml @@ -49,11 +49,13 @@ jobs: run: |- # Upgrade dependencies at repository root ncu --upgrade --filter=@types/node,@types/fs-extra --semverLevel=major - ncu --upgrade --reject=@types/node,@types/fs-extra + ncu --upgrade --filter=typescript --semverLevel=minor + ncu --upgrade --reject=@types/node,@types/fs-extra,typescript # Upgrade all the packages lerna exec --parallel ncu -- --upgrade --filter=@types/node,@types/fs-extra --semverLevel=major - lerna exec --parallel ncu -- --upgrade --reject='@types/node,@types/fs-extra,${{ steps.list-packages.outputs.list }}' + lerna exec --parallel ncu -- --upgrade --filter=typescript --semverLevel=minor + lerna exec --parallel ncu -- --upgrade --reject='@types/node,@types/fs-extra,typescript,${{ steps.list-packages.outputs.list }}' # This will create a brand new `yarn.lock` file (this is more efficient than `yarn install && yarn upgrade`) - name: Run "yarn install --force" diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e5d2f4101..04a6d2ba38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,23 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [1.12.0](https://github.com/aws/jsii/compare/v1.11.0...v1.12.0) (2020-08-27) + + +### Features + +* **golang:** introduce Golang code generation ([#1551](https://github.com/aws/jsii/issues/1551)) ([2833db4](https://github.com/aws/jsii/commit/2833db48e7f32191aebd81d5eebf97d111406589)), closes [#83](https://github.com/aws/jsii/issues/83) +* **java:** use covariant types for collection elements ([#1884](https://github.com/aws/jsii/issues/1884)) ([be2c7e2](https://github.com/aws/jsii/commit/be2c7e2aceecc1a6cb9f8a97cee90ea35b80f5f5)), closes [#1517](https://github.com/aws/jsii/issues/1517) +* **jsii:** standardized error messages ([#1931](https://github.com/aws/jsii/issues/1931)) ([b146286](https://github.com/aws/jsii/commit/b146286fe66f78a1851228159b48d9bd2c2b6f3b)) + + +### Bug Fixes + +* **java:** module "" not found error ([#1906](https://github.com/aws/jsii/issues/1906)) ([d0b9ffd](https://github.com/aws/jsii/commit/d0b9ffd8797ff5547a89d43134c40b4744d5e852)), closes [#1904](https://github.com/aws/jsii/issues/1904) +* **jsii:** class members named after the class result in illegal C# ([#1903](https://github.com/aws/jsii/issues/1903)) ([bc71154](https://github.com/aws/jsii/commit/bc711541c17019eba3af16ec7efadc6a25287514)), closes [#1931](https://github.com/aws/jsii/issues/1931) [#1880](https://github.com/aws/jsii/issues/1880) +* **kernel:** calling super.property unexpectedly returns `undefined` ([#1932](https://github.com/aws/jsii/issues/1932)) ([3b48778](https://github.com/aws/jsii/commit/3b48778a6554bf009eb461651bc32b8341d3416f)) +* **python:** generate type-checking code ([#1881](https://github.com/aws/jsii/issues/1881)) ([e6d1bc1](https://github.com/aws/jsii/commit/e6d1bc161ed426261f39c5ccadfa80a4020e4ffc)), closes [awslabs/cdk8s#194](https://github.com/awslabs/cdk8s/issues/194) + ## [1.11.0](https://github.com/aws/jsii/compare/v1.10.0...v1.11.0) (2020-08-18) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 66a11a58fd..5be56ea028 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -78,6 +78,7 @@ All packages within this repository have the following scripts: - `watch` - watches for file changes and builds them progressively, usually running `tsc --watch`. - `test` - executes all unit tests for the current package. +- `test:update` - executes all unit tests and overwrites snapshot expectations (those `.snap` files). - `package` - emits publishable artifacts to `dist`. - `lint` - run linter against source - `lint:fix` - lint and auto-correct formatting issues when possible diff --git a/docs/configuration.md b/docs/configuration.md index 3998e199bd..93b3837af0 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -274,6 +274,28 @@ the standard [`nuget push`][nuget-push] command. [nuget-push]: https://docs.microsoft.com/fr-fr/nuget/nuget-org/publish-a-package [.NET documentation]: https://docs.microsoft.com/en-us/dotnet/core/tools/csproj#packageiconurl +#### Configuring `GoLang` - **Experimental** + +The `go` target is currently unstable and not suitable for production use. To +enable go package generation, add the `go` key with an empty object to the jsii +targets configuration. + +This will add generated go package code to your specified `outDir` for testing +and experimentation. + +```js +{ + "jsii": { + "targets": { + "go": {}, + // ... + }, + // ... + }, + // ... +} +``` + ### `tsc` In order to the generated `javascript` can be properly loaded by the `jsii` diff --git a/docs/typescript-restrictions.md b/docs/typescript-restrictions.md index 6c655cd49d..d629bf509f 100644 --- a/docs/typescript-restrictions.md +++ b/docs/typescript-restrictions.md @@ -75,6 +75,65 @@ users in languages with conflicts. [`jsii/lib/reserved-words.ts`]: ../packages/jsii/lib/reserved-words.ts +## Type Members + +### Naming + +Methods and properties declared on *classes* cannot be named after the class ( +meaning they cannot share the same PascalCased representation), as this results +in illegal **C#** code: + +> :memo: Due to existing usage (in such cases, an `_` is appended at the end of +> the **type** name, effectively breaking existing .NET code if such a member +> is introduced post-release), this restriction is only enforced when `jsii` is +> invoked with the `--strict` parameter. +> +> It will be upgraded to *always* be an error in a future release. + +```ts +export class Name { + // ⛔️ Illegal property name + public name: string; +} + +export class Name { + // ⛔️ Illegal method name + public name(): void { /* ... */ } +} +``` + +### Overriding + +The visibility of a type member cannot be changed when it is overridden, even if +the change increases the visibility of said member, as this would result in +illegal **C#** code: + +```ts +export class Base { + protected method(): void { /* ... */ } +} + +export class Child { + // ⛔️ Illegal change of visibility when overriding a member + public method(): void { /* ... */ } +} +``` + +Additionally, **C#** does not allow changing the type signature of members while +overriding them, even if the updated type signature is a strict specialization +of the original one, and this is consequently also forbidden in `jsii`: + +```ts +export class Base { + public method(): any { /* ... */ } +} + +export class Child { + // ⛔️ Illegal change of signature when overriding a member + public method(): string { /* ... */ } +} +``` + ## Behavioral Interfaces & Structs `jsii` considers **TypeScript** interfaces in two distinct categories: *Structs* diff --git a/lerna.json b/lerna.json index fdd36f877b..ecfee97117 100644 --- a/lerna.json +++ b/lerna.json @@ -10,5 +10,5 @@ "rejectCycles": true } }, - "version": "1.11.0" + "version": "1.12.0" } diff --git a/logo/social-preview.png b/logo/social-preview.png index e0de25175b..e6cd05ec1e 100644 Binary files a/logo/social-preview.png and b/logo/social-preview.png differ diff --git a/package.json b/package.json index f5b7baee1d..86e8b31f8b 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,8 @@ "test:update": "lerna run test:update --concurrency=1 --stream" }, "devDependencies": { - "@typescript-eslint/eslint-plugin": "^3.9.0", - "@typescript-eslint/parser": "^3.9.0", + "@typescript-eslint/eslint-plugin": "^3.10.0", + "@typescript-eslint/parser": "^3.10.1", "eslint": "^7.7.0", "eslint-config-prettier": "^6.11.0", "eslint-import-resolver-node": "^0.3.4", @@ -24,7 +24,7 @@ "eslint-plugin-import": "^2.22.0", "eslint-plugin-prettier": "^3.1.4", "lerna": "^3.22.1", - "prettier": "^2.0.5", + "prettier": "^2.1.0", "standard-version": "^9.0.0", "typescript": "~3.9.7" }, diff --git a/packages/@jsii/Directory.Build.targets b/packages/@jsii/Directory.Build.targets index 69bd640d11..d4a420483a 100644 --- a/packages/@jsii/Directory.Build.targets +++ b/packages/@jsii/Directory.Build.targets @@ -11,7 +11,7 @@ - + diff --git a/packages/@jsii/dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/ComplianceTests.cs b/packages/@jsii/dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/ComplianceTests.cs index 4cf03e3e80..a100ce6a4e 100644 --- a/packages/@jsii/dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/ComplianceTests.cs +++ b/packages/@jsii/dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/ComplianceTests.cs @@ -5,6 +5,7 @@ using Amazon.JSII.Tests.CalculatorNamespace; using CompositeOperation = Amazon.JSII.Tests.CalculatorNamespace.Composition.CompositeOperation; using Amazon.JSII.Tests.CalculatorNamespace.LibNamespace; +using Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace; using Newtonsoft.Json.Linq; using Xunit; using Xunit.Abstractions; @@ -28,9 +29,6 @@ public RuntimeException(string message) } } - // DateTime.UnixEpoch was added in .NET Core 2.1, but our build container only supports 2.0. - static readonly DateTime UnixEpoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); - const string Prefix = nameof(IntegrationTests) + ".Compliance."; private readonly IDisposable _serviceContainerFixture; @@ -46,6 +44,14 @@ void IDisposable.Dispose() _serviceContainerFixture.Dispose(); } + [Fact(DisplayName = Prefix + nameof(UseNestedStruct))] + public void UseNestedStruct() + { + StaticConsumer.Consume( + new Amazon.JSII.Tests.CustomSubmoduleName.NestingClass.NestedStruct { Name = "Bond, James Bond" } + ); + } + [Fact(DisplayName = Prefix + nameof(PrimitiveTypes))] public void PrimitiveTypes() { @@ -64,8 +70,8 @@ public void PrimitiveTypes() Assert.Equal(1234d, types.NumberProperty); // date - types.DateProperty = UnixEpoch.AddMilliseconds(123); - Assert.Equal(UnixEpoch.AddMilliseconds(123), types.DateProperty); + types.DateProperty = DateTime.UnixEpoch.AddMilliseconds(123); + Assert.Equal(DateTime.UnixEpoch.AddMilliseconds(123), types.DateProperty); // json types.JsonProperty = JObject.Parse(@"{ ""Foo"": { ""Bar"": 123 } }"); @@ -78,12 +84,12 @@ public void Dates() var types = new AllTypes(); // strong type - types.DateProperty = UnixEpoch.AddMilliseconds(123); - Assert.Equal(UnixEpoch.AddMilliseconds(123), types.DateProperty); + types.DateProperty = DateTime.UnixEpoch.AddMilliseconds(123); + Assert.Equal(DateTime.UnixEpoch.AddMilliseconds(123), types.DateProperty); // weak type - types.AnyProperty = UnixEpoch.AddSeconds(999); - Assert.Equal(UnixEpoch.AddSeconds(999), types.AnyProperty); + types.AnyProperty = DateTime.UnixEpoch.AddSeconds(999); + Assert.Equal(DateTime.UnixEpoch.AddSeconds(999), types.AnyProperty); } [Fact(DisplayName = Prefix + nameof(CollectionTypes))] @@ -133,8 +139,8 @@ public void DynamicTypes() Assert.Equal(12d, types.AnyProperty); // date - types.AnyProperty = UnixEpoch.AddSeconds(1234); - Assert.Equal(UnixEpoch.AddSeconds(1234), types.AnyProperty); + types.AnyProperty = DateTime.UnixEpoch.AddSeconds(1234); + Assert.Equal(DateTime.UnixEpoch.AddSeconds(1234), types.AnyProperty); // json (notice that when deserialized, it is deserialized as a map). types.AnyProperty = new Dictionary @@ -318,7 +324,7 @@ public void Arrays() { var sum = new Sum { - Parts = new Value_[] {new Number(5), new Number(10), new Multiply(new Number(2), new Number(3))} + Parts = new NumericValue[] {new Number(5), new Number(10), new Multiply(new Number(2), new Number(3))} }; Assert.Equal(10d + 5d + 2d * 3d, sum.Value); Assert.Equal(5d, sum.Parts[0].Value); @@ -582,13 +588,6 @@ public void PropertyOverrides_Interfaces() Assert.Equal("Hello!?", interact.WriteAndRead("Hello")); } - [Fact(DisplayName = Prefix + nameof(InterfaceBuilder), Skip = "There is no fluent API for C#")] - public void InterfaceBuilder() - { - throw new NotImplementedException(); - } - - [Fact(DisplayName = Prefix + nameof(SyncOverrides_SyncOverrides))] public void SyncOverrides_SyncOverrides() { @@ -737,18 +736,6 @@ public void TestInterfaceParameter() Assert.Equal("I am literally friendly! Let me buy you a drink!", betterGreeting); } - [Fact(DisplayName = Prefix + nameof(Structs_StepBuilders), Skip = "There is no fluent API for C#")] - public void Structs_StepBuilders() - { - throw new NotImplementedException(); - } - - [Fact(DisplayName = Prefix + nameof(Structs_BuildersContainNullChecks), Skip = "There is no fluent API for C#")] - public void Structs_BuildersContainNullChecks() - { - throw new NotImplementedException(); - } - [Fact(DisplayName = Prefix + nameof(Structs_SerializeToJsii))] public void Structs_SerializeToJsii() { @@ -935,10 +922,10 @@ public void OptionalAndVariadicArgumentsTest() variadicClassNoParams.AsArray(double.MinValue, list.ToArray()); } - [Fact(DisplayName = Prefix + nameof(JsiiAgent))] - public void JsiiAgent() + [Fact(DisplayName = Prefix + nameof(JsiiAgentIsCorrect))] + public void JsiiAgentIsCorrect() { - Assert.Equal("DotNet/" + Environment.Version + "/.NETCoreApp,Version=v3.1/1.0.0.0", JsiiAgent_.JsiiAgent); + Assert.Equal("DotNet/" + Environment.Version + "/.NETCoreApp,Version=v3.1/1.0.0.0", JsiiAgent.Value); } [Fact(DisplayName = Prefix + nameof(ReceiveInstanceOfPrivateClass))] @@ -971,7 +958,7 @@ public void EraseUnsetDataValues() Assert.Equal(new Dictionary { [ "prop1"] = "value1" }, EraseUndefinedHashValues.Prop2IsUndefined()); } - [Fact(DisplayName = Prefix + nameof(ObjectIdDoesNotGetReallocatedWhenTheConstructorPassesThisOut), Skip = "Currently broken")] + [Fact(DisplayName = Prefix + nameof(ObjectIdDoesNotGetReallocatedWhenTheConstructorPassesThisOut))] public void ObjectIdDoesNotGetReallocatedWhenTheConstructorPassesThisOut() { var reflector = new PartiallyInitializedThisConsumerImpl(); @@ -1116,7 +1103,7 @@ class PartiallyInitializedThisConsumerImpl : PartiallyInitializedThisConsumer public override String ConsumePartiallyInitializedThis(ConstructorPassesThisOut obj, DateTime dt, AllTypesEnum ev) { Assert.NotNull(obj); - Assert.Equal(new DateTime(0), dt); + Assert.Equal(DateTime.UnixEpoch, dt); Assert.Equal(AllTypesEnum.THIS_IS_GREAT, ev); return "OK"; diff --git a/packages/@jsii/dotnet-runtime/package.json b/packages/@jsii/dotnet-runtime/package.json index 330caa5122..0090144357 100644 --- a/packages/@jsii/dotnet-runtime/package.json +++ b/packages/@jsii/dotnet-runtime/package.json @@ -40,7 +40,7 @@ "devDependencies": { "@jsii/runtime": "^0.0.0", "@types/node": "^10.17.28", - "@types/semver": "^7.3.2", + "@types/semver": "^7.3.3", "jsii-build-tools": "^0.0.0", "semver": "^7.3.2", "typescript": "~3.9.7" diff --git a/packages/@jsii/integ-test/package.json b/packages/@jsii/integ-test/package.json index bf301197e7..a84b009674 100644 --- a/packages/@jsii/integ-test/package.json +++ b/packages/@jsii/integ-test/package.json @@ -20,7 +20,7 @@ "@octokit/rest": "^18.0.3", "dotenv": "^8.2.0", "fs-extra": "^9.0.1", - "jest": "^26.4.0", + "jest": "^26.4.2", "jsii": "^0.0.0", "jsii-pacmak": "^0.0.0", "jsii-rosetta": "^0.0.0", @@ -33,7 +33,7 @@ "@types/node": "^10.17.28", "@types/tar": "^4.0.3", "eslint": "^7.7.0", - "prettier": "^2.0.5", + "prettier": "^2.1.0", "typescript": "~3.9.7" }, "jest": { diff --git a/packages/@jsii/java-runtime-test/pom.xml.t.js b/packages/@jsii/java-runtime-test/pom.xml.t.js index 080d8e8c91..6548b283de 100644 --- a/packages/@jsii/java-runtime-test/pom.xml.t.js +++ b/packages/@jsii/java-runtime-test/pom.xml.t.js @@ -29,7 +29,7 @@ process.stdout.write(` org.junit.jupiter junit-jupiter-engine - 5.6.1 + [5.6.2,6) test @@ -83,6 +83,12 @@ process.stdout.write(` false + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M5 + diff --git a/packages/@jsii/java-runtime-test/project/src/test/java/software/amazon/jsii/ComplianceSuiteHarness.java b/packages/@jsii/java-runtime-test/project/src/test/java/software/amazon/jsii/ComplianceSuiteHarness.java index 4d6bd733ee..2a728d7791 100644 --- a/packages/@jsii/java-runtime-test/project/src/test/java/software/amazon/jsii/ComplianceSuiteHarness.java +++ b/packages/@jsii/java-runtime-test/project/src/test/java/software/amazon/jsii/ComplianceSuiteHarness.java @@ -28,7 +28,6 @@ public void beforeEach(final ExtensionContext extensionContext) throws Exception final String prefix = type == MessageInspector.MessageType.Request ? "<" : ">"; try { trace.add(String.format("%s %s%n", prefix, objectMapper.writeValueAsString(message))); - System.err.printf("%s %s%n", prefix, objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(message)); } catch (final IOException e) { throw new UncheckedIOException(e); } diff --git a/packages/@jsii/java-runtime-test/project/src/test/java/software/amazon/jsii/ReloadingClassLoader.java b/packages/@jsii/java-runtime-test/project/src/test/java/software/amazon/jsii/ReloadingClassLoader.java index 70e30fea4b..1e22d1061d 100644 --- a/packages/@jsii/java-runtime-test/project/src/test/java/software/amazon/jsii/ReloadingClassLoader.java +++ b/packages/@jsii/java-runtime-test/project/src/test/java/software/amazon/jsii/ReloadingClassLoader.java @@ -1,5 +1,8 @@ package software.amazon.jsii; +import java.io.File; +import java.lang.management.ManagementFactory; +import java.net.MalformedURLException; import java.net.URL; import java.net.URLClassLoader; import java.security.AccessController; @@ -58,7 +61,7 @@ private static String binaryNameOf(final Class clazz) { private ReloadingClassLoader(final ClassLoader parent, final Class ...toReload) { super( Stream.of(toReload) - .flatMap(clazz -> Stream.of(((URLClassLoader) clazz.getClassLoader()).getURLs())) + .flatMap(clazz -> urlsFromClassLoader(clazz.getClassLoader())) .toArray(URL[]::new), parent ); @@ -78,4 +81,24 @@ protected Class loadClass(String name, boolean resolve) throws ClassNotFoundE } return result; } + + private static Stream urlsFromClassLoader(final ClassLoader classLoader) { + if (classLoader instanceof URLClassLoader) { + return Stream.of(((URLClassLoader)classLoader).getURLs()); + } + // In java >= 9, class loaders may not always be URLClassLoaders, so we need this: + return Stream + .of(ManagementFactory.getRuntimeMXBean() + .getClassPath() + .split(File.pathSeparator)) + .map(ReloadingClassLoader::toURL); + } + + private static URL toURL(final String classPathEntry) { + try { + return new File(classPathEntry).toURI().toURL(); + } catch (final MalformedURLException ex) { + throw new IllegalArgumentException("URL could not be obtained from " + classPathEntry, ex); + } + } } diff --git a/packages/@jsii/java-runtime-test/project/src/test/java/software/amazon/jsii/testing/ComplianceTest.java b/packages/@jsii/java-runtime-test/project/src/test/java/software/amazon/jsii/testing/ComplianceTest.java index a77ee63af0..bdcd792368 100644 --- a/packages/@jsii/java-runtime-test/project/src/test/java/software/amazon/jsii/testing/ComplianceTest.java +++ b/packages/@jsii/java-runtime-test/project/src/test/java/software/amazon/jsii/testing/ComplianceTest.java @@ -10,13 +10,15 @@ import software.amazon.jsii.JsiiException; import software.amazon.jsii.ReloadingClassLoader; import software.amazon.jsii.tests.calculator.*; +import software.amazon.jsii.tests.calculator.baseofbase.StaticConsumer; import software.amazon.jsii.tests.calculator.composition.CompositeOperation; +import software.amazon.jsii.tests.calculator.custom_submodule_name.NestingClass.NestedStruct; import software.amazon.jsii.tests.calculator.lib.EnumFromScopedModule; import software.amazon.jsii.tests.calculator.lib.IFriendly; import software.amazon.jsii.tests.calculator.lib.MyFirstStruct; import software.amazon.jsii.tests.calculator.lib.Number; +import software.amazon.jsii.tests.calculator.lib.NumericValue; import software.amazon.jsii.tests.calculator.lib.StructWithOnlyOptionals; -import software.amazon.jsii.tests.calculator.lib.Value; import software.amazon.jsii.tests.calculator.submodule.child.OuterClass; import java.io.IOException; @@ -41,6 +43,15 @@ @SuppressWarnings("deprecated") @ExtendWith(ComplianceSuiteHarness.class) public class ComplianceTest { + @Test + public void useNestedStruct() { + StaticConsumer.consume( + new NestedStruct.Builder() + .name("Bond, James Bond") + .build() + ); + } + /** * Verify that we can marshal and unmarshal objects without type information. */ @@ -205,7 +216,7 @@ public void callMethods() { public void unmarshallIntoAbstractType() { Calculator calc = new Calculator(); calc.add(120); - Value value = calc.getCurr(); + NumericValue value = calc.getCurr(); assertEquals(120, value.getValue()); } @@ -1195,7 +1206,7 @@ public void nullShouldBeTreatedAsUndefined() { @Test public void testJsiiAgent() { - assertEquals("Java/" + System.getProperty("java.version"), JsiiAgent.getJsiiAgent()); + assertEquals("Java/" + System.getProperty("java.version"), JsiiAgent.getValue()); } /** diff --git a/packages/@jsii/java-runtime-test/project/src/test/java/software/amazon/jsii/testing/JsiiClientTest.java b/packages/@jsii/java-runtime-test/project/src/test/java/software/amazon/jsii/testing/JsiiClientTest.java index 8c65bafeff..cecf0af514 100644 --- a/packages/@jsii/java-runtime-test/project/src/test/java/software/amazon/jsii/testing/JsiiClientTest.java +++ b/packages/@jsii/java-runtime-test/project/src/test/java/software/amazon/jsii/testing/JsiiClientTest.java @@ -36,6 +36,7 @@ public void setUp() { jsiiRuntime = new JsiiRuntime(); this.client = jsiiRuntime.getClient(); + this.client.loadModule(new software.amazon.jsii.tests.calculator.baseofbase.$Module()); this.client.loadModule(new software.amazon.jsii.tests.calculator.base.$Module()); this.client.loadModule(new software.amazon.jsii.tests.calculator.lib.$Module()); this.client.loadModule(new software.amazon.jsii.tests.calculator.$Module()); diff --git a/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/JsiiObjectMapper.java b/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/JsiiObjectMapper.java index 3e634eb124..16dfba81b9 100644 --- a/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/JsiiObjectMapper.java +++ b/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/JsiiObjectMapper.java @@ -201,11 +201,19 @@ public JsonDeserializer modifyMapLikeDeserializer(DeserializationConfig confi * Serializer for classes that extend JsiiObject and any other class that implements a jsii interface. * We use the JsiiSerializable interface as a way to identify "anything jsii-able". */ - private static final class JsiiSerializer extends JsonSerializer { + private final class JsiiSerializer extends JsonSerializer { @Override public void serialize(final JsiiSerializable o, final JsonGenerator jsonGenerator, final SerializerProvider serializerProvider) throws IOException { + // First, ensure the relevant interfaces' modules have been loaded (in case "o" is a struct instance) + for (final Class iface : o.getClass().getInterfaces()) { + final Jsii jsii = JsiiEngine.tryGetJsiiAnnotation(iface, true); + if (jsii != null) { + getEngine().loadModule(jsii.module()); + } + } + // Then dump the JSON out jsonGenerator.writeTree(o.$jsii$toJson()); } } diff --git a/packages/@jsii/kernel/lib/kernel.ts b/packages/@jsii/kernel/lib/kernel.ts index 0c658bf5b2..cc42ddedfb 100644 --- a/packages/@jsii/kernel/lib/kernel.ts +++ b/packages/@jsii/kernel/lib/kernel.ts @@ -612,8 +612,8 @@ export class Kernel { // save the old property under $jsii$super$$ so that property overrides // can still access it via `super.`. - const prev = Object.getOwnPropertyDescriptor(obj, propertyName) ?? { - value: undefined, + const prev = getPropertyDescriptor(obj, propertyName) ?? { + value: obj[propertyName], writable: true, enumerable: true, configurable: true, @@ -656,6 +656,22 @@ export class Kernel { }); }, }); + + function getPropertyDescriptor( + obj: any, + propertyName: string, + ): PropertyDescriptor | undefined { + const direct = Object.getOwnPropertyDescriptor(obj, propertyName); + if (direct != null) { + return direct; + } + const proto = Object.getPrototypeOf(obj); + if (proto == null && proto !== Object.prototype) { + // We reached Object or the prototype chain root, all hope is lost! + return undefined; + } + return getPropertyDescriptor(proto, propertyName); + } } private _applyMethodOverride( diff --git a/packages/@jsii/kernel/package.json b/packages/@jsii/kernel/package.json index 840cd6547d..ba139da760 100644 --- a/packages/@jsii/kernel/package.json +++ b/packages/@jsii/kernel/package.json @@ -45,11 +45,12 @@ "@types/node": "^10.17.28", "@types/tar": "^4.0.3", "eslint": "^7.7.0", - "jest": "^26.4.0", + "jest": "^26.4.2", "jest-expect-message": "^1.0.2", "jsii-build-tools": "^0.0.0", "jsii-calc": "^0.0.0", - "prettier": "^2.0.5", + "prettier": "^2.1.0", + "ts-jest": "^26.2.0", "typescript": "~3.9.7" }, "jest": { @@ -73,7 +74,10 @@ ], "testEnvironment": "node", "testMatch": [ - "**/?(*.)+(spec|test).js" - ] + "**/?(*.)+(spec|test).ts" + ], + "transform": { + "\\.tsx?$": "ts-jest" + } } } diff --git a/packages/@jsii/kernel/test/kernel.test.ts b/packages/@jsii/kernel/test/kernel.test.ts index 504bcb724a..05364f3512 100644 --- a/packages/@jsii/kernel/test/kernel.test.ts +++ b/packages/@jsii/kernel/test/kernel.test.ts @@ -398,6 +398,7 @@ defineTest( namespace: 'Amazon.JSII.Tests.CalculatorNamespace', packageId: 'Amazon.JSII.Tests.CalculatorPackageId', }, + go: {}, java: { package: 'software.amazon.jsii.tests.calculator', maven: { @@ -419,6 +420,7 @@ defineTest( packageId: 'Amazon.JSII.Tests.CalculatorPackageId.LibPackageId', versionSuffix: '-devpreview', }, + go: {}, java: { package: 'software.amazon.jsii.tests.calculator.lib', maven: { @@ -1480,7 +1482,7 @@ defineTest('nulls are converted to undefined - properties', (sandbox) => { defineTest('JSII_AGENT is undefined in node.js', (sandbox) => { expect( - sandbox.sget({ fqn: 'jsii-calc.JsiiAgent', property: 'jsiiAgent' }).value, + sandbox.sget({ fqn: 'jsii-calc.JsiiAgent', property: 'value' }).value, ).toBe(undefined); }); @@ -2064,6 +2066,69 @@ defineTest('ANY serializer: ref', (sandbox) => { }); }); +defineTest('Override transitive property', (sandbox) => { + ////////// + // GIVEN + ////////// + const originalString = 'r00t'; + const initialOverriddenPropValue = 'Overridden Value'; + let propValue = initialOverriddenPropValue; + sandbox.callbackHandler = makeSyncCallbackHandler((callback) => { + const getOrSet = callback.get ?? callback.set; + // We don't expect to receive any other callback + expect(getOrSet).toBeDefined(); + expect(getOrSet?.property).toBe('dynamicProperty'); + + if (callback.get) { + return propValue; + } + propValue = callback.set?.value; + return void 0; + }); + + ////////// + // WHEN + ////////// + const objref = sandbox.create({ + fqn: 'jsii-calc.DynamicPropertyBearerChild', + args: [originalString], + overrides: [{ property: 'dynamicProperty' }], + }); + + ////////// + // THEN + ////////// + + // Reading the "super" property + expect(sandbox.get({ objref, property: 'dynamicProperty' }).value).toBe( + originalString, + ); + expect(sandbox.get({ objref, property: 'valueStore' }).value).toBe( + originalString, + ); + + // Setting the dynamicProperty value through the override + expect( + sandbox.invoke({ objref, method: 'overrideValue', args: ['N3W'] }).result, + ).toBe(initialOverriddenPropValue); + // Checking the side effect happened on the override: + expect(propValue).toBe('N3W'); + // Check the "super" property didn't change: + expect(sandbox.get({ objref, property: 'dynamicProperty' }).value).toBe( + originalString, + ); + expect(sandbox.get({ objref, property: 'valueStore' }).value).toBe( + originalString, + ); + + // Set the "super" property now + sandbox.set({ objref, property: 'dynamicProperty', value: '' }); + // Check the side effect made it to the storage + expect(sandbox.get({ objref, property: 'valueStore' }).value).toBe(''); + // Check the overridden property didn't change... + expect(propValue).toBe('N3W'); +}); + // ================================================================================================= const testNames: { [name: string]: boolean } = {}; @@ -2086,6 +2151,11 @@ async function createCalculatorSandbox(name: string) { sandbox.traceEnabled = `${process.env.JSII_DEBUG}` === '1'; + sandbox.load({ + tarball: await preparePackage('@scope/jsii-calc-base-of-base'), + name: '@scope/jsii-calc-base-of-base', + version: calcBaseVersion, + }); sandbox.load({ tarball: await preparePackage('@scope/jsii-calc-base'), name: '@scope/jsii-calc-base', diff --git a/packages/@jsii/python-runtime/package.json b/packages/@jsii/python-runtime/package.json index 9ed243ee21..0a2879f2e5 100644 --- a/packages/@jsii/python-runtime/package.json +++ b/packages/@jsii/python-runtime/package.json @@ -41,7 +41,7 @@ "jsii-build-tools": "^0.0.0", "jsii-calc": "^0.0.0", "jsii-pacmak": "^0.0.0", - "ts-node": "^8.10.2", + "ts-node": "^9.0.0", "typescript": "~3.9.7" } } diff --git a/packages/@jsii/python-runtime/pyproject.toml b/packages/@jsii/python-runtime/pyproject.toml index cb0113114a..10e317749a 100644 --- a/packages/@jsii/python-runtime/pyproject.toml +++ b/packages/@jsii/python-runtime/pyproject.toml @@ -1,8 +1,8 @@ [build-system] requires = [ "pip~=20.2", - "setuptools~=46.1.3", - "wheel~=0.34.2", + "setuptools~=46.1", + "wheel~=0.34", ] [tool.black] diff --git a/packages/@jsii/python-runtime/requirements.txt b/packages/@jsii/python-runtime/requirements.txt index 953815797d..9569d1ed96 100644 --- a/packages/@jsii/python-runtime/requirements.txt +++ b/packages/@jsii/python-runtime/requirements.txt @@ -1,8 +1,8 @@ black~=19.10b0 -pytest~=6.0.1 -pytest-mypy~=0.6.2 +pytest~=6.0 +pytest-mypy~=0.7 pip~=20.2 -setuptools~=49.3.2 -wheel~=0.34.2 +setuptools~=49.6 +wheel~=0.35 -e . diff --git a/packages/@jsii/python-runtime/setup.py b/packages/@jsii/python-runtime/setup.py index 92ad8a384c..1a280d7e3a 100644 --- a/packages/@jsii/python-runtime/setup.py +++ b/packages/@jsii/python-runtime/setup.py @@ -27,11 +27,11 @@ "jsii._embedded.jsii": ["*.js", "*.js.map", "*.wasm"], }, install_requires=[ - "attrs~=19.3.0", - "cattrs~=1.0.0", + "attrs~=20.1", + "cattrs~=1.0", "importlib_resources ; python_version < '3.7'", "python-dateutil", - "typing_extensions~=3.7.4", + "typing_extensions~=3.7", ], python_requires=">=3.6", classifiers=[ diff --git a/packages/@jsii/python-runtime/src/jsii/_kernel/__init__.py b/packages/@jsii/python-runtime/src/jsii/_kernel/__init__.py index 398888fca6..b11c13c21f 100644 --- a/packages/@jsii/python-runtime/src/jsii/_kernel/__init__.py +++ b/packages/@jsii/python-runtime/src/jsii/_kernel/__init__.py @@ -13,7 +13,6 @@ from jsii import _reference_map from jsii._utils import Singleton from jsii._kernel.providers import BaseProvider, ProcessProvider -from jsii._kernel.types import JSClass, Referenceable from jsii._kernel.types import Callback from jsii._kernel.types import ( EnumRef, @@ -51,10 +50,10 @@ class Object: __jsii_type__ = "Object" -def _get_overides(klass: JSClass, obj: Any) -> List[Override]: +def _get_overides(klass: Type, obj: Any) -> List[Override]: overrides: List[Override] = [] - # We need to inspect each item in the MRO, until we get to our JSClass, at that + # We need to inspect each item in the MRO, until we get to our Type, at that # point we'll bail, because those methods are not the overriden methods, but the # "real" methods. jsii_classes = [klass] + list( @@ -240,9 +239,7 @@ def load(self, name: str, version: str, tarball: str) -> None: self.provider.load(LoadRequest(name=name, version=version, tarball=tarball)) # TODO: Is there a way to say that obj has to be an instance of klass? - def create( - self, klass: JSClass, obj: Any, args: Optional[List[Any]] = None - ) -> ObjRef: + def create(self, klass: Type, obj: Any, args: Optional[List[Any]] = None) -> ObjRef: if args is None: args = [] @@ -271,7 +268,7 @@ def delete(self, ref: ObjRef) -> None: self.provider.delete(DeleteRequest(objref=ref)) @_dereferenced - def get(self, obj: Referenceable, property: str) -> Any: + def get(self, obj: Any, property: str) -> Any: response = self.provider.get( GetRequest(objref=obj.__jsii_ref__, property=property) ) @@ -280,7 +277,7 @@ def get(self, obj: Referenceable, property: str) -> Any: else: return response.value - def set(self, obj: Referenceable, property: str, value: Any) -> None: + def set(self, obj: Any, property: str, value: Any) -> None: response = self.provider.set( SetRequest( objref=obj.__jsii_ref__, @@ -292,12 +289,12 @@ def set(self, obj: Referenceable, property: str, value: Any) -> None: _callback_till_result(self, response, SetResponse) @_dereferenced - def sget(self, klass: JSClass, property: str) -> Any: + def sget(self, klass: Type, property: str) -> Any: return self.provider.sget( StaticGetRequest(fqn=klass.__jsii_type__, property=property) ).value - def sset(self, klass: JSClass, property: str, value: Any) -> None: + def sset(self, klass: Type, property: str, value: Any) -> None: self.provider.sset( StaticSetRequest( fqn=klass.__jsii_type__, @@ -307,9 +304,7 @@ def sset(self, klass: JSClass, property: str, value: Any) -> None: ) @_dereferenced - def invoke( - self, obj: Referenceable, method: str, args: Optional[List[Any]] = None - ) -> Any: + def invoke(self, obj: Any, method: str, args: Optional[List[Any]] = None) -> Any: if args is None: args = [] @@ -327,7 +322,7 @@ def invoke( @_dereferenced def sinvoke( - self, klass: JSClass, method: str, args: Optional[List[Any]] = None + self, klass: Type, method: str, args: Optional[List[Any]] = None ) -> Any: if args is None: args = [] @@ -366,9 +361,7 @@ def sync_complete( response_type=response_type, ) - def ainvoke( - self, obj: Referenceable, method: str, args: Optional[List[Any]] = None - ) -> Any: + def ainvoke(self, obj: Any, method: str, args: Optional[List[Any]] = None) -> Any: if args is None: args = [] diff --git a/packages/@jsii/python-runtime/src/jsii/_kernel/types.py b/packages/@jsii/python-runtime/src/jsii/_kernel/types.py index b50123eed9..8adf783748 100644 --- a/packages/@jsii/python-runtime/src/jsii/_kernel/types.py +++ b/packages/@jsii/python-runtime/src/jsii/_kernel/types.py @@ -1,9 +1,8 @@ from typing import Union, List, Any, Optional, Mapping +from typing_extensions import Protocol import attr -from jsii.compat import Protocol - # TODO: # - HelloResponse @@ -242,19 +241,3 @@ class StatsResponse: StatsResponse, Callback, ] - - -class JSClass(Protocol): - @property - def __jsii_type__(self) -> str: - """ - Returns a str that points to this class inside of the Javascript runtime. - """ - - -class Referenceable(Protocol): - @property - def __jsii_ref__(self) -> ObjRef: - """ - Returns an ObjRef that points to this object on the JS side. - """ diff --git a/packages/@jsii/python-runtime/src/jsii/_reference_map.py b/packages/@jsii/python-runtime/src/jsii/_reference_map.py index 1ad016804f..dacf70c5dd 100644 --- a/packages/@jsii/python-runtime/src/jsii/_reference_map.py +++ b/packages/@jsii/python-runtime/src/jsii/_reference_map.py @@ -1,9 +1,7 @@ # This module exists to break an import cycle between jsii.runtime and jsii.kernel import inspect -from typing import Any, MutableMapping - -from ._kernel.types import JSClass, Referenceable +from typing import Any, MutableMapping, Type _types = {} @@ -12,7 +10,7 @@ _interfaces: MutableMapping[str, Any] = {} -def register_type(klass: JSClass): +def register_type(klass: Type): _types[klass.__jsii_type__] = klass @@ -42,7 +40,7 @@ def __init__(self, types): self._refs = {} self._types = types - def register(self, inst: Referenceable): + def register(self, inst: Any): self._refs[inst.__jsii_ref__.ref] = inst def resolve(self, kernel, ref): diff --git a/packages/@jsii/python-runtime/src/jsii/_runtime.py b/packages/@jsii/python-runtime/src/jsii/_runtime.py index ce4ad33105..c632035556 100644 --- a/packages/@jsii/python-runtime/src/jsii/_runtime.py +++ b/packages/@jsii/python-runtime/src/jsii/_runtime.py @@ -3,10 +3,13 @@ import attr -from jsii import _reference_map -from jsii._compat import importlib_resources -from jsii._kernel import Kernel -from jsii.python import _ClassPropertyMeta +from typing import ClassVar + +from . import _reference_map +from ._compat import importlib_resources +from ._kernel import Kernel +from .python import _ClassPropertyMeta +from ._kernel.types import ObjRef # Yea, a global here is kind of gross, however, there's not really a better way of diff --git a/packages/@jsii/python-runtime/tests/test_compliance.py b/packages/@jsii/python-runtime/tests/test_compliance.py index df06cc1b00..c8a9ce77be 100644 --- a/packages/@jsii/python-runtime/tests/test_compliance.py +++ b/packages/@jsii/python-runtime/tests/test_compliance.py @@ -915,7 +915,7 @@ def test_nullShouldBeTreatedAsUndefined(): def test_testJsiiAgent(): - assert JsiiAgent.jsii_agent == f"Python/{platform.python_version()}" + assert JsiiAgent.value == f"Python/{platform.python_version()}" def test_receiveInstanceOfPrivateClass(): diff --git a/packages/@jsii/runtime/package.json b/packages/@jsii/runtime/package.json index 6a8d54e605..1192cded4f 100644 --- a/packages/@jsii/runtime/package.json +++ b/packages/@jsii/runtime/package.json @@ -43,12 +43,13 @@ "@types/jest": "^26.0.10", "@types/node": "^10.17.28", "eslint": "^7.7.0", - "jest": "^26.4.0", + "jest": "^26.4.2", "jsii-build-tools": "^0.0.0", "jsii-calc": "^0.0.0", - "prettier": "^2.0.5", + "prettier": "^2.1.0", "source-map": "^0.7.3", - "source-map-loader": "^1.0.1", + "source-map-loader": "^1.0.2", + "ts-jest": "^26.2.0", "typescript": "~3.9.7", "wasm-loader": "^1.3.0", "webpack": "^4.44.1", @@ -76,7 +77,10 @@ ], "testEnvironment": "node", "testMatch": [ - "**/?(*.)+(spec|test).js" - ] + "**/?(*.)+(spec|test).ts" + ], + "transform": { + "\\.tsx?$": "ts-jest" + } } } diff --git a/packages/@jsii/runtime/test/__snapshots__/kernel-host.test.js.snap b/packages/@jsii/runtime/test/__snapshots__/kernel-host.test.ts.snap similarity index 87% rename from packages/@jsii/runtime/test/__snapshots__/kernel-host.test.js.snap rename to packages/@jsii/runtime/test/__snapshots__/kernel-host.test.ts.snap index 9abb008173..db48861aa8 100644 --- a/packages/@jsii/runtime/test/__snapshots__/kernel-host.test.js.snap +++ b/packages/@jsii/runtime/test/__snapshots__/kernel-host.test.ts.snap @@ -3,7 +3,7 @@ exports[`can load libraries from within a callback 1`] = ` Object { "ok": Object { - "assembly": "@scope/jsii-calc-base", + "assembly": "@scope/jsii-calc-base-of-base", "types": "*redacted*", }, } @@ -12,13 +12,22 @@ Object { exports[`can load libraries from within a callback 2`] = ` Object { "ok": Object { - "assembly": "@scope/jsii-calc-lib", + "assembly": "@scope/jsii-calc-base", "types": "*redacted*", }, } `; exports[`can load libraries from within a callback 3`] = ` +Object { + "ok": Object { + "assembly": "@scope/jsii-calc-lib", + "types": "*redacted*", + }, +} +`; + +exports[`can load libraries from within a callback 4`] = ` Object { "ok": Object { "$jsii.byref": "Object@10000", @@ -29,7 +38,7 @@ Object { } `; -exports[`can load libraries from within a callback 4`] = ` +exports[`can load libraries from within a callback 5`] = ` Object { "callback": Object { "cbid": "jsii::callback::20000", @@ -48,7 +57,7 @@ Object { } `; -exports[`can load libraries from within a callback 5`] = ` +exports[`can load libraries from within a callback 6`] = ` Object { "ok": Object { "assembly": "jsii-calc", @@ -57,7 +66,7 @@ Object { } `; -exports[`can load libraries from within a callback 6`] = ` +exports[`can load libraries from within a callback 7`] = ` Object { "ok": Object { "result": "SUCCESS!", diff --git a/packages/@jsii/runtime/test/kernel-host.test.ts b/packages/@jsii/runtime/test/kernel-host.test.ts index 839461c1ab..a6d668e092 100644 --- a/packages/@jsii/runtime/test/kernel-host.test.ts +++ b/packages/@jsii/runtime/test/kernel-host.test.ts @@ -7,6 +7,7 @@ import { KernelHost, InputOutput, Input, Output } from '../lib'; test('can load libraries from within a callback', () => { const inout = new TestInputOutput([ + { api: 'load', ...loadRequest('@scope/jsii-calc-base-of-base') }, { api: 'load', ...loadRequest('@scope/jsii-calc-base') }, { api: 'load', ...loadRequest('@scope/jsii-calc-lib') }, { diff --git a/packages/@jsii/runtime/test/playback.test.ts b/packages/@jsii/runtime/test/playback.test.ts index 0a62fb701e..fed5cbba51 100644 --- a/packages/@jsii/runtime/test/playback.test.ts +++ b/packages/@jsii/runtime/test/playback.test.ts @@ -42,7 +42,7 @@ function createRecords(): string { ...process.execArgv, require.resolve('jest/bin/jest'), '--coverage=false', - 'test/kernel.test.js', + 'test/kernel.test.ts', ], { env: { ...process.env, JSII_RECORD: records, JSII_NOSTACK: '1' }, diff --git a/packages/@jsii/spec/package.json b/packages/@jsii/spec/package.json index 4d55211f92..5654b0cd0c 100644 --- a/packages/@jsii/spec/package.json +++ b/packages/@jsii/spec/package.json @@ -37,11 +37,11 @@ "@types/jest": "^26.0.10", "@types/node": "^10.17.28", "eslint": "^7.7.0", - "jest": "^26.4.0", + "jest": "^26.4.2", "jsii-build-tools": "^0.0.0", - "prettier": "^2.0.5", + "prettier": "^2.1.0", "typescript": "~3.9.7", - "typescript-json-schema": "^0.42.0" + "typescript-json-schema": "^0.43.0" }, "jest": { "collectCoverage": true, diff --git a/packages/@scope/jsii-calc-base-of-base/lib/index.ts b/packages/@scope/jsii-calc-base-of-base/lib/index.ts index f197d78cdc..64c2877492 100644 --- a/packages/@scope/jsii-calc-base-of-base/lib/index.ts +++ b/packages/@scope/jsii-calc-base-of-base/lib/index.ts @@ -11,3 +11,11 @@ export class Very { return 42; } } + +export class StaticConsumer { + private constructor() {} + + public static consume(..._args: any[]): void { + return; + } +} diff --git a/packages/@scope/jsii-calc-base-of-base/package.json b/packages/@scope/jsii-calc-base-of-base/package.json index c07a5a918d..352bd5c5d2 100644 --- a/packages/@scope/jsii-calc-base-of-base/package.json +++ b/packages/@scope/jsii-calc-base-of-base/package.json @@ -25,6 +25,7 @@ "types": "lib/index.d.ts", "scripts": { "build": "jsii --project-references && jsii-rosetta", + "pacmak": "jsii-pacmak", "test": "diff-test test/assembly.jsii .jsii", "test:update": "npm run build && UPDATE_DIFF=1 npm run test" }, @@ -33,11 +34,12 @@ "jsii": "^0.0.0", "jsii-build-tools": "^0.0.0", "jsii-rosetta": "^0.0.0", - "prettier": "^2.0.5" + "prettier": "^2.1.0" }, "jsii": { "outdir": "dist", "targets": { + "go": {}, "java": { "package": "software.amazon.jsii.tests.calculator.baseofbase", "maven": { diff --git a/packages/@scope/jsii-calc-base-of-base/test/assembly.jsii b/packages/@scope/jsii-calc-base-of-base/test/assembly.jsii index 37b7c81aa4..a0d74fa026 100644 --- a/packages/@scope/jsii-calc-base-of-base/test/assembly.jsii +++ b/packages/@scope/jsii-calc-base-of-base/test/assembly.jsii @@ -23,6 +23,7 @@ "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace", "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId" }, + "go": {}, "java": { "maven": { "artifactId": "calculator-base-of-base", @@ -59,6 +60,36 @@ ], "name": "IVeryBaseInterface" }, + "@scope/jsii-calc-base-of-base.StaticConsumer": { + "assembly": "@scope/jsii-calc-base-of-base", + "fqn": "@scope/jsii-calc-base-of-base.StaticConsumer", + "kind": "class", + "locationInModule": { + "filename": "lib/index.ts", + "line": 15 + }, + "methods": [ + { + "locationInModule": { + "filename": "lib/index.ts", + "line": 18 + }, + "name": "consume", + "parameters": [ + { + "name": "_args", + "type": { + "primitive": "any" + }, + "variadic": true + } + ], + "static": true, + "variadic": true + } + ], + "name": "StaticConsumer" + }, "@scope/jsii-calc-base-of-base.Very": { "assembly": "@scope/jsii-calc-base-of-base", "fqn": "@scope/jsii-calc-base-of-base.Very", @@ -111,5 +142,5 @@ } }, "version": "0.0.0", - "fingerprint": "v3mwSbKGQ2aa8g0DEKIeaEXh3csX7PX2MJJxHVRufhI=" + "fingerprint": "9nL4armG/GJRAhHMWxkKO9B6+nyGD108qvPMtTPljTw=" } diff --git a/packages/@scope/jsii-calc-base/package.json b/packages/@scope/jsii-calc-base/package.json index 1a5491e08c..af25600122 100644 --- a/packages/@scope/jsii-calc-base/package.json +++ b/packages/@scope/jsii-calc-base/package.json @@ -39,11 +39,12 @@ "jsii": "^0.0.0", "jsii-build-tools": "^0.0.0", "jsii-rosetta": "^0.0.0", - "prettier": "^2.0.5" + "prettier": "^2.1.0" }, "jsii": { "outdir": "dist", "targets": { + "go": {}, "java": { "package": "software.amazon.jsii.tests.calculator.base", "maven": { diff --git a/packages/@scope/jsii-calc-base/test/assembly.jsii b/packages/@scope/jsii-calc-base/test/assembly.jsii index 37b4544eec..c2e75ccb60 100644 --- a/packages/@scope/jsii-calc-base/test/assembly.jsii +++ b/packages/@scope/jsii-calc-base/test/assembly.jsii @@ -17,6 +17,7 @@ "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace", "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId" }, + "go": {}, "java": { "maven": { "artifactId": "calculator-base-of-base", @@ -50,6 +51,7 @@ "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace", "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BasePackageId" }, + "go": {}, "java": { "maven": { "artifactId": "calculator-base", @@ -151,5 +153,5 @@ } }, "version": "0.0.0", - "fingerprint": "ttHhQ5EzgjW0lybCNSKOfqilJ04kp4VK3arcpRl3rBM=" + "fingerprint": "JCkFuFqry/njMLNi/IpfTVdkVye/esUFOCoZoFbDD+4=" } diff --git a/packages/@scope/jsii-calc-lib/lib/index.ts b/packages/@scope/jsii-calc-lib/lib/index.ts index bb3021338e..b4268904dd 100644 --- a/packages/@scope/jsii-calc-lib/lib/index.ts +++ b/packages/@scope/jsii-calc-lib/lib/index.ts @@ -3,52 +3,52 @@ import * as base from '@scope/jsii-calc-base'; /** * Abstract class which represents a numeric value. */ -export abstract class Value extends base.Base { - /** - * The value. - */ - public abstract readonly value: number; +export abstract class NumericValue extends base.Base { + /** + * The value. + */ + public abstract readonly value: number; - /** - * String representation of the value. - */ - public toString() { - return this.value.toString(); - } + /** + * String representation of the value. + */ + public toString() { + return this.value.toString(); + } } /** * The general contract for a concrete number. */ export interface IDoublable { - readonly doubleValue: number; + readonly doubleValue: number; } /** * Represents a concrete number. */ -export class Number extends Value implements IDoublable { - /** - * Creates a Number object. - * @param value The number. - */ - constructor(readonly value: number) { - super(); - } +export class Number extends NumericValue implements IDoublable { + /** + * Creates a Number object. + * @param value The number. + */ + public constructor(public readonly value: number) { + super(); + } - /** - * The number multiplied by 2. - */ - get doubleValue() { - return 2 * this.value; - } + /** + * The number multiplied by 2. + */ + public get doubleValue() { + return 2 * this.value; + } } /** * Represents an operation on values. */ -export abstract class Operation extends Value { - public abstract toString(): string; +export abstract class Operation extends NumericValue { + public abstract toString(): string; } /** @@ -56,38 +56,38 @@ export abstract class Operation extends Value { * a "hello" or "goodbye" blessing and they will respond back in a fun and friendly manner. */ export interface IFriendly { - /** - * Say hello! - */ - hello(): string + /** + * Say hello! + */ + hello(): string; } /** * This is the first struct we have created in jsii */ export interface MyFirstStruct { - /** - * A string value - */ - readonly astring: string + /** + * A string value + */ + readonly astring: string; - /** - * An awesome number value - */ - readonly anumber: number - readonly firstOptional?: string[] + /** + * An awesome number value + */ + readonly anumber: number; + readonly firstOptional?: string[]; } /** * This is a struct with only optional properties. */ export interface StructWithOnlyOptionals { - /** - * The first optional! - */ - readonly optional1?: string - readonly optional2?: number - readonly optional3?: boolean + /** + * The first optional! + */ + readonly optional1?: string; + readonly optional2?: number; + readonly optional3?: boolean; } /** @@ -95,8 +95,8 @@ export interface StructWithOnlyOptionals { * See awslabs/jsii#138 */ export enum EnumFromScopedModule { - VALUE1, - VALUE2 + VALUE1, + VALUE2, } /** @@ -106,7 +106,7 @@ export enum EnumFromScopedModule { * far enough up the tree. */ export interface IThreeLevelsInterface extends base.IBaseInterface { - baz(): void; + baz(): void; } export * as submodule from './submodule'; diff --git a/packages/@scope/jsii-calc-lib/lib/submodule/index.ts b/packages/@scope/jsii-calc-lib/lib/submodule/index.ts index 47f4d88df6..d4bc6f7523 100644 --- a/packages/@scope/jsii-calc-lib/lib/submodule/index.ts +++ b/packages/@scope/jsii-calc-lib/lib/submodule/index.ts @@ -30,4 +30,11 @@ export namespace NestingClass { export class NestedClass { public readonly property: string = 'property'; } + + /** + * This is a struct, nested within a class. Normal. + */ + export interface NestedStruct { + readonly name: string; + } } diff --git a/packages/@scope/jsii-calc-lib/package.json b/packages/@scope/jsii-calc-lib/package.json index 80d8722ddb..39e9d9bf71 100644 --- a/packages/@scope/jsii-calc-lib/package.json +++ b/packages/@scope/jsii-calc-lib/package.json @@ -27,6 +27,7 @@ "types": "build/index.d.ts", "scripts": { "build": "jsii --project-references && jsii-rosetta", + "pacmak": "jsii-pacmak", "test": "diff-test test/assembly.jsii .jsii", "test:update": "npm run build && UPDATE_DIFF=1 npm run test" }, @@ -42,11 +43,12 @@ "jsii": "^0.0.0", "jsii-build-tools": "^0.0.0", "jsii-rosetta": "^0.0.0", - "prettier": "^2.0.5" + "prettier": "^2.1.0" }, "jsii": { "outdir": "dist", "targets": { + "go": {}, "java": { "package": "software.amazon.jsii.tests.calculator.lib", "maven": { diff --git a/packages/@scope/jsii-calc-lib/test/assembly.jsii b/packages/@scope/jsii-calc-lib/test/assembly.jsii index 45cfe84bb7..e9707f4e7d 100644 --- a/packages/@scope/jsii-calc-lib/test/assembly.jsii +++ b/packages/@scope/jsii-calc-lib/test/assembly.jsii @@ -18,6 +18,7 @@ "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace", "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BasePackageId" }, + "go": {}, "java": { "maven": { "artifactId": "calculator-base", @@ -40,6 +41,7 @@ "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace", "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId" }, + "go": {}, "java": { "maven": { "artifactId": "calculator-base-of-base", @@ -97,6 +99,7 @@ "packageId": "Amazon.JSII.Tests.CalculatorPackageId.LibPackageId", "versionSuffix": "-devpreview" }, + "go": {}, "java": { "maven": { "artifactId": "calculator-lib", @@ -311,7 +314,7 @@ }, "@scope/jsii-calc-lib.Number": { "assembly": "@scope/jsii-calc-lib", - "base": "@scope/jsii-calc-lib.Value", + "base": "@scope/jsii-calc-lib.NumericValue", "docs": { "stability": "deprecated", "summary": "Represents a concrete number." @@ -375,7 +378,60 @@ "line": 35 }, "name": "value", - "overrides": "@scope/jsii-calc-lib.Value", + "overrides": "@scope/jsii-calc-lib.NumericValue", + "type": { + "primitive": "number" + } + } + ] + }, + "@scope/jsii-calc-lib.NumericValue": { + "abstract": true, + "assembly": "@scope/jsii-calc-lib", + "base": "@scope/jsii-calc-base.Base", + "docs": { + "stability": "deprecated", + "summary": "Abstract class which represents a numeric value." + }, + "fqn": "@scope/jsii-calc-lib.NumericValue", + "initializer": {}, + "kind": "class", + "locationInModule": { + "filename": "lib/index.ts", + "line": 6 + }, + "methods": [ + { + "docs": { + "stability": "deprecated", + "summary": "String representation of the value." + }, + "locationInModule": { + "filename": "lib/index.ts", + "line": 15 + }, + "name": "toString", + "returns": { + "type": { + "primitive": "string" + } + } + } + ], + "name": "NumericValue", + "properties": [ + { + "abstract": true, + "docs": { + "stability": "deprecated", + "summary": "The value." + }, + "immutable": true, + "locationInModule": { + "filename": "lib/index.ts", + "line": 10 + }, + "name": "value", "type": { "primitive": "number" } @@ -385,7 +441,7 @@ "@scope/jsii-calc-lib.Operation": { "abstract": true, "assembly": "@scope/jsii-calc-lib", - "base": "@scope/jsii-calc-lib.Value", + "base": "@scope/jsii-calc-lib.NumericValue", "docs": { "stability": "deprecated", "summary": "Represents an operation on values." @@ -409,7 +465,7 @@ "line": 51 }, "name": "toString", - "overrides": "@scope/jsii-calc-lib.Value", + "overrides": "@scope/jsii-calc-lib.NumericValue", "returns": { "type": { "primitive": "string" @@ -485,59 +541,6 @@ } ] }, - "@scope/jsii-calc-lib.Value": { - "abstract": true, - "assembly": "@scope/jsii-calc-lib", - "base": "@scope/jsii-calc-base.Base", - "docs": { - "stability": "deprecated", - "summary": "Abstract class which represents a numeric value." - }, - "fqn": "@scope/jsii-calc-lib.Value", - "initializer": {}, - "kind": "class", - "locationInModule": { - "filename": "lib/index.ts", - "line": 6 - }, - "methods": [ - { - "docs": { - "stability": "deprecated", - "summary": "String representation of the value." - }, - "locationInModule": { - "filename": "lib/index.ts", - "line": 15 - }, - "name": "toString", - "returns": { - "type": { - "primitive": "string" - } - } - } - ], - "name": "Value", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "deprecated", - "summary": "The value." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/index.ts", - "line": 10 - }, - "name": "value", - "type": { - "primitive": "number" - } - } - ] - }, "@scope/jsii-calc-lib.submodule.IReflectable": { "assembly": "@scope/jsii-calc-lib", "docs": { @@ -625,6 +628,40 @@ } ] }, + "@scope/jsii-calc-lib.submodule.NestingClass.NestedStruct": { + "assembly": "@scope/jsii-calc-lib", + "datatype": true, + "docs": { + "remarks": "Normal.", + "stability": "deprecated", + "summary": "This is a struct, nested within a class." + }, + "fqn": "@scope/jsii-calc-lib.submodule.NestingClass.NestedStruct", + "kind": "interface", + "locationInModule": { + "filename": "lib/submodule/index.ts", + "line": 37 + }, + "name": "NestedStruct", + "namespace": "submodule.NestingClass", + "properties": [ + { + "abstract": true, + "docs": { + "stability": "deprecated" + }, + "immutable": true, + "locationInModule": { + "filename": "lib/submodule/index.ts", + "line": 38 + }, + "name": "name", + "type": { + "primitive": "string" + } + } + ] + }, "@scope/jsii-calc-lib.submodule.ReflectableEntry": { "assembly": "@scope/jsii-calc-lib", "datatype": true, @@ -723,5 +760,5 @@ } }, "version": "0.0.0", - "fingerprint": "f/4VuNiOkSgTgLR80loQUAzAuzFi+25rmfLcRWKDCrY=" + "fingerprint": "kLS1ei6Uc31/IKA//k3OZp65Lxz+2tLyQOO/qSYpvSE=" } diff --git a/packages/codemaker/lib/codemaker.ts b/packages/codemaker/lib/codemaker.ts index 2ecb1183d3..c9d029ee27 100644 --- a/packages/codemaker/lib/codemaker.ts +++ b/packages/codemaker/lib/codemaker.ts @@ -85,7 +85,7 @@ export class CodeMaker { */ public line(fmt?: string, ...args: string[]) { if (!this.currentFile) { - throw new Error('Cannot emit source lines without openning a file'); + throw new Error('Cannot emit source lines without opening a file'); } if (fmt) { diff --git a/packages/codemaker/package.json b/packages/codemaker/package.json index 16b0988b99..868a2abea6 100644 --- a/packages/codemaker/package.json +++ b/packages/codemaker/package.json @@ -40,8 +40,8 @@ "@types/jest": "^26.0.10", "@types/node": "^10.17.28", "eslint": "^7.7.0", - "jest": "^26.4.0", - "prettier": "^2.0.5", + "jest": "^26.4.2", + "prettier": "^2.1.0", "typescript": "~3.9.7" }, "jest": { diff --git a/packages/codemaker/test/source.test.ts b/packages/codemaker/test/source.test.ts index d3e07d6a1f..5123d75810 100644 --- a/packages/codemaker/test/source.test.ts +++ b/packages/codemaker/test/source.test.ts @@ -6,7 +6,7 @@ import { CodeMaker } from '../lib'; test('cannot write before opening a file', () => { const sources = new CodeMaker(); expect(() => sources.line('Nope!')).toThrow( - /Cannot emit source lines without openning a file/, + /Cannot emit source lines without opening a file/, ); }); diff --git a/packages/jsii-calc/lib/calculator.ts b/packages/jsii-calc/lib/calculator.ts index 39fcf4134f..6065eaad0b 100644 --- a/packages/jsii-calc/lib/calculator.ts +++ b/packages/jsii-calc/lib/calculator.ts @@ -1,7 +1,11 @@ -import { Operation, Value, Number, IFriendly } from '@scope/jsii-calc-lib'; +import { + Operation, + NumericValue, + Number, + IFriendly, +} from '@scope/jsii-calc-lib'; /* eslint-disable - @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-namespace, @typescript-eslint/member-ordering, */ @@ -46,12 +50,15 @@ export abstract class BinaryOperation extends Operation implements IFriendly { * @param lhs Left-hand side operand * @param rhs Right-hand side operand */ - public constructor(public readonly lhs: Value, public readonly rhs: Value) { + public constructor( + public readonly lhs: NumericValue, + public readonly rhs: NumericValue, + ) { super(); } public hello() { - return 'Hello, I am a binary operation. What\'s your name?'; + return "Hello, I am a binary operation. What's your name?"; } } @@ -71,7 +78,8 @@ export class Add extends BinaryOperation { /** * The "*" binary operation. */ -export class Multiply extends BinaryOperation +export class Multiply + extends BinaryOperation implements IFriendlier, IRandomNumberGenerator { public get value() { return this.lhs.value * this.rhs.value; @@ -98,7 +106,7 @@ export class Multiply extends BinaryOperation * An operation on a single operand. */ export abstract class UnaryOperation extends Operation { - public constructor(public readonly operand: Value) { + public constructor(public readonly operand: NumericValue) { super(); } } @@ -159,7 +167,7 @@ export namespace composition { * The expression that this operation consists of. * Must be implemented by derived classes. */ - abstract readonly expression: Value; + abstract readonly expression: NumericValue; public toString() { switch (this.stringStyle) { @@ -198,7 +206,7 @@ export class Sum extends composition.CompositeOperation { /** * The parts to sum. */ - public parts: Value[] = []; + public parts: NumericValue[] = []; // TODO: some annoying bug in Nashorn will throw this exception if // call that prototype's ctor via "apply" instead: java.lang.AssertionError: duplicate code @@ -207,7 +215,7 @@ export class Sum extends composition.CompositeOperation { } public get expression() { - let curr: Value = new Number(0); + let curr: NumericValue = new Number(0); for (const part of this.parts) { curr = new Add(curr, part); } @@ -224,11 +232,14 @@ export class Power extends composition.CompositeOperation { * @param base The base of the power * @param pow The number of times to multiply */ - public constructor(public readonly base: Value, public readonly pow: Value) { + public constructor( + public readonly base: NumericValue, + public readonly pow: NumericValue, + ) { super(); } - public get expression(): Value { + public get expression(): NumericValue { let curr: Operation = new Number(1); for (let i = 0; i < this.pow.value; ++i) { curr = new Multiply(curr, this.base); @@ -297,17 +308,17 @@ export class Calculator extends composition.CompositeOperation { /** * The current value. */ - public curr: Value; + public curr: NumericValue; /** * A map of per operation name of all operations performed. */ - public readonly operationsMap: { [op: string]: Value[] } = {}; + public readonly operationsMap: { [op: string]: NumericValue[] } = {}; /** * A log of all operations. */ - public readonly operationsLog = new Array(); + public readonly operationsLog = new Array(); /** * The maximum value allows in this calculator. @@ -365,7 +376,7 @@ export class Calculator extends composition.CompositeOperation { return this.unionProperty.value; } - private addOperation(op: string, value: Value) { + private addOperation(op: string, value: NumericValue) { if (this.maxValue && value.value > this.maxValue) { throw new Error( `Operation ${value.value} exceeded maximum value ${this.maxValue}`, @@ -374,7 +385,7 @@ export class Calculator extends composition.CompositeOperation { let list = this.operationsMap[op]; if (!list) { - list = new Array(); + list = new Array(); this.operationsMap[op] = list; } list.push(value); @@ -395,7 +406,7 @@ export class PropertyNamedProperty { } export class MethodNamedProperty { public property() { - return 'Hello, I\'m property()!'; + return "Hello, I'm property()!"; } public readonly elite = 1337; diff --git a/packages/jsii-calc/lib/compliance.ts b/packages/jsii-calc/lib/compliance.ts index d94be164a3..a9850416d4 100644 --- a/packages/jsii-calc/lib/compliance.ts +++ b/packages/jsii-calc/lib/compliance.ts @@ -1,11 +1,11 @@ -import * as lib from '@scope/jsii-calc-lib'; import { EnumFromScopedModule, IDoublable, IFriendly, MyFirstStruct, + Number as LibNumber, StructWithOnlyOptionals, - Value, + NumericValue, } from '@scope/jsii-calc-lib'; import * as fs from 'fs'; import * as path from 'path'; @@ -19,7 +19,6 @@ import { } from './calculator'; /* eslint-disable - @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-namespace, @typescript-eslint/member-ordering, */ @@ -145,13 +144,13 @@ export class AllTypes { // map - private mapValue: { [key: string]: lib.Number } = {}; + private mapValue: { [key: string]: LibNumber } = {}; - public get mapProperty(): { [key: string]: lib.Number } { + public get mapProperty(): { [key: string]: LibNumber } { return this.mapValue; } - public set mapProperty(value: { [key: string]: lib.Number }) { + public set mapProperty(value: { [key: string]: LibNumber }) { if (typeof value !== 'object') { throw new Error('not a map'); } @@ -188,9 +187,9 @@ export class AllTypes { // unions - public unionProperty: string | number | lib.Number | Multiply = 'foo'; - public unionArrayProperty: Array = []; - public unionMapProperty: { [key: string]: lib.Number | number | string } = {}; + public unionProperty: string | number | LibNumber | Multiply = 'foo'; + public unionArrayProperty: Array = []; + public unionMapProperty: { [key: string]: LibNumber | number | string } = {}; // enum @@ -222,7 +221,7 @@ export class AllTypes { } public anyOut(): any { - const ret = new lib.Number(42); + const ret = new LibNumber(42); Object.defineProperty(ret, 'tag', { value: "you're it", }); @@ -265,7 +264,7 @@ export class ObjectRefsInCollections { /** * Returns the sum of all values */ - public sumFromArray(values: Value[]) { + public sumFromArray(values: NumericValue[]) { let sum = 0; for (const val of values) { sum += val.value; @@ -276,7 +275,7 @@ export class ObjectRefsInCollections { /** * Returns the sum of all values in a map */ - public sumFromMap(values: { [key: string]: Value }) { + public sumFromMap(values: { [key: string]: NumericValue }) { let sum = 0; for (const key of Object.keys(values)) { sum += values[key].value; @@ -290,7 +289,7 @@ export class RuntimeTypeChecking { * Used to verify verification of number of method arguments. */ public methodWithOptionalArguments(arg1: number, arg2: string, arg3?: Date) { - consume(arg1, arg2, arg3); + StaticConsumer.consume(arg1, arg2, arg3); } public methodWithDefaultedArguments( @@ -298,11 +297,11 @@ export class RuntimeTypeChecking { arg2?: string, arg3: Date = new Date(), ) { - consume(arg1, arg2, arg3); + StaticConsumer.consume(arg1, arg2, arg3); } public methodWithOptionalAnyArgument(arg?: any) { - consume(arg); + StaticConsumer.consume(arg); } } @@ -550,7 +549,7 @@ export interface DerivedStruct extends MyFirstStruct { /** * This is optional. */ - readonly anotherOptional?: { [key: string]: Value }; + readonly anotherOptional?: { [key: string]: NumericValue }; } export class GiveMeStructs { @@ -639,7 +638,7 @@ export class AllowedMethodNames { export interface IReturnsNumber { obtainNumber(): IDoublable; - readonly numberProp: lib.Number; + readonly numberProp: LibNumber; } export class OverrideReturnsObject { @@ -1247,7 +1246,8 @@ export abstract class AbstractClassBase { public abstract readonly abstractProperty: string; } -export abstract class AbstractClass extends AbstractClassBase +export abstract class AbstractClass + extends AbstractClassBase implements IInterfaceImplementedByAbstractClass { public nonAbstractMethod() { return 42; @@ -1515,7 +1515,8 @@ export interface IPrivatelyImplemented { export class ExportedBaseClass { public constructor(public readonly success: boolean) {} } -class PrivateImplementation extends ExportedBaseClass +class PrivateImplementation + extends ExportedBaseClass implements IPrivatelyImplemented { public constructor() { super(true); @@ -1529,7 +1530,7 @@ export class JsiiAgent { /** * Returns the value of the JSII_AGENT environment variable. */ - public static get jsiiAgent(): string | undefined { + public static get value(): string | undefined { return process.env.JSII_AGENT; } } @@ -2618,15 +2619,15 @@ export class JsonFormatter { } public static anyArray(): any { - return [1, 2, 3, new lib.Number(123), { foo: 'bar' }]; + return [1, 2, 3, new LibNumber(123), { foo: 'bar' }]; } public static anyHash(): any { - return { hello: 1234, world: new lib.Number(122) }; + return { hello: 1234, world: new LibNumber(122) }; } public static anyRef(): any { - return new lib.Number(444); + return new LibNumber(444); } private constructor() {} @@ -2785,7 +2786,37 @@ export abstract class BurriedAnonymousObject { public abstract giveItBack(value: any): any; } -/** Does nothing with provided arguments, useful to artifically use parameters */ -function consume(..._args: readonly any[]) { - return; +import { StaticConsumer } from '@scope/jsii-calc-base-of-base'; + +/** + * Ensures we can override a dynamic property that was inherited. + */ +export class DynamicPropertyBearer { + public constructor(public valueStore: string) {} + + public get dynamicProperty(): string { + return this.valueStore; + } + + public set dynamicProperty(value: string) { + this.valueStore = value; + } +} +export class DynamicPropertyBearerChild extends DynamicPropertyBearer { + public constructor(public readonly originalValue: string) { + super(originalValue); + } + + /** + * Sets `this.dynamicProperty` to the new value, and returns the old value. + * + * @param newValue the new value to be set. + * + * @returns the old value that was set. + */ + public overrideValue(newValue: string): string { + const oldValue = this.dynamicProperty; + this.dynamicProperty = newValue; + return oldValue; + } } diff --git a/packages/jsii-calc/lib/erasures.ts b/packages/jsii-calc/lib/erasures.ts index 6528fd5e53..7c130cb386 100644 --- a/packages/jsii-calc/lib/erasures.ts +++ b/packages/jsii-calc/lib/erasures.ts @@ -53,7 +53,8 @@ export interface IJsii487External {} // eslint-disable-next-line @typescript-eslint/no-empty-interface export interface IJsii487External2 {} class Jsii487Internal implements IJsii487External {} -export class Jsii487Derived extends Jsii487Internal +export class Jsii487Derived + extends Jsii487Internal implements IJsii487External2 {} // diff --git a/packages/jsii-calc/package.json b/packages/jsii-calc/package.json index 3875832b61..47262954ee 100644 --- a/packages/jsii-calc/package.json +++ b/packages/jsii-calc/package.json @@ -54,11 +54,12 @@ "jsii": "^0.0.0", "jsii-build-tools": "^0.0.0", "jsii-rosetta": "^0.0.0", - "prettier": "^2.0.5" + "prettier": "^2.1.0" }, "jsii": { "outdir": "dist", "targets": { + "go": {}, "java": { "package": "software.amazon.jsii.tests.calculator", "maven": { diff --git a/packages/jsii-calc/test/assembly.jsii b/packages/jsii-calc/test/assembly.jsii index 321c8da7f6..e6eebdbcfd 100644 --- a/packages/jsii-calc/test/assembly.jsii +++ b/packages/jsii-calc/test/assembly.jsii @@ -45,6 +45,7 @@ "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace", "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BasePackageId" }, + "go": {}, "java": { "maven": { "artifactId": "calculator-base", @@ -67,6 +68,7 @@ "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace", "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId" }, + "go": {}, "java": { "maven": { "artifactId": "calculator-base-of-base", @@ -109,6 +111,7 @@ "packageId": "Amazon.JSII.Tests.CalculatorPackageId.LibPackageId", "versionSuffix": "-devpreview" }, + "go": {}, "java": { "maven": { "artifactId": "calculator-lib", @@ -166,31 +169,31 @@ "jsii-calc.DerivedClassHasNoProperties": { "locationInModule": { "filename": "lib/compliance.ts", - "line": 325 + "line": 324 } }, "jsii-calc.InterfaceInNamespaceIncludesClasses": { "locationInModule": { "filename": "lib/compliance.ts", - "line": 1206 + "line": 1205 } }, "jsii-calc.InterfaceInNamespaceOnlyInterface": { "locationInModule": { "filename": "lib/compliance.ts", - "line": 1199 + "line": 1198 } }, "jsii-calc.PythonSelf": { "locationInModule": { "filename": "lib/compliance.ts", - "line": 1090 + "line": 1089 } }, "jsii-calc.composition": { "locationInModule": { "filename": "lib/calculator.ts", - "line": 134 + "line": 142 } }, "jsii-calc.submodule": { @@ -236,6 +239,7 @@ "namespace": "Amazon.JSII.Tests.CalculatorNamespace", "packageId": "Amazon.JSII.Tests.CalculatorPackageId" }, + "go": {}, "java": { "maven": { "artifactId": "calculator", @@ -274,7 +278,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1250 + "line": 1249 }, "methods": [ { @@ -351,7 +355,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1246 + "line": 1245 }, "name": "AbstractClassBase", "properties": [ @@ -363,7 +367,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1247 + "line": 1246 }, "name": "abstractProperty", "type": { @@ -454,7 +458,7 @@ "kind": "class", "locationInModule": { "filename": "lib/calculator.ts", - "line": 411 + "line": 422 }, "methods": [ { @@ -464,7 +468,7 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 413 + "line": 424 }, "name": "someMethod", "parameters": [ @@ -489,7 +493,7 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 419 + "line": 430 }, "name": "workItAll", "parameters": [ @@ -519,7 +523,7 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 412 + "line": 423 }, "name": "property", "protected": true, @@ -544,7 +548,7 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 49 + "line": 53 }, "parameters": [ { @@ -553,7 +557,7 @@ }, "name": "lhs", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } }, { @@ -562,7 +566,7 @@ }, "name": "rhs", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } } ] @@ -570,7 +574,7 @@ "kind": "class", "locationInModule": { "filename": "lib/calculator.ts", - "line": 61 + "line": 68 }, "methods": [ { @@ -580,7 +584,7 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 66 + "line": 73 }, "name": "toString", "overrides": "@scope/jsii-calc-lib.Operation", @@ -601,10 +605,10 @@ "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 62 + "line": 69 }, "name": "value", - "overrides": "@scope/jsii-calc-lib.Value", + "overrides": "@scope/jsii-calc-lib.NumericValue", "type": { "primitive": "number" } @@ -627,7 +631,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 63 + "line": 62 }, "methods": [ { @@ -636,7 +640,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 232 + "line": 231 }, "name": "anyIn", "parameters": [ @@ -654,7 +658,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 224 + "line": 223 }, "name": "anyOut", "returns": { @@ -669,7 +673,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 220 + "line": 219 }, "name": "enumMethod", "parameters": [ @@ -696,7 +700,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 216 + "line": 215 }, "name": "enumPropertyValue", "type": { @@ -709,7 +713,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 180 + "line": 179 }, "name": "anyArrayProperty", "type": { @@ -727,7 +731,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 181 + "line": 180 }, "name": "anyMapProperty", "type": { @@ -745,7 +749,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 179 + "line": 178 }, "name": "anyProperty", "type": { @@ -758,7 +762,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 165 + "line": 164 }, "name": "arrayProperty", "type": { @@ -776,7 +780,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 68 + "line": 67 }, "name": "booleanProperty", "type": { @@ -789,7 +793,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 114 + "line": 113 }, "name": "dateProperty", "type": { @@ -802,7 +806,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 200 + "line": 199 }, "name": "enumProperty", "type": { @@ -815,7 +819,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 133 + "line": 132 }, "name": "jsonProperty", "type": { @@ -828,7 +832,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 150 + "line": 149 }, "name": "mapProperty", "type": { @@ -846,7 +850,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 99 + "line": 98 }, "name": "numberProperty", "type": { @@ -859,7 +863,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 83 + "line": 82 }, "name": "stringProperty", "type": { @@ -872,7 +876,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 192 + "line": 191 }, "name": "unionArrayProperty", "type": { @@ -884,7 +888,7 @@ "primitive": "number" }, { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } ] } @@ -899,7 +903,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 193 + "line": 192 }, "name": "unionMapProperty", "type": { @@ -929,7 +933,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 191 + "line": 190 }, "name": "unionProperty", "type": { @@ -957,7 +961,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 186 + "line": 185 }, "name": "unknownArrayProperty", "type": { @@ -975,7 +979,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 187 + "line": 186 }, "name": "unknownMapProperty", "type": { @@ -993,7 +997,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 185 + "line": 184 }, "name": "unknownProperty", "type": { @@ -1006,7 +1010,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 197 + "line": 196 }, "name": "optionalEnumValue", "optional": true, @@ -1025,7 +1029,7 @@ "kind": "enum", "locationInModule": { "filename": "lib/compliance.ts", - "line": 33 + "line": 32 }, "members": [ { @@ -1063,7 +1067,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 615 + "line": 614 }, "methods": [ { @@ -1072,7 +1076,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 623 + "line": 622 }, "name": "getBar", "parameters": [ @@ -1097,7 +1101,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 619 + "line": 618 }, "name": "getFoo", "parameters": [ @@ -1120,7 +1124,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 634 + "line": 633 }, "name": "setBar", "parameters": [ @@ -1151,7 +1155,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 630 + "line": 629 }, "name": "setFoo", "parameters": [ @@ -1184,7 +1188,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2683 + "line": 2684 }, "parameters": [ { @@ -1204,7 +1208,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2682 + "line": 2683 }, "name": "AmbiguousParameters", "properties": [ @@ -1215,7 +1219,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2685 + "line": 2686 }, "name": "props", "type": { @@ -1229,7 +1233,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2684 + "line": 2685 }, "name": "scope", "type": { @@ -1255,7 +1259,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2212 + "line": 2213 }, "methods": [ { @@ -1264,7 +1268,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2216 + "line": 2217 }, "name": "provideAsClass", "overrides": "jsii-calc.IAnonymousImplementationProvider", @@ -1280,7 +1284,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2220 + "line": 2221 }, "name": "provideAsInterface", "overrides": "jsii-calc.IAnonymousImplementationProvider", @@ -1307,7 +1311,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 333 + "line": 332 }, "methods": [ { @@ -1317,7 +1321,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 334 + "line": 333 }, "name": "callMe", "returns": { @@ -1334,7 +1338,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 353 + "line": 352 }, "name": "callMe2", "returns": { @@ -1352,7 +1356,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 363 + "line": 362 }, "name": "callMeDoublePromise", "returns": { @@ -1367,7 +1371,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 371 + "line": 370 }, "name": "dontOverrideMe", "returns": { @@ -1383,7 +1387,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 342 + "line": 341 }, "name": "overrideMe", "parameters": [ @@ -1407,7 +1411,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 346 + "line": 345 }, "name": "overrideMeToo", "returns": { @@ -1433,7 +1437,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1539 + "line": 1540 }, "methods": [ { @@ -1442,7 +1446,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1540 + "line": 1541 }, "name": "methodOne" }, @@ -1452,7 +1456,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1546 + "line": 1547 }, "name": "methodTwo" } @@ -1473,7 +1477,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2477 + "line": 2478 }, "name": "BaseJsii976" }, @@ -1494,7 +1498,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2421 + "line": 2422 }, "methods": [ { @@ -1503,7 +1507,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2424 + "line": 2425 }, "name": "ring", "overrides": "jsii-calc.IBell" @@ -1517,7 +1521,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2422 + "line": 2423 }, "name": "rung", "type": { @@ -1542,7 +1546,7 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 49 + "line": 53 }, "parameters": [ { @@ -1551,7 +1555,7 @@ }, "name": "lhs", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } }, { @@ -1560,7 +1564,7 @@ }, "name": "rhs", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } } ] @@ -1571,7 +1575,7 @@ "kind": "class", "locationInModule": { "filename": "lib/calculator.ts", - "line": 43 + "line": 47 }, "methods": [ { @@ -1581,7 +1585,7 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 53 + "line": 60 }, "name": "hello", "overrides": "@scope/jsii-calc-lib.IFriendly", @@ -1602,11 +1606,11 @@ "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 49 + "line": 54 }, "name": "lhs", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } }, { @@ -1617,11 +1621,11 @@ "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 49 + "line": 55 }, "name": "rhs", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } } ] @@ -1642,7 +1646,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2767 + "line": 2768 }, "methods": [ { @@ -1651,7 +1655,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2768 + "line": 2769 }, "name": "check", "returns": { @@ -1669,7 +1673,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2785 + "line": 2786 }, "name": "giveItBack", "parameters": [ @@ -1709,7 +1713,7 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 287 + "line": 298 }, "parameters": [ { @@ -1727,7 +1731,7 @@ "kind": "class", "locationInModule": { "filename": "lib/calculator.ts", - "line": 282 + "line": 293 }, "methods": [ { @@ -1737,7 +1741,7 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 320 + "line": 331 }, "name": "add", "parameters": [ @@ -1756,7 +1760,7 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 327 + "line": 338 }, "name": "mul", "parameters": [ @@ -1775,7 +1779,7 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 341 + "line": 352 }, "name": "neg" }, @@ -1786,7 +1790,7 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 334 + "line": 345 }, "name": "pow", "parameters": [ @@ -1805,7 +1809,7 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 360 + "line": 371 }, "name": "readUnionValue", "returns": { @@ -1825,12 +1829,12 @@ "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 348 + "line": 359 }, "name": "expression", "overrides": "jsii-calc.composition.CompositeOperation", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } }, { @@ -1841,13 +1845,13 @@ "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 310 + "line": 321 }, "name": "operationsLog", "type": { "collection": { "elementtype": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" }, "kind": "array" } @@ -1861,7 +1865,7 @@ "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 305 + "line": 316 }, "name": "operationsMap", "type": { @@ -1869,7 +1873,7 @@ "elementtype": { "collection": { "elementtype": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" }, "kind": "array" } @@ -1885,11 +1889,11 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 300 + "line": 311 }, "name": "curr", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } }, { @@ -1899,7 +1903,7 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 315 + "line": 326 }, "name": "maxValue", "optional": true, @@ -1914,7 +1918,7 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 355 + "line": 366 }, "name": "unionProperty", "optional": true, @@ -1947,7 +1951,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/calculator.ts", - "line": 243 + "line": 254 }, "name": "CalculatorProps", "properties": [ @@ -1962,7 +1966,7 @@ "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 251 + "line": 262 }, "name": "initialValue", "optional": true, @@ -1980,7 +1984,7 @@ "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 258 + "line": 269 }, "name": "maximumValue", "optional": true, @@ -2003,7 +2007,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2501 + "line": 2502 }, "name": "ChildStruct982", "properties": [ @@ -2015,7 +2019,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2502 + "line": 2503 }, "name": "bar", "type": { @@ -2041,7 +2045,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1802 + "line": 1803 }, "name": "ClassThatImplementsTheInternalInterface", "properties": [ @@ -2051,7 +2055,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1806 + "line": 1807 }, "name": "a", "overrides": "jsii-calc.IAnotherPublicInterface", @@ -2065,7 +2069,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1807 + "line": 1808 }, "name": "b", "overrides": "jsii-calc.INonInternalInterface", @@ -2079,7 +2083,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1808 + "line": 1809 }, "name": "c", "overrides": "jsii-calc.INonInternalInterface", @@ -2093,7 +2097,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1809 + "line": 1810 }, "name": "d", "type": { @@ -2119,7 +2123,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1812 + "line": 1813 }, "name": "ClassThatImplementsThePrivateInterface", "properties": [ @@ -2129,7 +2133,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1814 + "line": 1815 }, "name": "a", "overrides": "jsii-calc.IAnotherPublicInterface", @@ -2143,7 +2147,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1815 + "line": 1816 }, "name": "b", "overrides": "jsii-calc.INonInternalInterface", @@ -2157,7 +2161,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1816 + "line": 1817 }, "name": "c", "overrides": "jsii-calc.INonInternalInterface", @@ -2171,7 +2175,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1817 + "line": 1818 }, "name": "e", "type": { @@ -2192,7 +2196,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2118 + "line": 2119 }, "parameters": [ { @@ -2222,7 +2226,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2108 + "line": 2109 }, "methods": [ { @@ -2231,7 +2235,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2123 + "line": 2124 }, "name": "createAList", "returns": { @@ -2252,7 +2256,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2127 + "line": 2128 }, "name": "createAMap", "returns": { @@ -2276,7 +2280,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2116 + "line": 2117 }, "name": "staticArray", "static": true, @@ -2295,7 +2299,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2112 + "line": 2113 }, "name": "staticMap", "static": true, @@ -2314,7 +2318,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2110 + "line": 2111 }, "name": "array", "type": { @@ -2332,7 +2336,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2109 + "line": 2110 }, "name": "map", "type": { @@ -2367,7 +2371,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1885 + "line": 1886 }, "name": "ClassWithDocs" }, @@ -2383,7 +2387,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2058 + "line": 2059 }, "parameters": [ { @@ -2397,7 +2401,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2055 + "line": 2056 }, "methods": [ { @@ -2406,7 +2410,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2062 + "line": 2063 }, "name": "import", "parameters": [ @@ -2433,7 +2437,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2056 + "line": 2057 }, "name": "int", "type": { @@ -2566,7 +2570,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2640 + "line": 2641 }, "methods": [ { @@ -2575,7 +2579,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2641 + "line": 2642 }, "name": "makeInstance", "returns": { @@ -2591,7 +2595,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2645 + "line": 2646 }, "name": "makeStructInstance", "returns": { @@ -2610,7 +2614,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2649 + "line": 2650 }, "name": "unionProperty", "optional": true, @@ -2653,7 +2657,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2653 + "line": 2654 }, "name": "ConfusingToJacksonStruct", "properties": [ @@ -2665,7 +2669,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2654 + "line": 2655 }, "name": "unionProperty", "optional": true, @@ -2710,7 +2714,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1842 + "line": 1843 }, "parameters": [ { @@ -2724,7 +2728,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1841 + "line": 1842 }, "name": "ConstructorPassesThisOut" }, @@ -2742,7 +2746,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1587 + "line": 1588 }, "methods": [ { @@ -2751,7 +2755,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1604 + "line": 1605 }, "name": "hiddenInterface", "returns": { @@ -2767,7 +2771,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1608 + "line": 1609 }, "name": "hiddenInterfaces", "returns": { @@ -2788,7 +2792,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1612 + "line": 1613 }, "name": "hiddenSubInterfaces", "returns": { @@ -2809,7 +2813,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1588 + "line": 1589 }, "name": "makeClass", "returns": { @@ -2825,7 +2829,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1592 + "line": 1593 }, "name": "makeInterface", "returns": { @@ -2841,7 +2845,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1596 + "line": 1597 }, "name": "makeInterface2", "returns": { @@ -2857,7 +2861,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1600 + "line": 1601 }, "name": "makeInterfaces", "returns": { @@ -2887,7 +2891,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2664 + "line": 2665 }, "parameters": [ { @@ -2901,7 +2905,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2663 + "line": 2664 }, "methods": [ { @@ -2910,7 +2914,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2666 + "line": 2667 }, "name": "workItBaby", "returns": { @@ -2938,7 +2942,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2306 + "line": 2307 }, "methods": [ { @@ -2949,7 +2953,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2312 + "line": 2313 }, "name": "staticImplementedByObjectLiteral", "parameters": [ @@ -2975,7 +2979,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2338 + "line": 2339 }, "name": "staticImplementedByPrivateClass", "parameters": [ @@ -3001,7 +3005,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2327 + "line": 2328 }, "name": "staticImplementedByPublicClass", "parameters": [ @@ -3027,7 +3031,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2349 + "line": 2350 }, "name": "staticWhenTypedAsClass", "parameters": [ @@ -3053,7 +3057,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2359 + "line": 2360 }, "name": "implementedByObjectLiteral", "parameters": [ @@ -3078,7 +3082,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2385 + "line": 2386 }, "name": "implementedByPrivateClass", "parameters": [ @@ -3103,7 +3107,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2374 + "line": 2375 }, "name": "implementedByPublicClass", "parameters": [ @@ -3128,7 +3132,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2396 + "line": 2397 }, "name": "whenTypedAsClass", "parameters": [ @@ -3162,7 +3166,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1820 + "line": 1821 }, "methods": [ { @@ -3171,7 +3175,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1821 + "line": 1822 }, "name": "consumeAnotherPublicInterface", "parameters": [ @@ -3194,7 +3198,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1825 + "line": 1826 }, "name": "consumeNonInternalInterface", "parameters": [ @@ -3229,7 +3233,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1981 + "line": 1982 }, "methods": [ { @@ -3238,7 +3242,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1982 + "line": 1983 }, "name": "render", "parameters": [ @@ -3262,7 +3266,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1988 + "line": 1989 }, "name": "renderArbitrary", "parameters": [ @@ -3290,7 +3294,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1992 + "line": 1993 }, "name": "renderMap", "parameters": [ @@ -3327,7 +3331,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 318 + "line": 317 }, "parameters": [ { @@ -3356,7 +3360,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 317 + "line": 316 }, "name": "DefaultedConstructorArgument", "properties": [ @@ -3367,7 +3371,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 319 + "line": 318 }, "name": "arg1", "type": { @@ -3381,7 +3385,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 321 + "line": 320 }, "name": "arg3", "type": { @@ -3395,7 +3399,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 320 + "line": 319 }, "name": "arg2", "optional": true, @@ -3421,7 +3425,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2508 + "line": 2509 }, "methods": [ { @@ -3431,7 +3435,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2515 + "line": 2516 }, "name": "takeThis", "returns": { @@ -3448,7 +3452,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2520 + "line": 2521 }, "name": "takeThisToo", "returns": { @@ -3622,7 +3626,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 326 + "line": 325 }, "name": "Base", "namespace": "DerivedClassHasNoProperties", @@ -3633,7 +3637,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 327 + "line": 326 }, "name": "prop", "type": { @@ -3657,7 +3661,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 330 + "line": 329 }, "name": "Derived", "namespace": "DerivedClassHasNoProperties" @@ -3676,7 +3680,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 541 + "line": 540 }, "name": "DerivedStruct", "properties": [ @@ -3688,7 +3692,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 547 + "line": 546 }, "name": "anotherRequired", "type": { @@ -3703,7 +3707,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 546 + "line": 545 }, "name": "bool", "type": { @@ -3719,7 +3723,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 545 + "line": 544 }, "name": "nonPrimitive", "type": { @@ -3735,14 +3739,14 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 553 + "line": 552 }, "name": "anotherOptional", "optional": true, "type": { "collection": { "elementtype": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" }, "kind": "map" } @@ -3756,7 +3760,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 549 + "line": 548 }, "name": "optionalAny", "optional": true, @@ -3772,7 +3776,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 548 + "line": 547 }, "name": "optionalArray", "optional": true, @@ -3797,7 +3801,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2026 + "line": 2027 }, "name": "DiamondInheritanceBaseLevelStruct", "properties": [ @@ -3809,7 +3813,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2027 + "line": 2028 }, "name": "baseLevelProperty", "type": { @@ -3831,7 +3835,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2030 + "line": 2031 }, "name": "DiamondInheritanceFirstMidLevelStruct", "properties": [ @@ -3843,7 +3847,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2032 + "line": 2033 }, "name": "firstMidLevelProperty", "type": { @@ -3865,7 +3869,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2035 + "line": 2036 }, "name": "DiamondInheritanceSecondMidLevelStruct", "properties": [ @@ -3877,7 +3881,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2037 + "line": 2038 }, "name": "secondMidLevelProperty", "type": { @@ -3900,7 +3904,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2040 + "line": 2041 }, "name": "DiamondInheritanceTopLevelStruct", "properties": [ @@ -3912,7 +3916,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2043 + "line": 2044 }, "name": "topLevelProperty", "type": { @@ -3932,7 +3936,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2530 + "line": 2531 }, "name": "DisappointingCollectionSource", "properties": [ @@ -3946,7 +3950,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2532 + "line": 2533 }, "name": "maybeList", "optional": true, @@ -3970,7 +3974,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2534 + "line": 2535 }, "name": "maybeMap", "optional": true, @@ -4239,7 +4243,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 485 + "line": 484 }, "methods": [ { @@ -4249,7 +4253,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 490 + "line": 489 }, "name": "hello", "overrides": "@scope/jsii-calc-lib.IFriendly", @@ -4266,7 +4270,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 486 + "line": 485 }, "name": "next", "overrides": "jsii-calc.IRandomNumberGenerator", @@ -4279,6 +4283,142 @@ ], "name": "DoubleTrouble" }, + "jsii-calc.DynamicPropertyBearer": { + "assembly": "jsii-calc", + "docs": { + "stability": "experimental", + "summary": "Ensures we can override a dynamic property that was inherited." + }, + "fqn": "jsii-calc.DynamicPropertyBearer", + "initializer": { + "docs": { + "stability": "experimental" + }, + "locationInModule": { + "filename": "lib/compliance.ts", + "line": 2795 + }, + "parameters": [ + { + "name": "valueStore", + "type": { + "primitive": "string" + } + } + ] + }, + "kind": "class", + "locationInModule": { + "filename": "lib/compliance.ts", + "line": 2794 + }, + "name": "DynamicPropertyBearer", + "properties": [ + { + "docs": { + "stability": "experimental" + }, + "locationInModule": { + "filename": "lib/compliance.ts", + "line": 2797 + }, + "name": "dynamicProperty", + "type": { + "primitive": "string" + } + }, + { + "docs": { + "stability": "experimental" + }, + "locationInModule": { + "filename": "lib/compliance.ts", + "line": 2795 + }, + "name": "valueStore", + "type": { + "primitive": "string" + } + } + ] + }, + "jsii-calc.DynamicPropertyBearerChild": { + "assembly": "jsii-calc", + "base": "jsii-calc.DynamicPropertyBearer", + "docs": { + "stability": "experimental" + }, + "fqn": "jsii-calc.DynamicPropertyBearerChild", + "initializer": { + "docs": { + "stability": "experimental" + }, + "locationInModule": { + "filename": "lib/compliance.ts", + "line": 2806 + }, + "parameters": [ + { + "name": "originalValue", + "type": { + "primitive": "string" + } + } + ] + }, + "kind": "class", + "locationInModule": { + "filename": "lib/compliance.ts", + "line": 2805 + }, + "methods": [ + { + "docs": { + "returns": "the old value that was set.", + "stability": "experimental", + "summary": "Sets `this.dynamicProperty` to the new value, and returns the old value." + }, + "locationInModule": { + "filename": "lib/compliance.ts", + "line": 2817 + }, + "name": "overrideValue", + "parameters": [ + { + "docs": { + "summary": "the new value to be set." + }, + "name": "newValue", + "type": { + "primitive": "string" + } + } + ], + "returns": { + "type": { + "primitive": "string" + } + } + } + ], + "name": "DynamicPropertyBearerChild", + "properties": [ + { + "docs": { + "stability": "experimental" + }, + "immutable": true, + "locationInModule": { + "filename": "lib/compliance.ts", + "line": 2806 + }, + "name": "originalValue", + "type": { + "primitive": "string" + } + } + ] + }, "jsii-calc.EnumDispenser": { "assembly": "jsii-calc", "docs": { @@ -4288,7 +4428,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 45 + "line": 44 }, "methods": [ { @@ -4297,7 +4437,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 51 + "line": 50 }, "name": "randomIntegerLikeEnum", "returns": { @@ -4313,7 +4453,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 46 + "line": 45 }, "name": "randomStringLikeEnum", "returns": { @@ -4340,7 +4480,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1643 + "line": 1644 }, "methods": [ { @@ -4351,7 +4491,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1648 + "line": 1649 }, "name": "doesKeyExist", "parameters": [ @@ -4382,7 +4522,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1668 + "line": 1669 }, "name": "prop1IsNull", "returns": { @@ -4404,7 +4544,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1658 + "line": 1659 }, "name": "prop2IsUndefined", "returns": { @@ -4432,7 +4572,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1638 + "line": 1639 }, "name": "EraseUndefinedHashValuesOptions", "properties": [ @@ -4444,7 +4584,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1639 + "line": 1640 }, "name": "option1", "optional": true, @@ -4460,7 +4600,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1640 + "line": 1641 }, "name": "option2", "optional": true, @@ -4663,7 +4803,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1757 + "line": 1758 }, "name": "ExtendsInternalInterface", "properties": [ @@ -4675,7 +4815,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1758 + "line": 1759 }, "name": "boom", "type": { @@ -4690,7 +4830,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1698 + "line": 1699 }, "name": "prop", "type": { @@ -4880,7 +5020,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 556 + "line": 555 }, "methods": [ { @@ -4890,7 +5030,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 574 + "line": 573 }, "name": "derivedToFirst", "parameters": [ @@ -4914,7 +5054,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 567 + "line": 566 }, "name": "readDerivedNonPrimitive", "parameters": [ @@ -4938,7 +5078,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 560 + "line": 559 }, "name": "readFirstNumber", "parameters": [ @@ -4965,7 +5105,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 578 + "line": 577 }, "name": "structLiteral", "type": { @@ -5023,7 +5163,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 532 + "line": 531 }, "methods": [ { @@ -5032,7 +5172,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 533 + "line": 532 }, "name": "betterGreeting", "parameters": [ @@ -5062,7 +5202,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2208 + "line": 2209 }, "methods": [ { @@ -5072,7 +5212,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2210 + "line": 2211 }, "name": "provideAsClass", "returns": { @@ -5088,7 +5228,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2209 + "line": 2210 }, "name": "provideAsInterface", "returns": { @@ -5109,7 +5249,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2227 + "line": 2228 }, "methods": [ { @@ -5119,7 +5259,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2229 + "line": 2230 }, "name": "verb", "returns": { @@ -5139,7 +5279,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2228 + "line": 2229 }, "name": "value", "type": { @@ -5157,7 +5297,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1778 + "line": 1779 }, "name": "IAnotherPublicInterface", "properties": [ @@ -5168,7 +5308,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1779 + "line": 1780 }, "name": "a", "type": { @@ -5186,7 +5326,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2417 + "line": 2418 }, "methods": [ { @@ -5196,7 +5336,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2418 + "line": 2419 }, "name": "ring" } @@ -5213,7 +5353,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2406 + "line": 2407 }, "methods": [ { @@ -5223,7 +5363,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2407 + "line": 2408 }, "name": "yourTurn", "parameters": [ @@ -5248,7 +5388,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2413 + "line": 2414 }, "methods": [ { @@ -5258,7 +5398,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2414 + "line": 2415 }, "name": "yourTurn", "parameters": [ @@ -5371,7 +5511,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1769 + "line": 1770 }, "name": "IExtendsPrivateInterface", "properties": [ @@ -5383,7 +5523,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1770 + "line": 1771 }, "name": "moreThings", "type": { @@ -5402,7 +5542,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1754 + "line": 1755 }, "name": "private", "type": { @@ -5476,7 +5616,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/calculator.ts", - "line": 12 + "line": 16 }, "methods": [ { @@ -5487,7 +5627,7 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 22 + "line": 26 }, "name": "farewell", "returns": { @@ -5505,7 +5645,7 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 17 + "line": 21 }, "name": "goodbye", "returns": { @@ -5530,7 +5670,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/calculator.ts", - "line": 36 + "line": 40 }, "name": "IFriendlyRandomGenerator" }, @@ -5544,7 +5684,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1242 + "line": 1241 }, "name": "IInterfaceImplementedByAbstractClass", "properties": [ @@ -5556,7 +5696,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1243 + "line": 1242 }, "name": "propFromInterface", "type": { @@ -5608,7 +5748,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1709 + "line": 1710 }, "methods": [ { @@ -5618,7 +5758,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1710 + "line": 1711 }, "name": "visible" } @@ -5678,7 +5818,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1220 + "line": 1219 }, "methods": [ { @@ -5688,7 +5828,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1221 + "line": 1220 }, "name": "hello", "parameters": [ @@ -5719,7 +5859,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 586 + "line": 585 }, "name": "IInterfaceWithProperties", "properties": [ @@ -5731,7 +5871,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 587 + "line": 586 }, "name": "readOnlyString", "type": { @@ -5745,7 +5885,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 588 + "line": 587 }, "name": "readWriteString", "type": { @@ -5766,7 +5906,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 591 + "line": 590 }, "name": "IInterfaceWithPropertiesExtension", "properties": [ @@ -5777,7 +5917,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 593 + "line": 592 }, "name": "foo", "type": { @@ -5921,7 +6061,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/erasures.ts", - "line": 64 + "line": 65 }, "name": "IJsii496" }, @@ -5966,7 +6106,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1787 + "line": 1788 }, "name": "INonInternalInterface", "properties": [ @@ -5977,7 +6117,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1784 + "line": 1785 }, "name": "b", "type": { @@ -5991,7 +6131,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1788 + "line": 1789 }, "name": "c", "type": { @@ -6010,7 +6150,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2542 + "line": 2543 }, "methods": [ { @@ -6020,7 +6160,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2544 + "line": 2545 }, "name": "wasSet", "returns": { @@ -6039,7 +6179,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2543 + "line": 2544 }, "name": "property", "type": { @@ -6058,7 +6198,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2731 + "line": 2732 }, "methods": [ { @@ -6068,7 +6208,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2732 + "line": 2733 }, "name": "optional", "returns": { @@ -6120,7 +6260,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1558 + "line": 1559 }, "methods": [ { @@ -6130,7 +6270,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1559 + "line": 1560 }, "name": "bye", "returns": { @@ -6151,7 +6291,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1562 + "line": 1563 }, "methods": [ { @@ -6161,7 +6301,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1563 + "line": 1564 }, "name": "ciao", "returns": { @@ -6183,7 +6323,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/calculator.ts", - "line": 28 + "line": 32 }, "methods": [ { @@ -6195,7 +6335,7 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 33 + "line": 37 }, "name": "next", "returns": { @@ -6217,7 +6357,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2473 + "line": 2474 }, "name": "IReturnJsii976", "properties": [ @@ -6229,7 +6369,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2474 + "line": 2475 }, "name": "foo", "type": { @@ -6247,7 +6387,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 639 + "line": 638 }, "methods": [ { @@ -6257,7 +6397,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 640 + "line": 639 }, "name": "obtainNumber", "returns": { @@ -6277,7 +6417,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 642 + "line": 641 }, "name": "numberProp", "type": { @@ -6339,7 +6479,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2660 + "line": 2661 }, "methods": [ { @@ -6349,7 +6489,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2661 + "line": 2662 }, "name": "returnStruct", "returns": { @@ -6375,7 +6515,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1761 + "line": 1762 }, "name": "ImplementInternalInterface", "properties": [ @@ -6385,7 +6525,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1762 + "line": 1763 }, "name": "prop", "type": { @@ -6408,7 +6548,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2224 + "line": 2225 }, "name": "Implementation", "properties": [ @@ -6419,7 +6559,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2225 + "line": 2226 }, "name": "value", "type": { @@ -6445,7 +6585,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1716 + "line": 1717 }, "methods": [ { @@ -6454,7 +6594,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1717 + "line": 1718 }, "name": "visible", "overrides": "jsii-calc.IInterfaceWithInternal" @@ -6477,7 +6617,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1735 + "line": 1736 }, "name": "ImplementsInterfaceWithInternalSubclass" }, @@ -6495,7 +6635,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1765 + "line": 1766 }, "name": "ImplementsPrivateInterface", "properties": [ @@ -6505,7 +6645,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1766 + "line": 1767 }, "name": "private", "type": { @@ -6527,7 +6667,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1176 + "line": 1175 }, "name": "ImplictBaseOfBase", "properties": [ @@ -6539,7 +6679,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1177 + "line": 1176 }, "name": "goo", "type": { @@ -6566,7 +6706,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1565 + "line": 1566 }, "methods": [ { @@ -6575,7 +6715,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1566 + "line": 1567 }, "name": "ciao", "overrides": "jsii-calc.IPublicInterface2", @@ -6599,7 +6739,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2694 + "line": 2695 }, "methods": [ { @@ -6608,7 +6748,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2705 + "line": 2706 }, "name": "listOfInterfaces", "returns": { @@ -6629,7 +6769,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2695 + "line": 2696 }, "name": "listOfStructs", "returns": { @@ -6650,7 +6790,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2715 + "line": 2716 }, "name": "mapOfInterfaces", "returns": { @@ -6671,7 +6811,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2699 + "line": 2700 }, "name": "mapOfStructs", "returns": { @@ -6703,7 +6843,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1207 + "line": 1206 }, "name": "Foo", "namespace": "InterfaceInNamespaceIncludesClasses", @@ -6714,7 +6854,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1208 + "line": 1207 }, "name": "bar", "optional": true, @@ -6734,7 +6874,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1211 + "line": 1210 }, "name": "Hello", "namespace": "InterfaceInNamespaceIncludesClasses", @@ -6747,7 +6887,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1212 + "line": 1211 }, "name": "foo", "type": { @@ -6766,7 +6906,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1201 + "line": 1200 }, "name": "Hello", "namespace": "InterfaceInNamespaceOnlyInterface", @@ -6779,7 +6919,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1202 + "line": 1201 }, "name": "foo", "type": { @@ -6798,7 +6938,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2096 + "line": 2097 }, "methods": [ { @@ -6807,7 +6947,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2097 + "line": 2098 }, "name": "makeInterfaces", "parameters": [ @@ -6850,7 +6990,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2741 + "line": 2742 }, "methods": [ { @@ -6859,7 +6999,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2742 + "line": 2743 }, "name": "myself", "returns": { @@ -7017,7 +7157,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 517 + "line": 516 }, "methods": [ { @@ -7026,7 +7166,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 518 + "line": 517 }, "name": "giveMeFriendly", "returns": { @@ -7041,7 +7181,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 524 + "line": 523 }, "name": "giveMeFriendlyGenerator", "returns": { @@ -7067,7 +7207,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 247 + "line": 246 }, "methods": [ { @@ -7076,7 +7216,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 248 + "line": 247 }, "name": "returnLiteral", "returns": { @@ -7102,7 +7242,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 256 + "line": 255 }, "name": "JSObjectLiteralToNativeClass", "properties": [ @@ -7112,7 +7252,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 257 + "line": 256 }, "name": "propA", "type": { @@ -7125,7 +7265,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 258 + "line": 257 }, "name": "propB", "type": { @@ -7148,7 +7288,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 745 + "line": 744 }, "methods": [ { @@ -7157,7 +7297,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 746 + "line": 745 }, "name": "abstract" }, @@ -7167,7 +7307,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 750 + "line": 749 }, "name": "assert" }, @@ -7177,7 +7317,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 754 + "line": 753 }, "name": "boolean" }, @@ -7187,7 +7327,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 758 + "line": 757 }, "name": "break" }, @@ -7197,7 +7337,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 762 + "line": 761 }, "name": "byte" }, @@ -7207,7 +7347,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 766 + "line": 765 }, "name": "case" }, @@ -7217,7 +7357,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 770 + "line": 769 }, "name": "catch" }, @@ -7227,7 +7367,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 774 + "line": 773 }, "name": "char" }, @@ -7237,7 +7377,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 778 + "line": 777 }, "name": "class" }, @@ -7247,7 +7387,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 782 + "line": 781 }, "name": "const" }, @@ -7257,7 +7397,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 786 + "line": 785 }, "name": "continue" }, @@ -7267,7 +7407,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 790 + "line": 789 }, "name": "default" }, @@ -7277,7 +7417,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 798 + "line": 797 }, "name": "do" }, @@ -7287,7 +7427,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 794 + "line": 793 }, "name": "double" }, @@ -7297,7 +7437,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 802 + "line": 801 }, "name": "else" }, @@ -7307,7 +7447,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 806 + "line": 805 }, "name": "enum" }, @@ -7317,7 +7457,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 810 + "line": 809 }, "name": "extends" }, @@ -7327,7 +7467,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 814 + "line": 813 }, "name": "false" }, @@ -7337,7 +7477,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 818 + "line": 817 }, "name": "final" }, @@ -7347,7 +7487,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 822 + "line": 821 }, "name": "finally" }, @@ -7357,7 +7497,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 826 + "line": 825 }, "name": "float" }, @@ -7367,7 +7507,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 830 + "line": 829 }, "name": "for" }, @@ -7377,7 +7517,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 834 + "line": 833 }, "name": "goto" }, @@ -7387,7 +7527,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 838 + "line": 837 }, "name": "if" }, @@ -7397,7 +7537,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 842 + "line": 841 }, "name": "implements" }, @@ -7407,7 +7547,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 846 + "line": 845 }, "name": "import" }, @@ -7417,7 +7557,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 850 + "line": 849 }, "name": "instanceof" }, @@ -7427,7 +7567,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 854 + "line": 853 }, "name": "int" }, @@ -7437,7 +7577,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 858 + "line": 857 }, "name": "interface" }, @@ -7447,7 +7587,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 862 + "line": 861 }, "name": "long" }, @@ -7457,7 +7597,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 866 + "line": 865 }, "name": "native" }, @@ -7467,7 +7607,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 870 + "line": 869 }, "name": "new" }, @@ -7477,7 +7617,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 874 + "line": 873 }, "name": "null" }, @@ -7487,7 +7627,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 878 + "line": 877 }, "name": "package" }, @@ -7497,7 +7637,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 882 + "line": 881 }, "name": "private" }, @@ -7507,7 +7647,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 886 + "line": 885 }, "name": "protected" }, @@ -7517,7 +7657,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 890 + "line": 889 }, "name": "public" }, @@ -7527,7 +7667,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 894 + "line": 893 }, "name": "return" }, @@ -7537,7 +7677,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 898 + "line": 897 }, "name": "short" }, @@ -7547,7 +7687,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 902 + "line": 901 }, "name": "static" }, @@ -7557,7 +7697,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 906 + "line": 905 }, "name": "strictfp" }, @@ -7567,7 +7707,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 910 + "line": 909 }, "name": "super" }, @@ -7577,7 +7717,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 914 + "line": 913 }, "name": "switch" }, @@ -7587,7 +7727,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 918 + "line": 917 }, "name": "synchronized" }, @@ -7597,7 +7737,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 922 + "line": 921 }, "name": "this" }, @@ -7607,7 +7747,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 926 + "line": 925 }, "name": "throw" }, @@ -7617,7 +7757,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 930 + "line": 929 }, "name": "throws" }, @@ -7627,7 +7767,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 934 + "line": 933 }, "name": "transient" }, @@ -7637,7 +7777,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 938 + "line": 937 }, "name": "true" }, @@ -7647,7 +7787,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 942 + "line": 941 }, "name": "try" }, @@ -7657,7 +7797,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 946 + "line": 945 }, "name": "void" }, @@ -7667,7 +7807,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 950 + "line": 949 }, "name": "volatile" } @@ -7680,7 +7820,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 954 + "line": 953 }, "name": "while", "type": { @@ -7728,7 +7868,7 @@ "kind": "class", "locationInModule": { "filename": "lib/erasures.ts", - "line": 66 + "line": 67 }, "name": "Jsii496Derived" }, @@ -7747,7 +7887,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1528 + "line": 1529 }, "name": "JsiiAgent", "properties": [ @@ -7759,9 +7899,9 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1532 + "line": 1533 }, - "name": "jsiiAgent", + "name": "value", "optional": true, "static": true, "type": { @@ -7781,7 +7921,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2575 + "line": 2576 }, "methods": [ { @@ -7790,7 +7930,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2620 + "line": 2621 }, "name": "anyArray", "returns": { @@ -7806,7 +7946,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2616 + "line": 2617 }, "name": "anyBooleanFalse", "returns": { @@ -7822,7 +7962,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2612 + "line": 2613 }, "name": "anyBooleanTrue", "returns": { @@ -7838,7 +7978,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2592 + "line": 2593 }, "name": "anyDate", "returns": { @@ -7854,7 +7994,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2608 + "line": 2609 }, "name": "anyEmptyString", "returns": { @@ -7870,7 +8010,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2588 + "line": 2589 }, "name": "anyFunction", "returns": { @@ -7886,7 +8026,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2624 + "line": 2625 }, "name": "anyHash", "returns": { @@ -7902,7 +8042,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2580 + "line": 2581 }, "name": "anyNull", "returns": { @@ -7918,7 +8058,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2596 + "line": 2597 }, "name": "anyNumber", "returns": { @@ -7934,7 +8074,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2628 + "line": 2629 }, "name": "anyRef", "returns": { @@ -7950,7 +8090,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2604 + "line": 2605 }, "name": "anyString", "returns": { @@ -7966,7 +8106,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2584 + "line": 2585 }, "name": "anyUndefined", "returns": { @@ -7982,7 +8122,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2600 + "line": 2601 }, "name": "anyZero", "returns": { @@ -7998,7 +8138,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2576 + "line": 2577 }, "name": "stringify", "parameters": [ @@ -8145,7 +8285,7 @@ "kind": "class", "locationInModule": { "filename": "lib/calculator.ts", - "line": 396 + "line": 407 }, "methods": [ { @@ -8154,7 +8294,7 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 397 + "line": 408 }, "name": "property", "returns": { @@ -8173,7 +8313,7 @@ "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 401 + "line": 412 }, "name": "elite", "type": { @@ -8197,7 +8337,7 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 49 + "line": 53 }, "parameters": [ { @@ -8206,7 +8346,7 @@ }, "name": "lhs", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } }, { @@ -8215,7 +8355,7 @@ }, "name": "rhs", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } } ] @@ -8227,7 +8367,7 @@ "kind": "class", "locationInModule": { "filename": "lib/calculator.ts", - "line": 74 + "line": 81 }, "methods": [ { @@ -8237,7 +8377,7 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 88 + "line": 96 }, "name": "farewell", "overrides": "jsii-calc.IFriendlier", @@ -8254,7 +8394,7 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 84 + "line": 92 }, "name": "goodbye", "overrides": "jsii-calc.IFriendlier", @@ -8271,7 +8411,7 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 92 + "line": 100 }, "name": "next", "overrides": "jsii-calc.IRandomNumberGenerator", @@ -8288,7 +8428,7 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 80 + "line": 88 }, "name": "toString", "overrides": "@scope/jsii-calc-lib.Operation", @@ -8309,10 +8449,10 @@ "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 76 + "line": 84 }, "name": "value", - "overrides": "@scope/jsii-calc-lib.Value", + "overrides": "@scope/jsii-calc-lib.NumericValue", "type": { "primitive": "number" } @@ -8333,13 +8473,13 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 101 + "line": 109 }, "parameters": [ { "name": "operand", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } } ] @@ -8350,7 +8490,7 @@ "kind": "class", "locationInModule": { "filename": "lib/calculator.ts", - "line": 109 + "line": 117 }, "methods": [ { @@ -8360,7 +8500,7 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 126 + "line": 134 }, "name": "farewell", "overrides": "jsii-calc.IFriendlier", @@ -8377,7 +8517,7 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 122 + "line": 130 }, "name": "goodbye", "overrides": "jsii-calc.IFriendlier", @@ -8394,7 +8534,7 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 118 + "line": 126 }, "name": "hello", "overrides": "@scope/jsii-calc-lib.IFriendly", @@ -8411,7 +8551,7 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 114 + "line": 122 }, "name": "toString", "overrides": "@scope/jsii-calc-lib.Operation", @@ -8432,10 +8572,10 @@ "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 110 + "line": 118 }, "name": "value", - "overrides": "@scope/jsii-calc-lib.Value", + "overrides": "@scope/jsii-calc-lib.NumericValue", "type": { "primitive": "number" } @@ -8483,7 +8623,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2449 + "line": 2450 }, "name": "NestedStruct", "properties": [ @@ -8496,7 +8636,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2453 + "line": 2454 }, "name": "numberProp", "type": { @@ -8520,7 +8660,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1126 + "line": 1125 }, "methods": [ { @@ -8531,7 +8671,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1157 + "line": 1156 }, "name": "cryptoSha256", "returns": { @@ -8549,7 +8689,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1131 + "line": 1130 }, "name": "fsReadFile", "returns": { @@ -8566,7 +8706,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1140 + "line": 1139 }, "name": "fsReadFileSync", "returns": { @@ -8586,7 +8726,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1149 + "line": 1148 }, "name": "osPlatform", "type": { @@ -8763,7 +8903,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 506 + "line": 505 }, "parameters": [ { @@ -8777,7 +8917,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 505 + "line": 504 }, "methods": [ { @@ -8786,7 +8926,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 512 + "line": 511 }, "name": "isSameGenerator", "parameters": [ @@ -8809,7 +8949,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 508 + "line": 507 }, "name": "nextTimes100", "returns": { @@ -8827,7 +8967,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 506 + "line": 505 }, "name": "generator", "type": { @@ -8851,7 +8991,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 264 + "line": 263 }, "methods": [ { @@ -8861,7 +9001,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 268 + "line": 267 }, "name": "sumFromArray", "parameters": [ @@ -8870,7 +9010,7 @@ "type": { "collection": { "elementtype": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" }, "kind": "array" } @@ -8890,7 +9030,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 279 + "line": 278 }, "name": "sumFromMap", "parameters": [ @@ -8899,7 +9039,7 @@ "type": { "collection": { "elementtype": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" }, "kind": "map" } @@ -8924,7 +9064,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2546 + "line": 2547 }, "methods": [ { @@ -8933,7 +9073,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2547 + "line": 2548 }, "name": "provide", "returns": { @@ -8991,7 +9131,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1224 + "line": 1223 }, "parameters": [ { @@ -9005,7 +9145,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1223 + "line": 1222 }, "methods": [ { @@ -9014,7 +9154,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1232 + "line": 1231 }, "name": "invokeWithOptional" }, @@ -9024,7 +9164,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1228 + "line": 1227 }, "name": "invokeWithoutOptional" } @@ -9043,7 +9183,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 310 + "line": 309 }, "parameters": [ { @@ -9070,7 +9210,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 309 + "line": 308 }, "name": "OptionalConstructorArgument", "properties": [ @@ -9081,7 +9221,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 311 + "line": 310 }, "name": "arg1", "type": { @@ -9095,7 +9235,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 312 + "line": 311 }, "name": "arg2", "type": { @@ -9109,7 +9249,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 313 + "line": 312 }, "name": "arg3", "optional": true, @@ -9129,7 +9269,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1867 + "line": 1868 }, "name": "OptionalStruct", "properties": [ @@ -9141,7 +9281,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1868 + "line": 1869 }, "name": "field", "optional": true, @@ -9163,7 +9303,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1862 + "line": 1863 }, "parameters": [ { @@ -9178,7 +9318,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1858 + "line": 1859 }, "name": "OptionalStructConsumer", "properties": [ @@ -9189,7 +9329,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1859 + "line": 1860 }, "name": "parameterWasUndefined", "type": { @@ -9203,7 +9343,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1860 + "line": 1861 }, "name": "fieldValue", "optional": true, @@ -9228,7 +9368,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2135 + "line": 2136 }, "methods": [ { @@ -9237,7 +9377,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2147 + "line": 2148 }, "name": "overrideMe", "protected": true, @@ -9253,7 +9393,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2143 + "line": 2144 }, "name": "switchModes" }, @@ -9263,7 +9403,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2139 + "line": 2140 }, "name": "valueFromProtected", "returns": { @@ -9282,7 +9422,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2136 + "line": 2137 }, "name": "overrideReadOnly", "protected": true, @@ -9296,7 +9436,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2137 + "line": 2138 }, "name": "overrideReadWrite", "protected": true, @@ -9320,7 +9460,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 645 + "line": 644 }, "methods": [ { @@ -9329,7 +9469,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 646 + "line": 645 }, "name": "test", "parameters": [ @@ -9360,7 +9500,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2498 + "line": 2499 }, "name": "ParentStruct982", "properties": [ @@ -9372,7 +9512,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2499 + "line": 2500 }, "name": "foo", "type": { @@ -9396,7 +9536,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1833 + "line": 1834 }, "methods": [ { @@ -9406,7 +9546,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1834 + "line": 1835 }, "name": "consumePartiallyInitializedThis", "parameters": [ @@ -9452,7 +9592,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 495 + "line": 494 }, "methods": [ { @@ -9461,7 +9601,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 496 + "line": 495 }, "name": "sayHello", "parameters": [ @@ -9496,7 +9636,7 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 227 + "line": 235 }, "parameters": [ { @@ -9505,7 +9645,7 @@ }, "name": "base", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } }, { @@ -9514,7 +9654,7 @@ }, "name": "pow", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } } ] @@ -9522,7 +9662,7 @@ "kind": "class", "locationInModule": { "filename": "lib/calculator.ts", - "line": 221 + "line": 229 }, "name": "Power", "properties": [ @@ -9534,11 +9674,11 @@ "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 227 + "line": 236 }, "name": "base", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } }, { @@ -9550,12 +9690,12 @@ "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 231 + "line": 242 }, "name": "expression", "overrides": "jsii-calc.composition.CompositeOperation", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } }, { @@ -9566,11 +9706,11 @@ "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 227 + "line": 237 }, "name": "pow", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } } ] @@ -9590,7 +9730,7 @@ "kind": "class", "locationInModule": { "filename": "lib/calculator.ts", - "line": 392 + "line": 403 }, "name": "PropertyNamedProperty", "properties": [ @@ -9601,7 +9741,7 @@ "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 393 + "line": 404 }, "name": "property", "type": { @@ -9615,7 +9755,7 @@ "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 394 + "line": 405 }, "name": "yetAnoterOne", "type": { @@ -9638,7 +9778,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1553 + "line": 1554 }, "methods": [ { @@ -9647,7 +9787,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1554 + "line": 1555 }, "name": "hello" } @@ -9668,7 +9808,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 957 + "line": 956 }, "methods": [ { @@ -9677,7 +9817,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 958 + "line": 957 }, "name": "and" }, @@ -9687,7 +9827,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 962 + "line": 961 }, "name": "as" }, @@ -9697,7 +9837,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 966 + "line": 965 }, "name": "assert" }, @@ -9707,7 +9847,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 970 + "line": 969 }, "name": "async" }, @@ -9717,7 +9857,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 974 + "line": 973 }, "name": "await" }, @@ -9727,7 +9867,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 978 + "line": 977 }, "name": "break" }, @@ -9737,7 +9877,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 982 + "line": 981 }, "name": "class" }, @@ -9747,7 +9887,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 986 + "line": 985 }, "name": "continue" }, @@ -9757,7 +9897,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 990 + "line": 989 }, "name": "def" }, @@ -9767,7 +9907,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 994 + "line": 993 }, "name": "del" }, @@ -9777,7 +9917,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 998 + "line": 997 }, "name": "elif" }, @@ -9787,7 +9927,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1002 + "line": 1001 }, "name": "else" }, @@ -9797,7 +9937,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1006 + "line": 1005 }, "name": "except" }, @@ -9807,7 +9947,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1010 + "line": 1009 }, "name": "finally" }, @@ -9817,7 +9957,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1014 + "line": 1013 }, "name": "for" }, @@ -9827,7 +9967,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1018 + "line": 1017 }, "name": "from" }, @@ -9837,7 +9977,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1022 + "line": 1021 }, "name": "global" }, @@ -9847,7 +9987,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1026 + "line": 1025 }, "name": "if" }, @@ -9857,7 +9997,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1030 + "line": 1029 }, "name": "import" }, @@ -9867,7 +10007,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1034 + "line": 1033 }, "name": "in" }, @@ -9877,7 +10017,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1038 + "line": 1037 }, "name": "is" }, @@ -9887,7 +10027,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1042 + "line": 1041 }, "name": "lambda" }, @@ -9897,7 +10037,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1046 + "line": 1045 }, "name": "nonlocal" }, @@ -9907,7 +10047,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1050 + "line": 1049 }, "name": "not" }, @@ -9917,7 +10057,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1054 + "line": 1053 }, "name": "or" }, @@ -9927,7 +10067,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1058 + "line": 1057 }, "name": "pass" }, @@ -9937,7 +10077,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1062 + "line": 1061 }, "name": "raise" }, @@ -9947,7 +10087,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1066 + "line": 1065 }, "name": "return" }, @@ -9957,7 +10097,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1070 + "line": 1069 }, "name": "try" }, @@ -9967,7 +10107,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1074 + "line": 1073 }, "name": "while" }, @@ -9977,7 +10117,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1078 + "line": 1077 }, "name": "with" }, @@ -9987,7 +10127,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1082 + "line": 1081 }, "name": "yield" } @@ -10006,7 +10146,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1092 + "line": 1091 }, "parameters": [ { @@ -10020,7 +10160,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1091 + "line": 1090 }, "methods": [ { @@ -10029,7 +10169,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1094 + "line": 1093 }, "name": "method", "parameters": [ @@ -10057,7 +10197,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1092 + "line": 1091 }, "name": "self", "type": { @@ -10078,7 +10218,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1100 + "line": 1099 }, "parameters": [ { @@ -10092,7 +10232,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1099 + "line": 1098 }, "name": "ClassWithSelfKwarg", "namespace": "PythonSelf", @@ -10104,7 +10244,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1100 + "line": 1099 }, "name": "props", "type": { @@ -10122,7 +10262,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1107 + "line": 1106 }, "methods": [ { @@ -10132,7 +10272,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1108 + "line": 1107 }, "name": "method", "parameters": [ @@ -10163,7 +10303,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1103 + "line": 1102 }, "name": "StructWithSelf", "namespace": "PythonSelf", @@ -10176,7 +10316,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1104 + "line": 1103 }, "name": "self", "type": { @@ -10200,7 +10340,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1183 + "line": 1182 }, "methods": [ { @@ -10209,7 +10349,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1186 + "line": 1185 }, "name": "loadFoo", "returns": { @@ -10225,7 +10365,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1190 + "line": 1189 }, "name": "saveFoo", "parameters": [ @@ -10246,7 +10386,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1184 + "line": 1183 }, "name": "foo", "optional": true, @@ -10305,7 +10445,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2442 + "line": 2443 }, "name": "RootStruct", "properties": [ @@ -10318,7 +10458,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2446 + "line": 2447 }, "name": "stringProp", "type": { @@ -10333,7 +10473,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2447 + "line": 2448 }, "name": "nestedStruct", "optional": true, @@ -10352,7 +10492,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2455 + "line": 2456 }, "methods": [ { @@ -10361,7 +10501,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2456 + "line": 2457 }, "name": "validate", "parameters": [ @@ -10391,7 +10531,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 288 + "line": 287 }, "methods": [ { @@ -10400,7 +10540,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 296 + "line": 295 }, "name": "methodWithDefaultedArguments", "parameters": [ @@ -10433,7 +10573,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 304 + "line": 303 }, "name": "methodWithOptionalAnyArgument", "parameters": [ @@ -10453,7 +10593,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 292 + "line": 291 }, "name": "methodWithOptionalArguments", "parameters": [ @@ -10491,7 +10631,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2014 + "line": 2015 }, "name": "SecondLevelStruct", "properties": [ @@ -10504,7 +10644,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2018 + "line": 2019 }, "name": "deeperRequiredProp", "type": { @@ -10520,7 +10660,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2023 + "line": 2024 }, "name": "deeperOptionalProp", "optional": true, @@ -10546,7 +10686,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1624 + "line": 1625 }, "methods": [ { @@ -10555,7 +10695,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1627 + "line": 1628 }, "name": "interface1", "returns": { @@ -10570,7 +10710,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1631 + "line": 1632 }, "name": "interface2", "returns": { @@ -10593,7 +10733,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1966 + "line": 1967 }, "methods": [ { @@ -10602,7 +10742,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1968 + "line": 1969 }, "name": "isSingletonInt", "parameters": [ @@ -10632,7 +10772,7 @@ "kind": "enum", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1973 + "line": 1974 }, "members": [ { @@ -10656,7 +10796,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1949 + "line": 1950 }, "methods": [ { @@ -10665,7 +10805,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1952 + "line": 1953 }, "name": "isSingletonString", "parameters": [ @@ -10695,7 +10835,7 @@ "kind": "enum", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1957 + "line": 1958 }, "members": [ { @@ -10718,7 +10858,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/calculator.ts", - "line": 403 + "line": 414 }, "name": "SmellyStruct", "properties": [ @@ -10730,7 +10870,7 @@ "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 404 + "line": 415 }, "name": "property", "type": { @@ -10745,7 +10885,7 @@ "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 405 + "line": 416 }, "name": "yetAnoterOne", "type": { @@ -10768,7 +10908,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2479 + "line": 2480 }, "methods": [ { @@ -10777,7 +10917,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2488 + "line": 2489 }, "name": "returnAnonymous", "returns": { @@ -10793,7 +10933,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2480 + "line": 2481 }, "name": "returnReturn", "returns": { @@ -10954,7 +11094,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1892 + "line": 1893 }, "methods": [ { @@ -10963,7 +11103,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1895 + "line": 1896 }, "name": "canAccessStaticContext", "returns": { @@ -10982,7 +11122,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1903 + "line": 1904 }, "name": "staticVariable", "static": true, @@ -11004,7 +11144,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 690 + "line": 689 }, "parameters": [ { @@ -11018,7 +11158,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 689 + "line": 688 }, "methods": [ { @@ -11028,7 +11168,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 696 + "line": 695 }, "name": "staticMethod", "parameters": [ @@ -11055,7 +11195,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 700 + "line": 699 }, "name": "justMethod", "returns": { @@ -11076,7 +11216,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 712 + "line": 711 }, "name": "BAR", "static": true, @@ -11092,7 +11232,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 741 + "line": 740 }, "name": "ConstObj", "static": true, @@ -11109,7 +11249,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 707 + "line": 706 }, "name": "Foo", "static": true, @@ -11126,7 +11266,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 717 + "line": 716 }, "name": "zooBar", "static": true, @@ -11147,7 +11287,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 726 + "line": 725 }, "name": "instance", "static": true, @@ -11161,7 +11301,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 740 + "line": 739 }, "name": "nonConstStatic", "static": true, @@ -11176,7 +11316,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 690 + "line": 689 }, "name": "value", "type": { @@ -11194,7 +11334,7 @@ "kind": "enum", "locationInModule": { "filename": "lib/compliance.ts", - "line": 39 + "line": 38 }, "members": [ { @@ -11232,7 +11372,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1677 + "line": 1678 }, "name": "StripInternal", "properties": [ @@ -11242,7 +11382,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1678 + "line": 1679 }, "name": "youSeeMe", "type": { @@ -11262,7 +11402,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2240 + "line": 2241 }, "name": "StructA", "properties": [ @@ -11274,7 +11414,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2241 + "line": 2242 }, "name": "requiredString", "type": { @@ -11289,7 +11429,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2243 + "line": 2244 }, "name": "optionalNumber", "optional": true, @@ -11305,7 +11445,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2242 + "line": 2243 }, "name": "optionalString", "optional": true, @@ -11326,7 +11466,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2249 + "line": 2250 }, "name": "StructB", "properties": [ @@ -11338,7 +11478,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2250 + "line": 2251 }, "name": "requiredString", "type": { @@ -11353,7 +11493,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2251 + "line": 2252 }, "name": "optionalBoolean", "optional": true, @@ -11369,7 +11509,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2252 + "line": 2253 }, "name": "optionalStructA", "optional": true, @@ -11391,7 +11531,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2678 + "line": 2679 }, "name": "StructParameterType", "properties": [ @@ -11403,7 +11543,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2679 + "line": 2680 }, "name": "scope", "type": { @@ -11418,7 +11558,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2680 + "line": 2681 }, "name": "props", "optional": true, @@ -11443,7 +11583,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2072 + "line": 2073 }, "methods": [ { @@ -11452,7 +11592,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2084 + "line": 2085 }, "name": "howManyVarArgsDidIPass", "parameters": [ @@ -11484,7 +11624,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2073 + "line": 2074 }, "name": "roundTrip", "parameters": [ @@ -11520,7 +11660,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2254 + "line": 2255 }, "methods": [ { @@ -11529,7 +11669,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2255 + "line": 2256 }, "name": "isStructA", "parameters": [ @@ -11562,7 +11702,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2276 + "line": 2277 }, "name": "isStructB", "parameters": [ @@ -11602,7 +11742,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2046 + "line": 2047 }, "name": "StructWithJavaReservedWords", "properties": [ @@ -11614,7 +11754,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2047 + "line": 2048 }, "name": "default", "type": { @@ -11629,7 +11769,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2048 + "line": 2049 }, "name": "assert", "optional": true, @@ -11645,7 +11785,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2051 + "line": 2052 }, "name": "result", "optional": true, @@ -11661,7 +11801,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2052 + "line": 2053 }, "name": "that", "optional": true, @@ -11685,13 +11825,13 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 205 + "line": 213 } }, "kind": "class", "locationInModule": { "filename": "lib/calculator.ts", - "line": 197 + "line": 205 }, "name": "Sum", "properties": [ @@ -11704,12 +11844,12 @@ "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 209 + "line": 217 }, "name": "expression", "overrides": "jsii-calc.composition.CompositeOperation", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } }, { @@ -11719,13 +11859,13 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 201 + "line": 209 }, "name": "parts", "type": { "collection": { "elementtype": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" }, "kind": "array" } @@ -11746,7 +11886,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2181 + "line": 2182 }, "parameters": [ { @@ -11794,7 +11934,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2171 + "line": 2172 }, "name": "SupportsNiceJavaBuilder", "properties": [ @@ -11806,7 +11946,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2182 + "line": 2183 }, "name": "id", "overrides": "jsii-calc.SupportsNiceJavaBuilderWithRequiredProps", @@ -11821,7 +11961,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2172 + "line": 2173 }, "name": "rest", "type": { @@ -11845,7 +11985,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2191 + "line": 2192 }, "name": "SupportsNiceJavaBuilderProps", "properties": [ @@ -11858,7 +11998,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2201 + "line": 2202 }, "name": "bar", "type": { @@ -11875,7 +12015,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2196 + "line": 2197 }, "name": "id", "optional": true, @@ -11898,7 +12038,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2163 + "line": 2164 }, "parameters": [ { @@ -11924,7 +12064,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2155 + "line": 2156 }, "name": "SupportsNiceJavaBuilderWithRequiredProps", "properties": [ @@ -11935,7 +12075,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2157 + "line": 2158 }, "name": "bar", "type": { @@ -11950,7 +12090,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2164 + "line": 2165 }, "name": "id", "type": { @@ -11964,7 +12104,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2156 + "line": 2157 }, "name": "propId", "optional": true, @@ -11988,7 +12128,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 376 + "line": 375 }, "methods": [ { @@ -11998,7 +12138,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 389 + "line": 388 }, "name": "callerIsAsync", "returns": { @@ -12013,7 +12153,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 377 + "line": 376 }, "name": "callerIsMethod", "returns": { @@ -12028,7 +12168,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 429 + "line": 428 }, "name": "modifyOtherProperty", "parameters": [ @@ -12046,7 +12186,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 401 + "line": 400 }, "name": "modifyValueOfTheProperty", "parameters": [ @@ -12064,7 +12204,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 442 + "line": 441 }, "name": "readA", "returns": { @@ -12079,7 +12219,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 433 + "line": 432 }, "name": "retrieveOtherProperty", "returns": { @@ -12094,7 +12234,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 413 + "line": 412 }, "name": "retrieveReadOnlyProperty", "returns": { @@ -12109,7 +12249,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 405 + "line": 404 }, "name": "retrieveValueOfTheProperty", "returns": { @@ -12124,7 +12264,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 393 + "line": 392 }, "name": "virtualMethod", "parameters": [ @@ -12147,7 +12287,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 446 + "line": 445 }, "name": "writeA", "parameters": [ @@ -12169,7 +12309,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 411 + "line": 410 }, "name": "readonlyProperty", "type": { @@ -12182,7 +12322,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 440 + "line": 439 }, "name": "a", "type": { @@ -12195,7 +12335,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 381 + "line": 380 }, "name": "callerIsProperty", "type": { @@ -12208,7 +12348,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 419 + "line": 418 }, "name": "otherProperty", "type": { @@ -12221,7 +12361,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 399 + "line": 398 }, "name": "theProperty", "type": { @@ -12234,7 +12374,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 427 + "line": 426 }, "name": "valueOfOtherProperty", "type": { @@ -12257,7 +12397,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 651 + "line": 650 }, "methods": [ { @@ -12266,7 +12406,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 652 + "line": 651 }, "name": "throwError" } @@ -12283,7 +12423,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1997 + "line": 1998 }, "name": "TopLevelStruct", "properties": [ @@ -12296,7 +12436,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2001 + "line": 2002 }, "name": "required", "type": { @@ -12312,7 +12452,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2011 + "line": 2012 }, "name": "secondLevel", "type": { @@ -12337,7 +12477,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2006 + "line": 2007 }, "name": "optional", "optional": true, @@ -12358,7 +12498,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2752 + "line": 2753 }, "methods": [ { @@ -12368,7 +12508,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2756 + "line": 2757 }, "name": "mode", "returns": { @@ -12396,13 +12536,13 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 101 + "line": 109 }, "parameters": [ { "name": "operand", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } } ] @@ -12410,7 +12550,7 @@ "kind": "class", "locationInModule": { "filename": "lib/calculator.ts", - "line": 100 + "line": 108 }, "name": "UnaryOperation", "properties": [ @@ -12421,11 +12561,11 @@ "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 101 + "line": 109 }, "name": "operand", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } } ] @@ -12440,7 +12580,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1112 + "line": 1111 }, "name": "UnionProperties", "properties": [ @@ -12452,7 +12592,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1114 + "line": 1113 }, "name": "bar", "type": { @@ -12479,7 +12619,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1113 + "line": 1112 }, "name": "foo", "optional": true, @@ -12589,7 +12729,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1117 + "line": 1116 }, "methods": [ { @@ -12598,7 +12738,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1118 + "line": 1117 }, "name": "value", "returns": { @@ -12625,7 +12765,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1168 + "line": 1167 }, "methods": [ { @@ -12634,7 +12774,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1169 + "line": 1168 }, "name": "hello", "returns": { @@ -12658,7 +12798,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 597 + "line": 596 }, "parameters": [ { @@ -12672,7 +12812,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 596 + "line": 595 }, "methods": [ { @@ -12681,7 +12821,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 599 + "line": 598 }, "name": "justRead", "returns": { @@ -12696,7 +12836,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 608 + "line": 607 }, "name": "readStringAndNumber", "parameters": [ @@ -12719,7 +12859,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 603 + "line": 602 }, "name": "writeAndRead", "parameters": [ @@ -12746,7 +12886,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 597 + "line": 596 }, "name": "obj", "type": { @@ -12767,7 +12907,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 681 + "line": 680 }, "parameters": [ { @@ -12781,7 +12921,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 680 + "line": 679 }, "methods": [ { @@ -12790,7 +12930,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 683 + "line": 682 }, "name": "asArray", "parameters": [ @@ -12829,7 +12969,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 667 + "line": 666 }, "parameters": [ { @@ -12848,7 +12988,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 661 + "line": 660 }, "methods": [ { @@ -12857,7 +12997,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 675 + "line": 674 }, "name": "asArray", "parameters": [ @@ -12910,7 +13050,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 451 + "line": 450 }, "methods": [ { @@ -12920,7 +13060,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 476 + "line": 475 }, "name": "overrideMeAsync", "parameters": [ @@ -12943,7 +13083,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 480 + "line": 479 }, "name": "overrideMeSync", "parameters": [ @@ -12967,7 +13107,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 458 + "line": 457 }, "name": "parallelSumAsync", "parameters": [ @@ -12991,7 +13131,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 452 + "line": 451 }, "name": "serialSumAsync", "parameters": [ @@ -13014,7 +13154,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 468 + "line": 467 }, "name": "sumSync", "parameters": [ @@ -13051,7 +13191,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1921 + "line": 1922 }, "methods": [ { @@ -13060,7 +13200,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1926 + "line": 1927 }, "name": "callMe" }, @@ -13071,7 +13211,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1930 + "line": 1931 }, "name": "overrideMe", "protected": true @@ -13086,7 +13226,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1923 + "line": 1924 }, "name": "methodWasCalled", "type": { @@ -13108,7 +13248,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1937 + "line": 1938 }, "parameters": [ { @@ -13123,7 +13263,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1936 + "line": 1937 }, "name": "WithPrivatePropertyInConstructor", "properties": [ @@ -13134,7 +13274,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1939 + "line": 1940 }, "name": "success", "type": { @@ -13156,7 +13296,7 @@ "kind": "class", "locationInModule": { "filename": "lib/calculator.ts", - "line": 138 + "line": 146 }, "methods": [ { @@ -13166,7 +13306,7 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 164 + "line": 172 }, "name": "toString", "overrides": "@scope/jsii-calc-lib.Operation", @@ -13190,11 +13330,11 @@ "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 162 + "line": 170 }, "name": "expression", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } }, { @@ -13205,10 +13345,10 @@ "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 154 + "line": 162 }, "name": "value", - "overrides": "@scope/jsii-calc-lib.Value", + "overrides": "@scope/jsii-calc-lib.NumericValue", "type": { "primitive": "number" } @@ -13220,7 +13360,7 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 152 + "line": 160 }, "name": "decorationPostfixes", "type": { @@ -13239,7 +13379,7 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 147 + "line": 155 }, "name": "decorationPrefixes", "type": { @@ -13258,7 +13398,7 @@ }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 142 + "line": 150 }, "name": "stringStyle", "type": { @@ -13277,7 +13417,7 @@ "kind": "enum", "locationInModule": { "filename": "lib/calculator.ts", - "line": 184 + "line": 192 }, "members": [ { @@ -13822,5 +13962,5 @@ } }, "version": "0.0.0", - "fingerprint": "TXGVwLZ10oZ08NxDzu6i+fqPtaw5aEqME8+d+KEhL08=" + "fingerprint": "4Qo/E6yO72t3M8icCu7R6cPftP5P7P2ib37eYlI72u8=" } diff --git a/packages/jsii-config/package.json b/packages/jsii-config/package.json index 87c6554bd8..5763ebe529 100644 --- a/packages/jsii-config/package.json +++ b/packages/jsii-config/package.json @@ -19,15 +19,15 @@ "jsii-config": "bin/jsii-config" }, "devDependencies": { - "@types/inquirer": "^7.3.0", + "@types/inquirer": "^7.3.1", "@types/jest": "^26.0.10", "@types/jest-expect-message": "^1.0.2", "@types/node": "^10.17.28", "@types/yargs": "^15.0.5", "eslint": "^7.7.0", - "jest": "^26.4.0", + "jest": "^26.4.2", "jest-expect-message": "^1.0.2", - "prettier": "^2.0.5", + "prettier": "^2.1.0", "typescript": "~3.9.7" }, "dependencies": { diff --git a/packages/jsii-diff/package.json b/packages/jsii-diff/package.json index 2014667dcc..9acbc05853 100644 --- a/packages/jsii-diff/package.json +++ b/packages/jsii-diff/package.json @@ -48,11 +48,11 @@ "@types/tar-fs": "^2.0.0", "@types/yargs": "^15.0.5", "eslint": "^7.7.0", - "jest": "^26.4.0", + "jest": "^26.4.2", "jest-expect-message": "^1.0.2", "jsii": "^0.0.0", "jsii-build-tools": "^0.0.0", - "prettier": "^2.0.5" + "prettier": "^2.1.0" }, "jest": { "collectCoverage": true, diff --git a/packages/jsii-diff/test/classes.test.ts b/packages/jsii-diff/test/classes.test.ts index 7735c2c05e..4f16dc3b5e 100644 --- a/packages/jsii-diff/test/classes.test.ts +++ b/packages/jsii-diff/test/classes.test.ts @@ -22,7 +22,7 @@ test('okay to add a new function to a class', () => `, ` export class Foo { - public foo(): void { } + public bar(): void { } } `, )); @@ -34,14 +34,14 @@ test('not okay to add a required argument to a method', () => /newly required argument/, ` export class Foo { - public foo(arg1: string): void { + public bar(arg1: string): void { Array.isArray(arg1); } } `, ` export class Foo { - public foo(arg1: string, arg2: string): void { + public bar(arg1: string, arg2: string): void { Array.isArray(arg1); Array.isArray(arg2); } @@ -55,7 +55,7 @@ test('okay to make a required argument optional', () => expectNoError( ` export class Foo { - public foo(arg1: string, arg2: string): void { + public bar(arg1: string, arg2: string): void { Array.isArray(arg1); Array.isArray(arg2); } @@ -63,7 +63,7 @@ test('okay to make a required argument optional', () => `, ` export class Foo { - public foo(arg1: string, arg2?: string): void { + public bar(arg1: string, arg2?: string): void { Array.isArray(arg1); Array.isArray(arg2); } @@ -77,7 +77,7 @@ test('okay to turn required arguments into varargs', () => expectNoError( ` export class Foo { - public foo(arg1: string, arg2: number, arg3: number): void { + public bar(arg1: string, arg2: number, arg3: number): void { Array.isArray(arg1); Array.isArray(arg2); Array.isArray(arg3); @@ -86,7 +86,7 @@ test('okay to turn required arguments into varargs', () => `, ` export class Foo { - public foo(arg1: string, ...args: number[]): void { + public bar(arg1: string, ...args: number[]): void { Array.isArray(arg1); Array.isArray(args); } @@ -101,14 +101,14 @@ test('not allowed to change argument type to a different scalar', () => /method.*foo.*argument arg1, takes number \(formerly string\): string is not assignable to number/i, ` export class Foo { - public foo(arg1: string): void { + public bar(arg1: string): void { Array.isArray(arg1); } } `, ` export class Foo { - public foo(arg1: number): void { + public bar(arg1: number): void { Array.isArray(arg1); } } @@ -125,7 +125,7 @@ test('cannot add any abstract members to a subclassable class', () => * @subclassable */ export abstract class Henk { - abstract readonly henk: string; + abstract readonly name: string; } `, ` @@ -133,7 +133,7 @@ test('cannot add any abstract members to a subclassable class', () => * @subclassable */ export abstract class Henk { - abstract readonly henk: string; + abstract readonly name: string; abstract readonly piet: string; } `, @@ -149,7 +149,7 @@ test('cannot add any members to a subclassable interface, not even optional ones * @subclassable */ export interface IHenk { - henk: string; + name: string; } `, ` @@ -157,7 +157,7 @@ test('cannot add any members to a subclassable interface, not even optional ones * @subclassable */ export interface IHenk { - henk: string; + name: string; piet?: string; } `, @@ -170,12 +170,12 @@ test('cannot make a member less visible', () => /changed from 'public' to 'protected'/, ` export class Henk { - public henk: string = 'henk'; + public name: string = 'henk'; } `, ` export class Henk { - protected henk: string = 'henk'; + protected name: string = 'henk'; } `, )); @@ -364,12 +364,12 @@ test('cannot make a class property optional', () => /prop.*henk.*type Optional \(formerly string\): output type is now optional/i, ` export class Henk { - public henk: string = 'henk'; + public name: string = 'henk'; } `, ` export class Henk { - public henk?: string = 'henk'; + public name?: string = 'henk'; } `, )); @@ -500,12 +500,12 @@ test('change from method to property', () => /changed from method to property/, ` export class Boom { - foo() { return 12; } + public foo() { return 12; } } `, ` export class Boom { - get foo() { return 12; } + public get foo() { return 12; } } `, )); @@ -515,12 +515,12 @@ test('change from method with arguments to property', () => /changed from method to property/, ` export class Boom { - foo(arg: number) { return 12 * arg; } + public foo(arg: number) { return 12 * arg; } } `, ` export class Boom { - get foo() { return 12; } + public get foo() { return 12; } } `, )); @@ -530,12 +530,12 @@ test('change from property to method', () => /changed from property to method/, ` export class Boom { - get foo() { return 12; } + public get foo() { return 12; } } `, ` export class Boom { - foo() { return 12; } + public foo() { return 12; } } `, )); diff --git a/packages/jsii-diff/test/structs.test.ts b/packages/jsii-diff/test/structs.test.ts index 491778bf7a..154b063e04 100644 --- a/packages/jsii-diff/test/structs.test.ts +++ b/packages/jsii-diff/test/structs.test.ts @@ -10,7 +10,7 @@ test('cannot add required fields to an input struct', () => readonly henk: string; } export class Foo { - public foo(arg1: Henk): void { + public bar(arg1: Henk): void { Array.isArray(arg1); } } @@ -21,7 +21,7 @@ test('cannot add required fields to an input struct', () => readonly super: string; } export class Foo { - public foo(arg1: Henk): void { + public bar(arg1: Henk): void { Array.isArray(arg1); } } @@ -37,7 +37,7 @@ test('can add required fields to an output struct', () => readonly henk: string; } export class Foo { - public foo(): Henk { + public bar(): Henk { return { henk: 'henk' }; } } @@ -48,7 +48,7 @@ test('can add required fields to an output struct', () => readonly super: string; } export class Foo { - public foo(): Henk { + public bar(): Henk { return { henk: 'henk', super: 'super' }; } } @@ -64,7 +64,7 @@ test('can change argument type to a supertype if it adds only optional fields', readonly henk: string; } export class Foo { - public foo(arg1: Henk): void { + public bar(arg1: Henk): void { Array.isArray(arg1); } } @@ -77,7 +77,7 @@ test('can change argument type to a supertype if it adds only optional fields', readonly henk: string; } export class Foo { - public foo(arg1: Super): void { + public bar(arg1: Super): void { Array.isArray(arg1); } } @@ -96,7 +96,7 @@ test('cannot take fields away from input struct', () => readonly piet: string; } export class Foo { - public foo(arg1: Henk): void { + public bar(arg1: Henk): void { Array.isArray(arg1); } } @@ -106,7 +106,7 @@ test('cannot take fields away from input struct', () => readonly henk: string; } export class Foo { - public foo(arg1: Henk): void { + public bar(arg1: Henk): void { Array.isArray(arg1); } } @@ -124,7 +124,7 @@ test('cannot take fields away from output struct', () => readonly piet: string; } export class Foo { - public foo(): Henk { + public bar(): Henk { return { henk: 'henk', piet: 'piet' }; } } @@ -134,7 +134,7 @@ test('cannot take fields away from output struct', () => readonly henk: string; } export class Foo { - public foo(): Henk { + public bar(): Henk { return { henk: 'henk' }; } } @@ -151,7 +151,7 @@ test('cannot change argument type to a supertype it adds required fields', () => readonly henk: string; } export class Foo { - public foo(arg1: Henk): void { + public bar(arg1: Henk): void { Array.isArray(arg1); } } @@ -164,7 +164,7 @@ test('cannot change argument type to a supertype it adds required fields', () => readonly henk: string; } export class Foo { - public foo(arg1: Super): void { + public bar(arg1: Super): void { Array.isArray(arg1); } } diff --git a/packages/jsii-diff/test/util.ts b/packages/jsii-diff/test/util.ts index c5bc33424e..df88534cd3 100644 --- a/packages/jsii-diff/test/util.ts +++ b/packages/jsii-diff/test/util.ts @@ -30,13 +30,19 @@ export async function compare( original: string, updated: string, ): Promise { - const ass1 = await sourceToAssemblyHelper(original); + const ass1 = sourceToAssemblyHelper(original); + await expect(ass1).resolves.not.toThrowError(); const ts1 = new reflect.TypeSystem(); - const originalAssembly = ts1.addAssembly(new reflect.Assembly(ts1, ass1)); + const originalAssembly = ts1.addAssembly( + new reflect.Assembly(ts1, await ass1), + ); - const ass2 = await sourceToAssemblyHelper(updated); + const ass2 = sourceToAssemblyHelper(updated); + await expect(ass2).resolves.not.toThrowError(); const ts2 = new reflect.TypeSystem(); - const updatedAssembly = ts2.addAssembly(new reflect.Assembly(ts2, ass2)); + const updatedAssembly = ts2.addAssembly( + new reflect.Assembly(ts2, await ass2), + ); return compareAssemblies(originalAssembly, updatedAssembly); } diff --git a/packages/jsii-pacmak/.gitignore b/packages/jsii-pacmak/.gitignore index af7d0168b4..a72e62b716 100644 --- a/packages/jsii-pacmak/.gitignore +++ b/packages/jsii-pacmak/.gitignore @@ -4,6 +4,8 @@ lib/version.ts .settings target/ +.venv/ + *.js *.d.ts node_modules/ diff --git a/packages/jsii-pacmak/bin/jsii-pacmak.ts b/packages/jsii-pacmak/bin/jsii-pacmak.ts index f4254821a3..ed6fb9744b 100644 --- a/packages/jsii-pacmak/bin/jsii-pacmak.ts +++ b/packages/jsii-pacmak/bin/jsii-pacmak.ts @@ -101,6 +101,15 @@ import { ALL_BUILDERS, TargetName } from '../lib/targets'; 'Generate all configured targets in parallel (disabling this might help if you encounter EMFILE errors)', default: true, }) + .option('dotnet-nuget-global-packages-folder', { + type: 'string', + desc: 'Configure a different NuGet package cache for NuGet', + default: undefined, + // This is a hidden option, folks need not bother it unless they're very advanced + hidden: true, + // This is expected to be a path, which should be normalized + normalize: true, + }) .version(VERSION_DESC) .strict().argv; diff --git a/packages/jsii-pacmak/lib/generator.ts b/packages/jsii-pacmak/lib/generator.ts index 93dd878724..55cbf1c304 100644 --- a/packages/jsii-pacmak/lib/generator.ts +++ b/packages/jsii-pacmak/lib/generator.ts @@ -31,6 +31,10 @@ export interface GeneratorOptions { } export interface IGenerator { + /** + * + * @param fingerprint + */ generate(fingerprint: boolean): void; /** diff --git a/packages/jsii-pacmak/lib/targets/dotnet.ts b/packages/jsii-pacmak/lib/targets/dotnet.ts index b65602693e..40a0f463d7 100644 --- a/packages/jsii-pacmak/lib/targets/dotnet.ts +++ b/packages/jsii-pacmak/lib/targets/dotnet.ts @@ -53,9 +53,13 @@ export class DotnetBuilder implements TargetBuilder { // Build solution logging.debug('Building .NET'); - await shell('dotnet', ['build', '--force', '-c', 'Release'], { - cwd: tempSourceDir.directory, - }); + await shell( + 'dotnet', + ['build', '--force', '--configuration', 'Release'], + { + cwd: tempSourceDir.directory, + }, + ); await this.copyOutArtifacts(tempSourceDir.object); if (this.options.clean) { @@ -204,6 +208,22 @@ export class DotnetBuilder implements TargetBuilder { add.att('value', path.join(repo)); }); + if (this.options.arguments['dotnet-nuget-global-packages-folder']) { + // Ensure we're not using the configured cache folder + configuration + .ele('config') + .ele('add') + .att('key', 'globalPackagesFolder') + .att( + 'value', + path.resolve( + this.options.arguments['dotnet-nuget-global-packages-folder'], + '.nuget', + 'packages', + ), + ); + } + const xml = configuration.end({ pretty: true }); // Write XML content to NuGet.config. diff --git a/packages/jsii-pacmak/lib/targets/golang.ts b/packages/jsii-pacmak/lib/targets/golang.ts new file mode 100644 index 0000000000..dbc01e884e --- /dev/null +++ b/packages/jsii-pacmak/lib/targets/golang.ts @@ -0,0 +1,99 @@ +import { CodeMaker } from 'codemaker'; +import { Assembly } from 'jsii-reflect'; +import { Rosetta } from 'jsii-rosetta'; +import { RootPackage } from './golang/package'; +import { IGenerator } from '../generator'; +import { Target, TargetOptions } from '../target'; + +export class Golang extends Target { + public readonly generator: IGenerator; + + public constructor(options: TargetOptions) { + super(options); + + this.generator = new GolangGenerator(options.rosetta); + } + + /** + * Generates a publishable artifact in `outDir`. + * + * @param sourceDir the directory where the generated source is located. + * @param outDir the directory where the publishable artifact should be placed. + */ + public async build(sourceDir: string, outDir: string): Promise { + return this.copyFiles(sourceDir, outDir); + } +} + +class GolangGenerator implements IGenerator { + private assembly!: Assembly; + private readonly code = new CodeMaker(); + + public constructor(private readonly rosetta: Rosetta) {} + + public async load(_: string, assembly: Assembly): Promise { + this.assembly = assembly; + return Promise.resolve(); + } + + public async upToDate(_outDir: string) { + return Promise.resolve(false); + } + + public generate(): void { + new RootPackage(this.assembly).emit({ + code: this.code, + rosetta: this.rosetta, + }); + } + + public async save(outDir: string, _tarball: string): Promise { + // TODO: Replace with [go-embed](https://github.com/pyros2097/go-embed) + // const bundledRuntimeDotGo = path.join('_jsii', 'bundled-runtime.go'); + // this.code.openFile(bundledRuntimeDotGo); + + // this.code.line( + // `// Embedded data for the tarball containing the runtime of ${this.assembly.name}@${this.assembly.version}`, + // ); + // this.code.openBlock('const tarball = []byte'); + // for await (const line of encodedSlices(tarball)) { + // this.code.line(`${line},`); + // } + // this.code.closeBlock(); + + // this.code.closeFile(bundledRuntimeDotGo); + + await this.code.save(outDir); + } +} + +// TODO: Replace with +// async function* encodedSlices(path: string, sliceSize = 16) { +// const slice = Buffer.alloc(sliceSize); + +// const fd = await fs.open(path, fs.constants.O_RDONLY); + +// while (true) { +// // eslint-disable-next-line no-await-in-loop +// const { bytesRead } = await fs.read(fd, slice, 0, slice.length, null); +// if (bytesRead === 0) { +// return fs.close(fd); +// } +// yield inGroupsOf(slice.toString('hex', 0, bytesRead - 1), 2) +// .map((byte) => `0x${byte}`) +// .join(', '); +// } + +// function inGroupsOf(str: string, count: number) { +// if (str.length % count !== 0) { +// throw new Error( +// `Expected a string with a multiple of ${count} characters, but it has ${str.length}`, +// ); +// } +// const result = new Array(); +// for (let i = 0; i < str.length; i += count) { +// result.push(str.slice(i, i + count)); +// } +// return result; +// } +// } diff --git a/packages/jsii-pacmak/lib/targets/golang/documentation.ts b/packages/jsii-pacmak/lib/targets/golang/documentation.ts new file mode 100644 index 0000000000..833315e451 --- /dev/null +++ b/packages/jsii-pacmak/lib/targets/golang/documentation.ts @@ -0,0 +1,15 @@ +import { Docs } from 'jsii-reflect'; +import { EmitContext } from './emit-context'; + +export class Documentation { + public constructor(private readonly docs: Docs) {} + + public emit({ code }: EmitContext): void { + // TODO: Translate code examples to Golang with Rosetta (not implemented there yet) + code.line(`// ${this.docs.summary}`); + code.line('//'); + for (const line of this.docs.remarks.split('\n')) { + code.line(`// ${line}`); + } + } +} diff --git a/packages/jsii-pacmak/lib/targets/golang/emit-context.ts b/packages/jsii-pacmak/lib/targets/golang/emit-context.ts new file mode 100644 index 0000000000..d0e3d09206 --- /dev/null +++ b/packages/jsii-pacmak/lib/targets/golang/emit-context.ts @@ -0,0 +1,12 @@ +import { CodeMaker } from 'codemaker'; +import { Rosetta } from 'jsii-rosetta'; + +/** + * The context in which Golang code is emitted. + */ +export interface EmitContext { + /** A CodeMaker to write out source code. */ + readonly code: CodeMaker; + /** A Rosetta stone to translate code examples. */ + readonly rosetta: Rosetta; +} diff --git a/packages/jsii-pacmak/lib/targets/golang/package.ts b/packages/jsii-pacmak/lib/targets/golang/package.ts new file mode 100644 index 0000000000..4018fa85db --- /dev/null +++ b/packages/jsii-pacmak/lib/targets/golang/package.ts @@ -0,0 +1,169 @@ +import { CodeMaker } from 'codemaker'; +import { Assembly } from 'jsii-reflect'; +import { join } from 'path'; +import { ReadmeFile } from './readme-file'; +import { Type, Submodule as JsiiSubmodule } from 'jsii-reflect'; +import { EmitContext } from './emit-context'; +import { GoClass, Enum, Interface, Struct } from './types'; +import { findTypeInTree, goPackageName, flatMap } from './util'; + +// JSII golang runtime module name +const JSII_MODULE_NAME = 'github.com/aws-cdk/jsii/jsii'; + +export type ModuleType = Interface | Enum | GoClass | Struct; + +/* + * Package represents a single `.go` source file within a package. This can be the root package file or a submodule + */ +export abstract class Package { + public readonly root: Package; + public readonly file: string; + public readonly submodules: InternalPackage[]; + public readonly types: ModuleType[]; + + public constructor( + private readonly typeSpec: readonly Type[], + private readonly submoduleSpec: readonly JsiiSubmodule[], + public readonly moduleName: string, + public readonly filePath: string, + // If no root is provided, this module is the root + root?: Package, + ) { + this.file = `${filePath}.go`; + this.root = root || this; + this.submodules = this.submoduleSpec.map( + (sm) => new InternalPackage(this.root, this, sm), + ); + + this.types = this.typeSpec.map( + (type: Type): ModuleType => { + if (type.isInterfaceType() && type.datatype) { + return new Struct(this, type); + } else if (type.isInterfaceType()) { + return new Interface(this, type); + } else if (type.isClassType()) { + return new GoClass(this, type); + } else if (type.isEnumType()) { + return new Enum(this, type); + } + throw new Error( + `Type: ${type.name} with kind ${type.kind} is not a supported type`, + ); + }, + ); + } + + /* + * Packages within this module + */ + public get dependencies(): Package[] { + return flatMap( + this.types, + (t: ModuleType): Package[] => t.dependencies, + ).filter((mod) => mod.moduleName !== this.moduleName); + } + + /* + * The module names of this modules dependencies. Used for import statements + */ + public get dependencyImports(): Set { + return new Set(this.dependencies.map((mod) => mod.moduleName)); + } + + /* + * Search for a type with a `fqn` within this. Searches all Children modules as well. + */ + public findType(fqn: string): ModuleType | undefined { + return findTypeInTree(this, fqn); + } + + public emit(context: EmitContext): void { + const { code } = context; + code.openFile(this.file); + this.emitHeader(code); + this.emitImports(code); + this.emitTypes(code); + code.closeFile(this.file); + + this.emitInternalPackages(context); + } + + private emitHeader(code: CodeMaker) { + code.line(`package ${this.moduleName}`); + code.line(); + } + + private emitImports(code: CodeMaker) { + code.open('import ('); + code.line(`"${JSII_MODULE_NAME}"`); + + for (const modName of this.dependencyImports) { + // If the module is the same as the current one being written, don't emit an import statement + if (modName !== this.moduleName) { + code.line(`"${modName}"`); + } + } + + code.close(')'); + code.line(); + } + + public emitInternalPackages(context: EmitContext) { + for (const submodule of this.submodules) { + submodule.emit(context); + } + } + + private emitTypes(code: CodeMaker) { + for (const type of this.types) { + type.emit(code); + } + } +} + +/* + * RootPackage corresponds to JSII module. + * + * Extends `Package` for root source package emit logic + */ +export class RootPackage extends Package { + public readonly assembly: Assembly; + + public constructor(assembly: Assembly) { + const moduleName = goPackageName(assembly.name); + const filePath = join(...moduleName.split('.')); + + super( + Object.values(assembly.types), + assembly.submodules, + moduleName, + filePath, + ); + + this.assembly = assembly; + } + + public emit(context: EmitContext): void { + super.emit(context); + + if (this.assembly.readme?.markdown) { + new ReadmeFile(this.moduleName, this.assembly.readme.markdown); + } + } +} + +/* + * InternalPackage refers to any go package within a given JSII module. + */ +export class InternalPackage extends Package { + public readonly parent: Package; + + public constructor(root: Package, parent: Package, assembly: JsiiSubmodule) { + const moduleName = goPackageName(assembly.name); + const filePath = `${parent.filePath}/${moduleName}`; + + super(assembly.types, assembly.submodules, moduleName, filePath, root); + + this.parent = parent; + } +} diff --git a/packages/jsii-pacmak/lib/targets/golang/readme-file.ts b/packages/jsii-pacmak/lib/targets/golang/readme-file.ts new file mode 100644 index 0000000000..8a06a139e7 --- /dev/null +++ b/packages/jsii-pacmak/lib/targets/golang/readme-file.ts @@ -0,0 +1,43 @@ +import { join } from 'path'; +import { EmitContext } from './emit-context'; +// import { Translation } from 'jsii-rosetta'; +// import { INCOMPLETE_DISCLAIMER_COMPILING, INCOMPLETE_DISCLAIMER_NONCOMPILING } from '..'; + +export class ReadmeFile { + public constructor( + private readonly packageName: string, + private readonly document: string, + ) {} + + public emit({ code /*, rosetta */ }: EmitContext) { + const nameParts = this.packageName.split('.'); + const file = join( + ...nameParts.slice(0, nameParts.length - 11), + 'README.md', + ); + + code.openFile(file); + const translated = this.document; // rosetta.translateSnippetsInMarkdown(this.document, 'go', prependDisclaimer); + for (const line of translated.split('\n')) { + code.line(line); + } + code.closeFile(file); + } + + /* + function prependDisclaimer(translation: Translation) { + const source = addDisclaimerIfNeeded(); + return { language: translation.language, source }; + + function addDisclaimerIfNeeded(): string { + if (translation.didCompile && INCOMPLETE_DISCLAIMER_COMPILING) { + return `// ${INCOMPLETE_DISCLAIMER_COMPILING}\n\n${translation.source}`; + } + if (!translation.didCompile && INCOMPLETE_DISCLAIMER_NONCOMPILING) { + return `// ${INCOMPLETE_DISCLAIMER_NONCOMPILING}\n\n${translation.source}`; + } + return translation.source; + } + } + */ +} diff --git a/packages/jsii-pacmak/lib/targets/golang/types/class.ts b/packages/jsii-pacmak/lib/targets/golang/types/class.ts new file mode 100644 index 0000000000..a27ff476a3 --- /dev/null +++ b/packages/jsii-pacmak/lib/targets/golang/types/class.ts @@ -0,0 +1,174 @@ +import { Method, ClassType } from 'jsii-reflect'; +import { CodeMaker } from 'codemaker'; +import { GoTypeRef } from './go-type-reference'; +import { GoStruct } from './go-type'; +import { TypeField } from './type-field'; +import { Package } from '../package'; + +/* + * GoClass wraps a Typescript class as a Go custom struct type + */ +export class GoClass extends GoStruct { + public readonly methods: ClassMethod[]; + + public constructor(parent: Package, public type: ClassType) { + super(parent, type); + + this.methods = Object.values(this.type.getMethods()).map( + (method) => new ClassMethod(this, method), + ); + } + + public emit(code: CodeMaker): void { + // emits interface, struct proxy, and instance methods + super.emit(code); + + this.emitConstructor(code); + this.emitSetters(code); + + for (const method of this.methods) { + method.emit(code); + } + } + + protected emitInterface(code: CodeMaker): void { + code.openBlock(`type ${this.interfaceName} interface`); + + for (const property of this.properties) { + property.emitGetterDecl(code); + property.emitSetterDecl(code); + } + + for (const method of this.methods) { + method.emitSignature(code); + } + + code.closeBlock(); + code.line(); + } + + // emits the implementation of the getters for the struct + private emitSetters(code: CodeMaker): void { + if (this.properties.length !== 0) { + for (const property of this.properties) { + property.emitSetterImpl(code); + } + } + } + + private emitConstructor(code: CodeMaker): void { + const initializer = this.type.initializer; + if (initializer) { + const constr = `New${this.name}`; + + let params: string[] = []; + if (initializer.parameters) { + params = initializer.parameters.map( + // TODO: resolve types for parameters + (x) => `${x.name} ${x.type.toString()}`, + ); + } + const parameters = params.length === 0 ? '' : params.join(', '); + + let docstring = ''; + if (initializer.docs.summary) { + docstring = initializer.docs.toString(); + code.line(`// ${docstring}`); + } + + code.openBlock(`func ${constr}(${parameters}) ${this.interfaceName}`); + + // FIXME placeholder + code.open(`jsii.NoOpRequest(jsii.NoOpApiRequest {`); + code.line(`Class: "${this.name}",`); + code.line(`Method: "${constr}",`); + code.line(`Parameters: []string{${parameters}}`); + code.close(`})`); + + code.line(); + + // Return value + code.line(`return &${this.name}{`); + code.line(` // props`); + code.line(`}`); + code.closeBlock(); + code.line(); + } + } +} + +export class ClassMethod implements TypeField { + public readonly name: string; + public readonly references?: GoTypeRef; + + private readonly NOOP_RETURN_MAP: { [type: string]: string } = { + float64: '0.0', + string: '"NOOP_RETURN_STRING"', + bool: 'true', + }; + + public constructor( + public readonly parent: GoClass, + public readonly method: Method, + ) { + this.name = this.method.name; + + if (method.returns.type) { + this.references = new GoTypeRef(parent.parent.root, method.returns.type); + } + } + + /* emit generates method on the class */ + public emit(code: CodeMaker) { + const name = code.toPascalCase(this.method.name); + const returnType = `${this.returnType ? `${this.returnType} ` : ''}`; + const instanceArg = this.parent.name.substring(0, 1).toLowerCase(); + + let params: string[] = []; + if (this.method.parameters) { + params = this.method.parameters.map( + // TODO: resolve types for parameters + (x) => `"${x.name} ${x.type.toString()}"`, + ); + } + const parameters = params.length === 0 ? '' : params.join(', '); + + code.openBlock( + `func (${instanceArg} *${this.parent.name}) ${name}() ${returnType}`, + ); + + // FIXME Placeholder + code.open(`jsii.NoOpRequest(jsii.NoOpApiRequest {`); + code.line(`Class: "${this.parent.name}",`); + code.line(`Method: "${name}",`); + code.line(`Parameters: []string{${parameters}}`); + code.close(`})`); + + const ret = this.references; + if (ret?.type?.type.isClassType()) { + code.line(`return ${this.returnType}{}`); + } else if (ret?.type?.type.isEnumType()) { + code.line(`return "ENUM_DUMMY"`); + } else { + code.line(`return ${this.getDummyReturn(this.returnType)}`); + } + + code.closeBlock(); + code.line(); + } + + public emitSignature(code: CodeMaker) { + const name = code.toPascalCase(this.method.name); + code.line(`${name}() ${this.returnType}`); + } + + private getDummyReturn(type: string): string { + return this.NOOP_RETURN_MAP[type] || 'nil'; + } + + public get returnType(): string { + return ( + this.references?.scopedName(this.parent.parent) ?? this.method.toString() + ); + } +} diff --git a/packages/jsii-pacmak/lib/targets/golang/types/enum.ts b/packages/jsii-pacmak/lib/targets/golang/types/enum.ts new file mode 100644 index 0000000000..7aaef92b25 --- /dev/null +++ b/packages/jsii-pacmak/lib/targets/golang/types/enum.ts @@ -0,0 +1,32 @@ +import { CodeMaker } from 'codemaker'; +import { EnumType } from 'jsii-reflect'; +import { GoType } from './go-type'; +import { Package } from '../package'; + +export class Enum extends GoType { + public constructor(parent: Package, public type: EnumType) { + super(parent, type); + } + + public emit(code: CodeMaker) { + // TODO figure out the value type -- probably a string in most cases + const valueType = 'string'; + code.line(`type ${this.name} ${valueType}`); + code.line(); + code.open(`const (`); + + // Const values are prefixed by the wrapped value type + for (const member of this.type.members) { + const enumKey = this.name + code.toPascalCase(member.name); + const enumType = this.name; + code.line(`${enumKey} ${enumType} = "${member.name}"`); + } + + code.close(`)`); + code.line(); + } + + public get dependencies(): Package[] { + return []; + } +} diff --git a/packages/jsii-pacmak/lib/targets/golang/types/go-type-reference.ts b/packages/jsii-pacmak/lib/targets/golang/types/go-type-reference.ts new file mode 100644 index 0000000000..b708275a07 --- /dev/null +++ b/packages/jsii-pacmak/lib/targets/golang/types/go-type-reference.ts @@ -0,0 +1,99 @@ +import { TypeReference } from 'jsii-reflect'; +import { Package } from '../package'; +import { GoType } from './go-type'; +import { toPascalCase } from 'codemaker'; + +const GO_ANY = 'jsii.Any'; + +/* + * Maps names of JS primitives to corresponding Go types as strings + */ +class PrimitiveMapper { + private readonly MAP: { [key: string]: string } = { + number: 'float64', + boolean: 'bool', + any: GO_ANY, + // TODO: Resolve "time" package dependency where needed and change to "time.Time" + date: 'string', + json: `map[string]${GO_ANY}`, + }; + + public constructor(private readonly name: string) {} + + public get goPrimitive(): string { + return this.MAP[this.name] ?? this.name; + } +} + +/* + * Accepts a JSII type reference and can resolve the GoType within the module tree. + */ +export class GoTypeRef { + public constructor( + public readonly root: Package, + public readonly reference: TypeReference, + ) {} + + public isPrimitive() { + return Boolean(this.reference.primitive); + } + + public get type(): GoType | undefined { + if (this.reference.fqn) { + return this.root.findType(this.reference.fqn); + } + + return undefined; + } + + public get name() { + return this.type?.name; + } + + public get namespace() { + return this.type?.parent.moduleName; + } + + /* + * Return the name of a type for reference from the `Package` passed in + */ + public scopedName(scope: Package): string { + // type references a primitive + if (this.reference.primitive) { + return new PrimitiveMapper(this.reference.primitive).goPrimitive; + } + + // type is an array + if (this.reference.arrayOfType) { + const innerName = + new GoTypeRef(this.root, this.reference.arrayOfType).scopedName( + scope, + ) ?? GO_ANY; + + return `[]${innerName}`; + } + + // type is a map + if (this.reference.mapOfType) { + const innerName = + new GoTypeRef(this.root, this.reference.mapOfType).scopedName(scope) ?? + GO_ANY; + return `map[string]${innerName}`; + } + + // type is defined in the same scope as the current one, no namespace required + if (scope.moduleName === this.namespace && this.name) { + // if the current scope is the same as the types scope, return without a namespace + return toPascalCase(this.name); + } + + // type is defined in another module and requires a namespace and import + if (this.name) { + return `${this.namespace}.${toPascalCase(this.name)}`; + } + + // type isn't handled + // TODO: Are there other cases to handle? if not throw an error. + return GO_ANY; + } +} diff --git a/packages/jsii-pacmak/lib/targets/golang/types/go-type.ts b/packages/jsii-pacmak/lib/targets/golang/types/go-type.ts new file mode 100644 index 0000000000..9016b02f77 --- /dev/null +++ b/packages/jsii-pacmak/lib/targets/golang/types/go-type.ts @@ -0,0 +1,172 @@ +import { CodeMaker, toPascalCase } from 'codemaker'; +import { ClassType, InterfaceType, Property, Type } from 'jsii-reflect'; +import { Package } from '../package'; +import { GoTypeRef } from './go-type-reference'; +import { TypeField } from './type-field'; +import { getFieldDependencies } from '../util'; + +// String appended to all go GoStruct Interfaces +const STRUCT_INTERFACE_SUFFIX = 'Iface'; + +export interface GoEmitter { + emit(code: CodeMaker): void; +} + +export class GoType { + public constructor(public parent: Package, public type: Type) {} + + public get name() { + return this.type.name; + } + + public get namespace() { + return this.parent.moduleName; + } +} + +/* + * GoProperty encapsulates logic for public properties on a concrete struct, which could represent + either a JSII class proxy or datatype interface proxy +*/ +export class GoProperty implements TypeField { + public readonly name: string; + public readonly getter: string; + public readonly references?: GoTypeRef; + + public constructor( + public parent: GoStruct, + public readonly property: Property, + ) { + this.name = toPascalCase(this.property.name); + this.getter = `Get${this.name}`; + + if (property.type) { + this.references = new GoTypeRef(parent.parent.root, property.type); + } + } + + public get returnType(): string { + return ( + this.references?.scopedName(this.parent.parent) ?? + this.property.type.toString() + ); + } + + public emitStructMember(code: CodeMaker) { + // If struct property is type of parent struct, use a pointer as type to avoid recursive struct type error + if (this.references?.type?.name === this.parent.name) { + code.line(`${this.name} *${this.returnType}`); + } else { + code.line(`${this.name} ${this.returnType}`); + } + } + + public emitGetterDecl(code: CodeMaker) { + code.line(`${this.getter}() ${this.returnType}`); + } + + public emitSetterDecl(code: CodeMaker) { + if (!this.property.protected) { + code.line(`Set${this.name}()`); + } + } + + // TODO use pointer receiver? + // Emits getter methods on the struct for each property + public emitGetterImpl(code: CodeMaker) { + const receiver = this.parent.name; + const instanceArg = receiver.substring(0, 1).toLowerCase(); + + code.openBlock( + `func (${instanceArg} ${receiver}) ${ + this.getter + }()${` ${this.returnType}`}`, + ); + code.line(`return ${instanceArg}.${this.name}`); + code.closeBlock(); + code.line(); + } + + public emitSetterImpl(code: CodeMaker) { + const receiver = this.parent.name; + const instanceArg = receiver.substring(0, 1).toLowerCase(); + + code.openBlock( + `func (${instanceArg} ${receiver}) Set${this.name}(val ${this.returnType})`, + ); + code.line(`${instanceArg}.${this.name} = val`); + code.closeBlock(); + code.line(); + } +} + +export abstract class GoStruct extends GoType implements GoEmitter { + public readonly properties: GoProperty[]; + public readonly interfaceName: string; + + public constructor(parent: Package, public type: ClassType | InterfaceType) { + super(parent, type); + + // Flatten any inherited properties on the struct + this.properties = Object.values(this.type.getProperties(true)).map( + (prop) => new GoProperty(this, prop), + ); + + this.interfaceName = `${this.name}${STRUCT_INTERFACE_SUFFIX}`; + } + + // `emit` needs to generate both a Go interface and a struct, as well as the Getter methods on the struct + public emit(code: CodeMaker): void { + this.emitInterface(code); + this.emitStruct(code); + this.emitGetters(code); + } + + protected emitInterface(code: CodeMaker): void { + code.line('// Struct interface'); // FIXME for debugging + code.openBlock(`type ${this.interfaceName} interface`); + + const extended = this.type.getInterfaces(true); + + // embed extended interfaces + if (extended.length !== 0) { + for (const iface of extended) { + code.line(iface.fqn); + } + } + + for (const property of this.properties) { + property.emitGetterDecl(code); + } + + code.closeBlock(); + code.line(); + } + + private emitStruct(code: CodeMaker): void { + code.line('// Struct proxy'); // FIXME for debugging + code.openBlock(`type ${this.name} struct`); + + for (const property of this.properties) { + property.emitStructMember(code); + } + + code.closeBlock(); + code.line(); + } + + // emits the implementation of the getters for the struct + private emitGetters(code: CodeMaker): void { + if (this.properties.length !== 0) { + for (const property of this.properties) { + property.emitGetterImpl(code); + } + + code.line(); + } + } + + public get dependencies(): Package[] { + return [...getFieldDependencies(this.properties)]; + } +} diff --git a/packages/jsii-pacmak/lib/targets/golang/types/index.ts b/packages/jsii-pacmak/lib/targets/golang/types/index.ts new file mode 100644 index 0000000000..1aef16176c --- /dev/null +++ b/packages/jsii-pacmak/lib/targets/golang/types/index.ts @@ -0,0 +1,7 @@ +export * from './class'; +export * from './enum'; +export * from './go-type'; +export * from './go-type-reference'; +export * from './interface'; +export * from './struct'; +export * from './type-field'; diff --git a/packages/jsii-pacmak/lib/targets/golang/types/interface.ts b/packages/jsii-pacmak/lib/targets/golang/types/interface.ts new file mode 100644 index 0000000000..a0741641b4 --- /dev/null +++ b/packages/jsii-pacmak/lib/targets/golang/types/interface.ts @@ -0,0 +1,63 @@ +import { CodeMaker } from 'codemaker'; +import { InterfaceType, Method, Property } from 'jsii-reflect'; +import { GoType } from './go-type'; +import { GoTypeRef } from './go-type-reference'; +import { Package } from '../package'; + +export class Interface extends GoType { + public readonly dependencies: Package[] = []; + + public constructor(parent: Package, public type: InterfaceType) { + super(parent, type); + } + + public emit(code: CodeMaker): void { + code.line('// Behaviorial interface'); // FIXME for debugging + code.openBlock(`type ${this.name} interface`); + + const extended = this.type.getInterfaces(true); + + // embed extended interfaces + if (extended.length !== 0) { + for (const iface of extended) { + code.line(iface.fqn); + } + } + + Object.values(this.type.getMethods()).forEach((method) => + this.emitInterfaceMethod(code, method), + ); + + // TODO remove? + Object.values(this.type.getProperties()).forEach((property) => + this.emitInterfaceProperty(code, property), + ); + + code.closeBlock(); + code.line(); + } + + private emitInterfaceProperty(code: CodeMaker, property: Property) { + const propName = code.toPascalCase(property.name); + const type = new GoTypeRef(this.parent.root, property.type).scopedName( + this.parent, + ); + + code.line(`Get${propName}() ${type}`); + // if (!property.protected) { + // code.line(`set${name}()`); + // } + } + + private emitInterfaceMethod(code: CodeMaker, method: Method) { + const returns = method.returns.type.void + ? '' + : ` ${new GoTypeRef(this.parent.root, method.returns.type).scopedName( + this.parent, + )}`; + + const methodName = code.toPascalCase(method.name); + + code.line(`${methodName}()${returns}`); + } +} diff --git a/packages/jsii-pacmak/lib/targets/golang/types/struct.ts b/packages/jsii-pacmak/lib/targets/golang/types/struct.ts new file mode 100644 index 0000000000..fb6b92ca98 --- /dev/null +++ b/packages/jsii-pacmak/lib/targets/golang/types/struct.ts @@ -0,0 +1,13 @@ +import { GoStruct } from './go-type'; +import { Package } from '../package'; +import { InterfaceType } from 'jsii-reflect'; + +/* + * Struct wraps a JSII datatype interface aka, structs + */ +export class Struct extends GoStruct { + public constructor(parent: Package, type: InterfaceType) { + super(parent, type); + // TODO check if datatype? (isDataType() on jsii-reflect seems wrong) + } +} diff --git a/packages/jsii-pacmak/lib/targets/golang/types/type-field.ts b/packages/jsii-pacmak/lib/targets/golang/types/type-field.ts new file mode 100644 index 0000000000..ca8b58ddd2 --- /dev/null +++ b/packages/jsii-pacmak/lib/targets/golang/types/type-field.ts @@ -0,0 +1,10 @@ +import { GoClass, Interface, Struct, GoTypeRef } from './index'; + +/* + * Structure for Class and Interface methods. Useful for sharing logic for dependency resolution + */ +export interface TypeField { + name: string; + parent: GoClass | Interface | Struct; + references?: GoTypeRef; +} diff --git a/packages/jsii-pacmak/lib/targets/golang/util.ts b/packages/jsii-pacmak/lib/targets/golang/util.ts new file mode 100644 index 0000000000..9f9b433f38 --- /dev/null +++ b/packages/jsii-pacmak/lib/targets/golang/util.ts @@ -0,0 +1,47 @@ +import { Package, ModuleType } from './package'; +import { TypeField } from './types'; + +/* + * Recursively search module for type with fqn + */ +export function findTypeInTree( + module: Package, + fqn: string, +): ModuleType | undefined { + const result = module.types.find((t) => t.type.fqn === fqn); + + if (result) { + return result; + } + + return module.submodules.reduce((accum: ModuleType | undefined, sm) => { + return accum || findTypeInTree(sm, fqn); + }, undefined); +} + +/* + * Format NPM package names as idiomatic Go module name + */ +export function goPackageName(name: string): string { + return name.replace(/[^a-z0-9.]/gi, '').toLowerCase(); +} + +export function flatMap( + collection: readonly T[], + mapper: (value: T) => readonly R[], +): readonly R[] { + return collection + .map(mapper) + .reduce((acc, elt) => acc.concat(elt), new Array()); +} + +/* + * Return module dependencies of a class or interface fields + */ +export function getFieldDependencies(fields: TypeField[]): Package[] { + return fields.reduce((accum: Package[], field) => { + return field.references?.type?.parent + ? [...accum, field.references?.type.parent] + : accum; + }, []); +} diff --git a/packages/jsii-pacmak/lib/targets/index.ts b/packages/jsii-pacmak/lib/targets/index.ts index a53aaad725..6599246aaf 100644 --- a/packages/jsii-pacmak/lib/targets/index.ts +++ b/packages/jsii-pacmak/lib/targets/index.ts @@ -1,12 +1,13 @@ import { OneByOneBuilder, TargetBuilder, BuildOptions } from '../builder'; import { DotnetBuilder } from './dotnet'; +import { Golang } from './golang'; import { JavaBuilder } from './java'; import JavaScript from './js'; import Python from './python'; import { JsiiModule } from '../packaging'; -export type TargetName = 'dotnet' | 'java' | 'js' | 'python'; +export type TargetName = 'dotnet' | 'go' | 'java' | 'js' | 'python'; export type BuilderFactory = ( modules: JsiiModule[], options: BuildOptions, @@ -14,6 +15,7 @@ export type BuilderFactory = ( export const ALL_BUILDERS: { [key in TargetName]: BuilderFactory } = { dotnet: (ms, o) => new DotnetBuilder(ms, o), + go: (ms, o) => new OneByOneBuilder('golang', Golang, ms, o), java: (ms, o) => new JavaBuilder(ms, o), js: (ms, o) => new OneByOneBuilder('js', JavaScript, ms, o), python: (ms, o) => new OneByOneBuilder('python', Python, ms, o), diff --git a/packages/jsii-pacmak/lib/targets/java.ts b/packages/jsii-pacmak/lib/targets/java.ts index ca722f187a..d13fe1e3b4 100644 --- a/packages/jsii-pacmak/lib/targets/java.ts +++ b/packages/jsii-pacmak/lib/targets/java.ts @@ -431,6 +431,9 @@ export default class Java extends Target { await shell( 'mvn', [ + // If we don't run in verbose mode, turn on quiet mode + ...(this.arguments.verbose ? [] : ['--quiet']), + '--batch-mode', ...mvnArguments, 'deploy', `-D=altDeploymentRepository=local::default::${url}`, @@ -477,6 +480,9 @@ interface JavaProp { // The java type for the property (eg: 'List') fieldJavaType: string; + // The java type for the parameter (e.g: 'List') + paramJavaType: string; + // The NativeType representation of the property's type fieldNativeType: string; @@ -849,7 +855,6 @@ class JavaGenerator extends Generator { protected onInterfaceProperty(_ifc: spec.InterfaceType, prop: spec.Property) { const getterType = this.toDecoratedJavaType(prop); - const setterTypes = this.toDecoratedJavaTypes(prop); const propName = this.code.toPascalCase( JavaGenerator.safeJavaPropertyName(prop.name), ); @@ -867,6 +872,7 @@ class JavaGenerator extends Generator { } if (!prop.immutable) { + const setterTypes = this.toDecoratedJavaTypes(prop); for (const type of setterTypes) { this.code.line(); this.addJavaDocs(prop); @@ -1186,7 +1192,7 @@ class JavaGenerator extends Generator { for (const prop of consts) { const constName = this.renderConstName(prop); - const propType = this.toNativeType(prop.type, true); + const propType = this.toNativeType(prop.type, { forMarshalling: true }); const statement = `software.amazon.jsii.JsiiObject.jsiiStaticGet(${javaClass}.class, "${prop.name}", ${propType})`; this.code.line( `${constName} = ${this.wrapCollection( @@ -1222,7 +1228,9 @@ class JavaGenerator extends Generator { overrides = !!prop.overrides, ) { const getterType = this.toDecoratedJavaType(prop); - const setterTypes = this.toDecoratedJavaTypes(prop); + const setterTypes = this.toDecoratedJavaTypes(prop, { + covariant: prop.static, + }); const propName = this.code.toPascalCase( JavaGenerator.safeJavaPropertyName(prop.name), ); @@ -1251,7 +1259,9 @@ class JavaGenerator extends Generator { statement = 'this.jsiiGet('; } - statement += `"${prop.name}", ${this.toNativeType(prop.type, true)})`; + statement += `"${prop.name}", ${this.toNativeType(prop.type, { + forMarshalling: true, + })})`; this.code.line( `return ${this.wrapCollection(statement, prop.type, prop.optional)};`, @@ -1469,9 +1479,12 @@ class JavaGenerator extends Generator { nullable: !!property.optional, fieldName: this.code.toCamelCase(safeName), fieldJavaType: this.toJavaType(property.type), + paramJavaType: this.toJavaType(property.type, { covariant: true }), fieldNativeType: this.toNativeType(property.type), - fieldJavaClass: `${this.toJavaType(property.type, true)}.class`, - javaTypes: this.toJavaTypes(property.type), + fieldJavaClass: `${this.toJavaType(property.type, { + forMarshalling: true, + })}.class`, + javaTypes: this.toJavaTypes(property.type, { covariant: true }), immutable: property.immutable || false, inherited, }; @@ -1525,7 +1538,7 @@ class JavaGenerator extends Generator { fieldName: this.code.toCamelCase( JavaGenerator.safeJavaPropertyName(param.name), ), - javaType: this.toJavaType(param.type), + javaType: this.toJavaType(param.type, { covariant: true }), })); const builtType = this.toJavaType(cls); @@ -1625,7 +1638,9 @@ class JavaGenerator extends Generator { }, ], }; - for (const javaType of this.toJavaTypes(prop.type.spec!)) { + for (const javaType of this.toJavaTypes(prop.type.spec!, { + covariant: true, + })) { this.addJavaDocs(setter); this.emitStabilityAnnotations(prop.spec); this.code.openBlock( @@ -1713,10 +1728,23 @@ class JavaGenerator extends Generator { } this.code.line(' */'); this.emitStabilityAnnotations(prop.spec); + // We add an explicit cast if both types are generic but they are not identical (one is covariant, the other isn't) + const explicitCast = + type.includes('<') && + prop.fieldJavaType.includes('<') && + type !== prop.fieldJavaType + ? `(${prop.fieldJavaType})` + : ''; + if (explicitCast !== '') { + // We'll be doing a safe, but unchecked cast, so suppress that warning + this.code.line('@SuppressWarnings("unchecked")'); + } this.code.openBlock( `public ${builderName} ${prop.fieldName}(${type} ${prop.fieldName})`, ); - this.code.line(`this.${prop.fieldName} = ${prop.fieldName};`); + this.code.line( + `this.${prop.fieldName} = ${explicitCast}${prop.fieldName};`, + ); this.code.line('return this;'); this.code.closeBlock(); } @@ -1856,8 +1884,11 @@ class JavaGenerator extends Generator { ' * Constructor that initializes the object based on literal property values passed by the {@link Builder}.', ); this.code.line(' */'); + if (props.some((prop) => prop.fieldJavaType !== prop.paramJavaType)) { + this.code.line('@SuppressWarnings("unchecked")'); + } const constructorArgs = props - .map((prop) => `final ${prop.fieldJavaType} ${prop.fieldName}`) + .map((prop) => `final ${prop.paramJavaType} ${prop.fieldName}`) .join(', '); this.code.openBlock( `private ${INTERFACE_PROXY_CLASS_NAME}(${constructorArgs})`, @@ -1866,8 +1897,12 @@ class JavaGenerator extends Generator { 'super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);', ); props.forEach((prop) => { + const explicitCast = + prop.fieldJavaType !== prop.paramJavaType + ? `(${prop.fieldJavaType})` + : ''; this.code.line( - `this.${prop.fieldName} = ${_validateIfNonOptional( + `this.${prop.fieldName} = ${explicitCast}${_validateIfNonOptional( prop.fieldName, prop, )};`, @@ -2168,8 +2203,11 @@ class JavaGenerator extends Generator { return this.toJavaType({ fqn: cls.base }); } - private toDecoratedJavaType(optionalValue: spec.OptionalValue): string { - const result = this.toDecoratedJavaTypes(optionalValue); + private toDecoratedJavaType( + optionalValue: spec.OptionalValue, + { covariant = false } = {}, + ): string { + const result = this.toDecoratedJavaTypes(optionalValue, { covariant }); if (result.length > 1) { return `${ optionalValue.optional ? ANN_NULLABLE : ANN_NOT_NULL @@ -2178,15 +2216,21 @@ class JavaGenerator extends Generator { return result[0]; } - private toDecoratedJavaTypes(optionalValue: spec.OptionalValue): string[] { - return this.toJavaTypes(optionalValue.type).map( + private toDecoratedJavaTypes( + optionalValue: spec.OptionalValue, + { covariant = false } = {}, + ): string[] { + return this.toJavaTypes(optionalValue.type, { covariant }).map( (nakedType) => `${optionalValue.optional ? ANN_NULLABLE : ANN_NOT_NULL} ${nakedType}`, ); } - private toJavaType(type: spec.TypeReference, forMarshalling = false): string { - const types = this.toJavaTypes(type, forMarshalling); + private toJavaType( + type: spec.TypeReference, + opts?: { forMarshalling?: boolean; covariant?: boolean }, + ): string { + const types = this.toJavaTypes(type, opts); if (types.length > 1) { return 'java.lang.Object'; } @@ -2195,15 +2239,14 @@ class JavaGenerator extends Generator { private toNativeType( type: spec.TypeReference, - forMarshalling = false, - recursing = false, + { forMarshalling = false, covariant = false, recursing = false } = {}, ): string { if (spec.isCollectionTypeReference(type)) { - const nativeElementType = this.toNativeType( - type.collection.elementtype, + const nativeElementType = this.toNativeType(type.collection.elementtype, { forMarshalling, - true, - ); + covariant, + recursing: true, + }); switch (type.collection.kind) { case spec.CollectionKind.Array: return `software.amazon.jsii.NativeType.listOf(${nativeElementType})`; @@ -2216,27 +2259,30 @@ class JavaGenerator extends Generator { } } return recursing - ? `software.amazon.jsii.NativeType.forClass(${this.toJavaType( - type, + ? `software.amazon.jsii.NativeType.forClass(${this.toJavaType(type, { forMarshalling, - )}.class)` - : `${this.toJavaType(type, forMarshalling)}.class`; + covariant, + })}.class)` + : `${this.toJavaType(type, { forMarshalling, covariant })}.class`; } private toJavaTypes( typeref: spec.TypeReference, - forMarshalling = false, + { forMarshalling = false, covariant = false } = {}, ): string[] { if (spec.isPrimitiveTypeReference(typeref)) { return [this.toJavaPrimitive(typeref.primitive)]; } else if (spec.isCollectionTypeReference(typeref)) { - return [this.toJavaCollection(typeref, forMarshalling)]; + return [this.toJavaCollection(typeref, { forMarshalling, covariant })]; } else if (spec.isNamedTypeReference(typeref)) { return [this.toNativeFqn(typeref.fqn)]; } else if (typeref.union) { const types = new Array(); for (const subtype of typeref.union.types) { - for (const t of this.toJavaTypes(subtype, forMarshalling)) { + for (const t of this.toJavaTypes(subtype, { + forMarshalling, + covariant, + })) { types.push(t); } } @@ -2247,23 +2293,39 @@ class JavaGenerator extends Generator { private toJavaCollection( ref: spec.CollectionTypeReference, - forMarshalling: boolean, + { + forMarshalling, + covariant, + }: { forMarshalling: boolean; covariant: boolean }, ) { - const elementJavaType = this.toJavaType(ref.collection.elementtype); + const elementJavaType = this.toJavaType(ref.collection.elementtype, { + covariant, + }); + const typeConstraint = covariant + ? makeCovariant(elementJavaType) + : elementJavaType; switch (ref.collection.kind) { case spec.CollectionKind.Array: return forMarshalling ? 'java.util.List' - : `java.util.List<${elementJavaType}>`; + : `java.util.List<${typeConstraint}>`; case spec.CollectionKind.Map: return forMarshalling ? 'java.util.Map' - : `java.util.Map`; + : `java.util.Map`; default: throw new Error( `Unsupported collection kind: ${ref.collection.kind as any}`, ); } + + function makeCovariant(javaType: string): string { + // Don't emit a covariant expression for String (it's `final` in Java) + if (javaType === 'java.lang.String') { + return javaType; + } + return `? extends ${javaType}`; + } } private toJavaPrimitive(primitive: spec.PrimitiveType) { @@ -2335,7 +2397,9 @@ class JavaGenerator extends Generator { statement += `"${method.name}"`; if (method.returns) { - statement += `, ${this.toNativeType(method.returns.type, true)}`; + statement += `, ${this.toNativeType(method.returns.type, { + forMarshalling: true, + })}`; } else { statement += ', software.amazon.jsii.NativeType.VOID'; } @@ -2396,10 +2460,13 @@ class JavaGenerator extends Generator { const params = []; if (method.parameters) { for (const p of method.parameters) { + // We can render covariant parameters only for methods that aren't overridable... so only for static methods currently. params.push( - `final ${this.toDecoratedJavaType(p)}${ - p.variadic ? '...' : '' - } ${JavaGenerator.safeJavaPropertyName(p.name)}`, + `final ${this.toDecoratedJavaType(p, { + covariant: (method as spec.Method).static, + })}${p.variadic ? '...' : ''} ${JavaGenerator.safeJavaPropertyName( + p.name, + )}`, ); } } diff --git a/packages/jsii-pacmak/lib/targets/python.ts b/packages/jsii-pacmak/lib/targets/python.ts index 8450c28ca0..6296250ea8 100644 --- a/packages/jsii-pacmak/lib/targets/python.ts +++ b/packages/jsii-pacmak/lib/targets/python.ts @@ -1,6 +1,7 @@ import * as spec from '@jsii/spec'; import { CodeMaker, toSnakeCase } from 'codemaker'; import * as escapeStringRegexp from 'escape-string-regexp'; +import * as fs from 'fs-extra'; import * as reflect from 'jsii-reflect'; import * as path from 'path'; import { Generator, GeneratorOptions } from '../generator'; @@ -30,6 +31,8 @@ import { die, toPythonIdentifier } from './python/util'; // eslint-disable-next-line @typescript-eslint/no-var-requires,@typescript-eslint/no-require-imports const spdxLicenseList = require('spdx-license-list'); +const pythonBuildTools = ['setuptools~=49.3', 'wheel~=0.34']; + export default class Python extends Target { protected readonly generator: PythonGenerator; @@ -44,54 +47,51 @@ export default class Python extends Target { } public async build(sourceDir: string, outDir: string): Promise { + // Create a fresh virtual env + const venv = await fs.mkdtemp(path.join(sourceDir, '.env')); + const venvBin = path.join( + venv, + process.platform === 'win32' ? 'Scripts' : 'bin', + ); + await shell('python3', [ + '-m', + 'venv', + '--system-site-packages', // Allow using globally installed packages (saves time & disk space) + venv, + ]); + const env = { + ...process.env, + PATH: `${venvBin}:${process.env.PATH}`, + VIRTUAL_ENV: venv, + }; + const python = path.join(venvBin, 'python'); + // Install the necessary things + await shell( + python, + ['-m', 'pip', 'install', '--no-input', ...pythonBuildTools, 'twine~=3.2'], + { + cwd: sourceDir, + env, + }, + ); + // Actually package up our code, both as a sdist and a wheel for publishing. - await shell('python3', ['setup.py', 'sdist', '--dist-dir', outDir], { + await shell(python, ['setup.py', 'sdist', '--dist-dir', outDir], { cwd: sourceDir, + env, }); await shell( - 'python3', + python, ['-m', 'pip', 'wheel', '--no-deps', '--wheel-dir', outDir, sourceDir], { cwd: sourceDir, + env, }, ); - if (await isPresent('twine', sourceDir)) { - await shell('twine', ['check', path.join(outDir, '*')], { - cwd: sourceDir, - }); - } else if (await isPresent('pipx', sourceDir)) { - await shell('pipx', ['run', 'twine', 'check', path.join(outDir, '*')], { - cwd: sourceDir, - env: { - ...process.env, - PIPX_HOME: path.join(sourceDir, '.pipx'), - }, - }); - } else { - warn( - 'Unable to validate distribution packages because `twine` is not present. ' + - 'Run `pip3 install twine` to enable distribution package validation.', - ); - } - } -} - -// Approximating existence check using `which`, falling back on `pip3 show`. -async function isPresent(binary: string, sourceDir?: string): Promise { - try { - await shell('which', [binary], { + await shell(python, ['-m', 'twine', 'check', path.join(outDir, '*')], { cwd: sourceDir, + env, }); - return true; - } catch { - try { - const output = await shell('pip3', ['show', binary], { - cwd: sourceDir, - }); - return output.trim() !== ''; - } catch { - return false; - } } } @@ -724,7 +724,8 @@ abstract class BaseProperty implements PythonBase { const { renderAbstract = true, forceEmitBody = false } = opts ?? {}; const pythonType = toTypeName(this.type).pythonType(context); - code.line(`@${this.decorator}`); + // # type: ignore is needed because mypy cannot check decorated things + code.line(`@${this.decorator} # type: ignore`); code.line(`@jsii.member(jsii_name="${this.jsName}")`); if (renderAbstract && this.abstract) { code.line('@abc.abstractmethod'); @@ -754,7 +755,8 @@ abstract class BaseProperty implements PythonBase { if (!this.immutable) { code.line(); - code.line(`@${this.pythonName}.setter`); + // # type: ignore is required because mypy cannot check decorated things + code.line(`@${this.pythonName}.setter # type: ignore`); if (renderAbstract && this.abstract) { code.line('@abc.abstractmethod'); } @@ -795,17 +797,18 @@ class Interface extends BasePythonClassType { // Then, we have to emit a Proxy class which implements our proxy interface. const proxyBases: string[] = this.bases.map( (b) => + // MyPy cannot check dynamic base classes (naturally) `jsii.proxy_for(${toTypeName(b).pythonType({ ...context, typeAnnotation: false, - })})`, + })}) # type: ignore`, ); openSignature(code, 'class', this.getProxyClassName(), proxyBases); this.generator.emitDocString(code, this.docs, { documentableItem: `class-${this.pythonName}`, trailingNewLine: true, }); - code.line(`__jsii_type__ = "${this.fqn}"`); + code.line(`__jsii_type__: typing.ClassVar[str] = "${this.fqn}"`); if (this.members.length > 0) { for (const member of this.members) { @@ -826,7 +829,7 @@ class Interface extends BasePythonClassType { toTypeName(b).pythonType({ ...context, typeAnnotation: false }), ); - params.push('jsii.compat.Protocol'); + params.push('typing_extensions.Protocol'); return params; } @@ -954,7 +957,7 @@ class Struct extends BasePythonClassType { // Required properties, those will always be put into the dict assignDictionary( code, - `${implicitParameter}._values`, + `${implicitParameter}._values: typing.Dict[str, typing.Any]`, members .filter((m) => !m.optional) .map( @@ -1001,20 +1004,29 @@ class Struct extends BasePythonClassType { member.typeAnnotation(context), ); member.emitDocString(code); - code.line(`return self._values.get(${JSON.stringify(member.pythonName)})`); + code.line( + `result = self._values.get(${JSON.stringify(member.pythonName)})`, + ); + if (!member.optional) { + // Add an assertion to maye MyPY happy! + code.line( + `assert result is not None, "Required property '${member.pythonName}' is missing"`, + ); + } + code.line('return result'); code.closeBlock(); } private emitMagicMethods(code: CodeMaker) { code.line(); - code.openBlock('def __eq__(self, rhs) -> bool'); + code.openBlock('def __eq__(self, rhs: typing.Any) -> builtins.bool'); code.line( 'return isinstance(rhs, self.__class__) and rhs._values == self._values', ); code.closeBlock(); code.line(); - code.openBlock('def __ne__(self, rhs) -> bool'); + code.openBlock('def __ne__(self, rhs: typing.Any) -> builtins.bool'); code.line('return not (rhs == self)'); code.closeBlock(); @@ -1179,11 +1191,12 @@ class Class extends BasePythonClassType implements ISortableType { const proxyBases = [this.pythonName]; for (const base of this.abstractBases) { + // MyPy cannot check dynamic base types (naturally) proxyBases.push( `jsii.proxy_for(${toTypeName(base).pythonType({ ...context, typeAnnotation: false, - })})`, + })}) # type: ignore`, ); } @@ -1383,8 +1396,8 @@ class PythonModule implements PythonType { code.line('import typing'); code.line(); code.line('import jsii'); - code.line('import jsii.compat'); code.line('import publication'); + code.line('import typing_extensions'); // Determine if we need to write out the kernel load line. if (this.loadAssembly) { @@ -1780,7 +1793,9 @@ class Package { // TODO: Might be easier to just use a TOML library to write this out. code.openFile('pyproject.toml'); code.line('[build-system]'); - code.line('requires = ["setuptools >= 49.3.1", "wheel >= 0.34.2"]'); + code.line( + `requires = [${pythonBuildTools.map((x) => `"${x}"`).join(', ')}]`, + ); code.line('build-backend = "setuptools.build_meta"'); code.closeFile('pyproject.toml'); @@ -2576,14 +2591,17 @@ function openSignature( const join = ', '; const { elementsSize, joinSize } = totalSizeOf(params, join); + const hasComments = !params.some((param) => /# .+$/.exec(param)); + if ( + hasComments && TARGET_LINE_LENGTH > - code.currentIndentLength + - prefix.length + - elementsSize + - joinSize + - suffix.length + - 2 + code.currentIndentLength + + prefix.length + + elementsSize + + joinSize + + suffix.length + + 2 ) { code.openBlock(`${prefix}(${params.join(join)})${suffix}`); return; @@ -2591,13 +2609,17 @@ function openSignature( code.indent(`${prefix}(`); if ( + !hasComments && TARGET_LINE_LENGTH > - code.currentIndentLength + elementsSize + joinSize + (trailingComma ? 1 : 0) + code.currentIndentLength + + elementsSize + + joinSize + + (trailingComma ? 1 : 0) ) { code.line(`${params.join(join)}${trailingComma ? ',' : ''}`); } else { for (const param of params) { - code.line(`${param},`); + code.line(param.replace(/(\s*# .+)?$/, ',$1')); } } code.unindent(false); diff --git a/packages/jsii-pacmak/lib/targets/python/type-name.ts b/packages/jsii-pacmak/lib/targets/python/type-name.ts index 2659c432ac..d8cb56b020 100644 --- a/packages/jsii-pacmak/lib/targets/python/type-name.ts +++ b/packages/jsii-pacmak/lib/targets/python/type-name.ts @@ -131,7 +131,7 @@ class Dict implements TypeName { } public pythonType(context: NamingContext) { - return `typing.Mapping[str, ${this.#element.pythonType(context)}]`; + return `typing.Mapping[builtins.str, ${this.#element.pythonType(context)}]`; } public requiredImports(context: NamingContext) { @@ -181,10 +181,10 @@ class Optional implements TypeName { } class Primitive implements TypeName { - private static readonly BOOL = new Primitive('bool'); + private static readonly BOOL = new Primitive('builtins.bool'); private static readonly DATE = new Primitive('datetime.datetime'); private static readonly JSII_NUMBER = new Primitive('jsii.Number'); // "jsii" is always already imported! - private static readonly STR = new Primitive('str'); + private static readonly STR = new Primitive('builtins.str'); private static readonly JSON = new Primitive( 'typing.Mapping[typing.Any, typing.Any]', ); diff --git a/packages/jsii-pacmak/lib/util.ts b/packages/jsii-pacmak/lib/util.ts index f97c115c38..27a74e6f18 100644 --- a/packages/jsii-pacmak/lib/util.ts +++ b/packages/jsii-pacmak/lib/util.ts @@ -75,8 +75,9 @@ export async function shell( new Error( [ `Command (${command}) failed with ${reason}:`, - prefix(out, '#STDOUT> '), + // STDERR first, the erro message could be truncated in logs. prefix(err, '#STDERR> '), + prefix(out, '#STDOUT> '), ].join('\n'), ), ); diff --git a/packages/jsii-pacmak/package.json b/packages/jsii-pacmak/package.json index 8e668585ff..c916ba3cc7 100644 --- a/packages/jsii-pacmak/package.json +++ b/packages/jsii-pacmak/package.json @@ -59,14 +59,14 @@ "@types/jest": "^26.0.10", "@types/mock-fs": "^4.10.0", "@types/node": "^10.17.28", - "@types/semver": "^7.3.2", + "@types/semver": "^7.3.3", "@types/yargs": "^15.0.5", "eslint": "^7.7.0", - "jest": "^26.4.0", + "jest": "^26.4.2", "jsii-build-tools": "^0.0.0", "jsii-calc": "^0.0.0", - "mock-fs": "^4.12.0", - "prettier": "^2.0.5", + "mock-fs": "^4.13.0", + "prettier": "^2.1.0", "ts-jest": "^26.2.0", "typescript": "~3.9.7" }, diff --git a/packages/jsii-pacmak/test/__snapshots__/jsii-pacmak.test.ts.snap b/packages/jsii-pacmak/test/__snapshots__/jsii-pacmak.test.ts.snap index 7187aabbc4..97affb9e92 100644 --- a/packages/jsii-pacmak/test/__snapshots__/jsii-pacmak.test.ts.snap +++ b/packages/jsii-pacmak/test/__snapshots__/jsii-pacmak.test.ts.snap @@ -23,6 +23,8 @@ exports[`Generated code for "@scope/jsii-calc-base": / 1`] = ` ┃ ┣━ 📄 Amazon.JSII.Tests.CalculatorPackageId.BasePackageId.csproj ┃ ┣━ 📄 AssemblyInfo.cs ┃ ┗━ 📄 scope-jsii-calc-base-0.0.0.tgz + ┣━ 📁 golang + ┃ ┗━ 📄 scopejsiicalcbase.go ┣━ 📁 java ┃ ┣━ 📄 pom.xml ┃ ┗━ 📁 src @@ -84,6 +86,7 @@ exports[`Generated code for "@scope/jsii-calc-base": /dotnet/Amazon.JSII "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace", "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId" }, + "go": {}, "java": { "maven": { "artifactId": "calculator-base-of-base", @@ -117,6 +120,7 @@ exports[`Generated code for "@scope/jsii-calc-base": /dotnet/Amazon.JSII "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace", "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BasePackageId" }, + "go": {}, "java": { "maven": { "artifactId": "calculator-base", @@ -218,7 +222,7 @@ exports[`Generated code for "@scope/jsii-calc-base": /dotnet/Amazon.JSII } }, "version": "0.0.0", - "fingerprint": "ttHhQ5EzgjW0lybCNSKOfqilJ04kp4VK3arcpRl3rBM=" + "fingerprint": "JCkFuFqry/njMLNi/IpfTVdkVye/esUFOCoZoFbDD+4=" } `; @@ -473,6 +477,73 @@ using Amazon.JSII.Runtime.Deputy; exports[`Generated code for "@scope/jsii-calc-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/scope-jsii-calc-base-0.0.0.tgz 1`] = `dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/scope-jsii-calc-base-0.0.0.tgz is a tarball`; +exports[`Generated code for "@scope/jsii-calc-base": /golang/scopejsiicalcbase.go 1`] = ` +package scopejsiicalcbase + +import ( + "github.com/aws-cdk/jsii/jsii" +) + +type BaseIface interface { + TypeName() jsii.Any +} + +// Struct proxy +type Base struct { +} + +func NewBase() BaseIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Base", + Method: "NewBase", + Parameters: []string{} + }) + + return &Base{ + // props + } +} + +func (b *Base) TypeName() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Base", + Method: "TypeName", + Parameters: []string{} + }) + return nil +} + +// Struct interface +type BasePropsIface interface { + @scope/jsii-calc-base-of-base.VeryBaseProps + GetFoo() jsii.Any + GetBar() string +} + +// Struct proxy +type BaseProps struct { + Foo jsii.Any + Bar string +} + +func (b BaseProps) GetFoo() jsii.Any { + return b.Foo +} + +func (b BaseProps) GetBar() string { + return b.Bar +} + + +// Behaviorial interface +type IBaseInterface interface { + @scope/jsii-calc-base-of-base.IVeryBaseInterface + Bar() +} + + +`; + exports[`Generated code for "@scope/jsii-calc-base": /java/pom.xml 1`] = ` @@ -932,7 +1003,7 @@ exports[`Generated code for "@scope/jsii-calc-base": /python/README.md 1 exports[`Generated code for "@scope/jsii-calc-base": /python/pyproject.toml 1`] = ` [build-system] -requires = ["setuptools >= 49.3.1", "wheel >= 0.34.2"] +requires = ["setuptools~=49.3", "wheel~=0.34"] build-backend = "setuptools.build_meta" `; @@ -1009,8 +1080,8 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions from ._jsii import * @@ -1046,28 +1117,37 @@ class _BaseProxy(Base): name_mapping={"foo": "foo", "bar": "bar"}, ) class BaseProps(scope.jsii_calc_base_of_base.VeryBaseProps): - def __init__(self, *, foo: scope.jsii_calc_base_of_base.Very, bar: str) -> None: + def __init__( + self, + *, + foo: scope.jsii_calc_base_of_base.Very, + bar: builtins.str, + ) -> None: """ :param foo: - :param bar: - """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "foo": foo, "bar": bar, } @builtins.property def foo(self) -> scope.jsii_calc_base_of_base.Very: - return self._values.get("foo") + result = self._values.get("foo") + assert result is not None, "Required property 'foo' is missing" + return result @builtins.property - def bar(self) -> str: - return self._values.get("bar") + def bar(self) -> builtins.str: + result = self._values.get("bar") + assert result is not None, "Required property 'bar' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -1078,7 +1158,8 @@ class BaseProps(scope.jsii_calc_base_of_base.VeryBaseProps): @jsii.interface(jsii_type="@scope/jsii-calc-base.IBaseInterface") class IBaseInterface( - scope.jsii_calc_base_of_base.IVeryBaseInterface, jsii.compat.Protocol + scope.jsii_calc_base_of_base.IVeryBaseInterface, + typing_extensions.Protocol, ): @builtins.staticmethod def __jsii_proxy_class__(): @@ -1090,9 +1171,9 @@ class IBaseInterface( class _IBaseInterfaceProxy( - jsii.proxy_for(scope.jsii_calc_base_of_base.IVeryBaseInterface) + jsii.proxy_for(scope.jsii_calc_base_of_base.IVeryBaseInterface) # type: ignore ): - __jsii_type__ = "@scope/jsii-calc-base.IBaseInterface" + __jsii_type__: typing.ClassVar[str] = "@scope/jsii-calc-base.IBaseInterface" @jsii.member(jsii_name="bar") def bar(self) -> None: @@ -1117,8 +1198,8 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions import scope.jsii_calc_base_of_base._jsii @@ -1157,12 +1238,15 @@ exports[`Generated code for "@scope/jsii-calc-base-of-base": / 1`] = ` ┃ ┃ ┣━ 📄 IVeryBaseInterface.cs ┃ ┃ ┣━ 📄 IVeryBaseInterfaceProxy.cs ┃ ┃ ┣━ 📄 IVeryBaseProps.cs + ┃ ┃ ┣━ 📄 StaticConsumer.cs ┃ ┃ ┣━ 📄 Very.cs ┃ ┃ ┣━ 📄 VeryBaseProps.cs ┃ ┃ ┗━ 📄 VeryBasePropsProxy.cs ┃ ┣━ 📄 Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId.csproj ┃ ┣━ 📄 AssemblyInfo.cs ┃ ┗━ 📄 scope-jsii-calc-base-of-base-0.0.0.tgz + ┣━ 📁 golang + ┃ ┗━ 📄 scopejsiicalcbaseofbase.go ┣━ 📁 java ┃ ┣━ 📄 pom.xml ┃ ┗━ 📁 src @@ -1176,6 +1260,7 @@ exports[`Generated code for "@scope/jsii-calc-base-of-base": / 1`] = ` ┃ ┃ ┗━ 📁 baseofbase ┃ ┃ ┣━ 📄 $Module.java ┃ ┃ ┣━ 📄 IVeryBaseInterface.java + ┃ ┃ ┣━ 📄 StaticConsumer.java ┃ ┃ ┣━ 📄 Very.java ┃ ┃ ┗━ 📄 VeryBaseProps.java ┃ ┗━ 📁 resources @@ -1230,6 +1315,7 @@ exports[`Generated code for "@scope/jsii-calc-base-of-base": /dotnet/Ama "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace", "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId" }, + "go": {}, "java": { "maven": { "artifactId": "calculator-base-of-base", @@ -1266,6 +1352,36 @@ exports[`Generated code for "@scope/jsii-calc-base-of-base": /dotnet/Ama ], "name": "IVeryBaseInterface" }, + "@scope/jsii-calc-base-of-base.StaticConsumer": { + "assembly": "@scope/jsii-calc-base-of-base", + "fqn": "@scope/jsii-calc-base-of-base.StaticConsumer", + "kind": "class", + "locationInModule": { + "filename": "lib/index.ts", + "line": 15 + }, + "methods": [ + { + "locationInModule": { + "filename": "lib/index.ts", + "line": 18 + }, + "name": "consume", + "parameters": [ + { + "name": "_args", + "type": { + "primitive": "any" + }, + "variadic": true + } + ], + "static": true, + "variadic": true + } + ], + "name": "StaticConsumer" + }, "@scope/jsii-calc-base-of-base.Very": { "assembly": "@scope/jsii-calc-base-of-base", "fqn": "@scope/jsii-calc-base-of-base.Very", @@ -1318,7 +1434,7 @@ exports[`Generated code for "@scope/jsii-calc-base-of-base": /dotnet/Ama } }, "version": "0.0.0", - "fingerprint": "v3mwSbKGQ2aa8g0DEKIeaEXh3csX7PX2MJJxHVRufhI=" + "fingerprint": "9nL4armG/GJRAhHMWxkKO9B6+nyGD108qvPMtTPljTw=" } `; @@ -1437,6 +1553,40 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.Internal.Dep `; +exports[`Generated code for "@scope/jsii-calc-base-of-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/StaticConsumer.cs 1`] = ` +using Amazon.JSII.Runtime.Deputy; + +#pragma warning disable CS0672,CS0809,CS1591 + +namespace Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace +{ + [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.StaticConsumer), fullyQualifiedName: "@scope/jsii-calc-base-of-base.StaticConsumer")] + public class StaticConsumer : DeputyBase + { + /// 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 StaticConsumer(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 StaticConsumer(DeputyProps props): base(props) + { + } + + [JsiiMethod(name: "consume", parametersJson: "[{\\"name\\":\\"_args\\",\\"type\\":{\\"primitive\\":\\"any\\"},\\"variadic\\":true}]")] + public static void Consume(params object[] args) + { + InvokeStaticVoidMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.StaticConsumer), new System.Type[]{typeof(object[])}, new object[]{args}); + } + } +} + +`; + exports[`Generated code for "@scope/jsii-calc-base-of-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/Very.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -1531,6 +1681,82 @@ using Amazon.JSII.Runtime.Deputy; exports[`Generated code for "@scope/jsii-calc-base-of-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/scope-jsii-calc-base-of-base-0.0.0.tgz 1`] = `dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/scope-jsii-calc-base-of-base-0.0.0.tgz is a tarball`; +exports[`Generated code for "@scope/jsii-calc-base-of-base": /golang/scopejsiicalcbaseofbase.go 1`] = ` +package scopejsiicalcbaseofbase + +import ( + "github.com/aws-cdk/jsii/jsii" +) + +// Behaviorial interface +type IVeryBaseInterface interface { + Foo() +} + +type StaticConsumerIface interface { + Consume() jsii.Any +} + +// Struct proxy +type StaticConsumer struct { +} + +func (s *StaticConsumer) Consume() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "StaticConsumer", + Method: "Consume", + Parameters: []string{"_args any"} + }) + return nil +} + +type VeryIface interface { + Hey() float64 +} + +// Struct proxy +type Very struct { +} + +func NewVery() VeryIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Very", + Method: "NewVery", + Parameters: []string{} + }) + + return &Very{ + // props + } +} + +func (v *Very) Hey() float64 { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Very", + Method: "Hey", + Parameters: []string{} + }) + return 0.0 +} + +// Struct interface +type VeryBasePropsIface interface { + GetFoo() Very +} + +// Struct proxy +type VeryBaseProps struct { + Foo Very +} + +func (v VeryBaseProps) GetFoo() Very { + return v.Foo +} + + + +`; + exports[`Generated code for "@scope/jsii-calc-base-of-base": /java/pom.xml 1`] = ` @@ -1777,6 +2003,28 @@ public interface IVeryBaseInterface extends software.amazon.jsii.JsiiSerializabl `; +exports[`Generated code for "@scope/jsii-calc-base-of-base": /java/src/main/java/software/amazon/jsii/tests/calculator/baseofbase/StaticConsumer.java 1`] = ` +package software.amazon.jsii.tests.calculator.baseofbase; + +@javax.annotation.Generated(value = "jsii-pacmak") +@software.amazon.jsii.Jsii(module = software.amazon.jsii.tests.calculator.baseofbase.$Module.class, fqn = "@scope/jsii-calc-base-of-base.StaticConsumer") +public class StaticConsumer extends software.amazon.jsii.JsiiObject { + + protected StaticConsumer(final software.amazon.jsii.JsiiObjectRef objRef) { + super(objRef); + } + + protected StaticConsumer(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { + super(initializationMode); + } + + public static void consume(final @org.jetbrains.annotations.NotNull java.lang.Object... _args) { + software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.baseofbase.StaticConsumer.class, "consume", software.amazon.jsii.NativeType.VOID, java.util.Arrays.stream(_args).toArray(Object[]::new)); + } +} + +`; + exports[`Generated code for "@scope/jsii-calc-base-of-base": /java/src/main/java/software/amazon/jsii/tests/calculator/baseofbase/Very.java 1`] = ` package software.amazon.jsii.tests.calculator.baseofbase; @@ -1914,6 +2162,7 @@ public interface VeryBaseProps extends software.amazon.jsii.JsiiSerializable { exports[`Generated code for "@scope/jsii-calc-base-of-base": /java/src/main/resources/software/amazon/jsii/tests/calculator/baseofbase/$Module.txt 1`] = ` @scope/jsii-calc-base-of-base.IVeryBaseInterface=software.amazon.jsii.tests.calculator.baseofbase.IVeryBaseInterface +@scope/jsii-calc-base-of-base.StaticConsumer=software.amazon.jsii.tests.calculator.baseofbase.StaticConsumer @scope/jsii-calc-base-of-base.Very=software.amazon.jsii.tests.calculator.baseofbase.Very @scope/jsii-calc-base-of-base.VeryBaseProps=software.amazon.jsii.tests.calculator.baseofbase.VeryBaseProps @@ -1935,7 +2184,7 @@ exports[`Generated code for "@scope/jsii-calc-base-of-base": /python/REA exports[`Generated code for "@scope/jsii-calc-base-of-base": /python/pyproject.toml 1`] = ` [build-system] -requires = ["setuptools >= 49.3.1", "wheel >= 0.34.2"] +requires = ["setuptools~=49.3", "wheel~=0.34"] build-backend = "setuptools.build_meta" `; @@ -2011,14 +2260,14 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions from ._jsii import * @jsii.interface(jsii_type="@scope/jsii-calc-base-of-base.IVeryBaseInterface") -class IVeryBaseInterface(jsii.compat.Protocol): +class IVeryBaseInterface(typing_extensions.Protocol): @builtins.staticmethod def __jsii_proxy_class__(): return _IVeryBaseInterfaceProxy @@ -2029,13 +2278,26 @@ class IVeryBaseInterface(jsii.compat.Protocol): class _IVeryBaseInterfaceProxy: - __jsii_type__ = "@scope/jsii-calc-base-of-base.IVeryBaseInterface" + __jsii_type__: typing.ClassVar[str] = "@scope/jsii-calc-base-of-base.IVeryBaseInterface" @jsii.member(jsii_name="foo") def foo(self) -> None: return jsii.invoke(self, "foo", []) +class StaticConsumer( + metaclass=jsii.JSIIMeta, + jsii_type="@scope/jsii-calc-base-of-base.StaticConsumer", +): + @jsii.member(jsii_name="consume") + @builtins.classmethod + def consume(cls, *_args: typing.Any) -> None: + """ + :param _args: - + """ + return jsii.sinvoke(cls, "consume", [*_args]) + + class Very(metaclass=jsii.JSIIMeta, jsii_type="@scope/jsii-calc-base-of-base.Very"): def __init__(self) -> None: jsii.create(Very, self, []) @@ -2055,18 +2317,20 @@ class VeryBaseProps: """ :param foo: - """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "foo": foo, } @builtins.property def foo(self) -> "Very": - return self._values.get("foo") + result = self._values.get("foo") + assert result is not None, "Required property 'foo' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -2077,6 +2341,7 @@ class VeryBaseProps: __all__ = [ "IVeryBaseInterface", + "StaticConsumer", "Very", "VeryBaseProps", ] @@ -2093,8 +2358,8 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions __jsii_assembly__ = jsii.JSIIAssembly.load( "@scope/jsii-calc-base-of-base", @@ -2143,12 +2408,12 @@ exports[`Generated code for "@scope/jsii-calc-lib": / 1`] = ` ┃ ┃ ┃ ┣━ 📄 MyFirstStruct.cs ┃ ┃ ┃ ┣━ 📄 MyFirstStructProxy.cs ┃ ┃ ┃ ┣━ 📄 Number.cs + ┃ ┃ ┃ ┣━ 📄 NumericValue.cs + ┃ ┃ ┃ ┣━ 📄 NumericValueProxy.cs ┃ ┃ ┃ ┣━ 📄 Operation.cs ┃ ┃ ┃ ┣━ 📄 OperationProxy.cs ┃ ┃ ┃ ┣━ 📄 StructWithOnlyOptionals.cs - ┃ ┃ ┃ ┣━ 📄 StructWithOnlyOptionalsProxy.cs - ┃ ┃ ┃ ┣━ 📄 Value_.cs - ┃ ┃ ┃ ┗━ 📄 ValueProxy.cs + ┃ ┃ ┃ ┗━ 📄 StructWithOnlyOptionalsProxy.cs ┃ ┃ ┗━ 📁 CustomSubmoduleName ┃ ┃ ┣━ 📄 IReflectable.cs ┃ ┃ ┣━ 📄 IReflectableEntry.cs @@ -2160,6 +2425,10 @@ exports[`Generated code for "@scope/jsii-calc-lib": / 1`] = ` ┃ ┣━ 📄 Amazon.JSII.Tests.CalculatorPackageId.LibPackageId.csproj ┃ ┣━ 📄 AssemblyInfo.cs ┃ ┗━ 📄 scope-jsii-calc-lib-0.0.0.tgz + ┣━ 📁 golang + ┃ ┣━ 📁 scopejsiicalclib + ┃ ┃ ┗━ 📄 submodule.go + ┃ ┗━ 📄 scopejsiicalclib.go ┣━ 📁 java ┃ ┣━ 📄 pom.xml ┃ ┗━ 📁 src @@ -2183,10 +2452,10 @@ exports[`Generated code for "@scope/jsii-calc-lib": / 1`] = ` ┃ ┃ ┣━ 📄 IThreeLevelsInterface.java ┃ ┃ ┣━ 📄 MyFirstStruct.java ┃ ┃ ┣━ 📄 Number.java + ┃ ┃ ┣━ 📄 NumericValue.java ┃ ┃ ┣━ 📄 Operation.java ┃ ┃ ┣━ 📄 package-info.java - ┃ ┃ ┣━ 📄 StructWithOnlyOptionals.java - ┃ ┃ ┗━ 📄 Value.java + ┃ ┃ ┗━ 📄 StructWithOnlyOptionals.java ┃ ┗━ 📁 resources ┃ ┗━ 📁 software ┃ ┗━ 📁 amazon @@ -2236,6 +2505,7 @@ exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII. "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace", "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BasePackageId" }, + "go": {}, "java": { "maven": { "artifactId": "calculator-base", @@ -2258,6 +2528,7 @@ exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII. "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace", "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId" }, + "go": {}, "java": { "maven": { "artifactId": "calculator-base-of-base", @@ -2315,6 +2586,7 @@ exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII. "packageId": "Amazon.JSII.Tests.CalculatorPackageId.LibPackageId", "versionSuffix": "-devpreview" }, + "go": {}, "java": { "maven": { "artifactId": "calculator-lib", @@ -2529,7 +2801,7 @@ exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII. }, "@scope/jsii-calc-lib.Number": { "assembly": "@scope/jsii-calc-lib", - "base": "@scope/jsii-calc-lib.Value", + "base": "@scope/jsii-calc-lib.NumericValue", "docs": { "stability": "deprecated", "summary": "Represents a concrete number." @@ -2593,7 +2865,60 @@ exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII. "line": 35 }, "name": "value", - "overrides": "@scope/jsii-calc-lib.Value", + "overrides": "@scope/jsii-calc-lib.NumericValue", + "type": { + "primitive": "number" + } + } + ] + }, + "@scope/jsii-calc-lib.NumericValue": { + "abstract": true, + "assembly": "@scope/jsii-calc-lib", + "base": "@scope/jsii-calc-base.Base", + "docs": { + "stability": "deprecated", + "summary": "Abstract class which represents a numeric value." + }, + "fqn": "@scope/jsii-calc-lib.NumericValue", + "initializer": {}, + "kind": "class", + "locationInModule": { + "filename": "lib/index.ts", + "line": 6 + }, + "methods": [ + { + "docs": { + "stability": "deprecated", + "summary": "String representation of the value." + }, + "locationInModule": { + "filename": "lib/index.ts", + "line": 15 + }, + "name": "toString", + "returns": { + "type": { + "primitive": "string" + } + } + } + ], + "name": "NumericValue", + "properties": [ + { + "abstract": true, + "docs": { + "stability": "deprecated", + "summary": "The value." + }, + "immutable": true, + "locationInModule": { + "filename": "lib/index.ts", + "line": 10 + }, + "name": "value", "type": { "primitive": "number" } @@ -2603,7 +2928,7 @@ exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII. "@scope/jsii-calc-lib.Operation": { "abstract": true, "assembly": "@scope/jsii-calc-lib", - "base": "@scope/jsii-calc-lib.Value", + "base": "@scope/jsii-calc-lib.NumericValue", "docs": { "stability": "deprecated", "summary": "Represents an operation on values." @@ -2627,7 +2952,7 @@ exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII. "line": 51 }, "name": "toString", - "overrides": "@scope/jsii-calc-lib.Value", + "overrides": "@scope/jsii-calc-lib.NumericValue", "returns": { "type": { "primitive": "string" @@ -2703,59 +3028,6 @@ exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII. } ] }, - "@scope/jsii-calc-lib.Value": { - "abstract": true, - "assembly": "@scope/jsii-calc-lib", - "base": "@scope/jsii-calc-base.Base", - "docs": { - "stability": "deprecated", - "summary": "Abstract class which represents a numeric value." - }, - "fqn": "@scope/jsii-calc-lib.Value", - "initializer": {}, - "kind": "class", - "locationInModule": { - "filename": "lib/index.ts", - "line": 6 - }, - "methods": [ - { - "docs": { - "stability": "deprecated", - "summary": "String representation of the value." - }, - "locationInModule": { - "filename": "lib/index.ts", - "line": 15 - }, - "name": "toString", - "returns": { - "type": { - "primitive": "string" - } - } - } - ], - "name": "Value", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "deprecated", - "summary": "The value." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/index.ts", - "line": 10 - }, - "name": "value", - "type": { - "primitive": "number" - } - } - ] - }, "@scope/jsii-calc-lib.submodule.IReflectable": { "assembly": "@scope/jsii-calc-lib", "docs": { @@ -2843,6 +3115,40 @@ exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII. } ] }, + "@scope/jsii-calc-lib.submodule.NestingClass.NestedStruct": { + "assembly": "@scope/jsii-calc-lib", + "datatype": true, + "docs": { + "remarks": "Normal.", + "stability": "deprecated", + "summary": "This is a struct, nested within a class." + }, + "fqn": "@scope/jsii-calc-lib.submodule.NestingClass.NestedStruct", + "kind": "interface", + "locationInModule": { + "filename": "lib/submodule/index.ts", + "line": 37 + }, + "name": "NestedStruct", + "namespace": "submodule.NestingClass", + "properties": [ + { + "abstract": true, + "docs": { + "stability": "deprecated" + }, + "immutable": true, + "locationInModule": { + "filename": "lib/submodule/index.ts", + "line": 38 + }, + "name": "name", + "type": { + "primitive": "string" + } + } + ] + }, "@scope/jsii-calc-lib.submodule.ReflectableEntry": { "assembly": "@scope/jsii-calc-lib", "datatype": true, @@ -2941,7 +3247,7 @@ exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII. } }, "version": "0.0.0", - "fingerprint": "f/4VuNiOkSgTgLR80loQUAzAuzFi+25rmfLcRWKDCrY=" + "fingerprint": "kLS1ei6Uc31/IKA//k3OZp65Lxz+2tLyQOO/qSYpvSE=" } `; @@ -3485,7 +3791,7 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Number), fullyQualifiedName: "@scope/jsii-calc-lib.Number", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"The number.\\"},\\"name\\":\\"value\\",\\"type\\":{\\"primitive\\":\\"number\\"}}]")] [System.Obsolete()] - public class Number : Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Value_, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IDoublable + public class Number : Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IDoublable { /// Creates a Number object. /// The number. @@ -3539,6 +3845,99 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace `; +exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/NumericValue.cs 1`] = ` +using Amazon.JSII.Runtime.Deputy; + +#pragma warning disable CS0672,CS0809,CS1591 + +namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace +{ + /// Abstract class which represents a numeric value. + /// + /// Stability: Deprecated + /// + [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue), fullyQualifiedName: "@scope/jsii-calc-lib.NumericValue")] + [System.Obsolete()] + public abstract class NumericValue : Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.Base + { + protected NumericValue(): base(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 NumericValue(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 NumericValue(DeputyProps props): base(props) + { + } + + /// String representation of the value. + /// + /// Stability: Deprecated + /// + [JsiiMethod(name: "toString", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] + [System.Obsolete()] + public override string ToString() + { + return InvokeInstanceMethod(new System.Type[]{}, new object[]{}); + } + + /// The value. + /// + /// Stability: Deprecated + /// + [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"number\\"}")] + [System.Obsolete()] + public abstract double Value + { + get; + } + } +} + +`; + +exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/NumericValueProxy.cs 1`] = ` +using Amazon.JSII.Runtime.Deputy; + +#pragma warning disable CS0672,CS0809,CS1591 + +namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace +{ + /// Abstract class which represents a numeric value. + /// + /// Stability: Deprecated + /// + [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue), fullyQualifiedName: "@scope/jsii-calc-lib.NumericValue")] + [System.Obsolete()] + internal sealed class NumericValueProxy : Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue + { + private NumericValueProxy(ByRefValue reference): base(reference) + { + } + + /// The value. + /// + /// Stability: Deprecated + /// + [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"number\\"}")] + [System.Obsolete()] + public override double Value + { + get => GetInstanceProperty(); + } + } +} + +`; + exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/Operation.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -3552,7 +3951,7 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Operation), fullyQualifiedName: "@scope/jsii-calc-lib.Operation")] [System.Obsolete()] - public abstract class Operation : Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Value_ + public abstract class Operation : Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue { protected Operation(): base(new DeputyProps(System.Array.Empty())) { @@ -3742,99 +4141,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace `; -exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/Value_.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace -{ - /// Abstract class which represents a numeric value. - /// - /// Stability: Deprecated - /// - [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Value_), fullyQualifiedName: "@scope/jsii-calc-lib.Value")] - [System.Obsolete()] - public abstract class Value_ : Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.Base - { - protected Value_(): base(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 Value_(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 Value_(DeputyProps props): base(props) - { - } - - /// String representation of the value. - /// - /// Stability: Deprecated - /// - [JsiiMethod(name: "toString", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] - [System.Obsolete()] - public override string ToString() - { - return InvokeInstanceMethod(new System.Type[]{}, new object[]{}); - } - - /// The value. - /// - /// Stability: Deprecated - /// - [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"number\\"}")] - [System.Obsolete()] - public abstract double Value - { - get; - } - } -} - -`; - -exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/ValueProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace -{ - /// Abstract class which represents a numeric value. - /// - /// Stability: Deprecated - /// - [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Value_), fullyQualifiedName: "@scope/jsii-calc-lib.Value")] - [System.Obsolete()] - internal sealed class ValueProxy : Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Value_ - { - private ValueProxy(ByRefValue reference): base(reference) - { - } - - /// The value. - /// - /// Stability: Deprecated - /// - [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"number\\"}")] - [System.Obsolete()] - public override double Value - { - get => GetInstanceProperty(); - } - } -} - -`; - exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CustomSubmoduleName/IReflectable.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -4003,6 +4309,72 @@ namespace Amazon.JSII.Tests.CustomSubmoduleName get => GetInstanceProperty(); } } + /// This is a struct, nested within a class. + /// + /// Normal. + /// + /// Stability: Deprecated + /// + [JsiiInterface(nativeType: typeof(INestedStruct), fullyQualifiedName: "@scope/jsii-calc-lib.submodule.NestingClass.NestedStruct")] + [System.Obsolete()] + public interface INestedStruct + { + /// + /// Stability: Deprecated + /// + [JsiiProperty(name: "name", typeJson: "{\\"primitive\\":\\"string\\"}")] + [System.Obsolete()] + string Name + { + get; + } + } + /// This is a struct, nested within a class. + /// + /// Normal. + /// + /// Stability: Deprecated + /// + [JsiiTypeProxy(nativeType: typeof(INestedStruct), fullyQualifiedName: "@scope/jsii-calc-lib.submodule.NestingClass.NestedStruct")] + [System.Obsolete()] + internal sealed class NestedStructProxy : DeputyBase, Amazon.JSII.Tests.CustomSubmoduleName.NestingClass.INestedStruct + { + private NestedStructProxy(ByRefValue reference): base(reference) + { + } + + /// + /// Stability: Deprecated + /// + [JsiiProperty(name: "name", typeJson: "{\\"primitive\\":\\"string\\"}")] + [System.Obsolete()] + public string Name + { + get => GetInstanceProperty(); + } + } + #pragma warning disable CS8618 + + /// This is a struct, nested within a class. + /// + /// Normal. + /// + /// Stability: Deprecated + /// + [JsiiByValue(fqn: "@scope/jsii-calc-lib.submodule.NestingClass.NestedStruct")] + public class NestedStruct : Amazon.JSII.Tests.CustomSubmoduleName.NestingClass.INestedStruct + { + /// + /// Stability: Deprecated + /// + [JsiiProperty(name: "name", typeJson: "{\\"primitive\\":\\"string\\"}", isOverride: true)] + [System.Obsolete()] + public string Name + { + get; + set; + } + } } } @@ -4152,6 +4524,337 @@ using Amazon.JSII.Runtime.Deputy; exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/scope-jsii-calc-lib-0.0.0.tgz 1`] = `dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/scope-jsii-calc-lib-0.0.0.tgz is a tarball`; +exports[`Generated code for "@scope/jsii-calc-lib": /golang/scopejsiicalclib.go 1`] = ` +package scopejsiicalclib + +import ( + "github.com/aws-cdk/jsii/jsii" +) + +type EnumFromScopedModule string + +const ( + EnumFromScopedModuleValue1 EnumFromScopedModule = "VALUE1" + EnumFromScopedModuleValue2 EnumFromScopedModule = "VALUE2" +) + +// Behaviorial interface +type IDoublable interface { + GetDoubleValue() float64 +} + +// Behaviorial interface +type IFriendly interface { + Hello() string +} + +// Behaviorial interface +type IThreeLevelsInterface interface { + @scope/jsii-calc-base-of-base.IVeryBaseInterface + @scope/jsii-calc-base.IBaseInterface + Baz() +} + +// Struct interface +type MyFirstStructIface interface { + GetAnumber() float64 + GetAstring() string + GetFirstOptional() []string +} + +// Struct proxy +type MyFirstStruct struct { + Anumber float64 + Astring string + FirstOptional []string +} + +func (m MyFirstStruct) GetAnumber() float64 { + return m.Anumber +} + +func (m MyFirstStruct) GetAstring() string { + return m.Astring +} + +func (m MyFirstStruct) GetFirstOptional() []string { + return m.FirstOptional +} + + +type NumberIface interface { + GetValue() float64 + SetValue() + GetDoubleValue() float64 + SetDoubleValue() +} + +// Struct proxy +type Number struct { + Value float64 + DoubleValue float64 +} + +func (n Number) GetValue() float64 { + return n.Value +} + +func (n Number) GetDoubleValue() float64 { + return n.DoubleValue +} + + +// Creates a Number object. +func NewNumber(value number) NumberIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Number", + Method: "NewNumber", + Parameters: []string{value number} + }) + + return &Number{ + // props + } +} + +func (n Number) SetValue(val float64) { + n.Value = val +} + +func (n Number) SetDoubleValue(val float64) { + n.DoubleValue = val +} + +type NumericValueIface interface { + GetValue() float64 + SetValue() + ToString() string +} + +// Struct proxy +type NumericValue struct { + Value float64 +} + +func (n NumericValue) GetValue() float64 { + return n.Value +} + + +func NewNumericValue() NumericValueIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "NumericValue", + Method: "NewNumericValue", + Parameters: []string{} + }) + + return &NumericValue{ + // props + } +} + +func (n NumericValue) SetValue(val float64) { + n.Value = val +} + +func (n *NumericValue) ToString() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "NumericValue", + Method: "ToString", + Parameters: []string{} + }) + return "NOOP_RETURN_STRING" +} + +type OperationIface interface { + GetValue() float64 + SetValue() + ToString() string +} + +// Struct proxy +type Operation struct { + Value float64 +} + +func (o Operation) GetValue() float64 { + return o.Value +} + + +func NewOperation() OperationIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Operation", + Method: "NewOperation", + Parameters: []string{} + }) + + return &Operation{ + // props + } +} + +func (o Operation) SetValue(val float64) { + o.Value = val +} + +func (o *Operation) ToString() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Operation", + Method: "ToString", + Parameters: []string{} + }) + return "NOOP_RETURN_STRING" +} + +// Struct interface +type StructWithOnlyOptionalsIface interface { + GetOptional1() string + GetOptional2() float64 + GetOptional3() bool +} + +// Struct proxy +type StructWithOnlyOptionals struct { + Optional1 string + Optional2 float64 + Optional3 bool +} + +func (s StructWithOnlyOptionals) GetOptional1() string { + return s.Optional1 +} + +func (s StructWithOnlyOptionals) GetOptional2() float64 { + return s.Optional2 +} + +func (s StructWithOnlyOptionals) GetOptional3() bool { + return s.Optional3 +} + + + +`; + +exports[`Generated code for "@scope/jsii-calc-lib": /golang/scopejsiicalclib/submodule.go 1`] = ` +package submodule + +import ( + "github.com/aws-cdk/jsii/jsii" +) + +// Behaviorial interface +type IReflectable interface { + GetEntries() []ReflectableEntry +} + +type NestingClassIface interface { +} + +// Struct proxy +type NestingClass struct { +} + +type NestedClassIface interface { + GetProperty() string + SetProperty() +} + +// Struct proxy +type NestedClass struct { + Property string +} + +func (n NestedClass) GetProperty() string { + return n.Property +} + + +func NewNestedClass() NestedClassIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "NestedClass", + Method: "NewNestedClass", + Parameters: []string{} + }) + + return &NestedClass{ + // props + } +} + +func (n NestedClass) SetProperty(val string) { + n.Property = val +} + +// Struct interface +type NestedStructIface interface { + GetName() string +} + +// Struct proxy +type NestedStruct struct { + Name string +} + +func (n NestedStruct) GetName() string { + return n.Name +} + + +// Struct interface +type ReflectableEntryIface interface { + GetKey() string + GetValue() jsii.Any +} + +// Struct proxy +type ReflectableEntry struct { + Key string + Value jsii.Any +} + +func (r ReflectableEntry) GetKey() string { + return r.Key +} + +func (r ReflectableEntry) GetValue() jsii.Any { + return r.Value +} + + +type ReflectorIface interface { + AsMap() map[string]jsii.Any +} + +// Struct proxy +type Reflector struct { +} + +func NewReflector() ReflectorIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Reflector", + Method: "NewReflector", + Parameters: []string{} + }) + + return &Reflector{ + // props + } +} + +func (r *Reflector) AsMap() map[string]jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Reflector", + Method: "AsMap", + Parameters: []string{"reflectable @scope/jsii-calc-lib.submodule.IReflectable"} + }) + return nil +} + + +`; + exports[`Generated code for "@scope/jsii-calc-lib": /java/pom.xml 1`] = ` @@ -4401,6 +5104,128 @@ public class NestingClass extends software.amazon.jsii.JsiiObject { return this.jsiiGet("property", java.lang.String.class); } } + /** + * This is a struct, nested within a class. + *

+ * Normal. + */ + @software.amazon.jsii.Jsii(module = software.amazon.jsii.tests.calculator.lib.$Module.class, fqn = "@scope/jsii-calc-lib.submodule.NestingClass.NestedStruct") + @software.amazon.jsii.Jsii.Proxy(NestedStruct.Jsii$Proxy.class) + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) + @Deprecated + public static interface NestedStruct extends software.amazon.jsii.JsiiSerializable { + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) + @Deprecated + @org.jetbrains.annotations.NotNull java.lang.String getName(); + + /** + * @return a {@link Builder} of {@link NestedStruct} + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) + @Deprecated + static Builder builder() { + return new Builder(); + } + /** + * A builder for {@link NestedStruct} + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) + @Deprecated + public static final class Builder implements software.amazon.jsii.Builder { + private java.lang.String name; + + /** + * Sets the value of {@link NestedStruct#getName} + * @param name the value to be set. This parameter is required. + * @return {@code this} + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) + @Deprecated + public Builder name(java.lang.String name) { + this.name = name; + return this; + } + + /** + * Builds the configured instance. + * @return a new instance of {@link NestedStruct} + * @throws NullPointerException if any required attribute was not provided + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) + @Deprecated + @Override + public NestedStruct build() { + return new Jsii$Proxy(name); + } + } + + /** + * An implementation for {@link NestedStruct} + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) + @Deprecated + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements NestedStruct { + private final java.lang.String name; + + /** + * 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.name = this.jsiiGet("name", java.lang.String.class); + } + + /** + * Constructor that initializes the object based on literal property values passed by the {@link Builder}. + */ + private Jsii$Proxy(final java.lang.String name) { + super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); + this.name = java.util.Objects.requireNonNull(name, "name is required"); + } + + @Override + public java.lang.String getName() { + return this.name; + } + + @Override + 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(); + + data.set("name", om.valueToTree(this.getName())); + + final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); + struct.set("fqn", om.valueToTree("@scope/jsii-calc-lib.submodule.NestingClass.NestedStruct")); + 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 boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + NestedStruct.Jsii$Proxy that = (NestedStruct.Jsii$Proxy) o; + + return this.name.equals(that.name); + } + + @Override + public int hashCode() { + int result = this.name.hashCode(); + return result; + } + } + } } `; @@ -5048,7 +5873,7 @@ package software.amazon.jsii.tests.calculator.lib; @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated @software.amazon.jsii.Jsii(module = software.amazon.jsii.tests.calculator.lib.$Module.class, fqn = "@scope/jsii-calc-lib.Number") -public class Number extends software.amazon.jsii.tests.calculator.lib.Value implements software.amazon.jsii.tests.calculator.lib.IDoublable { +public class Number extends software.amazon.jsii.tests.calculator.lib.NumericValue implements software.amazon.jsii.tests.calculator.lib.IDoublable { protected Number(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); @@ -5093,6 +5918,69 @@ public class Number extends software.amazon.jsii.tests.calculator.lib.Value impl `; +exports[`Generated code for "@scope/jsii-calc-lib": /java/src/main/java/software/amazon/jsii/tests/calculator/lib/NumericValue.java 1`] = ` +package software.amazon.jsii.tests.calculator.lib; + +/** + * Abstract class which represents a numeric value. + */ +@javax.annotation.Generated(value = "jsii-pacmak") +@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) +@Deprecated +@software.amazon.jsii.Jsii(module = software.amazon.jsii.tests.calculator.lib.$Module.class, fqn = "@scope/jsii-calc-lib.NumericValue") +public abstract class NumericValue extends software.amazon.jsii.tests.calculator.base.Base { + + protected NumericValue(final software.amazon.jsii.JsiiObjectRef objRef) { + super(objRef); + } + + protected NumericValue(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { + super(initializationMode); + } + + protected NumericValue() { + super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); + software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this); + } + + /** + * String representation of the value. + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) + @Deprecated + public @org.jetbrains.annotations.NotNull java.lang.String toString() { + return this.jsiiCall("toString", java.lang.String.class); + } + + /** + * The value. + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) + @Deprecated + public abstract @org.jetbrains.annotations.NotNull java.lang.Number getValue(); + + /** + * A proxy class which represents a concrete javascript instance of this type. + */ + final static class Jsii$Proxy extends software.amazon.jsii.tests.calculator.lib.NumericValue { + protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { + super(objRef); + } + + /** + * The value. + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) + @Deprecated + public @org.jetbrains.annotations.NotNull java.lang.Number getValue() { + return this.jsiiGet("value", java.lang.Number.class); + } + } +} + +`; + exports[`Generated code for "@scope/jsii-calc-lib": /java/src/main/java/software/amazon/jsii/tests/calculator/lib/Operation.java 1`] = ` package software.amazon.jsii.tests.calculator.lib; @@ -5103,7 +5991,7 @@ package software.amazon.jsii.tests.calculator.lib; @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated @software.amazon.jsii.Jsii(module = software.amazon.jsii.tests.calculator.lib.$Module.class, fqn = "@scope/jsii-calc-lib.Operation") -public abstract class Operation extends software.amazon.jsii.tests.calculator.lib.Value { +public abstract class Operation extends software.amazon.jsii.tests.calculator.lib.NumericValue { protected Operation(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); @@ -5358,69 +6246,6 @@ public interface StructWithOnlyOptionals extends software.amazon.jsii.JsiiSerial `; -exports[`Generated code for "@scope/jsii-calc-lib": /java/src/main/java/software/amazon/jsii/tests/calculator/lib/Value.java 1`] = ` -package software.amazon.jsii.tests.calculator.lib; - -/** - * Abstract class which represents a numeric value. - */ -@javax.annotation.Generated(value = "jsii-pacmak") -@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) -@Deprecated -@software.amazon.jsii.Jsii(module = software.amazon.jsii.tests.calculator.lib.$Module.class, fqn = "@scope/jsii-calc-lib.Value") -public abstract class Value extends software.amazon.jsii.tests.calculator.base.Base { - - protected Value(final software.amazon.jsii.JsiiObjectRef objRef) { - super(objRef); - } - - protected Value(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { - super(initializationMode); - } - - protected Value() { - super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); - software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this); - } - - /** - * String representation of the value. - */ - @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) - @Deprecated - public @org.jetbrains.annotations.NotNull java.lang.String toString() { - return this.jsiiCall("toString", java.lang.String.class); - } - - /** - * The value. - */ - @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) - @Deprecated - public abstract @org.jetbrains.annotations.NotNull java.lang.Number getValue(); - - /** - * A proxy class which represents a concrete javascript instance of this type. - */ - final static class Jsii$Proxy extends software.amazon.jsii.tests.calculator.lib.Value { - protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { - super(objRef); - } - - /** - * The value. - */ - @Override - @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) - @Deprecated - public @org.jetbrains.annotations.NotNull java.lang.Number getValue() { - return this.jsiiGet("value", java.lang.Number.class); - } - } -} - -`; - exports[`Generated code for "@scope/jsii-calc-lib": /java/src/main/java/software/amazon/jsii/tests/calculator/lib/package-info.java 1`] = ` /** * @@ -5439,12 +6264,13 @@ exports[`Generated code for "@scope/jsii-calc-lib": /java/src/main/resou @scope/jsii-calc-lib.IThreeLevelsInterface=software.amazon.jsii.tests.calculator.lib.IThreeLevelsInterface @scope/jsii-calc-lib.MyFirstStruct=software.amazon.jsii.tests.calculator.lib.MyFirstStruct @scope/jsii-calc-lib.Number=software.amazon.jsii.tests.calculator.lib.Number +@scope/jsii-calc-lib.NumericValue=software.amazon.jsii.tests.calculator.lib.NumericValue @scope/jsii-calc-lib.Operation=software.amazon.jsii.tests.calculator.lib.Operation @scope/jsii-calc-lib.StructWithOnlyOptionals=software.amazon.jsii.tests.calculator.lib.StructWithOnlyOptionals -@scope/jsii-calc-lib.Value=software.amazon.jsii.tests.calculator.lib.Value @scope/jsii-calc-lib.submodule.IReflectable=software.amazon.jsii.tests.calculator.custom_submodule_name.IReflectable @scope/jsii-calc-lib.submodule.NestingClass=software.amazon.jsii.tests.calculator.custom_submodule_name.NestingClass @scope/jsii-calc-lib.submodule.NestingClass.NestedClass=software.amazon.jsii.tests.calculator.custom_submodule_name.NestingClass$NestedClass +@scope/jsii-calc-lib.submodule.NestingClass.NestedStruct=software.amazon.jsii.tests.calculator.custom_submodule_name.NestingClass$NestedStruct @scope/jsii-calc-lib.submodule.ReflectableEntry=software.amazon.jsii.tests.calculator.custom_submodule_name.ReflectableEntry @scope/jsii-calc-lib.submodule.Reflector=software.amazon.jsii.tests.calculator.custom_submodule_name.Reflector @@ -5466,7 +6292,7 @@ exports[`Generated code for "@scope/jsii-calc-lib": /python/README.md 1` exports[`Generated code for "@scope/jsii-calc-lib": /python/pyproject.toml 1`] = ` [build-system] -requires = ["setuptools >= 49.3.1", "wheel >= 0.34.2"] +requires = ["setuptools~=49.3", "wheel~=0.34"] build-backend = "setuptools.build_meta" `; @@ -5546,8 +6372,8 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions from ._jsii import * @@ -5577,7 +6403,7 @@ class EnumFromScopedModule(enum.Enum): @jsii.interface(jsii_type="@scope/jsii-calc-lib.IDoublable") -class IDoublable(jsii.compat.Protocol): +class IDoublable(typing_extensions.Protocol): """The general contract for a concrete number. stability @@ -5588,7 +6414,7 @@ class IDoublable(jsii.compat.Protocol): def __jsii_proxy_class__(): return _IDoublableProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="doubleValue") def double_value(self) -> jsii.Number: """ @@ -5605,9 +6431,9 @@ class _IDoublableProxy: :stability: deprecated """ - __jsii_type__ = "@scope/jsii-calc-lib.IDoublable" + __jsii_type__: typing.ClassVar[str] = "@scope/jsii-calc-lib.IDoublable" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="doubleValue") def double_value(self) -> jsii.Number: """ @@ -5618,7 +6444,7 @@ class _IDoublableProxy: @jsii.interface(jsii_type="@scope/jsii-calc-lib.IFriendly") -class IFriendly(jsii.compat.Protocol): +class IFriendly(typing_extensions.Protocol): """Applies to classes that are considered friendly. These classes can be greeted with @@ -5633,7 +6459,7 @@ class IFriendly(jsii.compat.Protocol): return _IFriendlyProxy @jsii.member(jsii_name="hello") - def hello(self) -> str: + def hello(self) -> builtins.str: """Say hello! stability @@ -5652,10 +6478,10 @@ class _IFriendlyProxy: :stability: deprecated """ - __jsii_type__ = "@scope/jsii-calc-lib.IFriendly" + __jsii_type__: typing.ClassVar[str] = "@scope/jsii-calc-lib.IFriendly" @jsii.member(jsii_name="hello") - def hello(self) -> str: + def hello(self) -> builtins.str: """Say hello! stability @@ -5665,7 +6491,10 @@ class _IFriendlyProxy: @jsii.interface(jsii_type="@scope/jsii-calc-lib.IThreeLevelsInterface") -class IThreeLevelsInterface(scope.jsii_calc_base.IBaseInterface, jsii.compat.Protocol): +class IThreeLevelsInterface( + scope.jsii_calc_base.IBaseInterface, + typing_extensions.Protocol, +): """Interface that inherits from packages 2 levels up the tree. Their presence validates that .NET/Java/jsii-reflect can track all fields @@ -5688,7 +6517,9 @@ class IThreeLevelsInterface(scope.jsii_calc_base.IBaseInterface, jsii.compat.Pro ... -class _IThreeLevelsInterfaceProxy(jsii.proxy_for(scope.jsii_calc_base.IBaseInterface)): +class _IThreeLevelsInterfaceProxy( + jsii.proxy_for(scope.jsii_calc_base.IBaseInterface) # type: ignore +): """Interface that inherits from packages 2 levels up the tree. Their presence validates that .NET/Java/jsii-reflect can track all fields @@ -5698,7 +6529,7 @@ class _IThreeLevelsInterfaceProxy(jsii.proxy_for(scope.jsii_calc_base.IBaseInter :stability: deprecated """ - __jsii_type__ = "@scope/jsii-calc-lib.IThreeLevelsInterface" + __jsii_type__: typing.ClassVar[str] = "@scope/jsii-calc-lib.IThreeLevelsInterface" @jsii.member(jsii_name="baz") def baz(self) -> None: @@ -5723,8 +6554,8 @@ class MyFirstStruct: self, *, anumber: jsii.Number, - astring: str, - first_optional: typing.Optional[typing.List[str]] = None, + astring: builtins.str, + first_optional: typing.Optional[typing.List[builtins.str]] = None, ) -> None: """This is the first struct we have created in jsii. @@ -5735,7 +6566,7 @@ class MyFirstStruct: stability :stability: deprecated """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "anumber": anumber, "astring": astring, } @@ -5749,29 +6580,34 @@ class MyFirstStruct: stability :stability: deprecated """ - return self._values.get("anumber") + result = self._values.get("anumber") + assert result is not None, "Required property 'anumber' is missing" + return result @builtins.property - def astring(self) -> str: + def astring(self) -> builtins.str: """A string value. stability :stability: deprecated """ - return self._values.get("astring") + result = self._values.get("astring") + assert result is not None, "Required property 'astring' is missing" + return result @builtins.property - def first_optional(self) -> typing.Optional[typing.List[str]]: + def first_optional(self) -> typing.Optional[typing.List[builtins.str]]: """ stability :stability: deprecated """ - return self._values.get("first_optional") + result = self._values.get("first_optional") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -5780,81 +6616,10 @@ class MyFirstStruct: ) -@jsii.data_type( - jsii_type="@scope/jsii-calc-lib.StructWithOnlyOptionals", - jsii_struct_bases=[], - name_mapping={ - "optional1": "optional1", - "optional2": "optional2", - "optional3": "optional3", - }, -) -class StructWithOnlyOptionals: - def __init__( - self, - *, - optional1: typing.Optional[str] = None, - optional2: typing.Optional[jsii.Number] = None, - optional3: typing.Optional[bool] = None, - ) -> None: - """This is a struct with only optional properties. - - :param optional1: The first optional! - :param optional2: - :param optional3: - - stability - :stability: deprecated - """ - self._values = {} - if optional1 is not None: - self._values["optional1"] = optional1 - if optional2 is not None: - self._values["optional2"] = optional2 - if optional3 is not None: - self._values["optional3"] = optional3 - - @builtins.property - def optional1(self) -> typing.Optional[str]: - """The first optional! - - stability - :stability: deprecated - """ - return self._values.get("optional1") - - @builtins.property - def optional2(self) -> typing.Optional[jsii.Number]: - """ - stability - :stability: deprecated - """ - return self._values.get("optional2") - - @builtins.property - def optional3(self) -> typing.Optional[bool]: - """ - stability - :stability: deprecated - """ - return self._values.get("optional3") - - def __eq__(self, rhs) -> bool: - return isinstance(rhs, self.__class__) and rhs._values == self._values - - def __ne__(self, rhs) -> bool: - return not (rhs == self) - - def __repr__(self) -> str: - return "StructWithOnlyOptionals(%s)" % ", ".join( - k + "=" + repr(v) for k, v in self._values.items() - ) - - -class Value( +class NumericValue( scope.jsii_calc_base.Base, metaclass=jsii.JSIIAbstractClass, - jsii_type="@scope/jsii-calc-lib.Value", + jsii_type="@scope/jsii-calc-lib.NumericValue", ): """Abstract class which represents a numeric value. @@ -5864,13 +6629,13 @@ class Value( @builtins.staticmethod def __jsii_proxy_class__(): - return _ValueProxy + return _NumericValueProxy def __init__(self) -> None: - jsii.create(Value, self, []) + jsii.create(NumericValue, self, []) @jsii.member(jsii_name="toString") - def to_string(self) -> str: + def to_string(self) -> builtins.str: """String representation of the value. stability @@ -5878,7 +6643,7 @@ class Value( """ return jsii.invoke(self, "toString", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="value") @abc.abstractmethod def value(self) -> jsii.Number: @@ -5890,8 +6655,10 @@ class Value( ... -class _ValueProxy(Value, jsii.proxy_for(scope.jsii_calc_base.Base)): - @builtins.property +class _NumericValueProxy( + NumericValue, jsii.proxy_for(scope.jsii_calc_base.Base) # type: ignore +): + @builtins.property # type: ignore @jsii.member(jsii_name="value") def value(self) -> jsii.Number: """The value. @@ -5902,47 +6669,10 @@ class _ValueProxy(Value, jsii.proxy_for(scope.jsii_calc_base.Base)): return jsii.get(self, "value") -@jsii.implements(IDoublable) -class Number(Value, metaclass=jsii.JSIIMeta, jsii_type="@scope/jsii-calc-lib.Number"): - """Represents a concrete number. - - stability - :stability: deprecated - """ - - def __init__(self, value: jsii.Number) -> None: - """Creates a Number object. - - :param value: The number. - - stability - :stability: deprecated - """ - jsii.create(Number, self, [value]) - - @builtins.property - @jsii.member(jsii_name="doubleValue") - def double_value(self) -> jsii.Number: - """The number multiplied by 2. - - stability - :stability: deprecated - """ - return jsii.get(self, "doubleValue") - - @builtins.property - @jsii.member(jsii_name="value") - def value(self) -> jsii.Number: - """The number. - - stability - :stability: deprecated - """ - return jsii.get(self, "value") - - class Operation( - Value, metaclass=jsii.JSIIAbstractClass, jsii_type="@scope/jsii-calc-lib.Operation" + NumericValue, + metaclass=jsii.JSIIAbstractClass, + jsii_type="@scope/jsii-calc-lib.Operation", ): """Represents an operation on values. @@ -5959,7 +6689,7 @@ class Operation( @jsii.member(jsii_name="toString") @abc.abstractmethod - def to_string(self) -> str: + def to_string(self) -> builtins.str: """String representation of the value. stability @@ -5968,9 +6698,11 @@ class Operation( ... -class _OperationProxy(Operation, jsii.proxy_for(Value)): +class _OperationProxy( + Operation, jsii.proxy_for(NumericValue) # type: ignore +): @jsii.member(jsii_name="toString") - def to_string(self) -> str: + def to_string(self) -> builtins.str: """String representation of the value. stability @@ -5979,6 +6711,123 @@ class _OperationProxy(Operation, jsii.proxy_for(Value)): return jsii.invoke(self, "toString", []) +@jsii.data_type( + jsii_type="@scope/jsii-calc-lib.StructWithOnlyOptionals", + jsii_struct_bases=[], + name_mapping={ + "optional1": "optional1", + "optional2": "optional2", + "optional3": "optional3", + }, +) +class StructWithOnlyOptionals: + def __init__( + self, + *, + optional1: typing.Optional[builtins.str] = None, + optional2: typing.Optional[jsii.Number] = None, + optional3: typing.Optional[builtins.bool] = None, + ) -> None: + """This is a struct with only optional properties. + + :param optional1: The first optional! + :param optional2: + :param optional3: + + stability + :stability: deprecated + """ + self._values: typing.Dict[str, typing.Any] = {} + if optional1 is not None: + self._values["optional1"] = optional1 + if optional2 is not None: + self._values["optional2"] = optional2 + if optional3 is not None: + self._values["optional3"] = optional3 + + @builtins.property + def optional1(self) -> typing.Optional[builtins.str]: + """The first optional! + + stability + :stability: deprecated + """ + result = self._values.get("optional1") + return result + + @builtins.property + def optional2(self) -> typing.Optional[jsii.Number]: + """ + stability + :stability: deprecated + """ + result = self._values.get("optional2") + return result + + @builtins.property + def optional3(self) -> typing.Optional[builtins.bool]: + """ + stability + :stability: deprecated + """ + result = self._values.get("optional3") + return 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 "StructWithOnlyOptionals(%s)" % ", ".join( + k + "=" + repr(v) for k, v in self._values.items() + ) + + +@jsii.implements(IDoublable) +class Number( + NumericValue, + metaclass=jsii.JSIIMeta, + jsii_type="@scope/jsii-calc-lib.Number", +): + """Represents a concrete number. + + stability + :stability: deprecated + """ + + def __init__(self, value: jsii.Number) -> None: + """Creates a Number object. + + :param value: The number. + + stability + :stability: deprecated + """ + jsii.create(Number, self, [value]) + + @builtins.property # type: ignore + @jsii.member(jsii_name="doubleValue") + def double_value(self) -> jsii.Number: + """The number multiplied by 2. + + stability + :stability: deprecated + """ + return jsii.get(self, "doubleValue") + + @builtins.property # type: ignore + @jsii.member(jsii_name="value") + def value(self) -> jsii.Number: + """The number. + + stability + :stability: deprecated + """ + return jsii.get(self, "value") + + __all__ = [ "EnumFromScopedModule", "IDoublable", @@ -5986,9 +6835,9 @@ __all__ = [ "IThreeLevelsInterface", "MyFirstStruct", "Number", + "NumericValue", "Operation", "StructWithOnlyOptionals", - "Value", ] publication.publish() @@ -6003,8 +6852,8 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions import scope.jsii_calc_base._jsii import scope.jsii_calc_base_of_base._jsii @@ -6031,14 +6880,14 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions from .._jsii import * @jsii.interface(jsii_type="@scope/jsii-calc-lib.submodule.IReflectable") -class IReflectable(jsii.compat.Protocol): +class IReflectable(typing_extensions.Protocol): """ stability :stability: deprecated @@ -6048,7 +6897,7 @@ class IReflectable(jsii.compat.Protocol): def __jsii_proxy_class__(): return _IReflectableProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="entries") def entries(self) -> typing.List["ReflectableEntry"]: """ @@ -6064,9 +6913,9 @@ class _IReflectableProxy: :stability: deprecated """ - __jsii_type__ = "@scope/jsii-calc-lib.submodule.IReflectable" + __jsii_type__: typing.ClassVar[str] = "@scope/jsii-calc-lib.submodule.IReflectable" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="entries") def entries(self) -> typing.List["ReflectableEntry"]: """ @@ -6077,7 +6926,8 @@ class _IReflectableProxy: class NestingClass( - metaclass=jsii.JSIIMeta, jsii_type="@scope/jsii-calc-lib.submodule.NestingClass" + metaclass=jsii.JSIIMeta, + jsii_type="@scope/jsii-calc-lib.submodule.NestingClass", ): """This class is here to show we can use nested classes across module boundaries. @@ -6102,15 +6952,56 @@ class NestingClass( """ jsii.create(NestingClass.NestedClass, self, []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="property") - def property(self) -> str: + def property(self) -> builtins.str: """ stability :stability: deprecated """ return jsii.get(self, "property") + @jsii.data_type( + jsii_type="@scope/jsii-calc-lib.submodule.NestingClass.NestedStruct", + jsii_struct_bases=[], + name_mapping={"name": "name"}, + ) + class NestedStruct: + def __init__(self, *, name: builtins.str) -> None: + """This is a struct, nested within a class. + + Normal. + + :param name: + + stability + :stability: deprecated + """ + self._values: typing.Dict[str, typing.Any] = { + "name": name, + } + + @builtins.property + def name(self) -> builtins.str: + """ + stability + :stability: deprecated + """ + result = self._values.get("name") + assert result is not None, "Required property 'name' is missing" + return 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 "NestedStruct(%s)" % ", ".join( + k + "=" + repr(v) for k, v in self._values.items() + ) + @jsii.data_type( jsii_type="@scope/jsii-calc-lib.submodule.ReflectableEntry", @@ -6118,7 +7009,7 @@ class NestingClass( name_mapping={"key": "key", "value": "value"}, ) class ReflectableEntry: - def __init__(self, *, key: str, value: typing.Any) -> None: + def __init__(self, *, key: builtins.str, value: typing.Any) -> None: """ :param key: :param value: @@ -6126,18 +7017,20 @@ class ReflectableEntry: stability :stability: deprecated """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "key": key, "value": value, } @builtins.property - def key(self) -> str: + def key(self) -> builtins.str: """ stability :stability: deprecated """ - return self._values.get("key") + result = self._values.get("key") + assert result is not None, "Required property 'key' is missing" + return result @builtins.property def value(self) -> typing.Any: @@ -6145,12 +7038,14 @@ class ReflectableEntry: stability :stability: deprecated """ - return self._values.get("value") + result = self._values.get("value") + assert result is not None, "Required property 'value' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -6160,7 +7055,8 @@ class ReflectableEntry: class Reflector( - metaclass=jsii.JSIIMeta, jsii_type="@scope/jsii-calc-lib.submodule.Reflector" + metaclass=jsii.JSIIMeta, + jsii_type="@scope/jsii-calc-lib.submodule.Reflector", ): """ stability @@ -6175,7 +7071,10 @@ class Reflector( jsii.create(Reflector, self, []) @jsii.member(jsii_name="asMap") - def as_map(self, reflectable: "IReflectable") -> typing.Mapping[str, typing.Any]: + def as_map( + self, + reflectable: "IReflectable", + ) -> typing.Mapping[builtins.str, typing.Any]: """ :param reflectable: - @@ -6280,6 +7179,8 @@ exports[`Generated code for "jsii-calc": / 1`] = ` ┃ ┃ ┣━ 📄 DoNotRecognizeAnyAsOptional.cs ┃ ┃ ┣━ 📄 DontComplainAboutVariadicAfterOptional.cs ┃ ┃ ┣━ 📄 DoubleTrouble.cs + ┃ ┃ ┣━ 📄 DynamicPropertyBearer.cs + ┃ ┃ ┣━ 📄 DynamicPropertyBearerChild.cs ┃ ┃ ┣━ 📄 EnumDispenser.cs ┃ ┃ ┣━ 📄 EraseUndefinedHashValues.cs ┃ ┃ ┣━ 📄 EraseUndefinedHashValuesOptions.cs @@ -6431,7 +7332,7 @@ exports[`Generated code for "jsii-calc": / 1`] = ` ┃ ┃ ┣━ 📄 JSII417PublicBaseOfBase.cs ┃ ┃ ┣━ 📄 Jsii487Derived.cs ┃ ┃ ┣━ 📄 Jsii496Derived.cs - ┃ ┃ ┣━ 📄 JsiiAgent_.cs + ┃ ┃ ┣━ 📄 JsiiAgent.cs ┃ ┃ ┣━ 📄 JSObjectLiteralForInterface.cs ┃ ┃ ┣━ 📄 JSObjectLiteralToNative.cs ┃ ┃ ┣━ 📄 JSObjectLiteralToNativeClass.cs @@ -6567,6 +7468,22 @@ exports[`Generated code for "jsii-calc": / 1`] = ` ┃ ┣━ 📄 Amazon.JSII.Tests.CalculatorPackageId.csproj ┃ ┣━ 📄 AssemblyInfo.cs ┃ ┗━ 📄 jsii-calc-0.0.0.tgz + ┣━ 📁 golang + ┃ ┣━ 📁 jsiicalc + ┃ ┃ ┣━ 📄 composition.go + ┃ ┃ ┣━ 📄 derivedclasshasnoproperties.go + ┃ ┃ ┣━ 📄 interfaceinnamespaceincludesclasses.go + ┃ ┃ ┣━ 📄 interfaceinnamespaceonlyinterface.go + ┃ ┃ ┣━ 📄 pythonself.go + ┃ ┃ ┣━ 📁 submodule + ┃ ┃ ┃ ┣━ 📄 backreferences.go + ┃ ┃ ┃ ┣━ 📄 child.go + ┃ ┃ ┃ ┣━ 📄 isolated.go + ┃ ┃ ┃ ┣━ 📁 nestedsubmodule + ┃ ┃ ┃ ┃ ┗━ 📄 deeplynested.go + ┃ ┃ ┃ ┗━ 📄 nestedsubmodule.go + ┃ ┃ ┗━ 📄 submodule.go + ┃ ┗━ 📄 jsiicalc.go ┣━ 📁 java ┃ ┣━ 📄 pom.xml ┃ ┗━ 📁 src @@ -6633,6 +7550,8 @@ exports[`Generated code for "jsii-calc": / 1`] = ` ┃ ┃ ┣━ 📄 DoNotRecognizeAnyAsOptional.java ┃ ┃ ┣━ 📄 DontComplainAboutVariadicAfterOptional.java ┃ ┃ ┣━ 📄 DoubleTrouble.java + ┃ ┃ ┣━ 📄 DynamicPropertyBearer.java + ┃ ┃ ┣━ 📄 DynamicPropertyBearerChild.java ┃ ┃ ┣━ 📄 EnumDispenser.java ┃ ┃ ┣━ 📄 EraseUndefinedHashValues.java ┃ ┃ ┣━ 📄 EraseUndefinedHashValuesOptions.java @@ -6898,6 +7817,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace", "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BasePackageId" }, + "go": {}, "java": { "maven": { "artifactId": "calculator-base", @@ -6920,6 +7840,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace", "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId" }, + "go": {}, "java": { "maven": { "artifactId": "calculator-base-of-base", @@ -6962,6 +7883,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "packageId": "Amazon.JSII.Tests.CalculatorPackageId.LibPackageId", "versionSuffix": "-devpreview" }, + "go": {}, "java": { "maven": { "artifactId": "calculator-lib", @@ -7019,31 +7941,31 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "jsii-calc.DerivedClassHasNoProperties": { "locationInModule": { "filename": "lib/compliance.ts", - "line": 325 + "line": 324 } }, "jsii-calc.InterfaceInNamespaceIncludesClasses": { "locationInModule": { "filename": "lib/compliance.ts", - "line": 1206 + "line": 1205 } }, "jsii-calc.InterfaceInNamespaceOnlyInterface": { "locationInModule": { "filename": "lib/compliance.ts", - "line": 1199 + "line": 1198 } }, "jsii-calc.PythonSelf": { "locationInModule": { "filename": "lib/compliance.ts", - "line": 1090 + "line": 1089 } }, "jsii-calc.composition": { "locationInModule": { "filename": "lib/calculator.ts", - "line": 134 + "line": 142 } }, "jsii-calc.submodule": { @@ -7089,6 +8011,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "namespace": "Amazon.JSII.Tests.CalculatorNamespace", "packageId": "Amazon.JSII.Tests.CalculatorPackageId" }, + "go": {}, "java": { "maven": { "artifactId": "calculator", @@ -7127,7 +8050,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1250 + "line": 1249 }, "methods": [ { @@ -7204,7 +8127,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1246 + "line": 1245 }, "name": "AbstractClassBase", "properties": [ @@ -7216,7 +8139,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1247 + "line": 1246 }, "name": "abstractProperty", "type": { @@ -7307,7 +8230,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/calculator.ts", - "line": 411 + "line": 422 }, "methods": [ { @@ -7317,7 +8240,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 413 + "line": 424 }, "name": "someMethod", "parameters": [ @@ -7342,7 +8265,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 419 + "line": 430 }, "name": "workItAll", "parameters": [ @@ -7372,7 +8295,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 412 + "line": 423 }, "name": "property", "protected": true, @@ -7397,7 +8320,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 49 + "line": 53 }, "parameters": [ { @@ -7406,7 +8329,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "name": "lhs", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } }, { @@ -7415,7 +8338,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "name": "rhs", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } } ] @@ -7423,7 +8346,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/calculator.ts", - "line": 61 + "line": 68 }, "methods": [ { @@ -7433,7 +8356,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 66 + "line": 73 }, "name": "toString", "overrides": "@scope/jsii-calc-lib.Operation", @@ -7454,10 +8377,10 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 62 + "line": 69 }, "name": "value", - "overrides": "@scope/jsii-calc-lib.Value", + "overrides": "@scope/jsii-calc-lib.NumericValue", "type": { "primitive": "number" } @@ -7480,7 +8403,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 63 + "line": 62 }, "methods": [ { @@ -7489,7 +8412,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 232 + "line": 231 }, "name": "anyIn", "parameters": [ @@ -7507,7 +8430,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 224 + "line": 223 }, "name": "anyOut", "returns": { @@ -7522,7 +8445,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 220 + "line": 219 }, "name": "enumMethod", "parameters": [ @@ -7549,7 +8472,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 216 + "line": 215 }, "name": "enumPropertyValue", "type": { @@ -7562,7 +8485,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 180 + "line": 179 }, "name": "anyArrayProperty", "type": { @@ -7580,7 +8503,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 181 + "line": 180 }, "name": "anyMapProperty", "type": { @@ -7598,7 +8521,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 179 + "line": 178 }, "name": "anyProperty", "type": { @@ -7611,7 +8534,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 165 + "line": 164 }, "name": "arrayProperty", "type": { @@ -7629,7 +8552,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 68 + "line": 67 }, "name": "booleanProperty", "type": { @@ -7642,7 +8565,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 114 + "line": 113 }, "name": "dateProperty", "type": { @@ -7655,7 +8578,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 200 + "line": 199 }, "name": "enumProperty", "type": { @@ -7668,7 +8591,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 133 + "line": 132 }, "name": "jsonProperty", "type": { @@ -7681,7 +8604,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 150 + "line": 149 }, "name": "mapProperty", "type": { @@ -7699,7 +8622,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 99 + "line": 98 }, "name": "numberProperty", "type": { @@ -7712,7 +8635,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 83 + "line": 82 }, "name": "stringProperty", "type": { @@ -7725,7 +8648,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 192 + "line": 191 }, "name": "unionArrayProperty", "type": { @@ -7737,7 +8660,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "primitive": "number" }, { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } ] } @@ -7752,7 +8675,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 193 + "line": 192 }, "name": "unionMapProperty", "type": { @@ -7782,7 +8705,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 191 + "line": 190 }, "name": "unionProperty", "type": { @@ -7810,7 +8733,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 186 + "line": 185 }, "name": "unknownArrayProperty", "type": { @@ -7828,7 +8751,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 187 + "line": 186 }, "name": "unknownMapProperty", "type": { @@ -7846,7 +8769,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 185 + "line": 184 }, "name": "unknownProperty", "type": { @@ -7859,7 +8782,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 197 + "line": 196 }, "name": "optionalEnumValue", "optional": true, @@ -7878,7 +8801,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "enum", "locationInModule": { "filename": "lib/compliance.ts", - "line": 33 + "line": 32 }, "members": [ { @@ -7916,7 +8839,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 615 + "line": 614 }, "methods": [ { @@ -7925,7 +8848,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 623 + "line": 622 }, "name": "getBar", "parameters": [ @@ -7950,7 +8873,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 619 + "line": 618 }, "name": "getFoo", "parameters": [ @@ -7973,7 +8896,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 634 + "line": 633 }, "name": "setBar", "parameters": [ @@ -8004,7 +8927,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 630 + "line": 629 }, "name": "setFoo", "parameters": [ @@ -8037,7 +8960,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2683 + "line": 2684 }, "parameters": [ { @@ -8057,7 +8980,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2682 + "line": 2683 }, "name": "AmbiguousParameters", "properties": [ @@ -8068,7 +8991,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2685 + "line": 2686 }, "name": "props", "type": { @@ -8082,7 +9005,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2684 + "line": 2685 }, "name": "scope", "type": { @@ -8108,7 +9031,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2212 + "line": 2213 }, "methods": [ { @@ -8117,7 +9040,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2216 + "line": 2217 }, "name": "provideAsClass", "overrides": "jsii-calc.IAnonymousImplementationProvider", @@ -8133,7 +9056,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2220 + "line": 2221 }, "name": "provideAsInterface", "overrides": "jsii-calc.IAnonymousImplementationProvider", @@ -8160,7 +9083,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 333 + "line": 332 }, "methods": [ { @@ -8170,7 +9093,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 334 + "line": 333 }, "name": "callMe", "returns": { @@ -8187,7 +9110,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 353 + "line": 352 }, "name": "callMe2", "returns": { @@ -8205,7 +9128,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 363 + "line": 362 }, "name": "callMeDoublePromise", "returns": { @@ -8220,7 +9143,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 371 + "line": 370 }, "name": "dontOverrideMe", "returns": { @@ -8236,7 +9159,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 342 + "line": 341 }, "name": "overrideMe", "parameters": [ @@ -8260,7 +9183,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 346 + "line": 345 }, "name": "overrideMeToo", "returns": { @@ -8286,7 +9209,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1539 + "line": 1540 }, "methods": [ { @@ -8295,7 +9218,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1540 + "line": 1541 }, "name": "methodOne" }, @@ -8305,7 +9228,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1546 + "line": 1547 }, "name": "methodTwo" } @@ -8326,7 +9249,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2477 + "line": 2478 }, "name": "BaseJsii976" }, @@ -8347,7 +9270,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2421 + "line": 2422 }, "methods": [ { @@ -8356,7 +9279,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2424 + "line": 2425 }, "name": "ring", "overrides": "jsii-calc.IBell" @@ -8370,7 +9293,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2422 + "line": 2423 }, "name": "rung", "type": { @@ -8395,7 +9318,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 49 + "line": 53 }, "parameters": [ { @@ -8404,7 +9327,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "name": "lhs", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } }, { @@ -8413,7 +9336,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "name": "rhs", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } } ] @@ -8424,7 +9347,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/calculator.ts", - "line": 43 + "line": 47 }, "methods": [ { @@ -8434,7 +9357,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 53 + "line": 60 }, "name": "hello", "overrides": "@scope/jsii-calc-lib.IFriendly", @@ -8455,11 +9378,11 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 49 + "line": 54 }, "name": "lhs", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } }, { @@ -8470,11 +9393,11 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 49 + "line": 55 }, "name": "rhs", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } } ] @@ -8495,7 +9418,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2767 + "line": 2768 }, "methods": [ { @@ -8504,7 +9427,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2768 + "line": 2769 }, "name": "check", "returns": { @@ -8522,7 +9445,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2785 + "line": 2786 }, "name": "giveItBack", "parameters": [ @@ -8562,7 +9485,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 287 + "line": 298 }, "parameters": [ { @@ -8580,7 +9503,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/calculator.ts", - "line": 282 + "line": 293 }, "methods": [ { @@ -8590,7 +9513,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 320 + "line": 331 }, "name": "add", "parameters": [ @@ -8609,7 +9532,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 327 + "line": 338 }, "name": "mul", "parameters": [ @@ -8628,7 +9551,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 341 + "line": 352 }, "name": "neg" }, @@ -8639,7 +9562,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 334 + "line": 345 }, "name": "pow", "parameters": [ @@ -8658,7 +9581,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 360 + "line": 371 }, "name": "readUnionValue", "returns": { @@ -8678,12 +9601,12 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 348 + "line": 359 }, "name": "expression", "overrides": "jsii-calc.composition.CompositeOperation", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } }, { @@ -8694,13 +9617,13 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 310 + "line": 321 }, "name": "operationsLog", "type": { "collection": { "elementtype": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" }, "kind": "array" } @@ -8714,7 +9637,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 305 + "line": 316 }, "name": "operationsMap", "type": { @@ -8722,7 +9645,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "elementtype": { "collection": { "elementtype": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" }, "kind": "array" } @@ -8738,11 +9661,11 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 300 + "line": 311 }, "name": "curr", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } }, { @@ -8752,7 +9675,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 315 + "line": 326 }, "name": "maxValue", "optional": true, @@ -8767,7 +9690,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 355 + "line": 366 }, "name": "unionProperty", "optional": true, @@ -8800,7 +9723,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/calculator.ts", - "line": 243 + "line": 254 }, "name": "CalculatorProps", "properties": [ @@ -8815,7 +9738,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 251 + "line": 262 }, "name": "initialValue", "optional": true, @@ -8833,7 +9756,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 258 + "line": 269 }, "name": "maximumValue", "optional": true, @@ -8856,7 +9779,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2501 + "line": 2502 }, "name": "ChildStruct982", "properties": [ @@ -8868,7 +9791,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2502 + "line": 2503 }, "name": "bar", "type": { @@ -8894,7 +9817,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1802 + "line": 1803 }, "name": "ClassThatImplementsTheInternalInterface", "properties": [ @@ -8904,7 +9827,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1806 + "line": 1807 }, "name": "a", "overrides": "jsii-calc.IAnotherPublicInterface", @@ -8918,7 +9841,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1807 + "line": 1808 }, "name": "b", "overrides": "jsii-calc.INonInternalInterface", @@ -8932,7 +9855,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1808 + "line": 1809 }, "name": "c", "overrides": "jsii-calc.INonInternalInterface", @@ -8946,7 +9869,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1809 + "line": 1810 }, "name": "d", "type": { @@ -8972,7 +9895,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1812 + "line": 1813 }, "name": "ClassThatImplementsThePrivateInterface", "properties": [ @@ -8982,7 +9905,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1814 + "line": 1815 }, "name": "a", "overrides": "jsii-calc.IAnotherPublicInterface", @@ -8996,7 +9919,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1815 + "line": 1816 }, "name": "b", "overrides": "jsii-calc.INonInternalInterface", @@ -9010,7 +9933,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1816 + "line": 1817 }, "name": "c", "overrides": "jsii-calc.INonInternalInterface", @@ -9024,7 +9947,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1817 + "line": 1818 }, "name": "e", "type": { @@ -9045,7 +9968,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2118 + "line": 2119 }, "parameters": [ { @@ -9075,7 +9998,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2108 + "line": 2109 }, "methods": [ { @@ -9084,7 +10007,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2123 + "line": 2124 }, "name": "createAList", "returns": { @@ -9105,7 +10028,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2127 + "line": 2128 }, "name": "createAMap", "returns": { @@ -9129,7 +10052,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2116 + "line": 2117 }, "name": "staticArray", "static": true, @@ -9148,7 +10071,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2112 + "line": 2113 }, "name": "staticMap", "static": true, @@ -9167,7 +10090,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2110 + "line": 2111 }, "name": "array", "type": { @@ -9185,7 +10108,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2109 + "line": 2110 }, "name": "map", "type": { @@ -9220,7 +10143,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1885 + "line": 1886 }, "name": "ClassWithDocs" }, @@ -9236,7 +10159,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2058 + "line": 2059 }, "parameters": [ { @@ -9250,7 +10173,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2055 + "line": 2056 }, "methods": [ { @@ -9259,7 +10182,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2062 + "line": 2063 }, "name": "import", "parameters": [ @@ -9286,7 +10209,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2056 + "line": 2057 }, "name": "int", "type": { @@ -9419,7 +10342,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2640 + "line": 2641 }, "methods": [ { @@ -9428,7 +10351,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2641 + "line": 2642 }, "name": "makeInstance", "returns": { @@ -9444,7 +10367,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2645 + "line": 2646 }, "name": "makeStructInstance", "returns": { @@ -9463,7 +10386,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2649 + "line": 2650 }, "name": "unionProperty", "optional": true, @@ -9506,7 +10429,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2653 + "line": 2654 }, "name": "ConfusingToJacksonStruct", "properties": [ @@ -9518,7 +10441,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2654 + "line": 2655 }, "name": "unionProperty", "optional": true, @@ -9563,7 +10486,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1842 + "line": 1843 }, "parameters": [ { @@ -9577,7 +10500,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1841 + "line": 1842 }, "name": "ConstructorPassesThisOut" }, @@ -9595,7 +10518,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1587 + "line": 1588 }, "methods": [ { @@ -9604,7 +10527,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1604 + "line": 1605 }, "name": "hiddenInterface", "returns": { @@ -9620,7 +10543,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1608 + "line": 1609 }, "name": "hiddenInterfaces", "returns": { @@ -9641,7 +10564,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1612 + "line": 1613 }, "name": "hiddenSubInterfaces", "returns": { @@ -9662,7 +10585,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1588 + "line": 1589 }, "name": "makeClass", "returns": { @@ -9678,7 +10601,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1592 + "line": 1593 }, "name": "makeInterface", "returns": { @@ -9694,7 +10617,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1596 + "line": 1597 }, "name": "makeInterface2", "returns": { @@ -9710,7 +10633,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1600 + "line": 1601 }, "name": "makeInterfaces", "returns": { @@ -9740,7 +10663,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2664 + "line": 2665 }, "parameters": [ { @@ -9754,7 +10677,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2663 + "line": 2664 }, "methods": [ { @@ -9763,7 +10686,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2666 + "line": 2667 }, "name": "workItBaby", "returns": { @@ -9791,7 +10714,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2306 + "line": 2307 }, "methods": [ { @@ -9802,7 +10725,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2312 + "line": 2313 }, "name": "staticImplementedByObjectLiteral", "parameters": [ @@ -9828,7 +10751,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2338 + "line": 2339 }, "name": "staticImplementedByPrivateClass", "parameters": [ @@ -9854,7 +10777,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2327 + "line": 2328 }, "name": "staticImplementedByPublicClass", "parameters": [ @@ -9880,7 +10803,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2349 + "line": 2350 }, "name": "staticWhenTypedAsClass", "parameters": [ @@ -9906,7 +10829,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2359 + "line": 2360 }, "name": "implementedByObjectLiteral", "parameters": [ @@ -9931,7 +10854,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2385 + "line": 2386 }, "name": "implementedByPrivateClass", "parameters": [ @@ -9956,7 +10879,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2374 + "line": 2375 }, "name": "implementedByPublicClass", "parameters": [ @@ -9981,7 +10904,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2396 + "line": 2397 }, "name": "whenTypedAsClass", "parameters": [ @@ -10015,7 +10938,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1820 + "line": 1821 }, "methods": [ { @@ -10024,7 +10947,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1821 + "line": 1822 }, "name": "consumeAnotherPublicInterface", "parameters": [ @@ -10047,7 +10970,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1825 + "line": 1826 }, "name": "consumeNonInternalInterface", "parameters": [ @@ -10082,7 +11005,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1981 + "line": 1982 }, "methods": [ { @@ -10091,7 +11014,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1982 + "line": 1983 }, "name": "render", "parameters": [ @@ -10115,7 +11038,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1988 + "line": 1989 }, "name": "renderArbitrary", "parameters": [ @@ -10143,7 +11066,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1992 + "line": 1993 }, "name": "renderMap", "parameters": [ @@ -10180,7 +11103,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 318 + "line": 317 }, "parameters": [ { @@ -10209,7 +11132,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 317 + "line": 316 }, "name": "DefaultedConstructorArgument", "properties": [ @@ -10220,7 +11143,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 319 + "line": 318 }, "name": "arg1", "type": { @@ -10234,7 +11157,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 321 + "line": 320 }, "name": "arg3", "type": { @@ -10248,7 +11171,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 320 + "line": 319 }, "name": "arg2", "optional": true, @@ -10274,7 +11197,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2508 + "line": 2509 }, "methods": [ { @@ -10284,7 +11207,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2515 + "line": 2516 }, "name": "takeThis", "returns": { @@ -10301,7 +11224,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2520 + "line": 2521 }, "name": "takeThisToo", "returns": { @@ -10475,7 +11398,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 326 + "line": 325 }, "name": "Base", "namespace": "DerivedClassHasNoProperties", @@ -10486,7 +11409,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 327 + "line": 326 }, "name": "prop", "type": { @@ -10510,7 +11433,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 330 + "line": 329 }, "name": "Derived", "namespace": "DerivedClassHasNoProperties" @@ -10529,7 +11452,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 541 + "line": 540 }, "name": "DerivedStruct", "properties": [ @@ -10541,7 +11464,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 547 + "line": 546 }, "name": "anotherRequired", "type": { @@ -10556,7 +11479,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 546 + "line": 545 }, "name": "bool", "type": { @@ -10572,7 +11495,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 545 + "line": 544 }, "name": "nonPrimitive", "type": { @@ -10588,14 +11511,14 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 553 + "line": 552 }, "name": "anotherOptional", "optional": true, "type": { "collection": { "elementtype": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" }, "kind": "map" } @@ -10609,7 +11532,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 549 + "line": 548 }, "name": "optionalAny", "optional": true, @@ -10625,7 +11548,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 548 + "line": 547 }, "name": "optionalArray", "optional": true, @@ -10650,7 +11573,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2026 + "line": 2027 }, "name": "DiamondInheritanceBaseLevelStruct", "properties": [ @@ -10662,7 +11585,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2027 + "line": 2028 }, "name": "baseLevelProperty", "type": { @@ -10684,7 +11607,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2030 + "line": 2031 }, "name": "DiamondInheritanceFirstMidLevelStruct", "properties": [ @@ -10696,7 +11619,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2032 + "line": 2033 }, "name": "firstMidLevelProperty", "type": { @@ -10718,7 +11641,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2035 + "line": 2036 }, "name": "DiamondInheritanceSecondMidLevelStruct", "properties": [ @@ -10730,7 +11653,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2037 + "line": 2038 }, "name": "secondMidLevelProperty", "type": { @@ -10753,7 +11676,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2040 + "line": 2041 }, "name": "DiamondInheritanceTopLevelStruct", "properties": [ @@ -10765,7 +11688,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2043 + "line": 2044 }, "name": "topLevelProperty", "type": { @@ -10785,7 +11708,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2530 + "line": 2531 }, "name": "DisappointingCollectionSource", "properties": [ @@ -10799,7 +11722,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2532 + "line": 2533 }, "name": "maybeList", "optional": true, @@ -10823,7 +11746,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2534 + "line": 2535 }, "name": "maybeMap", "optional": true, @@ -11092,7 +12015,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 485 + "line": 484 }, "methods": [ { @@ -11102,7 +12025,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 490 + "line": 489 }, "name": "hello", "overrides": "@scope/jsii-calc-lib.IFriendly", @@ -11119,7 +12042,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 486 + "line": 485 }, "name": "next", "overrides": "jsii-calc.IRandomNumberGenerator", @@ -11132,6 +12055,142 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu ], "name": "DoubleTrouble" }, + "jsii-calc.DynamicPropertyBearer": { + "assembly": "jsii-calc", + "docs": { + "stability": "experimental", + "summary": "Ensures we can override a dynamic property that was inherited." + }, + "fqn": "jsii-calc.DynamicPropertyBearer", + "initializer": { + "docs": { + "stability": "experimental" + }, + "locationInModule": { + "filename": "lib/compliance.ts", + "line": 2795 + }, + "parameters": [ + { + "name": "valueStore", + "type": { + "primitive": "string" + } + } + ] + }, + "kind": "class", + "locationInModule": { + "filename": "lib/compliance.ts", + "line": 2794 + }, + "name": "DynamicPropertyBearer", + "properties": [ + { + "docs": { + "stability": "experimental" + }, + "locationInModule": { + "filename": "lib/compliance.ts", + "line": 2797 + }, + "name": "dynamicProperty", + "type": { + "primitive": "string" + } + }, + { + "docs": { + "stability": "experimental" + }, + "locationInModule": { + "filename": "lib/compliance.ts", + "line": 2795 + }, + "name": "valueStore", + "type": { + "primitive": "string" + } + } + ] + }, + "jsii-calc.DynamicPropertyBearerChild": { + "assembly": "jsii-calc", + "base": "jsii-calc.DynamicPropertyBearer", + "docs": { + "stability": "experimental" + }, + "fqn": "jsii-calc.DynamicPropertyBearerChild", + "initializer": { + "docs": { + "stability": "experimental" + }, + "locationInModule": { + "filename": "lib/compliance.ts", + "line": 2806 + }, + "parameters": [ + { + "name": "originalValue", + "type": { + "primitive": "string" + } + } + ] + }, + "kind": "class", + "locationInModule": { + "filename": "lib/compliance.ts", + "line": 2805 + }, + "methods": [ + { + "docs": { + "returns": "the old value that was set.", + "stability": "experimental", + "summary": "Sets \`this.dynamicProperty\` to the new value, and returns the old value." + }, + "locationInModule": { + "filename": "lib/compliance.ts", + "line": 2817 + }, + "name": "overrideValue", + "parameters": [ + { + "docs": { + "summary": "the new value to be set." + }, + "name": "newValue", + "type": { + "primitive": "string" + } + } + ], + "returns": { + "type": { + "primitive": "string" + } + } + } + ], + "name": "DynamicPropertyBearerChild", + "properties": [ + { + "docs": { + "stability": "experimental" + }, + "immutable": true, + "locationInModule": { + "filename": "lib/compliance.ts", + "line": 2806 + }, + "name": "originalValue", + "type": { + "primitive": "string" + } + } + ] + }, "jsii-calc.EnumDispenser": { "assembly": "jsii-calc", "docs": { @@ -11141,7 +12200,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 45 + "line": 44 }, "methods": [ { @@ -11150,7 +12209,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 51 + "line": 50 }, "name": "randomIntegerLikeEnum", "returns": { @@ -11166,7 +12225,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 46 + "line": 45 }, "name": "randomStringLikeEnum", "returns": { @@ -11193,7 +12252,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1643 + "line": 1644 }, "methods": [ { @@ -11204,7 +12263,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1648 + "line": 1649 }, "name": "doesKeyExist", "parameters": [ @@ -11235,7 +12294,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1668 + "line": 1669 }, "name": "prop1IsNull", "returns": { @@ -11257,7 +12316,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1658 + "line": 1659 }, "name": "prop2IsUndefined", "returns": { @@ -11285,7 +12344,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1638 + "line": 1639 }, "name": "EraseUndefinedHashValuesOptions", "properties": [ @@ -11297,7 +12356,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1639 + "line": 1640 }, "name": "option1", "optional": true, @@ -11313,7 +12372,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1640 + "line": 1641 }, "name": "option2", "optional": true, @@ -11516,7 +12575,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1757 + "line": 1758 }, "name": "ExtendsInternalInterface", "properties": [ @@ -11528,7 +12587,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1758 + "line": 1759 }, "name": "boom", "type": { @@ -11543,7 +12602,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1698 + "line": 1699 }, "name": "prop", "type": { @@ -11733,7 +12792,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 556 + "line": 555 }, "methods": [ { @@ -11743,7 +12802,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 574 + "line": 573 }, "name": "derivedToFirst", "parameters": [ @@ -11767,7 +12826,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 567 + "line": 566 }, "name": "readDerivedNonPrimitive", "parameters": [ @@ -11791,7 +12850,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 560 + "line": 559 }, "name": "readFirstNumber", "parameters": [ @@ -11818,7 +12877,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 578 + "line": 577 }, "name": "structLiteral", "type": { @@ -11876,7 +12935,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 532 + "line": 531 }, "methods": [ { @@ -11885,7 +12944,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 533 + "line": 532 }, "name": "betterGreeting", "parameters": [ @@ -11915,7 +12974,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2208 + "line": 2209 }, "methods": [ { @@ -11925,7 +12984,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2210 + "line": 2211 }, "name": "provideAsClass", "returns": { @@ -11941,7 +13000,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2209 + "line": 2210 }, "name": "provideAsInterface", "returns": { @@ -11962,7 +13021,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2227 + "line": 2228 }, "methods": [ { @@ -11972,7 +13031,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2229 + "line": 2230 }, "name": "verb", "returns": { @@ -11992,7 +13051,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2228 + "line": 2229 }, "name": "value", "type": { @@ -12010,7 +13069,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1778 + "line": 1779 }, "name": "IAnotherPublicInterface", "properties": [ @@ -12021,7 +13080,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1779 + "line": 1780 }, "name": "a", "type": { @@ -12039,7 +13098,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2417 + "line": 2418 }, "methods": [ { @@ -12049,7 +13108,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2418 + "line": 2419 }, "name": "ring" } @@ -12066,7 +13125,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2406 + "line": 2407 }, "methods": [ { @@ -12076,7 +13135,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2407 + "line": 2408 }, "name": "yourTurn", "parameters": [ @@ -12101,7 +13160,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2413 + "line": 2414 }, "methods": [ { @@ -12111,7 +13170,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2414 + "line": 2415 }, "name": "yourTurn", "parameters": [ @@ -12224,7 +13283,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1769 + "line": 1770 }, "name": "IExtendsPrivateInterface", "properties": [ @@ -12236,7 +13295,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1770 + "line": 1771 }, "name": "moreThings", "type": { @@ -12255,7 +13314,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1754 + "line": 1755 }, "name": "private", "type": { @@ -12329,7 +13388,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/calculator.ts", - "line": 12 + "line": 16 }, "methods": [ { @@ -12340,7 +13399,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 22 + "line": 26 }, "name": "farewell", "returns": { @@ -12358,7 +13417,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 17 + "line": 21 }, "name": "goodbye", "returns": { @@ -12383,7 +13442,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/calculator.ts", - "line": 36 + "line": 40 }, "name": "IFriendlyRandomGenerator" }, @@ -12397,7 +13456,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1242 + "line": 1241 }, "name": "IInterfaceImplementedByAbstractClass", "properties": [ @@ -12409,7 +13468,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1243 + "line": 1242 }, "name": "propFromInterface", "type": { @@ -12461,7 +13520,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1709 + "line": 1710 }, "methods": [ { @@ -12471,7 +13530,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1710 + "line": 1711 }, "name": "visible" } @@ -12531,7 +13590,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1220 + "line": 1219 }, "methods": [ { @@ -12541,7 +13600,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1221 + "line": 1220 }, "name": "hello", "parameters": [ @@ -12572,7 +13631,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 586 + "line": 585 }, "name": "IInterfaceWithProperties", "properties": [ @@ -12584,7 +13643,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 587 + "line": 586 }, "name": "readOnlyString", "type": { @@ -12598,7 +13657,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 588 + "line": 587 }, "name": "readWriteString", "type": { @@ -12619,7 +13678,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 591 + "line": 590 }, "name": "IInterfaceWithPropertiesExtension", "properties": [ @@ -12630,7 +13689,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 593 + "line": 592 }, "name": "foo", "type": { @@ -12774,7 +13833,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/erasures.ts", - "line": 64 + "line": 65 }, "name": "IJsii496" }, @@ -12819,7 +13878,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1787 + "line": 1788 }, "name": "INonInternalInterface", "properties": [ @@ -12830,7 +13889,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1784 + "line": 1785 }, "name": "b", "type": { @@ -12844,7 +13903,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1788 + "line": 1789 }, "name": "c", "type": { @@ -12863,7 +13922,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2542 + "line": 2543 }, "methods": [ { @@ -12873,7 +13932,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2544 + "line": 2545 }, "name": "wasSet", "returns": { @@ -12892,7 +13951,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2543 + "line": 2544 }, "name": "property", "type": { @@ -12911,7 +13970,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2731 + "line": 2732 }, "methods": [ { @@ -12921,7 +13980,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2732 + "line": 2733 }, "name": "optional", "returns": { @@ -12973,7 +14032,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1558 + "line": 1559 }, "methods": [ { @@ -12983,7 +14042,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1559 + "line": 1560 }, "name": "bye", "returns": { @@ -13004,7 +14063,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1562 + "line": 1563 }, "methods": [ { @@ -13014,7 +14073,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1563 + "line": 1564 }, "name": "ciao", "returns": { @@ -13036,7 +14095,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/calculator.ts", - "line": 28 + "line": 32 }, "methods": [ { @@ -13048,7 +14107,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 33 + "line": 37 }, "name": "next", "returns": { @@ -13070,7 +14129,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2473 + "line": 2474 }, "name": "IReturnJsii976", "properties": [ @@ -13082,7 +14141,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2474 + "line": 2475 }, "name": "foo", "type": { @@ -13100,7 +14159,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 639 + "line": 638 }, "methods": [ { @@ -13110,7 +14169,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 640 + "line": 639 }, "name": "obtainNumber", "returns": { @@ -13130,7 +14189,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 642 + "line": 641 }, "name": "numberProp", "type": { @@ -13192,7 +14251,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2660 + "line": 2661 }, "methods": [ { @@ -13202,7 +14261,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2661 + "line": 2662 }, "name": "returnStruct", "returns": { @@ -13228,7 +14287,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1761 + "line": 1762 }, "name": "ImplementInternalInterface", "properties": [ @@ -13238,7 +14297,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1762 + "line": 1763 }, "name": "prop", "type": { @@ -13261,7 +14320,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2224 + "line": 2225 }, "name": "Implementation", "properties": [ @@ -13272,7 +14331,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2225 + "line": 2226 }, "name": "value", "type": { @@ -13298,7 +14357,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1716 + "line": 1717 }, "methods": [ { @@ -13307,7 +14366,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1717 + "line": 1718 }, "name": "visible", "overrides": "jsii-calc.IInterfaceWithInternal" @@ -13330,7 +14389,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1735 + "line": 1736 }, "name": "ImplementsInterfaceWithInternalSubclass" }, @@ -13348,7 +14407,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1765 + "line": 1766 }, "name": "ImplementsPrivateInterface", "properties": [ @@ -13358,7 +14417,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1766 + "line": 1767 }, "name": "private", "type": { @@ -13380,7 +14439,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1176 + "line": 1175 }, "name": "ImplictBaseOfBase", "properties": [ @@ -13392,7 +14451,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1177 + "line": 1176 }, "name": "goo", "type": { @@ -13419,7 +14478,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1565 + "line": 1566 }, "methods": [ { @@ -13428,7 +14487,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1566 + "line": 1567 }, "name": "ciao", "overrides": "jsii-calc.IPublicInterface2", @@ -13452,7 +14511,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2694 + "line": 2695 }, "methods": [ { @@ -13461,7 +14520,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2705 + "line": 2706 }, "name": "listOfInterfaces", "returns": { @@ -13482,7 +14541,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2695 + "line": 2696 }, "name": "listOfStructs", "returns": { @@ -13503,7 +14562,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2715 + "line": 2716 }, "name": "mapOfInterfaces", "returns": { @@ -13524,7 +14583,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2699 + "line": 2700 }, "name": "mapOfStructs", "returns": { @@ -13556,7 +14615,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1207 + "line": 1206 }, "name": "Foo", "namespace": "InterfaceInNamespaceIncludesClasses", @@ -13567,7 +14626,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1208 + "line": 1207 }, "name": "bar", "optional": true, @@ -13587,7 +14646,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1211 + "line": 1210 }, "name": "Hello", "namespace": "InterfaceInNamespaceIncludesClasses", @@ -13600,7 +14659,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1212 + "line": 1211 }, "name": "foo", "type": { @@ -13619,7 +14678,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1201 + "line": 1200 }, "name": "Hello", "namespace": "InterfaceInNamespaceOnlyInterface", @@ -13632,7 +14691,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1202 + "line": 1201 }, "name": "foo", "type": { @@ -13651,7 +14710,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2096 + "line": 2097 }, "methods": [ { @@ -13660,7 +14719,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2097 + "line": 2098 }, "name": "makeInterfaces", "parameters": [ @@ -13703,7 +14762,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2741 + "line": 2742 }, "methods": [ { @@ -13712,7 +14771,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2742 + "line": 2743 }, "name": "myself", "returns": { @@ -13870,7 +14929,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 517 + "line": 516 }, "methods": [ { @@ -13879,7 +14938,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 518 + "line": 517 }, "name": "giveMeFriendly", "returns": { @@ -13894,7 +14953,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 524 + "line": 523 }, "name": "giveMeFriendlyGenerator", "returns": { @@ -13920,7 +14979,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 247 + "line": 246 }, "methods": [ { @@ -13929,7 +14988,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 248 + "line": 247 }, "name": "returnLiteral", "returns": { @@ -13955,7 +15014,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 256 + "line": 255 }, "name": "JSObjectLiteralToNativeClass", "properties": [ @@ -13965,7 +15024,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 257 + "line": 256 }, "name": "propA", "type": { @@ -13978,7 +15037,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 258 + "line": 257 }, "name": "propB", "type": { @@ -14001,7 +15060,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 745 + "line": 744 }, "methods": [ { @@ -14010,7 +15069,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 746 + "line": 745 }, "name": "abstract" }, @@ -14020,7 +15079,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 750 + "line": 749 }, "name": "assert" }, @@ -14030,7 +15089,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 754 + "line": 753 }, "name": "boolean" }, @@ -14040,7 +15099,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 758 + "line": 757 }, "name": "break" }, @@ -14050,7 +15109,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 762 + "line": 761 }, "name": "byte" }, @@ -14060,7 +15119,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 766 + "line": 765 }, "name": "case" }, @@ -14070,7 +15129,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 770 + "line": 769 }, "name": "catch" }, @@ -14080,7 +15139,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 774 + "line": 773 }, "name": "char" }, @@ -14090,7 +15149,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 778 + "line": 777 }, "name": "class" }, @@ -14100,7 +15159,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 782 + "line": 781 }, "name": "const" }, @@ -14110,7 +15169,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 786 + "line": 785 }, "name": "continue" }, @@ -14120,7 +15179,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 790 + "line": 789 }, "name": "default" }, @@ -14130,7 +15189,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 798 + "line": 797 }, "name": "do" }, @@ -14140,7 +15199,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 794 + "line": 793 }, "name": "double" }, @@ -14150,7 +15209,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 802 + "line": 801 }, "name": "else" }, @@ -14160,7 +15219,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 806 + "line": 805 }, "name": "enum" }, @@ -14170,7 +15229,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 810 + "line": 809 }, "name": "extends" }, @@ -14180,7 +15239,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 814 + "line": 813 }, "name": "false" }, @@ -14190,7 +15249,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 818 + "line": 817 }, "name": "final" }, @@ -14200,7 +15259,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 822 + "line": 821 }, "name": "finally" }, @@ -14210,7 +15269,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 826 + "line": 825 }, "name": "float" }, @@ -14220,7 +15279,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 830 + "line": 829 }, "name": "for" }, @@ -14230,7 +15289,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 834 + "line": 833 }, "name": "goto" }, @@ -14240,7 +15299,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 838 + "line": 837 }, "name": "if" }, @@ -14250,7 +15309,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 842 + "line": 841 }, "name": "implements" }, @@ -14260,7 +15319,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 846 + "line": 845 }, "name": "import" }, @@ -14270,7 +15329,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 850 + "line": 849 }, "name": "instanceof" }, @@ -14280,7 +15339,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 854 + "line": 853 }, "name": "int" }, @@ -14290,7 +15349,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 858 + "line": 857 }, "name": "interface" }, @@ -14300,7 +15359,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 862 + "line": 861 }, "name": "long" }, @@ -14310,7 +15369,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 866 + "line": 865 }, "name": "native" }, @@ -14320,7 +15379,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 870 + "line": 869 }, "name": "new" }, @@ -14330,7 +15389,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 874 + "line": 873 }, "name": "null" }, @@ -14340,7 +15399,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 878 + "line": 877 }, "name": "package" }, @@ -14350,7 +15409,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 882 + "line": 881 }, "name": "private" }, @@ -14360,7 +15419,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 886 + "line": 885 }, "name": "protected" }, @@ -14370,7 +15429,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 890 + "line": 889 }, "name": "public" }, @@ -14380,7 +15439,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 894 + "line": 893 }, "name": "return" }, @@ -14390,7 +15449,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 898 + "line": 897 }, "name": "short" }, @@ -14400,7 +15459,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 902 + "line": 901 }, "name": "static" }, @@ -14410,7 +15469,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 906 + "line": 905 }, "name": "strictfp" }, @@ -14420,7 +15479,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 910 + "line": 909 }, "name": "super" }, @@ -14430,7 +15489,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 914 + "line": 913 }, "name": "switch" }, @@ -14440,7 +15499,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 918 + "line": 917 }, "name": "synchronized" }, @@ -14450,7 +15509,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 922 + "line": 921 }, "name": "this" }, @@ -14460,7 +15519,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 926 + "line": 925 }, "name": "throw" }, @@ -14470,7 +15529,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 930 + "line": 929 }, "name": "throws" }, @@ -14480,7 +15539,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 934 + "line": 933 }, "name": "transient" }, @@ -14490,7 +15549,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 938 + "line": 937 }, "name": "true" }, @@ -14500,7 +15559,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 942 + "line": 941 }, "name": "try" }, @@ -14510,7 +15569,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 946 + "line": 945 }, "name": "void" }, @@ -14520,7 +15579,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 950 + "line": 949 }, "name": "volatile" } @@ -14533,7 +15592,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 954 + "line": 953 }, "name": "while", "type": { @@ -14581,7 +15640,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/erasures.ts", - "line": 66 + "line": 67 }, "name": "Jsii496Derived" }, @@ -14600,7 +15659,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1528 + "line": 1529 }, "name": "JsiiAgent", "properties": [ @@ -14612,9 +15671,9 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1532 + "line": 1533 }, - "name": "jsiiAgent", + "name": "value", "optional": true, "static": true, "type": { @@ -14634,7 +15693,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2575 + "line": 2576 }, "methods": [ { @@ -14643,7 +15702,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2620 + "line": 2621 }, "name": "anyArray", "returns": { @@ -14659,7 +15718,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2616 + "line": 2617 }, "name": "anyBooleanFalse", "returns": { @@ -14675,7 +15734,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2612 + "line": 2613 }, "name": "anyBooleanTrue", "returns": { @@ -14691,7 +15750,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2592 + "line": 2593 }, "name": "anyDate", "returns": { @@ -14707,7 +15766,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2608 + "line": 2609 }, "name": "anyEmptyString", "returns": { @@ -14723,7 +15782,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2588 + "line": 2589 }, "name": "anyFunction", "returns": { @@ -14739,7 +15798,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2624 + "line": 2625 }, "name": "anyHash", "returns": { @@ -14755,7 +15814,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2580 + "line": 2581 }, "name": "anyNull", "returns": { @@ -14771,7 +15830,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2596 + "line": 2597 }, "name": "anyNumber", "returns": { @@ -14787,7 +15846,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2628 + "line": 2629 }, "name": "anyRef", "returns": { @@ -14803,7 +15862,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2604 + "line": 2605 }, "name": "anyString", "returns": { @@ -14819,7 +15878,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2584 + "line": 2585 }, "name": "anyUndefined", "returns": { @@ -14835,7 +15894,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2600 + "line": 2601 }, "name": "anyZero", "returns": { @@ -14851,7 +15910,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2576 + "line": 2577 }, "name": "stringify", "parameters": [ @@ -14998,7 +16057,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/calculator.ts", - "line": 396 + "line": 407 }, "methods": [ { @@ -15007,7 +16066,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 397 + "line": 408 }, "name": "property", "returns": { @@ -15026,7 +16085,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 401 + "line": 412 }, "name": "elite", "type": { @@ -15050,7 +16109,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 49 + "line": 53 }, "parameters": [ { @@ -15059,7 +16118,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "name": "lhs", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } }, { @@ -15068,7 +16127,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "name": "rhs", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } } ] @@ -15080,7 +16139,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/calculator.ts", - "line": 74 + "line": 81 }, "methods": [ { @@ -15090,7 +16149,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 88 + "line": 96 }, "name": "farewell", "overrides": "jsii-calc.IFriendlier", @@ -15107,7 +16166,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 84 + "line": 92 }, "name": "goodbye", "overrides": "jsii-calc.IFriendlier", @@ -15124,7 +16183,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 92 + "line": 100 }, "name": "next", "overrides": "jsii-calc.IRandomNumberGenerator", @@ -15141,7 +16200,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 80 + "line": 88 }, "name": "toString", "overrides": "@scope/jsii-calc-lib.Operation", @@ -15162,10 +16221,10 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 76 + "line": 84 }, "name": "value", - "overrides": "@scope/jsii-calc-lib.Value", + "overrides": "@scope/jsii-calc-lib.NumericValue", "type": { "primitive": "number" } @@ -15186,13 +16245,13 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 101 + "line": 109 }, "parameters": [ { "name": "operand", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } } ] @@ -15203,7 +16262,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/calculator.ts", - "line": 109 + "line": 117 }, "methods": [ { @@ -15213,7 +16272,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 126 + "line": 134 }, "name": "farewell", "overrides": "jsii-calc.IFriendlier", @@ -15230,7 +16289,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 122 + "line": 130 }, "name": "goodbye", "overrides": "jsii-calc.IFriendlier", @@ -15247,7 +16306,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 118 + "line": 126 }, "name": "hello", "overrides": "@scope/jsii-calc-lib.IFriendly", @@ -15264,7 +16323,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 114 + "line": 122 }, "name": "toString", "overrides": "@scope/jsii-calc-lib.Operation", @@ -15285,10 +16344,10 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 110 + "line": 118 }, "name": "value", - "overrides": "@scope/jsii-calc-lib.Value", + "overrides": "@scope/jsii-calc-lib.NumericValue", "type": { "primitive": "number" } @@ -15336,7 +16395,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2449 + "line": 2450 }, "name": "NestedStruct", "properties": [ @@ -15349,7 +16408,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2453 + "line": 2454 }, "name": "numberProp", "type": { @@ -15373,7 +16432,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1126 + "line": 1125 }, "methods": [ { @@ -15384,7 +16443,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1157 + "line": 1156 }, "name": "cryptoSha256", "returns": { @@ -15402,7 +16461,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1131 + "line": 1130 }, "name": "fsReadFile", "returns": { @@ -15419,7 +16478,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1140 + "line": 1139 }, "name": "fsReadFileSync", "returns": { @@ -15439,7 +16498,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1149 + "line": 1148 }, "name": "osPlatform", "type": { @@ -15616,7 +16675,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 506 + "line": 505 }, "parameters": [ { @@ -15630,7 +16689,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 505 + "line": 504 }, "methods": [ { @@ -15639,7 +16698,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 512 + "line": 511 }, "name": "isSameGenerator", "parameters": [ @@ -15662,7 +16721,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 508 + "line": 507 }, "name": "nextTimes100", "returns": { @@ -15680,7 +16739,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 506 + "line": 505 }, "name": "generator", "type": { @@ -15704,7 +16763,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 264 + "line": 263 }, "methods": [ { @@ -15714,7 +16773,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 268 + "line": 267 }, "name": "sumFromArray", "parameters": [ @@ -15723,7 +16782,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "type": { "collection": { "elementtype": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" }, "kind": "array" } @@ -15743,7 +16802,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 279 + "line": 278 }, "name": "sumFromMap", "parameters": [ @@ -15752,7 +16811,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "type": { "collection": { "elementtype": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" }, "kind": "map" } @@ -15777,7 +16836,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2546 + "line": 2547 }, "methods": [ { @@ -15786,7 +16845,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2547 + "line": 2548 }, "name": "provide", "returns": { @@ -15844,7 +16903,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1224 + "line": 1223 }, "parameters": [ { @@ -15858,7 +16917,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1223 + "line": 1222 }, "methods": [ { @@ -15867,7 +16926,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1232 + "line": 1231 }, "name": "invokeWithOptional" }, @@ -15877,7 +16936,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1228 + "line": 1227 }, "name": "invokeWithoutOptional" } @@ -15896,7 +16955,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 310 + "line": 309 }, "parameters": [ { @@ -15923,7 +16982,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 309 + "line": 308 }, "name": "OptionalConstructorArgument", "properties": [ @@ -15934,7 +16993,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 311 + "line": 310 }, "name": "arg1", "type": { @@ -15948,7 +17007,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 312 + "line": 311 }, "name": "arg2", "type": { @@ -15962,7 +17021,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 313 + "line": 312 }, "name": "arg3", "optional": true, @@ -15982,7 +17041,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1867 + "line": 1868 }, "name": "OptionalStruct", "properties": [ @@ -15994,7 +17053,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1868 + "line": 1869 }, "name": "field", "optional": true, @@ -16016,7 +17075,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1862 + "line": 1863 }, "parameters": [ { @@ -16031,7 +17090,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1858 + "line": 1859 }, "name": "OptionalStructConsumer", "properties": [ @@ -16042,7 +17101,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1859 + "line": 1860 }, "name": "parameterWasUndefined", "type": { @@ -16056,7 +17115,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1860 + "line": 1861 }, "name": "fieldValue", "optional": true, @@ -16081,7 +17140,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2135 + "line": 2136 }, "methods": [ { @@ -16090,7 +17149,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2147 + "line": 2148 }, "name": "overrideMe", "protected": true, @@ -16106,7 +17165,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2143 + "line": 2144 }, "name": "switchModes" }, @@ -16116,7 +17175,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2139 + "line": 2140 }, "name": "valueFromProtected", "returns": { @@ -16135,7 +17194,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2136 + "line": 2137 }, "name": "overrideReadOnly", "protected": true, @@ -16149,7 +17208,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2137 + "line": 2138 }, "name": "overrideReadWrite", "protected": true, @@ -16173,7 +17232,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 645 + "line": 644 }, "methods": [ { @@ -16182,7 +17241,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 646 + "line": 645 }, "name": "test", "parameters": [ @@ -16213,7 +17272,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2498 + "line": 2499 }, "name": "ParentStruct982", "properties": [ @@ -16225,7 +17284,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2499 + "line": 2500 }, "name": "foo", "type": { @@ -16249,7 +17308,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1833 + "line": 1834 }, "methods": [ { @@ -16259,7 +17318,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1834 + "line": 1835 }, "name": "consumePartiallyInitializedThis", "parameters": [ @@ -16305,7 +17364,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 495 + "line": 494 }, "methods": [ { @@ -16314,7 +17373,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 496 + "line": 495 }, "name": "sayHello", "parameters": [ @@ -16349,7 +17408,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 227 + "line": 235 }, "parameters": [ { @@ -16358,7 +17417,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "name": "base", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } }, { @@ -16367,7 +17426,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "name": "pow", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } } ] @@ -16375,7 +17434,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/calculator.ts", - "line": 221 + "line": 229 }, "name": "Power", "properties": [ @@ -16387,11 +17446,11 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 227 + "line": 236 }, "name": "base", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } }, { @@ -16403,12 +17462,12 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 231 + "line": 242 }, "name": "expression", "overrides": "jsii-calc.composition.CompositeOperation", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } }, { @@ -16419,11 +17478,11 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 227 + "line": 237 }, "name": "pow", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } } ] @@ -16443,7 +17502,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/calculator.ts", - "line": 392 + "line": 403 }, "name": "PropertyNamedProperty", "properties": [ @@ -16454,7 +17513,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 393 + "line": 404 }, "name": "property", "type": { @@ -16468,7 +17527,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 394 + "line": 405 }, "name": "yetAnoterOne", "type": { @@ -16491,7 +17550,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1553 + "line": 1554 }, "methods": [ { @@ -16500,7 +17559,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1554 + "line": 1555 }, "name": "hello" } @@ -16521,7 +17580,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 957 + "line": 956 }, "methods": [ { @@ -16530,7 +17589,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 958 + "line": 957 }, "name": "and" }, @@ -16540,7 +17599,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 962 + "line": 961 }, "name": "as" }, @@ -16550,7 +17609,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 966 + "line": 965 }, "name": "assert" }, @@ -16560,7 +17619,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 970 + "line": 969 }, "name": "async" }, @@ -16570,7 +17629,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 974 + "line": 973 }, "name": "await" }, @@ -16580,7 +17639,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 978 + "line": 977 }, "name": "break" }, @@ -16590,7 +17649,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 982 + "line": 981 }, "name": "class" }, @@ -16600,7 +17659,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 986 + "line": 985 }, "name": "continue" }, @@ -16610,7 +17669,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 990 + "line": 989 }, "name": "def" }, @@ -16620,7 +17679,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 994 + "line": 993 }, "name": "del" }, @@ -16630,7 +17689,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 998 + "line": 997 }, "name": "elif" }, @@ -16640,7 +17699,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1002 + "line": 1001 }, "name": "else" }, @@ -16650,7 +17709,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1006 + "line": 1005 }, "name": "except" }, @@ -16660,7 +17719,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1010 + "line": 1009 }, "name": "finally" }, @@ -16670,7 +17729,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1014 + "line": 1013 }, "name": "for" }, @@ -16680,7 +17739,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1018 + "line": 1017 }, "name": "from" }, @@ -16690,7 +17749,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1022 + "line": 1021 }, "name": "global" }, @@ -16700,7 +17759,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1026 + "line": 1025 }, "name": "if" }, @@ -16710,7 +17769,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1030 + "line": 1029 }, "name": "import" }, @@ -16720,7 +17779,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1034 + "line": 1033 }, "name": "in" }, @@ -16730,7 +17789,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1038 + "line": 1037 }, "name": "is" }, @@ -16740,7 +17799,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1042 + "line": 1041 }, "name": "lambda" }, @@ -16750,7 +17809,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1046 + "line": 1045 }, "name": "nonlocal" }, @@ -16760,7 +17819,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1050 + "line": 1049 }, "name": "not" }, @@ -16770,7 +17829,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1054 + "line": 1053 }, "name": "or" }, @@ -16780,7 +17839,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1058 + "line": 1057 }, "name": "pass" }, @@ -16790,7 +17849,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1062 + "line": 1061 }, "name": "raise" }, @@ -16800,7 +17859,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1066 + "line": 1065 }, "name": "return" }, @@ -16810,7 +17869,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1070 + "line": 1069 }, "name": "try" }, @@ -16820,7 +17879,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1074 + "line": 1073 }, "name": "while" }, @@ -16830,7 +17889,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1078 + "line": 1077 }, "name": "with" }, @@ -16840,7 +17899,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1082 + "line": 1081 }, "name": "yield" } @@ -16859,7 +17918,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1092 + "line": 1091 }, "parameters": [ { @@ -16873,7 +17932,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1091 + "line": 1090 }, "methods": [ { @@ -16882,7 +17941,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1094 + "line": 1093 }, "name": "method", "parameters": [ @@ -16910,7 +17969,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1092 + "line": 1091 }, "name": "self", "type": { @@ -16931,7 +17990,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1100 + "line": 1099 }, "parameters": [ { @@ -16945,7 +18004,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1099 + "line": 1098 }, "name": "ClassWithSelfKwarg", "namespace": "PythonSelf", @@ -16957,7 +18016,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1100 + "line": 1099 }, "name": "props", "type": { @@ -16975,7 +18034,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1107 + "line": 1106 }, "methods": [ { @@ -16985,7 +18044,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1108 + "line": 1107 }, "name": "method", "parameters": [ @@ -17016,7 +18075,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1103 + "line": 1102 }, "name": "StructWithSelf", "namespace": "PythonSelf", @@ -17029,7 +18088,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1104 + "line": 1103 }, "name": "self", "type": { @@ -17053,7 +18112,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1183 + "line": 1182 }, "methods": [ { @@ -17062,7 +18121,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1186 + "line": 1185 }, "name": "loadFoo", "returns": { @@ -17078,7 +18137,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1190 + "line": 1189 }, "name": "saveFoo", "parameters": [ @@ -17099,7 +18158,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1184 + "line": 1183 }, "name": "foo", "optional": true, @@ -17158,7 +18217,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2442 + "line": 2443 }, "name": "RootStruct", "properties": [ @@ -17171,7 +18230,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2446 + "line": 2447 }, "name": "stringProp", "type": { @@ -17186,7 +18245,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2447 + "line": 2448 }, "name": "nestedStruct", "optional": true, @@ -17205,7 +18264,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2455 + "line": 2456 }, "methods": [ { @@ -17214,7 +18273,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2456 + "line": 2457 }, "name": "validate", "parameters": [ @@ -17244,7 +18303,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 288 + "line": 287 }, "methods": [ { @@ -17253,7 +18312,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 296 + "line": 295 }, "name": "methodWithDefaultedArguments", "parameters": [ @@ -17286,7 +18345,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 304 + "line": 303 }, "name": "methodWithOptionalAnyArgument", "parameters": [ @@ -17306,7 +18365,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 292 + "line": 291 }, "name": "methodWithOptionalArguments", "parameters": [ @@ -17344,7 +18403,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2014 + "line": 2015 }, "name": "SecondLevelStruct", "properties": [ @@ -17357,7 +18416,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2018 + "line": 2019 }, "name": "deeperRequiredProp", "type": { @@ -17373,7 +18432,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2023 + "line": 2024 }, "name": "deeperOptionalProp", "optional": true, @@ -17399,7 +18458,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1624 + "line": 1625 }, "methods": [ { @@ -17408,7 +18467,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1627 + "line": 1628 }, "name": "interface1", "returns": { @@ -17423,7 +18482,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1631 + "line": 1632 }, "name": "interface2", "returns": { @@ -17446,7 +18505,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1966 + "line": 1967 }, "methods": [ { @@ -17455,7 +18514,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1968 + "line": 1969 }, "name": "isSingletonInt", "parameters": [ @@ -17485,7 +18544,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "enum", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1973 + "line": 1974 }, "members": [ { @@ -17509,7 +18568,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1949 + "line": 1950 }, "methods": [ { @@ -17518,7 +18577,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1952 + "line": 1953 }, "name": "isSingletonString", "parameters": [ @@ -17548,7 +18607,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "enum", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1957 + "line": 1958 }, "members": [ { @@ -17571,7 +18630,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/calculator.ts", - "line": 403 + "line": 414 }, "name": "SmellyStruct", "properties": [ @@ -17583,7 +18642,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 404 + "line": 415 }, "name": "property", "type": { @@ -17598,7 +18657,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 405 + "line": 416 }, "name": "yetAnoterOne", "type": { @@ -17621,7 +18680,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2479 + "line": 2480 }, "methods": [ { @@ -17630,7 +18689,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2488 + "line": 2489 }, "name": "returnAnonymous", "returns": { @@ -17646,7 +18705,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2480 + "line": 2481 }, "name": "returnReturn", "returns": { @@ -17807,7 +18866,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1892 + "line": 1893 }, "methods": [ { @@ -17816,7 +18875,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1895 + "line": 1896 }, "name": "canAccessStaticContext", "returns": { @@ -17835,7 +18894,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1903 + "line": 1904 }, "name": "staticVariable", "static": true, @@ -17857,7 +18916,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 690 + "line": 689 }, "parameters": [ { @@ -17871,7 +18930,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 689 + "line": 688 }, "methods": [ { @@ -17881,7 +18940,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 696 + "line": 695 }, "name": "staticMethod", "parameters": [ @@ -17908,7 +18967,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 700 + "line": 699 }, "name": "justMethod", "returns": { @@ -17929,7 +18988,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 712 + "line": 711 }, "name": "BAR", "static": true, @@ -17945,7 +19004,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 741 + "line": 740 }, "name": "ConstObj", "static": true, @@ -17962,7 +19021,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 707 + "line": 706 }, "name": "Foo", "static": true, @@ -17979,7 +19038,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 717 + "line": 716 }, "name": "zooBar", "static": true, @@ -18000,7 +19059,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 726 + "line": 725 }, "name": "instance", "static": true, @@ -18014,7 +19073,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 740 + "line": 739 }, "name": "nonConstStatic", "static": true, @@ -18029,7 +19088,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 690 + "line": 689 }, "name": "value", "type": { @@ -18047,7 +19106,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "enum", "locationInModule": { "filename": "lib/compliance.ts", - "line": 39 + "line": 38 }, "members": [ { @@ -18085,7 +19144,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1677 + "line": 1678 }, "name": "StripInternal", "properties": [ @@ -18095,7 +19154,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1678 + "line": 1679 }, "name": "youSeeMe", "type": { @@ -18115,7 +19174,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2240 + "line": 2241 }, "name": "StructA", "properties": [ @@ -18127,7 +19186,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2241 + "line": 2242 }, "name": "requiredString", "type": { @@ -18142,7 +19201,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2243 + "line": 2244 }, "name": "optionalNumber", "optional": true, @@ -18158,7 +19217,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2242 + "line": 2243 }, "name": "optionalString", "optional": true, @@ -18179,7 +19238,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2249 + "line": 2250 }, "name": "StructB", "properties": [ @@ -18191,7 +19250,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2250 + "line": 2251 }, "name": "requiredString", "type": { @@ -18206,7 +19265,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2251 + "line": 2252 }, "name": "optionalBoolean", "optional": true, @@ -18222,7 +19281,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2252 + "line": 2253 }, "name": "optionalStructA", "optional": true, @@ -18244,7 +19303,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2678 + "line": 2679 }, "name": "StructParameterType", "properties": [ @@ -18256,7 +19315,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2679 + "line": 2680 }, "name": "scope", "type": { @@ -18271,7 +19330,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2680 + "line": 2681 }, "name": "props", "optional": true, @@ -18296,7 +19355,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2072 + "line": 2073 }, "methods": [ { @@ -18305,7 +19364,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2084 + "line": 2085 }, "name": "howManyVarArgsDidIPass", "parameters": [ @@ -18337,7 +19396,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2073 + "line": 2074 }, "name": "roundTrip", "parameters": [ @@ -18373,7 +19432,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2254 + "line": 2255 }, "methods": [ { @@ -18382,7 +19441,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2255 + "line": 2256 }, "name": "isStructA", "parameters": [ @@ -18415,7 +19474,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2276 + "line": 2277 }, "name": "isStructB", "parameters": [ @@ -18455,7 +19514,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2046 + "line": 2047 }, "name": "StructWithJavaReservedWords", "properties": [ @@ -18467,7 +19526,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2047 + "line": 2048 }, "name": "default", "type": { @@ -18482,7 +19541,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2048 + "line": 2049 }, "name": "assert", "optional": true, @@ -18498,7 +19557,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2051 + "line": 2052 }, "name": "result", "optional": true, @@ -18514,7 +19573,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2052 + "line": 2053 }, "name": "that", "optional": true, @@ -18538,13 +19597,13 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 205 + "line": 213 } }, "kind": "class", "locationInModule": { "filename": "lib/calculator.ts", - "line": 197 + "line": 205 }, "name": "Sum", "properties": [ @@ -18557,12 +19616,12 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 209 + "line": 217 }, "name": "expression", "overrides": "jsii-calc.composition.CompositeOperation", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } }, { @@ -18572,13 +19631,13 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 201 + "line": 209 }, "name": "parts", "type": { "collection": { "elementtype": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" }, "kind": "array" } @@ -18599,7 +19658,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2181 + "line": 2182 }, "parameters": [ { @@ -18647,7 +19706,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2171 + "line": 2172 }, "name": "SupportsNiceJavaBuilder", "properties": [ @@ -18659,7 +19718,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2182 + "line": 2183 }, "name": "id", "overrides": "jsii-calc.SupportsNiceJavaBuilderWithRequiredProps", @@ -18674,7 +19733,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2172 + "line": 2173 }, "name": "rest", "type": { @@ -18698,7 +19757,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2191 + "line": 2192 }, "name": "SupportsNiceJavaBuilderProps", "properties": [ @@ -18711,7 +19770,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2201 + "line": 2202 }, "name": "bar", "type": { @@ -18728,7 +19787,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2196 + "line": 2197 }, "name": "id", "optional": true, @@ -18751,7 +19810,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2163 + "line": 2164 }, "parameters": [ { @@ -18777,7 +19836,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2155 + "line": 2156 }, "name": "SupportsNiceJavaBuilderWithRequiredProps", "properties": [ @@ -18788,7 +19847,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2157 + "line": 2158 }, "name": "bar", "type": { @@ -18803,7 +19862,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2164 + "line": 2165 }, "name": "id", "type": { @@ -18817,7 +19876,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2156 + "line": 2157 }, "name": "propId", "optional": true, @@ -18841,7 +19900,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 376 + "line": 375 }, "methods": [ { @@ -18851,7 +19910,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 389 + "line": 388 }, "name": "callerIsAsync", "returns": { @@ -18866,7 +19925,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 377 + "line": 376 }, "name": "callerIsMethod", "returns": { @@ -18881,7 +19940,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 429 + "line": 428 }, "name": "modifyOtherProperty", "parameters": [ @@ -18899,7 +19958,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 401 + "line": 400 }, "name": "modifyValueOfTheProperty", "parameters": [ @@ -18917,7 +19976,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 442 + "line": 441 }, "name": "readA", "returns": { @@ -18932,7 +19991,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 433 + "line": 432 }, "name": "retrieveOtherProperty", "returns": { @@ -18947,7 +20006,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 413 + "line": 412 }, "name": "retrieveReadOnlyProperty", "returns": { @@ -18962,7 +20021,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 405 + "line": 404 }, "name": "retrieveValueOfTheProperty", "returns": { @@ -18977,7 +20036,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 393 + "line": 392 }, "name": "virtualMethod", "parameters": [ @@ -19000,7 +20059,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 446 + "line": 445 }, "name": "writeA", "parameters": [ @@ -19022,7 +20081,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 411 + "line": 410 }, "name": "readonlyProperty", "type": { @@ -19035,7 +20094,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 440 + "line": 439 }, "name": "a", "type": { @@ -19048,7 +20107,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 381 + "line": 380 }, "name": "callerIsProperty", "type": { @@ -19061,7 +20120,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 419 + "line": 418 }, "name": "otherProperty", "type": { @@ -19074,7 +20133,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 399 + "line": 398 }, "name": "theProperty", "type": { @@ -19087,7 +20146,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 427 + "line": 426 }, "name": "valueOfOtherProperty", "type": { @@ -19110,7 +20169,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 651 + "line": 650 }, "methods": [ { @@ -19119,7 +20178,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 652 + "line": 651 }, "name": "throwError" } @@ -19136,7 +20195,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1997 + "line": 1998 }, "name": "TopLevelStruct", "properties": [ @@ -19149,7 +20208,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2001 + "line": 2002 }, "name": "required", "type": { @@ -19165,7 +20224,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2011 + "line": 2012 }, "name": "secondLevel", "type": { @@ -19190,7 +20249,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2006 + "line": 2007 }, "name": "optional", "optional": true, @@ -19211,7 +20270,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2752 + "line": 2753 }, "methods": [ { @@ -19221,7 +20280,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2756 + "line": 2757 }, "name": "mode", "returns": { @@ -19249,13 +20308,13 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 101 + "line": 109 }, "parameters": [ { "name": "operand", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } } ] @@ -19263,7 +20322,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/calculator.ts", - "line": 100 + "line": 108 }, "name": "UnaryOperation", "properties": [ @@ -19274,11 +20333,11 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 101 + "line": 109 }, "name": "operand", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } } ] @@ -19293,7 +20352,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1112 + "line": 1111 }, "name": "UnionProperties", "properties": [ @@ -19305,7 +20364,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1114 + "line": 1113 }, "name": "bar", "type": { @@ -19332,7 +20391,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1113 + "line": 1112 }, "name": "foo", "optional": true, @@ -19442,7 +20501,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1117 + "line": 1116 }, "methods": [ { @@ -19451,7 +20510,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1118 + "line": 1117 }, "name": "value", "returns": { @@ -19478,7 +20537,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1168 + "line": 1167 }, "methods": [ { @@ -19487,7 +20546,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1169 + "line": 1168 }, "name": "hello", "returns": { @@ -19511,7 +20570,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 597 + "line": 596 }, "parameters": [ { @@ -19525,7 +20584,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 596 + "line": 595 }, "methods": [ { @@ -19534,7 +20593,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 599 + "line": 598 }, "name": "justRead", "returns": { @@ -19549,7 +20608,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 608 + "line": 607 }, "name": "readStringAndNumber", "parameters": [ @@ -19572,7 +20631,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 603 + "line": 602 }, "name": "writeAndRead", "parameters": [ @@ -19599,7 +20658,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 597 + "line": 596 }, "name": "obj", "type": { @@ -19620,7 +20679,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 681 + "line": 680 }, "parameters": [ { @@ -19634,7 +20693,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 680 + "line": 679 }, "methods": [ { @@ -19643,7 +20702,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 683 + "line": 682 }, "name": "asArray", "parameters": [ @@ -19682,7 +20741,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 667 + "line": 666 }, "parameters": [ { @@ -19701,7 +20760,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 661 + "line": 660 }, "methods": [ { @@ -19710,7 +20769,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 675 + "line": 674 }, "name": "asArray", "parameters": [ @@ -19763,7 +20822,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 451 + "line": 450 }, "methods": [ { @@ -19773,7 +20832,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 476 + "line": 475 }, "name": "overrideMeAsync", "parameters": [ @@ -19796,7 +20855,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 480 + "line": 479 }, "name": "overrideMeSync", "parameters": [ @@ -19820,7 +20879,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 458 + "line": 457 }, "name": "parallelSumAsync", "parameters": [ @@ -19844,7 +20903,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 452 + "line": 451 }, "name": "serialSumAsync", "parameters": [ @@ -19867,7 +20926,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 468 + "line": 467 }, "name": "sumSync", "parameters": [ @@ -19904,7 +20963,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1921 + "line": 1922 }, "methods": [ { @@ -19913,7 +20972,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1926 + "line": 1927 }, "name": "callMe" }, @@ -19924,7 +20983,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1930 + "line": 1931 }, "name": "overrideMe", "protected": true @@ -19939,7 +20998,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1923 + "line": 1924 }, "name": "methodWasCalled", "type": { @@ -19961,7 +21020,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1937 + "line": 1938 }, "parameters": [ { @@ -19976,7 +21035,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1936 + "line": 1937 }, "name": "WithPrivatePropertyInConstructor", "properties": [ @@ -19987,7 +21046,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1939 + "line": 1940 }, "name": "success", "type": { @@ -20009,7 +21068,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "class", "locationInModule": { "filename": "lib/calculator.ts", - "line": 138 + "line": 146 }, "methods": [ { @@ -20019,7 +21078,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 164 + "line": 172 }, "name": "toString", "overrides": "@scope/jsii-calc-lib.Operation", @@ -20043,11 +21102,11 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 162 + "line": 170 }, "name": "expression", "type": { - "fqn": "@scope/jsii-calc-lib.Value" + "fqn": "@scope/jsii-calc-lib.NumericValue" } }, { @@ -20058,10 +21117,10 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "immutable": true, "locationInModule": { "filename": "lib/calculator.ts", - "line": 154 + "line": 162 }, "name": "value", - "overrides": "@scope/jsii-calc-lib.Value", + "overrides": "@scope/jsii-calc-lib.NumericValue", "type": { "primitive": "number" } @@ -20073,7 +21132,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 152 + "line": 160 }, "name": "decorationPostfixes", "type": { @@ -20092,7 +21151,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 147 + "line": 155 }, "name": "decorationPrefixes", "type": { @@ -20111,7 +21170,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu }, "locationInModule": { "filename": "lib/calculator.ts", - "line": 142 + "line": 150 }, "name": "stringStyle", "type": { @@ -20130,7 +21189,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu "kind": "enum", "locationInModule": { "filename": "lib/calculator.ts", - "line": 184 + "line": 192 }, "members": [ { @@ -20675,7 +21734,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu } }, "version": "0.0.0", - "fingerprint": "TXGVwLZ10oZ08NxDzu6i+fqPtaw5aEqME8+d+KEhL08=" + "fingerprint": "4Qo/E6yO72t3M8icCu7R6cPftP5P7P2ib37eYlI72u8=" } `; @@ -21086,7 +22145,7 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// /// Stability: Experimental /// - [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Add), fullyQualifiedName: "jsii-calc.Add", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"Left-hand side operand.\\"},\\"name\\":\\"lhs\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.Value\\"}},{\\"docs\\":{\\"summary\\":\\"Right-hand side operand.\\"},\\"name\\":\\"rhs\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.Value\\"}}]")] + [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Add), fullyQualifiedName: "jsii-calc.Add", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"Left-hand side operand.\\"},\\"name\\":\\"lhs\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}},{\\"docs\\":{\\"summary\\":\\"Right-hand side operand.\\"},\\"name\\":\\"rhs\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}}]")] public class Add : Amazon.JSII.Tests.CalculatorNamespace.BinaryOperation { ///

Creates a BinaryOperation. @@ -21095,7 +22154,7 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// /// Stability: Experimental /// - public Add(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Value_ lhs, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Value_ rhs): base(new DeputyProps(new object[]{lhs, rhs})) + public Add(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue lhs, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue rhs): base(new DeputyProps(new object[]{lhs, rhs})) { } @@ -21324,7 +22383,7 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// /// Stability: Experimental /// - [JsiiProperty(name: "unionArrayProperty", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"union\\":{\\"types\\":[{\\"primitive\\":\\"number\\"},{\\"fqn\\":\\"@scope/jsii-calc-lib.Value\\"}]}},\\"kind\\":\\"array\\"}}")] + [JsiiProperty(name: "unionArrayProperty", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"union\\":{\\"types\\":[{\\"primitive\\":\\"number\\"},{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}]}},\\"kind\\":\\"array\\"}}")] public virtual object[] UnionArrayProperty { get => GetInstanceProperty(); @@ -21878,7 +22937,7 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// /// Stability: Experimental /// - [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.BinaryOperation), fullyQualifiedName: "jsii-calc.BinaryOperation", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"Left-hand side operand.\\"},\\"name\\":\\"lhs\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.Value\\"}},{\\"docs\\":{\\"summary\\":\\"Right-hand side operand.\\"},\\"name\\":\\"rhs\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.Value\\"}}]")] + [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.BinaryOperation), fullyQualifiedName: "jsii-calc.BinaryOperation", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"Left-hand side operand.\\"},\\"name\\":\\"lhs\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}},{\\"docs\\":{\\"summary\\":\\"Right-hand side operand.\\"},\\"name\\":\\"rhs\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}}]")] public abstract class BinaryOperation : Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Operation, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IFriendly { /// Creates a BinaryOperation. @@ -21887,7 +22946,7 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// /// Stability: Experimental /// - protected BinaryOperation(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Value_ lhs, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Value_ rhs): base(new DeputyProps(new object[]{lhs, rhs})) + protected BinaryOperation(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue lhs, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue rhs): base(new DeputyProps(new object[]{lhs, rhs})) { } @@ -21919,20 +22978,20 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// /// Stability: Experimental /// - [JsiiProperty(name: "lhs", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.Value\\"}")] - public virtual Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Value_ Lhs + [JsiiProperty(name: "lhs", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}")] + public virtual Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue Lhs { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } /// Right-hand side operand. /// /// Stability: Experimental /// - [JsiiProperty(name: "rhs", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.Value\\"}")] - public virtual Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Value_ Rhs + [JsiiProperty(name: "rhs", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}")] + public virtual Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue Rhs { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } } } @@ -22185,40 +23244,40 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// /// Stability: Experimental /// - [JsiiProperty(name: "expression", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.Value\\"}")] - public override Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Value_ Expression + [JsiiProperty(name: "expression", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}")] + public override Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue Expression { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } /// A log of all operations. /// /// Stability: Experimental /// - [JsiiProperty(name: "operationsLog", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.Value\\"},\\"kind\\":\\"array\\"}}")] - public virtual Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Value_[] OperationsLog + [JsiiProperty(name: "operationsLog", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"},\\"kind\\":\\"array\\"}}")] + public virtual Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue[] OperationsLog { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } /// A map of per operation name of all operations performed. /// /// Stability: Experimental /// - [JsiiProperty(name: "operationsMap", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.Value\\"},\\"kind\\":\\"array\\"}},\\"kind\\":\\"map\\"}}")] - public virtual System.Collections.Generic.IDictionary OperationsMap + [JsiiProperty(name: "operationsMap", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"},\\"kind\\":\\"array\\"}},\\"kind\\":\\"map\\"}}")] + public virtual System.Collections.Generic.IDictionary OperationsMap { - get => GetInstanceProperty>(); + get => GetInstanceProperty>(); } /// The current value. /// /// Stability: Experimental /// - [JsiiProperty(name: "curr", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.Value\\"}")] - public virtual Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Value_ Curr + [JsiiProperty(name: "curr", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}")] + public virtual Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue Curr { - get => GetInstanceProperty(); + get => GetInstanceProperty(); set => SetInstanceProperty(value); } @@ -22939,8 +23998,8 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.Composition /// /// Stability: Experimental /// - [JsiiProperty(name: "expression", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.Value\\"}")] - public abstract Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Value_ Expression + [JsiiProperty(name: "expression", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}")] + public abstract Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue Expression { get; } @@ -23037,10 +24096,10 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.Composition /// /// Stability: Experimental /// - [JsiiProperty(name: "expression", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.Value\\"}")] - public override Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Value_ Expression + [JsiiProperty(name: "expression", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}")] + public override Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue Expression { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } } } @@ -24049,8 +25108,8 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// Stability: Experimental /// [JsiiOptional] - [JsiiProperty(name: "anotherOptional", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.Value\\"},\\"kind\\":\\"map\\"}}", isOptional: true, isOverride: true)] - public System.Collections.Generic.IDictionary? AnotherOptional + [JsiiProperty(name: "anotherOptional", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"},\\"kind\\":\\"map\\"}}", isOptional: true, isOverride: true)] + public System.Collections.Generic.IDictionary? AnotherOptional { get; set; @@ -24169,10 +25228,10 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// Stability: Experimental /// [JsiiOptional] - [JsiiProperty(name: "anotherOptional", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.Value\\"},\\"kind\\":\\"map\\"}}", isOptional: true)] - public System.Collections.Generic.IDictionary? AnotherOptional + [JsiiProperty(name: "anotherOptional", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"},\\"kind\\":\\"map\\"}}", isOptional: true)] + public System.Collections.Generic.IDictionary? AnotherOptional { - get => GetInstanceProperty?>(); + get => GetInstanceProperty?>(); } /// @@ -24906,6 +25965,124 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; +exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DynamicPropertyBearer.cs 1`] = ` +using Amazon.JSII.Runtime.Deputy; + +#pragma warning disable CS0672,CS0809,CS1591 + +namespace Amazon.JSII.Tests.CalculatorNamespace +{ + /// Ensures we can override a dynamic property that was inherited. + /// + /// Stability: Experimental + /// + [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.DynamicPropertyBearer), fullyQualifiedName: "jsii-calc.DynamicPropertyBearer", parametersJson: "[{\\"name\\":\\"valueStore\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] + public class DynamicPropertyBearer : DeputyBase + { + /// + /// Stability: Experimental + /// + public DynamicPropertyBearer(string valueStore): base(new DeputyProps(new object[]{valueStore})) + { + } + + /// 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 DynamicPropertyBearer(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 DynamicPropertyBearer(DeputyProps props): base(props) + { + } + + /// + /// Stability: Experimental + /// + [JsiiProperty(name: "dynamicProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] + public virtual string DynamicProperty + { + get => GetInstanceProperty(); + set => SetInstanceProperty(value); + } + + /// + /// Stability: Experimental + /// + [JsiiProperty(name: "valueStore", typeJson: "{\\"primitive\\":\\"string\\"}")] + public virtual string ValueStore + { + get => GetInstanceProperty(); + set => SetInstanceProperty(value); + } + } +} + +`; + +exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DynamicPropertyBearerChild.cs 1`] = ` +using Amazon.JSII.Runtime.Deputy; + +#pragma warning disable CS0672,CS0809,CS1591 + +namespace Amazon.JSII.Tests.CalculatorNamespace +{ + /// + /// Stability: Experimental + /// + [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.DynamicPropertyBearerChild), fullyQualifiedName: "jsii-calc.DynamicPropertyBearerChild", parametersJson: "[{\\"name\\":\\"originalValue\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] + public class DynamicPropertyBearerChild : Amazon.JSII.Tests.CalculatorNamespace.DynamicPropertyBearer + { + /// + /// Stability: Experimental + /// + public DynamicPropertyBearerChild(string originalValue): base(new DeputyProps(new object[]{originalValue})) + { + } + + /// 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 DynamicPropertyBearerChild(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 DynamicPropertyBearerChild(DeputyProps props): base(props) + { + } + + /// Sets \`this.dynamicProperty\` to the new value, and returns the old value. + /// the new value to be set. + /// the old value that was set. + /// + /// Stability: Experimental + /// + [JsiiMethod(name: "overrideValue", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"the new value to be set.\\"},\\"name\\":\\"newValue\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] + public virtual string OverrideValue(string newValue) + { + return InvokeInstanceMethod(new System.Type[]{typeof(string)}, new object[]{newValue}); + } + + /// + /// Stability: Experimental + /// + [JsiiProperty(name: "originalValue", typeJson: "{\\"primitive\\":\\"string\\"}")] + public virtual string OriginalValue + { + get => GetInstanceProperty(); + } + } +} + +`; + exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/EnumDispenser.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -26384,9 +27561,9 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// /// Stability: Experimental /// - [JsiiProperty(name: "anotherOptional", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.Value\\"},\\"kind\\":\\"map\\"}}", isOptional: true)] + [JsiiProperty(name: "anotherOptional", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"},\\"kind\\":\\"map\\"}}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] - System.Collections.Generic.IDictionary? AnotherOptional + System.Collections.Generic.IDictionary? AnotherOptional { get { @@ -31012,7 +32189,7 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JsiiAgent_.cs 1`] = ` +exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JsiiAgent.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 @@ -31023,27 +32200,27 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// /// Stability: Experimental /// - [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.JsiiAgent_), fullyQualifiedName: "jsii-calc.JsiiAgent")] - public class JsiiAgent_ : DeputyBase + [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.JsiiAgent), fullyQualifiedName: "jsii-calc.JsiiAgent")] + public class JsiiAgent : DeputyBase { /// /// Stability: Experimental /// - public JsiiAgent_(): base(new DeputyProps(System.Array.Empty())) + public JsiiAgent(): base(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 JsiiAgent_(ByRefValue reference): base(reference) + protected JsiiAgent(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 JsiiAgent_(DeputyProps props): base(props) + protected JsiiAgent(DeputyProps props): base(props) { } @@ -31052,10 +32229,10 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// Stability: Experimental /// [JsiiOptional] - [JsiiProperty(name: "jsiiAgent", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] - public static string? JsiiAgent + [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] + public static string? Value { - get => GetStaticProperty(typeof(Amazon.JSII.Tests.CalculatorNamespace.JsiiAgent_)); + get => GetStaticProperty(typeof(Amazon.JSII.Tests.CalculatorNamespace.JsiiAgent)); } } } @@ -31516,7 +32693,7 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// /// Stability: Experimental /// - [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Multiply), fullyQualifiedName: "jsii-calc.Multiply", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"Left-hand side operand.\\"},\\"name\\":\\"lhs\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.Value\\"}},{\\"docs\\":{\\"summary\\":\\"Right-hand side operand.\\"},\\"name\\":\\"rhs\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.Value\\"}}]")] + [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Multiply), fullyQualifiedName: "jsii-calc.Multiply", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"Left-hand side operand.\\"},\\"name\\":\\"lhs\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}},{\\"docs\\":{\\"summary\\":\\"Right-hand side operand.\\"},\\"name\\":\\"rhs\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}}]")] public class Multiply : Amazon.JSII.Tests.CalculatorNamespace.BinaryOperation, Amazon.JSII.Tests.CalculatorNamespace.IFriendlier, Amazon.JSII.Tests.CalculatorNamespace.IRandomNumberGenerator { /// Creates a BinaryOperation. @@ -31525,7 +32702,7 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// /// Stability: Experimental /// - public Multiply(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Value_ lhs, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Value_ rhs): base(new DeputyProps(new object[]{lhs, rhs})) + public Multiply(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue lhs, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue rhs): base(new DeputyProps(new object[]{lhs, rhs})) { } @@ -31650,13 +32827,13 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// /// Stability: Experimental /// - [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Negate), fullyQualifiedName: "jsii-calc.Negate", parametersJson: "[{\\"name\\":\\"operand\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.Value\\"}}]")] + [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Negate), fullyQualifiedName: "jsii-calc.Negate", parametersJson: "[{\\"name\\":\\"operand\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}}]")] public class Negate : Amazon.JSII.Tests.CalculatorNamespace.UnaryOperation, Amazon.JSII.Tests.CalculatorNamespace.IFriendlier { /// /// Stability: Experimental /// - public Negate(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Value_ operand): base(new DeputyProps(new object[]{operand})) + public Negate(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue operand): base(new DeputyProps(new object[]{operand})) { } @@ -32174,20 +33351,20 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// /// Stability: Experimental /// - [JsiiMethod(name: "sumFromArray", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}", parametersJson: "[{\\"name\\":\\"values\\",\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.Value\\"},\\"kind\\":\\"array\\"}}}]")] - public virtual double SumFromArray(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Value_[] values) + [JsiiMethod(name: "sumFromArray", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}", parametersJson: "[{\\"name\\":\\"values\\",\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"},\\"kind\\":\\"array\\"}}}]")] + public virtual double SumFromArray(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue[] values) { - return InvokeInstanceMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Value_[])}, new object[]{values}); + return InvokeInstanceMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue[])}, new object[]{values}); } /// Returns the sum of all values in a map. /// /// Stability: Experimental /// - [JsiiMethod(name: "sumFromMap", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}", parametersJson: "[{\\"name\\":\\"values\\",\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.Value\\"},\\"kind\\":\\"map\\"}}}]")] - public virtual double SumFromMap(System.Collections.Generic.IDictionary values) + [JsiiMethod(name: "sumFromMap", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}", parametersJson: "[{\\"name\\":\\"values\\",\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"},\\"kind\\":\\"map\\"}}}]")] + public virtual double SumFromMap(System.Collections.Generic.IDictionary values) { - return InvokeInstanceMethod(new System.Type[]{typeof(System.Collections.Generic.IDictionary)}, new object[]{values}); + return InvokeInstanceMethod(new System.Type[]{typeof(System.Collections.Generic.IDictionary)}, new object[]{values}); } } } @@ -32850,7 +34027,7 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// /// Stability: Experimental /// - [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Power), fullyQualifiedName: "jsii-calc.Power", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"The base of the power.\\"},\\"name\\":\\"base\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.Value\\"}},{\\"docs\\":{\\"summary\\":\\"The number of times to multiply.\\"},\\"name\\":\\"pow\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.Value\\"}}]")] + [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Power), fullyQualifiedName: "jsii-calc.Power", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"The base of the power.\\"},\\"name\\":\\"base\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}},{\\"docs\\":{\\"summary\\":\\"The number of times to multiply.\\"},\\"name\\":\\"pow\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}}]")] public class Power : Amazon.JSII.Tests.CalculatorNamespace.Composition.CompositeOperation { /// Creates a Power operation. @@ -32859,7 +34036,7 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// /// Stability: Experimental /// - public Power(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Value_ @base, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Value_ pow): base(new DeputyProps(new object[]{@base, pow})) + public Power(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue @base, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue pow): base(new DeputyProps(new object[]{@base, pow})) { } @@ -32881,10 +34058,10 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// /// Stability: Experimental /// - [JsiiProperty(name: "base", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.Value\\"}")] - public virtual Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Value_ Base + [JsiiProperty(name: "base", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}")] + public virtual Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue Base { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } /// The expression that this operation consists of. @@ -32893,20 +34070,20 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// /// Stability: Experimental /// - [JsiiProperty(name: "expression", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.Value\\"}")] - public override Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Value_ Expression + [JsiiProperty(name: "expression", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}")] + public override Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue Expression { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } /// The number of times to multiply. /// /// Stability: Experimental /// - [JsiiProperty(name: "pow", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.Value\\"}")] - public virtual Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Value_ Pow + [JsiiProperty(name: "pow", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}")] + public virtual Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue Pow { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } } } @@ -36063,20 +37240,20 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// /// Stability: Experimental /// - [JsiiProperty(name: "expression", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.Value\\"}")] - public override Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Value_ Expression + [JsiiProperty(name: "expression", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}")] + public override Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue Expression { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } /// The parts to sum. /// /// Stability: Experimental /// - [JsiiProperty(name: "parts", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.Value\\"},\\"kind\\":\\"array\\"}}")] - public virtual Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Value_[] Parts + [JsiiProperty(name: "parts", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"},\\"kind\\":\\"array\\"}}")] + public virtual Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue[] Parts { - get => GetInstanceProperty(); + get => GetInstanceProperty(); set => SetInstanceProperty(value); } } @@ -36697,13 +37874,13 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// /// Stability: Experimental /// - [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.UnaryOperation), fullyQualifiedName: "jsii-calc.UnaryOperation", parametersJson: "[{\\"name\\":\\"operand\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.Value\\"}}]")] + [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.UnaryOperation), fullyQualifiedName: "jsii-calc.UnaryOperation", parametersJson: "[{\\"name\\":\\"operand\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}}]")] public abstract class UnaryOperation : Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Operation { /// /// Stability: Experimental /// - protected UnaryOperation(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Value_ operand): base(new DeputyProps(new object[]{operand})) + protected UnaryOperation(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue operand): base(new DeputyProps(new object[]{operand})) { } @@ -36724,10 +37901,10 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// /// Stability: Experimental /// - [JsiiProperty(name: "operand", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.Value\\"}")] - public virtual Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Value_ Operand + [JsiiProperty(name: "operand", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}")] + public virtual Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue Operand { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } } } @@ -37429,350 +38606,8556 @@ using Amazon.JSII.Runtime.Deputy; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/jsii-calc-0.0.0.tgz 1`] = `dotnet/Amazon.JSII.Tests.CalculatorPackageId/jsii-calc-0.0.0.tgz is a tarball`; -exports[`Generated code for "jsii-calc": /java/pom.xml 1`] = ` - - - 4.0.0 - \${project.groupId}:\${project.artifactId} - A simple calcuator built on JSII. - https://github.com/aws/jsii - - - Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0 - repo - An OSI-approved license - - - - - Amazon Web Services - - author - - https://aws.amazon.com - - - Elad Ben-Israel - - maintainer - - https://github.com/eladb - - - Rico Huijbers - - maintainer - - https://github.com/rix0rrr - - - Romain Marcadier-Muller - - maintainer - - https://github.com/RomainMuller - - - - scm:git:https://github.com/aws/jsii.git - https://github.com/aws/jsii.git - - software.amazon.jsii.tests - calculator - 0.0.0 - jar - - UTF-8 - - - - software.amazon.jsii.tests - calculator-base - [0.0.0,0.0.1) - - - software.amazon.jsii.tests - calculator-base-of-base - [0.0.0,0.0.1) - - - software.amazon.jsii.tests - calculator-lib - [0.0.0.DEVPREVIEW,0.0.1.DEVPREVIEW) - - - software.amazon.jsii - jsii-runtime - [0.0.0,0.0.1) - - - org.jetbrains - annotations - [16.0.3,20.0.0) - - - - javax.annotation - javax.annotation-api - [1.3.2,1.4.0) - compile - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.1 - - 1.8 - 1.8 - - - - org.apache.maven.plugins - maven-jar-plugin - 3.2.0 - - - true - - true - true - - - - - - org.apache.maven.plugins - maven-source-plugin - 3.2.1 - - - attach-sources - - jar - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.1.1 - - - attach-javadocs - - jar - - - - - false - protected - - **/$Module.java - - -J-XX:+TieredCompilation - -J-XX:TieredStopAtLevel=1 - - - - org.apache.maven.plugins - maven-enforcer-plugin - 3.0.0-M3 - - - enforce-maven - - enforce - - - - - 3.6 - - - - - - - - org.codehaus.mojo - versions-maven-plugin - 2.7 - - false - - - - - - -`; +exports[`Generated code for "jsii-calc": /golang/jsiicalc.go 1`] = ` +package jsiicalc -exports[`Generated code for "jsii-calc": /java/src/main/java/software/amazon/jsii/tests/calculator/$Module.java 1`] = ` -package software.amazon.jsii.tests.calculator; +import ( + "github.com/aws-cdk/jsii/jsii" + "composition" +) -import static java.util.Arrays.asList; +type AbstractClassIface interface { + GetAbstractProperty() string + SetAbstractProperty() + GetPropFromInterface() string + SetPropFromInterface() + AbstractMethod() string + NonAbstractMethod() float64 +} -import java.io.BufferedReader; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.IOException; -import java.io.Reader; -import java.io.UncheckedIOException; +// Struct proxy +type AbstractClass struct { + AbstractProperty string + PropFromInterface string +} -import java.nio.charset.StandardCharsets; +func (a AbstractClass) GetAbstractProperty() string { + return a.AbstractProperty +} -import java.util.HashMap; -import java.util.List; -import java.util.Map; +func (a AbstractClass) GetPropFromInterface() string { + return a.PropFromInterface +} -import software.amazon.jsii.JsiiModule; -public final class $Module extends JsiiModule { - private static final Map MODULE_TYPES = load(); +func NewAbstractClass() AbstractClassIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "AbstractClass", + Method: "NewAbstractClass", + Parameters: []string{} + }) - private static Map load() { - final Map result = new HashMap<>(); - final ClassLoader cl = $Module.class.getClassLoader(); - try (final InputStream is = cl.getResourceAsStream("software/amazon/jsii/tests/calculator/$Module.txt"); - final Reader rd = new InputStreamReader(is, StandardCharsets.UTF_8); - final BufferedReader br = new BufferedReader(rd)) { - br.lines() - .filter(line -> !line.trim().isEmpty()) - .forEach(line -> { - final String[] parts = line.split("=", 2); - final String fqn = parts[0]; - final String className = parts[1]; - result.put(fqn, className); - }); - } - catch (final IOException exception) { - throw new UncheckedIOException(exception); - } - return result; + return &AbstractClass{ + // props } +} - private final Map> cache = new HashMap<>(); +func (a AbstractClass) SetAbstractProperty(val string) { + a.AbstractProperty = val +} - public $Module() { - super("jsii-calc", "0.0.0", $Module.class, "jsii-calc@0.0.0.jsii.tgz"); - } +func (a AbstractClass) SetPropFromInterface(val string) { + a.PropFromInterface = val +} - @Override - public List> getDependencies() { - return asList(software.amazon.jsii.tests.calculator.base.$Module.class, software.amazon.jsii.tests.calculator.baseofbase.$Module.class, software.amazon.jsii.tests.calculator.lib.$Module.class); - } +func (a *AbstractClass) AbstractMethod() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "AbstractClass", + Method: "AbstractMethod", + Parameters: []string{"name string"} + }) + return "NOOP_RETURN_STRING" +} - @Override - protected Class resolveClass(final String fqn) throws ClassNotFoundException { - if (!MODULE_TYPES.containsKey(fqn)) { - throw new ClassNotFoundException("Unknown JSII type: " + fqn); - } - String className = MODULE_TYPES.get(fqn); - if (!this.cache.containsKey(className)) { - this.cache.put(className, this.findClass(className)); - } - return this.cache.get(className); - } +func (a *AbstractClass) NonAbstractMethod() float64 { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "AbstractClass", + Method: "NonAbstractMethod", + Parameters: []string{} + }) + return 0.0 +} - private Class findClass(final String binaryName) { - try { - return Class.forName(binaryName); - } - catch (final ClassNotFoundException exception) { - throw new RuntimeException(exception); - } - } +type AbstractClassBaseIface interface { + GetAbstractProperty() string + SetAbstractProperty() } -`; +// Struct proxy +type AbstractClassBase struct { + AbstractProperty string +} -exports[`Generated code for "jsii-calc": /java/src/main/java/software/amazon/jsii/tests/calculator/AbstractClass.java 1`] = ` -package software.amazon.jsii.tests.calculator; +func (a AbstractClassBase) GetAbstractProperty() string { + return a.AbstractProperty +} -/** - * EXPERIMENTAL - */ -@javax.annotation.Generated(value = "jsii-pacmak") -@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) -@software.amazon.jsii.Jsii(module = software.amazon.jsii.tests.calculator.$Module.class, fqn = "jsii-calc.AbstractClass") -public abstract class AbstractClass extends software.amazon.jsii.tests.calculator.AbstractClassBase implements software.amazon.jsii.tests.calculator.IInterfaceImplementedByAbstractClass { - protected AbstractClass(final software.amazon.jsii.JsiiObjectRef objRef) { - super(objRef); - } +func NewAbstractClassBase() AbstractClassBaseIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "AbstractClassBase", + Method: "NewAbstractClassBase", + Parameters: []string{} + }) - protected AbstractClass(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { - super(initializationMode); + return &AbstractClassBase{ + // props } +} - /** - * EXPERIMENTAL - */ - @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - protected AbstractClass() { - super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); - software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this); - } +func (a AbstractClassBase) SetAbstractProperty(val string) { + a.AbstractProperty = val +} - /** - * EXPERIMENTAL - *

- * @param name This parameter is required. - */ - @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - public abstract @org.jetbrains.annotations.NotNull java.lang.String abstractMethod(final @org.jetbrains.annotations.NotNull java.lang.String name); +type AbstractClassReturnerIface interface { + GetReturnAbstractFromProperty() AbstractClassBase + SetReturnAbstractFromProperty() + GiveMeAbstract() AbstractClass + GiveMeInterface() IInterfaceImplementedByAbstractClass +} - /** - * EXPERIMENTAL - */ - @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - public @org.jetbrains.annotations.NotNull java.lang.Number nonAbstractMethod() { - return this.jsiiCall("nonAbstractMethod", java.lang.Number.class); - } +// Struct proxy +type AbstractClassReturner struct { + ReturnAbstractFromProperty AbstractClassBase +} - /** - * EXPERIMENTAL - */ - @Override - @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - public @org.jetbrains.annotations.NotNull java.lang.String getPropFromInterface() { - return this.jsiiGet("propFromInterface", java.lang.String.class); - } +func (a AbstractClassReturner) GetReturnAbstractFromProperty() AbstractClassBase { + return a.ReturnAbstractFromProperty +} - /** - * A proxy class which represents a concrete javascript instance of this type. - */ - final static class Jsii$Proxy extends software.amazon.jsii.tests.calculator.AbstractClass { - protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { - super(objRef); - } - /** - * EXPERIMENTAL - */ - @Override - @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - public @org.jetbrains.annotations.NotNull java.lang.String getPropFromInterface() { - return this.jsiiGet("propFromInterface", java.lang.String.class); - } +func NewAbstractClassReturner() AbstractClassReturnerIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "AbstractClassReturner", + Method: "NewAbstractClassReturner", + Parameters: []string{} + }) - /** - * EXPERIMENTAL - */ - @Override - @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - public @org.jetbrains.annotations.NotNull java.lang.String getAbstractProperty() { - return this.jsiiGet("abstractProperty", java.lang.String.class); - } + return &AbstractClassReturner{ + // props + } +} - /** - * EXPERIMENTAL +func (a AbstractClassReturner) SetReturnAbstractFromProperty(val AbstractClassBase) { + a.ReturnAbstractFromProperty = val +} + +func (a *AbstractClassReturner) GiveMeAbstract() AbstractClass { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "AbstractClassReturner", + Method: "GiveMeAbstract", + Parameters: []string{} + }) + return AbstractClass{} +} + +func (a *AbstractClassReturner) GiveMeInterface() IInterfaceImplementedByAbstractClass { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "AbstractClassReturner", + Method: "GiveMeInterface", + Parameters: []string{} + }) + return nil +} + +type AbstractSuiteIface interface { + GetProperty() string + SomeMethod() string + WorkItAll() string +} + +// Struct proxy +type AbstractSuite struct { + Property string +} + +func (a AbstractSuite) GetProperty() string { + return a.Property +} + + +func NewAbstractSuite() AbstractSuiteIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "AbstractSuite", + Method: "NewAbstractSuite", + Parameters: []string{} + }) + + return &AbstractSuite{ + // props + } +} + +func (a AbstractSuite) SetProperty(val string) { + a.Property = val +} + +func (a *AbstractSuite) SomeMethod() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "AbstractSuite", + Method: "SomeMethod", + Parameters: []string{"str string"} + }) + return "NOOP_RETURN_STRING" +} + +func (a *AbstractSuite) WorkItAll() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "AbstractSuite", + Method: "WorkItAll", + Parameters: []string{"seed string"} + }) + return "NOOP_RETURN_STRING" +} + +type AddIface interface { + GetValue() float64 + SetValue() + GetLhs() jsii.Any + SetLhs() + GetRhs() jsii.Any + SetRhs() + ToString() string +} + +// Struct proxy +type Add struct { + Value float64 + Lhs jsii.Any + Rhs jsii.Any +} + +func (a Add) GetValue() float64 { + return a.Value +} + +func (a Add) GetLhs() jsii.Any { + return a.Lhs +} + +func (a Add) GetRhs() jsii.Any { + return a.Rhs +} + + +// Creates a BinaryOperation. +func NewAdd(lhs @scope/jsii-calc-lib.NumericValue, rhs @scope/jsii-calc-lib.NumericValue) AddIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Add", + Method: "NewAdd", + Parameters: []string{lhs @scope/jsii-calc-lib.NumericValue, rhs @scope/jsii-calc-lib.NumericValue} + }) + + return &Add{ + // props + } +} + +func (a Add) SetValue(val float64) { + a.Value = val +} + +func (a Add) SetLhs(val jsii.Any) { + a.Lhs = val +} + +func (a Add) SetRhs(val jsii.Any) { + a.Rhs = val +} + +func (a *Add) ToString() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Add", + Method: "ToString", + Parameters: []string{} + }) + return "NOOP_RETURN_STRING" +} + +type AllTypesIface interface { + GetEnumPropertyValue() float64 + SetEnumPropertyValue() + GetAnyArrayProperty() []jsii.Any + SetAnyArrayProperty() + GetAnyMapProperty() map[string]jsii.Any + SetAnyMapProperty() + GetAnyProperty() jsii.Any + SetAnyProperty() + GetArrayProperty() []string + SetArrayProperty() + GetBooleanProperty() bool + SetBooleanProperty() + GetDateProperty() string + SetDateProperty() + GetEnumProperty() AllTypesEnum + SetEnumProperty() + GetJsonProperty() map[string]jsii.Any + SetJsonProperty() + GetMapProperty() map[string]jsii.Any + SetMapProperty() + GetNumberProperty() float64 + SetNumberProperty() + GetStringProperty() string + SetStringProperty() + GetUnionArrayProperty() []jsii.Any + SetUnionArrayProperty() + GetUnionMapProperty() map[string]jsii.Any + SetUnionMapProperty() + GetUnionProperty() jsii.Any + SetUnionProperty() + GetUnknownArrayProperty() []jsii.Any + SetUnknownArrayProperty() + GetUnknownMapProperty() map[string]jsii.Any + SetUnknownMapProperty() + GetUnknownProperty() jsii.Any + SetUnknownProperty() + GetOptionalEnumValue() StringEnum + SetOptionalEnumValue() + AnyIn() jsii.Any + AnyOut() jsii.Any + EnumMethod() StringEnum +} + +// Struct proxy +type AllTypes struct { + EnumPropertyValue float64 + AnyArrayProperty []jsii.Any + AnyMapProperty map[string]jsii.Any + AnyProperty jsii.Any + ArrayProperty []string + BooleanProperty bool + DateProperty string + EnumProperty AllTypesEnum + JsonProperty map[string]jsii.Any + MapProperty map[string]jsii.Any + NumberProperty float64 + StringProperty string + UnionArrayProperty []jsii.Any + UnionMapProperty map[string]jsii.Any + UnionProperty jsii.Any + UnknownArrayProperty []jsii.Any + UnknownMapProperty map[string]jsii.Any + UnknownProperty jsii.Any + OptionalEnumValue StringEnum +} + +func (a AllTypes) GetEnumPropertyValue() float64 { + return a.EnumPropertyValue +} + +func (a AllTypes) GetAnyArrayProperty() []jsii.Any { + return a.AnyArrayProperty +} + +func (a AllTypes) GetAnyMapProperty() map[string]jsii.Any { + return a.AnyMapProperty +} + +func (a AllTypes) GetAnyProperty() jsii.Any { + return a.AnyProperty +} + +func (a AllTypes) GetArrayProperty() []string { + return a.ArrayProperty +} + +func (a AllTypes) GetBooleanProperty() bool { + return a.BooleanProperty +} + +func (a AllTypes) GetDateProperty() string { + return a.DateProperty +} + +func (a AllTypes) GetEnumProperty() AllTypesEnum { + return a.EnumProperty +} + +func (a AllTypes) GetJsonProperty() map[string]jsii.Any { + return a.JsonProperty +} + +func (a AllTypes) GetMapProperty() map[string]jsii.Any { + return a.MapProperty +} + +func (a AllTypes) GetNumberProperty() float64 { + return a.NumberProperty +} + +func (a AllTypes) GetStringProperty() string { + return a.StringProperty +} + +func (a AllTypes) GetUnionArrayProperty() []jsii.Any { + return a.UnionArrayProperty +} + +func (a AllTypes) GetUnionMapProperty() map[string]jsii.Any { + return a.UnionMapProperty +} + +func (a AllTypes) GetUnionProperty() jsii.Any { + return a.UnionProperty +} + +func (a AllTypes) GetUnknownArrayProperty() []jsii.Any { + return a.UnknownArrayProperty +} + +func (a AllTypes) GetUnknownMapProperty() map[string]jsii.Any { + return a.UnknownMapProperty +} + +func (a AllTypes) GetUnknownProperty() jsii.Any { + return a.UnknownProperty +} + +func (a AllTypes) GetOptionalEnumValue() StringEnum { + return a.OptionalEnumValue +} + + +func NewAllTypes() AllTypesIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "AllTypes", + Method: "NewAllTypes", + Parameters: []string{} + }) + + return &AllTypes{ + // props + } +} + +func (a AllTypes) SetEnumPropertyValue(val float64) { + a.EnumPropertyValue = val +} + +func (a AllTypes) SetAnyArrayProperty(val []jsii.Any) { + a.AnyArrayProperty = val +} + +func (a AllTypes) SetAnyMapProperty(val map[string]jsii.Any) { + a.AnyMapProperty = val +} + +func (a AllTypes) SetAnyProperty(val jsii.Any) { + a.AnyProperty = val +} + +func (a AllTypes) SetArrayProperty(val []string) { + a.ArrayProperty = val +} + +func (a AllTypes) SetBooleanProperty(val bool) { + a.BooleanProperty = val +} + +func (a AllTypes) SetDateProperty(val string) { + a.DateProperty = val +} + +func (a AllTypes) SetEnumProperty(val AllTypesEnum) { + a.EnumProperty = val +} + +func (a AllTypes) SetJsonProperty(val map[string]jsii.Any) { + a.JsonProperty = val +} + +func (a AllTypes) SetMapProperty(val map[string]jsii.Any) { + a.MapProperty = val +} + +func (a AllTypes) SetNumberProperty(val float64) { + a.NumberProperty = val +} + +func (a AllTypes) SetStringProperty(val string) { + a.StringProperty = val +} + +func (a AllTypes) SetUnionArrayProperty(val []jsii.Any) { + a.UnionArrayProperty = val +} + +func (a AllTypes) SetUnionMapProperty(val map[string]jsii.Any) { + a.UnionMapProperty = val +} + +func (a AllTypes) SetUnionProperty(val jsii.Any) { + a.UnionProperty = val +} + +func (a AllTypes) SetUnknownArrayProperty(val []jsii.Any) { + a.UnknownArrayProperty = val +} + +func (a AllTypes) SetUnknownMapProperty(val map[string]jsii.Any) { + a.UnknownMapProperty = val +} + +func (a AllTypes) SetUnknownProperty(val jsii.Any) { + a.UnknownProperty = val +} + +func (a AllTypes) SetOptionalEnumValue(val StringEnum) { + a.OptionalEnumValue = val +} + +func (a *AllTypes) AnyIn() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "AllTypes", + Method: "AnyIn", + Parameters: []string{"inp any"} + }) + return nil +} + +func (a *AllTypes) AnyOut() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "AllTypes", + Method: "AnyOut", + Parameters: []string{} + }) + return nil +} + +func (a *AllTypes) EnumMethod() StringEnum { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "AllTypes", + Method: "EnumMethod", + Parameters: []string{"value jsii-calc.StringEnum"} + }) + return "ENUM_DUMMY" +} + +type AllTypesEnum string + +const ( + AllTypesEnumMyEnumValue AllTypesEnum = "MY_ENUM_VALUE" + AllTypesEnumYourEnumValue AllTypesEnum = "YOUR_ENUM_VALUE" + AllTypesEnumThisIsGreat AllTypesEnum = "THIS_IS_GREAT" +) + +type AllowedMethodNamesIface interface { + GetBar() jsii.Any + GetFoo() string + SetBar() jsii.Any + SetFoo() jsii.Any +} + +// Struct proxy +type AllowedMethodNames struct { +} + +func NewAllowedMethodNames() AllowedMethodNamesIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "AllowedMethodNames", + Method: "NewAllowedMethodNames", + Parameters: []string{} + }) + + return &AllowedMethodNames{ + // props + } +} + +func (a *AllowedMethodNames) GetBar() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "AllowedMethodNames", + Method: "GetBar", + Parameters: []string{"_p1 string", "_p2 number"} + }) + return nil +} + +func (a *AllowedMethodNames) GetFoo() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "AllowedMethodNames", + Method: "GetFoo", + Parameters: []string{"withParam string"} + }) + return "NOOP_RETURN_STRING" +} + +func (a *AllowedMethodNames) SetBar() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "AllowedMethodNames", + Method: "SetBar", + Parameters: []string{"_x string", "_y number", "_z boolean"} + }) + return nil +} + +func (a *AllowedMethodNames) SetFoo() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "AllowedMethodNames", + Method: "SetFoo", + Parameters: []string{"_x string", "_y number"} + }) + return nil +} + +type AmbiguousParametersIface interface { + GetProps() StructParameterType + SetProps() + GetScope() Bell + SetScope() +} + +// Struct proxy +type AmbiguousParameters struct { + Props StructParameterType + Scope Bell +} + +func (a AmbiguousParameters) GetProps() StructParameterType { + return a.Props +} + +func (a AmbiguousParameters) GetScope() Bell { + return a.Scope +} + + +func NewAmbiguousParameters(scope jsii-calc.Bell, props jsii-calc.StructParameterType) AmbiguousParametersIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "AmbiguousParameters", + Method: "NewAmbiguousParameters", + Parameters: []string{scope jsii-calc.Bell, props jsii-calc.StructParameterType} + }) + + return &AmbiguousParameters{ + // props + } +} + +func (a AmbiguousParameters) SetProps(val StructParameterType) { + a.Props = val +} + +func (a AmbiguousParameters) SetScope(val Bell) { + a.Scope = val +} + +type AnonymousImplementationProviderIface interface { + ProvideAsClass() Implementation + ProvideAsInterface() IAnonymouslyImplementMe +} + +// Struct proxy +type AnonymousImplementationProvider struct { +} + +func NewAnonymousImplementationProvider() AnonymousImplementationProviderIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "AnonymousImplementationProvider", + Method: "NewAnonymousImplementationProvider", + Parameters: []string{} + }) + + return &AnonymousImplementationProvider{ + // props + } +} + +func (a *AnonymousImplementationProvider) ProvideAsClass() Implementation { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "AnonymousImplementationProvider", + Method: "ProvideAsClass", + Parameters: []string{} + }) + return Implementation{} +} + +func (a *AnonymousImplementationProvider) ProvideAsInterface() IAnonymouslyImplementMe { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "AnonymousImplementationProvider", + Method: "ProvideAsInterface", + Parameters: []string{} + }) + return nil +} + +type AsyncVirtualMethodsIface interface { + CallMe() float64 + CallMe2() float64 + CallMeDoublePromise() float64 + DontOverrideMe() float64 + OverrideMe() float64 + OverrideMeToo() float64 +} + +// Struct proxy +type AsyncVirtualMethods struct { +} + +func NewAsyncVirtualMethods() AsyncVirtualMethodsIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "AsyncVirtualMethods", + Method: "NewAsyncVirtualMethods", + Parameters: []string{} + }) + + return &AsyncVirtualMethods{ + // props + } +} + +func (a *AsyncVirtualMethods) CallMe() float64 { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "AsyncVirtualMethods", + Method: "CallMe", + Parameters: []string{} + }) + return 0.0 +} + +func (a *AsyncVirtualMethods) CallMe2() float64 { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "AsyncVirtualMethods", + Method: "CallMe2", + Parameters: []string{} + }) + return 0.0 +} + +func (a *AsyncVirtualMethods) CallMeDoublePromise() float64 { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "AsyncVirtualMethods", + Method: "CallMeDoublePromise", + Parameters: []string{} + }) + return 0.0 +} + +func (a *AsyncVirtualMethods) DontOverrideMe() float64 { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "AsyncVirtualMethods", + Method: "DontOverrideMe", + Parameters: []string{} + }) + return 0.0 +} + +func (a *AsyncVirtualMethods) OverrideMe() float64 { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "AsyncVirtualMethods", + Method: "OverrideMe", + Parameters: []string{"mult number"} + }) + return 0.0 +} + +func (a *AsyncVirtualMethods) OverrideMeToo() float64 { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "AsyncVirtualMethods", + Method: "OverrideMeToo", + Parameters: []string{} + }) + return 0.0 +} + +type AugmentableClassIface interface { + MethodOne() jsii.Any + MethodTwo() jsii.Any +} + +// Struct proxy +type AugmentableClass struct { +} + +func NewAugmentableClass() AugmentableClassIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "AugmentableClass", + Method: "NewAugmentableClass", + Parameters: []string{} + }) + + return &AugmentableClass{ + // props + } +} + +func (a *AugmentableClass) MethodOne() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "AugmentableClass", + Method: "MethodOne", + Parameters: []string{} + }) + return nil +} + +func (a *AugmentableClass) MethodTwo() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "AugmentableClass", + Method: "MethodTwo", + Parameters: []string{} + }) + return nil +} + +type BaseJsii976Iface interface { +} + +// Struct proxy +type BaseJsii976 struct { +} + +func NewBaseJsii976() BaseJsii976Iface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "BaseJsii976", + Method: "NewBaseJsii976", + Parameters: []string{} + }) + + return &BaseJsii976{ + // props + } +} + +type BellIface interface { + GetRung() bool + SetRung() + Ring() jsii.Any +} + +// Struct proxy +type Bell struct { + Rung bool +} + +func (b Bell) GetRung() bool { + return b.Rung +} + + +func NewBell() BellIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Bell", + Method: "NewBell", + Parameters: []string{} + }) + + return &Bell{ + // props + } +} + +func (b Bell) SetRung(val bool) { + b.Rung = val +} + +func (b *Bell) Ring() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Bell", + Method: "Ring", + Parameters: []string{} + }) + return nil +} + +type BinaryOperationIface interface { + GetValue() float64 + SetValue() + GetLhs() jsii.Any + SetLhs() + GetRhs() jsii.Any + SetRhs() + Hello() string +} + +// Struct proxy +type BinaryOperation struct { + Value float64 + Lhs jsii.Any + Rhs jsii.Any +} + +func (b BinaryOperation) GetValue() float64 { + return b.Value +} + +func (b BinaryOperation) GetLhs() jsii.Any { + return b.Lhs +} + +func (b BinaryOperation) GetRhs() jsii.Any { + return b.Rhs +} + + +// Creates a BinaryOperation. +func NewBinaryOperation(lhs @scope/jsii-calc-lib.NumericValue, rhs @scope/jsii-calc-lib.NumericValue) BinaryOperationIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "BinaryOperation", + Method: "NewBinaryOperation", + Parameters: []string{lhs @scope/jsii-calc-lib.NumericValue, rhs @scope/jsii-calc-lib.NumericValue} + }) + + return &BinaryOperation{ + // props + } +} + +func (b BinaryOperation) SetValue(val float64) { + b.Value = val +} + +func (b BinaryOperation) SetLhs(val jsii.Any) { + b.Lhs = val +} + +func (b BinaryOperation) SetRhs(val jsii.Any) { + b.Rhs = val +} + +func (b *BinaryOperation) Hello() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "BinaryOperation", + Method: "Hello", + Parameters: []string{} + }) + return "NOOP_RETURN_STRING" +} + +type BurriedAnonymousObjectIface interface { + Check() bool + GiveItBack() jsii.Any +} + +// Struct proxy +type BurriedAnonymousObject struct { +} + +func NewBurriedAnonymousObject() BurriedAnonymousObjectIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "BurriedAnonymousObject", + Method: "NewBurriedAnonymousObject", + Parameters: []string{} + }) + + return &BurriedAnonymousObject{ + // props + } +} + +func (b *BurriedAnonymousObject) Check() bool { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "BurriedAnonymousObject", + Method: "Check", + Parameters: []string{} + }) + return true +} + +func (b *BurriedAnonymousObject) GiveItBack() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "BurriedAnonymousObject", + Method: "GiveItBack", + Parameters: []string{"value any"} + }) + return nil +} + +type CalculatorIface interface { + GetValue() float64 + SetValue() + GetExpression() jsii.Any + SetExpression() + GetDecorationPostfixes() []string + SetDecorationPostfixes() + GetDecorationPrefixes() []string + SetDecorationPrefixes() + GetStringStyle() composition.CompositionStringStyle + SetStringStyle() + GetOperationsLog() []jsii.Any + SetOperationsLog() + GetOperationsMap() map[string][]jsii.Any + SetOperationsMap() + GetCurr() jsii.Any + SetCurr() + GetMaxValue() float64 + SetMaxValue() + GetUnionProperty() jsii.Any + SetUnionProperty() + Add() jsii.Any + Mul() jsii.Any + Neg() jsii.Any + Pow() jsii.Any + ReadUnionValue() float64 +} + +// Struct proxy +type Calculator struct { + Value float64 + Expression jsii.Any + DecorationPostfixes []string + DecorationPrefixes []string + StringStyle composition.CompositionStringStyle + OperationsLog []jsii.Any + OperationsMap map[string][]jsii.Any + Curr jsii.Any + MaxValue float64 + UnionProperty jsii.Any +} + +func (c Calculator) GetValue() float64 { + return c.Value +} + +func (c Calculator) GetExpression() jsii.Any { + return c.Expression +} + +func (c Calculator) GetDecorationPostfixes() []string { + return c.DecorationPostfixes +} + +func (c Calculator) GetDecorationPrefixes() []string { + return c.DecorationPrefixes +} + +func (c Calculator) GetStringStyle() composition.CompositionStringStyle { + return c.StringStyle +} + +func (c Calculator) GetOperationsLog() []jsii.Any { + return c.OperationsLog +} + +func (c Calculator) GetOperationsMap() map[string][]jsii.Any { + return c.OperationsMap +} + +func (c Calculator) GetCurr() jsii.Any { + return c.Curr +} + +func (c Calculator) GetMaxValue() float64 { + return c.MaxValue +} + +func (c Calculator) GetUnionProperty() jsii.Any { + return c.UnionProperty +} + + +// Creates a Calculator object. +func NewCalculator(props jsii-calc.CalculatorProps) CalculatorIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Calculator", + Method: "NewCalculator", + Parameters: []string{props jsii-calc.CalculatorProps} + }) + + return &Calculator{ + // props + } +} + +func (c Calculator) SetValue(val float64) { + c.Value = val +} + +func (c Calculator) SetExpression(val jsii.Any) { + c.Expression = val +} + +func (c Calculator) SetDecorationPostfixes(val []string) { + c.DecorationPostfixes = val +} + +func (c Calculator) SetDecorationPrefixes(val []string) { + c.DecorationPrefixes = val +} + +func (c Calculator) SetStringStyle(val composition.CompositionStringStyle) { + c.StringStyle = val +} + +func (c Calculator) SetOperationsLog(val []jsii.Any) { + c.OperationsLog = val +} + +func (c Calculator) SetOperationsMap(val map[string][]jsii.Any) { + c.OperationsMap = val +} + +func (c Calculator) SetCurr(val jsii.Any) { + c.Curr = val +} + +func (c Calculator) SetMaxValue(val float64) { + c.MaxValue = val +} + +func (c Calculator) SetUnionProperty(val jsii.Any) { + c.UnionProperty = val +} + +func (c *Calculator) Add() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Calculator", + Method: "Add", + Parameters: []string{"value number"} + }) + return nil +} + +func (c *Calculator) Mul() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Calculator", + Method: "Mul", + Parameters: []string{"value number"} + }) + return nil +} + +func (c *Calculator) Neg() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Calculator", + Method: "Neg", + Parameters: []string{} + }) + return nil +} + +func (c *Calculator) Pow() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Calculator", + Method: "Pow", + Parameters: []string{"value number"} + }) + return nil +} + +func (c *Calculator) ReadUnionValue() float64 { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Calculator", + Method: "ReadUnionValue", + Parameters: []string{} + }) + return 0.0 +} + +// Struct interface +type CalculatorPropsIface interface { + GetInitialValue() float64 + GetMaximumValue() float64 +} + +// Struct proxy +type CalculatorProps struct { + InitialValue float64 + MaximumValue float64 +} + +func (c CalculatorProps) GetInitialValue() float64 { + return c.InitialValue +} + +func (c CalculatorProps) GetMaximumValue() float64 { + return c.MaximumValue +} + + +// Struct interface +type ChildStruct982Iface interface { + jsii-calc.ParentStruct982 + GetFoo() string + GetBar() float64 +} + +// Struct proxy +type ChildStruct982 struct { + Foo string + Bar float64 +} + +func (c ChildStruct982) GetFoo() string { + return c.Foo +} + +func (c ChildStruct982) GetBar() float64 { + return c.Bar +} + + +type ClassThatImplementsTheInternalInterfaceIface interface { + GetA() string + SetA() + GetB() string + SetB() + GetC() string + SetC() + GetD() string + SetD() +} + +// Struct proxy +type ClassThatImplementsTheInternalInterface struct { + A string + B string + C string + D string +} + +func (c ClassThatImplementsTheInternalInterface) GetA() string { + return c.A +} + +func (c ClassThatImplementsTheInternalInterface) GetB() string { + return c.B +} + +func (c ClassThatImplementsTheInternalInterface) GetC() string { + return c.C +} + +func (c ClassThatImplementsTheInternalInterface) GetD() string { + return c.D +} + + +func NewClassThatImplementsTheInternalInterface() ClassThatImplementsTheInternalInterfaceIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ClassThatImplementsTheInternalInterface", + Method: "NewClassThatImplementsTheInternalInterface", + Parameters: []string{} + }) + + return &ClassThatImplementsTheInternalInterface{ + // props + } +} + +func (c ClassThatImplementsTheInternalInterface) SetA(val string) { + c.A = val +} + +func (c ClassThatImplementsTheInternalInterface) SetB(val string) { + c.B = val +} + +func (c ClassThatImplementsTheInternalInterface) SetC(val string) { + c.C = val +} + +func (c ClassThatImplementsTheInternalInterface) SetD(val string) { + c.D = val +} + +type ClassThatImplementsThePrivateInterfaceIface interface { + GetA() string + SetA() + GetB() string + SetB() + GetC() string + SetC() + GetE() string + SetE() +} + +// Struct proxy +type ClassThatImplementsThePrivateInterface struct { + A string + B string + C string + E string +} + +func (c ClassThatImplementsThePrivateInterface) GetA() string { + return c.A +} + +func (c ClassThatImplementsThePrivateInterface) GetB() string { + return c.B +} + +func (c ClassThatImplementsThePrivateInterface) GetC() string { + return c.C +} + +func (c ClassThatImplementsThePrivateInterface) GetE() string { + return c.E +} + + +func NewClassThatImplementsThePrivateInterface() ClassThatImplementsThePrivateInterfaceIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ClassThatImplementsThePrivateInterface", + Method: "NewClassThatImplementsThePrivateInterface", + Parameters: []string{} + }) + + return &ClassThatImplementsThePrivateInterface{ + // props + } +} + +func (c ClassThatImplementsThePrivateInterface) SetA(val string) { + c.A = val +} + +func (c ClassThatImplementsThePrivateInterface) SetB(val string) { + c.B = val +} + +func (c ClassThatImplementsThePrivateInterface) SetC(val string) { + c.C = val +} + +func (c ClassThatImplementsThePrivateInterface) SetE(val string) { + c.E = val +} + +type ClassWithCollectionsIface interface { + GetStaticArray() []string + SetStaticArray() + GetStaticMap() map[string]string + SetStaticMap() + GetArray() []string + SetArray() + GetMap() map[string]string + SetMap() + CreateAList() []string + CreateAMap() map[string]string +} + +// Struct proxy +type ClassWithCollections struct { + StaticArray []string + StaticMap map[string]string + Array []string + Map map[string]string +} + +func (c ClassWithCollections) GetStaticArray() []string { + return c.StaticArray +} + +func (c ClassWithCollections) GetStaticMap() map[string]string { + return c.StaticMap +} + +func (c ClassWithCollections) GetArray() []string { + return c.Array +} + +func (c ClassWithCollections) GetMap() map[string]string { + return c.Map +} + + +func NewClassWithCollections(map Map string>, array Array) ClassWithCollectionsIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ClassWithCollections", + Method: "NewClassWithCollections", + Parameters: []string{map Map string>, array Array} + }) + + return &ClassWithCollections{ + // props + } +} + +func (c ClassWithCollections) SetStaticArray(val []string) { + c.StaticArray = val +} + +func (c ClassWithCollections) SetStaticMap(val map[string]string) { + c.StaticMap = val +} + +func (c ClassWithCollections) SetArray(val []string) { + c.Array = val +} + +func (c ClassWithCollections) SetMap(val map[string]string) { + c.Map = val +} + +func (c *ClassWithCollections) CreateAList() []string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ClassWithCollections", + Method: "CreateAList", + Parameters: []string{} + }) + return nil +} + +func (c *ClassWithCollections) CreateAMap() map[string]string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ClassWithCollections", + Method: "CreateAMap", + Parameters: []string{} + }) + return nil +} + +type ClassWithDocsIface interface { +} + +// Struct proxy +type ClassWithDocs struct { +} + +func NewClassWithDocs() ClassWithDocsIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ClassWithDocs", + Method: "NewClassWithDocs", + Parameters: []string{} + }) + + return &ClassWithDocs{ + // props + } +} + +type ClassWithJavaReservedWordsIface interface { + GetInt() string + SetInt() + Import() string +} + +// Struct proxy +type ClassWithJavaReservedWords struct { + Int string +} + +func (c ClassWithJavaReservedWords) GetInt() string { + return c.Int +} + + +func NewClassWithJavaReservedWords(int string) ClassWithJavaReservedWordsIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ClassWithJavaReservedWords", + Method: "NewClassWithJavaReservedWords", + Parameters: []string{int string} + }) + + return &ClassWithJavaReservedWords{ + // props + } +} + +func (c ClassWithJavaReservedWords) SetInt(val string) { + c.Int = val +} + +func (c *ClassWithJavaReservedWords) Import() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ClassWithJavaReservedWords", + Method: "Import", + Parameters: []string{"assert string"} + }) + return "NOOP_RETURN_STRING" +} + +type ClassWithMutableObjectLiteralPropertyIface interface { + GetMutableObject() IMutableObjectLiteral + SetMutableObject() +} + +// Struct proxy +type ClassWithMutableObjectLiteralProperty struct { + MutableObject IMutableObjectLiteral +} + +func (c ClassWithMutableObjectLiteralProperty) GetMutableObject() IMutableObjectLiteral { + return c.MutableObject +} + + +func NewClassWithMutableObjectLiteralProperty() ClassWithMutableObjectLiteralPropertyIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ClassWithMutableObjectLiteralProperty", + Method: "NewClassWithMutableObjectLiteralProperty", + Parameters: []string{} + }) + + return &ClassWithMutableObjectLiteralProperty{ + // props + } +} + +func (c ClassWithMutableObjectLiteralProperty) SetMutableObject(val IMutableObjectLiteral) { + c.MutableObject = val +} + +type ClassWithPrivateConstructorAndAutomaticPropertiesIface interface { + GetReadOnlyString() string + SetReadOnlyString() + GetReadWriteString() string + SetReadWriteString() + Create() ClassWithPrivateConstructorAndAutomaticProperties +} + +// Struct proxy +type ClassWithPrivateConstructorAndAutomaticProperties struct { + ReadOnlyString string + ReadWriteString string +} + +func (c ClassWithPrivateConstructorAndAutomaticProperties) GetReadOnlyString() string { + return c.ReadOnlyString +} + +func (c ClassWithPrivateConstructorAndAutomaticProperties) GetReadWriteString() string { + return c.ReadWriteString +} + + +func (c ClassWithPrivateConstructorAndAutomaticProperties) SetReadOnlyString(val string) { + c.ReadOnlyString = val +} + +func (c ClassWithPrivateConstructorAndAutomaticProperties) SetReadWriteString(val string) { + c.ReadWriteString = val +} + +func (c *ClassWithPrivateConstructorAndAutomaticProperties) Create() ClassWithPrivateConstructorAndAutomaticProperties { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ClassWithPrivateConstructorAndAutomaticProperties", + Method: "Create", + Parameters: []string{"readOnlyString string", "readWriteString string"} + }) + return ClassWithPrivateConstructorAndAutomaticProperties{} +} + +type ConfusingToJacksonIface interface { + GetUnionProperty() jsii.Any + SetUnionProperty() + MakeInstance() ConfusingToJackson + MakeStructInstance() ConfusingToJacksonStruct +} + +// Struct proxy +type ConfusingToJackson struct { + UnionProperty jsii.Any +} + +func (c ConfusingToJackson) GetUnionProperty() jsii.Any { + return c.UnionProperty +} + + +func (c ConfusingToJackson) SetUnionProperty(val jsii.Any) { + c.UnionProperty = val +} + +func (c *ConfusingToJackson) MakeInstance() ConfusingToJackson { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ConfusingToJackson", + Method: "MakeInstance", + Parameters: []string{} + }) + return ConfusingToJackson{} +} + +func (c *ConfusingToJackson) MakeStructInstance() ConfusingToJacksonStruct { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ConfusingToJackson", + Method: "MakeStructInstance", + Parameters: []string{} + }) + return nil +} + +// Struct interface +type ConfusingToJacksonStructIface interface { + GetUnionProperty() jsii.Any +} + +// Struct proxy +type ConfusingToJacksonStruct struct { + UnionProperty jsii.Any +} + +func (c ConfusingToJacksonStruct) GetUnionProperty() jsii.Any { + return c.UnionProperty +} + + +type ConstructorPassesThisOutIface interface { +} + +// Struct proxy +type ConstructorPassesThisOut struct { +} + +func NewConstructorPassesThisOut(consumer jsii-calc.PartiallyInitializedThisConsumer) ConstructorPassesThisOutIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ConstructorPassesThisOut", + Method: "NewConstructorPassesThisOut", + Parameters: []string{consumer jsii-calc.PartiallyInitializedThisConsumer} + }) + + return &ConstructorPassesThisOut{ + // props + } +} + +type ConstructorsIface interface { + HiddenInterface() IPublicInterface + HiddenInterfaces() []IPublicInterface + HiddenSubInterfaces() []IPublicInterface + MakeClass() PublicClass + MakeInterface() IPublicInterface + MakeInterface2() IPublicInterface2 + MakeInterfaces() []IPublicInterface +} + +// Struct proxy +type Constructors struct { +} + +func NewConstructors() ConstructorsIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Constructors", + Method: "NewConstructors", + Parameters: []string{} + }) + + return &Constructors{ + // props + } +} + +func (c *Constructors) HiddenInterface() IPublicInterface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Constructors", + Method: "HiddenInterface", + Parameters: []string{} + }) + return nil +} + +func (c *Constructors) HiddenInterfaces() []IPublicInterface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Constructors", + Method: "HiddenInterfaces", + Parameters: []string{} + }) + return nil +} + +func (c *Constructors) HiddenSubInterfaces() []IPublicInterface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Constructors", + Method: "HiddenSubInterfaces", + Parameters: []string{} + }) + return nil +} + +func (c *Constructors) MakeClass() PublicClass { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Constructors", + Method: "MakeClass", + Parameters: []string{} + }) + return PublicClass{} +} + +func (c *Constructors) MakeInterface() IPublicInterface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Constructors", + Method: "MakeInterface", + Parameters: []string{} + }) + return nil +} + +func (c *Constructors) MakeInterface2() IPublicInterface2 { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Constructors", + Method: "MakeInterface2", + Parameters: []string{} + }) + return nil +} + +func (c *Constructors) MakeInterfaces() []IPublicInterface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Constructors", + Method: "MakeInterfaces", + Parameters: []string{} + }) + return nil +} + +type ConsumePureInterfaceIface interface { + WorkItBaby() StructB +} + +// Struct proxy +type ConsumePureInterface struct { +} + +func NewConsumePureInterface(delegate jsii-calc.IStructReturningDelegate) ConsumePureInterfaceIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ConsumePureInterface", + Method: "NewConsumePureInterface", + Parameters: []string{delegate jsii-calc.IStructReturningDelegate} + }) + + return &ConsumePureInterface{ + // props + } +} + +func (c *ConsumePureInterface) WorkItBaby() StructB { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ConsumePureInterface", + Method: "WorkItBaby", + Parameters: []string{} + }) + return nil +} + +type ConsumerCanRingBellIface interface { + StaticImplementedByObjectLiteral() bool + StaticImplementedByPrivateClass() bool + StaticImplementedByPublicClass() bool + StaticWhenTypedAsClass() bool + ImplementedByObjectLiteral() bool + ImplementedByPrivateClass() bool + ImplementedByPublicClass() bool + WhenTypedAsClass() bool +} + +// Struct proxy +type ConsumerCanRingBell struct { +} + +func NewConsumerCanRingBell() ConsumerCanRingBellIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ConsumerCanRingBell", + Method: "NewConsumerCanRingBell", + Parameters: []string{} + }) + + return &ConsumerCanRingBell{ + // props + } +} + +func (c *ConsumerCanRingBell) StaticImplementedByObjectLiteral() bool { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ConsumerCanRingBell", + Method: "StaticImplementedByObjectLiteral", + Parameters: []string{"ringer jsii-calc.IBellRinger"} + }) + return true +} + +func (c *ConsumerCanRingBell) StaticImplementedByPrivateClass() bool { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ConsumerCanRingBell", + Method: "StaticImplementedByPrivateClass", + Parameters: []string{"ringer jsii-calc.IBellRinger"} + }) + return true +} + +func (c *ConsumerCanRingBell) StaticImplementedByPublicClass() bool { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ConsumerCanRingBell", + Method: "StaticImplementedByPublicClass", + Parameters: []string{"ringer jsii-calc.IBellRinger"} + }) + return true +} + +func (c *ConsumerCanRingBell) StaticWhenTypedAsClass() bool { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ConsumerCanRingBell", + Method: "StaticWhenTypedAsClass", + Parameters: []string{"ringer jsii-calc.IConcreteBellRinger"} + }) + return true +} + +func (c *ConsumerCanRingBell) ImplementedByObjectLiteral() bool { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ConsumerCanRingBell", + Method: "ImplementedByObjectLiteral", + Parameters: []string{"ringer jsii-calc.IBellRinger"} + }) + return true +} + +func (c *ConsumerCanRingBell) ImplementedByPrivateClass() bool { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ConsumerCanRingBell", + Method: "ImplementedByPrivateClass", + Parameters: []string{"ringer jsii-calc.IBellRinger"} + }) + return true +} + +func (c *ConsumerCanRingBell) ImplementedByPublicClass() bool { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ConsumerCanRingBell", + Method: "ImplementedByPublicClass", + Parameters: []string{"ringer jsii-calc.IBellRinger"} + }) + return true +} + +func (c *ConsumerCanRingBell) WhenTypedAsClass() bool { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ConsumerCanRingBell", + Method: "WhenTypedAsClass", + Parameters: []string{"ringer jsii-calc.IConcreteBellRinger"} + }) + return true +} + +type ConsumersOfThisCrazyTypeSystemIface interface { + ConsumeAnotherPublicInterface() string + ConsumeNonInternalInterface() jsii.Any +} + +// Struct proxy +type ConsumersOfThisCrazyTypeSystem struct { +} + +func NewConsumersOfThisCrazyTypeSystem() ConsumersOfThisCrazyTypeSystemIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ConsumersOfThisCrazyTypeSystem", + Method: "NewConsumersOfThisCrazyTypeSystem", + Parameters: []string{} + }) + + return &ConsumersOfThisCrazyTypeSystem{ + // props + } +} + +func (c *ConsumersOfThisCrazyTypeSystem) ConsumeAnotherPublicInterface() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ConsumersOfThisCrazyTypeSystem", + Method: "ConsumeAnotherPublicInterface", + Parameters: []string{"obj jsii-calc.IAnotherPublicInterface"} + }) + return "NOOP_RETURN_STRING" +} + +func (c *ConsumersOfThisCrazyTypeSystem) ConsumeNonInternalInterface() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ConsumersOfThisCrazyTypeSystem", + Method: "ConsumeNonInternalInterface", + Parameters: []string{"obj jsii-calc.INonInternalInterface"} + }) + return nil +} + +type DataRendererIface interface { + Render() string + RenderArbitrary() string + RenderMap() string +} + +// Struct proxy +type DataRenderer struct { +} + +func NewDataRenderer() DataRendererIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "DataRenderer", + Method: "NewDataRenderer", + Parameters: []string{} + }) + + return &DataRenderer{ + // props + } +} + +func (d *DataRenderer) Render() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "DataRenderer", + Method: "Render", + Parameters: []string{"data @scope/jsii-calc-lib.MyFirstStruct"} + }) + return "NOOP_RETURN_STRING" +} + +func (d *DataRenderer) RenderArbitrary() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "DataRenderer", + Method: "RenderArbitrary", + Parameters: []string{"data Map any>"} + }) + return "NOOP_RETURN_STRING" +} + +func (d *DataRenderer) RenderMap() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "DataRenderer", + Method: "RenderMap", + Parameters: []string{"map Map any>"} + }) + return "NOOP_RETURN_STRING" +} + +type DefaultedConstructorArgumentIface interface { + GetArg1() float64 + SetArg1() + GetArg3() string + SetArg3() + GetArg2() string + SetArg2() +} + +// Struct proxy +type DefaultedConstructorArgument struct { + Arg1 float64 + Arg3 string + Arg2 string +} + +func (d DefaultedConstructorArgument) GetArg1() float64 { + return d.Arg1 +} + +func (d DefaultedConstructorArgument) GetArg3() string { + return d.Arg3 +} + +func (d DefaultedConstructorArgument) GetArg2() string { + return d.Arg2 +} + + +func NewDefaultedConstructorArgument(arg1 number, arg2 string, arg3 date) DefaultedConstructorArgumentIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "DefaultedConstructorArgument", + Method: "NewDefaultedConstructorArgument", + Parameters: []string{arg1 number, arg2 string, arg3 date} + }) + + return &DefaultedConstructorArgument{ + // props + } +} + +func (d DefaultedConstructorArgument) SetArg1(val float64) { + d.Arg1 = val +} + +func (d DefaultedConstructorArgument) SetArg3(val string) { + d.Arg3 = val +} + +func (d DefaultedConstructorArgument) SetArg2(val string) { + d.Arg2 = val +} + +type Demonstrate982Iface interface { + TakeThis() ChildStruct982 + TakeThisToo() ParentStruct982 +} + +// Struct proxy +type Demonstrate982 struct { +} + +func NewDemonstrate982() Demonstrate982Iface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Demonstrate982", + Method: "NewDemonstrate982", + Parameters: []string{} + }) + + return &Demonstrate982{ + // props + } +} + +func (d *Demonstrate982) TakeThis() ChildStruct982 { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Demonstrate982", + Method: "TakeThis", + Parameters: []string{} + }) + return nil +} + +func (d *Demonstrate982) TakeThisToo() ParentStruct982 { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Demonstrate982", + Method: "TakeThisToo", + Parameters: []string{} + }) + return nil +} + +type DeprecatedClassIface interface { + GetReadonlyProperty() string + SetReadonlyProperty() + GetMutableProperty() float64 + SetMutableProperty() + Method() jsii.Any +} + +// Struct proxy +type DeprecatedClass struct { + ReadonlyProperty string + MutableProperty float64 +} + +func (d DeprecatedClass) GetReadonlyProperty() string { + return d.ReadonlyProperty +} + +func (d DeprecatedClass) GetMutableProperty() float64 { + return d.MutableProperty +} + + +func NewDeprecatedClass(readonlyString string, mutableNumber number) DeprecatedClassIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "DeprecatedClass", + Method: "NewDeprecatedClass", + Parameters: []string{readonlyString string, mutableNumber number} + }) + + return &DeprecatedClass{ + // props + } +} + +func (d DeprecatedClass) SetReadonlyProperty(val string) { + d.ReadonlyProperty = val +} + +func (d DeprecatedClass) SetMutableProperty(val float64) { + d.MutableProperty = val +} + +func (d *DeprecatedClass) Method() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "DeprecatedClass", + Method: "Method", + Parameters: []string{} + }) + return nil +} + +type DeprecatedEnum string + +const ( + DeprecatedEnumOptionA DeprecatedEnum = "OPTION_A" + DeprecatedEnumOptionB DeprecatedEnum = "OPTION_B" +) + +// Struct interface +type DeprecatedStructIface interface { + GetReadonlyProperty() string +} + +// Struct proxy +type DeprecatedStruct struct { + ReadonlyProperty string +} + +func (d DeprecatedStruct) GetReadonlyProperty() string { + return d.ReadonlyProperty +} + + +// Struct interface +type DerivedStructIface interface { + @scope/jsii-calc-lib.MyFirstStruct + GetAnumber() float64 + GetAstring() string + GetFirstOptional() []string + GetAnotherRequired() string + GetBool() bool + GetNonPrimitive() DoubleTrouble + GetAnotherOptional() map[string]jsii.Any + GetOptionalAny() jsii.Any + GetOptionalArray() []string +} + +// Struct proxy +type DerivedStruct struct { + Anumber float64 + Astring string + FirstOptional []string + AnotherRequired string + Bool bool + NonPrimitive DoubleTrouble + AnotherOptional map[string]jsii.Any + OptionalAny jsii.Any + OptionalArray []string +} + +func (d DerivedStruct) GetAnumber() float64 { + return d.Anumber +} + +func (d DerivedStruct) GetAstring() string { + return d.Astring +} + +func (d DerivedStruct) GetFirstOptional() []string { + return d.FirstOptional +} + +func (d DerivedStruct) GetAnotherRequired() string { + return d.AnotherRequired +} + +func (d DerivedStruct) GetBool() bool { + return d.Bool +} + +func (d DerivedStruct) GetNonPrimitive() DoubleTrouble { + return d.NonPrimitive +} + +func (d DerivedStruct) GetAnotherOptional() map[string]jsii.Any { + return d.AnotherOptional +} + +func (d DerivedStruct) GetOptionalAny() jsii.Any { + return d.OptionalAny +} + +func (d DerivedStruct) GetOptionalArray() []string { + return d.OptionalArray +} + + +// Struct interface +type DiamondInheritanceBaseLevelStructIface interface { + GetBaseLevelProperty() string +} + +// Struct proxy +type DiamondInheritanceBaseLevelStruct struct { + BaseLevelProperty string +} + +func (d DiamondInheritanceBaseLevelStruct) GetBaseLevelProperty() string { + return d.BaseLevelProperty +} + + +// Struct interface +type DiamondInheritanceFirstMidLevelStructIface interface { + jsii-calc.DiamondInheritanceBaseLevelStruct + GetBaseLevelProperty() string + GetFirstMidLevelProperty() string +} + +// Struct proxy +type DiamondInheritanceFirstMidLevelStruct struct { + BaseLevelProperty string + FirstMidLevelProperty string +} + +func (d DiamondInheritanceFirstMidLevelStruct) GetBaseLevelProperty() string { + return d.BaseLevelProperty +} + +func (d DiamondInheritanceFirstMidLevelStruct) GetFirstMidLevelProperty() string { + return d.FirstMidLevelProperty +} + + +// Struct interface +type DiamondInheritanceSecondMidLevelStructIface interface { + jsii-calc.DiamondInheritanceBaseLevelStruct + GetBaseLevelProperty() string + GetSecondMidLevelProperty() string +} + +// Struct proxy +type DiamondInheritanceSecondMidLevelStruct struct { + BaseLevelProperty string + SecondMidLevelProperty string +} + +func (d DiamondInheritanceSecondMidLevelStruct) GetBaseLevelProperty() string { + return d.BaseLevelProperty +} + +func (d DiamondInheritanceSecondMidLevelStruct) GetSecondMidLevelProperty() string { + return d.SecondMidLevelProperty +} + + +// Struct interface +type DiamondInheritanceTopLevelStructIface interface { + jsii-calc.DiamondInheritanceBaseLevelStruct + jsii-calc.DiamondInheritanceFirstMidLevelStruct + jsii-calc.DiamondInheritanceSecondMidLevelStruct + GetBaseLevelProperty() string + GetFirstMidLevelProperty() string + GetSecondMidLevelProperty() string + GetTopLevelProperty() string +} + +// Struct proxy +type DiamondInheritanceTopLevelStruct struct { + BaseLevelProperty string + FirstMidLevelProperty string + SecondMidLevelProperty string + TopLevelProperty string +} + +func (d DiamondInheritanceTopLevelStruct) GetBaseLevelProperty() string { + return d.BaseLevelProperty +} + +func (d DiamondInheritanceTopLevelStruct) GetFirstMidLevelProperty() string { + return d.FirstMidLevelProperty +} + +func (d DiamondInheritanceTopLevelStruct) GetSecondMidLevelProperty() string { + return d.SecondMidLevelProperty +} + +func (d DiamondInheritanceTopLevelStruct) GetTopLevelProperty() string { + return d.TopLevelProperty +} + + +type DisappointingCollectionSourceIface interface { + GetMaybeList() []string + SetMaybeList() + GetMaybeMap() map[string]float64 + SetMaybeMap() +} + +// Struct proxy +type DisappointingCollectionSource struct { + MaybeList []string + MaybeMap map[string]float64 +} + +func (d DisappointingCollectionSource) GetMaybeList() []string { + return d.MaybeList +} + +func (d DisappointingCollectionSource) GetMaybeMap() map[string]float64 { + return d.MaybeMap +} + + +func (d DisappointingCollectionSource) SetMaybeList(val []string) { + d.MaybeList = val +} + +func (d DisappointingCollectionSource) SetMaybeMap(val map[string]float64) { + d.MaybeMap = val +} + +type DoNotOverridePrivatesIface interface { + ChangePrivatePropertyValue() jsii.Any + PrivateMethodValue() string + PrivatePropertyValue() string +} + +// Struct proxy +type DoNotOverridePrivates struct { +} + +func NewDoNotOverridePrivates() DoNotOverridePrivatesIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "DoNotOverridePrivates", + Method: "NewDoNotOverridePrivates", + Parameters: []string{} + }) + + return &DoNotOverridePrivates{ + // props + } +} + +func (d *DoNotOverridePrivates) ChangePrivatePropertyValue() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "DoNotOverridePrivates", + Method: "ChangePrivatePropertyValue", + Parameters: []string{"newValue string"} + }) + return nil +} + +func (d *DoNotOverridePrivates) PrivateMethodValue() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "DoNotOverridePrivates", + Method: "PrivateMethodValue", + Parameters: []string{} + }) + return "NOOP_RETURN_STRING" +} + +func (d *DoNotOverridePrivates) PrivatePropertyValue() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "DoNotOverridePrivates", + Method: "PrivatePropertyValue", + Parameters: []string{} + }) + return "NOOP_RETURN_STRING" +} + +type DoNotRecognizeAnyAsOptionalIface interface { + Method() jsii.Any +} + +// Struct proxy +type DoNotRecognizeAnyAsOptional struct { +} + +func NewDoNotRecognizeAnyAsOptional() DoNotRecognizeAnyAsOptionalIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "DoNotRecognizeAnyAsOptional", + Method: "NewDoNotRecognizeAnyAsOptional", + Parameters: []string{} + }) + + return &DoNotRecognizeAnyAsOptional{ + // props + } +} + +func (d *DoNotRecognizeAnyAsOptional) Method() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "DoNotRecognizeAnyAsOptional", + Method: "Method", + Parameters: []string{"_requiredAny any", "_optionalAny any", "_optionalString string"} + }) + return nil +} + +type DocumentedClassIface interface { + Greet() float64 + Hola() jsii.Any +} + +// Struct proxy +type DocumentedClass struct { +} + +func NewDocumentedClass() DocumentedClassIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "DocumentedClass", + Method: "NewDocumentedClass", + Parameters: []string{} + }) + + return &DocumentedClass{ + // props + } +} + +func (d *DocumentedClass) Greet() float64 { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "DocumentedClass", + Method: "Greet", + Parameters: []string{"greetee jsii-calc.Greetee"} + }) + return 0.0 +} + +func (d *DocumentedClass) Hola() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "DocumentedClass", + Method: "Hola", + Parameters: []string{} + }) + return nil +} + +type DontComplainAboutVariadicAfterOptionalIface interface { + OptionalAndVariadic() string +} + +// Struct proxy +type DontComplainAboutVariadicAfterOptional struct { +} + +func NewDontComplainAboutVariadicAfterOptional() DontComplainAboutVariadicAfterOptionalIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "DontComplainAboutVariadicAfterOptional", + Method: "NewDontComplainAboutVariadicAfterOptional", + Parameters: []string{} + }) + + return &DontComplainAboutVariadicAfterOptional{ + // props + } +} + +func (d *DontComplainAboutVariadicAfterOptional) OptionalAndVariadic() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "DontComplainAboutVariadicAfterOptional", + Method: "OptionalAndVariadic", + Parameters: []string{"optional string", "things string"} + }) + return "NOOP_RETURN_STRING" +} + +type DoubleTroubleIface interface { + Hello() string + Next() float64 +} + +// Struct proxy +type DoubleTrouble struct { +} + +func NewDoubleTrouble() DoubleTroubleIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "DoubleTrouble", + Method: "NewDoubleTrouble", + Parameters: []string{} + }) + + return &DoubleTrouble{ + // props + } +} + +func (d *DoubleTrouble) Hello() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "DoubleTrouble", + Method: "Hello", + Parameters: []string{} + }) + return "NOOP_RETURN_STRING" +} + +func (d *DoubleTrouble) Next() float64 { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "DoubleTrouble", + Method: "Next", + Parameters: []string{} + }) + return 0.0 +} + +type DynamicPropertyBearerIface interface { + GetDynamicProperty() string + SetDynamicProperty() + GetValueStore() string + SetValueStore() +} + +// Struct proxy +type DynamicPropertyBearer struct { + DynamicProperty string + ValueStore string +} + +func (d DynamicPropertyBearer) GetDynamicProperty() string { + return d.DynamicProperty +} + +func (d DynamicPropertyBearer) GetValueStore() string { + return d.ValueStore +} + + +func NewDynamicPropertyBearer(valueStore string) DynamicPropertyBearerIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "DynamicPropertyBearer", + Method: "NewDynamicPropertyBearer", + Parameters: []string{valueStore string} + }) + + return &DynamicPropertyBearer{ + // props + } +} + +func (d DynamicPropertyBearer) SetDynamicProperty(val string) { + d.DynamicProperty = val +} + +func (d DynamicPropertyBearer) SetValueStore(val string) { + d.ValueStore = val +} + +type DynamicPropertyBearerChildIface interface { + GetDynamicProperty() string + SetDynamicProperty() + GetValueStore() string + SetValueStore() + GetOriginalValue() string + SetOriginalValue() + OverrideValue() string +} + +// Struct proxy +type DynamicPropertyBearerChild struct { + DynamicProperty string + ValueStore string + OriginalValue string +} + +func (d DynamicPropertyBearerChild) GetDynamicProperty() string { + return d.DynamicProperty +} + +func (d DynamicPropertyBearerChild) GetValueStore() string { + return d.ValueStore +} + +func (d DynamicPropertyBearerChild) GetOriginalValue() string { + return d.OriginalValue +} + + +func NewDynamicPropertyBearerChild(originalValue string) DynamicPropertyBearerChildIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "DynamicPropertyBearerChild", + Method: "NewDynamicPropertyBearerChild", + Parameters: []string{originalValue string} + }) + + return &DynamicPropertyBearerChild{ + // props + } +} + +func (d DynamicPropertyBearerChild) SetDynamicProperty(val string) { + d.DynamicProperty = val +} + +func (d DynamicPropertyBearerChild) SetValueStore(val string) { + d.ValueStore = val +} + +func (d DynamicPropertyBearerChild) SetOriginalValue(val string) { + d.OriginalValue = val +} + +func (d *DynamicPropertyBearerChild) OverrideValue() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "DynamicPropertyBearerChild", + Method: "OverrideValue", + Parameters: []string{"newValue string"} + }) + return "NOOP_RETURN_STRING" +} + +type EnumDispenserIface interface { + RandomIntegerLikeEnum() AllTypesEnum + RandomStringLikeEnum() StringEnum +} + +// Struct proxy +type EnumDispenser struct { +} + +func (e *EnumDispenser) RandomIntegerLikeEnum() AllTypesEnum { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "EnumDispenser", + Method: "RandomIntegerLikeEnum", + Parameters: []string{} + }) + return "ENUM_DUMMY" +} + +func (e *EnumDispenser) RandomStringLikeEnum() StringEnum { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "EnumDispenser", + Method: "RandomStringLikeEnum", + Parameters: []string{} + }) + return "ENUM_DUMMY" +} + +type EraseUndefinedHashValuesIface interface { + DoesKeyExist() bool + Prop1IsNull() map[string]jsii.Any + Prop2IsUndefined() map[string]jsii.Any +} + +// Struct proxy +type EraseUndefinedHashValues struct { +} + +func NewEraseUndefinedHashValues() EraseUndefinedHashValuesIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "EraseUndefinedHashValues", + Method: "NewEraseUndefinedHashValues", + Parameters: []string{} + }) + + return &EraseUndefinedHashValues{ + // props + } +} + +func (e *EraseUndefinedHashValues) DoesKeyExist() bool { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "EraseUndefinedHashValues", + Method: "DoesKeyExist", + Parameters: []string{"opts jsii-calc.EraseUndefinedHashValuesOptions", "key string"} + }) + return true +} + +func (e *EraseUndefinedHashValues) Prop1IsNull() map[string]jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "EraseUndefinedHashValues", + Method: "Prop1IsNull", + Parameters: []string{} + }) + return nil +} + +func (e *EraseUndefinedHashValues) Prop2IsUndefined() map[string]jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "EraseUndefinedHashValues", + Method: "Prop2IsUndefined", + Parameters: []string{} + }) + return nil +} + +// Struct interface +type EraseUndefinedHashValuesOptionsIface interface { + GetOption1() string + GetOption2() string +} + +// Struct proxy +type EraseUndefinedHashValuesOptions struct { + Option1 string + Option2 string +} + +func (e EraseUndefinedHashValuesOptions) GetOption1() string { + return e.Option1 +} + +func (e EraseUndefinedHashValuesOptions) GetOption2() string { + return e.Option2 +} + + +type ExperimentalClassIface interface { + GetReadonlyProperty() string + SetReadonlyProperty() + GetMutableProperty() float64 + SetMutableProperty() + Method() jsii.Any +} + +// Struct proxy +type ExperimentalClass struct { + ReadonlyProperty string + MutableProperty float64 +} + +func (e ExperimentalClass) GetReadonlyProperty() string { + return e.ReadonlyProperty +} + +func (e ExperimentalClass) GetMutableProperty() float64 { + return e.MutableProperty +} + + +func NewExperimentalClass(readonlyString string, mutableNumber number) ExperimentalClassIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ExperimentalClass", + Method: "NewExperimentalClass", + Parameters: []string{readonlyString string, mutableNumber number} + }) + + return &ExperimentalClass{ + // props + } +} + +func (e ExperimentalClass) SetReadonlyProperty(val string) { + e.ReadonlyProperty = val +} + +func (e ExperimentalClass) SetMutableProperty(val float64) { + e.MutableProperty = val +} + +func (e *ExperimentalClass) Method() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ExperimentalClass", + Method: "Method", + Parameters: []string{} + }) + return nil +} + +type ExperimentalEnum string + +const ( + ExperimentalEnumOptionA ExperimentalEnum = "OPTION_A" + ExperimentalEnumOptionB ExperimentalEnum = "OPTION_B" +) + +// Struct interface +type ExperimentalStructIface interface { + GetReadonlyProperty() string +} + +// Struct proxy +type ExperimentalStruct struct { + ReadonlyProperty string +} + +func (e ExperimentalStruct) GetReadonlyProperty() string { + return e.ReadonlyProperty +} + + +type ExportedBaseClassIface interface { + GetSuccess() bool + SetSuccess() +} + +// Struct proxy +type ExportedBaseClass struct { + Success bool +} + +func (e ExportedBaseClass) GetSuccess() bool { + return e.Success +} + + +func NewExportedBaseClass(success boolean) ExportedBaseClassIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ExportedBaseClass", + Method: "NewExportedBaseClass", + Parameters: []string{success boolean} + }) + + return &ExportedBaseClass{ + // props + } +} + +func (e ExportedBaseClass) SetSuccess(val bool) { + e.Success = val +} + +// Struct interface +type ExtendsInternalInterfaceIface interface { + GetBoom() bool + GetProp() string +} + +// Struct proxy +type ExtendsInternalInterface struct { + Boom bool + Prop string +} + +func (e ExtendsInternalInterface) GetBoom() bool { + return e.Boom +} + +func (e ExtendsInternalInterface) GetProp() string { + return e.Prop +} + + +type ExternalClassIface interface { + GetReadonlyProperty() string + SetReadonlyProperty() + GetMutableProperty() float64 + SetMutableProperty() + Method() jsii.Any +} + +// Struct proxy +type ExternalClass struct { + ReadonlyProperty string + MutableProperty float64 +} + +func (e ExternalClass) GetReadonlyProperty() string { + return e.ReadonlyProperty +} + +func (e ExternalClass) GetMutableProperty() float64 { + return e.MutableProperty +} + + +func NewExternalClass(readonlyString string, mutableNumber number) ExternalClassIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ExternalClass", + Method: "NewExternalClass", + Parameters: []string{readonlyString string, mutableNumber number} + }) + + return &ExternalClass{ + // props + } +} + +func (e ExternalClass) SetReadonlyProperty(val string) { + e.ReadonlyProperty = val +} + +func (e ExternalClass) SetMutableProperty(val float64) { + e.MutableProperty = val +} + +func (e *ExternalClass) Method() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ExternalClass", + Method: "Method", + Parameters: []string{} + }) + return nil +} + +type ExternalEnum string + +const ( + ExternalEnumOptionA ExternalEnum = "OPTION_A" + ExternalEnumOptionB ExternalEnum = "OPTION_B" +) + +// Struct interface +type ExternalStructIface interface { + GetReadonlyProperty() string +} + +// Struct proxy +type ExternalStruct struct { + ReadonlyProperty string +} + +func (e ExternalStruct) GetReadonlyProperty() string { + return e.ReadonlyProperty +} + + +type GiveMeStructsIface interface { + GetStructLiteral() jsii.Any + SetStructLiteral() + DerivedToFirst() jsii.Any + ReadDerivedNonPrimitive() DoubleTrouble + ReadFirstNumber() float64 +} + +// Struct proxy +type GiveMeStructs struct { + StructLiteral jsii.Any +} + +func (g GiveMeStructs) GetStructLiteral() jsii.Any { + return g.StructLiteral +} + + +func NewGiveMeStructs() GiveMeStructsIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "GiveMeStructs", + Method: "NewGiveMeStructs", + Parameters: []string{} + }) + + return &GiveMeStructs{ + // props + } +} + +func (g GiveMeStructs) SetStructLiteral(val jsii.Any) { + g.StructLiteral = val +} + +func (g *GiveMeStructs) DerivedToFirst() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "GiveMeStructs", + Method: "DerivedToFirst", + Parameters: []string{"derived jsii-calc.DerivedStruct"} + }) + return nil +} + +func (g *GiveMeStructs) ReadDerivedNonPrimitive() DoubleTrouble { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "GiveMeStructs", + Method: "ReadDerivedNonPrimitive", + Parameters: []string{"derived jsii-calc.DerivedStruct"} + }) + return DoubleTrouble{} +} + +func (g *GiveMeStructs) ReadFirstNumber() float64 { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "GiveMeStructs", + Method: "ReadFirstNumber", + Parameters: []string{"first @scope/jsii-calc-lib.MyFirstStruct"} + }) + return 0.0 +} + +// Struct interface +type GreeteeIface interface { + GetName() string +} + +// Struct proxy +type Greetee struct { + Name string +} + +func (g Greetee) GetName() string { + return g.Name +} + + +type GreetingAugmenterIface interface { + BetterGreeting() string +} + +// Struct proxy +type GreetingAugmenter struct { +} + +func NewGreetingAugmenter() GreetingAugmenterIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "GreetingAugmenter", + Method: "NewGreetingAugmenter", + Parameters: []string{} + }) + + return &GreetingAugmenter{ + // props + } +} + +func (g *GreetingAugmenter) BetterGreeting() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "GreetingAugmenter", + Method: "BetterGreeting", + Parameters: []string{"friendly @scope/jsii-calc-lib.IFriendly"} + }) + return "NOOP_RETURN_STRING" +} + +// Behaviorial interface +type IAnonymousImplementationProvider interface { + ProvideAsClass() Implementation + ProvideAsInterface() IAnonymouslyImplementMe +} + +// Behaviorial interface +type IAnonymouslyImplementMe interface { + Verb() string + GetValue() float64 +} + +// Behaviorial interface +type IAnotherPublicInterface interface { + GetA() string +} + +// Behaviorial interface +type IBell interface { + Ring() +} + +// Behaviorial interface +type IBellRinger interface { + YourTurn() +} + +// Behaviorial interface +type IConcreteBellRinger interface { + YourTurn() +} + +// Behaviorial interface +type IDeprecatedInterface interface { + Method() + GetMutableProperty() float64 +} + +// Behaviorial interface +type IExperimentalInterface interface { + Method() + GetMutableProperty() float64 +} + +// Behaviorial interface +type IExtendsPrivateInterface interface { + GetMoreThings() []string + GetPrivate() string +} + +// Behaviorial interface +type IExternalInterface interface { + Method() + GetMutableProperty() float64 +} + +// Behaviorial interface +type IFriendlier interface { + @scope/jsii-calc-lib.IFriendly + Farewell() string + Goodbye() string +} + +// Behaviorial interface +type IFriendlyRandomGenerator interface { + jsii-calc.IRandomNumberGenerator + @scope/jsii-calc-lib.IFriendly +} + +// Behaviorial interface +type IInterfaceImplementedByAbstractClass interface { + GetPropFromInterface() string +} + +// Behaviorial interface +type IInterfaceThatShouldNotBeADataType interface { + jsii-calc.IInterfaceWithMethods + GetOtherValue() string +} + +// Behaviorial interface +type IInterfaceWithInternal interface { + Visible() +} + +// Behaviorial interface +type IInterfaceWithMethods interface { + DoThings() + GetValue() string +} + +// Behaviorial interface +type IInterfaceWithOptionalMethodArguments interface { + Hello() +} + +// Behaviorial interface +type IInterfaceWithProperties interface { + GetReadOnlyString() string + GetReadWriteString() string +} + +// Behaviorial interface +type IInterfaceWithPropertiesExtension interface { + jsii-calc.IInterfaceWithProperties + GetFoo() float64 +} + +// Behaviorial interface +type IJSII417Derived interface { + jsii-calc.IJSII417PublicBaseOfBase + Bar() + Baz() + GetProperty() string +} + +// Behaviorial interface +type IJSII417PublicBaseOfBase interface { + Foo() + GetHasRoot() bool +} + +// Behaviorial interface +type IJsii487External interface { +} + +// Behaviorial interface +type IJsii487External2 interface { +} + +// Behaviorial interface +type IJsii496 interface { +} + +// Behaviorial interface +type IMutableObjectLiteral interface { + GetValue() string +} + +// Behaviorial interface +type INonInternalInterface interface { + jsii-calc.IAnotherPublicInterface + GetB() string + GetC() string +} + +// Behaviorial interface +type IObjectWithProperty interface { + WasSet() bool + GetProperty() string +} + +// Behaviorial interface +type IOptionalMethod interface { + Optional() string +} + +// Behaviorial interface +type IPrivatelyImplemented interface { + GetSuccess() bool +} + +// Behaviorial interface +type IPublicInterface interface { + Bye() string +} + +// Behaviorial interface +type IPublicInterface2 interface { + Ciao() string +} + +// Behaviorial interface +type IRandomNumberGenerator interface { + Next() float64 +} + +// Behaviorial interface +type IReturnJsii976 interface { + GetFoo() float64 +} + +// Behaviorial interface +type IReturnsNumber interface { + ObtainNumber() jsii.Any + GetNumberProp() jsii.Any +} + +// Behaviorial interface +type IStableInterface interface { + Method() + GetMutableProperty() float64 +} + +// Behaviorial interface +type IStructReturningDelegate interface { + ReturnStruct() StructB +} + +type ImplementInternalInterfaceIface interface { + GetProp() string + SetProp() +} + +// Struct proxy +type ImplementInternalInterface struct { + Prop string +} + +func (i ImplementInternalInterface) GetProp() string { + return i.Prop +} + + +func NewImplementInternalInterface() ImplementInternalInterfaceIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ImplementInternalInterface", + Method: "NewImplementInternalInterface", + Parameters: []string{} + }) + + return &ImplementInternalInterface{ + // props + } +} + +func (i ImplementInternalInterface) SetProp(val string) { + i.Prop = val +} + +type ImplementationIface interface { + GetValue() float64 + SetValue() +} + +// Struct proxy +type Implementation struct { + Value float64 +} + +func (i Implementation) GetValue() float64 { + return i.Value +} + + +func NewImplementation() ImplementationIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Implementation", + Method: "NewImplementation", + Parameters: []string{} + }) + + return &Implementation{ + // props + } +} + +func (i Implementation) SetValue(val float64) { + i.Value = val +} + +type ImplementsInterfaceWithInternalIface interface { + Visible() jsii.Any +} + +// Struct proxy +type ImplementsInterfaceWithInternal struct { +} + +func NewImplementsInterfaceWithInternal() ImplementsInterfaceWithInternalIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ImplementsInterfaceWithInternal", + Method: "NewImplementsInterfaceWithInternal", + Parameters: []string{} + }) + + return &ImplementsInterfaceWithInternal{ + // props + } +} + +func (i *ImplementsInterfaceWithInternal) Visible() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ImplementsInterfaceWithInternal", + Method: "Visible", + Parameters: []string{} + }) + return nil +} + +type ImplementsInterfaceWithInternalSubclassIface interface { +} + +// Struct proxy +type ImplementsInterfaceWithInternalSubclass struct { +} + +func NewImplementsInterfaceWithInternalSubclass() ImplementsInterfaceWithInternalSubclassIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ImplementsInterfaceWithInternalSubclass", + Method: "NewImplementsInterfaceWithInternalSubclass", + Parameters: []string{} + }) + + return &ImplementsInterfaceWithInternalSubclass{ + // props + } +} + +type ImplementsPrivateInterfaceIface interface { + GetPrivate() string + SetPrivate() +} + +// Struct proxy +type ImplementsPrivateInterface struct { + Private string +} + +func (i ImplementsPrivateInterface) GetPrivate() string { + return i.Private +} + + +func NewImplementsPrivateInterface() ImplementsPrivateInterfaceIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ImplementsPrivateInterface", + Method: "NewImplementsPrivateInterface", + Parameters: []string{} + }) + + return &ImplementsPrivateInterface{ + // props + } +} + +func (i ImplementsPrivateInterface) SetPrivate(val string) { + i.Private = val +} + +// Struct interface +type ImplictBaseOfBaseIface interface { + @scope/jsii-calc-base-of-base.VeryBaseProps + @scope/jsii-calc-base.BaseProps + GetFoo() jsii.Any + GetBar() string + GetGoo() string +} + +// Struct proxy +type ImplictBaseOfBase struct { + Foo jsii.Any + Bar string + Goo string +} + +func (i ImplictBaseOfBase) GetFoo() jsii.Any { + return i.Foo +} + +func (i ImplictBaseOfBase) GetBar() string { + return i.Bar +} + +func (i ImplictBaseOfBase) GetGoo() string { + return i.Goo +} + + +type InbetweenClassIface interface { + Ciao() string +} + +// Struct proxy +type InbetweenClass struct { +} + +func NewInbetweenClass() InbetweenClassIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "InbetweenClass", + Method: "NewInbetweenClass", + Parameters: []string{} + }) + + return &InbetweenClass{ + // props + } +} + +func (i *InbetweenClass) Ciao() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "InbetweenClass", + Method: "Ciao", + Parameters: []string{} + }) + return "NOOP_RETURN_STRING" +} + +type InterfaceCollectionsIface interface { + ListOfInterfaces() []IBell + ListOfStructs() []StructA + MapOfInterfaces() map[string]IBell + MapOfStructs() map[string]StructA +} + +// Struct proxy +type InterfaceCollections struct { +} + +func (i *InterfaceCollections) ListOfInterfaces() []IBell { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "InterfaceCollections", + Method: "ListOfInterfaces", + Parameters: []string{} + }) + return nil +} + +func (i *InterfaceCollections) ListOfStructs() []StructA { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "InterfaceCollections", + Method: "ListOfStructs", + Parameters: []string{} + }) + return nil +} + +func (i *InterfaceCollections) MapOfInterfaces() map[string]IBell { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "InterfaceCollections", + Method: "MapOfInterfaces", + Parameters: []string{} + }) + return nil +} + +func (i *InterfaceCollections) MapOfStructs() map[string]StructA { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "InterfaceCollections", + Method: "MapOfStructs", + Parameters: []string{} + }) + return nil +} + +type InterfacesMakerIface interface { + MakeInterfaces() []jsii.Any +} + +// Struct proxy +type InterfacesMaker struct { +} + +func (i *InterfacesMaker) MakeInterfaces() []jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "InterfacesMaker", + Method: "MakeInterfaces", + Parameters: []string{"count number"} + }) + return nil +} + +type IsomorphismIface interface { + Myself() Isomorphism +} + +// Struct proxy +type Isomorphism struct { +} + +func NewIsomorphism() IsomorphismIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Isomorphism", + Method: "NewIsomorphism", + Parameters: []string{} + }) + + return &Isomorphism{ + // props + } +} + +func (i *Isomorphism) Myself() Isomorphism { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Isomorphism", + Method: "Myself", + Parameters: []string{} + }) + return Isomorphism{} +} + +type JSII417DerivedIface interface { + GetHasRoot() bool + SetHasRoot() + GetProperty() string + Bar() jsii.Any + Baz() jsii.Any +} + +// Struct proxy +type JSII417Derived struct { + HasRoot bool + Property string +} + +func (j JSII417Derived) GetHasRoot() bool { + return j.HasRoot +} + +func (j JSII417Derived) GetProperty() string { + return j.Property +} + + +func NewJSII417Derived(property string) JSII417DerivedIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JSII417Derived", + Method: "NewJSII417Derived", + Parameters: []string{property string} + }) + + return &JSII417Derived{ + // props + } +} + +func (j JSII417Derived) SetHasRoot(val bool) { + j.HasRoot = val +} + +func (j JSII417Derived) SetProperty(val string) { + j.Property = val +} + +func (j *JSII417Derived) Bar() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JSII417Derived", + Method: "Bar", + Parameters: []string{} + }) + return nil +} + +func (j *JSII417Derived) Baz() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JSII417Derived", + Method: "Baz", + Parameters: []string{} + }) + return nil +} + +type JSII417PublicBaseOfBaseIface interface { + GetHasRoot() bool + SetHasRoot() + MakeInstance() Jsii417PublicBaseOfBase + Foo() jsii.Any +} + +// Struct proxy +type JSII417PublicBaseOfBase struct { + HasRoot bool +} + +func (j JSII417PublicBaseOfBase) GetHasRoot() bool { + return j.HasRoot +} + + +func NewJSII417PublicBaseOfBase() JSII417PublicBaseOfBaseIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JSII417PublicBaseOfBase", + Method: "NewJSII417PublicBaseOfBase", + Parameters: []string{} + }) + + return &JSII417PublicBaseOfBase{ + // props + } +} + +func (j JSII417PublicBaseOfBase) SetHasRoot(val bool) { + j.HasRoot = val +} + +func (j *JSII417PublicBaseOfBase) MakeInstance() Jsii417PublicBaseOfBase { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JSII417PublicBaseOfBase", + Method: "MakeInstance", + Parameters: []string{} + }) + return Jsii417PublicBaseOfBase{} +} + +func (j *JSII417PublicBaseOfBase) Foo() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JSII417PublicBaseOfBase", + Method: "Foo", + Parameters: []string{} + }) + return nil +} + +type JSObjectLiteralForInterfaceIface interface { + GiveMeFriendly() jsii.Any + GiveMeFriendlyGenerator() IFriendlyRandomGenerator +} + +// Struct proxy +type JSObjectLiteralForInterface struct { +} + +func NewJSObjectLiteralForInterface() JSObjectLiteralForInterfaceIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JSObjectLiteralForInterface", + Method: "NewJSObjectLiteralForInterface", + Parameters: []string{} + }) + + return &JSObjectLiteralForInterface{ + // props + } +} + +func (j *JSObjectLiteralForInterface) GiveMeFriendly() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JSObjectLiteralForInterface", + Method: "GiveMeFriendly", + Parameters: []string{} + }) + return nil +} + +func (j *JSObjectLiteralForInterface) GiveMeFriendlyGenerator() IFriendlyRandomGenerator { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JSObjectLiteralForInterface", + Method: "GiveMeFriendlyGenerator", + Parameters: []string{} + }) + return nil +} + +type JSObjectLiteralToNativeIface interface { + ReturnLiteral() JsObjectLiteralToNativeClass +} + +// Struct proxy +type JSObjectLiteralToNative struct { +} + +func NewJSObjectLiteralToNative() JSObjectLiteralToNativeIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JSObjectLiteralToNative", + Method: "NewJSObjectLiteralToNative", + Parameters: []string{} + }) + + return &JSObjectLiteralToNative{ + // props + } +} + +func (j *JSObjectLiteralToNative) ReturnLiteral() JsObjectLiteralToNativeClass { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JSObjectLiteralToNative", + Method: "ReturnLiteral", + Parameters: []string{} + }) + return JsObjectLiteralToNativeClass{} +} + +type JSObjectLiteralToNativeClassIface interface { + GetPropA() string + SetPropA() + GetPropB() float64 + SetPropB() +} + +// Struct proxy +type JSObjectLiteralToNativeClass struct { + PropA string + PropB float64 +} + +func (j JSObjectLiteralToNativeClass) GetPropA() string { + return j.PropA +} + +func (j JSObjectLiteralToNativeClass) GetPropB() float64 { + return j.PropB +} + + +func NewJSObjectLiteralToNativeClass() JSObjectLiteralToNativeClassIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JSObjectLiteralToNativeClass", + Method: "NewJSObjectLiteralToNativeClass", + Parameters: []string{} + }) + + return &JSObjectLiteralToNativeClass{ + // props + } +} + +func (j JSObjectLiteralToNativeClass) SetPropA(val string) { + j.PropA = val +} + +func (j JSObjectLiteralToNativeClass) SetPropB(val float64) { + j.PropB = val +} + +type JavaReservedWordsIface interface { + GetWhile() string + SetWhile() + Abstract() jsii.Any + Assert() jsii.Any + Boolean() jsii.Any + Break() jsii.Any + Byte() jsii.Any + Case() jsii.Any + Catch() jsii.Any + Char() jsii.Any + Class() jsii.Any + Const() jsii.Any + Continue() jsii.Any + Default() jsii.Any + Do() jsii.Any + Double() jsii.Any + Else() jsii.Any + Enum() jsii.Any + Extends() jsii.Any + False() jsii.Any + Final() jsii.Any + Finally() jsii.Any + Float() jsii.Any + For() jsii.Any + Goto() jsii.Any + If() jsii.Any + Implements() jsii.Any + Import() jsii.Any + Instanceof() jsii.Any + Int() jsii.Any + Interface() jsii.Any + Long() jsii.Any + Native() jsii.Any + New() jsii.Any + Null() jsii.Any + Package() jsii.Any + Private() jsii.Any + Protected() jsii.Any + Public() jsii.Any + Return() jsii.Any + Short() jsii.Any + Static() jsii.Any + Strictfp() jsii.Any + Super() jsii.Any + Switch() jsii.Any + Synchronized() jsii.Any + This() jsii.Any + Throw() jsii.Any + Throws() jsii.Any + Transient() jsii.Any + True() jsii.Any + Try() jsii.Any + Void() jsii.Any + Volatile() jsii.Any +} + +// Struct proxy +type JavaReservedWords struct { + While string +} + +func (j JavaReservedWords) GetWhile() string { + return j.While +} + + +func NewJavaReservedWords() JavaReservedWordsIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "NewJavaReservedWords", + Parameters: []string{} + }) + + return &JavaReservedWords{ + // props + } +} + +func (j JavaReservedWords) SetWhile(val string) { + j.While = val +} + +func (j *JavaReservedWords) Abstract() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Abstract", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Assert() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Assert", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Boolean() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Boolean", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Break() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Break", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Byte() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Byte", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Case() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Case", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Catch() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Catch", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Char() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Char", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Class() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Class", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Const() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Const", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Continue() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Continue", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Default() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Default", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Do() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Do", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Double() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Double", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Else() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Else", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Enum() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Enum", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Extends() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Extends", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) False() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "False", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Final() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Final", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Finally() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Finally", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Float() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Float", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) For() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "For", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Goto() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Goto", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) If() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "If", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Implements() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Implements", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Import() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Import", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Instanceof() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Instanceof", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Int() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Int", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Interface() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Interface", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Long() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Long", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Native() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Native", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) New() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "New", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Null() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Null", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Package() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Package", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Private() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Private", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Protected() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Protected", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Public() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Public", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Return() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Return", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Short() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Short", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Static() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Static", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Strictfp() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Strictfp", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Super() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Super", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Switch() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Switch", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Synchronized() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Synchronized", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) This() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "This", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Throw() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Throw", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Throws() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Throws", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Transient() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Transient", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) True() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "True", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Try() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Try", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Void() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Void", + Parameters: []string{} + }) + return nil +} + +func (j *JavaReservedWords) Volatile() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JavaReservedWords", + Method: "Volatile", + Parameters: []string{} + }) + return nil +} + +type Jsii487DerivedIface interface { +} + +// Struct proxy +type Jsii487Derived struct { +} + +func NewJsii487Derived() Jsii487DerivedIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Jsii487Derived", + Method: "NewJsii487Derived", + Parameters: []string{} + }) + + return &Jsii487Derived{ + // props + } +} + +type Jsii496DerivedIface interface { +} + +// Struct proxy +type Jsii496Derived struct { +} + +func NewJsii496Derived() Jsii496DerivedIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Jsii496Derived", + Method: "NewJsii496Derived", + Parameters: []string{} + }) + + return &Jsii496Derived{ + // props + } +} + +type JsiiAgentIface interface { + GetValue() string + SetValue() +} + +// Struct proxy +type JsiiAgent struct { + Value string +} + +func (j JsiiAgent) GetValue() string { + return j.Value +} + + +func NewJsiiAgent() JsiiAgentIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JsiiAgent", + Method: "NewJsiiAgent", + Parameters: []string{} + }) + + return &JsiiAgent{ + // props + } +} + +func (j JsiiAgent) SetValue(val string) { + j.Value = val +} + +type JsonFormatterIface interface { + AnyArray() jsii.Any + AnyBooleanFalse() jsii.Any + AnyBooleanTrue() jsii.Any + AnyDate() jsii.Any + AnyEmptyString() jsii.Any + AnyFunction() jsii.Any + AnyHash() jsii.Any + AnyNull() jsii.Any + AnyNumber() jsii.Any + AnyRef() jsii.Any + AnyString() jsii.Any + AnyUndefined() jsii.Any + AnyZero() jsii.Any + Stringify() string +} + +// Struct proxy +type JsonFormatter struct { +} + +func (j *JsonFormatter) AnyArray() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JsonFormatter", + Method: "AnyArray", + Parameters: []string{} + }) + return nil +} + +func (j *JsonFormatter) AnyBooleanFalse() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JsonFormatter", + Method: "AnyBooleanFalse", + Parameters: []string{} + }) + return nil +} + +func (j *JsonFormatter) AnyBooleanTrue() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JsonFormatter", + Method: "AnyBooleanTrue", + Parameters: []string{} + }) + return nil +} + +func (j *JsonFormatter) AnyDate() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JsonFormatter", + Method: "AnyDate", + Parameters: []string{} + }) + return nil +} + +func (j *JsonFormatter) AnyEmptyString() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JsonFormatter", + Method: "AnyEmptyString", + Parameters: []string{} + }) + return nil +} + +func (j *JsonFormatter) AnyFunction() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JsonFormatter", + Method: "AnyFunction", + Parameters: []string{} + }) + return nil +} + +func (j *JsonFormatter) AnyHash() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JsonFormatter", + Method: "AnyHash", + Parameters: []string{} + }) + return nil +} + +func (j *JsonFormatter) AnyNull() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JsonFormatter", + Method: "AnyNull", + Parameters: []string{} + }) + return nil +} + +func (j *JsonFormatter) AnyNumber() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JsonFormatter", + Method: "AnyNumber", + Parameters: []string{} + }) + return nil +} + +func (j *JsonFormatter) AnyRef() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JsonFormatter", + Method: "AnyRef", + Parameters: []string{} + }) + return nil +} + +func (j *JsonFormatter) AnyString() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JsonFormatter", + Method: "AnyString", + Parameters: []string{} + }) + return nil +} + +func (j *JsonFormatter) AnyUndefined() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JsonFormatter", + Method: "AnyUndefined", + Parameters: []string{} + }) + return nil +} + +func (j *JsonFormatter) AnyZero() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JsonFormatter", + Method: "AnyZero", + Parameters: []string{} + }) + return nil +} + +func (j *JsonFormatter) Stringify() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "JsonFormatter", + Method: "Stringify", + Parameters: []string{"value any"} + }) + return "NOOP_RETURN_STRING" +} + +// Struct interface +type LoadBalancedFargateServicePropsIface interface { + GetContainerPort() float64 + GetCpu() string + GetMemoryMiB() string + GetPublicLoadBalancer() bool + GetPublicTasks() bool +} + +// Struct proxy +type LoadBalancedFargateServiceProps struct { + ContainerPort float64 + Cpu string + MemoryMiB string + PublicLoadBalancer bool + PublicTasks bool +} + +func (l LoadBalancedFargateServiceProps) GetContainerPort() float64 { + return l.ContainerPort +} + +func (l LoadBalancedFargateServiceProps) GetCpu() string { + return l.Cpu +} + +func (l LoadBalancedFargateServiceProps) GetMemoryMiB() string { + return l.MemoryMiB +} + +func (l LoadBalancedFargateServiceProps) GetPublicLoadBalancer() bool { + return l.PublicLoadBalancer +} + +func (l LoadBalancedFargateServiceProps) GetPublicTasks() bool { + return l.PublicTasks +} + + +type MethodNamedPropertyIface interface { + GetElite() float64 + SetElite() + Property() string +} + +// Struct proxy +type MethodNamedProperty struct { + Elite float64 +} + +func (m MethodNamedProperty) GetElite() float64 { + return m.Elite +} + + +func NewMethodNamedProperty() MethodNamedPropertyIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "MethodNamedProperty", + Method: "NewMethodNamedProperty", + Parameters: []string{} + }) + + return &MethodNamedProperty{ + // props + } +} + +func (m MethodNamedProperty) SetElite(val float64) { + m.Elite = val +} + +func (m *MethodNamedProperty) Property() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "MethodNamedProperty", + Method: "Property", + Parameters: []string{} + }) + return "NOOP_RETURN_STRING" +} + +type MultiplyIface interface { + GetValue() float64 + SetValue() + GetLhs() jsii.Any + SetLhs() + GetRhs() jsii.Any + SetRhs() + Farewell() string + Goodbye() string + Next() float64 + ToString() string +} + +// Struct proxy +type Multiply struct { + Value float64 + Lhs jsii.Any + Rhs jsii.Any +} + +func (m Multiply) GetValue() float64 { + return m.Value +} + +func (m Multiply) GetLhs() jsii.Any { + return m.Lhs +} + +func (m Multiply) GetRhs() jsii.Any { + return m.Rhs +} + + +// Creates a BinaryOperation. +func NewMultiply(lhs @scope/jsii-calc-lib.NumericValue, rhs @scope/jsii-calc-lib.NumericValue) MultiplyIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Multiply", + Method: "NewMultiply", + Parameters: []string{lhs @scope/jsii-calc-lib.NumericValue, rhs @scope/jsii-calc-lib.NumericValue} + }) + + return &Multiply{ + // props + } +} + +func (m Multiply) SetValue(val float64) { + m.Value = val +} + +func (m Multiply) SetLhs(val jsii.Any) { + m.Lhs = val +} + +func (m Multiply) SetRhs(val jsii.Any) { + m.Rhs = val +} + +func (m *Multiply) Farewell() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Multiply", + Method: "Farewell", + Parameters: []string{} + }) + return "NOOP_RETURN_STRING" +} + +func (m *Multiply) Goodbye() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Multiply", + Method: "Goodbye", + Parameters: []string{} + }) + return "NOOP_RETURN_STRING" +} + +func (m *Multiply) Next() float64 { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Multiply", + Method: "Next", + Parameters: []string{} + }) + return 0.0 +} + +func (m *Multiply) ToString() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Multiply", + Method: "ToString", + Parameters: []string{} + }) + return "NOOP_RETURN_STRING" +} + +type NegateIface interface { + GetValue() float64 + SetValue() + GetOperand() jsii.Any + SetOperand() + Farewell() string + Goodbye() string + Hello() string + ToString() string +} + +// Struct proxy +type Negate struct { + Value float64 + Operand jsii.Any +} + +func (n Negate) GetValue() float64 { + return n.Value +} + +func (n Negate) GetOperand() jsii.Any { + return n.Operand +} + + +func NewNegate(operand @scope/jsii-calc-lib.NumericValue) NegateIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Negate", + Method: "NewNegate", + Parameters: []string{operand @scope/jsii-calc-lib.NumericValue} + }) + + return &Negate{ + // props + } +} + +func (n Negate) SetValue(val float64) { + n.Value = val +} + +func (n Negate) SetOperand(val jsii.Any) { + n.Operand = val +} + +func (n *Negate) Farewell() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Negate", + Method: "Farewell", + Parameters: []string{} + }) + return "NOOP_RETURN_STRING" +} + +func (n *Negate) Goodbye() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Negate", + Method: "Goodbye", + Parameters: []string{} + }) + return "NOOP_RETURN_STRING" +} + +func (n *Negate) Hello() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Negate", + Method: "Hello", + Parameters: []string{} + }) + return "NOOP_RETURN_STRING" +} + +func (n *Negate) ToString() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Negate", + Method: "ToString", + Parameters: []string{} + }) + return "NOOP_RETURN_STRING" +} + +type NestedClassInstanceIface interface { + MakeInstance() jsii.Any +} + +// Struct proxy +type NestedClassInstance struct { +} + +func (n *NestedClassInstance) MakeInstance() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "NestedClassInstance", + Method: "MakeInstance", + Parameters: []string{} + }) + return nil +} + +// Struct interface +type NestedStructIface interface { + GetNumberProp() float64 +} + +// Struct proxy +type NestedStruct struct { + NumberProp float64 +} + +func (n NestedStruct) GetNumberProp() float64 { + return n.NumberProp +} + + +type NodeStandardLibraryIface interface { + GetOsPlatform() string + SetOsPlatform() + CryptoSha256() string + FsReadFile() string + FsReadFileSync() string +} + +// Struct proxy +type NodeStandardLibrary struct { + OsPlatform string +} + +func (n NodeStandardLibrary) GetOsPlatform() string { + return n.OsPlatform +} + + +func NewNodeStandardLibrary() NodeStandardLibraryIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "NodeStandardLibrary", + Method: "NewNodeStandardLibrary", + Parameters: []string{} + }) + + return &NodeStandardLibrary{ + // props + } +} + +func (n NodeStandardLibrary) SetOsPlatform(val string) { + n.OsPlatform = val +} + +func (n *NodeStandardLibrary) CryptoSha256() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "NodeStandardLibrary", + Method: "CryptoSha256", + Parameters: []string{} + }) + return "NOOP_RETURN_STRING" +} + +func (n *NodeStandardLibrary) FsReadFile() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "NodeStandardLibrary", + Method: "FsReadFile", + Parameters: []string{} + }) + return "NOOP_RETURN_STRING" +} + +func (n *NodeStandardLibrary) FsReadFileSync() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "NodeStandardLibrary", + Method: "FsReadFileSync", + Parameters: []string{} + }) + return "NOOP_RETURN_STRING" +} + +type NullShouldBeTreatedAsUndefinedIface interface { + GetChangeMeToUndefined() string + SetChangeMeToUndefined() + GiveMeUndefined() jsii.Any + GiveMeUndefinedInsideAnObject() jsii.Any + VerifyPropertyIsUndefined() jsii.Any +} + +// Struct proxy +type NullShouldBeTreatedAsUndefined struct { + ChangeMeToUndefined string +} + +func (n NullShouldBeTreatedAsUndefined) GetChangeMeToUndefined() string { + return n.ChangeMeToUndefined +} + + +func NewNullShouldBeTreatedAsUndefined(_param1 string, optional any) NullShouldBeTreatedAsUndefinedIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "NullShouldBeTreatedAsUndefined", + Method: "NewNullShouldBeTreatedAsUndefined", + Parameters: []string{_param1 string, optional any} + }) + + return &NullShouldBeTreatedAsUndefined{ + // props + } +} + +func (n NullShouldBeTreatedAsUndefined) SetChangeMeToUndefined(val string) { + n.ChangeMeToUndefined = val +} + +func (n *NullShouldBeTreatedAsUndefined) GiveMeUndefined() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "NullShouldBeTreatedAsUndefined", + Method: "GiveMeUndefined", + Parameters: []string{"value any"} + }) + return nil +} + +func (n *NullShouldBeTreatedAsUndefined) GiveMeUndefinedInsideAnObject() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "NullShouldBeTreatedAsUndefined", + Method: "GiveMeUndefinedInsideAnObject", + Parameters: []string{"input jsii-calc.NullShouldBeTreatedAsUndefinedData"} + }) + return nil +} + +func (n *NullShouldBeTreatedAsUndefined) VerifyPropertyIsUndefined() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "NullShouldBeTreatedAsUndefined", + Method: "VerifyPropertyIsUndefined", + Parameters: []string{} + }) + return nil +} + +// Struct interface +type NullShouldBeTreatedAsUndefinedDataIface interface { + GetArrayWithThreeElementsAndUndefinedAsSecondArgument() []jsii.Any + GetThisShouldBeUndefined() jsii.Any +} + +// Struct proxy +type NullShouldBeTreatedAsUndefinedData struct { + ArrayWithThreeElementsAndUndefinedAsSecondArgument []jsii.Any + ThisShouldBeUndefined jsii.Any +} + +func (n NullShouldBeTreatedAsUndefinedData) GetArrayWithThreeElementsAndUndefinedAsSecondArgument() []jsii.Any { + return n.ArrayWithThreeElementsAndUndefinedAsSecondArgument +} + +func (n NullShouldBeTreatedAsUndefinedData) GetThisShouldBeUndefined() jsii.Any { + return n.ThisShouldBeUndefined +} + + +type NumberGeneratorIface interface { + GetGenerator() IRandomNumberGenerator + SetGenerator() + IsSameGenerator() bool + NextTimes100() float64 +} + +// Struct proxy +type NumberGenerator struct { + Generator IRandomNumberGenerator +} + +func (n NumberGenerator) GetGenerator() IRandomNumberGenerator { + return n.Generator +} + + +func NewNumberGenerator(generator jsii-calc.IRandomNumberGenerator) NumberGeneratorIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "NumberGenerator", + Method: "NewNumberGenerator", + Parameters: []string{generator jsii-calc.IRandomNumberGenerator} + }) + + return &NumberGenerator{ + // props + } +} + +func (n NumberGenerator) SetGenerator(val IRandomNumberGenerator) { + n.Generator = val +} + +func (n *NumberGenerator) IsSameGenerator() bool { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "NumberGenerator", + Method: "IsSameGenerator", + Parameters: []string{"gen jsii-calc.IRandomNumberGenerator"} + }) + return true +} + +func (n *NumberGenerator) NextTimes100() float64 { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "NumberGenerator", + Method: "NextTimes100", + Parameters: []string{} + }) + return 0.0 +} + +type ObjectRefsInCollectionsIface interface { + SumFromArray() float64 + SumFromMap() float64 +} + +// Struct proxy +type ObjectRefsInCollections struct { +} + +func NewObjectRefsInCollections() ObjectRefsInCollectionsIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ObjectRefsInCollections", + Method: "NewObjectRefsInCollections", + Parameters: []string{} + }) + + return &ObjectRefsInCollections{ + // props + } +} + +func (o *ObjectRefsInCollections) SumFromArray() float64 { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ObjectRefsInCollections", + Method: "SumFromArray", + Parameters: []string{"values Array<@scope/jsii-calc-lib.NumericValue>"} + }) + return 0.0 +} + +func (o *ObjectRefsInCollections) SumFromMap() float64 { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ObjectRefsInCollections", + Method: "SumFromMap", + Parameters: []string{"values Map @scope/jsii-calc-lib.NumericValue>"} + }) + return 0.0 +} + +type ObjectWithPropertyProviderIface interface { + Provide() IObjectWithProperty +} + +// Struct proxy +type ObjectWithPropertyProvider struct { +} + +func (o *ObjectWithPropertyProvider) Provide() IObjectWithProperty { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ObjectWithPropertyProvider", + Method: "Provide", + Parameters: []string{} + }) + return nil +} + +type OldIface interface { + DoAThing() jsii.Any +} + +// Struct proxy +type Old struct { +} + +func NewOld() OldIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Old", + Method: "NewOld", + Parameters: []string{} + }) + + return &Old{ + // props + } +} + +func (o *Old) DoAThing() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Old", + Method: "DoAThing", + Parameters: []string{} + }) + return nil +} + +type OptionalArgumentInvokerIface interface { + InvokeWithOptional() jsii.Any + InvokeWithoutOptional() jsii.Any +} + +// Struct proxy +type OptionalArgumentInvoker struct { +} + +func NewOptionalArgumentInvoker(delegate jsii-calc.IInterfaceWithOptionalMethodArguments) OptionalArgumentInvokerIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "OptionalArgumentInvoker", + Method: "NewOptionalArgumentInvoker", + Parameters: []string{delegate jsii-calc.IInterfaceWithOptionalMethodArguments} + }) + + return &OptionalArgumentInvoker{ + // props + } +} + +func (o *OptionalArgumentInvoker) InvokeWithOptional() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "OptionalArgumentInvoker", + Method: "InvokeWithOptional", + Parameters: []string{} + }) + return nil +} + +func (o *OptionalArgumentInvoker) InvokeWithoutOptional() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "OptionalArgumentInvoker", + Method: "InvokeWithoutOptional", + Parameters: []string{} + }) + return nil +} + +type OptionalConstructorArgumentIface interface { + GetArg1() float64 + SetArg1() + GetArg2() string + SetArg2() + GetArg3() string + SetArg3() +} + +// Struct proxy +type OptionalConstructorArgument struct { + Arg1 float64 + Arg2 string + Arg3 string +} + +func (o OptionalConstructorArgument) GetArg1() float64 { + return o.Arg1 +} + +func (o OptionalConstructorArgument) GetArg2() string { + return o.Arg2 +} + +func (o OptionalConstructorArgument) GetArg3() string { + return o.Arg3 +} + + +func NewOptionalConstructorArgument(arg1 number, arg2 string, arg3 date) OptionalConstructorArgumentIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "OptionalConstructorArgument", + Method: "NewOptionalConstructorArgument", + Parameters: []string{arg1 number, arg2 string, arg3 date} + }) + + return &OptionalConstructorArgument{ + // props + } +} + +func (o OptionalConstructorArgument) SetArg1(val float64) { + o.Arg1 = val +} + +func (o OptionalConstructorArgument) SetArg2(val string) { + o.Arg2 = val +} + +func (o OptionalConstructorArgument) SetArg3(val string) { + o.Arg3 = val +} + +// Struct interface +type OptionalStructIface interface { + GetField() string +} + +// Struct proxy +type OptionalStruct struct { + Field string +} + +func (o OptionalStruct) GetField() string { + return o.Field +} + + +type OptionalStructConsumerIface interface { + GetParameterWasUndefined() bool + SetParameterWasUndefined() + GetFieldValue() string + SetFieldValue() +} + +// Struct proxy +type OptionalStructConsumer struct { + ParameterWasUndefined bool + FieldValue string +} + +func (o OptionalStructConsumer) GetParameterWasUndefined() bool { + return o.ParameterWasUndefined +} + +func (o OptionalStructConsumer) GetFieldValue() string { + return o.FieldValue +} + + +func NewOptionalStructConsumer(optionalStruct jsii-calc.OptionalStruct) OptionalStructConsumerIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "OptionalStructConsumer", + Method: "NewOptionalStructConsumer", + Parameters: []string{optionalStruct jsii-calc.OptionalStruct} + }) + + return &OptionalStructConsumer{ + // props + } +} + +func (o OptionalStructConsumer) SetParameterWasUndefined(val bool) { + o.ParameterWasUndefined = val +} + +func (o OptionalStructConsumer) SetFieldValue(val string) { + o.FieldValue = val +} + +type OverridableProtectedMemberIface interface { + GetOverrideReadOnly() string + GetOverrideReadWrite() string + OverrideMe() string + SwitchModes() jsii.Any + ValueFromProtected() string +} + +// Struct proxy +type OverridableProtectedMember struct { + OverrideReadOnly string + OverrideReadWrite string +} + +func (o OverridableProtectedMember) GetOverrideReadOnly() string { + return o.OverrideReadOnly +} + +func (o OverridableProtectedMember) GetOverrideReadWrite() string { + return o.OverrideReadWrite +} + + +func NewOverridableProtectedMember() OverridableProtectedMemberIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "OverridableProtectedMember", + Method: "NewOverridableProtectedMember", + Parameters: []string{} + }) + + return &OverridableProtectedMember{ + // props + } +} + +func (o OverridableProtectedMember) SetOverrideReadOnly(val string) { + o.OverrideReadOnly = val +} + +func (o OverridableProtectedMember) SetOverrideReadWrite(val string) { + o.OverrideReadWrite = val +} + +func (o *OverridableProtectedMember) OverrideMe() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "OverridableProtectedMember", + Method: "OverrideMe", + Parameters: []string{} + }) + return "NOOP_RETURN_STRING" +} + +func (o *OverridableProtectedMember) SwitchModes() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "OverridableProtectedMember", + Method: "SwitchModes", + Parameters: []string{} + }) + return nil +} + +func (o *OverridableProtectedMember) ValueFromProtected() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "OverridableProtectedMember", + Method: "ValueFromProtected", + Parameters: []string{} + }) + return "NOOP_RETURN_STRING" +} + +type OverrideReturnsObjectIface interface { + Test() float64 +} + +// Struct proxy +type OverrideReturnsObject struct { +} + +func NewOverrideReturnsObject() OverrideReturnsObjectIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "OverrideReturnsObject", + Method: "NewOverrideReturnsObject", + Parameters: []string{} + }) + + return &OverrideReturnsObject{ + // props + } +} + +func (o *OverrideReturnsObject) Test() float64 { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "OverrideReturnsObject", + Method: "Test", + Parameters: []string{"obj jsii-calc.IReturnsNumber"} + }) + return 0.0 +} + +// Struct interface +type ParentStruct982Iface interface { + GetFoo() string +} + +// Struct proxy +type ParentStruct982 struct { + Foo string +} + +func (p ParentStruct982) GetFoo() string { + return p.Foo +} + + +type PartiallyInitializedThisConsumerIface interface { + ConsumePartiallyInitializedThis() string +} + +// Struct proxy +type PartiallyInitializedThisConsumer struct { +} + +func NewPartiallyInitializedThisConsumer() PartiallyInitializedThisConsumerIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PartiallyInitializedThisConsumer", + Method: "NewPartiallyInitializedThisConsumer", + Parameters: []string{} + }) + + return &PartiallyInitializedThisConsumer{ + // props + } +} + +func (p *PartiallyInitializedThisConsumer) ConsumePartiallyInitializedThis() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PartiallyInitializedThisConsumer", + Method: "ConsumePartiallyInitializedThis", + Parameters: []string{"obj jsii-calc.ConstructorPassesThisOut", "dt date", "ev jsii-calc.AllTypesEnum"} + }) + return "NOOP_RETURN_STRING" +} + +type PolymorphismIface interface { + SayHello() string +} + +// Struct proxy +type Polymorphism struct { +} + +func NewPolymorphism() PolymorphismIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Polymorphism", + Method: "NewPolymorphism", + Parameters: []string{} + }) + + return &Polymorphism{ + // props + } +} + +func (p *Polymorphism) SayHello() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Polymorphism", + Method: "SayHello", + Parameters: []string{"friendly @scope/jsii-calc-lib.IFriendly"} + }) + return "NOOP_RETURN_STRING" +} + +type PowerIface interface { + GetValue() float64 + SetValue() + GetExpression() jsii.Any + SetExpression() + GetDecorationPostfixes() []string + SetDecorationPostfixes() + GetDecorationPrefixes() []string + SetDecorationPrefixes() + GetStringStyle() composition.CompositionStringStyle + SetStringStyle() + GetBase() jsii.Any + SetBase() + GetPow() jsii.Any + SetPow() +} + +// Struct proxy +type Power struct { + Value float64 + Expression jsii.Any + DecorationPostfixes []string + DecorationPrefixes []string + StringStyle composition.CompositionStringStyle + Base jsii.Any + Pow jsii.Any +} + +func (p Power) GetValue() float64 { + return p.Value +} + +func (p Power) GetExpression() jsii.Any { + return p.Expression +} + +func (p Power) GetDecorationPostfixes() []string { + return p.DecorationPostfixes +} + +func (p Power) GetDecorationPrefixes() []string { + return p.DecorationPrefixes +} + +func (p Power) GetStringStyle() composition.CompositionStringStyle { + return p.StringStyle +} + +func (p Power) GetBase() jsii.Any { + return p.Base +} + +func (p Power) GetPow() jsii.Any { + return p.Pow +} + + +// Creates a Power operation. +func NewPower(base @scope/jsii-calc-lib.NumericValue, pow @scope/jsii-calc-lib.NumericValue) PowerIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Power", + Method: "NewPower", + Parameters: []string{base @scope/jsii-calc-lib.NumericValue, pow @scope/jsii-calc-lib.NumericValue} + }) + + return &Power{ + // props + } +} + +func (p Power) SetValue(val float64) { + p.Value = val +} + +func (p Power) SetExpression(val jsii.Any) { + p.Expression = val +} + +func (p Power) SetDecorationPostfixes(val []string) { + p.DecorationPostfixes = val +} + +func (p Power) SetDecorationPrefixes(val []string) { + p.DecorationPrefixes = val +} + +func (p Power) SetStringStyle(val composition.CompositionStringStyle) { + p.StringStyle = val +} + +func (p Power) SetBase(val jsii.Any) { + p.Base = val +} + +func (p Power) SetPow(val jsii.Any) { + p.Pow = val +} + +type PropertyNamedPropertyIface interface { + GetProperty() string + SetProperty() + GetYetAnoterOne() bool + SetYetAnoterOne() +} + +// Struct proxy +type PropertyNamedProperty struct { + Property string + YetAnoterOne bool +} + +func (p PropertyNamedProperty) GetProperty() string { + return p.Property +} + +func (p PropertyNamedProperty) GetYetAnoterOne() bool { + return p.YetAnoterOne +} + + +func NewPropertyNamedProperty() PropertyNamedPropertyIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PropertyNamedProperty", + Method: "NewPropertyNamedProperty", + Parameters: []string{} + }) + + return &PropertyNamedProperty{ + // props + } +} + +func (p PropertyNamedProperty) SetProperty(val string) { + p.Property = val +} + +func (p PropertyNamedProperty) SetYetAnoterOne(val bool) { + p.YetAnoterOne = val +} + +type PublicClassIface interface { + Hello() jsii.Any +} + +// Struct proxy +type PublicClass struct { +} + +func NewPublicClass() PublicClassIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PublicClass", + Method: "NewPublicClass", + Parameters: []string{} + }) + + return &PublicClass{ + // props + } +} + +func (p *PublicClass) Hello() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PublicClass", + Method: "Hello", + Parameters: []string{} + }) + return nil +} + +type PythonReservedWordsIface interface { + And() jsii.Any + As() jsii.Any + Assert() jsii.Any + Async() jsii.Any + Await() jsii.Any + Break() jsii.Any + Class() jsii.Any + Continue() jsii.Any + Def() jsii.Any + Del() jsii.Any + Elif() jsii.Any + Else() jsii.Any + Except() jsii.Any + Finally() jsii.Any + For() jsii.Any + From() jsii.Any + Global() jsii.Any + If() jsii.Any + Import() jsii.Any + In() jsii.Any + Is() jsii.Any + Lambda() jsii.Any + Nonlocal() jsii.Any + Not() jsii.Any + Or() jsii.Any + Pass() jsii.Any + Raise() jsii.Any + Return() jsii.Any + Try() jsii.Any + While() jsii.Any + With() jsii.Any + Yield() jsii.Any +} + +// Struct proxy +type PythonReservedWords struct { +} + +func NewPythonReservedWords() PythonReservedWordsIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PythonReservedWords", + Method: "NewPythonReservedWords", + Parameters: []string{} + }) + + return &PythonReservedWords{ + // props + } +} + +func (p *PythonReservedWords) And() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PythonReservedWords", + Method: "And", + Parameters: []string{} + }) + return nil +} + +func (p *PythonReservedWords) As() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PythonReservedWords", + Method: "As", + Parameters: []string{} + }) + return nil +} + +func (p *PythonReservedWords) Assert() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PythonReservedWords", + Method: "Assert", + Parameters: []string{} + }) + return nil +} + +func (p *PythonReservedWords) Async() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PythonReservedWords", + Method: "Async", + Parameters: []string{} + }) + return nil +} + +func (p *PythonReservedWords) Await() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PythonReservedWords", + Method: "Await", + Parameters: []string{} + }) + return nil +} + +func (p *PythonReservedWords) Break() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PythonReservedWords", + Method: "Break", + Parameters: []string{} + }) + return nil +} + +func (p *PythonReservedWords) Class() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PythonReservedWords", + Method: "Class", + Parameters: []string{} + }) + return nil +} + +func (p *PythonReservedWords) Continue() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PythonReservedWords", + Method: "Continue", + Parameters: []string{} + }) + return nil +} + +func (p *PythonReservedWords) Def() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PythonReservedWords", + Method: "Def", + Parameters: []string{} + }) + return nil +} + +func (p *PythonReservedWords) Del() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PythonReservedWords", + Method: "Del", + Parameters: []string{} + }) + return nil +} + +func (p *PythonReservedWords) Elif() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PythonReservedWords", + Method: "Elif", + Parameters: []string{} + }) + return nil +} + +func (p *PythonReservedWords) Else() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PythonReservedWords", + Method: "Else", + Parameters: []string{} + }) + return nil +} + +func (p *PythonReservedWords) Except() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PythonReservedWords", + Method: "Except", + Parameters: []string{} + }) + return nil +} + +func (p *PythonReservedWords) Finally() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PythonReservedWords", + Method: "Finally", + Parameters: []string{} + }) + return nil +} + +func (p *PythonReservedWords) For() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PythonReservedWords", + Method: "For", + Parameters: []string{} + }) + return nil +} + +func (p *PythonReservedWords) From() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PythonReservedWords", + Method: "From", + Parameters: []string{} + }) + return nil +} + +func (p *PythonReservedWords) Global() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PythonReservedWords", + Method: "Global", + Parameters: []string{} + }) + return nil +} + +func (p *PythonReservedWords) If() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PythonReservedWords", + Method: "If", + Parameters: []string{} + }) + return nil +} + +func (p *PythonReservedWords) Import() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PythonReservedWords", + Method: "Import", + Parameters: []string{} + }) + return nil +} + +func (p *PythonReservedWords) In() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PythonReservedWords", + Method: "In", + Parameters: []string{} + }) + return nil +} + +func (p *PythonReservedWords) Is() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PythonReservedWords", + Method: "Is", + Parameters: []string{} + }) + return nil +} + +func (p *PythonReservedWords) Lambda() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PythonReservedWords", + Method: "Lambda", + Parameters: []string{} + }) + return nil +} + +func (p *PythonReservedWords) Nonlocal() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PythonReservedWords", + Method: "Nonlocal", + Parameters: []string{} + }) + return nil +} + +func (p *PythonReservedWords) Not() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PythonReservedWords", + Method: "Not", + Parameters: []string{} + }) + return nil +} + +func (p *PythonReservedWords) Or() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PythonReservedWords", + Method: "Or", + Parameters: []string{} + }) + return nil +} + +func (p *PythonReservedWords) Pass() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PythonReservedWords", + Method: "Pass", + Parameters: []string{} + }) + return nil +} + +func (p *PythonReservedWords) Raise() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PythonReservedWords", + Method: "Raise", + Parameters: []string{} + }) + return nil +} + +func (p *PythonReservedWords) Return() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PythonReservedWords", + Method: "Return", + Parameters: []string{} + }) + return nil +} + +func (p *PythonReservedWords) Try() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PythonReservedWords", + Method: "Try", + Parameters: []string{} + }) + return nil +} + +func (p *PythonReservedWords) While() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PythonReservedWords", + Method: "While", + Parameters: []string{} + }) + return nil +} + +func (p *PythonReservedWords) With() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PythonReservedWords", + Method: "With", + Parameters: []string{} + }) + return nil +} + +func (p *PythonReservedWords) Yield() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "PythonReservedWords", + Method: "Yield", + Parameters: []string{} + }) + return nil +} + +type ReferenceEnumFromScopedPackageIface interface { + GetFoo() jsii.Any + SetFoo() + LoadFoo() jsii.Any + SaveFoo() jsii.Any +} + +// Struct proxy +type ReferenceEnumFromScopedPackage struct { + Foo jsii.Any +} + +func (r ReferenceEnumFromScopedPackage) GetFoo() jsii.Any { + return r.Foo +} + + +func NewReferenceEnumFromScopedPackage() ReferenceEnumFromScopedPackageIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ReferenceEnumFromScopedPackage", + Method: "NewReferenceEnumFromScopedPackage", + Parameters: []string{} + }) + + return &ReferenceEnumFromScopedPackage{ + // props + } +} + +func (r ReferenceEnumFromScopedPackage) SetFoo(val jsii.Any) { + r.Foo = val +} + +func (r *ReferenceEnumFromScopedPackage) LoadFoo() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ReferenceEnumFromScopedPackage", + Method: "LoadFoo", + Parameters: []string{} + }) + return nil +} + +func (r *ReferenceEnumFromScopedPackage) SaveFoo() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ReferenceEnumFromScopedPackage", + Method: "SaveFoo", + Parameters: []string{"value @scope/jsii-calc-lib.EnumFromScopedModule"} + }) + return nil +} + +type ReturnsPrivateImplementationOfInterfaceIface interface { + GetPrivateImplementation() IPrivatelyImplemented + SetPrivateImplementation() +} + +// Struct proxy +type ReturnsPrivateImplementationOfInterface struct { + PrivateImplementation IPrivatelyImplemented +} + +func (r ReturnsPrivateImplementationOfInterface) GetPrivateImplementation() IPrivatelyImplemented { + return r.PrivateImplementation +} + + +func NewReturnsPrivateImplementationOfInterface() ReturnsPrivateImplementationOfInterfaceIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ReturnsPrivateImplementationOfInterface", + Method: "NewReturnsPrivateImplementationOfInterface", + Parameters: []string{} + }) + + return &ReturnsPrivateImplementationOfInterface{ + // props + } +} + +func (r ReturnsPrivateImplementationOfInterface) SetPrivateImplementation(val IPrivatelyImplemented) { + r.PrivateImplementation = val +} + +// Struct interface +type RootStructIface interface { + GetStringProp() string + GetNestedStruct() NestedStruct +} + +// Struct proxy +type RootStruct struct { + StringProp string + NestedStruct NestedStruct +} + +func (r RootStruct) GetStringProp() string { + return r.StringProp +} + +func (r RootStruct) GetNestedStruct() NestedStruct { + return r.NestedStruct +} + + +type RootStructValidatorIface interface { + Validate() jsii.Any +} + +// Struct proxy +type RootStructValidator struct { +} + +func (r *RootStructValidator) Validate() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "RootStructValidator", + Method: "Validate", + Parameters: []string{"struct jsii-calc.RootStruct"} + }) + return nil +} + +type RuntimeTypeCheckingIface interface { + MethodWithDefaultedArguments() jsii.Any + MethodWithOptionalAnyArgument() jsii.Any + MethodWithOptionalArguments() jsii.Any +} + +// Struct proxy +type RuntimeTypeChecking struct { +} + +func NewRuntimeTypeChecking() RuntimeTypeCheckingIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "RuntimeTypeChecking", + Method: "NewRuntimeTypeChecking", + Parameters: []string{} + }) + + return &RuntimeTypeChecking{ + // props + } +} + +func (r *RuntimeTypeChecking) MethodWithDefaultedArguments() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "RuntimeTypeChecking", + Method: "MethodWithDefaultedArguments", + Parameters: []string{"arg1 number", "arg2 string", "arg3 date"} + }) + return nil +} + +func (r *RuntimeTypeChecking) MethodWithOptionalAnyArgument() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "RuntimeTypeChecking", + Method: "MethodWithOptionalAnyArgument", + Parameters: []string{"arg any"} + }) + return nil +} + +func (r *RuntimeTypeChecking) MethodWithOptionalArguments() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "RuntimeTypeChecking", + Method: "MethodWithOptionalArguments", + Parameters: []string{"arg1 number", "arg2 string", "arg3 date"} + }) + return nil +} + +// Struct interface +type SecondLevelStructIface interface { + GetDeeperRequiredProp() string + GetDeeperOptionalProp() string +} + +// Struct proxy +type SecondLevelStruct struct { + DeeperRequiredProp string + DeeperOptionalProp string +} + +func (s SecondLevelStruct) GetDeeperRequiredProp() string { + return s.DeeperRequiredProp +} + +func (s SecondLevelStruct) GetDeeperOptionalProp() string { + return s.DeeperOptionalProp +} + + +type SingleInstanceTwoTypesIface interface { + Interface1() InbetweenClass + Interface2() IPublicInterface +} + +// Struct proxy +type SingleInstanceTwoTypes struct { +} + +func NewSingleInstanceTwoTypes() SingleInstanceTwoTypesIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "SingleInstanceTwoTypes", + Method: "NewSingleInstanceTwoTypes", + Parameters: []string{} + }) + + return &SingleInstanceTwoTypes{ + // props + } +} + +func (s *SingleInstanceTwoTypes) Interface1() InbetweenClass { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "SingleInstanceTwoTypes", + Method: "Interface1", + Parameters: []string{} + }) + return InbetweenClass{} +} + +func (s *SingleInstanceTwoTypes) Interface2() IPublicInterface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "SingleInstanceTwoTypes", + Method: "Interface2", + Parameters: []string{} + }) + return nil +} + +type SingletonIntIface interface { + IsSingletonInt() bool +} + +// Struct proxy +type SingletonInt struct { +} + +func (s *SingletonInt) IsSingletonInt() bool { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "SingletonInt", + Method: "IsSingletonInt", + Parameters: []string{"value number"} + }) + return true +} + +type SingletonIntEnum string + +const ( + SingletonIntEnumSingletonInt SingletonIntEnum = "SINGLETON_INT" +) + +type SingletonStringIface interface { + IsSingletonString() bool +} + +// Struct proxy +type SingletonString struct { +} + +func (s *SingletonString) IsSingletonString() bool { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "SingletonString", + Method: "IsSingletonString", + Parameters: []string{"value string"} + }) + return true +} + +type SingletonStringEnum string + +const ( + SingletonStringEnumSingletonString SingletonStringEnum = "SINGLETON_STRING" +) + +// Struct interface +type SmellyStructIface interface { + GetProperty() string + GetYetAnoterOne() bool +} + +// Struct proxy +type SmellyStruct struct { + Property string + YetAnoterOne bool +} + +func (s SmellyStruct) GetProperty() string { + return s.Property +} + +func (s SmellyStruct) GetYetAnoterOne() bool { + return s.YetAnoterOne +} + + +type SomeTypeJsii976Iface interface { + ReturnAnonymous() jsii.Any + ReturnReturn() IReturnJsii976 +} + +// Struct proxy +type SomeTypeJsii976 struct { +} + +func NewSomeTypeJsii976() SomeTypeJsii976Iface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "SomeTypeJsii976", + Method: "NewSomeTypeJsii976", + Parameters: []string{} + }) + + return &SomeTypeJsii976{ + // props + } +} + +func (s *SomeTypeJsii976) ReturnAnonymous() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "SomeTypeJsii976", + Method: "ReturnAnonymous", + Parameters: []string{} + }) + return nil +} + +func (s *SomeTypeJsii976) ReturnReturn() IReturnJsii976 { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "SomeTypeJsii976", + Method: "ReturnReturn", + Parameters: []string{} + }) + return nil +} + +type StableClassIface interface { + GetReadonlyProperty() string + SetReadonlyProperty() + GetMutableProperty() float64 + SetMutableProperty() + Method() jsii.Any +} + +// Struct proxy +type StableClass struct { + ReadonlyProperty string + MutableProperty float64 +} + +func (s StableClass) GetReadonlyProperty() string { + return s.ReadonlyProperty +} + +func (s StableClass) GetMutableProperty() float64 { + return s.MutableProperty +} + + +func NewStableClass(readonlyString string, mutableNumber number) StableClassIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "StableClass", + Method: "NewStableClass", + Parameters: []string{readonlyString string, mutableNumber number} + }) + + return &StableClass{ + // props + } +} + +func (s StableClass) SetReadonlyProperty(val string) { + s.ReadonlyProperty = val +} + +func (s StableClass) SetMutableProperty(val float64) { + s.MutableProperty = val +} + +func (s *StableClass) Method() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "StableClass", + Method: "Method", + Parameters: []string{} + }) + return nil +} + +type StableEnum string + +const ( + StableEnumOptionA StableEnum = "OPTION_A" + StableEnumOptionB StableEnum = "OPTION_B" +) + +// Struct interface +type StableStructIface interface { + GetReadonlyProperty() string +} + +// Struct proxy +type StableStruct struct { + ReadonlyProperty string +} + +func (s StableStruct) GetReadonlyProperty() string { + return s.ReadonlyProperty +} + + +type StaticContextIface interface { + GetStaticVariable() bool + SetStaticVariable() + CanAccessStaticContext() bool +} + +// Struct proxy +type StaticContext struct { + StaticVariable bool +} + +func (s StaticContext) GetStaticVariable() bool { + return s.StaticVariable +} + + +func (s StaticContext) SetStaticVariable(val bool) { + s.StaticVariable = val +} + +func (s *StaticContext) CanAccessStaticContext() bool { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "StaticContext", + Method: "CanAccessStaticContext", + Parameters: []string{} + }) + return true +} + +type StaticsIface interface { + GetBar() float64 + SetBar() + GetConstObj() DoubleTrouble + SetConstObj() + GetFoo() string + SetFoo() + GetZooBar() map[string]string + SetZooBar() + GetInstance() Statics + SetInstance() + GetNonConstStatic() float64 + SetNonConstStatic() + GetValue() string + SetValue() + StaticMethod() string + JustMethod() string +} + +// Struct proxy +type Statics struct { + Bar float64 + ConstObj DoubleTrouble + Foo string + ZooBar map[string]string + Instance *Statics + NonConstStatic float64 + Value string +} + +func (s Statics) GetBar() float64 { + return s.Bar +} + +func (s Statics) GetConstObj() DoubleTrouble { + return s.ConstObj +} + +func (s Statics) GetFoo() string { + return s.Foo +} + +func (s Statics) GetZooBar() map[string]string { + return s.ZooBar +} + +func (s Statics) GetInstance() Statics { + return s.Instance +} + +func (s Statics) GetNonConstStatic() float64 { + return s.NonConstStatic +} + +func (s Statics) GetValue() string { + return s.Value +} + + +func NewStatics(value string) StaticsIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Statics", + Method: "NewStatics", + Parameters: []string{value string} + }) + + return &Statics{ + // props + } +} + +func (s Statics) SetBar(val float64) { + s.Bar = val +} + +func (s Statics) SetConstObj(val DoubleTrouble) { + s.ConstObj = val +} + +func (s Statics) SetFoo(val string) { + s.Foo = val +} + +func (s Statics) SetZooBar(val map[string]string) { + s.ZooBar = val +} + +func (s Statics) SetInstance(val Statics) { + s.Instance = val +} + +func (s Statics) SetNonConstStatic(val float64) { + s.NonConstStatic = val +} + +func (s Statics) SetValue(val string) { + s.Value = val +} + +func (s *Statics) StaticMethod() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Statics", + Method: "StaticMethod", + Parameters: []string{"name string"} + }) + return "NOOP_RETURN_STRING" +} + +func (s *Statics) JustMethod() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Statics", + Method: "JustMethod", + Parameters: []string{} + }) + return "NOOP_RETURN_STRING" +} + +type StringEnum string + +const ( + StringEnumA StringEnum = "A" + StringEnumB StringEnum = "B" + StringEnumC StringEnum = "C" +) + +type StripInternalIface interface { + GetYouSeeMe() string + SetYouSeeMe() +} + +// Struct proxy +type StripInternal struct { + YouSeeMe string +} + +func (s StripInternal) GetYouSeeMe() string { + return s.YouSeeMe +} + + +func NewStripInternal() StripInternalIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "StripInternal", + Method: "NewStripInternal", + Parameters: []string{} + }) + + return &StripInternal{ + // props + } +} + +func (s StripInternal) SetYouSeeMe(val string) { + s.YouSeeMe = val +} + +// Struct interface +type StructAIface interface { + GetRequiredString() string + GetOptionalNumber() float64 + GetOptionalString() string +} + +// Struct proxy +type StructA struct { + RequiredString string + OptionalNumber float64 + OptionalString string +} + +func (s StructA) GetRequiredString() string { + return s.RequiredString +} + +func (s StructA) GetOptionalNumber() float64 { + return s.OptionalNumber +} + +func (s StructA) GetOptionalString() string { + return s.OptionalString +} + + +// Struct interface +type StructBIface interface { + GetRequiredString() string + GetOptionalBoolean() bool + GetOptionalStructA() StructA +} + +// Struct proxy +type StructB struct { + RequiredString string + OptionalBoolean bool + OptionalStructA StructA +} + +func (s StructB) GetRequiredString() string { + return s.RequiredString +} + +func (s StructB) GetOptionalBoolean() bool { + return s.OptionalBoolean +} + +func (s StructB) GetOptionalStructA() StructA { + return s.OptionalStructA +} + + +// Struct interface +type StructParameterTypeIface interface { + GetScope() string + GetProps() bool +} + +// Struct proxy +type StructParameterType struct { + Scope string + Props bool +} + +func (s StructParameterType) GetScope() string { + return s.Scope +} + +func (s StructParameterType) GetProps() bool { + return s.Props +} + + +type StructPassingIface interface { + HowManyVarArgsDidIPass() float64 + RoundTrip() TopLevelStruct +} + +// Struct proxy +type StructPassing struct { +} + +func NewStructPassing() StructPassingIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "StructPassing", + Method: "NewStructPassing", + Parameters: []string{} + }) + + return &StructPassing{ + // props + } +} + +func (s *StructPassing) HowManyVarArgsDidIPass() float64 { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "StructPassing", + Method: "HowManyVarArgsDidIPass", + Parameters: []string{"_positional number", "inputs jsii-calc.TopLevelStruct"} + }) + return 0.0 +} + +func (s *StructPassing) RoundTrip() TopLevelStruct { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "StructPassing", + Method: "RoundTrip", + Parameters: []string{"_positional number", "input jsii-calc.TopLevelStruct"} + }) + return nil +} + +type StructUnionConsumerIface interface { + IsStructA() bool + IsStructB() bool +} + +// Struct proxy +type StructUnionConsumer struct { +} + +func (s *StructUnionConsumer) IsStructA() bool { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "StructUnionConsumer", + Method: "IsStructA", + Parameters: []string{"struct jsii-calc.StructA | jsii-calc.StructB"} + }) + return true +} + +func (s *StructUnionConsumer) IsStructB() bool { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "StructUnionConsumer", + Method: "IsStructB", + Parameters: []string{"struct jsii-calc.StructA | jsii-calc.StructB"} + }) + return true +} + +// Struct interface +type StructWithJavaReservedWordsIface interface { + GetDefault() string + GetAssert() string + GetResult() string + GetThat() string +} + +// Struct proxy +type StructWithJavaReservedWords struct { + Default string + Assert string + Result string + That string +} + +func (s StructWithJavaReservedWords) GetDefault() string { + return s.Default +} + +func (s StructWithJavaReservedWords) GetAssert() string { + return s.Assert +} + +func (s StructWithJavaReservedWords) GetResult() string { + return s.Result +} + +func (s StructWithJavaReservedWords) GetThat() string { + return s.That +} + + +type SumIface interface { + GetValue() float64 + SetValue() + GetExpression() jsii.Any + SetExpression() + GetDecorationPostfixes() []string + SetDecorationPostfixes() + GetDecorationPrefixes() []string + SetDecorationPrefixes() + GetStringStyle() composition.CompositionStringStyle + SetStringStyle() + GetParts() []jsii.Any + SetParts() +} + +// Struct proxy +type Sum struct { + Value float64 + Expression jsii.Any + DecorationPostfixes []string + DecorationPrefixes []string + StringStyle composition.CompositionStringStyle + Parts []jsii.Any +} + +func (s Sum) GetValue() float64 { + return s.Value +} + +func (s Sum) GetExpression() jsii.Any { + return s.Expression +} + +func (s Sum) GetDecorationPostfixes() []string { + return s.DecorationPostfixes +} + +func (s Sum) GetDecorationPrefixes() []string { + return s.DecorationPrefixes +} + +func (s Sum) GetStringStyle() composition.CompositionStringStyle { + return s.StringStyle +} + +func (s Sum) GetParts() []jsii.Any { + return s.Parts +} + + +func NewSum() SumIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Sum", + Method: "NewSum", + Parameters: []string{} + }) + + return &Sum{ + // props + } +} + +func (s Sum) SetValue(val float64) { + s.Value = val +} + +func (s Sum) SetExpression(val jsii.Any) { + s.Expression = val +} + +func (s Sum) SetDecorationPostfixes(val []string) { + s.DecorationPostfixes = val +} + +func (s Sum) SetDecorationPrefixes(val []string) { + s.DecorationPrefixes = val +} + +func (s Sum) SetStringStyle(val composition.CompositionStringStyle) { + s.StringStyle = val +} + +func (s Sum) SetParts(val []jsii.Any) { + s.Parts = val +} + +type SupportsNiceJavaBuilderIface interface { + GetBar() float64 + SetBar() + GetId() float64 + SetId() + GetPropId() string + SetPropId() + GetRest() []string + SetRest() +} + +// Struct proxy +type SupportsNiceJavaBuilder struct { + Bar float64 + Id float64 + PropId string + Rest []string +} + +func (s SupportsNiceJavaBuilder) GetBar() float64 { + return s.Bar +} + +func (s SupportsNiceJavaBuilder) GetId() float64 { + return s.Id +} + +func (s SupportsNiceJavaBuilder) GetPropId() string { + return s.PropId +} + +func (s SupportsNiceJavaBuilder) GetRest() []string { + return s.Rest +} + + +func NewSupportsNiceJavaBuilder(id number, defaultBar number, props jsii-calc.SupportsNiceJavaBuilderProps, rest string) SupportsNiceJavaBuilderIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "SupportsNiceJavaBuilder", + Method: "NewSupportsNiceJavaBuilder", + Parameters: []string{id number, defaultBar number, props jsii-calc.SupportsNiceJavaBuilderProps, rest string} + }) + + return &SupportsNiceJavaBuilder{ + // props + } +} + +func (s SupportsNiceJavaBuilder) SetBar(val float64) { + s.Bar = val +} + +func (s SupportsNiceJavaBuilder) SetId(val float64) { + s.Id = val +} + +func (s SupportsNiceJavaBuilder) SetPropId(val string) { + s.PropId = val +} + +func (s SupportsNiceJavaBuilder) SetRest(val []string) { + s.Rest = val +} + +// Struct interface +type SupportsNiceJavaBuilderPropsIface interface { + GetBar() float64 + GetId() string +} + +// Struct proxy +type SupportsNiceJavaBuilderProps struct { + Bar float64 + Id string +} + +func (s SupportsNiceJavaBuilderProps) GetBar() float64 { + return s.Bar +} + +func (s SupportsNiceJavaBuilderProps) GetId() string { + return s.Id +} + + +type SupportsNiceJavaBuilderWithRequiredPropsIface interface { + GetBar() float64 + SetBar() + GetId() float64 + SetId() + GetPropId() string + SetPropId() +} + +// Struct proxy +type SupportsNiceJavaBuilderWithRequiredProps struct { + Bar float64 + Id float64 + PropId string +} + +func (s SupportsNiceJavaBuilderWithRequiredProps) GetBar() float64 { + return s.Bar +} + +func (s SupportsNiceJavaBuilderWithRequiredProps) GetId() float64 { + return s.Id +} + +func (s SupportsNiceJavaBuilderWithRequiredProps) GetPropId() string { + return s.PropId +} + + +func NewSupportsNiceJavaBuilderWithRequiredProps(id number, props jsii-calc.SupportsNiceJavaBuilderProps) SupportsNiceJavaBuilderWithRequiredPropsIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "SupportsNiceJavaBuilderWithRequiredProps", + Method: "NewSupportsNiceJavaBuilderWithRequiredProps", + Parameters: []string{id number, props jsii-calc.SupportsNiceJavaBuilderProps} + }) + + return &SupportsNiceJavaBuilderWithRequiredProps{ + // props + } +} + +func (s SupportsNiceJavaBuilderWithRequiredProps) SetBar(val float64) { + s.Bar = val +} + +func (s SupportsNiceJavaBuilderWithRequiredProps) SetId(val float64) { + s.Id = val +} + +func (s SupportsNiceJavaBuilderWithRequiredProps) SetPropId(val string) { + s.PropId = val +} + +type SyncVirtualMethodsIface interface { + GetReadonlyProperty() string + SetReadonlyProperty() + GetA() float64 + SetA() + GetCallerIsProperty() float64 + SetCallerIsProperty() + GetOtherProperty() string + SetOtherProperty() + GetTheProperty() string + SetTheProperty() + GetValueOfOtherProperty() string + SetValueOfOtherProperty() + CallerIsAsync() float64 + CallerIsMethod() float64 + ModifyOtherProperty() jsii.Any + ModifyValueOfTheProperty() jsii.Any + ReadA() float64 + RetrieveOtherProperty() string + RetrieveReadOnlyProperty() string + RetrieveValueOfTheProperty() string + VirtualMethod() float64 + WriteA() jsii.Any +} + +// Struct proxy +type SyncVirtualMethods struct { + ReadonlyProperty string + A float64 + CallerIsProperty float64 + OtherProperty string + TheProperty string + ValueOfOtherProperty string +} + +func (s SyncVirtualMethods) GetReadonlyProperty() string { + return s.ReadonlyProperty +} + +func (s SyncVirtualMethods) GetA() float64 { + return s.A +} + +func (s SyncVirtualMethods) GetCallerIsProperty() float64 { + return s.CallerIsProperty +} + +func (s SyncVirtualMethods) GetOtherProperty() string { + return s.OtherProperty +} + +func (s SyncVirtualMethods) GetTheProperty() string { + return s.TheProperty +} + +func (s SyncVirtualMethods) GetValueOfOtherProperty() string { + return s.ValueOfOtherProperty +} + + +func NewSyncVirtualMethods() SyncVirtualMethodsIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "SyncVirtualMethods", + Method: "NewSyncVirtualMethods", + Parameters: []string{} + }) + + return &SyncVirtualMethods{ + // props + } +} + +func (s SyncVirtualMethods) SetReadonlyProperty(val string) { + s.ReadonlyProperty = val +} + +func (s SyncVirtualMethods) SetA(val float64) { + s.A = val +} + +func (s SyncVirtualMethods) SetCallerIsProperty(val float64) { + s.CallerIsProperty = val +} + +func (s SyncVirtualMethods) SetOtherProperty(val string) { + s.OtherProperty = val +} + +func (s SyncVirtualMethods) SetTheProperty(val string) { + s.TheProperty = val +} + +func (s SyncVirtualMethods) SetValueOfOtherProperty(val string) { + s.ValueOfOtherProperty = val +} + +func (s *SyncVirtualMethods) CallerIsAsync() float64 { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "SyncVirtualMethods", + Method: "CallerIsAsync", + Parameters: []string{} + }) + return 0.0 +} + +func (s *SyncVirtualMethods) CallerIsMethod() float64 { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "SyncVirtualMethods", + Method: "CallerIsMethod", + Parameters: []string{} + }) + return 0.0 +} + +func (s *SyncVirtualMethods) ModifyOtherProperty() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "SyncVirtualMethods", + Method: "ModifyOtherProperty", + Parameters: []string{"value string"} + }) + return nil +} + +func (s *SyncVirtualMethods) ModifyValueOfTheProperty() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "SyncVirtualMethods", + Method: "ModifyValueOfTheProperty", + Parameters: []string{"value string"} + }) + return nil +} + +func (s *SyncVirtualMethods) ReadA() float64 { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "SyncVirtualMethods", + Method: "ReadA", + Parameters: []string{} + }) + return 0.0 +} + +func (s *SyncVirtualMethods) RetrieveOtherProperty() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "SyncVirtualMethods", + Method: "RetrieveOtherProperty", + Parameters: []string{} + }) + return "NOOP_RETURN_STRING" +} + +func (s *SyncVirtualMethods) RetrieveReadOnlyProperty() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "SyncVirtualMethods", + Method: "RetrieveReadOnlyProperty", + Parameters: []string{} + }) + return "NOOP_RETURN_STRING" +} + +func (s *SyncVirtualMethods) RetrieveValueOfTheProperty() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "SyncVirtualMethods", + Method: "RetrieveValueOfTheProperty", + Parameters: []string{} + }) + return "NOOP_RETURN_STRING" +} + +func (s *SyncVirtualMethods) VirtualMethod() float64 { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "SyncVirtualMethods", + Method: "VirtualMethod", + Parameters: []string{"n number"} + }) + return 0.0 +} + +func (s *SyncVirtualMethods) WriteA() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "SyncVirtualMethods", + Method: "WriteA", + Parameters: []string{"value number"} + }) + return nil +} + +type ThrowerIface interface { + ThrowError() jsii.Any +} + +// Struct proxy +type Thrower struct { +} + +func NewThrower() ThrowerIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Thrower", + Method: "NewThrower", + Parameters: []string{} + }) + + return &Thrower{ + // props + } +} + +func (t *Thrower) ThrowError() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Thrower", + Method: "ThrowError", + Parameters: []string{} + }) + return nil +} + +// Struct interface +type TopLevelStructIface interface { + GetRequired() string + GetSecondLevel() jsii.Any + GetOptional() string +} + +// Struct proxy +type TopLevelStruct struct { + Required string + SecondLevel jsii.Any + Optional string +} + +func (t TopLevelStruct) GetRequired() string { + return t.Required +} + +func (t TopLevelStruct) GetSecondLevel() jsii.Any { + return t.SecondLevel +} + +func (t TopLevelStruct) GetOptional() string { + return t.Optional +} + + +type UmaskCheckIface interface { + Mode() float64 +} + +// Struct proxy +type UmaskCheck struct { +} + +func (u *UmaskCheck) Mode() float64 { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "UmaskCheck", + Method: "Mode", + Parameters: []string{} + }) + return 0.0 +} + +type UnaryOperationIface interface { + GetValue() float64 + SetValue() + GetOperand() jsii.Any + SetOperand() +} + +// Struct proxy +type UnaryOperation struct { + Value float64 + Operand jsii.Any +} + +func (u UnaryOperation) GetValue() float64 { + return u.Value +} + +func (u UnaryOperation) GetOperand() jsii.Any { + return u.Operand +} + + +func NewUnaryOperation(operand @scope/jsii-calc-lib.NumericValue) UnaryOperationIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "UnaryOperation", + Method: "NewUnaryOperation", + Parameters: []string{operand @scope/jsii-calc-lib.NumericValue} + }) + + return &UnaryOperation{ + // props + } +} + +func (u UnaryOperation) SetValue(val float64) { + u.Value = val +} + +func (u UnaryOperation) SetOperand(val jsii.Any) { + u.Operand = val +} + +// Struct interface +type UnionPropertiesIface interface { + GetBar() jsii.Any + GetFoo() jsii.Any +} + +// Struct proxy +type UnionProperties struct { + Bar jsii.Any + Foo jsii.Any +} + +func (u UnionProperties) GetBar() jsii.Any { + return u.Bar +} + +func (u UnionProperties) GetFoo() jsii.Any { + return u.Foo +} + + +type UpcasingReflectableIface interface { + GetReflector() jsii.Any + SetReflector() + GetEntries() []jsii.Any + SetEntries() +} + +// Struct proxy +type UpcasingReflectable struct { + Reflector jsii.Any + Entries []jsii.Any +} + +func (u UpcasingReflectable) GetReflector() jsii.Any { + return u.Reflector +} + +func (u UpcasingReflectable) GetEntries() []jsii.Any { + return u.Entries +} + + +func NewUpcasingReflectable(delegate Map any>) UpcasingReflectableIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "UpcasingReflectable", + Method: "NewUpcasingReflectable", + Parameters: []string{delegate Map any>} + }) + + return &UpcasingReflectable{ + // props + } +} + +func (u UpcasingReflectable) SetReflector(val jsii.Any) { + u.Reflector = val +} + +func (u UpcasingReflectable) SetEntries(val []jsii.Any) { + u.Entries = val +} + +type UseBundledDependencyIface interface { + Value() jsii.Any +} + +// Struct proxy +type UseBundledDependency struct { +} + +func NewUseBundledDependency() UseBundledDependencyIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "UseBundledDependency", + Method: "NewUseBundledDependency", + Parameters: []string{} + }) + + return &UseBundledDependency{ + // props + } +} + +func (u *UseBundledDependency) Value() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "UseBundledDependency", + Method: "Value", + Parameters: []string{} + }) + return nil +} + +type UseCalcBaseIface interface { + Hello() jsii.Any +} + +// Struct proxy +type UseCalcBase struct { +} + +func NewUseCalcBase() UseCalcBaseIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "UseCalcBase", + Method: "NewUseCalcBase", + Parameters: []string{} + }) + + return &UseCalcBase{ + // props + } +} + +func (u *UseCalcBase) Hello() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "UseCalcBase", + Method: "Hello", + Parameters: []string{} + }) + return nil +} + +type UsesInterfaceWithPropertiesIface interface { + GetObj() IInterfaceWithProperties + SetObj() + JustRead() string + ReadStringAndNumber() string + WriteAndRead() string +} + +// Struct proxy +type UsesInterfaceWithProperties struct { + Obj IInterfaceWithProperties +} + +func (u UsesInterfaceWithProperties) GetObj() IInterfaceWithProperties { + return u.Obj +} + + +func NewUsesInterfaceWithProperties(obj jsii-calc.IInterfaceWithProperties) UsesInterfaceWithPropertiesIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "UsesInterfaceWithProperties", + Method: "NewUsesInterfaceWithProperties", + Parameters: []string{obj jsii-calc.IInterfaceWithProperties} + }) + + return &UsesInterfaceWithProperties{ + // props + } +} + +func (u UsesInterfaceWithProperties) SetObj(val IInterfaceWithProperties) { + u.Obj = val +} + +func (u *UsesInterfaceWithProperties) JustRead() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "UsesInterfaceWithProperties", + Method: "JustRead", + Parameters: []string{} + }) + return "NOOP_RETURN_STRING" +} + +func (u *UsesInterfaceWithProperties) ReadStringAndNumber() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "UsesInterfaceWithProperties", + Method: "ReadStringAndNumber", + Parameters: []string{"ext jsii-calc.IInterfaceWithPropertiesExtension"} + }) + return "NOOP_RETURN_STRING" +} + +func (u *UsesInterfaceWithProperties) WriteAndRead() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "UsesInterfaceWithProperties", + Method: "WriteAndRead", + Parameters: []string{"value string"} + }) + return "NOOP_RETURN_STRING" +} + +type VariadicInvokerIface interface { + AsArray() []float64 +} + +// Struct proxy +type VariadicInvoker struct { +} + +func NewVariadicInvoker(method jsii-calc.VariadicMethod) VariadicInvokerIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "VariadicInvoker", + Method: "NewVariadicInvoker", + Parameters: []string{method jsii-calc.VariadicMethod} + }) + + return &VariadicInvoker{ + // props + } +} + +func (v *VariadicInvoker) AsArray() []float64 { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "VariadicInvoker", + Method: "AsArray", + Parameters: []string{"values number"} + }) + return nil +} + +type VariadicMethodIface interface { + AsArray() []float64 +} + +// Struct proxy +type VariadicMethod struct { +} + +func NewVariadicMethod(prefix number) VariadicMethodIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "VariadicMethod", + Method: "NewVariadicMethod", + Parameters: []string{prefix number} + }) + + return &VariadicMethod{ + // props + } +} + +func (v *VariadicMethod) AsArray() []float64 { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "VariadicMethod", + Method: "AsArray", + Parameters: []string{"first number", "others number"} + }) + return nil +} + +type VirtualMethodPlaygroundIface interface { + OverrideMeAsync() float64 + OverrideMeSync() float64 + ParallelSumAsync() float64 + SerialSumAsync() float64 + SumSync() float64 +} + +// Struct proxy +type VirtualMethodPlayground struct { +} + +func NewVirtualMethodPlayground() VirtualMethodPlaygroundIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "VirtualMethodPlayground", + Method: "NewVirtualMethodPlayground", + Parameters: []string{} + }) + + return &VirtualMethodPlayground{ + // props + } +} + +func (v *VirtualMethodPlayground) OverrideMeAsync() float64 { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "VirtualMethodPlayground", + Method: "OverrideMeAsync", + Parameters: []string{"index number"} + }) + return 0.0 +} + +func (v *VirtualMethodPlayground) OverrideMeSync() float64 { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "VirtualMethodPlayground", + Method: "OverrideMeSync", + Parameters: []string{"index number"} + }) + return 0.0 +} + +func (v *VirtualMethodPlayground) ParallelSumAsync() float64 { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "VirtualMethodPlayground", + Method: "ParallelSumAsync", + Parameters: []string{"count number"} + }) + return 0.0 +} + +func (v *VirtualMethodPlayground) SerialSumAsync() float64 { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "VirtualMethodPlayground", + Method: "SerialSumAsync", + Parameters: []string{"count number"} + }) + return 0.0 +} + +func (v *VirtualMethodPlayground) SumSync() float64 { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "VirtualMethodPlayground", + Method: "SumSync", + Parameters: []string{"count number"} + }) + return 0.0 +} + +type VoidCallbackIface interface { + GetMethodWasCalled() bool + SetMethodWasCalled() + CallMe() jsii.Any + OverrideMe() jsii.Any +} + +// Struct proxy +type VoidCallback struct { + MethodWasCalled bool +} + +func (v VoidCallback) GetMethodWasCalled() bool { + return v.MethodWasCalled +} + + +func NewVoidCallback() VoidCallbackIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "VoidCallback", + Method: "NewVoidCallback", + Parameters: []string{} + }) + + return &VoidCallback{ + // props + } +} + +func (v VoidCallback) SetMethodWasCalled(val bool) { + v.MethodWasCalled = val +} + +func (v *VoidCallback) CallMe() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "VoidCallback", + Method: "CallMe", + Parameters: []string{} + }) + return nil +} + +func (v *VoidCallback) OverrideMe() jsii.Any { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "VoidCallback", + Method: "OverrideMe", + Parameters: []string{} + }) + return nil +} + +type WithPrivatePropertyInConstructorIface interface { + GetSuccess() bool + SetSuccess() +} + +// Struct proxy +type WithPrivatePropertyInConstructor struct { + Success bool +} + +func (w WithPrivatePropertyInConstructor) GetSuccess() bool { + return w.Success +} + + +func NewWithPrivatePropertyInConstructor(privateField string) WithPrivatePropertyInConstructorIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "WithPrivatePropertyInConstructor", + Method: "NewWithPrivatePropertyInConstructor", + Parameters: []string{privateField string} + }) + + return &WithPrivatePropertyInConstructor{ + // props + } +} + +func (w WithPrivatePropertyInConstructor) SetSuccess(val bool) { + w.Success = val +} + + +`; + +exports[`Generated code for "jsii-calc": /golang/jsiicalc/composition.go 1`] = ` +package composition + +import ( + "github.com/aws-cdk/jsii/jsii" +) + +type CompositeOperationIface interface { + GetValue() float64 + SetValue() + GetExpression() jsii.Any + SetExpression() + GetDecorationPostfixes() []string + SetDecorationPostfixes() + GetDecorationPrefixes() []string + SetDecorationPrefixes() + GetStringStyle() CompositionStringStyle + SetStringStyle() + ToString() string +} + +// Struct proxy +type CompositeOperation struct { + Value float64 + Expression jsii.Any + DecorationPostfixes []string + DecorationPrefixes []string + StringStyle CompositionStringStyle +} + +func (c CompositeOperation) GetValue() float64 { + return c.Value +} + +func (c CompositeOperation) GetExpression() jsii.Any { + return c.Expression +} + +func (c CompositeOperation) GetDecorationPostfixes() []string { + return c.DecorationPostfixes +} + +func (c CompositeOperation) GetDecorationPrefixes() []string { + return c.DecorationPrefixes +} + +func (c CompositeOperation) GetStringStyle() CompositionStringStyle { + return c.StringStyle +} + + +func NewCompositeOperation() CompositeOperationIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "CompositeOperation", + Method: "NewCompositeOperation", + Parameters: []string{} + }) + + return &CompositeOperation{ + // props + } +} + +func (c CompositeOperation) SetValue(val float64) { + c.Value = val +} + +func (c CompositeOperation) SetExpression(val jsii.Any) { + c.Expression = val +} + +func (c CompositeOperation) SetDecorationPostfixes(val []string) { + c.DecorationPostfixes = val +} + +func (c CompositeOperation) SetDecorationPrefixes(val []string) { + c.DecorationPrefixes = val +} + +func (c CompositeOperation) SetStringStyle(val CompositionStringStyle) { + c.StringStyle = val +} + +func (c *CompositeOperation) ToString() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "CompositeOperation", + Method: "ToString", + Parameters: []string{} + }) + return "NOOP_RETURN_STRING" +} + +type CompositionStringStyle string + +const ( + CompositionStringStyleNormal CompositionStringStyle = "NORMAL" + CompositionStringStyleDecorated CompositionStringStyle = "DECORATED" +) + + +`; + +exports[`Generated code for "jsii-calc": /golang/jsiicalc/derivedclasshasnoproperties.go 1`] = ` +package derivedclasshasnoproperties + +import ( + "github.com/aws-cdk/jsii/jsii" +) + +type BaseIface interface { + GetProp() string + SetProp() +} + +// Struct proxy +type Base struct { + Prop string +} + +func (b Base) GetProp() string { + return b.Prop +} + + +func NewBase() BaseIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Base", + Method: "NewBase", + Parameters: []string{} + }) + + return &Base{ + // props + } +} + +func (b Base) SetProp(val string) { + b.Prop = val +} + +type DerivedIface interface { + GetProp() string + SetProp() +} + +// Struct proxy +type Derived struct { + Prop string +} + +func (d Derived) GetProp() string { + return d.Prop +} + + +func NewDerived() DerivedIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Derived", + Method: "NewDerived", + Parameters: []string{} + }) + + return &Derived{ + // props + } +} + +func (d Derived) SetProp(val string) { + d.Prop = val +} + + +`; + +exports[`Generated code for "jsii-calc": /golang/jsiicalc/interfaceinnamespaceincludesclasses.go 1`] = ` +package interfaceinnamespaceincludesclasses + +import ( + "github.com/aws-cdk/jsii/jsii" +) + +type FooIface interface { + GetBar() string + SetBar() +} + +// Struct proxy +type Foo struct { + Bar string +} + +func (f Foo) GetBar() string { + return f.Bar +} + + +func NewFoo() FooIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Foo", + Method: "NewFoo", + Parameters: []string{} + }) + + return &Foo{ + // props + } +} + +func (f Foo) SetBar(val string) { + f.Bar = val +} + +// Struct interface +type HelloIface interface { + GetFoo() float64 +} + +// Struct proxy +type Hello struct { + Foo float64 +} + +func (h Hello) GetFoo() float64 { + return h.Foo +} + + + +`; + +exports[`Generated code for "jsii-calc": /golang/jsiicalc/interfaceinnamespaceonlyinterface.go 1`] = ` +package interfaceinnamespaceonlyinterface + +import ( + "github.com/aws-cdk/jsii/jsii" +) + +// Struct interface +type HelloIface interface { + GetFoo() float64 +} + +// Struct proxy +type Hello struct { + Foo float64 +} + +func (h Hello) GetFoo() float64 { + return h.Foo +} + + + +`; + +exports[`Generated code for "jsii-calc": /golang/jsiicalc/pythonself.go 1`] = ` +package pythonself + +import ( + "github.com/aws-cdk/jsii/jsii" +) + +type ClassWithSelfIface interface { + GetSelf() string + SetSelf() + Method() string +} + +// Struct proxy +type ClassWithSelf struct { + Self string +} + +func (c ClassWithSelf) GetSelf() string { + return c.Self +} + + +func NewClassWithSelf(self string) ClassWithSelfIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ClassWithSelf", + Method: "NewClassWithSelf", + Parameters: []string{self string} + }) + + return &ClassWithSelf{ + // props + } +} + +func (c ClassWithSelf) SetSelf(val string) { + c.Self = val +} + +func (c *ClassWithSelf) Method() string { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ClassWithSelf", + Method: "Method", + Parameters: []string{"self number"} + }) + return "NOOP_RETURN_STRING" +} + +type ClassWithSelfKwargIface interface { + GetProps() StructWithSelf + SetProps() +} + +// Struct proxy +type ClassWithSelfKwarg struct { + Props StructWithSelf +} + +func (c ClassWithSelfKwarg) GetProps() StructWithSelf { + return c.Props +} + + +func NewClassWithSelfKwarg(props jsii-calc.PythonSelf.StructWithSelf) ClassWithSelfKwargIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "ClassWithSelfKwarg", + Method: "NewClassWithSelfKwarg", + Parameters: []string{props jsii-calc.PythonSelf.StructWithSelf} + }) + + return &ClassWithSelfKwarg{ + // props + } +} + +func (c ClassWithSelfKwarg) SetProps(val StructWithSelf) { + c.Props = val +} + +// Behaviorial interface +type IInterfaceWithSelf interface { + Method() string +} + +// Struct interface +type StructWithSelfIface interface { + GetSelf() string +} + +// Struct proxy +type StructWithSelf struct { + Self string +} + +func (s StructWithSelf) GetSelf() string { + return s.Self +} + + + +`; + +exports[`Generated code for "jsii-calc": /golang/jsiicalc/submodule.go 1`] = ` +package submodule + +import ( + "github.com/aws-cdk/jsii/jsii" + "child" + "jsiicalc" +) + +type MyClassIface interface { + GetAwesomeness() child.Awesomeness + SetAwesomeness() + GetDefinedAt() string + SetDefinedAt() + GetGoodness() child.Goodness + SetGoodness() + GetProps() child.SomeStruct + SetProps() + GetAllTypes() jsiicalc.AllTypes + SetAllTypes() +} + +// Struct proxy +type MyClass struct { + Awesomeness child.Awesomeness + DefinedAt string + Goodness child.Goodness + Props child.SomeStruct + AllTypes jsiicalc.AllTypes +} + +func (m MyClass) GetAwesomeness() child.Awesomeness { + return m.Awesomeness +} + +func (m MyClass) GetDefinedAt() string { + return m.DefinedAt +} + +func (m MyClass) GetGoodness() child.Goodness { + return m.Goodness +} + +func (m MyClass) GetProps() child.SomeStruct { + return m.Props +} + +func (m MyClass) GetAllTypes() jsiicalc.AllTypes { + return m.AllTypes +} + + +func NewMyClass(props jsii-calc.submodule.child.SomeStruct) MyClassIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "MyClass", + Method: "NewMyClass", + Parameters: []string{props jsii-calc.submodule.child.SomeStruct} + }) + + return &MyClass{ + // props + } +} + +func (m MyClass) SetAwesomeness(val child.Awesomeness) { + m.Awesomeness = val +} + +func (m MyClass) SetDefinedAt(val string) { + m.DefinedAt = val +} + +func (m MyClass) SetGoodness(val child.Goodness) { + m.Goodness = val +} + +func (m MyClass) SetProps(val child.SomeStruct) { + m.Props = val +} + +func (m MyClass) SetAllTypes(val jsiicalc.AllTypes) { + m.AllTypes = val +} + + +`; + +exports[`Generated code for "jsii-calc": /golang/jsiicalc/submodule/backreferences.go 1`] = ` +package backreferences + +import ( + "github.com/aws-cdk/jsii/jsii" + "submodule" +) + +// Struct interface +type MyClassReferenceIface interface { + GetReference() submodule.MyClass +} + +// Struct proxy +type MyClassReference struct { + Reference submodule.MyClass +} + +func (m MyClassReference) GetReference() submodule.MyClass { + return m.Reference +} + + + +`; + +exports[`Generated code for "jsii-calc": /golang/jsiicalc/submodule/child.go 1`] = ` +package child + +import ( + "github.com/aws-cdk/jsii/jsii" +) + +type Awesomeness string + +const ( + AwesomenessAwesome Awesomeness = "AWESOME" +) + +type Goodness string + +const ( + GoodnessPrettyGood Goodness = "PRETTY_GOOD" + GoodnessReallyGood Goodness = "REALLY_GOOD" + GoodnessAmazinglyGood Goodness = "AMAZINGLY_GOOD" +) + +type InnerClassIface interface { + GetStaticProp() SomeStruct + SetStaticProp() +} + +// Struct proxy +type InnerClass struct { + StaticProp SomeStruct +} + +func (i InnerClass) GetStaticProp() SomeStruct { + return i.StaticProp +} + + +func NewInnerClass() InnerClassIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "InnerClass", + Method: "NewInnerClass", + Parameters: []string{} + }) + + return &InnerClass{ + // props + } +} + +func (i InnerClass) SetStaticProp(val SomeStruct) { + i.StaticProp = val +} + +// Struct interface +type KwargsPropsIface interface { + jsii-calc.submodule.child.SomeStruct + GetProp() SomeEnum + GetExtra() string +} + +// Struct proxy +type KwargsProps struct { + Prop SomeEnum + Extra string +} + +func (k KwargsProps) GetProp() SomeEnum { + return k.Prop +} + +func (k KwargsProps) GetExtra() string { + return k.Extra +} + + +type OuterClassIface interface { + GetInnerClass() InnerClass + SetInnerClass() +} + +// Struct proxy +type OuterClass struct { + InnerClass InnerClass +} + +func (o OuterClass) GetInnerClass() InnerClass { + return o.InnerClass +} + + +func NewOuterClass() OuterClassIface { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "OuterClass", + Method: "NewOuterClass", + Parameters: []string{} + }) + + return &OuterClass{ + // props + } +} + +func (o OuterClass) SetInnerClass(val InnerClass) { + o.InnerClass = val +} + +type SomeEnum string + +const ( + SomeEnumSome SomeEnum = "SOME" +) + +// Struct interface +type SomeStructIface interface { + GetProp() SomeEnum +} + +// Struct proxy +type SomeStruct struct { + Prop SomeEnum +} + +func (s SomeStruct) GetProp() SomeEnum { + return s.Prop +} + + +// Struct interface +type StructureIface interface { + GetBool() bool +} + +// Struct proxy +type Structure struct { + Bool bool +} + +func (s Structure) GetBool() bool { + return s.Bool +} + + + +`; + +exports[`Generated code for "jsii-calc": /golang/jsiicalc/submodule/isolated.go 1`] = ` +package isolated + +import ( + "github.com/aws-cdk/jsii/jsii" +) + +type KwargsIface interface { + Method() bool +} + +// Struct proxy +type Kwargs struct { +} + +func (k *Kwargs) Method() bool { + jsii.NoOpRequest(jsii.NoOpApiRequest { + Class: "Kwargs", + Method: "Method", + Parameters: []string{"props jsii-calc.submodule.child.KwargsProps"} + }) + return true +} + + +`; + +exports[`Generated code for "jsii-calc": /golang/jsiicalc/submodule/nestedsubmodule.go 1`] = ` +package nestedsubmodule + +import ( + "github.com/aws-cdk/jsii/jsii" + "child" +) + +type NamespacedIface interface { + GetDefinedAt() string + SetDefinedAt() + GetGoodness() child.Goodness + SetGoodness() +} + +// Struct proxy +type Namespaced struct { + DefinedAt string + Goodness child.Goodness +} + +func (n Namespaced) GetDefinedAt() string { + return n.DefinedAt +} + +func (n Namespaced) GetGoodness() child.Goodness { + return n.Goodness +} + + +func (n Namespaced) SetDefinedAt(val string) { + n.DefinedAt = val +} + +func (n Namespaced) SetGoodness(val child.Goodness) { + n.Goodness = val +} + + +`; + +exports[`Generated code for "jsii-calc": /golang/jsiicalc/submodule/nestedsubmodule/deeplynested.go 1`] = ` +package deeplynested + +import ( + "github.com/aws-cdk/jsii/jsii" +) + +// Behaviorial interface +type INamespaced interface { + GetDefinedAt() string +} + + +`; + +exports[`Generated code for "jsii-calc": /java/pom.xml 1`] = ` + + + 4.0.0 + \${project.groupId}:\${project.artifactId} + A simple calcuator built on JSII. + https://github.com/aws/jsii + + + Apache License 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + repo + An OSI-approved license + + + + + Amazon Web Services + + author + + https://aws.amazon.com + + + Elad Ben-Israel + + maintainer + + https://github.com/eladb + + + Rico Huijbers + + maintainer + + https://github.com/rix0rrr + + + Romain Marcadier-Muller + + maintainer + + https://github.com/RomainMuller + + + + scm:git:https://github.com/aws/jsii.git + https://github.com/aws/jsii.git + + software.amazon.jsii.tests + calculator + 0.0.0 + jar + + UTF-8 + + + + software.amazon.jsii.tests + calculator-base + [0.0.0,0.0.1) + + + software.amazon.jsii.tests + calculator-base-of-base + [0.0.0,0.0.1) + + + software.amazon.jsii.tests + calculator-lib + [0.0.0.DEVPREVIEW,0.0.1.DEVPREVIEW) + + + software.amazon.jsii + jsii-runtime + [0.0.0,0.0.1) + + + org.jetbrains + annotations + [16.0.3,20.0.0) + + + + javax.annotation + javax.annotation-api + [1.3.2,1.4.0) + compile + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 1.8 + 1.8 + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.0 + + + true + + true + true + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.2.1 + + + attach-sources + + jar + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.1.1 + + + attach-javadocs + + jar + + + + + false + protected + + **/$Module.java + + -J-XX:+TieredCompilation + -J-XX:TieredStopAtLevel=1 + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M3 + + + enforce-maven + + enforce + + + + + 3.6 + + + + + + + + org.codehaus.mojo + versions-maven-plugin + 2.7 + + false + + + + + + +`; + +exports[`Generated code for "jsii-calc": /java/src/main/java/software/amazon/jsii/tests/calculator/$Module.java 1`] = ` +package software.amazon.jsii.tests.calculator; + +import static java.util.Arrays.asList; + +import java.io.BufferedReader; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.IOException; +import java.io.Reader; +import java.io.UncheckedIOException; + +import java.nio.charset.StandardCharsets; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import software.amazon.jsii.JsiiModule; + +public final class $Module extends JsiiModule { + private static final Map MODULE_TYPES = load(); + + private static Map load() { + final Map result = new HashMap<>(); + final ClassLoader cl = $Module.class.getClassLoader(); + try (final InputStream is = cl.getResourceAsStream("software/amazon/jsii/tests/calculator/$Module.txt"); + final Reader rd = new InputStreamReader(is, StandardCharsets.UTF_8); + final BufferedReader br = new BufferedReader(rd)) { + br.lines() + .filter(line -> !line.trim().isEmpty()) + .forEach(line -> { + final String[] parts = line.split("=", 2); + final String fqn = parts[0]; + final String className = parts[1]; + result.put(fqn, className); + }); + } + catch (final IOException exception) { + throw new UncheckedIOException(exception); + } + return result; + } + + private final Map> cache = new HashMap<>(); + + public $Module() { + super("jsii-calc", "0.0.0", $Module.class, "jsii-calc@0.0.0.jsii.tgz"); + } + + @Override + public List> getDependencies() { + return asList(software.amazon.jsii.tests.calculator.base.$Module.class, software.amazon.jsii.tests.calculator.baseofbase.$Module.class, software.amazon.jsii.tests.calculator.lib.$Module.class); + } + + @Override + protected Class resolveClass(final String fqn) throws ClassNotFoundException { + if (!MODULE_TYPES.containsKey(fqn)) { + throw new ClassNotFoundException("Unknown JSII type: " + fqn); + } + String className = MODULE_TYPES.get(fqn); + if (!this.cache.containsKey(className)) { + this.cache.put(className, this.findClass(className)); + } + return this.cache.get(className); + } + + private Class findClass(final String binaryName) { + try { + return Class.forName(binaryName); + } + catch (final ClassNotFoundException exception) { + throw new RuntimeException(exception); + } + } +} + +`; + +exports[`Generated code for "jsii-calc": /java/src/main/java/software/amazon/jsii/tests/calculator/AbstractClass.java 1`] = ` +package software.amazon.jsii.tests.calculator; + +/** + * EXPERIMENTAL + */ +@javax.annotation.Generated(value = "jsii-pacmak") +@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) +@software.amazon.jsii.Jsii(module = software.amazon.jsii.tests.calculator.$Module.class, fqn = "jsii-calc.AbstractClass") +public abstract class AbstractClass extends software.amazon.jsii.tests.calculator.AbstractClassBase implements software.amazon.jsii.tests.calculator.IInterfaceImplementedByAbstractClass { + + protected AbstractClass(final software.amazon.jsii.JsiiObjectRef objRef) { + super(objRef); + } + + protected AbstractClass(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { + super(initializationMode); + } + + /** + * EXPERIMENTAL + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) + protected AbstractClass() { + super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); + software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this); + } + + /** + * EXPERIMENTAL + *

+ * @param name This parameter is required. + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) + public abstract @org.jetbrains.annotations.NotNull java.lang.String abstractMethod(final @org.jetbrains.annotations.NotNull java.lang.String name); + + /** + * EXPERIMENTAL + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) + public @org.jetbrains.annotations.NotNull java.lang.Number nonAbstractMethod() { + return this.jsiiCall("nonAbstractMethod", java.lang.Number.class); + } + + /** + * EXPERIMENTAL + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) + public @org.jetbrains.annotations.NotNull java.lang.String getPropFromInterface() { + return this.jsiiGet("propFromInterface", java.lang.String.class); + } + + /** + * A proxy class which represents a concrete javascript instance of this type. + */ + final static class Jsii$Proxy extends software.amazon.jsii.tests.calculator.AbstractClass { + protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { + super(objRef); + } + + /** + * EXPERIMENTAL + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) + public @org.jetbrains.annotations.NotNull java.lang.String getPropFromInterface() { + return this.jsiiGet("propFromInterface", java.lang.String.class); + } + + /** + * EXPERIMENTAL + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) + public @org.jetbrains.annotations.NotNull java.lang.String getAbstractProperty() { + return this.jsiiGet("abstractProperty", java.lang.String.class); + } + + /** + * EXPERIMENTAL *

* @param name This parameter is required. */ @@ -38029,7 +47412,7 @@ public class Add extends software.amazon.jsii.tests.calculator.BinaryOperation { * @param rhs Right-hand side operand. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - public Add(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.Value lhs, final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.Value rhs) { + public Add(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.NumericValue lhs, final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.NumericValue rhs) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(lhs, "lhs is required"), java.util.Objects.requireNonNull(rhs, "rhs is required") }); } @@ -38964,7 +48347,7 @@ public abstract class BinaryOperation extends software.amazon.jsii.tests.calcula * @param rhs Right-hand side operand. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - protected BinaryOperation(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.Value lhs, final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.Value rhs) { + protected BinaryOperation(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.NumericValue lhs, final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.NumericValue rhs) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(lhs, "lhs is required"), java.util.Objects.requireNonNull(rhs, "rhs is required") }); } @@ -38986,8 +48369,8 @@ public abstract class BinaryOperation extends software.amazon.jsii.tests.calcula * EXPERIMENTAL */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.Value getLhs() { - return this.jsiiGet("lhs", software.amazon.jsii.tests.calculator.lib.Value.class); + public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.NumericValue getLhs() { + return this.jsiiGet("lhs", software.amazon.jsii.tests.calculator.lib.NumericValue.class); } /** @@ -38996,8 +48379,8 @@ public abstract class BinaryOperation extends software.amazon.jsii.tests.calcula * EXPERIMENTAL */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.Value getRhs() { - return this.jsiiGet("rhs", software.amazon.jsii.tests.calculator.lib.Value.class); + public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.NumericValue getRhs() { + return this.jsiiGet("rhs", software.amazon.jsii.tests.calculator.lib.NumericValue.class); } /** @@ -39246,8 +48629,8 @@ public class Calculator extends software.amazon.jsii.tests.calculator.compositio */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.Value getExpression() { - return this.jsiiGet("expression", software.amazon.jsii.tests.calculator.lib.Value.class); + public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.NumericValue getExpression() { + return this.jsiiGet("expression", software.amazon.jsii.tests.calculator.lib.NumericValue.class); } /** @@ -39256,8 +48639,8 @@ public class Calculator extends software.amazon.jsii.tests.calculator.compositio * EXPERIMENTAL */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - public @org.jetbrains.annotations.NotNull java.util.List getOperationsLog() { - return java.util.Collections.unmodifiableList(this.jsiiGet("operationsLog", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.lib.Value.class)))); + public @org.jetbrains.annotations.NotNull java.util.List getOperationsLog() { + return java.util.Collections.unmodifiableList(this.jsiiGet("operationsLog", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.lib.NumericValue.class)))); } /** @@ -39266,8 +48649,8 @@ public class Calculator extends software.amazon.jsii.tests.calculator.compositio * EXPERIMENTAL */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - public @org.jetbrains.annotations.NotNull java.util.Map> getOperationsMap() { - return java.util.Collections.unmodifiableMap(this.jsiiGet("operationsMap", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.lib.Value.class))))); + public @org.jetbrains.annotations.NotNull java.util.Map> getOperationsMap() { + return java.util.Collections.unmodifiableMap(this.jsiiGet("operationsMap", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.lib.NumericValue.class))))); } /** @@ -39276,8 +48659,8 @@ public class Calculator extends software.amazon.jsii.tests.calculator.compositio * EXPERIMENTAL */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.Value getCurr() { - return this.jsiiGet("curr", software.amazon.jsii.tests.calculator.lib.Value.class); + public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.NumericValue getCurr() { + return this.jsiiGet("curr", software.amazon.jsii.tests.calculator.lib.NumericValue.class); } /** @@ -39286,7 +48669,7 @@ public class Calculator extends software.amazon.jsii.tests.calculator.compositio * EXPERIMENTAL */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - public void setCurr(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.Value value) { + public void setCurr(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.NumericValue value) { this.jsiiSet("curr", java.util.Objects.requireNonNull(value, "curr is required")); } @@ -40376,7 +49759,7 @@ public interface ConfusingToJacksonStruct extends software.amazon.jsii.JsiiSeria * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - public Builder unionProperty(java.util.List unionProperty) { + public Builder unionProperty(java.util.List unionProperty) { this.unionProperty = unionProperty; return this; } @@ -41317,7 +50700,7 @@ public interface DerivedStruct extends software.amazon.jsii.JsiiSerializable, so * EXPERIMENTAL */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - default @org.jetbrains.annotations.Nullable java.util.Map getAnotherOptional() { + default @org.jetbrains.annotations.Nullable java.util.Map getAnotherOptional() { return null; } @@ -41352,7 +50735,7 @@ public interface DerivedStruct extends software.amazon.jsii.JsiiSerializable, so private java.time.Instant anotherRequired; private java.lang.Boolean bool; private software.amazon.jsii.tests.calculator.DoubleTrouble nonPrimitive; - private java.util.Map anotherOptional; + private java.util.Map anotherOptional; private java.lang.Object optionalAny; private java.util.List optionalArray; private java.lang.Number anumber; @@ -41398,8 +50781,9 @@ public interface DerivedStruct extends software.amazon.jsii.JsiiSerializable, so * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - public Builder anotherOptional(java.util.Map anotherOptional) { - this.anotherOptional = anotherOptional; + @SuppressWarnings("unchecked") + public Builder anotherOptional(java.util.Map anotherOptional) { + this.anotherOptional = (java.util.Map)anotherOptional; return this; } @@ -41481,7 +50865,7 @@ public interface DerivedStruct extends software.amazon.jsii.JsiiSerializable, so private final java.time.Instant anotherRequired; private final java.lang.Boolean bool; private final software.amazon.jsii.tests.calculator.DoubleTrouble nonPrimitive; - private final java.util.Map anotherOptional; + private final java.util.Map anotherOptional; private final java.lang.Object optionalAny; private final java.util.List optionalArray; private final java.lang.Number anumber; @@ -41497,7 +50881,7 @@ public interface DerivedStruct extends software.amazon.jsii.JsiiSerializable, so this.anotherRequired = this.jsiiGet("anotherRequired", java.time.Instant.class); this.bool = this.jsiiGet("bool", java.lang.Boolean.class); this.nonPrimitive = this.jsiiGet("nonPrimitive", software.amazon.jsii.tests.calculator.DoubleTrouble.class); - this.anotherOptional = this.jsiiGet("anotherOptional", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.lib.Value.class))); + this.anotherOptional = this.jsiiGet("anotherOptional", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.lib.NumericValue.class))); this.optionalAny = this.jsiiGet("optionalAny", java.lang.Object.class); this.optionalArray = this.jsiiGet("optionalArray", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class))); this.anumber = this.jsiiGet("anumber", java.lang.Number.class); @@ -41508,12 +50892,13 @@ public interface DerivedStruct extends software.amazon.jsii.JsiiSerializable, so /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ - private Jsii$Proxy(final java.time.Instant anotherRequired, final java.lang.Boolean bool, final software.amazon.jsii.tests.calculator.DoubleTrouble nonPrimitive, final java.util.Map anotherOptional, final java.lang.Object optionalAny, final java.util.List optionalArray, final java.lang.Number anumber, final java.lang.String astring, final java.util.List firstOptional) { + @SuppressWarnings("unchecked") + private Jsii$Proxy(final java.time.Instant anotherRequired, final java.lang.Boolean bool, final software.amazon.jsii.tests.calculator.DoubleTrouble nonPrimitive, final java.util.Map anotherOptional, final java.lang.Object optionalAny, final java.util.List optionalArray, final java.lang.Number anumber, final java.lang.String astring, final java.util.List firstOptional) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.anotherRequired = java.util.Objects.requireNonNull(anotherRequired, "anotherRequired is required"); this.bool = java.util.Objects.requireNonNull(bool, "bool is required"); this.nonPrimitive = java.util.Objects.requireNonNull(nonPrimitive, "nonPrimitive is required"); - this.anotherOptional = anotherOptional; + this.anotherOptional = (java.util.Map)anotherOptional; this.optionalAny = optionalAny; this.optionalArray = optionalArray; this.anumber = java.util.Objects.requireNonNull(anumber, "anumber is required"); @@ -41537,7 +50922,7 @@ public interface DerivedStruct extends software.amazon.jsii.JsiiSerializable, so } @Override - public java.util.Map getAnotherOptional() { + public java.util.Map getAnotherOptional() { return this.anotherOptional; } @@ -42576,6 +51961,127 @@ public class DoubleTrouble extends software.amazon.jsii.JsiiObject implements so `; +exports[`Generated code for "jsii-calc": /java/src/main/java/software/amazon/jsii/tests/calculator/DynamicPropertyBearer.java 1`] = ` +package software.amazon.jsii.tests.calculator; + +/** + * Ensures we can override a dynamic property that was inherited. + *

+ * EXPERIMENTAL + */ +@javax.annotation.Generated(value = "jsii-pacmak") +@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) +@software.amazon.jsii.Jsii(module = software.amazon.jsii.tests.calculator.$Module.class, fqn = "jsii-calc.DynamicPropertyBearer") +public class DynamicPropertyBearer extends software.amazon.jsii.JsiiObject { + + protected DynamicPropertyBearer(final software.amazon.jsii.JsiiObjectRef objRef) { + super(objRef); + } + + protected DynamicPropertyBearer(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { + super(initializationMode); + } + + /** + * EXPERIMENTAL + *

+ * @param valueStore This parameter is required. + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) + public DynamicPropertyBearer(final @org.jetbrains.annotations.NotNull java.lang.String valueStore) { + super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); + software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(valueStore, "valueStore is required") }); + } + + /** + * EXPERIMENTAL + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) + public @org.jetbrains.annotations.NotNull java.lang.String getDynamicProperty() { + return this.jsiiGet("dynamicProperty", java.lang.String.class); + } + + /** + * EXPERIMENTAL + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) + public void setDynamicProperty(final @org.jetbrains.annotations.NotNull java.lang.String value) { + this.jsiiSet("dynamicProperty", java.util.Objects.requireNonNull(value, "dynamicProperty is required")); + } + + /** + * EXPERIMENTAL + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) + public @org.jetbrains.annotations.NotNull java.lang.String getValueStore() { + return this.jsiiGet("valueStore", java.lang.String.class); + } + + /** + * EXPERIMENTAL + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) + public void setValueStore(final @org.jetbrains.annotations.NotNull java.lang.String value) { + this.jsiiSet("valueStore", java.util.Objects.requireNonNull(value, "valueStore is required")); + } +} + +`; + +exports[`Generated code for "jsii-calc": /java/src/main/java/software/amazon/jsii/tests/calculator/DynamicPropertyBearerChild.java 1`] = ` +package software.amazon.jsii.tests.calculator; + +/** + * EXPERIMENTAL + */ +@javax.annotation.Generated(value = "jsii-pacmak") +@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) +@software.amazon.jsii.Jsii(module = software.amazon.jsii.tests.calculator.$Module.class, fqn = "jsii-calc.DynamicPropertyBearerChild") +public class DynamicPropertyBearerChild extends software.amazon.jsii.tests.calculator.DynamicPropertyBearer { + + protected DynamicPropertyBearerChild(final software.amazon.jsii.JsiiObjectRef objRef) { + super(objRef); + } + + protected DynamicPropertyBearerChild(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { + super(initializationMode); + } + + /** + * EXPERIMENTAL + *

+ * @param originalValue This parameter is required. + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) + public DynamicPropertyBearerChild(final @org.jetbrains.annotations.NotNull java.lang.String originalValue) { + super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); + software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(originalValue, "originalValue is required") }); + } + + /** + * Sets \`this.dynamicProperty\` to the new value, and returns the old value. + *

+ * EXPERIMENTAL + *

+ * @return the old value that was set. + * @param newValue the new value to be set. This parameter is required. + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) + public @org.jetbrains.annotations.NotNull java.lang.String overrideValue(final @org.jetbrains.annotations.NotNull java.lang.String newValue) { + return this.jsiiCall("overrideValue", java.lang.String.class, new Object[] { java.util.Objects.requireNonNull(newValue, "newValue is required") }); + } + + /** + * EXPERIMENTAL + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) + public @org.jetbrains.annotations.NotNull java.lang.String getOriginalValue() { + return this.jsiiGet("originalValue", java.lang.String.class); + } +} + +`; + exports[`Generated code for "jsii-calc": /java/src/main/java/software/amazon/jsii/tests/calculator/EnumDispenser.java 1`] = ` package software.amazon.jsii.tests.calculator; @@ -47059,8 +56565,8 @@ public class JsiiAgent extends software.amazon.jsii.JsiiObject { * EXPERIMENTAL */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - public static @org.jetbrains.annotations.Nullable java.lang.String getJsiiAgent() { - return software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.jsii.tests.calculator.JsiiAgent.class, "jsiiAgent", java.lang.String.class); + public static @org.jetbrains.annotations.Nullable java.lang.String getValue() { + return software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.jsii.tests.calculator.JsiiAgent.class, "value", java.lang.String.class); } } @@ -47619,7 +57125,7 @@ public class Multiply extends software.amazon.jsii.tests.calculator.BinaryOperat * @param rhs Right-hand side operand. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - public Multiply(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.Value lhs, final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.Value rhs) { + public Multiply(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.NumericValue lhs, final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.NumericValue rhs) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(lhs, "lhs is required"), java.util.Objects.requireNonNull(rhs, "rhs is required") }); } @@ -47709,7 +57215,7 @@ public class Negate extends software.amazon.jsii.tests.calculator.UnaryOperation * @param operand This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - public Negate(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.Value operand) { + public Negate(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.NumericValue operand) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(operand, "operand is required") }); } @@ -48150,8 +57656,9 @@ public interface NullShouldBeTreatedAsUndefinedData extends software.amazon.jsii * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - public Builder arrayWithThreeElementsAndUndefinedAsSecondArgument(java.util.List arrayWithThreeElementsAndUndefinedAsSecondArgument) { - this.arrayWithThreeElementsAndUndefinedAsSecondArgument = arrayWithThreeElementsAndUndefinedAsSecondArgument; + @SuppressWarnings("unchecked") + public Builder arrayWithThreeElementsAndUndefinedAsSecondArgument(java.util.List arrayWithThreeElementsAndUndefinedAsSecondArgument) { + this.arrayWithThreeElementsAndUndefinedAsSecondArgument = (java.util.List)arrayWithThreeElementsAndUndefinedAsSecondArgument; return this; } @@ -48199,9 +57706,10 @@ public interface NullShouldBeTreatedAsUndefinedData extends software.amazon.jsii /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ - private Jsii$Proxy(final java.util.List arrayWithThreeElementsAndUndefinedAsSecondArgument, final java.lang.Object thisShouldBeUndefined) { + @SuppressWarnings("unchecked") + private Jsii$Proxy(final java.util.List arrayWithThreeElementsAndUndefinedAsSecondArgument, final java.lang.Object thisShouldBeUndefined) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); - this.arrayWithThreeElementsAndUndefinedAsSecondArgument = java.util.Objects.requireNonNull(arrayWithThreeElementsAndUndefinedAsSecondArgument, "arrayWithThreeElementsAndUndefinedAsSecondArgument is required"); + this.arrayWithThreeElementsAndUndefinedAsSecondArgument = (java.util.List)java.util.Objects.requireNonNull(arrayWithThreeElementsAndUndefinedAsSecondArgument, "arrayWithThreeElementsAndUndefinedAsSecondArgument is required"); this.thisShouldBeUndefined = thisShouldBeUndefined; } @@ -48364,7 +57872,7 @@ public class ObjectRefsInCollections extends software.amazon.jsii.JsiiObject { * @param values This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - public @org.jetbrains.annotations.NotNull java.lang.Number sumFromArray(final @org.jetbrains.annotations.NotNull java.util.List values) { + public @org.jetbrains.annotations.NotNull java.lang.Number sumFromArray(final @org.jetbrains.annotations.NotNull java.util.List values) { return this.jsiiCall("sumFromArray", java.lang.Number.class, new Object[] { java.util.Objects.requireNonNull(values, "values is required") }); } @@ -48376,7 +57884,7 @@ public class ObjectRefsInCollections extends software.amazon.jsii.JsiiObject { * @param values This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - public @org.jetbrains.annotations.NotNull java.lang.Number sumFromMap(final @org.jetbrains.annotations.NotNull java.util.Map values) { + public @org.jetbrains.annotations.NotNull java.lang.Number sumFromMap(final @org.jetbrains.annotations.NotNull java.util.Map values) { return this.jsiiCall("sumFromMap", java.lang.Number.class, new Object[] { java.util.Objects.requireNonNull(values, "values is required") }); } } @@ -49189,7 +58697,7 @@ public class Power extends software.amazon.jsii.tests.calculator.composition.Com * @param pow The number of times to multiply. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - public Power(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.Value base, final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.Value pow) { + public Power(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.NumericValue base, final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.NumericValue pow) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(base, "base is required"), java.util.Objects.requireNonNull(pow, "pow is required") }); } @@ -49200,8 +58708,8 @@ public class Power extends software.amazon.jsii.tests.calculator.composition.Com * EXPERIMENTAL */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.Value getBase() { - return this.jsiiGet("base", software.amazon.jsii.tests.calculator.lib.Value.class); + public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.NumericValue getBase() { + return this.jsiiGet("base", software.amazon.jsii.tests.calculator.lib.NumericValue.class); } /** @@ -49213,8 +58721,8 @@ public class Power extends software.amazon.jsii.tests.calculator.composition.Com */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.Value getExpression() { - return this.jsiiGet("expression", software.amazon.jsii.tests.calculator.lib.Value.class); + public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.NumericValue getExpression() { + return this.jsiiGet("expression", software.amazon.jsii.tests.calculator.lib.NumericValue.class); } /** @@ -49223,8 +58731,8 @@ public class Power extends software.amazon.jsii.tests.calculator.composition.Com * EXPERIMENTAL */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.Value getPow() { - return this.jsiiGet("pow", software.amazon.jsii.tests.calculator.lib.Value.class); + public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.NumericValue getPow() { + return this.jsiiGet("pow", software.amazon.jsii.tests.calculator.lib.NumericValue.class); } } @@ -51910,8 +61418,8 @@ public class Sum extends software.amazon.jsii.tests.calculator.composition.Compo */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.Value getExpression() { - return this.jsiiGet("expression", software.amazon.jsii.tests.calculator.lib.Value.class); + public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.NumericValue getExpression() { + return this.jsiiGet("expression", software.amazon.jsii.tests.calculator.lib.NumericValue.class); } /** @@ -51920,8 +61428,8 @@ public class Sum extends software.amazon.jsii.tests.calculator.composition.Compo * EXPERIMENTAL */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - public @org.jetbrains.annotations.NotNull java.util.List getParts() { - return java.util.Collections.unmodifiableList(this.jsiiGet("parts", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.lib.Value.class)))); + public @org.jetbrains.annotations.NotNull java.util.List getParts() { + return java.util.Collections.unmodifiableList(this.jsiiGet("parts", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.lib.NumericValue.class)))); } /** @@ -51930,7 +61438,7 @@ public class Sum extends software.amazon.jsii.tests.calculator.composition.Compo * EXPERIMENTAL */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - public void setParts(final @org.jetbrains.annotations.NotNull java.util.List value) { + public void setParts(final @org.jetbrains.annotations.NotNull java.util.List value) { this.jsiiSet("parts", java.util.Objects.requireNonNull(value, "parts is required")); } } @@ -52882,7 +62390,7 @@ public abstract class UnaryOperation extends software.amazon.jsii.tests.calculat * @param operand This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - protected UnaryOperation(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.Value operand) { + protected UnaryOperation(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.NumericValue operand) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(operand, "operand is required") }); } @@ -52891,8 +62399,8 @@ public abstract class UnaryOperation extends software.amazon.jsii.tests.calculat * EXPERIMENTAL */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.Value getOperand() { - return this.jsiiGet("operand", software.amazon.jsii.tests.calculator.lib.Value.class); + public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.NumericValue getOperand() { + return this.jsiiGet("operand", software.amazon.jsii.tests.calculator.lib.NumericValue.class); } /** @@ -53661,7 +63169,7 @@ public abstract class CompositeOperation extends software.amazon.jsii.tests.calc * EXPERIMENTAL */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - public abstract @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.Value getExpression(); + public abstract @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.NumericValue getExpression(); /** * The value. @@ -53774,8 +63282,8 @@ public abstract class CompositeOperation extends software.amazon.jsii.tests.calc */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.Value getExpression() { - return this.jsiiGet("expression", software.amazon.jsii.tests.calculator.lib.Value.class); + public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.NumericValue getExpression() { + return this.jsiiGet("expression", software.amazon.jsii.tests.calculator.lib.NumericValue.class); } /** @@ -55500,6 +65008,8 @@ jsii-calc.DoNotRecognizeAnyAsOptional=software.amazon.jsii.tests.calculator.DoNo jsii-calc.DocumentedClass=software.amazon.jsii.tests.calculator.DocumentedClass jsii-calc.DontComplainAboutVariadicAfterOptional=software.amazon.jsii.tests.calculator.DontComplainAboutVariadicAfterOptional jsii-calc.DoubleTrouble=software.amazon.jsii.tests.calculator.DoubleTrouble +jsii-calc.DynamicPropertyBearer=software.amazon.jsii.tests.calculator.DynamicPropertyBearer +jsii-calc.DynamicPropertyBearerChild=software.amazon.jsii.tests.calculator.DynamicPropertyBearerChild jsii-calc.EnumDispenser=software.amazon.jsii.tests.calculator.EnumDispenser jsii-calc.EraseUndefinedHashValues=software.amazon.jsii.tests.calculator.EraseUndefinedHashValues jsii-calc.EraseUndefinedHashValuesOptions=software.amazon.jsii.tests.calculator.EraseUndefinedHashValuesOptions @@ -55708,7 +65218,7 @@ foo = "bar" exports[`Generated code for "jsii-calc": /python/pyproject.toml 1`] = ` [build-system] -requires = ["setuptools >= 49.3.1", "wheel >= 0.34.2"] +requires = ["setuptools~=49.3", "wheel~=0.34"] build-backend = "setuptools.build_meta" `; @@ -55829,8 +65339,8 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions from ._jsii import * @@ -55842,7 +65352,8 @@ from .composition import CompositeOperation as _CompositeOperation_1c4d123b class AbstractClassBase( - metaclass=jsii.JSIIAbstractClass, jsii_type="jsii-calc.AbstractClassBase" + metaclass=jsii.JSIIAbstractClass, + jsii_type="jsii-calc.AbstractClassBase", ): """ stability @@ -55860,10 +65371,10 @@ class AbstractClassBase( """ jsii.create(AbstractClassBase, self, []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="abstractProperty") @abc.abstractmethod - def abstract_property(self) -> str: + def abstract_property(self) -> builtins.str: """ stability :stability: experimental @@ -55872,9 +65383,9 @@ class AbstractClassBase( class _AbstractClassBaseProxy(AbstractClassBase): - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="abstractProperty") - def abstract_property(self) -> str: + def abstract_property(self) -> builtins.str: """ stability :stability: experimental @@ -55883,7 +65394,8 @@ class _AbstractClassBaseProxy(AbstractClassBase): class AbstractClassReturner( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AbstractClassReturner" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.AbstractClassReturner", ): """ stability @@ -55913,7 +65425,7 @@ class AbstractClassReturner( """ return jsii.invoke(self, "giveMeInterface", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="returnAbstractFromProperty") def return_abstract_from_property(self) -> "AbstractClassBase": """ @@ -55924,7 +65436,8 @@ class AbstractClassReturner( class AbstractSuite( - metaclass=jsii.JSIIAbstractClass, jsii_type="jsii-calc.AbstractSuite" + metaclass=jsii.JSIIAbstractClass, + jsii_type="jsii-calc.AbstractSuite", ): """Ensures abstract members implementations correctly register overrides in various languages. @@ -55945,7 +65458,7 @@ class AbstractSuite( @jsii.member(jsii_name="someMethod") @abc.abstractmethod - def _some_method(self, str: str) -> str: + def _some_method(self, str: builtins.str) -> builtins.str: """ :param str: - @@ -55955,7 +65468,7 @@ class AbstractSuite( ... @jsii.member(jsii_name="workItAll") - def work_it_all(self, seed: str) -> str: + def work_it_all(self, seed: builtins.str) -> builtins.str: """Sets \`\`seed\`\` to \`\`this.property\`\`, then calls \`\`someMethod\`\` with \`\`this.property\`\` and returns the result. :param seed: a \`\`string\`\`. @@ -55965,25 +65478,25 @@ class AbstractSuite( """ return jsii.invoke(self, "workItAll", [seed]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="property") @abc.abstractmethod - def _property(self) -> str: + def _property(self) -> builtins.str: """ stability :stability: experimental """ ... - @_property.setter + @_property.setter # type: ignore @abc.abstractmethod - def _property(self, value: str) -> None: + def _property(self, value: builtins.str) -> None: ... class _AbstractSuiteProxy(AbstractSuite): @jsii.member(jsii_name="someMethod") - def _some_method(self, str: str) -> str: + def _some_method(self, str: builtins.str) -> builtins.str: """ :param str: - @@ -55992,17 +65505,17 @@ class _AbstractSuiteProxy(AbstractSuite): """ return jsii.invoke(self, "someMethod", [str]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="property") - def _property(self) -> str: + def _property(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "property") - @_property.setter - def _property(self, value: str) -> None: + @_property.setter # type: ignore + def _property(self, value: builtins.str) -> None: jsii.set(self, "property", value) @@ -56051,7 +65564,7 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): """ return jsii.invoke(self, "enumMethod", [value]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="enumPropertyValue") def enum_property_value(self) -> jsii.Number: """ @@ -56060,7 +65573,7 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): """ return jsii.get(self, "enumPropertyValue") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="anyArrayProperty") def any_array_property(self) -> typing.List[typing.Any]: """ @@ -56069,24 +65582,24 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): """ return jsii.get(self, "anyArrayProperty") - @any_array_property.setter + @any_array_property.setter # type: ignore def any_array_property(self, value: typing.List[typing.Any]) -> None: jsii.set(self, "anyArrayProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="anyMapProperty") - def any_map_property(self) -> typing.Mapping[str, typing.Any]: + def any_map_property(self) -> typing.Mapping[builtins.str, typing.Any]: """ stability :stability: experimental """ return jsii.get(self, "anyMapProperty") - @any_map_property.setter - def any_map_property(self, value: typing.Mapping[str, typing.Any]) -> None: + @any_map_property.setter # type: ignore + def any_map_property(self, value: typing.Mapping[builtins.str, typing.Any]) -> None: jsii.set(self, "anyMapProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="anyProperty") def any_property(self) -> typing.Any: """ @@ -56095,37 +65608,37 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): """ return jsii.get(self, "anyProperty") - @any_property.setter + @any_property.setter # type: ignore def any_property(self, value: typing.Any) -> None: jsii.set(self, "anyProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="arrayProperty") - def array_property(self) -> typing.List[str]: + def array_property(self) -> typing.List[builtins.str]: """ stability :stability: experimental """ return jsii.get(self, "arrayProperty") - @array_property.setter - def array_property(self, value: typing.List[str]) -> None: + @array_property.setter # type: ignore + def array_property(self, value: typing.List[builtins.str]) -> None: jsii.set(self, "arrayProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="booleanProperty") - def boolean_property(self) -> bool: + def boolean_property(self) -> builtins.bool: """ stability :stability: experimental """ return jsii.get(self, "booleanProperty") - @boolean_property.setter - def boolean_property(self, value: bool) -> None: + @boolean_property.setter # type: ignore + def boolean_property(self, value: builtins.bool) -> None: jsii.set(self, "booleanProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="dateProperty") def date_property(self) -> datetime.datetime: """ @@ -56134,11 +65647,11 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): """ return jsii.get(self, "dateProperty") - @date_property.setter + @date_property.setter # type: ignore def date_property(self, value: datetime.datetime) -> None: jsii.set(self, "dateProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="enumProperty") def enum_property(self) -> "AllTypesEnum": """ @@ -56147,11 +65660,11 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): """ return jsii.get(self, "enumProperty") - @enum_property.setter + @enum_property.setter # type: ignore def enum_property(self, value: "AllTypesEnum") -> None: jsii.set(self, "enumProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="jsonProperty") def json_property(self) -> typing.Mapping[typing.Any, typing.Any]: """ @@ -56160,26 +65673,27 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): """ return jsii.get(self, "jsonProperty") - @json_property.setter + @json_property.setter # type: ignore def json_property(self, value: typing.Mapping[typing.Any, typing.Any]) -> None: jsii.set(self, "jsonProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="mapProperty") - def map_property(self) -> typing.Mapping[str, scope.jsii_calc_lib.Number]: + def map_property(self) -> typing.Mapping[builtins.str, scope.jsii_calc_lib.Number]: """ stability :stability: experimental """ return jsii.get(self, "mapProperty") - @map_property.setter + @map_property.setter # type: ignore def map_property( - self, value: typing.Mapping[str, scope.jsii_calc_lib.Number] + self, + value: typing.Mapping[builtins.str, scope.jsii_calc_lib.Number], ) -> None: jsii.set(self, "mapProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="numberProperty") def number_property(self) -> jsii.Number: """ @@ -56188,77 +65702,78 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): """ return jsii.get(self, "numberProperty") - @number_property.setter + @number_property.setter # type: ignore def number_property(self, value: jsii.Number) -> None: jsii.set(self, "numberProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="stringProperty") - def string_property(self) -> str: + def string_property(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "stringProperty") - @string_property.setter - def string_property(self, value: str) -> None: + @string_property.setter # type: ignore + def string_property(self, value: builtins.str) -> None: jsii.set(self, "stringProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="unionArrayProperty") def union_array_property( self, - ) -> typing.List[typing.Union[jsii.Number, scope.jsii_calc_lib.Value]]: + ) -> typing.List[typing.Union[jsii.Number, scope.jsii_calc_lib.NumericValue]]: """ stability :stability: experimental """ return jsii.get(self, "unionArrayProperty") - @union_array_property.setter + @union_array_property.setter # type: ignore def union_array_property( - self, value: typing.List[typing.Union[jsii.Number, scope.jsii_calc_lib.Value]] + self, + value: typing.List[typing.Union[jsii.Number, scope.jsii_calc_lib.NumericValue]], ) -> None: jsii.set(self, "unionArrayProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="unionMapProperty") def union_map_property( self, - ) -> typing.Mapping[str, typing.Union[str, jsii.Number, scope.jsii_calc_lib.Number]]: + ) -> typing.Mapping[builtins.str, typing.Union[builtins.str, jsii.Number, scope.jsii_calc_lib.Number]]: """ stability :stability: experimental """ return jsii.get(self, "unionMapProperty") - @union_map_property.setter + @union_map_property.setter # type: ignore def union_map_property( self, - value: typing.Mapping[str, typing.Union[str, jsii.Number, scope.jsii_calc_lib.Number]], + value: typing.Mapping[builtins.str, typing.Union[builtins.str, jsii.Number, scope.jsii_calc_lib.Number]], ) -> None: jsii.set(self, "unionMapProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="unionProperty") def union_property( self, - ) -> typing.Union[str, jsii.Number, "Multiply", scope.jsii_calc_lib.Number]: + ) -> typing.Union[builtins.str, jsii.Number, "Multiply", scope.jsii_calc_lib.Number]: """ stability :stability: experimental """ return jsii.get(self, "unionProperty") - @union_property.setter + @union_property.setter # type: ignore def union_property( self, - value: typing.Union[str, jsii.Number, "Multiply", scope.jsii_calc_lib.Number], + value: typing.Union[builtins.str, jsii.Number, "Multiply", scope.jsii_calc_lib.Number], ) -> None: jsii.set(self, "unionProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="unknownArrayProperty") def unknown_array_property(self) -> typing.List[typing.Any]: """ @@ -56267,24 +65782,27 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): """ return jsii.get(self, "unknownArrayProperty") - @unknown_array_property.setter + @unknown_array_property.setter # type: ignore def unknown_array_property(self, value: typing.List[typing.Any]) -> None: jsii.set(self, "unknownArrayProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="unknownMapProperty") - def unknown_map_property(self) -> typing.Mapping[str, typing.Any]: + def unknown_map_property(self) -> typing.Mapping[builtins.str, typing.Any]: """ stability :stability: experimental """ return jsii.get(self, "unknownMapProperty") - @unknown_map_property.setter - def unknown_map_property(self, value: typing.Mapping[str, typing.Any]) -> None: + @unknown_map_property.setter # type: ignore + def unknown_map_property( + self, + value: typing.Mapping[builtins.str, typing.Any], + ) -> None: jsii.set(self, "unknownMapProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="unknownProperty") def unknown_property(self) -> typing.Any: """ @@ -56293,11 +65811,11 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): """ return jsii.get(self, "unknownProperty") - @unknown_property.setter + @unknown_property.setter # type: ignore def unknown_property(self, value: typing.Any) -> None: jsii.set(self, "unknownProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="optionalEnumValue") def optional_enum_value(self) -> typing.Optional["StringEnum"]: """ @@ -56306,7 +65824,7 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): """ return jsii.get(self, "optionalEnumValue") - @optional_enum_value.setter + @optional_enum_value.setter # type: ignore def optional_enum_value(self, value: typing.Optional["StringEnum"]) -> None: jsii.set(self, "optionalEnumValue", value) @@ -56336,7 +65854,8 @@ class AllTypesEnum(enum.Enum): class AllowedMethodNames( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllowedMethodNames" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.AllowedMethodNames", ): """ stability @@ -56351,7 +65870,7 @@ class AllowedMethodNames( jsii.create(AllowedMethodNames, self, []) @jsii.member(jsii_name="getBar") - def get_bar(self, _p1: str, _p2: jsii.Number) -> None: + def get_bar(self, _p1: builtins.str, _p2: jsii.Number) -> None: """ :param _p1: - :param _p2: - @@ -56362,7 +65881,7 @@ class AllowedMethodNames( return jsii.invoke(self, "getBar", [_p1, _p2]) @jsii.member(jsii_name="getFoo") - def get_foo(self, with_param: str) -> str: + def get_foo(self, with_param: builtins.str) -> builtins.str: """getXxx() is not allowed (see negatives), but getXxx(a, ...) is okay. :param with_param: - @@ -56373,7 +65892,7 @@ class AllowedMethodNames( return jsii.invoke(self, "getFoo", [with_param]) @jsii.member(jsii_name="setBar") - def set_bar(self, _x: str, _y: jsii.Number, _z: bool) -> None: + def set_bar(self, _x: builtins.str, _y: jsii.Number, _z: builtins.bool) -> None: """ :param _x: - :param _y: - @@ -56385,7 +65904,7 @@ class AllowedMethodNames( return jsii.invoke(self, "setBar", [_x, _y, _z]) @jsii.member(jsii_name="setFoo") - def set_foo(self, _x: str, _y: jsii.Number) -> None: + def set_foo(self, _x: builtins.str, _y: jsii.Number) -> None: """setFoo(x) is not allowed (see negatives), but setXxx(a, b, ...) is okay. :param _x: - @@ -56398,7 +65917,8 @@ class AllowedMethodNames( class AmbiguousParameters( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AmbiguousParameters" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.AmbiguousParameters", ): """ stability @@ -56406,7 +65926,11 @@ class AmbiguousParameters( """ def __init__( - self, scope_: "Bell", *, scope: str, props: typing.Optional[bool] = None + self, + scope_: "Bell", + *, + scope: builtins.str, + props: typing.Optional[builtins.bool] = None, ) -> None: """ :param scope_: - @@ -56420,7 +65944,7 @@ class AmbiguousParameters( jsii.create(AmbiguousParameters, self, [scope_, props_]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="props") def props(self) -> "StructParameterType": """ @@ -56429,7 +65953,7 @@ class AmbiguousParameters( """ return jsii.get(self, "props") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="scope") def scope(self) -> "Bell": """ @@ -56440,7 +65964,8 @@ class AmbiguousParameters( class AsyncVirtualMethods( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AsyncVirtualMethods" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.AsyncVirtualMethods", ): """ stability @@ -56572,7 +66097,9 @@ class BinaryOperation( return _BinaryOperationProxy def __init__( - self, lhs: scope.jsii_calc_lib.Value, rhs: scope.jsii_calc_lib.Value + self, + lhs: scope.jsii_calc_lib.NumericValue, + rhs: scope.jsii_calc_lib.NumericValue, ) -> None: """Creates a BinaryOperation. @@ -56585,7 +66112,7 @@ class BinaryOperation( jsii.create(BinaryOperation, self, [lhs, rhs]) @jsii.member(jsii_name="hello") - def hello(self) -> str: + def hello(self) -> builtins.str: """Say hello! stability @@ -56593,9 +66120,9 @@ class BinaryOperation( """ return jsii.invoke(self, "hello", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="lhs") - def lhs(self) -> scope.jsii_calc_lib.Value: + def lhs(self) -> scope.jsii_calc_lib.NumericValue: """Left-hand side operand. stability @@ -56603,9 +66130,9 @@ class BinaryOperation( """ return jsii.get(self, "lhs") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="rhs") - def rhs(self) -> scope.jsii_calc_lib.Value: + def rhs(self) -> scope.jsii_calc_lib.NumericValue: """Right-hand side operand. stability @@ -56615,13 +66142,14 @@ class BinaryOperation( class _BinaryOperationProxy( - BinaryOperation, jsii.proxy_for(scope.jsii_calc_lib.Operation) + BinaryOperation, jsii.proxy_for(scope.jsii_calc_lib.Operation) # type: ignore ): pass class BurriedAnonymousObject( - metaclass=jsii.JSIIAbstractClass, jsii_type="jsii-calc.BurriedAnonymousObject" + metaclass=jsii.JSIIAbstractClass, + jsii_type="jsii-calc.BurriedAnonymousObject", ): """See https://github.com/aws/aws-cdk/issues/7977. @@ -56641,7 +66169,7 @@ class BurriedAnonymousObject( jsii.create(BurriedAnonymousObject, self, []) @jsii.member(jsii_name="check") - def check(self) -> bool: + def check(self) -> builtins.bool: """ stability :stability: experimental @@ -56780,9 +66308,9 @@ class Calculator( """ return jsii.invoke(self, "readUnionValue", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="expression") - def expression(self) -> scope.jsii_calc_lib.Value: + def expression(self) -> scope.jsii_calc_lib.NumericValue: """Returns the expression. stability @@ -56790,9 +66318,9 @@ class Calculator( """ return jsii.get(self, "expression") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="operationsLog") - def operations_log(self) -> typing.List[scope.jsii_calc_lib.Value]: + def operations_log(self) -> typing.List[scope.jsii_calc_lib.NumericValue]: """A log of all operations. stability @@ -56800,11 +66328,11 @@ class Calculator( """ return jsii.get(self, "operationsLog") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="operationsMap") def operations_map( self, - ) -> typing.Mapping[str, typing.List[scope.jsii_calc_lib.Value]]: + ) -> typing.Mapping[builtins.str, typing.List[scope.jsii_calc_lib.NumericValue]]: """A map of per operation name of all operations performed. stability @@ -56812,9 +66340,9 @@ class Calculator( """ return jsii.get(self, "operationsMap") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="curr") - def curr(self) -> scope.jsii_calc_lib.Value: + def curr(self) -> scope.jsii_calc_lib.NumericValue: """The current value. stability @@ -56822,11 +66350,11 @@ class Calculator( """ return jsii.get(self, "curr") - @curr.setter - def curr(self, value: scope.jsii_calc_lib.Value) -> None: + @curr.setter # type: ignore + def curr(self, value: scope.jsii_calc_lib.NumericValue) -> None: jsii.set(self, "curr", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="maxValue") def max_value(self) -> typing.Optional[jsii.Number]: """The maximum value allows in this calculator. @@ -56836,11 +66364,11 @@ class Calculator( """ return jsii.get(self, "maxValue") - @max_value.setter + @max_value.setter # type: ignore def max_value(self, value: typing.Optional[jsii.Number]) -> None: jsii.set(self, "maxValue", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="unionProperty") def union_property( self, @@ -56852,9 +66380,10 @@ class Calculator( """ return jsii.get(self, "unionProperty") - @union_property.setter + @union_property.setter # type: ignore def union_property( - self, value: typing.Optional[typing.Union["Add", "Multiply", "Power"]] + self, + value: typing.Optional[typing.Union["Add", "Multiply", "Power"]], ) -> None: jsii.set(self, "unionProperty", value) @@ -56879,7 +66408,7 @@ class CalculatorProps: stability :stability: experimental """ - self._values = {} + self._values: typing.Dict[str, typing.Any] = {} if initial_value is not None: self._values["initial_value"] = initial_value if maximum_value is not None: @@ -56897,7 +66426,8 @@ class CalculatorProps: stability :stability: experimental """ - return self._values.get("initial_value") + result = self._values.get("initial_value") + return result @builtins.property def maximum_value(self) -> typing.Optional[jsii.Number]: @@ -56909,12 +66439,13 @@ class CalculatorProps: stability :stability: experimental """ - return self._values.get("maximum_value") + result = self._values.get("maximum_value") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -56924,14 +66455,19 @@ class CalculatorProps: class ClassWithCollections( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ClassWithCollections" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.ClassWithCollections", ): """ stability :stability: experimental """ - def __init__(self, map: typing.Mapping[str, str], array: typing.List[str]) -> None: + def __init__( + self, + map: typing.Mapping[builtins.str, builtins.str], + array: typing.List[builtins.str], + ) -> None: """ :param map: - :param array: - @@ -56943,7 +66479,7 @@ class ClassWithCollections( @jsii.member(jsii_name="createAList") @builtins.classmethod - def create_a_list(cls) -> typing.List[str]: + def create_a_list(cls) -> typing.List[builtins.str]: """ stability :stability: experimental @@ -56952,63 +66488,63 @@ class ClassWithCollections( @jsii.member(jsii_name="createAMap") @builtins.classmethod - def create_a_map(cls) -> typing.Mapping[str, str]: + def create_a_map(cls) -> typing.Mapping[builtins.str, builtins.str]: """ stability :stability: experimental """ return jsii.sinvoke(cls, "createAMap", []) - @jsii.python.classproperty + @jsii.python.classproperty # type: ignore @jsii.member(jsii_name="staticArray") - def static_array(cls) -> typing.List[str]: + def static_array(cls) -> typing.List[builtins.str]: """ stability :stability: experimental """ return jsii.sget(cls, "staticArray") - @static_array.setter - def static_array(cls, value: typing.List[str]) -> None: + @static_array.setter # type: ignore + def static_array(cls, value: typing.List[builtins.str]) -> None: jsii.sset(cls, "staticArray", value) - @jsii.python.classproperty + @jsii.python.classproperty # type: ignore @jsii.member(jsii_name="staticMap") - def static_map(cls) -> typing.Mapping[str, str]: + def static_map(cls) -> typing.Mapping[builtins.str, builtins.str]: """ stability :stability: experimental """ return jsii.sget(cls, "staticMap") - @static_map.setter - def static_map(cls, value: typing.Mapping[str, str]) -> None: + @static_map.setter # type: ignore + def static_map(cls, value: typing.Mapping[builtins.str, builtins.str]) -> None: jsii.sset(cls, "staticMap", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="array") - def array(self) -> typing.List[str]: + def array(self) -> typing.List[builtins.str]: """ stability :stability: experimental """ return jsii.get(self, "array") - @array.setter - def array(self, value: typing.List[str]) -> None: + @array.setter # type: ignore + def array(self, value: typing.List[builtins.str]) -> None: jsii.set(self, "array", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="map") - def map(self) -> typing.Mapping[str, str]: + def map(self) -> typing.Mapping[builtins.str, builtins.str]: """ stability :stability: experimental """ return jsii.get(self, "map") - @map.setter - def map(self, value: typing.Mapping[str, str]) -> None: + @map.setter # type: ignore + def map(self, value: typing.Mapping[builtins.str, builtins.str]) -> None: jsii.set(self, "map", value) @@ -57038,14 +66574,15 @@ class ClassWithDocs(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ClassWithDocs" class ClassWithJavaReservedWords( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ClassWithJavaReservedWords" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.ClassWithJavaReservedWords", ): """ stability :stability: experimental """ - def __init__(self, int: str) -> None: + def __init__(self, int: builtins.str) -> None: """ :param int: - @@ -57055,7 +66592,7 @@ class ClassWithJavaReservedWords( jsii.create(ClassWithJavaReservedWords, self, [int]) @jsii.member(jsii_name="import") - def import_(self, assert_: str) -> str: + def import_(self, assert_: builtins.str) -> builtins.str: """ :param assert_: - @@ -57064,9 +66601,9 @@ class ClassWithJavaReservedWords( """ return jsii.invoke(self, "import", [assert_]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="int") - def int(self) -> str: + def int(self) -> builtins.str: """ stability :stability: experimental @@ -57090,7 +66627,7 @@ class ClassWithMutableObjectLiteralProperty( """ jsii.create(ClassWithMutableObjectLiteralProperty, self, []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="mutableObject") def mutable_object(self) -> "IMutableObjectLiteral": """ @@ -57099,13 +66636,14 @@ class ClassWithMutableObjectLiteralProperty( """ return jsii.get(self, "mutableObject") - @mutable_object.setter + @mutable_object.setter # type: ignore def mutable_object(self, value: "IMutableObjectLiteral") -> None: jsii.set(self, "mutableObject", value) class ConfusingToJackson( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ConfusingToJackson" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.ConfusingToJackson", ): """This tries to confuse Jackson by having overloaded property setters. @@ -57133,7 +66671,7 @@ class ConfusingToJackson( """ return jsii.sinvoke(cls, "makeStructInstance", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="unionProperty") def union_property( self, @@ -57144,7 +66682,7 @@ class ConfusingToJackson( """ return jsii.get(self, "unionProperty") - @union_property.setter + @union_property.setter # type: ignore def union_property( self, value: typing.Optional[typing.Union[scope.jsii_calc_lib.IFriendly, typing.List[typing.Union[scope.jsii_calc_lib.IFriendly, "AbstractClass"]]]], @@ -57169,7 +66707,7 @@ class ConfusingToJacksonStruct: stability :stability: experimental """ - self._values = {} + self._values: typing.Dict[str, typing.Any] = {} if union_property is not None: self._values["union_property"] = union_property @@ -57181,12 +66719,13 @@ class ConfusingToJacksonStruct: stability :stability: experimental """ - return self._values.get("union_property") + result = self._values.get("union_property") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -57196,7 +66735,8 @@ class ConfusingToJacksonStruct: class ConstructorPassesThisOut( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ConstructorPassesThisOut" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.ConstructorPassesThisOut", ): """ stability @@ -57291,7 +66831,8 @@ class Constructors(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Constructors"): class ConsumePureInterface( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ConsumePureInterface" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.ConsumePureInterface", ): """ stability @@ -57317,7 +66858,8 @@ class ConsumePureInterface( class ConsumerCanRingBell( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ConsumerCanRingBell" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.ConsumerCanRingBell", ): """Test calling back to consumers that implement interfaces. @@ -57337,7 +66879,10 @@ class ConsumerCanRingBell( @jsii.member(jsii_name="staticImplementedByObjectLiteral") @builtins.classmethod - def static_implemented_by_object_literal(cls, ringer: "IBellRinger") -> bool: + def static_implemented_by_object_literal( + cls, + ringer: "IBellRinger", + ) -> builtins.bool: """...if the interface is implemented using an object literal. Returns whether the bell was rung. @@ -57351,7 +66896,10 @@ class ConsumerCanRingBell( @jsii.member(jsii_name="staticImplementedByPrivateClass") @builtins.classmethod - def static_implemented_by_private_class(cls, ringer: "IBellRinger") -> bool: + def static_implemented_by_private_class( + cls, + ringer: "IBellRinger", + ) -> builtins.bool: """...if the interface is implemented using a private class. Return whether the bell was rung. @@ -57365,7 +66913,7 @@ class ConsumerCanRingBell( @jsii.member(jsii_name="staticImplementedByPublicClass") @builtins.classmethod - def static_implemented_by_public_class(cls, ringer: "IBellRinger") -> bool: + def static_implemented_by_public_class(cls, ringer: "IBellRinger") -> builtins.bool: """...if the interface is implemented using a public class. Return whether the bell was rung. @@ -57379,7 +66927,7 @@ class ConsumerCanRingBell( @jsii.member(jsii_name="staticWhenTypedAsClass") @builtins.classmethod - def static_when_typed_as_class(cls, ringer: "IConcreteBellRinger") -> bool: + def static_when_typed_as_class(cls, ringer: "IConcreteBellRinger") -> builtins.bool: """If the parameter is a concrete class instead of an interface. Return whether the bell was rung. @@ -57392,7 +66940,7 @@ class ConsumerCanRingBell( return jsii.sinvoke(cls, "staticWhenTypedAsClass", [ringer]) @jsii.member(jsii_name="implementedByObjectLiteral") - def implemented_by_object_literal(self, ringer: "IBellRinger") -> bool: + def implemented_by_object_literal(self, ringer: "IBellRinger") -> builtins.bool: """...if the interface is implemented using an object literal. Returns whether the bell was rung. @@ -57405,7 +66953,7 @@ class ConsumerCanRingBell( return jsii.invoke(self, "implementedByObjectLiteral", [ringer]) @jsii.member(jsii_name="implementedByPrivateClass") - def implemented_by_private_class(self, ringer: "IBellRinger") -> bool: + def implemented_by_private_class(self, ringer: "IBellRinger") -> builtins.bool: """...if the interface is implemented using a private class. Return whether the bell was rung. @@ -57418,7 +66966,7 @@ class ConsumerCanRingBell( return jsii.invoke(self, "implementedByPrivateClass", [ringer]) @jsii.member(jsii_name="implementedByPublicClass") - def implemented_by_public_class(self, ringer: "IBellRinger") -> bool: + def implemented_by_public_class(self, ringer: "IBellRinger") -> builtins.bool: """...if the interface is implemented using a public class. Return whether the bell was rung. @@ -57431,7 +66979,7 @@ class ConsumerCanRingBell( return jsii.invoke(self, "implementedByPublicClass", [ringer]) @jsii.member(jsii_name="whenTypedAsClass") - def when_typed_as_class(self, ringer: "IConcreteBellRinger") -> bool: + def when_typed_as_class(self, ringer: "IConcreteBellRinger") -> builtins.bool: """If the parameter is a concrete class instead of an interface. Return whether the bell was rung. @@ -57445,7 +66993,8 @@ class ConsumerCanRingBell( class ConsumersOfThisCrazyTypeSystem( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ConsumersOfThisCrazyTypeSystem" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.ConsumersOfThisCrazyTypeSystem", ): """ stability @@ -57460,7 +67009,10 @@ class ConsumersOfThisCrazyTypeSystem( jsii.create(ConsumersOfThisCrazyTypeSystem, self, []) @jsii.member(jsii_name="consumeAnotherPublicInterface") - def consume_another_public_interface(self, obj: "IAnotherPublicInterface") -> str: + def consume_another_public_interface( + self, + obj: "IAnotherPublicInterface", + ) -> builtins.str: """ :param obj: - @@ -57471,7 +67023,8 @@ class ConsumersOfThisCrazyTypeSystem( @jsii.member(jsii_name="consumeNonInternalInterface") def consume_non_internal_interface( - self, obj: "INonInternalInterface" + self, + obj: "INonInternalInterface", ) -> typing.Any: """ :param obj: - @@ -57501,9 +67054,9 @@ class DataRenderer(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DataRenderer"): self, *, anumber: jsii.Number, - astring: str, - first_optional: typing.Optional[typing.List[str]] = None, - ) -> str: + astring: builtins.str, + first_optional: typing.Optional[typing.List[builtins.str]] = None, + ) -> builtins.str: """ :param anumber: An awesome number value. :param astring: A string value. @@ -57519,7 +67072,10 @@ class DataRenderer(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DataRenderer"): return jsii.invoke(self, "render", [data]) @jsii.member(jsii_name="renderArbitrary") - def render_arbitrary(self, data: typing.Mapping[str, typing.Any]) -> str: + def render_arbitrary( + self, + data: typing.Mapping[builtins.str, typing.Any], + ) -> builtins.str: """ :param data: - @@ -57529,7 +67085,7 @@ class DataRenderer(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DataRenderer"): return jsii.invoke(self, "renderArbitrary", [data]) @jsii.member(jsii_name="renderMap") - def render_map(self, map: typing.Mapping[str, typing.Any]) -> str: + def render_map(self, map: typing.Mapping[builtins.str, typing.Any]) -> builtins.str: """ :param map: - @@ -57540,7 +67096,8 @@ class DataRenderer(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DataRenderer"): class DefaultedConstructorArgument( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DefaultedConstructorArgument" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.DefaultedConstructorArgument", ): """ stability @@ -57550,7 +67107,7 @@ class DefaultedConstructorArgument( def __init__( self, arg1: typing.Optional[jsii.Number] = None, - arg2: typing.Optional[str] = None, + arg2: typing.Optional[builtins.str] = None, arg3: typing.Optional[datetime.datetime] = None, ) -> None: """ @@ -57563,7 +67120,7 @@ class DefaultedConstructorArgument( """ jsii.create(DefaultedConstructorArgument, self, [arg1, arg2, arg3]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="arg1") def arg1(self) -> jsii.Number: """ @@ -57572,7 +67129,7 @@ class DefaultedConstructorArgument( """ return jsii.get(self, "arg1") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="arg3") def arg3(self) -> datetime.datetime: """ @@ -57581,9 +67138,9 @@ class DefaultedConstructorArgument( """ return jsii.get(self, "arg3") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="arg2") - def arg2(self) -> typing.Optional[str]: + def arg2(self) -> typing.Optional[builtins.str]: """ stability :stability: experimental @@ -57639,7 +67196,9 @@ class DeprecatedClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DeprecatedCl """ def __init__( - self, readonly_string: str, mutable_number: typing.Optional[jsii.Number] = None + self, + readonly_string: builtins.str, + mutable_number: typing.Optional[jsii.Number] = None, ) -> None: """ :param readonly_string: - @@ -57664,9 +67223,9 @@ class DeprecatedClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DeprecatedCl """ return jsii.invoke(self, "method", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="readonlyProperty") - def readonly_property(self) -> str: + def readonly_property(self) -> builtins.str: """ deprecated :deprecated: this is not always "wazoo", be ready to be disappointed @@ -57676,7 +67235,7 @@ class DeprecatedClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DeprecatedCl """ return jsii.get(self, "readonlyProperty") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: """ @@ -57688,7 +67247,7 @@ class DeprecatedClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DeprecatedCl """ return jsii.get(self, "mutableProperty") - @mutable_property.setter + @mutable_property.setter # type: ignore def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: jsii.set(self, "mutableProperty", value) @@ -57727,7 +67286,7 @@ class DeprecatedEnum(enum.Enum): name_mapping={"readonly_property": "readonlyProperty"}, ) class DeprecatedStruct: - def __init__(self, *, readonly_property: str) -> None: + def __init__(self, *, readonly_property: builtins.str) -> None: """ :param readonly_property: @@ -57737,12 +67296,12 @@ class DeprecatedStruct: stability :stability: deprecated """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "readonly_property": readonly_property, } @builtins.property - def readonly_property(self) -> str: + def readonly_property(self) -> builtins.str: """ deprecated :deprecated: well, yeah @@ -57750,12 +67309,14 @@ class DeprecatedStruct: stability :stability: deprecated """ - return self._values.get("readonly_property") + result = self._values.get("readonly_property") + assert result is not None, "Required property 'readonly_property' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -57784,14 +67345,14 @@ class DerivedStruct(scope.jsii_calc_lib.MyFirstStruct): self, *, anumber: jsii.Number, - astring: str, - first_optional: typing.Optional[typing.List[str]] = None, + astring: builtins.str, + first_optional: typing.Optional[typing.List[builtins.str]] = None, another_required: datetime.datetime, - bool: bool, + bool: builtins.bool, non_primitive: "DoubleTrouble", - another_optional: typing.Optional[typing.Mapping[str, scope.jsii_calc_lib.Value]] = None, + another_optional: typing.Optional[typing.Mapping[builtins.str, scope.jsii_calc_lib.NumericValue]] = None, optional_any: typing.Any = None, - optional_array: typing.Optional[typing.List[str]] = None, + optional_array: typing.Optional[typing.List[builtins.str]] = None, ) -> None: """A struct which derives from another struct. @@ -57808,7 +67369,7 @@ class DerivedStruct(scope.jsii_calc_lib.MyFirstStruct): stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "anumber": anumber, "astring": astring, "another_required": another_required, @@ -57831,24 +67392,29 @@ class DerivedStruct(scope.jsii_calc_lib.MyFirstStruct): stability :stability: deprecated """ - return self._values.get("anumber") + result = self._values.get("anumber") + assert result is not None, "Required property 'anumber' is missing" + return result @builtins.property - def astring(self) -> str: + def astring(self) -> builtins.str: """A string value. stability :stability: deprecated """ - return self._values.get("astring") + result = self._values.get("astring") + assert result is not None, "Required property 'astring' is missing" + return result @builtins.property - def first_optional(self) -> typing.Optional[typing.List[str]]: + def first_optional(self) -> typing.Optional[typing.List[builtins.str]]: """ stability :stability: deprecated """ - return self._values.get("first_optional") + result = self._values.get("first_optional") + return result @builtins.property def another_required(self) -> datetime.datetime: @@ -57856,15 +67422,19 @@ class DerivedStruct(scope.jsii_calc_lib.MyFirstStruct): stability :stability: experimental """ - return self._values.get("another_required") + result = self._values.get("another_required") + assert result is not None, "Required property 'another_required' is missing" + return result @builtins.property - def bool(self) -> bool: + def bool(self) -> builtins.bool: """ stability :stability: experimental """ - return self._values.get("bool") + result = self._values.get("bool") + assert result is not None, "Required property 'bool' is missing" + return result @builtins.property def non_primitive(self) -> "DoubleTrouble": @@ -57873,18 +67443,21 @@ class DerivedStruct(scope.jsii_calc_lib.MyFirstStruct): stability :stability: experimental """ - return self._values.get("non_primitive") + result = self._values.get("non_primitive") + assert result is not None, "Required property 'non_primitive' is missing" + return result @builtins.property def another_optional( self, - ) -> typing.Optional[typing.Mapping[str, scope.jsii_calc_lib.Value]]: + ) -> typing.Optional[typing.Mapping[builtins.str, scope.jsii_calc_lib.NumericValue]]: """This is optional. stability :stability: experimental """ - return self._values.get("another_optional") + result = self._values.get("another_optional") + return result @builtins.property def optional_any(self) -> typing.Any: @@ -57892,20 +67465,22 @@ class DerivedStruct(scope.jsii_calc_lib.MyFirstStruct): stability :stability: experimental """ - return self._values.get("optional_any") + result = self._values.get("optional_any") + return result @builtins.property - def optional_array(self) -> typing.Optional[typing.List[str]]: + def optional_array(self) -> typing.Optional[typing.List[builtins.str]]: """ stability :stability: experimental """ - return self._values.get("optional_array") + result = self._values.get("optional_array") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -57920,29 +67495,31 @@ class DerivedStruct(scope.jsii_calc_lib.MyFirstStruct): name_mapping={"base_level_property": "baseLevelProperty"}, ) class DiamondInheritanceBaseLevelStruct: - def __init__(self, *, base_level_property: str) -> None: + def __init__(self, *, base_level_property: builtins.str) -> None: """ :param base_level_property: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "base_level_property": base_level_property, } @builtins.property - def base_level_property(self) -> str: + def base_level_property(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("base_level_property") + result = self._values.get("base_level_property") + assert result is not None, "Required property 'base_level_property' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -57961,7 +67538,10 @@ class DiamondInheritanceBaseLevelStruct: ) class DiamondInheritanceFirstMidLevelStruct(DiamondInheritanceBaseLevelStruct): def __init__( - self, *, base_level_property: str, first_mid_level_property: str + self, + *, + base_level_property: builtins.str, + first_mid_level_property: builtins.str, ) -> None: """ :param base_level_property: @@ -57970,31 +67550,35 @@ class DiamondInheritanceFirstMidLevelStruct(DiamondInheritanceBaseLevelStruct): stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "base_level_property": base_level_property, "first_mid_level_property": first_mid_level_property, } @builtins.property - def base_level_property(self) -> str: + def base_level_property(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("base_level_property") + result = self._values.get("base_level_property") + assert result is not None, "Required property 'base_level_property' is missing" + return result @builtins.property - def first_mid_level_property(self) -> str: + def first_mid_level_property(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("first_mid_level_property") + result = self._values.get("first_mid_level_property") + assert result is not None, "Required property 'first_mid_level_property' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -58013,7 +67597,10 @@ class DiamondInheritanceFirstMidLevelStruct(DiamondInheritanceBaseLevelStruct): ) class DiamondInheritanceSecondMidLevelStruct(DiamondInheritanceBaseLevelStruct): def __init__( - self, *, base_level_property: str, second_mid_level_property: str + self, + *, + base_level_property: builtins.str, + second_mid_level_property: builtins.str, ) -> None: """ :param base_level_property: @@ -58022,31 +67609,35 @@ class DiamondInheritanceSecondMidLevelStruct(DiamondInheritanceBaseLevelStruct): stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "base_level_property": base_level_property, "second_mid_level_property": second_mid_level_property, } @builtins.property - def base_level_property(self) -> str: + def base_level_property(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("base_level_property") + result = self._values.get("base_level_property") + assert result is not None, "Required property 'base_level_property' is missing" + return result @builtins.property - def second_mid_level_property(self) -> str: + def second_mid_level_property(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("second_mid_level_property") + result = self._values.get("second_mid_level_property") + assert result is not None, "Required property 'second_mid_level_property' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -58068,15 +67659,16 @@ class DiamondInheritanceSecondMidLevelStruct(DiamondInheritanceBaseLevelStruct): }, ) class DiamondInheritanceTopLevelStruct( - DiamondInheritanceFirstMidLevelStruct, DiamondInheritanceSecondMidLevelStruct + DiamondInheritanceFirstMidLevelStruct, + DiamondInheritanceSecondMidLevelStruct, ): def __init__( self, *, - base_level_property: str, - first_mid_level_property: str, - second_mid_level_property: str, - top_level_property: str, + base_level_property: builtins.str, + first_mid_level_property: builtins.str, + second_mid_level_property: builtins.str, + top_level_property: builtins.str, ) -> None: """ :param base_level_property: @@ -58087,7 +67679,7 @@ class DiamondInheritanceTopLevelStruct( stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "base_level_property": base_level_property, "first_mid_level_property": first_mid_level_property, "second_mid_level_property": second_mid_level_property, @@ -58095,41 +67687,49 @@ class DiamondInheritanceTopLevelStruct( } @builtins.property - def base_level_property(self) -> str: + def base_level_property(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("base_level_property") + result = self._values.get("base_level_property") + assert result is not None, "Required property 'base_level_property' is missing" + return result @builtins.property - def first_mid_level_property(self) -> str: + def first_mid_level_property(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("first_mid_level_property") + result = self._values.get("first_mid_level_property") + assert result is not None, "Required property 'first_mid_level_property' is missing" + return result @builtins.property - def second_mid_level_property(self) -> str: + def second_mid_level_property(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("second_mid_level_property") + result = self._values.get("second_mid_level_property") + assert result is not None, "Required property 'second_mid_level_property' is missing" + return result @builtins.property - def top_level_property(self) -> str: + def top_level_property(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("top_level_property") + result = self._values.get("top_level_property") + assert result is not None, "Required property 'top_level_property' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -58139,7 +67739,8 @@ class DiamondInheritanceTopLevelStruct( class DisappointingCollectionSource( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DisappointingCollectionSource" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.DisappointingCollectionSource", ): """Verifies that null/undefined can be returned for optional collections. @@ -58149,9 +67750,9 @@ class DisappointingCollectionSource( :stability: experimental """ - @jsii.python.classproperty + @jsii.python.classproperty # type: ignore @jsii.member(jsii_name="maybeList") - def MAYBE_LIST(cls) -> typing.Optional[typing.List[str]]: + def MAYBE_LIST(cls) -> typing.Optional[typing.List[builtins.str]]: """Some List of strings, maybe? (Nah, just a billion dollars mistake!) @@ -58161,9 +67762,9 @@ class DisappointingCollectionSource( """ return jsii.sget(cls, "maybeList") - @jsii.python.classproperty + @jsii.python.classproperty # type: ignore @jsii.member(jsii_name="maybeMap") - def MAYBE_MAP(cls) -> typing.Optional[typing.Mapping[str, jsii.Number]]: + def MAYBE_MAP(cls) -> typing.Optional[typing.Mapping[builtins.str, jsii.Number]]: """Some Map of strings to numbers, maybe? (Nah, just a billion dollars mistake!) @@ -58175,7 +67776,8 @@ class DisappointingCollectionSource( class DoNotOverridePrivates( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DoNotOverridePrivates" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.DoNotOverridePrivates", ): """ stability @@ -58190,7 +67792,7 @@ class DoNotOverridePrivates( jsii.create(DoNotOverridePrivates, self, []) @jsii.member(jsii_name="changePrivatePropertyValue") - def change_private_property_value(self, new_value: str) -> None: + def change_private_property_value(self, new_value: builtins.str) -> None: """ :param new_value: - @@ -58200,7 +67802,7 @@ class DoNotOverridePrivates( return jsii.invoke(self, "changePrivatePropertyValue", [new_value]) @jsii.member(jsii_name="privateMethodValue") - def private_method_value(self) -> str: + def private_method_value(self) -> builtins.str: """ stability :stability: experimental @@ -58208,7 +67810,7 @@ class DoNotOverridePrivates( return jsii.invoke(self, "privateMethodValue", []) @jsii.member(jsii_name="privatePropertyValue") - def private_property_value(self) -> str: + def private_property_value(self) -> builtins.str: """ stability :stability: experimental @@ -58217,7 +67819,8 @@ class DoNotOverridePrivates( class DoNotRecognizeAnyAsOptional( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DoNotRecognizeAnyAsOptional" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.DoNotRecognizeAnyAsOptional", ): """jsii#284: do not recognize "any" as an optional argument. @@ -58237,7 +67840,7 @@ class DoNotRecognizeAnyAsOptional( self, _required_any: typing.Any, _optional_any: typing.Any = None, - _optional_string: typing.Optional[str] = None, + _optional_string: typing.Optional[builtins.str] = None, ) -> None: """ :param _required_any: - @@ -58267,7 +67870,7 @@ class DocumentedClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DocumentedCl jsii.create(DocumentedClass, self, []) @jsii.member(jsii_name="greet") - def greet(self, *, name: typing.Optional[str] = None) -> jsii.Number: + def greet(self, *, name: typing.Optional[builtins.str] = None) -> jsii.Number: """Greet the indicated person. This will print out a friendly greeting intended for @@ -58310,8 +67913,10 @@ class DontComplainAboutVariadicAfterOptional( @jsii.member(jsii_name="optionalAndVariadic") def optional_and_variadic( - self, optional: typing.Optional[str] = None, *things: str - ) -> str: + self, + optional: typing.Optional[builtins.str] = None, + *things: builtins.str, + ) -> builtins.str: """ :param optional: - :param things: - @@ -58322,6 +67927,95 @@ class DontComplainAboutVariadicAfterOptional( return jsii.invoke(self, "optionalAndVariadic", [optional, *things]) +class DynamicPropertyBearer( + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.DynamicPropertyBearer", +): + """Ensures we can override a dynamic property that was inherited. + + stability + :stability: experimental + """ + + def __init__(self, value_store: builtins.str) -> None: + """ + :param value_store: - + + stability + :stability: experimental + """ + jsii.create(DynamicPropertyBearer, self, [value_store]) + + @builtins.property # type: ignore + @jsii.member(jsii_name="dynamicProperty") + def dynamic_property(self) -> builtins.str: + """ + stability + :stability: experimental + """ + return jsii.get(self, "dynamicProperty") + + @dynamic_property.setter # type: ignore + def dynamic_property(self, value: builtins.str) -> None: + jsii.set(self, "dynamicProperty", value) + + @builtins.property # type: ignore + @jsii.member(jsii_name="valueStore") + def value_store(self) -> builtins.str: + """ + stability + :stability: experimental + """ + return jsii.get(self, "valueStore") + + @value_store.setter # type: ignore + def value_store(self, value: builtins.str) -> None: + jsii.set(self, "valueStore", value) + + +class DynamicPropertyBearerChild( + DynamicPropertyBearer, + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.DynamicPropertyBearerChild", +): + """ + stability + :stability: experimental + """ + + def __init__(self, original_value: builtins.str) -> None: + """ + :param original_value: - + + stability + :stability: experimental + """ + jsii.create(DynamicPropertyBearerChild, self, [original_value]) + + @jsii.member(jsii_name="overrideValue") + def override_value(self, new_value: builtins.str) -> builtins.str: + """Sets \`\`this.dynamicProperty\`\` to the new value, and returns the old value. + + :param new_value: the new value to be set. + + return + :return: the old value that was set. + + stability + :stability: experimental + """ + return jsii.invoke(self, "overrideValue", [new_value]) + + @builtins.property # type: ignore + @jsii.member(jsii_name="originalValue") + def original_value(self) -> builtins.str: + """ + stability + :stability: experimental + """ + return jsii.get(self, "originalValue") + + class EnumDispenser(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.EnumDispenser"): """ stability @@ -58348,7 +68042,8 @@ class EnumDispenser(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.EnumDispenser" class EraseUndefinedHashValues( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.EraseUndefinedHashValues" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.EraseUndefinedHashValues", ): """ stability @@ -58364,7 +68059,11 @@ class EraseUndefinedHashValues( @jsii.member(jsii_name="doesKeyExist") @builtins.classmethod - def does_key_exist(cls, opts: "EraseUndefinedHashValuesOptions", key: str) -> bool: + def does_key_exist( + cls, + opts: "EraseUndefinedHashValuesOptions", + key: builtins.str, + ) -> builtins.bool: """Returns \`\`true\`\` if \`\`key\`\` is defined in \`\`opts\`\`. Used to check that undefined/null hash values @@ -58380,7 +68079,7 @@ class EraseUndefinedHashValues( @jsii.member(jsii_name="prop1IsNull") @builtins.classmethod - def prop1_is_null(cls) -> typing.Mapping[str, typing.Any]: + def prop1_is_null(cls) -> typing.Mapping[builtins.str, typing.Any]: """We expect "prop1" to be erased. stability @@ -58390,7 +68089,7 @@ class EraseUndefinedHashValues( @jsii.member(jsii_name="prop2IsUndefined") @builtins.classmethod - def prop2_is_undefined(cls) -> typing.Mapping[str, typing.Any]: + def prop2_is_undefined(cls) -> typing.Mapping[builtins.str, typing.Any]: """We expect "prop2" to be erased. stability @@ -58408,8 +68107,8 @@ class EraseUndefinedHashValuesOptions: def __init__( self, *, - option1: typing.Optional[str] = None, - option2: typing.Optional[str] = None, + option1: typing.Optional[builtins.str] = None, + option2: typing.Optional[builtins.str] = None, ) -> None: """ :param option1: @@ -58418,32 +68117,34 @@ class EraseUndefinedHashValuesOptions: stability :stability: experimental """ - self._values = {} + self._values: typing.Dict[str, typing.Any] = {} if option1 is not None: self._values["option1"] = option1 if option2 is not None: self._values["option2"] = option2 @builtins.property - def option1(self) -> typing.Optional[str]: + def option1(self) -> typing.Optional[builtins.str]: """ stability :stability: experimental """ - return self._values.get("option1") + result = self._values.get("option1") + return result @builtins.property - def option2(self) -> typing.Optional[str]: + def option2(self) -> typing.Optional[builtins.str]: """ stability :stability: experimental """ - return self._values.get("option2") + result = self._values.get("option2") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -58453,7 +68154,8 @@ class EraseUndefinedHashValuesOptions: class ExperimentalClass( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ExperimentalClass" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.ExperimentalClass", ): """ stability @@ -58461,7 +68163,9 @@ class ExperimentalClass( """ def __init__( - self, readonly_string: str, mutable_number: typing.Optional[jsii.Number] = None + self, + readonly_string: builtins.str, + mutable_number: typing.Optional[jsii.Number] = None, ) -> None: """ :param readonly_string: - @@ -58480,16 +68184,16 @@ class ExperimentalClass( """ return jsii.invoke(self, "method", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="readonlyProperty") - def readonly_property(self) -> str: + def readonly_property(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "readonlyProperty") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: """ @@ -58498,7 +68202,7 @@ class ExperimentalClass( """ return jsii.get(self, "mutableProperty") - @mutable_property.setter + @mutable_property.setter # type: ignore def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: jsii.set(self, "mutableProperty", value) @@ -58528,29 +68232,31 @@ class ExperimentalEnum(enum.Enum): name_mapping={"readonly_property": "readonlyProperty"}, ) class ExperimentalStruct: - def __init__(self, *, readonly_property: str) -> None: + def __init__(self, *, readonly_property: builtins.str) -> None: """ :param readonly_property: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "readonly_property": readonly_property, } @builtins.property - def readonly_property(self) -> str: + def readonly_property(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("readonly_property") + result = self._values.get("readonly_property") + assert result is not None, "Required property 'readonly_property' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -58560,14 +68266,15 @@ class ExperimentalStruct: class ExportedBaseClass( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ExportedBaseClass" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.ExportedBaseClass", ): """ stability :stability: experimental """ - def __init__(self, success: bool) -> None: + def __init__(self, success: builtins.bool) -> None: """ :param success: - @@ -58576,9 +68283,9 @@ class ExportedBaseClass( """ jsii.create(ExportedBaseClass, self, [success]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="success") - def success(self) -> bool: + def success(self) -> builtins.bool: """ stability :stability: experimental @@ -58592,7 +68299,7 @@ class ExportedBaseClass( name_mapping={"boom": "boom", "prop": "prop"}, ) class ExtendsInternalInterface: - def __init__(self, *, boom: bool, prop: str) -> None: + def __init__(self, *, boom: builtins.bool, prop: builtins.str) -> None: """ :param boom: :param prop: @@ -58600,31 +68307,35 @@ class ExtendsInternalInterface: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "boom": boom, "prop": prop, } @builtins.property - def boom(self) -> bool: + def boom(self) -> builtins.bool: """ stability :stability: experimental """ - return self._values.get("boom") + result = self._values.get("boom") + assert result is not None, "Required property 'boom' is missing" + return result @builtins.property - def prop(self) -> str: + def prop(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("prop") + result = self._values.get("prop") + assert result is not None, "Required property 'prop' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -58642,7 +68353,9 @@ class ExternalClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ExternalClass" """ def __init__( - self, readonly_string: str, mutable_number: typing.Optional[jsii.Number] = None + self, + readonly_string: builtins.str, + mutable_number: typing.Optional[jsii.Number] = None, ) -> None: """ :param readonly_string: - @@ -58665,9 +68378,9 @@ class ExternalClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ExternalClass" """ return jsii.invoke(self, "method", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="readonlyProperty") - def readonly_property(self) -> str: + def readonly_property(self) -> builtins.str: """ stability :stability: experimental @@ -58676,7 +68389,7 @@ class ExternalClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ExternalClass" """ return jsii.get(self, "readonlyProperty") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: """ @@ -58687,7 +68400,7 @@ class ExternalClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ExternalClass" """ return jsii.get(self, "mutableProperty") - @mutable_property.setter + @mutable_property.setter # type: ignore def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: jsii.set(self, "mutableProperty", value) @@ -58723,7 +68436,7 @@ class ExternalEnum(enum.Enum): name_mapping={"readonly_property": "readonlyProperty"}, ) class ExternalStruct: - def __init__(self, *, readonly_property: str) -> None: + def __init__(self, *, readonly_property: builtins.str) -> None: """ :param readonly_property: @@ -58732,24 +68445,26 @@ class ExternalStruct: external: :external:: true """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "readonly_property": readonly_property, } @builtins.property - def readonly_property(self) -> str: + def readonly_property(self) -> builtins.str: """ stability :stability: experimental external: :external:: true """ - return self._values.get("readonly_property") + result = self._values.get("readonly_property") + assert result is not None, "Required property 'readonly_property' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -58776,14 +68491,14 @@ class GiveMeStructs(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.GiveMeStructs" self, *, another_required: datetime.datetime, - bool: bool, + bool: builtins.bool, non_primitive: "DoubleTrouble", - another_optional: typing.Optional[typing.Mapping[str, scope.jsii_calc_lib.Value]] = None, + another_optional: typing.Optional[typing.Mapping[builtins.str, scope.jsii_calc_lib.NumericValue]] = None, optional_any: typing.Any = None, - optional_array: typing.Optional[typing.List[str]] = None, + optional_array: typing.Optional[typing.List[builtins.str]] = None, anumber: jsii.Number, - astring: str, - first_optional: typing.Optional[typing.List[str]] = None, + astring: builtins.str, + first_optional: typing.Optional[typing.List[builtins.str]] = None, ) -> scope.jsii_calc_lib.MyFirstStruct: """Accepts a struct of type DerivedStruct and returns a struct of type FirstStruct. @@ -58819,14 +68534,14 @@ class GiveMeStructs(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.GiveMeStructs" self, *, another_required: datetime.datetime, - bool: bool, + bool: builtins.bool, non_primitive: "DoubleTrouble", - another_optional: typing.Optional[typing.Mapping[str, scope.jsii_calc_lib.Value]] = None, + another_optional: typing.Optional[typing.Mapping[builtins.str, scope.jsii_calc_lib.NumericValue]] = None, optional_any: typing.Any = None, - optional_array: typing.Optional[typing.List[str]] = None, + optional_array: typing.Optional[typing.List[builtins.str]] = None, anumber: jsii.Number, - astring: str, - first_optional: typing.Optional[typing.List[str]] = None, + astring: builtins.str, + first_optional: typing.Optional[typing.List[builtins.str]] = None, ) -> "DoubleTrouble": """Returns the boolean from a DerivedStruct struct. @@ -58862,8 +68577,8 @@ class GiveMeStructs(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.GiveMeStructs" self, *, anumber: jsii.Number, - astring: str, - first_optional: typing.Optional[typing.List[str]] = None, + astring: builtins.str, + first_optional: typing.Optional[typing.List[builtins.str]] = None, ) -> jsii.Number: """Returns the "anumber" from a MyFirstStruct struct; @@ -58880,7 +68595,7 @@ class GiveMeStructs(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.GiveMeStructs" return jsii.invoke(self, "readFirstNumber", [first]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="structLiteral") def struct_literal(self) -> scope.jsii_calc_lib.StructWithOnlyOptionals: """ @@ -58896,7 +68611,7 @@ class GiveMeStructs(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.GiveMeStructs" name_mapping={"name": "name"}, ) class Greetee: - def __init__(self, *, name: typing.Optional[str] = None) -> None: + def __init__(self, *, name: typing.Optional[builtins.str] = None) -> None: """These are some arguments you can pass to a method. :param name: The name of the greetee. Default: world @@ -58904,12 +68619,12 @@ class Greetee: stability :stability: experimental """ - self._values = {} + self._values: typing.Dict[str, typing.Any] = {} if name is not None: self._values["name"] = name @builtins.property - def name(self) -> typing.Optional[str]: + def name(self) -> typing.Optional[builtins.str]: """The name of the greetee. default @@ -58918,12 +68633,13 @@ class Greetee: stability :stability: experimental """ - return self._values.get("name") + result = self._values.get("name") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -58933,7 +68649,8 @@ class Greetee: class GreetingAugmenter( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.GreetingAugmenter" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.GreetingAugmenter", ): """ stability @@ -58948,7 +68665,7 @@ class GreetingAugmenter( jsii.create(GreetingAugmenter, self, []) @jsii.member(jsii_name="betterGreeting") - def better_greeting(self, friendly: scope.jsii_calc_lib.IFriendly) -> str: + def better_greeting(self, friendly: scope.jsii_calc_lib.IFriendly) -> builtins.str: """ :param friendly: - @@ -58959,7 +68676,7 @@ class GreetingAugmenter( @jsii.interface(jsii_type="jsii-calc.IAnonymousImplementationProvider") -class IAnonymousImplementationProvider(jsii.compat.Protocol): +class IAnonymousImplementationProvider(typing_extensions.Protocol): """We can return an anonymous interface implementation from an override without losing the interface declarations. stability @@ -58994,7 +68711,7 @@ class _IAnonymousImplementationProviderProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IAnonymousImplementationProvider" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IAnonymousImplementationProvider" @jsii.member(jsii_name="provideAsClass") def provide_as_class(self) -> "Implementation": @@ -59014,7 +68731,7 @@ class _IAnonymousImplementationProviderProxy: @jsii.interface(jsii_type="jsii-calc.IAnonymouslyImplementMe") -class IAnonymouslyImplementMe(jsii.compat.Protocol): +class IAnonymouslyImplementMe(typing_extensions.Protocol): """ stability :stability: experimental @@ -59024,7 +68741,7 @@ class IAnonymouslyImplementMe(jsii.compat.Protocol): def __jsii_proxy_class__(): return _IAnonymouslyImplementMeProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="value") def value(self) -> jsii.Number: """ @@ -59034,7 +68751,7 @@ class IAnonymouslyImplementMe(jsii.compat.Protocol): ... @jsii.member(jsii_name="verb") - def verb(self) -> str: + def verb(self) -> builtins.str: """ stability :stability: experimental @@ -59048,9 +68765,9 @@ class _IAnonymouslyImplementMeProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IAnonymouslyImplementMe" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IAnonymouslyImplementMe" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="value") def value(self) -> jsii.Number: """ @@ -59060,7 +68777,7 @@ class _IAnonymouslyImplementMeProxy: return jsii.get(self, "value") @jsii.member(jsii_name="verb") - def verb(self) -> str: + def verb(self) -> builtins.str: """ stability :stability: experimental @@ -59069,7 +68786,7 @@ class _IAnonymouslyImplementMeProxy: @jsii.interface(jsii_type="jsii-calc.IAnotherPublicInterface") -class IAnotherPublicInterface(jsii.compat.Protocol): +class IAnotherPublicInterface(typing_extensions.Protocol): """ stability :stability: experimental @@ -59079,17 +68796,17 @@ class IAnotherPublicInterface(jsii.compat.Protocol): def __jsii_proxy_class__(): return _IAnotherPublicInterfaceProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="a") - def a(self) -> str: + def a(self) -> builtins.str: """ stability :stability: experimental """ ... - @a.setter - def a(self, value: str) -> None: + @a.setter # type: ignore + def a(self, value: builtins.str) -> None: ... @@ -59099,24 +68816,24 @@ class _IAnotherPublicInterfaceProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IAnotherPublicInterface" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IAnotherPublicInterface" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="a") - def a(self) -> str: + def a(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "a") - @a.setter - def a(self, value: str) -> None: + @a.setter # type: ignore + def a(self, value: builtins.str) -> None: jsii.set(self, "a", value) @jsii.interface(jsii_type="jsii-calc.IBell") -class IBell(jsii.compat.Protocol): +class IBell(typing_extensions.Protocol): """ stability :stability: experimental @@ -59141,7 +68858,7 @@ class _IBellProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IBell" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IBell" @jsii.member(jsii_name="ring") def ring(self) -> None: @@ -59153,7 +68870,7 @@ class _IBellProxy: @jsii.interface(jsii_type="jsii-calc.IBellRinger") -class IBellRinger(jsii.compat.Protocol): +class IBellRinger(typing_extensions.Protocol): """Takes the object parameter as an interface. stability @@ -59182,7 +68899,7 @@ class _IBellRingerProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IBellRinger" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IBellRinger" @jsii.member(jsii_name="yourTurn") def your_turn(self, bell: "IBell") -> None: @@ -59196,7 +68913,7 @@ class _IBellRingerProxy: @jsii.interface(jsii_type="jsii-calc.IConcreteBellRinger") -class IConcreteBellRinger(jsii.compat.Protocol): +class IConcreteBellRinger(typing_extensions.Protocol): """Takes the object parameter as a calss. stability @@ -59225,7 +68942,7 @@ class _IConcreteBellRingerProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IConcreteBellRinger" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IConcreteBellRinger" @jsii.member(jsii_name="yourTurn") def your_turn(self, bell: "Bell") -> None: @@ -59239,7 +68956,7 @@ class _IConcreteBellRingerProxy: @jsii.interface(jsii_type="jsii-calc.IDeprecatedInterface") -class IDeprecatedInterface(jsii.compat.Protocol): +class IDeprecatedInterface(typing_extensions.Protocol): """ deprecated :deprecated: useless interface @@ -59252,7 +68969,7 @@ class IDeprecatedInterface(jsii.compat.Protocol): def __jsii_proxy_class__(): return _IDeprecatedInterfaceProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: """ @@ -59264,7 +68981,7 @@ class IDeprecatedInterface(jsii.compat.Protocol): """ ... - @mutable_property.setter + @mutable_property.setter # type: ignore def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: ... @@ -59289,9 +69006,9 @@ class _IDeprecatedInterfaceProxy: :stability: deprecated """ - __jsii_type__ = "jsii-calc.IDeprecatedInterface" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IDeprecatedInterface" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: """ @@ -59303,7 +69020,7 @@ class _IDeprecatedInterfaceProxy: """ return jsii.get(self, "mutableProperty") - @mutable_property.setter + @mutable_property.setter # type: ignore def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: jsii.set(self, "mutableProperty", value) @@ -59320,7 +69037,7 @@ class _IDeprecatedInterfaceProxy: @jsii.interface(jsii_type="jsii-calc.IExperimentalInterface") -class IExperimentalInterface(jsii.compat.Protocol): +class IExperimentalInterface(typing_extensions.Protocol): """ stability :stability: experimental @@ -59330,7 +69047,7 @@ class IExperimentalInterface(jsii.compat.Protocol): def __jsii_proxy_class__(): return _IExperimentalInterfaceProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: """ @@ -59339,7 +69056,7 @@ class IExperimentalInterface(jsii.compat.Protocol): """ ... - @mutable_property.setter + @mutable_property.setter # type: ignore def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: ... @@ -59358,9 +69075,9 @@ class _IExperimentalInterfaceProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IExperimentalInterface" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IExperimentalInterface" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: """ @@ -59369,7 +69086,7 @@ class _IExperimentalInterfaceProxy: """ return jsii.get(self, "mutableProperty") - @mutable_property.setter + @mutable_property.setter # type: ignore def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: jsii.set(self, "mutableProperty", value) @@ -59383,7 +69100,7 @@ class _IExperimentalInterfaceProxy: @jsii.interface(jsii_type="jsii-calc.IExtendsPrivateInterface") -class IExtendsPrivateInterface(jsii.compat.Protocol): +class IExtendsPrivateInterface(typing_extensions.Protocol): """ stability :stability: experimental @@ -59393,26 +69110,26 @@ class IExtendsPrivateInterface(jsii.compat.Protocol): def __jsii_proxy_class__(): return _IExtendsPrivateInterfaceProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="moreThings") - def more_things(self) -> typing.List[str]: + def more_things(self) -> typing.List[builtins.str]: """ stability :stability: experimental """ ... - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="private") - def private(self) -> str: + def private(self) -> builtins.str: """ stability :stability: experimental """ ... - @private.setter - def private(self, value: str) -> None: + @private.setter # type: ignore + def private(self, value: builtins.str) -> None: ... @@ -59422,33 +69139,33 @@ class _IExtendsPrivateInterfaceProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IExtendsPrivateInterface" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IExtendsPrivateInterface" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="moreThings") - def more_things(self) -> typing.List[str]: + def more_things(self) -> typing.List[builtins.str]: """ stability :stability: experimental """ return jsii.get(self, "moreThings") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="private") - def private(self) -> str: + def private(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "private") - @private.setter - def private(self, value: str) -> None: + @private.setter # type: ignore + def private(self, value: builtins.str) -> None: jsii.set(self, "private", value) @jsii.interface(jsii_type="jsii-calc.IExternalInterface") -class IExternalInterface(jsii.compat.Protocol): +class IExternalInterface(typing_extensions.Protocol): """ stability :stability: experimental @@ -59460,7 +69177,7 @@ class IExternalInterface(jsii.compat.Protocol): def __jsii_proxy_class__(): return _IExternalInterfaceProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: """ @@ -59471,7 +69188,7 @@ class IExternalInterface(jsii.compat.Protocol): """ ... - @mutable_property.setter + @mutable_property.setter # type: ignore def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: ... @@ -59494,9 +69211,9 @@ class _IExternalInterfaceProxy: :external:: true """ - __jsii_type__ = "jsii-calc.IExternalInterface" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IExternalInterface" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: """ @@ -59507,7 +69224,7 @@ class _IExternalInterfaceProxy: """ return jsii.get(self, "mutableProperty") - @mutable_property.setter + @mutable_property.setter # type: ignore def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: jsii.set(self, "mutableProperty", value) @@ -59523,7 +69240,7 @@ class _IExternalInterfaceProxy: @jsii.interface(jsii_type="jsii-calc.IFriendlier") -class IFriendlier(scope.jsii_calc_lib.IFriendly, jsii.compat.Protocol): +class IFriendlier(scope.jsii_calc_lib.IFriendly, typing_extensions.Protocol): """Even friendlier classes can implement this interface. stability @@ -59535,7 +69252,7 @@ class IFriendlier(scope.jsii_calc_lib.IFriendly, jsii.compat.Protocol): return _IFriendlierProxy @jsii.member(jsii_name="farewell") - def farewell(self) -> str: + def farewell(self) -> builtins.str: """Say farewell. stability @@ -59544,7 +69261,7 @@ class IFriendlier(scope.jsii_calc_lib.IFriendly, jsii.compat.Protocol): ... @jsii.member(jsii_name="goodbye") - def goodbye(self) -> str: + def goodbye(self) -> builtins.str: """Say goodbye. return @@ -59556,17 +69273,19 @@ class IFriendlier(scope.jsii_calc_lib.IFriendly, jsii.compat.Protocol): ... -class _IFriendlierProxy(jsii.proxy_for(scope.jsii_calc_lib.IFriendly)): +class _IFriendlierProxy( + jsii.proxy_for(scope.jsii_calc_lib.IFriendly) # type: ignore +): """Even friendlier classes can implement this interface. stability :stability: experimental """ - __jsii_type__ = "jsii-calc.IFriendlier" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IFriendlier" @jsii.member(jsii_name="farewell") - def farewell(self) -> str: + def farewell(self) -> builtins.str: """Say farewell. stability @@ -59575,7 +69294,7 @@ class _IFriendlierProxy(jsii.proxy_for(scope.jsii_calc_lib.IFriendly)): return jsii.invoke(self, "farewell", []) @jsii.member(jsii_name="goodbye") - def goodbye(self) -> str: + def goodbye(self) -> builtins.str: """Say goodbye. return @@ -59588,7 +69307,7 @@ class _IFriendlierProxy(jsii.proxy_for(scope.jsii_calc_lib.IFriendly)): @jsii.interface(jsii_type="jsii-calc.IInterfaceImplementedByAbstractClass") -class IInterfaceImplementedByAbstractClass(jsii.compat.Protocol): +class IInterfaceImplementedByAbstractClass(typing_extensions.Protocol): """awslabs/jsii#220 Abstract return type. stability @@ -59599,9 +69318,9 @@ class IInterfaceImplementedByAbstractClass(jsii.compat.Protocol): def __jsii_proxy_class__(): return _IInterfaceImplementedByAbstractClassProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="propFromInterface") - def prop_from_interface(self) -> str: + def prop_from_interface(self) -> builtins.str: """ stability :stability: experimental @@ -59616,11 +69335,11 @@ class _IInterfaceImplementedByAbstractClassProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IInterfaceImplementedByAbstractClass" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IInterfaceImplementedByAbstractClass" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="propFromInterface") - def prop_from_interface(self) -> str: + def prop_from_interface(self) -> builtins.str: """ stability :stability: experimental @@ -59629,7 +69348,7 @@ class _IInterfaceImplementedByAbstractClassProxy: @jsii.interface(jsii_type="jsii-calc.IInterfaceWithInternal") -class IInterfaceWithInternal(jsii.compat.Protocol): +class IInterfaceWithInternal(typing_extensions.Protocol): """ stability :stability: experimental @@ -59654,7 +69373,7 @@ class _IInterfaceWithInternalProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IInterfaceWithInternal" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IInterfaceWithInternal" @jsii.member(jsii_name="visible") def visible(self) -> None: @@ -59666,7 +69385,7 @@ class _IInterfaceWithInternalProxy: @jsii.interface(jsii_type="jsii-calc.IInterfaceWithMethods") -class IInterfaceWithMethods(jsii.compat.Protocol): +class IInterfaceWithMethods(typing_extensions.Protocol): """ stability :stability: experimental @@ -59676,9 +69395,9 @@ class IInterfaceWithMethods(jsii.compat.Protocol): def __jsii_proxy_class__(): return _IInterfaceWithMethodsProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="value") - def value(self) -> str: + def value(self) -> builtins.str: """ stability :stability: experimental @@ -59700,11 +69419,11 @@ class _IInterfaceWithMethodsProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IInterfaceWithMethods" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IInterfaceWithMethods" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="value") - def value(self) -> str: + def value(self) -> builtins.str: """ stability :stability: experimental @@ -59721,7 +69440,7 @@ class _IInterfaceWithMethodsProxy: @jsii.interface(jsii_type="jsii-calc.IInterfaceWithOptionalMethodArguments") -class IInterfaceWithOptionalMethodArguments(jsii.compat.Protocol): +class IInterfaceWithOptionalMethodArguments(typing_extensions.Protocol): """awslabs/jsii#175 Interface proxies (and builders) do not respect optional arguments in methods. stability @@ -59733,7 +69452,11 @@ class IInterfaceWithOptionalMethodArguments(jsii.compat.Protocol): return _IInterfaceWithOptionalMethodArgumentsProxy @jsii.member(jsii_name="hello") - def hello(self, arg1: str, arg2: typing.Optional[jsii.Number] = None) -> None: + def hello( + self, + arg1: builtins.str, + arg2: typing.Optional[jsii.Number] = None, + ) -> None: """ :param arg1: - :param arg2: - @@ -59751,10 +69474,14 @@ class _IInterfaceWithOptionalMethodArgumentsProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IInterfaceWithOptionalMethodArguments" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IInterfaceWithOptionalMethodArguments" @jsii.member(jsii_name="hello") - def hello(self, arg1: str, arg2: typing.Optional[jsii.Number] = None) -> None: + def hello( + self, + arg1: builtins.str, + arg2: typing.Optional[jsii.Number] = None, + ) -> None: """ :param arg1: - :param arg2: - @@ -59766,7 +69493,7 @@ class _IInterfaceWithOptionalMethodArgumentsProxy: @jsii.interface(jsii_type="jsii-calc.IInterfaceWithProperties") -class IInterfaceWithProperties(jsii.compat.Protocol): +class IInterfaceWithProperties(typing_extensions.Protocol): """ stability :stability: experimental @@ -59776,26 +69503,26 @@ class IInterfaceWithProperties(jsii.compat.Protocol): def __jsii_proxy_class__(): return _IInterfaceWithPropertiesProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="readOnlyString") - def read_only_string(self) -> str: + def read_only_string(self) -> builtins.str: """ stability :stability: experimental """ ... - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="readWriteString") - def read_write_string(self) -> str: + def read_write_string(self) -> builtins.str: """ stability :stability: experimental """ ... - @read_write_string.setter - def read_write_string(self, value: str) -> None: + @read_write_string.setter # type: ignore + def read_write_string(self, value: builtins.str) -> None: ... @@ -59805,33 +69532,36 @@ class _IInterfaceWithPropertiesProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IInterfaceWithProperties" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IInterfaceWithProperties" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="readOnlyString") - def read_only_string(self) -> str: + def read_only_string(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "readOnlyString") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="readWriteString") - def read_write_string(self) -> str: + def read_write_string(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "readWriteString") - @read_write_string.setter - def read_write_string(self, value: str) -> None: + @read_write_string.setter # type: ignore + def read_write_string(self, value: builtins.str) -> None: jsii.set(self, "readWriteString", value) @jsii.interface(jsii_type="jsii-calc.IInterfaceWithPropertiesExtension") -class IInterfaceWithPropertiesExtension(IInterfaceWithProperties, jsii.compat.Protocol): +class IInterfaceWithPropertiesExtension( + IInterfaceWithProperties, + typing_extensions.Protocol, +): """ stability :stability: experimental @@ -59841,7 +69571,7 @@ class IInterfaceWithPropertiesExtension(IInterfaceWithProperties, jsii.compat.Pr def __jsii_proxy_class__(): return _IInterfaceWithPropertiesExtensionProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="foo") def foo(self) -> jsii.Number: """ @@ -59850,20 +69580,22 @@ class IInterfaceWithPropertiesExtension(IInterfaceWithProperties, jsii.compat.Pr """ ... - @foo.setter + @foo.setter # type: ignore def foo(self, value: jsii.Number) -> None: ... -class _IInterfaceWithPropertiesExtensionProxy(jsii.proxy_for(IInterfaceWithProperties)): +class _IInterfaceWithPropertiesExtensionProxy( + jsii.proxy_for(IInterfaceWithProperties) # type: ignore +): """ stability :stability: experimental """ - __jsii_type__ = "jsii-calc.IInterfaceWithPropertiesExtension" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IInterfaceWithPropertiesExtension" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="foo") def foo(self) -> jsii.Number: """ @@ -59872,13 +69604,13 @@ class _IInterfaceWithPropertiesExtensionProxy(jsii.proxy_for(IInterfaceWithPrope """ return jsii.get(self, "foo") - @foo.setter + @foo.setter # type: ignore def foo(self, value: jsii.Number) -> None: jsii.set(self, "foo", value) @jsii.interface(jsii_type="jsii-calc.IJSII417PublicBaseOfBase") -class IJSII417PublicBaseOfBase(jsii.compat.Protocol): +class IJSII417PublicBaseOfBase(typing_extensions.Protocol): """ stability :stability: experimental @@ -59888,9 +69620,9 @@ class IJSII417PublicBaseOfBase(jsii.compat.Protocol): def __jsii_proxy_class__(): return _IJSII417PublicBaseOfBaseProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="hasRoot") - def has_root(self) -> bool: + def has_root(self) -> builtins.bool: """ stability :stability: experimental @@ -59912,11 +69644,11 @@ class _IJSII417PublicBaseOfBaseProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IJSII417PublicBaseOfBase" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IJSII417PublicBaseOfBase" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="hasRoot") - def has_root(self) -> bool: + def has_root(self) -> builtins.bool: """ stability :stability: experimental @@ -59933,7 +69665,7 @@ class _IJSII417PublicBaseOfBaseProxy: @jsii.interface(jsii_type="jsii-calc.IJsii487External") -class IJsii487External(jsii.compat.Protocol): +class IJsii487External(typing_extensions.Protocol): """ stability :stability: experimental @@ -59950,12 +69682,12 @@ class _IJsii487ExternalProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IJsii487External" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IJsii487External" pass @jsii.interface(jsii_type="jsii-calc.IJsii487External2") -class IJsii487External2(jsii.compat.Protocol): +class IJsii487External2(typing_extensions.Protocol): """ stability :stability: experimental @@ -59972,12 +69704,12 @@ class _IJsii487External2Proxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IJsii487External2" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IJsii487External2" pass @jsii.interface(jsii_type="jsii-calc.IJsii496") -class IJsii496(jsii.compat.Protocol): +class IJsii496(typing_extensions.Protocol): """ stability :stability: experimental @@ -59994,12 +69726,12 @@ class _IJsii496Proxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IJsii496" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IJsii496" pass @jsii.interface(jsii_type="jsii-calc.IMutableObjectLiteral") -class IMutableObjectLiteral(jsii.compat.Protocol): +class IMutableObjectLiteral(typing_extensions.Protocol): """ stability :stability: experimental @@ -60009,17 +69741,17 @@ class IMutableObjectLiteral(jsii.compat.Protocol): def __jsii_proxy_class__(): return _IMutableObjectLiteralProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="value") - def value(self) -> str: + def value(self) -> builtins.str: """ stability :stability: experimental """ ... - @value.setter - def value(self, value: str) -> None: + @value.setter # type: ignore + def value(self, value: builtins.str) -> None: ... @@ -60029,24 +69761,24 @@ class _IMutableObjectLiteralProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IMutableObjectLiteral" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IMutableObjectLiteral" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="value") - def value(self) -> str: + def value(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "value") - @value.setter - def value(self, value: str) -> None: + @value.setter # type: ignore + def value(self, value: builtins.str) -> None: jsii.set(self, "value", value) @jsii.interface(jsii_type="jsii-calc.INonInternalInterface") -class INonInternalInterface(IAnotherPublicInterface, jsii.compat.Protocol): +class INonInternalInterface(IAnotherPublicInterface, typing_extensions.Protocol): """ stability :stability: experimental @@ -60056,70 +69788,72 @@ class INonInternalInterface(IAnotherPublicInterface, jsii.compat.Protocol): def __jsii_proxy_class__(): return _INonInternalInterfaceProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="b") - def b(self) -> str: + def b(self) -> builtins.str: """ stability :stability: experimental """ ... - @b.setter - def b(self, value: str) -> None: + @b.setter # type: ignore + def b(self, value: builtins.str) -> None: ... - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="c") - def c(self) -> str: + def c(self) -> builtins.str: """ stability :stability: experimental """ ... - @c.setter - def c(self, value: str) -> None: + @c.setter # type: ignore + def c(self, value: builtins.str) -> None: ... -class _INonInternalInterfaceProxy(jsii.proxy_for(IAnotherPublicInterface)): +class _INonInternalInterfaceProxy( + jsii.proxy_for(IAnotherPublicInterface) # type: ignore +): """ stability :stability: experimental """ - __jsii_type__ = "jsii-calc.INonInternalInterface" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.INonInternalInterface" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="b") - def b(self) -> str: + def b(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "b") - @b.setter - def b(self, value: str) -> None: + @b.setter # type: ignore + def b(self, value: builtins.str) -> None: jsii.set(self, "b", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="c") - def c(self) -> str: + def c(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "c") - @c.setter - def c(self, value: str) -> None: + @c.setter # type: ignore + def c(self, value: builtins.str) -> None: jsii.set(self, "c", value) @jsii.interface(jsii_type="jsii-calc.IObjectWithProperty") -class IObjectWithProperty(jsii.compat.Protocol): +class IObjectWithProperty(typing_extensions.Protocol): """Make sure that setters are properly called on objects with interfaces. stability @@ -60130,21 +69864,21 @@ class IObjectWithProperty(jsii.compat.Protocol): def __jsii_proxy_class__(): return _IObjectWithPropertyProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="property") - def property(self) -> str: + def property(self) -> builtins.str: """ stability :stability: experimental """ ... - @property.setter - def property(self, value: str) -> None: + @property.setter # type: ignore + def property(self, value: builtins.str) -> None: ... @jsii.member(jsii_name="wasSet") - def was_set(self) -> bool: + def was_set(self) -> builtins.bool: """ stability :stability: experimental @@ -60159,23 +69893,23 @@ class _IObjectWithPropertyProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IObjectWithProperty" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IObjectWithProperty" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="property") - def property(self) -> str: + def property(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "property") - @property.setter - def property(self, value: str) -> None: + @property.setter # type: ignore + def property(self, value: builtins.str) -> None: jsii.set(self, "property", value) @jsii.member(jsii_name="wasSet") - def was_set(self) -> bool: + def was_set(self) -> builtins.bool: """ stability :stability: experimental @@ -60184,7 +69918,7 @@ class _IObjectWithPropertyProxy: @jsii.interface(jsii_type="jsii-calc.IOptionalMethod") -class IOptionalMethod(jsii.compat.Protocol): +class IOptionalMethod(typing_extensions.Protocol): """Checks that optional result from interface method code generates correctly. stability @@ -60196,7 +69930,7 @@ class IOptionalMethod(jsii.compat.Protocol): return _IOptionalMethodProxy @jsii.member(jsii_name="optional") - def optional(self) -> typing.Optional[str]: + def optional(self) -> typing.Optional[builtins.str]: """ stability :stability: experimental @@ -60211,10 +69945,10 @@ class _IOptionalMethodProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IOptionalMethod" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IOptionalMethod" @jsii.member(jsii_name="optional") - def optional(self) -> typing.Optional[str]: + def optional(self) -> typing.Optional[builtins.str]: """ stability :stability: experimental @@ -60223,7 +69957,7 @@ class _IOptionalMethodProxy: @jsii.interface(jsii_type="jsii-calc.IPrivatelyImplemented") -class IPrivatelyImplemented(jsii.compat.Protocol): +class IPrivatelyImplemented(typing_extensions.Protocol): """ stability :stability: experimental @@ -60233,9 +69967,9 @@ class IPrivatelyImplemented(jsii.compat.Protocol): def __jsii_proxy_class__(): return _IPrivatelyImplementedProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="success") - def success(self) -> bool: + def success(self) -> builtins.bool: """ stability :stability: experimental @@ -60249,11 +69983,11 @@ class _IPrivatelyImplementedProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IPrivatelyImplemented" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IPrivatelyImplemented" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="success") - def success(self) -> bool: + def success(self) -> builtins.bool: """ stability :stability: experimental @@ -60262,7 +69996,7 @@ class _IPrivatelyImplementedProxy: @jsii.interface(jsii_type="jsii-calc.IPublicInterface") -class IPublicInterface(jsii.compat.Protocol): +class IPublicInterface(typing_extensions.Protocol): """ stability :stability: experimental @@ -60273,7 +70007,7 @@ class IPublicInterface(jsii.compat.Protocol): return _IPublicInterfaceProxy @jsii.member(jsii_name="bye") - def bye(self) -> str: + def bye(self) -> builtins.str: """ stability :stability: experimental @@ -60287,10 +70021,10 @@ class _IPublicInterfaceProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IPublicInterface" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IPublicInterface" @jsii.member(jsii_name="bye") - def bye(self) -> str: + def bye(self) -> builtins.str: """ stability :stability: experimental @@ -60299,7 +70033,7 @@ class _IPublicInterfaceProxy: @jsii.interface(jsii_type="jsii-calc.IPublicInterface2") -class IPublicInterface2(jsii.compat.Protocol): +class IPublicInterface2(typing_extensions.Protocol): """ stability :stability: experimental @@ -60310,7 +70044,7 @@ class IPublicInterface2(jsii.compat.Protocol): return _IPublicInterface2Proxy @jsii.member(jsii_name="ciao") - def ciao(self) -> str: + def ciao(self) -> builtins.str: """ stability :stability: experimental @@ -60324,10 +70058,10 @@ class _IPublicInterface2Proxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IPublicInterface2" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IPublicInterface2" @jsii.member(jsii_name="ciao") - def ciao(self) -> str: + def ciao(self) -> builtins.str: """ stability :stability: experimental @@ -60336,7 +70070,7 @@ class _IPublicInterface2Proxy: @jsii.interface(jsii_type="jsii-calc.IRandomNumberGenerator") -class IRandomNumberGenerator(jsii.compat.Protocol): +class IRandomNumberGenerator(typing_extensions.Protocol): """Generates random numbers. stability @@ -60367,7 +70101,7 @@ class _IRandomNumberGeneratorProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IRandomNumberGenerator" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IRandomNumberGenerator" @jsii.member(jsii_name="next") def next(self) -> jsii.Number: @@ -60383,7 +70117,7 @@ class _IRandomNumberGeneratorProxy: @jsii.interface(jsii_type="jsii-calc.IReturnJsii976") -class IReturnJsii976(jsii.compat.Protocol): +class IReturnJsii976(typing_extensions.Protocol): """Returns a subclass of a known class which implements an interface. stability @@ -60394,7 +70128,7 @@ class IReturnJsii976(jsii.compat.Protocol): def __jsii_proxy_class__(): return _IReturnJsii976Proxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="foo") def foo(self) -> jsii.Number: """ @@ -60411,9 +70145,9 @@ class _IReturnJsii976Proxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IReturnJsii976" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IReturnJsii976" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="foo") def foo(self) -> jsii.Number: """ @@ -60424,7 +70158,7 @@ class _IReturnJsii976Proxy: @jsii.interface(jsii_type="jsii-calc.IReturnsNumber") -class IReturnsNumber(jsii.compat.Protocol): +class IReturnsNumber(typing_extensions.Protocol): """ stability :stability: experimental @@ -60434,7 +70168,7 @@ class IReturnsNumber(jsii.compat.Protocol): def __jsii_proxy_class__(): return _IReturnsNumberProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="numberProp") def number_prop(self) -> scope.jsii_calc_lib.Number: """ @@ -60458,9 +70192,9 @@ class _IReturnsNumberProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IReturnsNumber" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IReturnsNumber" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="numberProp") def number_prop(self) -> scope.jsii_calc_lib.Number: """ @@ -60479,17 +70213,17 @@ class _IReturnsNumberProxy: @jsii.interface(jsii_type="jsii-calc.IStableInterface") -class IStableInterface(jsii.compat.Protocol): +class IStableInterface(typing_extensions.Protocol): @builtins.staticmethod def __jsii_proxy_class__(): return _IStableInterfaceProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: ... - @mutable_property.setter + @mutable_property.setter # type: ignore def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: ... @@ -60499,14 +70233,14 @@ class IStableInterface(jsii.compat.Protocol): class _IStableInterfaceProxy: - __jsii_type__ = "jsii-calc.IStableInterface" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IStableInterface" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: return jsii.get(self, "mutableProperty") - @mutable_property.setter + @mutable_property.setter # type: ignore def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: jsii.set(self, "mutableProperty", value) @@ -60516,7 +70250,7 @@ class _IStableInterfaceProxy: @jsii.interface(jsii_type="jsii-calc.IStructReturningDelegate") -class IStructReturningDelegate(jsii.compat.Protocol): +class IStructReturningDelegate(typing_extensions.Protocol): """Verifies that a "pure" implementation of an interface works correctly. stability @@ -60543,7 +70277,7 @@ class _IStructReturningDelegateProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IStructReturningDelegate" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IStructReturningDelegate" @jsii.member(jsii_name="returnStruct") def return_struct(self) -> "StructB": @@ -60555,7 +70289,8 @@ class _IStructReturningDelegateProxy: class ImplementInternalInterface( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ImplementInternalInterface" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.ImplementInternalInterface", ): """ stability @@ -60569,17 +70304,17 @@ class ImplementInternalInterface( """ jsii.create(ImplementInternalInterface, self, []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="prop") - def prop(self) -> str: + def prop(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "prop") - @prop.setter - def prop(self, value: str) -> None: + @prop.setter # type: ignore + def prop(self, value: builtins.str) -> None: jsii.set(self, "prop", value) @@ -60596,7 +70331,7 @@ class Implementation(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Implementatio """ jsii.create(Implementation, self, []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="value") def value(self) -> jsii.Number: """ @@ -60608,7 +70343,8 @@ class Implementation(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Implementatio @jsii.implements(IInterfaceWithInternal) class ImplementsInterfaceWithInternal( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ImplementsInterfaceWithInternal" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.ImplementsInterfaceWithInternal", ): """ stability @@ -60650,7 +70386,8 @@ class ImplementsInterfaceWithInternalSubclass( class ImplementsPrivateInterface( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ImplementsPrivateInterface" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.ImplementsPrivateInterface", ): """ stability @@ -60664,17 +70401,17 @@ class ImplementsPrivateInterface( """ jsii.create(ImplementsPrivateInterface, self, []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="private") - def private(self) -> str: + def private(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "private") - @private.setter - def private(self, value: str) -> None: + @private.setter # type: ignore + def private(self, value: builtins.str) -> None: jsii.set(self, "private", value) @@ -60688,7 +70425,7 @@ class ImplictBaseOfBase(scope.jsii_calc_base.BaseProps): self, *, foo: scope.jsii_calc_base_of_base.Very, - bar: str, + bar: builtins.str, goo: datetime.datetime, ) -> None: """ @@ -60699,7 +70436,7 @@ class ImplictBaseOfBase(scope.jsii_calc_base.BaseProps): stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "foo": foo, "bar": bar, "goo": goo, @@ -60707,11 +70444,15 @@ class ImplictBaseOfBase(scope.jsii_calc_base.BaseProps): @builtins.property def foo(self) -> scope.jsii_calc_base_of_base.Very: - return self._values.get("foo") + result = self._values.get("foo") + assert result is not None, "Required property 'foo' is missing" + return result @builtins.property - def bar(self) -> str: - return self._values.get("bar") + def bar(self) -> builtins.str: + result = self._values.get("bar") + assert result is not None, "Required property 'bar' is missing" + return result @builtins.property def goo(self) -> datetime.datetime: @@ -60719,12 +70460,14 @@ class ImplictBaseOfBase(scope.jsii_calc_base.BaseProps): stability :stability: experimental """ - return self._values.get("goo") + result = self._values.get("goo") + assert result is not None, "Required property 'goo' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -60734,7 +70477,8 @@ class ImplictBaseOfBase(scope.jsii_calc_base.BaseProps): class InterfaceCollections( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.InterfaceCollections" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.InterfaceCollections", ): """Verifies that collections of interfaces or structs are correctly handled. @@ -60764,7 +70508,7 @@ class InterfaceCollections( @jsii.member(jsii_name="mapOfInterfaces") @builtins.classmethod - def map_of_interfaces(cls) -> typing.Mapping[str, "IBell"]: + def map_of_interfaces(cls) -> typing.Mapping[builtins.str, "IBell"]: """ stability :stability: experimental @@ -60773,7 +70517,7 @@ class InterfaceCollections( @jsii.member(jsii_name="mapOfStructs") @builtins.classmethod - def map_of_structs(cls) -> typing.Mapping[str, "StructA"]: + def map_of_structs(cls) -> typing.Mapping[builtins.str, "StructA"]: """ stability :stability: experimental @@ -60791,7 +70535,8 @@ class InterfacesMaker(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.InterfacesMa @jsii.member(jsii_name="makeInterfaces") @builtins.classmethod def make_interfaces( - cls, count: jsii.Number + cls, + count: jsii.Number, ) -> typing.List[scope.jsii_calc_lib.IDoublable]: """ :param count: - @@ -60837,7 +70582,8 @@ class _IsomorphismProxy(Isomorphism): class JSII417PublicBaseOfBase( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.JSII417PublicBaseOfBase" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.JSII417PublicBaseOfBase", ): """ stability @@ -60868,9 +70614,9 @@ class JSII417PublicBaseOfBase( """ return jsii.invoke(self, "foo", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="hasRoot") - def has_root(self) -> bool: + def has_root(self) -> builtins.bool: """ stability :stability: experimental @@ -60879,7 +70625,8 @@ class JSII417PublicBaseOfBase( class JSObjectLiteralForInterface( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.JSObjectLiteralForInterface" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.JSObjectLiteralForInterface", ): """ stability @@ -60911,7 +70658,8 @@ class JSObjectLiteralForInterface( class JSObjectLiteralToNative( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.JSObjectLiteralToNative" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.JSObjectLiteralToNative", ): """ stability @@ -60935,7 +70683,8 @@ class JSObjectLiteralToNative( class JSObjectLiteralToNativeClass( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.JSObjectLiteralToNativeClass" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.JSObjectLiteralToNativeClass", ): """ stability @@ -60949,20 +70698,20 @@ class JSObjectLiteralToNativeClass( """ jsii.create(JSObjectLiteralToNativeClass, self, []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="propA") - def prop_a(self) -> str: + def prop_a(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "propA") - @prop_a.setter - def prop_a(self, value: str) -> None: + @prop_a.setter # type: ignore + def prop_a(self, value: builtins.str) -> None: jsii.set(self, "propA", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="propB") def prop_b(self) -> jsii.Number: """ @@ -60971,13 +70720,14 @@ class JSObjectLiteralToNativeClass( """ return jsii.get(self, "propB") - @prop_b.setter + @prop_b.setter # type: ignore def prop_b(self, value: jsii.Number) -> None: jsii.set(self, "propB", value) class JavaReservedWords( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.JavaReservedWords" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.JavaReservedWords", ): """ stability @@ -61407,17 +71157,17 @@ class JavaReservedWords( """ return jsii.invoke(self, "volatile", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="while") - def while_(self) -> str: + def while_(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "while") - @while_.setter - def while_(self, value: str) -> None: + @while_.setter # type: ignore + def while_(self, value: builtins.str) -> None: jsii.set(self, "while", value) @@ -61465,15 +71215,15 @@ class JsiiAgent(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.JsiiAgent"): """ jsii.create(JsiiAgent, self, []) - @jsii.python.classproperty - @jsii.member(jsii_name="jsiiAgent") - def jsii_agent(cls) -> typing.Optional[str]: + @jsii.python.classproperty # type: ignore + @jsii.member(jsii_name="value") + def value(cls) -> typing.Optional[builtins.str]: """Returns the value of the JSII_AGENT environment variable. stability :stability: experimental """ - return jsii.sget(cls, "jsiiAgent") + return jsii.sget(cls, "value") class JsonFormatter(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.JsonFormatter"): @@ -61604,7 +71354,7 @@ class JsonFormatter(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.JsonFormatter" @jsii.member(jsii_name="stringify") @builtins.classmethod - def stringify(cls, value: typing.Any = None) -> typing.Optional[str]: + def stringify(cls, value: typing.Any = None) -> typing.Optional[builtins.str]: """ :param value: - @@ -61630,10 +71380,10 @@ class LoadBalancedFargateServiceProps: self, *, container_port: typing.Optional[jsii.Number] = None, - cpu: typing.Optional[str] = None, - memory_mib: typing.Optional[str] = None, - public_load_balancer: typing.Optional[bool] = None, - public_tasks: typing.Optional[bool] = None, + cpu: typing.Optional[builtins.str] = None, + memory_mib: typing.Optional[builtins.str] = None, + public_load_balancer: typing.Optional[builtins.bool] = None, + public_tasks: typing.Optional[builtins.bool] = None, ) -> None: """jsii#298: show default values in sphinx documentation, and respect newlines. @@ -61646,7 +71396,7 @@ class LoadBalancedFargateServiceProps: stability :stability: experimental """ - self._values = {} + self._values: typing.Dict[str, typing.Any] = {} if container_port is not None: self._values["container_port"] = container_port if cpu is not None: @@ -61670,10 +71420,11 @@ class LoadBalancedFargateServiceProps: stability :stability: experimental """ - return self._values.get("container_port") + result = self._values.get("container_port") + return result @builtins.property - def cpu(self) -> typing.Optional[str]: + def cpu(self) -> typing.Optional[builtins.str]: """The number of cpu units used by the task. Valid values, which determines your range of valid values for the memory parameter: @@ -61691,10 +71442,11 @@ class LoadBalancedFargateServiceProps: stability :stability: experimental """ - return self._values.get("cpu") + result = self._values.get("cpu") + return result @builtins.property - def memory_mib(self) -> typing.Optional[str]: + def memory_mib(self) -> typing.Optional[builtins.str]: """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 @@ -61718,10 +71470,11 @@ class LoadBalancedFargateServiceProps: stability :stability: experimental """ - return self._values.get("memory_mib") + result = self._values.get("memory_mib") + return result @builtins.property - def public_load_balancer(self) -> typing.Optional[bool]: + def public_load_balancer(self) -> typing.Optional[builtins.bool]: """Determines whether the Application Load Balancer will be internet-facing. default @@ -61730,10 +71483,11 @@ class LoadBalancedFargateServiceProps: stability :stability: experimental """ - return self._values.get("public_load_balancer") + result = self._values.get("public_load_balancer") + return result @builtins.property - def public_tasks(self) -> typing.Optional[bool]: + def public_tasks(self) -> typing.Optional[builtins.bool]: """Determines whether your Fargate Service will be assigned a public IP address. default @@ -61742,12 +71496,13 @@ class LoadBalancedFargateServiceProps: stability :stability: experimental """ - return self._values.get("public_tasks") + result = self._values.get("public_tasks") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -61757,7 +71512,8 @@ class LoadBalancedFargateServiceProps: class MethodNamedProperty( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.MethodNamedProperty" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.MethodNamedProperty", ): """ stability @@ -61772,14 +71528,14 @@ class MethodNamedProperty( jsii.create(MethodNamedProperty, self, []) @jsii.member(jsii_name="property") - def property(self) -> str: + def property(self) -> builtins.str: """ stability :stability: experimental """ return jsii.invoke(self, "property", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="elite") def elite(self) -> jsii.Number: """ @@ -61791,7 +71547,9 @@ class MethodNamedProperty( @jsii.implements(IFriendlier, IRandomNumberGenerator) class Multiply( - BinaryOperation, metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Multiply" + BinaryOperation, + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.Multiply", ): """The "*" binary operation. @@ -61800,7 +71558,9 @@ class Multiply( """ def __init__( - self, lhs: scope.jsii_calc_lib.Value, rhs: scope.jsii_calc_lib.Value + self, + lhs: scope.jsii_calc_lib.NumericValue, + rhs: scope.jsii_calc_lib.NumericValue, ) -> None: """Creates a BinaryOperation. @@ -61813,7 +71573,7 @@ class Multiply( jsii.create(Multiply, self, [lhs, rhs]) @jsii.member(jsii_name="farewell") - def farewell(self) -> str: + def farewell(self) -> builtins.str: """Say farewell. stability @@ -61822,7 +71582,7 @@ class Multiply( return jsii.invoke(self, "farewell", []) @jsii.member(jsii_name="goodbye") - def goodbye(self) -> str: + def goodbye(self) -> builtins.str: """Say goodbye. stability @@ -61840,7 +71600,7 @@ class Multiply( return jsii.invoke(self, "next", []) @jsii.member(jsii_name="toString") - def to_string(self) -> str: + def to_string(self) -> builtins.str: """String representation of the value. stability @@ -61848,7 +71608,7 @@ class Multiply( """ return jsii.invoke(self, "toString", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="value") def value(self) -> jsii.Number: """The value. @@ -61860,7 +71620,8 @@ class Multiply( class NestedClassInstance( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.NestedClassInstance" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.NestedClassInstance", ): """ stability @@ -61870,7 +71631,7 @@ class NestedClassInstance( @jsii.member(jsii_name="makeInstance") @builtins.classmethod def make_instance( - cls + cls, ) -> scope.jsii_calc_lib.custom_submodule_name.NestingClass.NestedClass: """ stability @@ -61892,7 +71653,7 @@ class NestedStruct: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "number_prop": number_prop, } @@ -61903,12 +71664,14 @@ class NestedStruct: stability :stability: experimental """ - return self._values.get("number_prop") + result = self._values.get("number_prop") + assert result is not None, "Required property 'number_prop' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -61918,7 +71681,8 @@ class NestedStruct: class NodeStandardLibrary( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.NodeStandardLibrary" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.NodeStandardLibrary", ): """Test fixture to verify that jsii modules can use the node standard library. @@ -61934,7 +71698,7 @@ class NodeStandardLibrary( jsii.create(NodeStandardLibrary, self, []) @jsii.member(jsii_name="cryptoSha256") - def crypto_sha256(self) -> str: + def crypto_sha256(self) -> builtins.str: """Uses node.js "crypto" module to calculate sha256 of a string. return @@ -61946,7 +71710,7 @@ class NodeStandardLibrary( return jsii.invoke(self, "cryptoSha256", []) @jsii.member(jsii_name="fsReadFile") - def fs_read_file(self) -> str: + def fs_read_file(self) -> builtins.str: """Reads a local resource file (resource.txt) asynchronously. return @@ -61958,7 +71722,7 @@ class NodeStandardLibrary( return jsii.ainvoke(self, "fsReadFile", []) @jsii.member(jsii_name="fsReadFileSync") - def fs_read_file_sync(self) -> str: + def fs_read_file_sync(self) -> builtins.str: """Sync version of fsReadFile. return @@ -61969,9 +71733,9 @@ class NodeStandardLibrary( """ return jsii.invoke(self, "fsReadFileSync", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="osPlatform") - def os_platform(self) -> str: + def os_platform(self) -> builtins.str: """Returns the current os.platform() from the "os" node module. stability @@ -61981,7 +71745,8 @@ class NodeStandardLibrary( class NullShouldBeTreatedAsUndefined( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.NullShouldBeTreatedAsUndefined" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.NullShouldBeTreatedAsUndefined", ): """jsii#282, aws-cdk#157: null should be treated as "undefined". @@ -61989,7 +71754,7 @@ class NullShouldBeTreatedAsUndefined( :stability: experimental """ - def __init__(self, _param1: str, optional: typing.Any = None) -> None: + def __init__(self, _param1: builtins.str, optional: typing.Any = None) -> None: """ :param _param1: - :param optional: - @@ -62038,17 +71803,17 @@ class NullShouldBeTreatedAsUndefined( """ return jsii.invoke(self, "verifyPropertyIsUndefined", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="changeMeToUndefined") - def change_me_to_undefined(self) -> typing.Optional[str]: + def change_me_to_undefined(self) -> typing.Optional[builtins.str]: """ stability :stability: experimental """ return jsii.get(self, "changeMeToUndefined") - @change_me_to_undefined.setter - def change_me_to_undefined(self, value: typing.Optional[str]) -> None: + @change_me_to_undefined.setter # type: ignore + def change_me_to_undefined(self, value: typing.Optional[builtins.str]) -> None: jsii.set(self, "changeMeToUndefined", value) @@ -62074,7 +71839,7 @@ class NullShouldBeTreatedAsUndefinedData: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "array_with_three_elements_and_undefined_as_second_argument": array_with_three_elements_and_undefined_as_second_argument, } if this_should_be_undefined is not None: @@ -62088,7 +71853,9 @@ class NullShouldBeTreatedAsUndefinedData: stability :stability: experimental """ - return self._values.get("array_with_three_elements_and_undefined_as_second_argument") + result = self._values.get("array_with_three_elements_and_undefined_as_second_argument") + assert result is not None, "Required property 'array_with_three_elements_and_undefined_as_second_argument' is missing" + return result @builtins.property def this_should_be_undefined(self) -> typing.Any: @@ -62096,12 +71863,13 @@ class NullShouldBeTreatedAsUndefinedData: stability :stability: experimental """ - return self._values.get("this_should_be_undefined") + result = self._values.get("this_should_be_undefined") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -62127,7 +71895,7 @@ class NumberGenerator(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.NumberGenera jsii.create(NumberGenerator, self, [generator]) @jsii.member(jsii_name="isSameGenerator") - def is_same_generator(self, gen: "IRandomNumberGenerator") -> bool: + def is_same_generator(self, gen: "IRandomNumberGenerator") -> builtins.bool: """ :param gen: - @@ -62144,7 +71912,7 @@ class NumberGenerator(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.NumberGenera """ return jsii.invoke(self, "nextTimes100", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="generator") def generator(self) -> "IRandomNumberGenerator": """ @@ -62153,13 +71921,14 @@ class NumberGenerator(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.NumberGenera """ return jsii.get(self, "generator") - @generator.setter + @generator.setter # type: ignore def generator(self, value: "IRandomNumberGenerator") -> None: jsii.set(self, "generator", value) class ObjectRefsInCollections( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ObjectRefsInCollections" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.ObjectRefsInCollections", ): """Verify that object references can be passed inside collections. @@ -62176,7 +71945,8 @@ class ObjectRefsInCollections( @jsii.member(jsii_name="sumFromArray") def sum_from_array( - self, values: typing.List[scope.jsii_calc_lib.Value] + self, + values: typing.List[scope.jsii_calc_lib.NumericValue], ) -> jsii.Number: """Returns the sum of all values. @@ -62189,7 +71959,8 @@ class ObjectRefsInCollections( @jsii.member(jsii_name="sumFromMap") def sum_from_map( - self, values: typing.Mapping[str, scope.jsii_calc_lib.Value] + self, + values: typing.Mapping[builtins.str, scope.jsii_calc_lib.NumericValue], ) -> jsii.Number: """Returns the sum of all values in a map. @@ -62202,7 +71973,8 @@ class ObjectRefsInCollections( class ObjectWithPropertyProvider( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ObjectWithPropertyProvider" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.ObjectWithPropertyProvider", ): """ stability @@ -62247,7 +72019,8 @@ class Old(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Old"): class OptionalArgumentInvoker( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.OptionalArgumentInvoker" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.OptionalArgumentInvoker", ): """ stability @@ -62281,7 +72054,8 @@ class OptionalArgumentInvoker( class OptionalConstructorArgument( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.OptionalConstructorArgument" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.OptionalConstructorArgument", ): """ stability @@ -62291,7 +72065,7 @@ class OptionalConstructorArgument( def __init__( self, arg1: jsii.Number, - arg2: str, + arg2: builtins.str, arg3: typing.Optional[datetime.datetime] = None, ) -> None: """ @@ -62304,7 +72078,7 @@ class OptionalConstructorArgument( """ jsii.create(OptionalConstructorArgument, self, [arg1, arg2, arg3]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="arg1") def arg1(self) -> jsii.Number: """ @@ -62313,16 +72087,16 @@ class OptionalConstructorArgument( """ return jsii.get(self, "arg1") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="arg2") - def arg2(self) -> str: + def arg2(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "arg2") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="arg3") def arg3(self) -> typing.Optional[datetime.datetime]: """ @@ -62338,29 +72112,30 @@ class OptionalConstructorArgument( name_mapping={"field": "field"}, ) class OptionalStruct: - def __init__(self, *, field: typing.Optional[str] = None) -> None: + def __init__(self, *, field: typing.Optional[builtins.str] = None) -> None: """ :param field: stability :stability: experimental """ - self._values = {} + self._values: typing.Dict[str, typing.Any] = {} if field is not None: self._values["field"] = field @builtins.property - def field(self) -> typing.Optional[str]: + def field(self) -> typing.Optional[builtins.str]: """ stability :stability: experimental """ - return self._values.get("field") + result = self._values.get("field") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -62370,14 +72145,15 @@ class OptionalStruct: class OptionalStructConsumer( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.OptionalStructConsumer" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.OptionalStructConsumer", ): """ stability :stability: experimental """ - def __init__(self, *, field: typing.Optional[str] = None) -> None: + def __init__(self, *, field: typing.Optional[builtins.str] = None) -> None: """ :param field: @@ -62388,18 +72164,18 @@ class OptionalStructConsumer( jsii.create(OptionalStructConsumer, self, [optional_struct]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="parameterWasUndefined") - def parameter_was_undefined(self) -> bool: + def parameter_was_undefined(self) -> builtins.bool: """ stability :stability: experimental """ return jsii.get(self, "parameterWasUndefined") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="fieldValue") - def field_value(self) -> typing.Optional[str]: + def field_value(self) -> typing.Optional[builtins.str]: """ stability :stability: experimental @@ -62408,7 +72184,8 @@ class OptionalStructConsumer( class OverridableProtectedMember( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.OverridableProtectedMember" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.OverridableProtectedMember", ): """ see @@ -62425,7 +72202,7 @@ class OverridableProtectedMember( jsii.create(OverridableProtectedMember, self, []) @jsii.member(jsii_name="overrideMe") - def _override_me(self) -> str: + def _override_me(self) -> builtins.str: """ stability :stability: experimental @@ -62441,38 +72218,39 @@ class OverridableProtectedMember( return jsii.invoke(self, "switchModes", []) @jsii.member(jsii_name="valueFromProtected") - def value_from_protected(self) -> str: + def value_from_protected(self) -> builtins.str: """ stability :stability: experimental """ return jsii.invoke(self, "valueFromProtected", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="overrideReadOnly") - def _override_read_only(self) -> str: + def _override_read_only(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "overrideReadOnly") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="overrideReadWrite") - def _override_read_write(self) -> str: + def _override_read_write(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "overrideReadWrite") - @_override_read_write.setter - def _override_read_write(self, value: str) -> None: + @_override_read_write.setter # type: ignore + def _override_read_write(self, value: builtins.str) -> None: jsii.set(self, "overrideReadWrite", value) class OverrideReturnsObject( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.OverrideReturnsObject" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.OverrideReturnsObject", ): """ stability @@ -62503,7 +72281,7 @@ class OverrideReturnsObject( name_mapping={"foo": "foo"}, ) class ParentStruct982: - def __init__(self, *, foo: str) -> None: + def __init__(self, *, foo: builtins.str) -> None: """https://github.com/aws/jsii/issues/982. :param foo: @@ -62511,22 +72289,24 @@ class ParentStruct982: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "foo": foo, } @builtins.property - def foo(self) -> str: + def foo(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("foo") + result = self._values.get("foo") + assert result is not None, "Required property 'foo' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -62562,7 +72342,7 @@ class PartiallyInitializedThisConsumer( obj: "ConstructorPassesThisOut", dt: datetime.datetime, ev: "AllTypesEnum", - ) -> str: + ) -> builtins.str: """ :param obj: - :param dt: - @@ -62581,7 +72361,7 @@ class _PartiallyInitializedThisConsumerProxy(PartiallyInitializedThisConsumer): obj: "ConstructorPassesThisOut", dt: datetime.datetime, ev: "AllTypesEnum", - ) -> str: + ) -> builtins.str: """ :param obj: - :param dt: - @@ -62607,7 +72387,7 @@ class Polymorphism(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Polymorphism"): jsii.create(Polymorphism, self, []) @jsii.member(jsii_name="sayHello") - def say_hello(self, friendly: scope.jsii_calc_lib.IFriendly) -> str: + def say_hello(self, friendly: scope.jsii_calc_lib.IFriendly) -> builtins.str: """ :param friendly: - @@ -62618,7 +72398,9 @@ class Polymorphism(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Polymorphism"): class Power( - _CompositeOperation_1c4d123b, metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Power" + _CompositeOperation_1c4d123b, + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.Power", ): """The power operation. @@ -62627,7 +72409,9 @@ class Power( """ def __init__( - self, base: scope.jsii_calc_lib.Value, pow: scope.jsii_calc_lib.Value + self, + base: scope.jsii_calc_lib.NumericValue, + pow: scope.jsii_calc_lib.NumericValue, ) -> None: """Creates a Power operation. @@ -62639,9 +72423,9 @@ class Power( """ jsii.create(Power, self, [base, pow]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="base") - def base(self) -> scope.jsii_calc_lib.Value: + def base(self) -> scope.jsii_calc_lib.NumericValue: """The base of the power. stability @@ -62649,9 +72433,9 @@ class Power( """ return jsii.get(self, "base") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="expression") - def expression(self) -> scope.jsii_calc_lib.Value: + def expression(self) -> scope.jsii_calc_lib.NumericValue: """The expression that this operation consists of. Must be implemented by derived classes. @@ -62661,9 +72445,9 @@ class Power( """ return jsii.get(self, "expression") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="pow") - def pow(self) -> scope.jsii_calc_lib.Value: + def pow(self) -> scope.jsii_calc_lib.NumericValue: """The number of times to multiply. stability @@ -62673,7 +72457,8 @@ class Power( class PropertyNamedProperty( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.PropertyNamedProperty" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.PropertyNamedProperty", ): """Reproduction for https://github.com/aws/jsii/issues/1113 Where a method or property named "property" would result in impossible to load Python code. @@ -62688,18 +72473,18 @@ class PropertyNamedProperty( """ jsii.create(PropertyNamedProperty, self, []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="property") - def property(self) -> str: + def property(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "property") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="yetAnoterOne") - def yet_anoter_one(self) -> bool: + def yet_anoter_one(self) -> builtins.bool: """ stability :stability: experimental @@ -62730,7 +72515,8 @@ class PublicClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.PublicClass"): class PythonReservedWords( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.PythonReservedWords" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.PythonReservedWords", ): """ stability @@ -63002,7 +72788,8 @@ class PythonReservedWords( class ReferenceEnumFromScopedPackage( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ReferenceEnumFromScopedPackage" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.ReferenceEnumFromScopedPackage", ): """See awslabs/jsii#138. @@ -63035,7 +72822,7 @@ class ReferenceEnumFromScopedPackage( """ return jsii.invoke(self, "saveFoo", [value]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="foo") def foo(self) -> typing.Optional[scope.jsii_calc_lib.EnumFromScopedModule]: """ @@ -63044,9 +72831,10 @@ class ReferenceEnumFromScopedPackage( """ return jsii.get(self, "foo") - @foo.setter + @foo.setter # type: ignore def foo( - self, value: typing.Optional[scope.jsii_calc_lib.EnumFromScopedModule] + self, + value: typing.Optional[scope.jsii_calc_lib.EnumFromScopedModule], ) -> None: jsii.set(self, "foo", value) @@ -63073,7 +72861,7 @@ class ReturnsPrivateImplementationOfInterface( """ jsii.create(ReturnsPrivateImplementationOfInterface, self, []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="privateImplementation") def private_implementation(self) -> "IPrivatelyImplemented": """ @@ -63092,7 +72880,7 @@ class RootStruct: def __init__( self, *, - string_prop: str, + string_prop: builtins.str, nested_struct: typing.Optional["NestedStruct"] = None, ) -> None: """This is here to check that we can pass a nested struct into a kwargs by specifying it as an in-line dictionary. @@ -63108,20 +72896,22 @@ class RootStruct: """ if isinstance(nested_struct, dict): nested_struct = NestedStruct(**nested_struct) - self._values = { + self._values: typing.Dict[str, typing.Any] = { "string_prop": string_prop, } if nested_struct is not None: self._values["nested_struct"] = nested_struct @builtins.property - def string_prop(self) -> str: + def string_prop(self) -> builtins.str: """May not be empty. stability :stability: experimental """ - return self._values.get("string_prop") + result = self._values.get("string_prop") + assert result is not None, "Required property 'string_prop' is missing" + return result @builtins.property def nested_struct(self) -> typing.Optional["NestedStruct"]: @@ -63129,12 +72919,13 @@ class RootStruct: stability :stability: experimental """ - return self._values.get("nested_struct") + result = self._values.get("nested_struct") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -63144,7 +72935,8 @@ class RootStruct: class RootStructValidator( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.RootStructValidator" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.RootStructValidator", ): """ stability @@ -63154,7 +72946,10 @@ class RootStructValidator( @jsii.member(jsii_name="validate") @builtins.classmethod def validate( - cls, *, string_prop: str, nested_struct: typing.Optional["NestedStruct"] = None + cls, + *, + string_prop: builtins.str, + nested_struct: typing.Optional["NestedStruct"] = None, ) -> None: """ :param string_prop: May not be empty. @@ -63169,7 +72964,8 @@ class RootStructValidator( class RuntimeTypeChecking( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.RuntimeTypeChecking" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.RuntimeTypeChecking", ): """ stability @@ -63187,7 +72983,7 @@ class RuntimeTypeChecking( def method_with_defaulted_arguments( self, arg1: typing.Optional[jsii.Number] = None, - arg2: typing.Optional[str] = None, + arg2: typing.Optional[builtins.str] = None, arg3: typing.Optional[datetime.datetime] = None, ) -> None: """ @@ -63214,7 +73010,7 @@ class RuntimeTypeChecking( def method_with_optional_arguments( self, arg1: jsii.Number, - arg2: str, + arg2: builtins.str, arg3: typing.Optional[datetime.datetime] = None, ) -> None: """Used to verify verification of number of method arguments. @@ -63241,8 +73037,8 @@ class SecondLevelStruct: def __init__( self, *, - deeper_required_prop: str, - deeper_optional_prop: typing.Optional[str] = None, + deeper_required_prop: builtins.str, + deeper_optional_prop: typing.Optional[builtins.str] = None, ) -> None: """ :param deeper_required_prop: It's long and required. @@ -63251,34 +73047,37 @@ class SecondLevelStruct: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "deeper_required_prop": deeper_required_prop, } if deeper_optional_prop is not None: self._values["deeper_optional_prop"] = deeper_optional_prop @builtins.property - def deeper_required_prop(self) -> str: + def deeper_required_prop(self) -> builtins.str: """It's long and required. stability :stability: experimental """ - return self._values.get("deeper_required_prop") + result = self._values.get("deeper_required_prop") + assert result is not None, "Required property 'deeper_required_prop' is missing" + return result @builtins.property - def deeper_optional_prop(self) -> typing.Optional[str]: + def deeper_optional_prop(self) -> typing.Optional[builtins.str]: """It's long, but you'll almost never pass it. stability :stability: experimental """ - return self._values.get("deeper_optional_prop") + result = self._values.get("deeper_optional_prop") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -63288,7 +73087,8 @@ class SecondLevelStruct: class SingleInstanceTwoTypes( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.SingleInstanceTwoTypes" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.SingleInstanceTwoTypes", ): """Test that a single instance can be returned under two different FQNs. @@ -63334,7 +73134,7 @@ class SingletonInt(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.SingletonInt"): """ @jsii.member(jsii_name="isSingletonInt") - def is_singleton_int(self, value: jsii.Number) -> bool: + def is_singleton_int(self, value: jsii.Number) -> builtins.bool: """ :param value: - @@ -63370,7 +73170,7 @@ class SingletonString(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.SingletonStr """ @jsii.member(jsii_name="isSingletonString") - def is_singleton_string(self, value: str) -> bool: + def is_singleton_string(self, value: builtins.str) -> builtins.bool: """ :param value: - @@ -63402,7 +73202,12 @@ class SingletonStringEnum(enum.Enum): name_mapping={"property": "property", "yet_anoter_one": "yetAnoterOne"}, ) class SmellyStruct: - def __init__(self, *, property: str, yet_anoter_one: bool) -> None: + def __init__( + self, + *, + property: builtins.str, + yet_anoter_one: builtins.bool, + ) -> None: """ :param property: :param yet_anoter_one: @@ -63410,31 +73215,35 @@ class SmellyStruct: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "property": property, "yet_anoter_one": yet_anoter_one, } @builtins.property - def property(self) -> str: + def property(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("property") + result = self._values.get("property") + assert result is not None, "Required property 'property' is missing" + return result @builtins.property - def yet_anoter_one(self) -> bool: + def yet_anoter_one(self) -> builtins.bool: """ stability :stability: experimental """ - return self._values.get("yet_anoter_one") + result = self._values.get("yet_anoter_one") + assert result is not None, "Required property 'yet_anoter_one' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -63477,7 +73286,9 @@ class SomeTypeJsii976(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.SomeTypeJsii class StableClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.StableClass"): def __init__( - self, readonly_string: str, mutable_number: typing.Optional[jsii.Number] = None + self, + readonly_string: builtins.str, + mutable_number: typing.Optional[jsii.Number] = None, ) -> None: """ :param readonly_string: - @@ -63489,17 +73300,17 @@ class StableClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.StableClass"): def method(self) -> None: return jsii.invoke(self, "method", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="readonlyProperty") - def readonly_property(self) -> str: + def readonly_property(self) -> builtins.str: return jsii.get(self, "readonlyProperty") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: return jsii.get(self, "mutableProperty") - @mutable_property.setter + @mutable_property.setter # type: ignore def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: jsii.set(self, "mutableProperty", value) @@ -63516,22 +73327,24 @@ class StableEnum(enum.Enum): name_mapping={"readonly_property": "readonlyProperty"}, ) class StableStruct: - def __init__(self, *, readonly_property: str) -> None: + def __init__(self, *, readonly_property: builtins.str) -> None: """ :param readonly_property: """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "readonly_property": readonly_property, } @builtins.property - def readonly_property(self) -> str: - return self._values.get("readonly_property") + def readonly_property(self) -> builtins.str: + result = self._values.get("readonly_property") + assert result is not None, "Required property 'readonly_property' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -63551,24 +73364,24 @@ class StaticContext(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.StaticContext" @jsii.member(jsii_name="canAccessStaticContext") @builtins.classmethod - def can_access_static_context(cls) -> bool: + def can_access_static_context(cls) -> builtins.bool: """ stability :stability: experimental """ return jsii.sinvoke(cls, "canAccessStaticContext", []) - @jsii.python.classproperty + @jsii.python.classproperty # type: ignore @jsii.member(jsii_name="staticVariable") - def static_variable(cls) -> bool: + def static_variable(cls) -> builtins.bool: """ stability :stability: experimental """ return jsii.sget(cls, "staticVariable") - @static_variable.setter - def static_variable(cls, value: bool) -> None: + @static_variable.setter # type: ignore + def static_variable(cls, value: builtins.bool) -> None: jsii.sset(cls, "staticVariable", value) @@ -63578,7 +73391,7 @@ class Statics(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Statics"): :stability: experimental """ - def __init__(self, value: str) -> None: + def __init__(self, value: builtins.str) -> None: """ :param value: - @@ -63589,7 +73402,7 @@ class Statics(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Statics"): @jsii.member(jsii_name="staticMethod") @builtins.classmethod - def static_method(cls, name: str) -> str: + def static_method(cls, name: builtins.str) -> builtins.str: """Jsdocs for static method. :param name: The name of the person to say hello to. @@ -63600,14 +73413,14 @@ class Statics(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Statics"): return jsii.sinvoke(cls, "staticMethod", [name]) @jsii.member(jsii_name="justMethod") - def just_method(self) -> str: + def just_method(self) -> builtins.str: """ stability :stability: experimental """ return jsii.invoke(self, "justMethod", []) - @jsii.python.classproperty + @jsii.python.classproperty # type: ignore @jsii.member(jsii_name="BAR") def BAR(cls) -> jsii.Number: """Constants may also use all-caps. @@ -63617,7 +73430,7 @@ class Statics(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Statics"): """ return jsii.sget(cls, "BAR") - @jsii.python.classproperty + @jsii.python.classproperty # type: ignore @jsii.member(jsii_name="ConstObj") def CONST_OBJ(cls) -> "DoubleTrouble": """ @@ -63626,9 +73439,9 @@ class Statics(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Statics"): """ return jsii.sget(cls, "ConstObj") - @jsii.python.classproperty + @jsii.python.classproperty # type: ignore @jsii.member(jsii_name="Foo") - def FOO(cls) -> str: + def FOO(cls) -> builtins.str: """Jsdocs for static property. stability @@ -63636,9 +73449,9 @@ class Statics(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Statics"): """ return jsii.sget(cls, "Foo") - @jsii.python.classproperty + @jsii.python.classproperty # type: ignore @jsii.member(jsii_name="zooBar") - def ZOO_BAR(cls) -> typing.Mapping[str, str]: + def ZOO_BAR(cls) -> typing.Mapping[builtins.str, builtins.str]: """Constants can also use camelCase. stability @@ -63646,7 +73459,7 @@ class Statics(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Statics"): """ return jsii.sget(cls, "zooBar") - @jsii.python.classproperty + @jsii.python.classproperty # type: ignore @jsii.member(jsii_name="instance") def instance(cls) -> "Statics": """Jsdocs for static getter. @@ -63658,11 +73471,11 @@ class Statics(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Statics"): """ return jsii.sget(cls, "instance") - @instance.setter + @instance.setter # type: ignore def instance(cls, value: "Statics") -> None: jsii.sset(cls, "instance", value) - @jsii.python.classproperty + @jsii.python.classproperty # type: ignore @jsii.member(jsii_name="nonConstStatic") def non_const_static(cls) -> jsii.Number: """ @@ -63671,13 +73484,13 @@ class Statics(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Statics"): """ return jsii.sget(cls, "nonConstStatic") - @non_const_static.setter + @non_const_static.setter # type: ignore def non_const_static(cls, value: jsii.Number) -> None: jsii.sset(cls, "nonConstStatic", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="value") - def value(self) -> str: + def value(self) -> builtins.str: """ stability :stability: experimental @@ -63722,17 +73535,17 @@ class StripInternal(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.StripInternal" """ jsii.create(StripInternal, self, []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="youSeeMe") - def you_see_me(self) -> str: + def you_see_me(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "youSeeMe") - @you_see_me.setter - def you_see_me(self, value: str) -> None: + @you_see_me.setter # type: ignore + def you_see_me(self, value: builtins.str) -> None: jsii.set(self, "youSeeMe", value) @@ -63749,9 +73562,9 @@ class StructA: def __init__( self, *, - required_string: str, + required_string: builtins.str, optional_number: typing.Optional[jsii.Number] = None, - optional_string: typing.Optional[str] = None, + optional_string: typing.Optional[builtins.str] = None, ) -> None: """We can serialize and deserialize structs without silently ignoring optional fields. @@ -63762,7 +73575,7 @@ class StructA: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "required_string": required_string, } if optional_number is not None: @@ -63771,12 +73584,14 @@ class StructA: self._values["optional_string"] = optional_string @builtins.property - def required_string(self) -> str: + def required_string(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("required_string") + result = self._values.get("required_string") + assert result is not None, "Required property 'required_string' is missing" + return result @builtins.property def optional_number(self) -> typing.Optional[jsii.Number]: @@ -63784,20 +73599,22 @@ class StructA: stability :stability: experimental """ - return self._values.get("optional_number") + result = self._values.get("optional_number") + return result @builtins.property - def optional_string(self) -> typing.Optional[str]: + def optional_string(self) -> typing.Optional[builtins.str]: """ stability :stability: experimental """ - return self._values.get("optional_string") + result = self._values.get("optional_string") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -63819,8 +73636,8 @@ class StructB: def __init__( self, *, - required_string: str, - optional_boolean: typing.Optional[bool] = None, + required_string: builtins.str, + optional_boolean: typing.Optional[builtins.bool] = None, optional_struct_a: typing.Optional["StructA"] = None, ) -> None: """This intentionally overlaps with StructA (where only requiredString is provided) to test htat the kernel properly disambiguates those. @@ -63834,7 +73651,7 @@ class StructB: """ if isinstance(optional_struct_a, dict): optional_struct_a = StructA(**optional_struct_a) - self._values = { + self._values: typing.Dict[str, typing.Any] = { "required_string": required_string, } if optional_boolean is not None: @@ -63843,20 +73660,23 @@ class StructB: self._values["optional_struct_a"] = optional_struct_a @builtins.property - def required_string(self) -> str: + def required_string(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("required_string") + result = self._values.get("required_string") + assert result is not None, "Required property 'required_string' is missing" + return result @builtins.property - def optional_boolean(self) -> typing.Optional[bool]: + def optional_boolean(self) -> typing.Optional[builtins.bool]: """ stability :stability: experimental """ - return self._values.get("optional_boolean") + result = self._values.get("optional_boolean") + return result @builtins.property def optional_struct_a(self) -> typing.Optional["StructA"]: @@ -63864,12 +73684,13 @@ class StructB: stability :stability: experimental """ - return self._values.get("optional_struct_a") + result = self._values.get("optional_struct_a") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -63884,7 +73705,12 @@ class StructB: name_mapping={"scope": "scope", "props": "props"}, ) class StructParameterType: - def __init__(self, *, scope: str, props: typing.Optional[bool] = None) -> None: + def __init__( + self, + *, + scope: builtins.str, + props: typing.Optional[builtins.bool] = None, + ) -> None: """Verifies that, in languages that do keyword lifting (e.g: Python), having a struct member with the same name as a positional parameter results in the correct code being emitted. See: https://github.com/aws/aws-cdk/issues/4302 @@ -63895,32 +73721,35 @@ class StructParameterType: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "scope": scope, } if props is not None: self._values["props"] = props @builtins.property - def scope(self) -> str: + def scope(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("scope") + result = self._values.get("scope") + assert result is not None, "Required property 'scope' is missing" + return result @builtins.property - def props(self) -> typing.Optional[bool]: + def props(self) -> typing.Optional[builtins.bool]: """ stability :stability: experimental """ - return self._values.get("props") + result = self._values.get("props") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -63942,7 +73771,9 @@ class StructPassing(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.StructPassing" @jsii.member(jsii_name="howManyVarArgsDidIPass") @builtins.classmethod def how_many_var_args_did_i_pass( - cls, _positional: jsii.Number, *inputs: "TopLevelStruct" + cls, + _positional: jsii.Number, + *inputs: "TopLevelStruct", ) -> jsii.Number: """ :param _positional: - @@ -63956,9 +73787,9 @@ class StructPassing(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.StructPassing" cls, _positional: jsii.Number, *, - required: str, + required: builtins.str, second_level: typing.Union[jsii.Number, "SecondLevelStruct"], - optional: typing.Optional[str] = None, + optional: typing.Optional[builtins.str] = None, ) -> "TopLevelStruct": """ :param _positional: - @@ -63974,7 +73805,8 @@ class StructPassing(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.StructPassing" class StructUnionConsumer( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.StructUnionConsumer" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.StructUnionConsumer", ): """ stability @@ -63983,7 +73815,7 @@ class StructUnionConsumer( @jsii.member(jsii_name="isStructA") @builtins.classmethod - def is_struct_a(cls, struct: typing.Union["StructA", "StructB"]) -> bool: + def is_struct_a(cls, struct: typing.Union["StructA", "StructB"]) -> builtins.bool: """ :param struct: - @@ -63994,7 +73826,7 @@ class StructUnionConsumer( @jsii.member(jsii_name="isStructB") @builtins.classmethod - def is_struct_b(cls, struct: typing.Union["StructA", "StructB"]) -> bool: + def is_struct_b(cls, struct: typing.Union["StructA", "StructB"]) -> builtins.bool: """ :param struct: - @@ -64018,10 +73850,10 @@ class StructWithJavaReservedWords: def __init__( self, *, - default: str, - assert_: typing.Optional[str] = None, - result: typing.Optional[str] = None, - that: typing.Optional[str] = None, + default: builtins.str, + assert_: typing.Optional[builtins.str] = None, + result: typing.Optional[builtins.str] = None, + that: typing.Optional[builtins.str] = None, ) -> None: """ :param default: @@ -64032,7 +73864,7 @@ class StructWithJavaReservedWords: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "default": default, } if assert_ is not None: @@ -64043,41 +73875,46 @@ class StructWithJavaReservedWords: self._values["that"] = that @builtins.property - def default(self) -> str: + def default(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("default") + result = self._values.get("default") + assert result is not None, "Required property 'default' is missing" + return result @builtins.property - def assert_(self) -> typing.Optional[str]: + def assert_(self) -> typing.Optional[builtins.str]: """ stability :stability: experimental """ - return self._values.get("assert_") + result = self._values.get("assert_") + return result @builtins.property - def result(self) -> typing.Optional[str]: + def result(self) -> typing.Optional[builtins.str]: """ stability :stability: experimental """ - return self._values.get("result") + result = self._values.get("result") + return result @builtins.property - def that(self) -> typing.Optional[str]: + def that(self) -> typing.Optional[builtins.str]: """ stability :stability: experimental """ - return self._values.get("that") + result = self._values.get("that") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -64087,7 +73924,9 @@ class StructWithJavaReservedWords: class Sum( - _CompositeOperation_1c4d123b, metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Sum" + _CompositeOperation_1c4d123b, + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.Sum", ): """An operation that sums multiple values. @@ -64102,9 +73941,9 @@ class Sum( """ jsii.create(Sum, self, []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="expression") - def expression(self) -> scope.jsii_calc_lib.Value: + def expression(self) -> scope.jsii_calc_lib.NumericValue: """The expression that this operation consists of. Must be implemented by derived classes. @@ -64114,9 +73953,9 @@ class Sum( """ return jsii.get(self, "expression") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="parts") - def parts(self) -> typing.List[scope.jsii_calc_lib.Value]: + def parts(self) -> typing.List[scope.jsii_calc_lib.NumericValue]: """The parts to sum. stability @@ -64124,8 +73963,8 @@ class Sum( """ return jsii.get(self, "parts") - @parts.setter - def parts(self, value: typing.List[scope.jsii_calc_lib.Value]) -> None: + @parts.setter # type: ignore + def parts(self, value: typing.List[scope.jsii_calc_lib.NumericValue]) -> None: jsii.set(self, "parts", value) @@ -64135,7 +73974,12 @@ class Sum( name_mapping={"bar": "bar", "id": "id"}, ) class SupportsNiceJavaBuilderProps: - def __init__(self, *, bar: jsii.Number, id: typing.Optional[str] = None) -> None: + def __init__( + self, + *, + bar: jsii.Number, + id: typing.Optional[builtins.str] = None, + ) -> None: """ :param bar: Some number, like 42. :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. @@ -64143,7 +73987,7 @@ class SupportsNiceJavaBuilderProps: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "bar": bar, } if id is not None: @@ -64156,10 +74000,12 @@ class SupportsNiceJavaBuilderProps: stability :stability: experimental """ - return self._values.get("bar") + result = self._values.get("bar") + assert result is not None, "Required property 'bar' is missing" + return result @builtins.property - def id(self) -> typing.Optional[str]: + def id(self) -> typing.Optional[builtins.str]: """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. @@ -64167,12 +74013,13 @@ class SupportsNiceJavaBuilderProps: stability :stability: experimental """ - return self._values.get("id") + result = self._values.get("id") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -64192,7 +74039,11 @@ class SupportsNiceJavaBuilderWithRequiredProps( """ def __init__( - self, id_: jsii.Number, *, bar: jsii.Number, id: typing.Optional[str] = None + self, + id_: jsii.Number, + *, + bar: jsii.Number, + id: typing.Optional[builtins.str] = None, ) -> None: """ :param id_: some identifier of your choice. @@ -64206,7 +74057,7 @@ class SupportsNiceJavaBuilderWithRequiredProps( jsii.create(SupportsNiceJavaBuilderWithRequiredProps, self, [id_, props]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="bar") def bar(self) -> jsii.Number: """ @@ -64215,7 +74066,7 @@ class SupportsNiceJavaBuilderWithRequiredProps( """ return jsii.get(self, "bar") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="id") def id(self) -> jsii.Number: """some identifier of your choice. @@ -64225,9 +74076,9 @@ class SupportsNiceJavaBuilderWithRequiredProps( """ return jsii.get(self, "id") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="propId") - def prop_id(self) -> typing.Optional[str]: + def prop_id(self) -> typing.Optional[builtins.str]: """ stability :stability: experimental @@ -64236,7 +74087,8 @@ class SupportsNiceJavaBuilderWithRequiredProps( class SyncVirtualMethods( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.SyncVirtualMethods" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.SyncVirtualMethods", ): """ stability @@ -64267,7 +74119,7 @@ class SyncVirtualMethods( return jsii.invoke(self, "callerIsMethod", []) @jsii.member(jsii_name="modifyOtherProperty") - def modify_other_property(self, value: str) -> None: + def modify_other_property(self, value: builtins.str) -> None: """ :param value: - @@ -64277,7 +74129,7 @@ class SyncVirtualMethods( return jsii.invoke(self, "modifyOtherProperty", [value]) @jsii.member(jsii_name="modifyValueOfTheProperty") - def modify_value_of_the_property(self, value: str) -> None: + def modify_value_of_the_property(self, value: builtins.str) -> None: """ :param value: - @@ -64295,7 +74147,7 @@ class SyncVirtualMethods( return jsii.invoke(self, "readA", []) @jsii.member(jsii_name="retrieveOtherProperty") - def retrieve_other_property(self) -> str: + def retrieve_other_property(self) -> builtins.str: """ stability :stability: experimental @@ -64303,7 +74155,7 @@ class SyncVirtualMethods( return jsii.invoke(self, "retrieveOtherProperty", []) @jsii.member(jsii_name="retrieveReadOnlyProperty") - def retrieve_read_only_property(self) -> str: + def retrieve_read_only_property(self) -> builtins.str: """ stability :stability: experimental @@ -64311,7 +74163,7 @@ class SyncVirtualMethods( return jsii.invoke(self, "retrieveReadOnlyProperty", []) @jsii.member(jsii_name="retrieveValueOfTheProperty") - def retrieve_value_of_the_property(self) -> str: + def retrieve_value_of_the_property(self) -> builtins.str: """ stability :stability: experimental @@ -64338,16 +74190,16 @@ class SyncVirtualMethods( """ return jsii.invoke(self, "writeA", [value]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="readonlyProperty") - def readonly_property(self) -> str: + def readonly_property(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "readonlyProperty") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="a") def a(self) -> jsii.Number: """ @@ -64356,11 +74208,11 @@ class SyncVirtualMethods( """ return jsii.get(self, "a") - @a.setter + @a.setter # type: ignore def a(self, value: jsii.Number) -> None: jsii.set(self, "a", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="callerIsProperty") def caller_is_property(self) -> jsii.Number: """ @@ -64369,47 +74221,47 @@ class SyncVirtualMethods( """ return jsii.get(self, "callerIsProperty") - @caller_is_property.setter + @caller_is_property.setter # type: ignore def caller_is_property(self, value: jsii.Number) -> None: jsii.set(self, "callerIsProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="otherProperty") - def other_property(self) -> str: + def other_property(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "otherProperty") - @other_property.setter - def other_property(self, value: str) -> None: + @other_property.setter # type: ignore + def other_property(self, value: builtins.str) -> None: jsii.set(self, "otherProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="theProperty") - def the_property(self) -> str: + def the_property(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "theProperty") - @the_property.setter - def the_property(self, value: str) -> None: + @the_property.setter # type: ignore + def the_property(self, value: builtins.str) -> None: jsii.set(self, "theProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="valueOfOtherProperty") - def value_of_other_property(self) -> str: + def value_of_other_property(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "valueOfOtherProperty") - @value_of_other_property.setter - def value_of_other_property(self, value: str) -> None: + @value_of_other_property.setter # type: ignore + def value_of_other_property(self, value: builtins.str) -> None: jsii.set(self, "valueOfOtherProperty", value) @@ -64448,9 +74300,9 @@ class TopLevelStruct: def __init__( self, *, - required: str, + required: builtins.str, second_level: typing.Union[jsii.Number, "SecondLevelStruct"], - optional: typing.Optional[str] = None, + optional: typing.Optional[builtins.str] = None, ) -> None: """ :param required: This is a required field. @@ -64460,7 +74312,7 @@ class TopLevelStruct: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "required": required, "second_level": second_level, } @@ -64468,13 +74320,15 @@ class TopLevelStruct: self._values["optional"] = optional @builtins.property - def required(self) -> str: + def required(self) -> builtins.str: """This is a required field. stability :stability: experimental """ - return self._values.get("required") + result = self._values.get("required") + assert result is not None, "Required property 'required' is missing" + return result @builtins.property def second_level(self) -> typing.Union[jsii.Number, "SecondLevelStruct"]: @@ -64483,21 +74337,24 @@ class TopLevelStruct: stability :stability: experimental """ - return self._values.get("second_level") + result = self._values.get("second_level") + assert result is not None, "Required property 'second_level' is missing" + return result @builtins.property - def optional(self) -> typing.Optional[str]: + def optional(self) -> typing.Optional[builtins.str]: """You don't have to pass this. stability :stability: experimental """ - return self._values.get("optional") + result = self._values.get("optional") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -64541,7 +74398,7 @@ class UnaryOperation( def __jsii_proxy_class__(): return _UnaryOperationProxy - def __init__(self, operand: scope.jsii_calc_lib.Value) -> None: + def __init__(self, operand: scope.jsii_calc_lib.NumericValue) -> None: """ :param operand: - @@ -64550,9 +74407,9 @@ class UnaryOperation( """ jsii.create(UnaryOperation, self, [operand]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="operand") - def operand(self) -> scope.jsii_calc_lib.Value: + def operand(self) -> scope.jsii_calc_lib.NumericValue: """ stability :stability: experimental @@ -64561,7 +74418,7 @@ class UnaryOperation( class _UnaryOperationProxy( - UnaryOperation, jsii.proxy_for(scope.jsii_calc_lib.Operation) + UnaryOperation, jsii.proxy_for(scope.jsii_calc_lib.Operation) # type: ignore ): pass @@ -64575,8 +74432,8 @@ class UnionProperties: def __init__( self, *, - bar: typing.Union[str, jsii.Number, "AllTypes"], - foo: typing.Optional[typing.Union[str, jsii.Number]] = None, + bar: typing.Union[builtins.str, jsii.Number, "AllTypes"], + foo: typing.Optional[typing.Union[builtins.str, jsii.Number]] = None, ) -> None: """ :param bar: @@ -64585,32 +74442,35 @@ class UnionProperties: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "bar": bar, } if foo is not None: self._values["foo"] = foo @builtins.property - def bar(self) -> typing.Union[str, jsii.Number, "AllTypes"]: + def bar(self) -> typing.Union[builtins.str, jsii.Number, "AllTypes"]: """ stability :stability: experimental """ - return self._values.get("bar") + result = self._values.get("bar") + assert result is not None, "Required property 'bar' is missing" + return result @builtins.property - def foo(self) -> typing.Optional[typing.Union[str, jsii.Number]]: + def foo(self) -> typing.Optional[typing.Union[builtins.str, jsii.Number]]: """ stability :stability: experimental """ - return self._values.get("foo") + result = self._values.get("foo") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -64621,7 +74481,8 @@ class UnionProperties: @jsii.implements(scope.jsii_calc_lib.custom_submodule_name.IReflectable) class UpcasingReflectable( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.UpcasingReflectable" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.UpcasingReflectable", ): """Ensures submodule-imported types from dependencies can be used correctly. @@ -64629,7 +74490,7 @@ class UpcasingReflectable( :stability: experimental """ - def __init__(self, delegate: typing.Mapping[str, typing.Any]) -> None: + def __init__(self, delegate: typing.Mapping[builtins.str, typing.Any]) -> None: """ :param delegate: - @@ -64638,7 +74499,7 @@ class UpcasingReflectable( """ jsii.create(UpcasingReflectable, self, [delegate]) - @jsii.python.classproperty + @jsii.python.classproperty # type: ignore @jsii.member(jsii_name="reflector") def REFLECTOR(cls) -> scope.jsii_calc_lib.custom_submodule_name.Reflector: """ @@ -64647,7 +74508,7 @@ class UpcasingReflectable( """ return jsii.sget(cls, "reflector") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="entries") def entries( self, @@ -64660,7 +74521,8 @@ class UpcasingReflectable( class UseBundledDependency( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.UseBundledDependency" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.UseBundledDependency", ): """ stability @@ -64707,7 +74569,8 @@ class UseCalcBase(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.UseCalcBase"): class UsesInterfaceWithProperties( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.UsesInterfaceWithProperties" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.UsesInterfaceWithProperties", ): """ stability @@ -64724,7 +74587,7 @@ class UsesInterfaceWithProperties( jsii.create(UsesInterfaceWithProperties, self, [obj]) @jsii.member(jsii_name="justRead") - def just_read(self) -> str: + def just_read(self) -> builtins.str: """ stability :stability: experimental @@ -64732,7 +74595,10 @@ class UsesInterfaceWithProperties( return jsii.invoke(self, "justRead", []) @jsii.member(jsii_name="readStringAndNumber") - def read_string_and_number(self, ext: "IInterfaceWithPropertiesExtension") -> str: + def read_string_and_number( + self, + ext: "IInterfaceWithPropertiesExtension", + ) -> builtins.str: """ :param ext: - @@ -64742,7 +74608,7 @@ class UsesInterfaceWithProperties( return jsii.invoke(self, "readStringAndNumber", [ext]) @jsii.member(jsii_name="writeAndRead") - def write_and_read(self, value: str) -> str: + def write_and_read(self, value: builtins.str) -> builtins.str: """ :param value: - @@ -64751,7 +74617,7 @@ class UsesInterfaceWithProperties( """ return jsii.invoke(self, "writeAndRead", [value]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="obj") def obj(self) -> "IInterfaceWithProperties": """ @@ -64804,7 +74670,9 @@ class VariadicMethod(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.VariadicMetho @jsii.member(jsii_name="asArray") def as_array( - self, first: jsii.Number, *others: jsii.Number + self, + first: jsii.Number, + *others: jsii.Number, ) -> typing.List[jsii.Number]: """ :param first: the first element of the array to be returned (after the \`\`prefix\`\` provided at construction time). @@ -64817,7 +74685,8 @@ class VariadicMethod(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.VariadicMetho class VirtualMethodPlayground( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.VirtualMethodPlayground" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.VirtualMethodPlayground", ): """ stability @@ -64883,7 +74752,8 @@ class VirtualMethodPlayground( class VoidCallback( - metaclass=jsii.JSIIAbstractClass, jsii_type="jsii-calc.VoidCallback" + metaclass=jsii.JSIIAbstractClass, + jsii_type="jsii-calc.VoidCallback", ): """This test is used to validate the runtimes can return correctly from a void callback. @@ -64923,9 +74793,9 @@ class VoidCallback( """ ... - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="methodWasCalled") - def method_was_called(self) -> bool: + def method_was_called(self) -> builtins.bool: """ stability :stability: experimental @@ -64944,7 +74814,8 @@ class _VoidCallbackProxy(VoidCallback): class WithPrivatePropertyInConstructor( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.WithPrivatePropertyInConstructor" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.WithPrivatePropertyInConstructor", ): """Verifies that private property declarations in constructor arguments are hidden. @@ -64952,7 +74823,7 @@ class WithPrivatePropertyInConstructor( :stability: experimental """ - def __init__(self, private_field: typing.Optional[str] = None) -> None: + def __init__(self, private_field: typing.Optional[builtins.str] = None) -> None: """ :param private_field: - @@ -64961,9 +74832,9 @@ class WithPrivatePropertyInConstructor( """ jsii.create(WithPrivatePropertyInConstructor, self, [private_field]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="success") - def success(self) -> bool: + def success(self) -> builtins.bool: """ stability :stability: experimental @@ -64995,7 +74866,7 @@ class AbstractClass( @jsii.member(jsii_name="abstractMethod") @abc.abstractmethod - def abstract_method(self, name: str) -> str: + def abstract_method(self, name: builtins.str) -> builtins.str: """ :param name: - @@ -65012,9 +74883,9 @@ class AbstractClass( """ return jsii.invoke(self, "nonAbstractMethod", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="propFromInterface") - def prop_from_interface(self) -> str: + def prop_from_interface(self) -> builtins.str: """ stability :stability: experimental @@ -65022,9 +74893,11 @@ class AbstractClass( return jsii.get(self, "propFromInterface") -class _AbstractClassProxy(AbstractClass, jsii.proxy_for(AbstractClassBase)): +class _AbstractClassProxy( + AbstractClass, jsii.proxy_for(AbstractClassBase) # type: ignore +): @jsii.member(jsii_name="abstractMethod") - def abstract_method(self, name: str) -> str: + def abstract_method(self, name: builtins.str) -> builtins.str: """ :param name: - @@ -65042,7 +74915,9 @@ class Add(BinaryOperation, metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Add"): """ def __init__( - self, lhs: scope.jsii_calc_lib.Value, rhs: scope.jsii_calc_lib.Value + self, + lhs: scope.jsii_calc_lib.NumericValue, + rhs: scope.jsii_calc_lib.NumericValue, ) -> None: """Creates a BinaryOperation. @@ -65055,7 +74930,7 @@ class Add(BinaryOperation, metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Add"): jsii.create(Add, self, [lhs, rhs]) @jsii.member(jsii_name="toString") - def to_string(self) -> str: + def to_string(self) -> builtins.str: """String representation of the value. stability @@ -65063,7 +74938,7 @@ class Add(BinaryOperation, metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Add"): """ return jsii.invoke(self, "toString", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="value") def value(self) -> jsii.Number: """The value. @@ -65076,7 +74951,8 @@ class Add(BinaryOperation, metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Add"): @jsii.implements(IAnonymousImplementationProvider) class AnonymousImplementationProvider( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AnonymousImplementationProvider" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.AnonymousImplementationProvider", ): """ stability @@ -65129,17 +75005,17 @@ class Bell(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Bell"): """ return jsii.invoke(self, "ring", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="rung") - def rung(self) -> bool: + def rung(self) -> builtins.bool: """ stability :stability: experimental """ return jsii.get(self, "rung") - @rung.setter - def rung(self, value: bool) -> None: + @rung.setter # type: ignore + def rung(self, value: builtins.bool) -> None: jsii.set(self, "rung", value) @@ -65149,7 +75025,7 @@ class Bell(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Bell"): name_mapping={"foo": "foo", "bar": "bar"}, ) class ChildStruct982(ParentStruct982): - def __init__(self, *, foo: str, bar: jsii.Number) -> None: + def __init__(self, *, foo: builtins.str, bar: jsii.Number) -> None: """ :param foo: :param bar: @@ -65157,18 +75033,20 @@ class ChildStruct982(ParentStruct982): stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "foo": foo, "bar": bar, } @builtins.property - def foo(self) -> str: + def foo(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("foo") + result = self._values.get("foo") + assert result is not None, "Required property 'foo' is missing" + return result @builtins.property def bar(self) -> jsii.Number: @@ -65176,12 +75054,14 @@ class ChildStruct982(ParentStruct982): stability :stability: experimental """ - return self._values.get("bar") + result = self._values.get("bar") + assert result is not None, "Required property 'bar' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -65207,56 +75087,56 @@ class ClassThatImplementsTheInternalInterface( """ jsii.create(ClassThatImplementsTheInternalInterface, self, []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="a") - def a(self) -> str: + def a(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "a") - @a.setter - def a(self, value: str) -> None: + @a.setter # type: ignore + def a(self, value: builtins.str) -> None: jsii.set(self, "a", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="b") - def b(self) -> str: + def b(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "b") - @b.setter - def b(self, value: str) -> None: + @b.setter # type: ignore + def b(self, value: builtins.str) -> None: jsii.set(self, "b", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="c") - def c(self) -> str: + def c(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "c") - @c.setter - def c(self, value: str) -> None: + @c.setter # type: ignore + def c(self, value: builtins.str) -> None: jsii.set(self, "c", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="d") - def d(self) -> str: + def d(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "d") - @d.setter - def d(self, value: str) -> None: + @d.setter # type: ignore + def d(self, value: builtins.str) -> None: jsii.set(self, "d", value) @@ -65277,56 +75157,56 @@ class ClassThatImplementsThePrivateInterface( """ jsii.create(ClassThatImplementsThePrivateInterface, self, []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="a") - def a(self) -> str: + def a(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "a") - @a.setter - def a(self, value: str) -> None: + @a.setter # type: ignore + def a(self, value: builtins.str) -> None: jsii.set(self, "a", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="b") - def b(self) -> str: + def b(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "b") - @b.setter - def b(self, value: str) -> None: + @b.setter # type: ignore + def b(self, value: builtins.str) -> None: jsii.set(self, "b", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="c") - def c(self) -> str: + def c(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "c") - @c.setter - def c(self, value: str) -> None: + @c.setter # type: ignore + def c(self, value: builtins.str) -> None: jsii.set(self, "c", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="e") - def e(self) -> str: + def e(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "e") - @e.setter - def e(self, value: str) -> None: + @e.setter # type: ignore + def e(self, value: builtins.str) -> None: jsii.set(self, "e", value) @@ -65344,7 +75224,9 @@ class ClassWithPrivateConstructorAndAutomaticProperties( @jsii.member(jsii_name="create") @builtins.classmethod def create( - cls, read_only_string: str, read_write_string: str + cls, + read_only_string: builtins.str, + read_write_string: builtins.str, ) -> "ClassWithPrivateConstructorAndAutomaticProperties": """ :param read_only_string: - @@ -65355,32 +75237,34 @@ class ClassWithPrivateConstructorAndAutomaticProperties( """ return jsii.sinvoke(cls, "create", [read_only_string, read_write_string]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="readOnlyString") - def read_only_string(self) -> str: + def read_only_string(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "readOnlyString") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="readWriteString") - def read_write_string(self) -> str: + def read_write_string(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "readWriteString") - @read_write_string.setter - def read_write_string(self, value: str) -> None: + @read_write_string.setter # type: ignore + def read_write_string(self, value: builtins.str) -> None: jsii.set(self, "readWriteString", value) @jsii.interface(jsii_type="jsii-calc.IFriendlyRandomGenerator") class IFriendlyRandomGenerator( - IRandomNumberGenerator, scope.jsii_calc_lib.IFriendly, jsii.compat.Protocol + IRandomNumberGenerator, + scope.jsii_calc_lib.IFriendly, + typing_extensions.Protocol, ): """ stability @@ -65393,20 +75277,23 @@ class IFriendlyRandomGenerator( class _IFriendlyRandomGeneratorProxy( - jsii.proxy_for(IRandomNumberGenerator), - jsii.proxy_for(scope.jsii_calc_lib.IFriendly), + jsii.proxy_for(IRandomNumberGenerator), # type: ignore + jsii.proxy_for(scope.jsii_calc_lib.IFriendly), # type: ignore ): """ stability :stability: experimental """ - __jsii_type__ = "jsii-calc.IFriendlyRandomGenerator" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IFriendlyRandomGenerator" pass @jsii.interface(jsii_type="jsii-calc.IInterfaceThatShouldNotBeADataType") -class IInterfaceThatShouldNotBeADataType(IInterfaceWithMethods, jsii.compat.Protocol): +class IInterfaceThatShouldNotBeADataType( + IInterfaceWithMethods, + typing_extensions.Protocol, +): """Even though this interface has only properties, it is disqualified from being a datatype because it inherits from an interface that is not a datatype. stability @@ -65417,9 +75304,9 @@ class IInterfaceThatShouldNotBeADataType(IInterfaceWithMethods, jsii.compat.Prot def __jsii_proxy_class__(): return _IInterfaceThatShouldNotBeADataTypeProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="otherValue") - def other_value(self) -> str: + def other_value(self) -> builtins.str: """ stability :stability: experimental @@ -65427,18 +75314,20 @@ class IInterfaceThatShouldNotBeADataType(IInterfaceWithMethods, jsii.compat.Prot ... -class _IInterfaceThatShouldNotBeADataTypeProxy(jsii.proxy_for(IInterfaceWithMethods)): +class _IInterfaceThatShouldNotBeADataTypeProxy( + jsii.proxy_for(IInterfaceWithMethods) # type: ignore +): """Even though this interface has only properties, it is disqualified from being a datatype because it inherits from an interface that is not a datatype. stability :stability: experimental """ - __jsii_type__ = "jsii-calc.IInterfaceThatShouldNotBeADataType" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IInterfaceThatShouldNotBeADataType" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="otherValue") - def other_value(self) -> str: + def other_value(self) -> builtins.str: """ stability :stability: experimental @@ -65447,7 +75336,7 @@ class _IInterfaceThatShouldNotBeADataTypeProxy(jsii.proxy_for(IInterfaceWithMeth @jsii.interface(jsii_type="jsii-calc.IJSII417Derived") -class IJSII417Derived(IJSII417PublicBaseOfBase, jsii.compat.Protocol): +class IJSII417Derived(IJSII417PublicBaseOfBase, typing_extensions.Protocol): """ stability :stability: experimental @@ -65457,9 +75346,9 @@ class IJSII417Derived(IJSII417PublicBaseOfBase, jsii.compat.Protocol): def __jsii_proxy_class__(): return _IJSII417DerivedProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="property") - def property(self) -> str: + def property(self) -> builtins.str: """ stability :stability: experimental @@ -65483,17 +75372,19 @@ class IJSII417Derived(IJSII417PublicBaseOfBase, jsii.compat.Protocol): ... -class _IJSII417DerivedProxy(jsii.proxy_for(IJSII417PublicBaseOfBase)): +class _IJSII417DerivedProxy( + jsii.proxy_for(IJSII417PublicBaseOfBase) # type: ignore +): """ stability :stability: experimental """ - __jsii_type__ = "jsii-calc.IJSII417Derived" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IJSII417Derived" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="property") - def property(self) -> str: + def property(self) -> builtins.str: """ stability :stability: experimental @@ -65519,7 +75410,9 @@ class _IJSII417DerivedProxy(jsii.proxy_for(IJSII417PublicBaseOfBase)): @jsii.implements(IPublicInterface2) class InbetweenClass( - PublicClass, metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.InbetweenClass" + PublicClass, + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.InbetweenClass", ): """ stability @@ -65534,7 +75427,7 @@ class InbetweenClass( jsii.create(InbetweenClass, self, []) @jsii.member(jsii_name="ciao") - def ciao(self) -> str: + def ciao(self) -> builtins.str: """ stability :stability: experimental @@ -65552,7 +75445,7 @@ class JSII417Derived( :stability: experimental """ - def __init__(self, property: str) -> None: + def __init__(self, property: builtins.str) -> None: """ :param property: - @@ -65577,9 +75470,9 @@ class JSII417Derived( """ return jsii.invoke(self, "baz", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="property") - def _property(self) -> str: + def _property(self) -> builtins.str: """ stability :stability: experimental @@ -65595,7 +75488,7 @@ class Negate(UnaryOperation, metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Negat :stability: experimental """ - def __init__(self, operand: scope.jsii_calc_lib.Value) -> None: + def __init__(self, operand: scope.jsii_calc_lib.NumericValue) -> None: """ :param operand: - @@ -65605,7 +75498,7 @@ class Negate(UnaryOperation, metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Negat jsii.create(Negate, self, [operand]) @jsii.member(jsii_name="farewell") - def farewell(self) -> str: + def farewell(self) -> builtins.str: """Say farewell. stability @@ -65614,7 +75507,7 @@ class Negate(UnaryOperation, metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Negat return jsii.invoke(self, "farewell", []) @jsii.member(jsii_name="goodbye") - def goodbye(self) -> str: + def goodbye(self) -> builtins.str: """Say goodbye. stability @@ -65623,7 +75516,7 @@ class Negate(UnaryOperation, metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Negat return jsii.invoke(self, "goodbye", []) @jsii.member(jsii_name="hello") - def hello(self) -> str: + def hello(self) -> builtins.str: """Say hello! stability @@ -65632,7 +75525,7 @@ class Negate(UnaryOperation, metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Negat return jsii.invoke(self, "hello", []) @jsii.member(jsii_name="toString") - def to_string(self) -> str: + def to_string(self) -> builtins.str: """String representation of the value. stability @@ -65640,7 +75533,7 @@ class Negate(UnaryOperation, metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Negat """ return jsii.invoke(self, "toString", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="value") def value(self) -> jsii.Number: """The value. @@ -65666,7 +75559,7 @@ class SupportsNiceJavaBuilder( id: jsii.Number, default_bar: typing.Optional[jsii.Number] = None, props: typing.Optional["SupportsNiceJavaBuilderProps"] = None, - *rest: str, + *rest: builtins.str, ) -> None: """ :param id: some identifier. @@ -65679,7 +75572,7 @@ class SupportsNiceJavaBuilder( """ jsii.create(SupportsNiceJavaBuilder, self, [id, default_bar, props, *rest]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="id") def id(self) -> jsii.Number: """some identifier. @@ -65689,9 +75582,9 @@ class SupportsNiceJavaBuilder( """ return jsii.get(self, "id") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="rest") - def rest(self) -> typing.List[str]: + def rest(self) -> typing.List[builtins.str]: """ stability :stability: experimental @@ -65714,7 +75607,7 @@ class DoubleTrouble(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DoubleTrouble" jsii.create(DoubleTrouble, self, []) @jsii.member(jsii_name="hello") - def hello(self) -> str: + def hello(self) -> builtins.str: """Say hello! stability @@ -65783,6 +75676,8 @@ __all__ = [ "DocumentedClass", "DontComplainAboutVariadicAfterOptional", "DoubleTrouble", + "DynamicPropertyBearer", + "DynamicPropertyBearerChild", "EnumDispenser", "EraseUndefinedHashValues", "EraseUndefinedHashValuesOptions", @@ -65938,8 +75833,8 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions import scope.jsii_calc_base._jsii import scope.jsii_calc_base_of_base._jsii @@ -65967,8 +75862,8 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions from .._jsii import * @@ -65994,7 +75889,7 @@ class CompositeOperation( jsii.create(CompositeOperation, self, []) @jsii.member(jsii_name="toString") - def to_string(self) -> str: + def to_string(self) -> builtins.str: """String representation of the value. stability @@ -66002,10 +75897,10 @@ class CompositeOperation( """ return jsii.invoke(self, "toString", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="expression") @abc.abstractmethod - def expression(self) -> scope.jsii_calc_lib.Value: + def expression(self) -> scope.jsii_calc_lib.NumericValue: """The expression that this operation consists of. Must be implemented by derived classes. @@ -66015,7 +75910,7 @@ class CompositeOperation( """ ... - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="value") def value(self) -> jsii.Number: """The value. @@ -66025,9 +75920,9 @@ class CompositeOperation( """ return jsii.get(self, "value") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="decorationPostfixes") - def decoration_postfixes(self) -> typing.List[str]: + def decoration_postfixes(self) -> typing.List[builtins.str]: """A set of postfixes to include in a decorated .toString(). stability @@ -66035,13 +75930,13 @@ class CompositeOperation( """ return jsii.get(self, "decorationPostfixes") - @decoration_postfixes.setter - def decoration_postfixes(self, value: typing.List[str]) -> None: + @decoration_postfixes.setter # type: ignore + def decoration_postfixes(self, value: typing.List[builtins.str]) -> None: jsii.set(self, "decorationPostfixes", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="decorationPrefixes") - def decoration_prefixes(self) -> typing.List[str]: + def decoration_prefixes(self) -> typing.List[builtins.str]: """A set of prefixes to include in a decorated .toString(). stability @@ -66049,11 +75944,11 @@ class CompositeOperation( """ return jsii.get(self, "decorationPrefixes") - @decoration_prefixes.setter - def decoration_prefixes(self, value: typing.List[str]) -> None: + @decoration_prefixes.setter # type: ignore + def decoration_prefixes(self, value: typing.List[builtins.str]) -> None: jsii.set(self, "decorationPrefixes", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="stringStyle") def string_style(self) -> "CompositionStringStyle": """The .toString() style. @@ -66063,7 +75958,7 @@ class CompositeOperation( """ return jsii.get(self, "stringStyle") - @string_style.setter + @string_style.setter # type: ignore def string_style(self, value: "CompositionStringStyle") -> None: jsii.set(self, "stringStyle", value) @@ -66092,11 +75987,11 @@ class CompositeOperation( class _CompositeOperationProxy( - CompositeOperation, jsii.proxy_for(scope.jsii_calc_lib.Operation) + CompositeOperation, jsii.proxy_for(scope.jsii_calc_lib.Operation) # type: ignore ): - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="expression") - def expression(self) -> scope.jsii_calc_lib.Value: + def expression(self) -> scope.jsii_calc_lib.NumericValue: """The expression that this operation consists of. Must be implemented by derived classes. @@ -66123,14 +76018,15 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions from .._jsii import * class Base( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DerivedClassHasNoProperties.Base" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.DerivedClassHasNoProperties.Base", ): """ stability @@ -66144,17 +76040,17 @@ class Base( """ jsii.create(Base, self, []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="prop") - def prop(self) -> str: + def prop(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "prop") - @prop.setter - def prop(self, value: str) -> None: + @prop.setter # type: ignore + def prop(self, value: builtins.str) -> None: jsii.set(self, "prop", value) @@ -66193,8 +76089,8 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions from .._jsii import * @@ -66215,17 +76111,17 @@ class Foo( """ jsii.create(Foo, self, []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="bar") - def bar(self) -> typing.Optional[str]: + def bar(self) -> typing.Optional[builtins.str]: """ stability :stability: experimental """ return jsii.get(self, "bar") - @bar.setter - def bar(self, value: typing.Optional[str]) -> None: + @bar.setter # type: ignore + def bar(self, value: typing.Optional[builtins.str]) -> None: jsii.set(self, "bar", value) @@ -66242,7 +76138,7 @@ class Hello: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "foo": foo, } @@ -66252,12 +76148,14 @@ class Hello: stability :stability: experimental """ - return self._values.get("foo") + result = self._values.get("foo") + assert result is not None, "Required property 'foo' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -66283,8 +76181,8 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions from .._jsii import * @@ -66302,7 +76200,7 @@ class Hello: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "foo": foo, } @@ -66312,12 +76210,14 @@ class Hello: stability :stability: experimental """ - return self._values.get("foo") + result = self._values.get("foo") + assert result is not None, "Required property 'foo' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -66347,21 +76247,22 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions from .._jsii import * class ClassWithSelf( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.PythonSelf.ClassWithSelf" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.PythonSelf.ClassWithSelf", ): """ stability :stability: experimental """ - def __init__(self_, self: str) -> None: + def __init__(self_, self: builtins.str) -> None: """ :param self: - @@ -66371,7 +76272,7 @@ class ClassWithSelf( jsii.create(ClassWithSelf, self_, [self]) @jsii.member(jsii_name="method") - def method(self_, self: jsii.Number) -> str: + def method(self_, self: jsii.Number) -> builtins.str: """ :param self: - @@ -66380,9 +76281,9 @@ class ClassWithSelf( """ return jsii.invoke(self_, "method", [self]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="self") - def self(self) -> str: + def self(self) -> builtins.str: """ stability :stability: experimental @@ -66391,14 +76292,15 @@ class ClassWithSelf( class ClassWithSelfKwarg( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.PythonSelf.ClassWithSelfKwarg" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.PythonSelf.ClassWithSelfKwarg", ): """ stability :stability: experimental """ - def __init__(self_, *, self: str) -> None: + def __init__(self_, *, self: builtins.str) -> None: """ :param self: @@ -66409,7 +76311,7 @@ class ClassWithSelfKwarg( jsii.create(ClassWithSelfKwarg, self_, [props]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="props") def props(self) -> "StructWithSelf": """ @@ -66420,7 +76322,7 @@ class ClassWithSelfKwarg( @jsii.interface(jsii_type="jsii-calc.PythonSelf.IInterfaceWithSelf") -class IInterfaceWithSelf(jsii.compat.Protocol): +class IInterfaceWithSelf(typing_extensions.Protocol): """ stability :stability: experimental @@ -66431,7 +76333,7 @@ class IInterfaceWithSelf(jsii.compat.Protocol): return _IInterfaceWithSelfProxy @jsii.member(jsii_name="method") - def method(self_, self: jsii.Number) -> str: + def method(self_, self: jsii.Number) -> builtins.str: """ :param self: - @@ -66447,10 +76349,10 @@ class _IInterfaceWithSelfProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.PythonSelf.IInterfaceWithSelf" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.PythonSelf.IInterfaceWithSelf" @jsii.member(jsii_name="method") - def method(self_, self: jsii.Number) -> str: + def method(self_, self: jsii.Number) -> builtins.str: """ :param self: - @@ -66466,29 +76368,31 @@ class _IInterfaceWithSelfProxy: name_mapping={"self": "self"}, ) class StructWithSelf: - def __init__(self_, *, self: str) -> None: + def __init__(self_, *, self: builtins.str) -> None: """ :param self: stability :stability: experimental """ - self_._values = { + self_._values: typing.Dict[str, typing.Any] = { "self": self, } @builtins.property - def self(self) -> str: + def self(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("self") + result = self._values.get("self") + assert result is not None, "Required property 'self' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -66516,8 +76420,8 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions from .._jsii import * @@ -66549,7 +76453,7 @@ class MyClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.submodule.MyClass"): jsii.create(MyClass, self, [props]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="awesomeness") def awesomeness(self) -> _Awesomeness_d37a24df: """ @@ -66558,16 +76462,16 @@ class MyClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.submodule.MyClass"): """ return jsii.get(self, "awesomeness") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="definedAt") - def defined_at(self) -> str: + def defined_at(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "definedAt") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="goodness") def goodness(self) -> _Goodness_2df26737: """ @@ -66576,7 +76480,7 @@ class MyClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.submodule.MyClass"): """ return jsii.get(self, "goodness") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="props") def props(self) -> _SomeStruct_91627123: """ @@ -66585,7 +76489,7 @@ class MyClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.submodule.MyClass"): """ return jsii.get(self, "props") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="allTypes") def all_types(self) -> typing.Optional[_AllTypes_b08307c5]: """ @@ -66594,7 +76498,7 @@ class MyClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.submodule.MyClass"): """ return jsii.get(self, "allTypes") - @all_types.setter + @all_types.setter # type: ignore def all_types(self, value: typing.Optional[_AllTypes_b08307c5]) -> None: jsii.set(self, "allTypes", value) @@ -66615,8 +76519,8 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions from ..._jsii import * @@ -66636,7 +76540,7 @@ class MyClassReference: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "reference": reference, } @@ -66646,12 +76550,14 @@ class MyClassReference: stability :stability: experimental """ - return self._values.get("reference") + result = self._values.get("reference") + assert result is not None, "Required property 'reference' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -66676,8 +76582,8 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions from ..._jsii import * @@ -66725,7 +76631,8 @@ class Goodness(enum.Enum): class InnerClass( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.submodule.child.InnerClass" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.submodule.child.InnerClass", ): """ stability @@ -66739,7 +76646,7 @@ class InnerClass( """ jsii.create(InnerClass, self, []) - @jsii.python.classproperty + @jsii.python.classproperty # type: ignore @jsii.member(jsii_name="staticProp") def STATIC_PROP(cls) -> "SomeStruct": """ @@ -66750,7 +76657,8 @@ class InnerClass( class OuterClass( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.submodule.child.OuterClass" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.submodule.child.OuterClass", ): """Checks that classes can self-reference during initialization. @@ -66767,7 +76675,7 @@ class OuterClass( """ jsii.create(OuterClass, self, []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="innerClass") def inner_class(self) -> "InnerClass": """ @@ -66804,7 +76712,7 @@ class SomeStruct: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "prop": prop, } @@ -66814,12 +76722,14 @@ class SomeStruct: stability :stability: experimental """ - return self._values.get("prop") + result = self._values.get("prop") + assert result is not None, "Required property 'prop' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -66834,29 +76744,31 @@ class SomeStruct: name_mapping={"bool": "bool"}, ) class Structure: - def __init__(self, *, bool: bool) -> None: + def __init__(self, *, bool: builtins.bool) -> None: """ :param bool: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "bool": bool, } @builtins.property - def bool(self) -> bool: + def bool(self) -> builtins.bool: """ stability :stability: experimental """ - return self._values.get("bool") + result = self._values.get("bool") + assert result is not None, "Required property 'bool' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -66871,7 +76783,12 @@ class Structure: name_mapping={"prop": "prop", "extra": "extra"}, ) class KwargsProps(SomeStruct): - def __init__(self, *, prop: "SomeEnum", extra: typing.Optional[str] = None) -> None: + def __init__( + self, + *, + prop: "SomeEnum", + extra: typing.Optional[builtins.str] = None, + ) -> None: """ :param prop: :param extra: @@ -66879,7 +76796,7 @@ class KwargsProps(SomeStruct): stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "prop": prop, } if extra is not None: @@ -66891,20 +76808,23 @@ class KwargsProps(SomeStruct): stability :stability: experimental """ - return self._values.get("prop") + result = self._values.get("prop") + assert result is not None, "Required property 'prop' is missing" + return result @builtins.property - def extra(self) -> typing.Optional[str]: + def extra(self) -> typing.Optional[builtins.str]: """ stability :stability: experimental """ - return self._values.get("extra") + result = self._values.get("extra") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -66936,8 +76856,8 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions from ..._jsii import * @@ -66956,8 +76876,11 @@ class Kwargs(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.submodule.isolated.Kw @jsii.member(jsii_name="method") @builtins.classmethod def method( - cls, *, extra: typing.Optional[str] = None, prop: _SomeEnum_b2e41d92 - ) -> bool: + cls, + *, + extra: typing.Optional[builtins.str] = None, + prop: _SomeEnum_b2e41d92, + ) -> builtins.bool: """ :param extra: :param prop: @@ -66986,8 +76909,8 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions from ..._jsii import * @@ -67009,16 +76932,16 @@ class Namespaced( def __jsii_proxy_class__(): return _NamespacedProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="definedAt") - def defined_at(self) -> str: + def defined_at(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "definedAt") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="goodness") @abc.abstractmethod def goodness(self) -> _Goodness_2df26737: @@ -67030,7 +76953,7 @@ class Namespaced( class _NamespacedProxy(Namespaced): - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="goodness") def goodness(self) -> _Goodness_2df26737: """ @@ -67056,8 +76979,8 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions from ...._jsii import * @@ -67065,7 +76988,7 @@ from ...._jsii import * @jsii.interface( jsii_type="jsii-calc.submodule.nested_submodule.deeplyNested.INamespaced" ) -class INamespaced(jsii.compat.Protocol): +class INamespaced(typing_extensions.Protocol): """ stability :stability: experimental @@ -67075,9 +76998,9 @@ class INamespaced(jsii.compat.Protocol): def __jsii_proxy_class__(): return _INamespacedProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="definedAt") - def defined_at(self) -> str: + def defined_at(self) -> builtins.str: """ stability :stability: experimental @@ -67091,11 +77014,11 @@ class _INamespacedProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.submodule.nested_submodule.deeplyNested.INamespaced" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.submodule.nested_submodule.deeplyNested.INamespaced" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="definedAt") - def defined_at(self) -> str: + def defined_at(self) -> builtins.str: """ stability :stability: experimental diff --git a/packages/jsii-pacmak/test/build-test.sh b/packages/jsii-pacmak/test/build-test.sh index 64e73def06..bbe51633ed 100755 --- a/packages/jsii-pacmak/test/build-test.sh +++ b/packages/jsii-pacmak/test/build-test.sh @@ -32,21 +32,25 @@ else # Hello Windows! . ${venv}/Scripts/activate fi -python3 -m pip install --upgrade pip~=20.2.2 twine~=3.2.0 pipx~=0.15.4.0 +python3 -m pip install --upgrade pip~=20.2 twine~=3.2 + +# Provision a specific NuGet package cache +NUGET_CACHE=${outdir}/.nuget/packages +OPTS="--dotnet-nuget-global-packages-folder=${NUGET_CACHE}" # Single target, recursive build to a certain location clean_dists echo "Testing SINGLE TARGET, RECURSIVE build." -../bin/jsii-pacmak -o ${outdir} --recurse ../../jsii-calc +../bin/jsii-pacmak ${OPTS} -o ${outdir} --recurse ../../jsii-calc # Multiple targets, build one-by-one into own directory clean_dists echo "Testing ONE-BY-ONE build." for dir in $packagedirs; do - ../bin/jsii-pacmak $dir + ../bin/jsii-pacmak ${OPTS} $dir done # Multiple targets, build all at once into own directory clean_dists echo "Testing ALL-AT-ONCE build." -../bin/jsii-pacmak --no-parallel $packagedirs +../bin/jsii-pacmak ${OPTS} --no-parallel $packagedirs diff --git a/packages/jsii-pacmak/test/jsii-pacmak.test.ts b/packages/jsii-pacmak/test/jsii-pacmak.test.ts index feb6cded45..eec30e1ab8 100644 --- a/packages/jsii-pacmak/test/jsii-pacmak.test.ts +++ b/packages/jsii-pacmak/test/jsii-pacmak.test.ts @@ -1,6 +1,6 @@ #!/usr/bin/env node -import { spawnSync } from 'child_process'; +import { spawnSync, SpawnSyncOptions } from 'child_process'; import * as fs from 'fs-extra'; import * as os from 'os'; import * as path from 'path'; @@ -61,6 +61,8 @@ for (const pkg of [ runPacmak(pkgRoot, outDir); expect({ [TREE]: checkTree(outDir) }).toMatchSnapshot('/'); + + runMypy(path.join(outDir, 'python')); }); } @@ -115,7 +117,7 @@ function checkTree( } function runPacmak(root: string, outdir: string): void { - const result = spawnSync( + return runCommand( process.execPath, [ ...process.execArgv, @@ -130,16 +132,108 @@ function runPacmak(root: string, outdir: string): void { stdio: ['inherit', 'pipe', 'pipe'], }, ); +} - expect(result.error).toBeUndefined(); +function runMypy(pythonRoot: string): void { + const venvRoot = path.join(__dirname, '.venv'); + const venvBin = path.join( + venvRoot, + process.platform === 'win32' ? 'Scripts' : 'bin', + ); + const venvPython = path.join(venvBin, 'python'); - if (result.status !== 0) { - console.error(`#### PACMAK STDOUT:\n${result.stdout.toString('utf-8')}`); - console.error(`#### PACMAK STDERR:\n${result.stderr.toString('utf-8')}`); + const env = { + ...process.env, + PATH: `${venvBin}:${process.env.PATH}`, + VIRTUAL_ENV: venvRoot, + }; + + // Create a Python virtual environment + runCommand('python3', [ + '-m', + 'venv', + '--system-site-packages', // Allow using globally installed packages (saves time & disk space) + venvRoot, + ]); + // Install mypy and the jsii runtime in there as needed + runCommand( + venvPython, + [ + '-m', + 'pip', + 'install', + '--no-input', + 'mypy>=0.782', + // Note: this resolution is a little ugly, but it's there to avoid creating a dependency cycle + path.resolve(require.resolve('@jsii/python-runtime/package.json'), '..'), + ], + { + env, + }, + ); + // Now run mypy on the Python code + runCommand( + venvPython, + [ + '-m', + 'mypy', + '--ignore-missing-imports', // We may not have the package's dependencies in scope. Let's just ignore that for now. + '--pretty', // Output in readable form, with source excerpts and problem markers + '--show-error-codes', // Show the "standard" error codes to make it easier to google around + '--strict', // Enable all optional checks -- let's be pedantic about everything! + pythonRoot, + ], + { env }, + ); +} + +/** + * Runs a command and asserts that it was successful. If the command failed, + * it's standard out and error from the child process will be made visible + * through `console.error`, unless the `stdio` option for `stdout` and/or + * `stderr` is overridden from `inherit`. + * + * By default, `spawnSync` is invoked with `shell: true` if the current platform + * is `win32`. This can be overridden through `options`. + * + * @param argv0 the entry point for the command to be run. + * @param argv the arguments to pass to argv0. + * @param options options to be provided to `spawnSync`. + */ +function runCommand( + argv0: string, + argv: readonly string[], + options?: SpawnSyncOptions, +) { + const { error, signal, status, stderr, stdout } = spawnSync(argv0, argv, { + shell: process.platform === 'win32', + stdio: ['inherit', 'pipe', 'pipe'], + ...options, + }); + + expect(error).toBeUndefined(); + + if (status !== 0) { + const reason = signal ? `signal ${signal}` : `status ${status}`; + console.error( + [ + `Command failed with ${reason}: ${argv0} ${argv.join(' ')}`, + prefix(stdout, '#STDOUT> '), + prefix(stderr, '#STDERR> '), + ].join('\n'), + ); } - expect(result.signal).toBeNull(); - expect(result.status).toBe(0); + expect(signal).toBeNull(); + expect(status).toBe(0); + + function prefix(buffer: Buffer, prefix: string): string { + return buffer + .toString('utf-8') + .split('\n') + .map((line) => prefix + line) + .join('\n'); + } } type TreeStructure = string | { [name: string]: TreeStructure }; diff --git a/packages/jsii-pacmak/test/targets/python/type-name.test.ts b/packages/jsii-pacmak/test/targets/python/type-name.test.ts index 87bc93b8ce..b52157abff 100644 --- a/packages/jsii-pacmak/test/targets/python/type-name.test.ts +++ b/packages/jsii-pacmak/test/targets/python/type-name.test.ts @@ -87,7 +87,7 @@ describe(toTypeName, () => { { name: 'Primitive: Boolean', input: { primitive: PrimitiveType.Boolean }, - pythonType: 'bool', + pythonType: 'builtins.bool', }, { name: 'Primitive: Date', @@ -102,7 +102,7 @@ describe(toTypeName, () => { { name: 'Primitive: String', input: { primitive: PrimitiveType.String }, - pythonType: 'str', + pythonType: 'builtins.str', }, { name: 'Primitive: JSON', @@ -124,7 +124,7 @@ describe(toTypeName, () => { elementtype: { primitive: PrimitiveType.String }, }, }, - pythonType: 'typing.List[str]', + pythonType: 'typing.List[builtins.str]', }, { name: 'Map', @@ -134,7 +134,7 @@ describe(toTypeName, () => { elementtype: { primitive: PrimitiveType.String }, }, }, - pythonType: 'typing.Mapping[str, str]', + pythonType: 'typing.Mapping[builtins.str, builtins.str]', }, // ############################## TYPE UNIONS ############################## { @@ -147,7 +147,7 @@ describe(toTypeName, () => { ], }, }, - pythonType: 'typing.Union[str, jsii.Number]', + pythonType: 'typing.Union[builtins.str, jsii.Number]', }, // ############################### USER TYPES ############################## { diff --git a/packages/jsii-reflect/lib/callable.ts b/packages/jsii-reflect/lib/callable.ts index 3143b927ae..ad8f18b81a 100644 --- a/packages/jsii-reflect/lib/callable.ts +++ b/packages/jsii-reflect/lib/callable.ts @@ -11,9 +11,9 @@ import { TypeSystem } from './type-system'; export abstract class Callable implements Documentable, Overridable, TypeMember, SourceLocatable { - public abstract readonly kind: MemberKind; - public abstract readonly name: string; - public abstract readonly abstract: boolean; + public declare abstract readonly kind: MemberKind; + public declare abstract readonly name: string; + public declare abstract readonly abstract: boolean; public constructor( public readonly system: TypeSystem, diff --git a/packages/jsii-reflect/lib/initializer.ts b/packages/jsii-reflect/lib/initializer.ts index 427f4064a9..a548103df7 100644 --- a/packages/jsii-reflect/lib/initializer.ts +++ b/packages/jsii-reflect/lib/initializer.ts @@ -4,7 +4,8 @@ import { Overridable } from './overridable'; import { SourceLocatable } from './source'; import { MemberKind, TypeMember } from './type-member'; -export class Initializer extends Callable +export class Initializer + extends Callable implements Documentable, Overridable, TypeMember, SourceLocatable { public static isInitializer(x: Callable): x is Initializer { return x instanceof Initializer; diff --git a/packages/jsii-reflect/lib/method.ts b/packages/jsii-reflect/lib/method.ts index ad68fca362..ebd7eaabb0 100644 --- a/packages/jsii-reflect/lib/method.ts +++ b/packages/jsii-reflect/lib/method.ts @@ -14,7 +14,8 @@ import { TypeSystem } from './type-system'; */ export const INITIALIZER_NAME = ''; -export class Method extends Callable +export class Method + extends Callable implements Documentable, Overridable, TypeMember, SourceLocatable { public static isMethod(x: Callable): x is Method { return x instanceof Method; diff --git a/packages/jsii-reflect/lib/module-like.ts b/packages/jsii-reflect/lib/module-like.ts index 019c7b2647..03f9150eb7 100644 --- a/packages/jsii-reflect/lib/module-like.ts +++ b/packages/jsii-reflect/lib/module-like.ts @@ -6,9 +6,9 @@ import { Type } from './type'; import { TypeSystem } from './type-system'; export abstract class ModuleLike { - public abstract readonly fqn: string; - public abstract readonly submodules: readonly Submodule[]; - public abstract readonly types: readonly Type[]; + public declare abstract readonly fqn: string; + public declare abstract readonly submodules: readonly Submodule[]; + public declare abstract readonly types: readonly Type[]; protected constructor(public readonly system: TypeSystem) {} diff --git a/packages/jsii-reflect/lib/property.ts b/packages/jsii-reflect/lib/property.ts index 3d8ec74944..952f233762 100644 --- a/packages/jsii-reflect/lib/property.ts +++ b/packages/jsii-reflect/lib/property.ts @@ -12,7 +12,8 @@ import { Type } from './type'; import { MemberKind, TypeMember } from './type-member'; import { TypeSystem } from './type-system'; -export class Property extends OptionalValue +export class Property + extends OptionalValue implements Documentable, Overridable, TypeMember, SourceLocatable { public readonly kind = MemberKind.Property; diff --git a/packages/jsii-reflect/lib/type.ts b/packages/jsii-reflect/lib/type.ts index cc28463ac1..cb94c6dcd8 100644 --- a/packages/jsii-reflect/lib/type.ts +++ b/packages/jsii-reflect/lib/type.ts @@ -77,7 +77,7 @@ export abstract class Type implements Documentable, SourceLocatable { * Determines whether this is a Data Type (that is, an interface with no methods) or not. */ public isDataType(): this is InterfaceType { - return false; + return false; // TODO how is this different from isInterfaceType? } /** diff --git a/packages/jsii-reflect/package.json b/packages/jsii-reflect/package.json index d606421e0a..af9c01e84a 100644 --- a/packages/jsii-reflect/package.json +++ b/packages/jsii-reflect/package.json @@ -47,11 +47,11 @@ "@types/node": "^10.17.28", "@types/yargs": "^15.0.5", "eslint": "^7.7.0", - "jest": "^26.4.0", + "jest": "^26.4.2", "jsii": "^0.0.0", "jsii-build-tools": "^0.0.0", "jsii-calc": "^0.0.0", - "prettier": "^2.0.5", + "prettier": "^2.1.0", "typescript": "~3.9.7" }, "jest": { 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 5a105077eb..9b20d40f1b 100644 --- a/packages/jsii-reflect/test/__snapshots__/jsii-tree.test.js.snap +++ b/packages/jsii-reflect/test/__snapshots__/jsii-tree.test.js.snap @@ -90,7 +90,7 @@ exports[`jsii-tree --all 1`] = ` │ │ │ │ ├─┬ expression property (experimental) │ │ │ │ │ ├── abstract │ │ │ │ │ ├── immutable - │ │ │ │ │ └── type: @scope/jsii-calc-lib.Value + │ │ │ │ │ └── type: @scope/jsii-calc-lib.NumericValue │ │ │ │ ├─┬ value property (experimental) │ │ │ │ │ ├── immutable │ │ │ │ │ └── type: number @@ -269,9 +269,9 @@ exports[`jsii-tree --all 1`] = ` │ │ ├─┬ (lhs,rhs) initializer (experimental) │ │ │ └─┬ parameters │ │ │ ├─┬ lhs - │ │ │ │ └── type: @scope/jsii-calc-lib.Value + │ │ │ │ └── type: @scope/jsii-calc-lib.NumericValue │ │ │ └─┬ rhs - │ │ │ └── type: @scope/jsii-calc-lib.Value + │ │ │ └── type: @scope/jsii-calc-lib.NumericValue │ │ ├─┬ toString() method (experimental) │ │ │ └── returns: string │ │ └─┬ value property (experimental) @@ -318,7 +318,7 @@ exports[`jsii-tree --all 1`] = ` │ │ ├─┬ stringProperty property (experimental) │ │ │ └── type: string │ │ ├─┬ unionArrayProperty property (experimental) - │ │ │ └── type: Array + │ │ │ └── type: Array │ │ ├─┬ unionMapProperty property (experimental) │ │ │ └── type: Map string | number | @scope/jsii-calc-lib.Number> │ │ ├─┬ unionProperty property (experimental) @@ -427,17 +427,17 @@ exports[`jsii-tree --all 1`] = ` │ │ ├─┬ (lhs,rhs) initializer (experimental) │ │ │ └─┬ parameters │ │ │ ├─┬ lhs - │ │ │ │ └── type: @scope/jsii-calc-lib.Value + │ │ │ │ └── type: @scope/jsii-calc-lib.NumericValue │ │ │ └─┬ rhs - │ │ │ └── type: @scope/jsii-calc-lib.Value + │ │ │ └── type: @scope/jsii-calc-lib.NumericValue │ │ ├─┬ hello() method (experimental) │ │ │ └── returns: string │ │ ├─┬ lhs property (experimental) │ │ │ ├── immutable - │ │ │ └── type: @scope/jsii-calc-lib.Value + │ │ │ └── type: @scope/jsii-calc-lib.NumericValue │ │ └─┬ rhs property (experimental) │ │ ├── immutable - │ │ └── type: @scope/jsii-calc-lib.Value + │ │ └── type: @scope/jsii-calc-lib.NumericValue │ ├─┬ class BurriedAnonymousObject (experimental) │ │ └─┬ members │ │ ├── () initializer (experimental) @@ -477,15 +477,15 @@ exports[`jsii-tree --all 1`] = ` │ │ │ └── returns: number │ │ ├─┬ expression property (experimental) │ │ │ ├── immutable - │ │ │ └── type: @scope/jsii-calc-lib.Value + │ │ │ └── type: @scope/jsii-calc-lib.NumericValue │ │ ├─┬ operationsLog property (experimental) │ │ │ ├── immutable - │ │ │ └── type: Array<@scope/jsii-calc-lib.Value> + │ │ │ └── type: Array<@scope/jsii-calc-lib.NumericValue> │ │ ├─┬ operationsMap property (experimental) │ │ │ ├── immutable - │ │ │ └── type: Map Array<@scope/jsii-calc-lib.Value>> + │ │ │ └── type: Map Array<@scope/jsii-calc-lib.NumericValue>> │ │ ├─┬ curr property (experimental) - │ │ │ └── type: @scope/jsii-calc-lib.Value + │ │ │ └── type: @scope/jsii-calc-lib.NumericValue │ │ ├─┬ maxValue property (experimental) │ │ │ └── type: Optional │ │ └─┬ unionProperty property (experimental) @@ -811,6 +811,31 @@ exports[`jsii-tree --all 1`] = ` │ │ │ └── returns: string │ │ └─┬ next() method (experimental) │ │ └── returns: number + │ ├─┬ class DynamicPropertyBearer (experimental) + │ │ └─┬ members + │ │ ├─┬ (valueStore) initializer (experimental) + │ │ │ └─┬ parameters + │ │ │ └─┬ valueStore + │ │ │ └── type: string + │ │ ├─┬ dynamicProperty property (experimental) + │ │ │ └── type: string + │ │ └─┬ valueStore property (experimental) + │ │ └── type: string + │ ├─┬ class DynamicPropertyBearerChild (experimental) + │ │ ├── base: DynamicPropertyBearer + │ │ └─┬ members + │ │ ├─┬ (originalValue) initializer (experimental) + │ │ │ └─┬ parameters + │ │ │ └─┬ originalValue + │ │ │ └── type: string + │ │ ├─┬ overrideValue(newValue) method (experimental) + │ │ │ ├─┬ parameters + │ │ │ │ └─┬ newValue + │ │ │ │ └── type: string + │ │ │ └── returns: string + │ │ └─┬ originalValue property (experimental) + │ │ ├── immutable + │ │ └── type: string │ ├─┬ class EnumDispenser (experimental) │ │ └─┬ members │ │ ├─┬ static randomIntegerLikeEnum() method (experimental) @@ -1129,7 +1154,7 @@ exports[`jsii-tree --all 1`] = ` │ ├─┬ class JsiiAgent (experimental) │ │ └─┬ members │ │ ├── () initializer (experimental) - │ │ └─┬ static jsiiAgent property (experimental) + │ │ └─┬ static value property (experimental) │ │ ├── immutable │ │ ├── static │ │ └── type: Optional @@ -1195,9 +1220,9 @@ exports[`jsii-tree --all 1`] = ` │ │ ├─┬ (lhs,rhs) initializer (experimental) │ │ │ └─┬ parameters │ │ │ ├─┬ lhs - │ │ │ │ └── type: @scope/jsii-calc-lib.Value + │ │ │ │ └── type: @scope/jsii-calc-lib.NumericValue │ │ │ └─┬ rhs - │ │ │ └── type: @scope/jsii-calc-lib.Value + │ │ │ └── type: @scope/jsii-calc-lib.NumericValue │ │ ├─┬ farewell() method (experimental) │ │ │ └── returns: string │ │ ├─┬ goodbye() method (experimental) @@ -1216,7 +1241,7 @@ exports[`jsii-tree --all 1`] = ` │ │ ├─┬ (operand) initializer (experimental) │ │ │ └─┬ parameters │ │ │ └─┬ operand - │ │ │ └── type: @scope/jsii-calc-lib.Value + │ │ │ └── type: @scope/jsii-calc-lib.NumericValue │ │ ├─┬ farewell() method (experimental) │ │ │ └── returns: string │ │ ├─┬ goodbye() method (experimental) @@ -1288,12 +1313,12 @@ exports[`jsii-tree --all 1`] = ` │ │ ├─┬ sumFromArray(values) method (experimental) │ │ │ ├─┬ parameters │ │ │ │ └─┬ values - │ │ │ │ └── type: Array<@scope/jsii-calc-lib.Value> + │ │ │ │ └── type: Array<@scope/jsii-calc-lib.NumericValue> │ │ │ └── returns: number │ │ └─┬ sumFromMap(values) method (experimental) │ │ ├─┬ parameters │ │ │ └─┬ values - │ │ │ └── type: Map @scope/jsii-calc-lib.Value> + │ │ │ └── type: Map @scope/jsii-calc-lib.NumericValue> │ │ └── returns: number │ ├─┬ class ObjectWithPropertyProvider (experimental) │ │ └─┬ members @@ -1398,18 +1423,18 @@ exports[`jsii-tree --all 1`] = ` │ │ ├─┬ (base,pow) initializer (experimental) │ │ │ └─┬ parameters │ │ │ ├─┬ base - │ │ │ │ └── type: @scope/jsii-calc-lib.Value + │ │ │ │ └── type: @scope/jsii-calc-lib.NumericValue │ │ │ └─┬ pow - │ │ │ └── type: @scope/jsii-calc-lib.Value + │ │ │ └── type: @scope/jsii-calc-lib.NumericValue │ │ ├─┬ base property (experimental) │ │ │ ├── immutable - │ │ │ └── type: @scope/jsii-calc-lib.Value + │ │ │ └── type: @scope/jsii-calc-lib.NumericValue │ │ ├─┬ expression property (experimental) │ │ │ ├── immutable - │ │ │ └── type: @scope/jsii-calc-lib.Value + │ │ │ └── type: @scope/jsii-calc-lib.NumericValue │ │ └─┬ pow property (experimental) │ │ ├── immutable - │ │ └── type: @scope/jsii-calc-lib.Value + │ │ └── type: @scope/jsii-calc-lib.NumericValue │ ├─┬ class PropertyNamedProperty (experimental) │ │ └─┬ members │ │ ├── () initializer (experimental) @@ -1685,9 +1710,9 @@ exports[`jsii-tree --all 1`] = ` │ │ ├── () initializer (experimental) │ │ ├─┬ expression property (experimental) │ │ │ ├── immutable - │ │ │ └── type: @scope/jsii-calc-lib.Value + │ │ │ └── type: @scope/jsii-calc-lib.NumericValue │ │ └─┬ parts property (experimental) - │ │ └── type: Array<@scope/jsii-calc-lib.Value> + │ │ └── type: Array<@scope/jsii-calc-lib.NumericValue> │ ├─┬ class SupportsNiceJavaBuilder (experimental) │ │ ├── base: SupportsNiceJavaBuilderWithRequiredProps │ │ └─┬ members @@ -1790,10 +1815,10 @@ exports[`jsii-tree --all 1`] = ` │ │ ├─┬ (operand) initializer (experimental) │ │ │ └─┬ parameters │ │ │ └─┬ operand - │ │ │ └── type: @scope/jsii-calc-lib.Value + │ │ │ └── type: @scope/jsii-calc-lib.NumericValue │ │ └─┬ operand property (experimental) │ │ ├── immutable - │ │ └── type: @scope/jsii-calc-lib.Value + │ │ └── type: @scope/jsii-calc-lib.NumericValue │ ├─┬ class UpcasingReflectable (experimental) │ │ ├── interfaces: IReflectable │ │ └─┬ members @@ -1968,7 +1993,7 @@ exports[`jsii-tree --all 1`] = ` │ │ ├─┬ anotherOptional property (experimental) │ │ │ ├── abstract │ │ │ ├── immutable - │ │ │ └── type: Optional @scope/jsii-calc-lib.Value>> + │ │ │ └── type: Optional @scope/jsii-calc-lib.NumericValue>> │ │ ├─┬ optionalAny property (experimental) │ │ │ ├── abstract │ │ │ ├── immutable @@ -2531,6 +2556,16 @@ exports[`jsii-tree --all 1`] = ` │ └── returns: void ├─┬ @scope/jsii-calc-base-of-base │ └─┬ types + │ ├─┬ class StaticConsumer + │ │ └─┬ members + │ │ └─┬ static consume(_args) method + │ │ ├── static + │ │ ├── variadic + │ │ ├─┬ parameters + │ │ │ └─┬ _args + │ │ │ ├── type: any + │ │ │ └── variadic + │ │ └── returns: void │ ├─┬ class Very │ │ └─┬ members │ │ ├── () initializer @@ -2576,6 +2611,12 @@ exports[`jsii-tree --all 1`] = ` │ │ ├── abstract │ │ ├── immutable │ │ └── type: Array<@scope/jsii-calc-lib.submodule.ReflectableEntry> + │ ├─┬ interface NestedStruct (deprecated) + │ │ └─┬ members + │ │ └─┬ name property (deprecated) + │ │ ├── abstract + │ │ ├── immutable + │ │ └── type: string │ └─┬ interface ReflectableEntry (deprecated) │ └─┬ members │ ├─┬ key property (deprecated) @@ -2588,7 +2629,7 @@ exports[`jsii-tree --all 1`] = ` │ └── type: any └─┬ types ├─┬ class Number (deprecated) - │ ├── base: Value + │ ├── base: NumericValue │ ├── interfaces: IDoublable │ └─┬ members │ ├─┬ (value) initializer (deprecated) @@ -2601,14 +2642,7 @@ exports[`jsii-tree --all 1`] = ` │ └─┬ value property (deprecated) │ ├── immutable │ └── type: number - ├─┬ class Operation (deprecated) - │ ├── base: Value - │ └─┬ members - │ ├── () initializer (deprecated) - │ └─┬ toString() method (deprecated) - │ ├── abstract - │ └── returns: string - ├─┬ class Value (deprecated) + ├─┬ class NumericValue (deprecated) │ ├── base: Base │ └─┬ members │ ├── () initializer (deprecated) @@ -2618,6 +2652,13 @@ exports[`jsii-tree --all 1`] = ` │ ├── abstract │ ├── immutable │ └── type: number + ├─┬ class Operation (deprecated) + │ ├── base: NumericValue + │ └─┬ members + │ ├── () initializer (deprecated) + │ └─┬ toString() method (deprecated) + │ ├── abstract + │ └── returns: string ├─┬ interface IDoublable (deprecated) │ └─┬ members │ └─┬ doubleValue property (deprecated) @@ -2780,6 +2821,9 @@ exports[`jsii-tree --inheritance 1`] = ` │ ├── class DontComplainAboutVariadicAfterOptional │ ├─┬ class DoubleTrouble │ │ └── interfaces: IFriendlyRandomGenerator + │ ├── class DynamicPropertyBearer + │ ├─┬ class DynamicPropertyBearerChild + │ │ └── base: DynamicPropertyBearer │ ├── class EnumDispenser │ ├── class EraseUndefinedHashValues │ ├── class ExperimentalClass @@ -2985,6 +3029,7 @@ exports[`jsii-tree --inheritance 1`] = ` │ └── IVeryBaseInterface ├─┬ @scope/jsii-calc-base-of-base │ └─┬ types + │ ├── class StaticConsumer │ ├── class Very │ ├── interface IVeryBaseInterface │ └── interface VeryBaseProps @@ -2996,15 +3041,16 @@ exports[`jsii-tree --inheritance 1`] = ` │ ├── class NestedClass │ ├── class Reflector │ ├── interface IReflectable + │ ├── interface NestedStruct │ └── interface ReflectableEntry └─┬ types ├─┬ class Number - │ ├── base: Value + │ ├── base: NumericValue │ └── interfaces: IDoublable - ├─┬ class Operation - │ └── base: Value - ├─┬ class Value + ├─┬ class NumericValue │ └── base: Base + ├─┬ class Operation + │ └── base: NumericValue ├── interface IDoublable ├── interface IFriendly ├─┬ interface IThreeLevelsInterface @@ -3380,6 +3426,16 @@ exports[`jsii-tree --members 1`] = ` │ │ ├── () initializer │ │ ├── hello() method │ │ └── next() method + │ ├─┬ class DynamicPropertyBearer + │ │ └─┬ members + │ │ ├── (valueStore) initializer + │ │ ├── dynamicProperty property + │ │ └── valueStore property + │ ├─┬ class DynamicPropertyBearerChild + │ │ └─┬ members + │ │ ├── (originalValue) initializer + │ │ ├── overrideValue(newValue) method + │ │ └── originalValue property │ ├─┬ class EnumDispenser │ │ └─┬ members │ │ ├── static randomIntegerLikeEnum() method @@ -3544,7 +3600,7 @@ exports[`jsii-tree --members 1`] = ` │ ├─┬ class JsiiAgent │ │ └─┬ members │ │ ├── () initializer - │ │ └── static jsiiAgent property + │ │ └── static value property │ ├─┬ class JsonFormatter │ │ └─┬ members │ │ ├── static anyArray() method @@ -4144,6 +4200,9 @@ exports[`jsii-tree --members 1`] = ` │ └── bar() method ├─┬ @scope/jsii-calc-base-of-base │ └─┬ types + │ ├─┬ class StaticConsumer + │ │ └─┬ members + │ │ └── static consume(_args) method │ ├─┬ class Very │ │ └─┬ members │ │ ├── () initializer @@ -4171,6 +4230,9 @@ exports[`jsii-tree --members 1`] = ` │ ├─┬ interface IReflectable │ │ └─┬ members │ │ └── entries property + │ ├─┬ interface NestedStruct + │ │ └─┬ members + │ │ └── name property │ └─┬ interface ReflectableEntry │ └─┬ members │ ├── key property @@ -4181,15 +4243,15 @@ exports[`jsii-tree --members 1`] = ` │ ├── (value) initializer │ ├── doubleValue property │ └── value property - ├─┬ class Operation - │ └─┬ members - │ ├── () initializer - │ └── toString() method - ├─┬ class Value + ├─┬ class NumericValue │ └─┬ members │ ├── () initializer │ ├── toString() method │ └── value property + ├─┬ class Operation + │ └─┬ members + │ ├── () initializer + │ └── toString() method ├─┬ interface IDoublable │ └─┬ members │ └── doubleValue property @@ -4332,6 +4394,8 @@ exports[`jsii-tree --types 1`] = ` │ ├── class DocumentedClass │ ├── class DontComplainAboutVariadicAfterOptional │ ├── class DoubleTrouble + │ ├── class DynamicPropertyBearer + │ ├── class DynamicPropertyBearerChild │ ├── class EnumDispenser │ ├── class EraseUndefinedHashValues │ ├── class ExperimentalClass @@ -4491,6 +4555,7 @@ exports[`jsii-tree --types 1`] = ` │ └── interface IBaseInterface ├─┬ @scope/jsii-calc-base-of-base │ └─┬ types + │ ├── class StaticConsumer │ ├── class Very │ ├── interface IVeryBaseInterface │ └── interface VeryBaseProps @@ -4502,11 +4567,12 @@ exports[`jsii-tree --types 1`] = ` │ ├── class NestedClass │ ├── class Reflector │ ├── interface IReflectable + │ ├── interface NestedStruct │ └── interface ReflectableEntry └─┬ types ├── class Number + ├── class NumericValue ├── class Operation - ├── class Value ├── interface IDoublable ├── interface IFriendly ├── interface IThreeLevelsInterface 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 40712f8eb0..3827deaab8 100644 --- a/packages/jsii-reflect/test/__snapshots__/type-system.test.js.snap +++ b/packages/jsii-reflect/test/__snapshots__/type-system.test.js.snap @@ -11,11 +11,12 @@ Array [ exports[`TypeSystem.classes lists all the classes in the typesystem 1`] = ` Array [ + "@scope/jsii-calc-base-of-base.StaticConsumer", "@scope/jsii-calc-base-of-base.Very", "@scope/jsii-calc-base.Base", "@scope/jsii-calc-lib.Number", + "@scope/jsii-calc-lib.NumericValue", "@scope/jsii-calc-lib.Operation", - "@scope/jsii-calc-lib.Value", "@scope/jsii-calc-lib.submodule.NestingClass", "@scope/jsii-calc-lib.submodule.NestingClass.NestedClass", "@scope/jsii-calc-lib.submodule.Reflector", @@ -60,6 +61,8 @@ Array [ "jsii-calc.DocumentedClass", "jsii-calc.DontComplainAboutVariadicAfterOptional", "jsii-calc.DoubleTrouble", + "jsii-calc.DynamicPropertyBearer", + "jsii-calc.DynamicPropertyBearerChild", "jsii-calc.EnumDispenser", "jsii-calc.EraseUndefinedHashValues", "jsii-calc.ExperimentalClass", diff --git a/packages/jsii-reflect/test/independent.test.ts b/packages/jsii-reflect/test/independent.test.ts index d6e331872a..2a42042fe7 100644 --- a/packages/jsii-reflect/test/independent.test.ts +++ b/packages/jsii-reflect/test/independent.test.ts @@ -6,7 +6,7 @@ test('get full github source location for a class or method', async () => { const assembly = await loadSource( ` export class Foo { - public foo() { + public bar() { // Nothing to do } } diff --git a/packages/jsii-reflect/test/type-system.test.ts b/packages/jsii-reflect/test/type-system.test.ts index 42047d980d..cf42f9800a 100644 --- a/packages/jsii-reflect/test/type-system.test.ts +++ b/packages/jsii-reflect/test/type-system.test.ts @@ -183,7 +183,7 @@ describe('@deprecated', () => { test('overridden member knows about both parent types', async () => { const ts = await typeSystemFromSource(` export class Foo { - public foo() { + public bar() { Array.isArray(3); } @@ -201,7 +201,7 @@ test('overridden member knows about both parent types', async () => { const superType = ts.findClass('testpkg.Foo'); const subType = ts.findClass('testpkg.SubFoo'); - const fooMethod = subType.allMethods.find((m) => m.name === 'foo')!; + const fooMethod = subType.allMethods.find((m) => m.name === 'bar')!; const booMethod = subType.allMethods.find((m) => m.name === 'boo')!; expect(fooMethod.parentType).toBe(subType); @@ -243,7 +243,7 @@ describe('Stability', () => { Array.isArray(3); } - public foo() { + public bar() { Array.isArray(3); } } @@ -256,7 +256,7 @@ describe('Stability', () => { `); const classType = ts.findClass('testpkg.SubFoo'); const initializer = classType.initializer!; - const method = classType.allMethods.find((m) => m.name === 'foo')!; + const method = classType.allMethods.find((m) => m.name === 'bar')!; expect(initializer.docs.stability).toEqual(Stability.Experimental); expect(method.docs.stability).toEqual(Stability.Experimental); @@ -278,7 +278,7 @@ describe('Stability', () => { /** * @experimental */ - public foo() { + public bar() { Array.isArray(3); } } @@ -292,7 +292,7 @@ describe('Stability', () => { const classType = ts.findClass('testpkg.SubFoo'); const initializer = classType.initializer!; - const method = classType.allMethods.find((m) => m.name === 'foo')!; + const method = classType.allMethods.find((m) => m.name === 'bar')!; expect(initializer.docs.stability).toEqual(Stability.Experimental); expect(method.docs.stability).toEqual(Stability.Experimental); @@ -314,7 +314,7 @@ describe('Stability', () => { /** * @stable */ - public foo() { + public bar() { Array.isArray(3); } } @@ -328,7 +328,7 @@ describe('Stability', () => { const classType = ts.findClass('testpkg.SubFoo'); const initializer = classType.initializer!; - const method = classType.allMethods.find((m) => m.name === 'foo')!; + const method = classType.allMethods.find((m) => m.name === 'bar')!; expect(initializer.docs.stability).toEqual(Stability.Experimental); expect(method.docs.stability).toEqual(Stability.Experimental); @@ -340,7 +340,7 @@ describe('Stability', () => { * @stability external */ export class Foo { - public foo() { + public bar() { Array.isArray(3); } } @@ -353,7 +353,7 @@ describe('Stability', () => { `); const classType = ts.findClass('testpkg.SubFoo'); - const method = classType.allMethods.find((m) => m.name === 'foo')!; + const method = classType.allMethods.find((m) => m.name === 'bar')!; expect(method.docs.stability).toEqual(Stability.External); }); diff --git a/packages/jsii-rosetta/lib/tablets/tablets.ts b/packages/jsii-rosetta/lib/tablets/tablets.ts index bcaa70fb16..a0ebe46207 100644 --- a/packages/jsii-rosetta/lib/tablets/tablets.ts +++ b/packages/jsii-rosetta/lib/tablets/tablets.ts @@ -1,4 +1,5 @@ import * as fs from 'fs-extra'; +import * as path from 'path'; import { TabletSchema, TranslatedSnippetSchema, @@ -68,6 +69,7 @@ export class LanguageTablet { } public async save(filename: string) { + await fs.mkdirp(path.dirname(filename)); await fs.writeJson(filename, this.toSchema(), { encoding: 'utf-8', spaces: 2, diff --git a/packages/jsii-rosetta/package.json b/packages/jsii-rosetta/package.json index ce0bad139b..db9cfd38ff 100644 --- a/packages/jsii-rosetta/package.json +++ b/packages/jsii-rosetta/package.json @@ -23,12 +23,12 @@ "@types/node": "^10.17.28", "@types/yargs": "^15.0.5", "eslint": "^7.7.0", - "jest": "^26.4.0", + "jest": "^26.4.2", "jsii": "^0.0.0", "jsii-build-tools": "^0.0.0", "memory-streams": "^0.1.3", - "mock-fs": "^4.12.0", - "prettier": "^2.0.5" + "mock-fs": "^4.13.0", + "prettier": "^2.1.0" }, "dependencies": { "@jsii/spec": "^0.0.0", diff --git a/packages/jsii/lib/assembler.ts b/packages/jsii/lib/assembler.ts index 07611225b9..3371b7f972 100644 --- a/packages/jsii/lib/assembler.ts +++ b/packages/jsii/lib/assembler.ts @@ -9,11 +9,11 @@ import * as log4js from 'log4js'; import * as path from 'path'; import * as ts from 'typescript'; import { getReferencedDocParams, parseSymbolDocumentation } from './docs'; -import { Diagnostic, EmitResult, Emitter } from './emitter'; +import { Emitter } from './emitter'; +import { JsiiDiagnostic } from './jsii-diagnostic'; import * as literate from './literate'; import { ProjectInfo } from './project-info'; import { isReservedName } from './reserved-words'; -import { JSII_DIAGNOSTICS_CODE } from './utils'; import { Validator } from './validator'; import { SHORT_VERSION, VERSION } from './version'; import { enabledWarnings } from './warnings'; @@ -29,7 +29,7 @@ const LOG = log4js.getLogger('jsii/assembler'); export class Assembler implements Emitter { private readonly mainFile: string; - private _diagnostics = new Array(); + private _diagnostics = new Array(); private _deferred = new Array(); private _types: { [fqn: string]: spec.Type } = {}; @@ -77,28 +77,22 @@ export class Assembler implements Emitter { * * @return the result of the assembly emission. */ - public async emit(): Promise { + public async emit(): Promise { this._diagnostics = []; if (!this.projectInfo.description) { - this._diagnostic( - null, - ts.DiagnosticCategory.Suggestion, - 'A "description" field should be specified in "package.json"', + this._diagnostics.push( + JsiiDiagnostic.JSII_0001_PKG_MISSING_DESCRIPTION.createDetached(), ); } if (!this.projectInfo.homepage) { - this._diagnostic( - null, - ts.DiagnosticCategory.Suggestion, - 'A "homepage" field should be specified in "package.json"', + this._diagnostics.push( + JsiiDiagnostic.JSII_0002_PKG_MISSING_HOMEPAGE.createDetached(), ); } const readme = await _loadReadme.call(this); if (readme == null) { - this._diagnostic( - null, - ts.DiagnosticCategory.Warning, - 'There is no "README.md" file. It is required in order to generate valid PyPI (Python) packages.', + this._diagnostics.push( + JsiiDiagnostic.JSII_0003_MISSING_README.createDetached(), ); } const docs = _loadDocs.call(this); @@ -110,10 +104,10 @@ export class Assembler implements Emitter { const sourceFile = this.program.getSourceFile(this.mainFile); if (sourceFile == null) { - this._diagnostic( - null, - ts.DiagnosticCategory.Error, - `Could not find "main" file: ${this.mainFile}`, + this._diagnostics.push( + JsiiDiagnostic.JSII_0004_COULD_NOT_FIND_ENTRYPOINT.createDetached( + this.mainFile, + ), ); } else { await this._registerDependenciesNamespaces(sourceFile); @@ -315,7 +309,7 @@ export class Assembler implements Emitter { */ private _dereference( ref: string | spec.NamedTypeReference, - referencingNode: ts.Node | null, + referencingNode: ts.Node | undefined, ): spec.Type | undefined { if (typeof ref !== 'string') { ref = ref.fqn; @@ -335,46 +329,29 @@ export class Assembler implements Emitter { // we expect it to appear as a peer dependency instead of a normal dependency. if (assembly) { if (!(assembly.name in this.projectInfo.peerDependencies)) { - this._diagnostic( - referencingNode, - ts.DiagnosticCategory.Warning, - `The type '${ref}' is exposed in the public API of this module. ` + - `Therefore, the module '${assembly.name}' must also be defined under "peerDependencies". ` + - 'This will be auto-corrected unless --no-fix-peer-dependencies was specified.', + this._diagnostics.push( + JsiiDiagnostic.JSII_0005_MISSING_PEER_DEPENDENCY.create( + referencingNode!, // Cheating here for now, until the referencingNode can be made required + assembly.name, + ref, + ), ); } } } if (!type) { - this._diagnostic( - referencingNode, - ts.DiagnosticCategory.Error, - `Unable to resolve referenced type '${ref}'. Type may be @internal or unexported`, + this._diagnostics.push( + JsiiDiagnostic.JSII_9002_UNRESOLVEABLE_TYPE.create( + referencingNode!, // Cheating here for now, until the referencingNode can be made required + ref, + ), ); } return type; } - private _diagnostic( - node: ts.Node | null, - category: ts.DiagnosticCategory, - messageText: string, - relatedInformation?: ts.DiagnosticRelatedInformation[], - ) { - this._diagnostics.push({ - domain: 'JSII', - category, - code: JSII_DIAGNOSTICS_CODE, - messageText: `JSII: ${messageText}`, - file: node != null ? node.getSourceFile() : undefined, - start: node != null ? node.getStart() : undefined, - length: node != null ? node.getEnd() - node.getStart() : undefined, - relatedInformation, - }); - } - /** * Compute the JSII fully qualified name corresponding to a ``ts.Type`` instance. If for any reason a name cannot be * computed for the type, a marker is returned instead, and an ``ts.DiagnosticCategory.Error`` diagnostic is @@ -416,14 +393,16 @@ export class Assembler implements Emitter { if (this._isPrivateOrInternal(type.symbol)) { // Check if this type is "this" (explicit or inferred method return type). - const commonMessage = `cannot be used as the ${typeUse} because it is private or @internal`; - this._diagnostic( - typeAnnotationNode, - ts.DiagnosticCategory.Error, - isThisType - ? `Type "this" (aka: "${type.symbol.name}") ${commonMessage}` - : `Type "${type.symbol.name}" ${commonMessage}`, - makeCause(typeDeclaration), + this._diagnostics.push( + JsiiDiagnostic.JSII_3001_EXPOSED_INTERNAL_TYPE.create( + typeAnnotationNode, + type.symbol, + isThisType, + typeUse, + ).addRelatedInformation( + typeDeclaration, + `The referenced type is declared here`, + ), ); hasError = true; @@ -432,11 +411,16 @@ export class Assembler implements Emitter { const groups = /^"([^"]+)"\.(.*)$/.exec(tsName); if (!groups) { if (!hasError) { - this._diagnostic( - typeAnnotationNode, - ts.DiagnosticCategory.Error, - `Cannot use internal type ${tsName} as a ${typeUse} in exported declarations`, - makeCause(typeDeclaration), + this._diagnostics.push( + JsiiDiagnostic.JSII_3001_EXPOSED_INTERNAL_TYPE.create( + typeAnnotationNode, + type.symbol, + isThisType, + typeUse, + ).addRelatedInformation( + typeDeclaration, + `The referenced type is declared here`, + ), ); hasError = true; } @@ -446,11 +430,14 @@ export class Assembler implements Emitter { const pkg = await findPackageInfo(modulePath); if (!pkg) { if (!hasError) { - this._diagnostic( - typeAnnotationNode, - ts.DiagnosticCategory.Error, - `Could not find module corresponding to ${modulePath}`, - makeCause(typeDeclaration), + this._diagnostics.push( + JsiiDiagnostic.JSII_9003_UNRESOLVEABLE_MODULE.create( + typeAnnotationNode, + modulePath, + ).addRelatedInformation( + typeDeclaration, + `The referenced type is declared here`, + ), ); hasError = true; } @@ -469,37 +456,21 @@ export class Assembler implements Emitter { !this._dereference({ fqn }, type.symbol.valueDeclaration) ) { if (!hasError) { - this._diagnostic( - typeAnnotationNode, - ts.DiagnosticCategory.Error, - `Type "${fqn}" cannot be used as a ${typeUse} because it is not exported from ${pkg.name}`, - makeCause(typeDeclaration), + this._diagnostics.push( + JsiiDiagnostic.JSII_3002_USE_OF_UNEXPORTED_FOREIGN_TYPE.create( + typeAnnotationNode, + fqn, + typeUse, + pkg, + ).addRelatedInformation( + typeDeclaration, + `The referenced type is declared here`, + ), ); hasError = true; } } return fqn; - - function makeCause(node: ts.Node): ts.DiagnosticRelatedInformation[] { - const declNode = - ts.isClassDeclaration(node) || - ts.isEnumDeclaration(node) || - ts.isInterfaceDeclaration(node) || - ts.isTypeAliasDeclaration(node) - ? node.name ?? node - : node; - return [ - { - category: ts.DiagnosticCategory.Message, - code: JSII_DIAGNOSTICS_CODE, - file: declNode.getSourceFile(), - start: declNode.getStart(declNode.getSourceFile()), - length: - declNode.getEnd() - declNode.getStart(declNode.getSourceFile()), - messageText: `The referenced type is declared here`, - }, - ]; - } } /** @@ -624,12 +595,11 @@ export class Assembler implements Emitter { symbol.name !== Case.camel(symbol.name) && symbol.name !== Case.snake(symbol.name) ) { - this._diagnostic( - declaration.name, - ts.DiagnosticCategory.Error, - `Submodule namespaces must be camelCased or snake_cased. Consider renaming to "${Case.camel( + this._diagnostics.push( + JsiiDiagnostic.JSII_8004_SUBMOULE_NAME_CASING.create( + declaration.name, symbol.name, - )}".`, + ), ); } @@ -713,39 +683,25 @@ export class Assembler implements Emitter { // Make sure the error message always lists causes in the same order const refs = [ - [currNs.name, currNsDecl] as const, - [ns.name, nsDecl] as const, - ].sort(([l], [r]) => l.localeCompare(r)); - - this._diagnostic( - (symbol.valueDeclaration as { name?: ts.Node }).name ?? - symbol.valueDeclaration, - ts.DiagnosticCategory.Error, - `Symbol is re-exported under two distinct submodules (${refs - .map(([name]) => name) - .join(' and ')})`, - [ - { - category: ts.DiagnosticCategory.Warning, - file: refs[0][1].getSourceFile(), - length: - refs[0][1].getEnd() - - refs[0][1].getStart(refs[0][1].getSourceFile()), - messageText: `Symbol is exported under the "${refs[0][0]}" submodule`, - start: refs[0][1].getStart(refs[0][1].getSourceFile()), - code: JSII_DIAGNOSTICS_CODE, - }, - { - category: ts.DiagnosticCategory.Warning, - file: refs[1][1].getSourceFile(), - length: - refs[1][1].getEnd() - - refs[1][1].getStart(refs[1][1].getSourceFile()), - messageText: `Symbol is exported under the "${refs[1][0]}" submodule`, - start: refs[1][1].getStart(refs[1][1].getSourceFile()), - code: JSII_DIAGNOSTICS_CODE, - }, - ], + { decl: currNsDecl, name: currNs.name } as const, + { decl: nsDecl, name: ns.name } as const, + ].sort(({ name: l }, { name: r }) => l.localeCompare(r)); + + this._diagnostics.push( + JsiiDiagnostic.JSII_3003_SYMBOL_IS_EXPORTED_TWICE.create( + (symbol.valueDeclaration as { name?: ts.Node }).name ?? + symbol.valueDeclaration, + refs[0].name, + refs[1].name, + ) + .addRelatedInformation( + refs[0].decl, + `Symbol is exported under the "${refs[0].name}" submodule`, + ) + .addRelatedInformation( + refs[1].decl, + `Symbol is exported under the "${refs[1].name}" submodule`, + ), ); } // Found two re-exports, which is odd, but they use the same submodule, @@ -910,12 +866,8 @@ export class Assembler implements Emitter { } return allTypes; } else { - this._diagnostic( - node, - ts.DiagnosticCategory.Message, - `Ignoring ${ - ts.SyntaxKind[node.kind] - } node (it cannot be represented in the jsii type model)`, + this._diagnostics.push( + JsiiDiagnostic.JSII_9998_UNSUPORTED_NODE.create(node, node.kind), ); } @@ -942,22 +894,16 @@ export class Assembler implements Emitter { submodule.valueDeclaration ?? submodule.declarations[0]; const submoduleDeclName = (submoduleDecl as { name?: ts.Node }).name ?? submoduleDecl; - this._diagnostic( - (node as { name?: ts.Node }).name ?? node, - ts.DiagnosticCategory.Error, - `Submodule "${submodule.name}" conflicts with "${ - jsiiType.name - }". Restricted names are: ${candidates.join(', ')}`, - [ - { - category: ts.DiagnosticCategory.Warning, - code: JSII_DIAGNOSTICS_CODE, - file: submoduleDeclName.getSourceFile(), - length: submoduleDeclName.getEnd() - submoduleDeclName.getStart(), - messageText: 'This is the conflicting submodule declaration.', - start: submoduleDeclName.getStart(), - }, - ], + this._diagnostics.push( + JsiiDiagnostic.JSII_5011_SUBMODULE_NAME_CONFLICT.create( + (node as { name?: ts.Node }).name ?? node, + submodule.name, + jsiiType.name, + candidates, + ).addRelatedInformation( + submoduleDeclName, + `This is the conflicting submodule declaration`, + ), ); } } @@ -984,10 +930,12 @@ export class Assembler implements Emitter { for (const nestedTypes of await Promise.all(visitedNodes)) { for (const nestedType of nestedTypes) { if (nestedType.namespace !== nestedContext.namespace.join('.')) { - this._diagnostic( - node, - ts.DiagnosticCategory.Error, - `All child names of a type '${jsiiType.fqn}' must point to concrete types, but '${nestedType.namespace}' is a namespaces, and this structure cannot be supported in all languages (e.g. Java)`, + this._diagnostics.push( + JsiiDiagnostic.JSII_5012_NAMESPACE_IN_TYPE.create( + (node as { name?: ts.Node }).name ?? node, + jsiiType.fqn, + nestedType.namespace!, + ), ); } } @@ -1013,27 +961,19 @@ export class Assembler implements Emitter { !ts.isModuleDeclaration(decl), // <-- imported types ); if (badDecl != null) { - this._diagnostic( - node, - ts.DiagnosticCategory.Error, - `Illegal "${clauseType(clause.token)}" value for an exported API: ${ - ts.SyntaxKind[badDecl.kind] - }`, + this._diagnostics.push( + JsiiDiagnostic.JSII_3004_INVALID_SUPERTYPE.create( + node, + clause, + badDecl, + ).addRelatedInformation( + badDecl, + `The invalid super type is declared here.`, + ), ); } } } - - function clauseType(token: ts.SyntaxKind): string { - switch (token) { - case ts.SyntaxKind.ExtendsKeyword: - return 'extends'; - case ts.SyntaxKind.ImplementsKeyword: - return 'implements'; - default: - return ts.SyntaxKind[token]; - } - } } private declarationLocation(node: ts.Declaration): spec.SourceLocation { @@ -1079,24 +1019,19 @@ export class Assembler implements Emitter { }); for (const { decl, typeRef } of await Promise.all(typeRefs)) { if (!spec.isNamedTypeReference(typeRef)) { - this._diagnostic( - decl, - ts.DiagnosticCategory.Error, - `Interface of ${fqn} is not a named type (${spec.describeTypeReference( - typeRef, - )})`, + this._diagnostics.push( + JsiiDiagnostic.JSII_3005_TYPE_USED_AS_INTERFACE.create(decl, typeRef), ); continue; } this._deferUntilTypesAvailable(fqn, [typeRef], decl, (deref) => { if (!spec.isInterfaceType(deref)) { - this._diagnostic( - decl, - ts.DiagnosticCategory.Error, - `Inheritance clause of ${fqn} uses ${spec.describeTypeReference( + this._diagnostics.push( + JsiiDiagnostic.JSII_3005_TYPE_USED_AS_INTERFACE.create( + decl, typeRef, - )} as an interface`, + ), ); } }); @@ -1149,11 +1084,7 @@ export class Assembler implements Emitter { const erasedBases = new Array(); for (let base of type.getBaseTypes() ?? []) { if (jsiiType.base) { - this._diagnostic( - base.symbol.valueDeclaration, - ts.DiagnosticCategory.Error, - `Found multiple base types for ${jsiiType.fqn}`, - ); + // Ignoring this - there has already been a compilation error generated by tsc here. continue; } @@ -1184,12 +1115,11 @@ export class Assembler implements Emitter { ); if (!spec.isNamedTypeReference(ref)) { - this._diagnostic( - base.symbol.valueDeclaration, - ts.DiagnosticCategory.Error, - `Base type of ${ - jsiiType.fqn - } is not a named type (${spec.describeTypeReference(ref)})`, + this._diagnostics.push( + JsiiDiagnostic.JSII_3006_TYPE_USED_AS_CLASS.create( + base.symbol.valueDeclaration ?? base.symbol.declarations[0], + ref, + ), ); continue; } @@ -1199,12 +1129,11 @@ export class Assembler implements Emitter { base.symbol.valueDeclaration, (deref) => { if (!spec.isClassType(deref)) { - this._diagnostic( - base.symbol.valueDeclaration, - ts.DiagnosticCategory.Error, - `Base type of ${ - jsiiType.fqn - } is not a class (${spec.describeTypeReference(ref)})`, + this._diagnostics.push( + JsiiDiagnostic.JSII_3006_TYPE_USED_AS_CLASS.create( + base.symbol.valueDeclaration ?? base.symbol.declarations[0], + ref, + ), ); } }, @@ -1228,10 +1157,11 @@ export class Assembler implements Emitter { // Handled by `getBaseTypes` continue; } else if (clause.token !== ts.SyntaxKind.ImplementsKeyword) { - this._diagnostic( - clause, - ts.DiagnosticCategory.Error, - `Ignoring ${ts.SyntaxKind[clause.token]} heritage clause`, + this._diagnostics.push( + JsiiDiagnostic.JSII_9998_UNSUPORTED_NODE.create( + clause, + `Ignoring ${ts.SyntaxKind[clause.token]} heritage clause`, + ), ); continue; } @@ -1260,10 +1190,12 @@ export class Assembler implements Emitter { (...ifaces) => { for (const iface of ifaces) { if (spec.isInterfaceType(iface) && iface.datatype) { - this._diagnostic( - type.symbol.valueDeclaration, - ts.DiagnosticCategory.Error, - `Attempted to implement struct ${iface.fqn} from class ${jsiiType.fqn}`, + this._diagnostics.push( + JsiiDiagnostic.JSII_3007_ILLEGAL_STRUCT_EXTENSION.create( + type.symbol.valueDeclaration ?? type.symbol.declarations[0], + jsiiType, + iface, + ), ); } } @@ -1331,6 +1263,7 @@ export class Assembler implements Emitter { member, jsiiType, ctx.replaceStability(jsiiType.docs?.stability), + classDecl, ); } else if ( ts.isPropertyDeclaration(memberDecl) || @@ -1342,12 +1275,14 @@ export class Assembler implements Emitter { member, jsiiType, ctx.replaceStability(jsiiType.docs?.stability), + classDecl, ); } else { - this._diagnostic( - memberDecl, - ts.DiagnosticCategory.Warning, - `Ignoring un-handled ${ts.SyntaxKind[memberDecl.kind]} member`, + this._diagnostics.push( + JsiiDiagnostic.JSII_9998_UNSUPORTED_NODE.create( + memberDecl, + memberDecl.kind, + ), ); } /* eslint-enable no-await-in-loop */ @@ -1418,7 +1353,12 @@ export class Assembler implements Emitter { !this._isPrivateOrInternal(param) ) { // eslint-disable-next-line no-await-in-loop - await this._visitProperty(param, jsiiType, memberEmitContext); + await this._visitProperty( + param, + jsiiType, + memberEmitContext, + ctorDeclaration.parent, + ); } } } @@ -1431,10 +1371,11 @@ export class Assembler implements Emitter { if (spec.isClassType(baseType)) { jsiiType.initializer = baseType.initializer; } else { - this._diagnostic( - type.symbol.valueDeclaration, - ts.DiagnosticCategory.Error, - `Base type of ${jsiiType.fqn} (${jsiiType.base}) is not a class`, + this._diagnostics.push( + JsiiDiagnostic.JSII_3999_INCOHERENT_TYPE_MODEL.create( + type.symbol.valueDeclaration ?? type.symbol.declarations[0], + `Base type of ${jsiiType.fqn} (${jsiiType.base}) is not a class`, + ), ); } }, @@ -1467,10 +1408,6 @@ export class Assembler implements Emitter { * Check that this class doesn't declare any members that are of different staticness in itself or any of its bases */ private _verifyNoStaticMixing(klass: spec.ClassType, decl: ts.Declaration) { - function stat(s?: boolean) { - return s ? 'static' : 'non-static'; - } - // Check class itself--may have two methods/props with the same name, so check the arrays const statics = new Set( (klass.methods ?? []) @@ -1486,10 +1423,12 @@ export class Assembler implements Emitter { ); // Intersect for (const member of intersect(statics, nonStatics)) { - this._diagnostic( - decl, - ts.DiagnosticCategory.Error, - `member '${member}' of class '${klass.name}' cannot be declared both statically and non-statically`, + this._diagnostics.push( + JsiiDiagnostic.JSII_5013_STATIC_INSTANCE_CONFLICT.create( + decl, + member, + klass, + ), ); } @@ -1504,14 +1443,14 @@ export class Assembler implements Emitter { } if (!!baseMember.static !== !!member.static) { - this._diagnostic( - decl, - ts.DiagnosticCategory.Error, - `${stat(member.static)} member '${name}' of class '${ - klass.name - }' conflicts with ${stat(baseMember.static)} member in ancestor '${ - base.name - }'`, + this._diagnostics.push( + JsiiDiagnostic.JSII_5014_INHERITED_STATIC_CONFLICT.create( + decl, + member, + klass, + baseMember, + base, + ), ); } } @@ -1570,22 +1509,20 @@ export class Assembler implements Emitter { // we only validate if we have a declaration if (validateDeclaration) { if (!hasUnderscorePrefix) { - this._diagnostic( - validateDeclaration.name ?? validateDeclaration, - ts.DiagnosticCategory.Error, - `${colors.cyan( + this._diagnostics.push( + JsiiDiagnostic.JSII_8005_INTERNAL_UNDERSCORE.create( + validateDeclaration.name ?? validateDeclaration, symbol.name, - )}: the name of members marked as @internal must begin with an underscore`, + ), ); } if (!hasInternalJsDocTag) { - this._diagnostic( - validateDeclaration.name ?? validateDeclaration, - ts.DiagnosticCategory.Error, - `${colors.cyan( + this._diagnostics.push( + JsiiDiagnostic.JSII_8006_UNDERSCORE_INTERNAL.create( + validateDeclaration.name ?? validateDeclaration, symbol.name, - )}: members with names that begin with an underscore must be marked as @internal via a JSDoc tag`, + ), ); } } @@ -1624,10 +1561,12 @@ export class Assembler implements Emitter { const decl = symbol.valueDeclaration; const flags = ts.getCombinedModifierFlags(decl); if (flags & ts.ModifierFlags.Const) { - this._diagnostic( - decl, - ts.DiagnosticCategory.Error, - "Exported enum cannot be declared 'const'", + this._diagnostics.push( + JsiiDiagnostic.JSII_1000_NO_CONST_ENUM.create( + (decl as ts.EnumDeclaration).modifiers?.find( + (mod) => mod.kind === ts.SyntaxKind.ConstKeyword, + ) ?? decl, + ), ); } @@ -1664,7 +1603,12 @@ export class Assembler implements Emitter { const result = parseSymbolDocumentation(sym, this._typeChecker); for (const diag of result.diagnostics ?? []) { - this._diagnostic(sym.declarations[0], ts.DiagnosticCategory.Error, diag); + this._diagnostics.push( + JsiiDiagnostic.JSII_7999_DOCUMENTATION_ERROR.create( + sym.valueDeclaration ?? sym.declarations[0], + diag, + ), + ); } // Apply the current context's stability if none was specified locally. @@ -1689,10 +1633,12 @@ export class Assembler implements Emitter { const actualNames = new Set((method.parameters ?? []).map((p) => p.name)); for (const param of params) { if (!actualNames.has(param)) { - this._diagnostic( - methodSym.valueDeclaration, - ts.DiagnosticCategory.Warning, - `In doc block of '${method.name}', '@param ${param}' refers to a nonexistent parameter.`, + this._diagnostics.push( + JsiiDiagnostic.JSII_7000_NON_EXISTENT_PARAMETER.create( + methodSym.valueDeclaration ?? methodSym.declarations[0], + method, + param, + ), ); } } @@ -1763,6 +1709,8 @@ export class Assembler implements Emitter { member, jsiiType, ctx.replaceStability(jsiiType.docs?.stability), + (type.symbol.valueDeclaration ?? + type.symbol.declarations[0]) as ts.InterfaceDeclaration, ); } else if ( ts.isPropertyDeclaration(member.valueDeclaration) || @@ -1774,14 +1722,16 @@ export class Assembler implements Emitter { member, jsiiType, ctx.replaceStability(jsiiType.docs?.stability), + (type.symbol.valueDeclaration ?? + type.symbol.declarations[0]) as ts.InterfaceDeclaration, ); } else { - this._diagnostic( - member.valueDeclaration, - ts.DiagnosticCategory.Warning, - `Ignoring un-handled ${ - ts.SyntaxKind[member.valueDeclaration.kind] - } member`, + const declaration = member.valueDeclaration ?? member.declarations[0]; + this._diagnostics.push( + JsiiDiagnostic.JSII_9998_UNSUPORTED_NODE.create( + declaration, + declaration.kind, + ), ); } } @@ -1810,10 +1760,11 @@ export class Assembler implements Emitter { // If it's not a datatype the name must start with an "I". if (!jsiiType.datatype && !interfaceName) { - this._diagnostic( - (declaration as { name?: ts.Node }).name ?? declaration, - ts.DiagnosticCategory.Error, - `Interface contains behavior: name should be "I${jsiiType.name}"`, + this._diagnostics.push( + JsiiDiagnostic.JSII_8007_BEHAVIORAL_INTERFACE_NAME.create( + (declaration as { name?: ts.Node }).name ?? declaration, + jsiiType.name, + ), ); } @@ -1827,10 +1778,14 @@ export class Assembler implements Emitter { for (const prop of jsiiType.properties ?? []) { if (!prop.immutable) { const p = type.getProperty(prop.name)!; - this._diagnostic( - p.valueDeclaration, - ts.DiagnosticCategory.Error, - `The property '${prop.name}' in data type '${jsiiType.name}' must be 'readonly' since data is passed by-value`, + const declaration: ts.Node & { name?: ts.Node } = + p.valueDeclaration ?? p.declarations[0]; + this._diagnostics.push( + JsiiDiagnostic.JSII_3008_STRUCT_PROPS_MUST_BE_READONLY.create( + declaration.name ?? declaration, + p.name, + jsiiType, + ), ); // force property to be "readonly" since jsii languages will pass this by-value @@ -1845,10 +1800,12 @@ export class Assembler implements Emitter { continue; } if (base.datatype) { - this._diagnostic( - type.symbol.valueDeclaration, - ts.DiagnosticCategory.Error, - `Attempted to extend struct ${base.fqn} from regular interface ${jsiiType.fqn}`, + this._diagnostics.push( + JsiiDiagnostic.JSII_3007_ILLEGAL_STRUCT_EXTENSION.create( + type.symbol.valueDeclaration ?? type.symbol.declarations[0], + jsiiType, + base, + ), ); } } @@ -1868,10 +1825,12 @@ export class Assembler implements Emitter { const baseMembers = memberNames(base); for (const memberName of names) { if (baseMembers.includes(memberName)) { - this._diagnostic( - type.symbol.declarations[0], - ts.DiagnosticCategory.Error, - `Interface declares same member as inherited interface: ${memberName}`, + this._diagnostics.push( + JsiiDiagnostic.JSII_5015_REDECLARED_INTERFACE_MEMBER.create( + type.symbol.valueDeclaration ?? type.symbol.declarations[0], + memberName, + jsiiType, + ), ); } } @@ -1898,6 +1857,7 @@ export class Assembler implements Emitter { symbol: ts.Symbol, type: spec.ClassType | spec.InterfaceType, ctx: EmitContext, + declaringTypeDecl: ts.ClassLikeDeclaration | ts.InterfaceDeclaration, ) { if (LOG.isTraceEnabled()) { LOG.trace( @@ -1914,18 +1874,36 @@ export class Assembler implements Emitter { declaration, ); if (!signature) { - this._diagnostic( - declaration, - ts.DiagnosticCategory.Error, - `Unable to compute signature for ${type.fqn}#${symbol.name}`, + this._diagnostics.push( + JsiiDiagnostic.JSII_9004_UNABLE_TO_COMPUTE_SIGNATURE.create( + declaration, + symbol.name, + type, + ), ); return; } + + if (Case.pascal(type.name) === Case.pascal(symbol.name)) { + this._diagnostics.push( + JsiiDiagnostic.JSII_5019_MEMBER_TYPE_NAME_CONFLICT.create( + declaration.name, + 'method', + symbol, + type, + ).addRelatedInformation( + declaringTypeDecl.name ?? declaringTypeDecl, + `The declaring ${type.kind} is introduced here`, + ), + ); + } + if (isProhibitedMemberName(symbol.name)) { - this._diagnostic( - declaration, - ts.DiagnosticCategory.Error, - `Prohibited member name: ${symbol.name}`, + this._diagnostics.push( + JsiiDiagnostic.JSII_5016_PROHIBITED_MEMBER_NAME.create( + declaration.name, + symbol.name, + ), ); return; } @@ -1980,13 +1958,12 @@ export class Assembler implements Emitter { ); const sharedNames = intersection(propNames, paramNames); - if (sharedNames.size > 0) { - this._diagnostic( - declaration, - ts.DiagnosticCategory.Error, - `Name occurs in both function arguments and in datatype properties, rename one: ${Array.from( - sharedNames, - ).join(', ')}`, + for (const badName of sharedNames) { + this._diagnostics.push( + JsiiDiagnostic.JSII_5017_POSITIONAL_KEYWORD_CONFLICT.create( + declaration, + badName, + ), ); } }, @@ -2018,14 +1995,13 @@ export class Assembler implements Emitter { const reservingLanguages = isReservedName(symbol.name); if (reservingLanguages) { - this._diagnostic( - ts.getNameOfDeclaration(symbol.valueDeclaration) || - symbol.valueDeclaration, - ts.DiagnosticCategory.Warning, - `'${symbol.name}' is a reserved word in ${reservingLanguages.join( - ', ', - )}. Using this name may cause problems ` + - 'when generating language bindings. Consider using a different name.', + this._diagnostics.push( + JsiiDiagnostic.JSII_5018_RESERVED_WORD.create( + ts.getNameOfDeclaration(symbol.valueDeclaration) || + symbol.valueDeclaration, + symbol.name, + reservingLanguages, + ), ); } } @@ -2034,6 +2010,7 @@ export class Assembler implements Emitter { symbol: ts.Symbol, type: spec.ClassType | spec.InterfaceType, ctx: EmitContext, + declaringTypeDecl: ts.ClassLikeDeclaration | ts.InterfaceDeclaration, ) { if (type.properties?.find((p) => p.name === symbol.name)) { /* @@ -2051,22 +2028,40 @@ export class Assembler implements Emitter { )}`, ); } + + const declaration = symbol.valueDeclaration ?? symbol.declarations[0]; + const signature = declaration as + | ts.PropertySignature + | ts.PropertyDeclaration + | ts.AccessorDeclaration + | ts.ParameterPropertyDeclaration; + + if (Case.pascal(type.name) === Case.pascal(symbol.name)) { + this._diagnostics.push( + JsiiDiagnostic.JSII_5019_MEMBER_TYPE_NAME_CONFLICT.create( + signature.name, + 'property', + symbol, + type, + ).addRelatedInformation( + declaringTypeDecl.name ?? declaringTypeDecl, + `The declaring ${type.kind} is introduced here`, + ), + ); + } + if (isProhibitedMemberName(symbol.name)) { - this._diagnostic( - symbol.valueDeclaration, - ts.DiagnosticCategory.Error, - `Prohibited member name: ${symbol.name}`, + this._diagnostics.push( + JsiiDiagnostic.JSII_5016_PROHIBITED_MEMBER_NAME.create( + symbol.valueDeclaration ?? symbol.declarations[0], + symbol.name, + ), ); return; } this._warnAboutReservedWords(symbol); - const signature = symbol.valueDeclaration as - | ts.PropertySignature - | ts.PropertyDeclaration - | ts.AccessorDeclaration - | ts.ParameterPropertyDeclaration; const property: spec.Property = { ...(await this._optionalValue( this._typeChecker.getTypeOfSymbolAtLocation(symbol, signature), @@ -2166,10 +2161,11 @@ export class Assembler implements Emitter { ): Promise { const optionalValue = await this._optionalValue(type, declaration, purpose); if (optionalValue.optional) { - this._diagnostic( - declaration, - ts.DiagnosticCategory.Error, - 'Encountered optional value in location where a plan type reference is expected', + this._diagnostics.push( + JsiiDiagnostic.JSII_3999_INCOHERENT_TYPE_MODEL.create( + declaration, + 'Encountered optional value in location where a plain type reference is expected', + ), ); } return optionalValue.type; @@ -2198,10 +2194,8 @@ export class Assembler implements Emitter { } if (!type.symbol) { - this._diagnostic( - declaration, - ts.DiagnosticCategory.Error, - 'Non-primitive types must have a symbol', + this._diagnostics.push( + JsiiDiagnostic.JSII_1001_TYPE_HAS_NO_SYMBOL.create(declaration), ); return { type: spec.CANONICAL_ANY }; } @@ -2217,10 +2211,8 @@ export class Assembler implements Emitter { if (type.symbol.escapedName === 'Promise') { const typeRef = type as ts.TypeReference; if (!typeRef.typeArguments || typeRef.typeArguments.length !== 1) { - this._diagnostic( - declaration, - ts.DiagnosticCategory.Error, - 'Un-specified promise type (need to specify as Promise)', + this._diagnostics.push( + JsiiDiagnostic.JSII_1002_UNSPECIFIED_PROMISE.create(declaration), ); return { type: spec.CANONICAL_ANY }; } @@ -2253,10 +2245,11 @@ export class Assembler implements Emitter { const count = typeRef.typeArguments ? typeRef.typeArguments.length : 'none'; - this._diagnostic( - declaration, - ts.DiagnosticCategory.Error, - `Array references must have exactly one type argument (found ${count})`, + this._diagnostics.push( + JsiiDiagnostic.JSII_1003_UNSUPPORTED_TYPE.create( + declaration, + `Array references must have exactly one type argument (found ${count})`, + ), ); elementtype = spec.CANONICAL_ANY; } @@ -2281,10 +2274,11 @@ export class Assembler implements Emitter { 'map element type', ); } else { - this._diagnostic( - declaration, - ts.DiagnosticCategory.Error, - 'Only string-indexed map types are supported', + this._diagnostics.push( + JsiiDiagnostic.JSII_1003_UNSUPPORTED_TYPE.create( + declaration, + 'Only string-indexed map types are supported', + ), ); elementtype = spec.CANONICAL_ANY; } @@ -2415,7 +2409,7 @@ export class Assembler implements Emitter { } for (const baseRef of int.interfaces ?? []) { - const base = this._dereference(baseRef, null); + const base = this._dereference(baseRef, undefined); if (!base) { throw new Error( 'Impossible to have unresolvable base in allProperties()', @@ -2448,10 +2442,12 @@ export class Assembler implements Emitter { if (offender == null) { continue; } - this._diagnostic( - node, - ts.DiagnosticCategory.Error, - `Parameter ${current.name} cannot be optional, as it precedes non-optional parameter ${offender.name}`, + this._diagnostics.push( + JsiiDiagnostic.JSII_3009_OPTIONAL_PARAMETER_BEFORE_REQUIRED.create( + node, + current, + offender, + ), ); delete current.optional; } diff --git a/packages/jsii/lib/compiler.ts b/packages/jsii/lib/compiler.ts index a7d445c2bf..2bc0dd615b 100644 --- a/packages/jsii/lib/compiler.ts +++ b/packages/jsii/lib/compiler.ts @@ -5,7 +5,7 @@ import * as log4js from 'log4js'; import * as path from 'path'; import * as ts from 'typescript'; import { Assembler } from './assembler'; -import { EmitResult, Emitter } from './emitter'; +import { Emitter } from './emitter'; import { ProjectInfo } from './project-info'; import * as utils from './utils'; @@ -89,7 +89,7 @@ export class Compiler implements Emitter { * * @param files can be specified to override the standard source code location logic. Useful for example when testing "negatives". */ - public async emit(...files: string[]): Promise { + public async emit(...files: string[]): Promise { await this._prepareForBuild(...files); return this._buildOnce(); } @@ -182,7 +182,7 @@ export class Compiler implements Emitter { /** * Do a single build */ - private async _buildOnce(): Promise { + private async _buildOnce(): Promise { if (!this.compilerHost.getDefaultLibLocation) { throw new Error( 'No default library location was found on the TypeScript compiler host!', @@ -214,7 +214,7 @@ export class Compiler implements Emitter { private async _consumeProgram( program: ts.Program, stdlib: string, - ): Promise { + ): Promise { const emit = program.emit(); let hasErrors = emitHasErrors(emit, this.options.failOnWarnings); const diagnostics = [...emit.diagnostics]; @@ -506,7 +506,7 @@ export interface NonBlockingWatchOptions { * This hook gets invoked when a compilation cycle (complete with Assembler execution) completes. */ readonly compilationComplete: ( - emitResult: EmitResult, + emitResult: ts.EmitResult, ) => void | Promise; } diff --git a/packages/jsii/lib/emitter.ts b/packages/jsii/lib/emitter.ts index d56a6355f7..e917178aaa 100644 --- a/packages/jsii/lib/emitter.ts +++ b/packages/jsii/lib/emitter.ts @@ -9,36 +9,5 @@ export interface Emitter { * * @return the result of attempting to emit stuff. */ - emit(): Promise; -} - -/** - * The result of attempting to emit stuff. - */ -export interface EmitResult extends ts.EmitResult { - /** Diagnostic information created when trying to emit stuff */ - diagnostics: ReadonlyArray; -} - -/** - * A diagnostic message generated while trying to emit stuff. - */ -export interface Diagnostic extends ts.Diagnostic { - /** - * The domain of the diagnostic message. - */ - domain: string; -} - -/** - * Determines if a diagnostic entry has an attached domain or not. - * - * @param diagnostic the entity to be assessed - * - * @returns ``true`` if ``diagnostic`` has a domain. - */ -export function hasDomain( - diagnostic: ts.Diagnostic | Diagnostic, -): diagnostic is Diagnostic { - return !!(diagnostic as Diagnostic).domain; + emit(): Promise; } diff --git a/packages/jsii/lib/index.ts b/packages/jsii/lib/index.ts index c5f595cf9d..08d6d4f268 100644 --- a/packages/jsii/lib/index.ts +++ b/packages/jsii/lib/index.ts @@ -1 +1,2 @@ +export * from './jsii-diagnostic'; export * from './helpers'; diff --git a/packages/jsii/lib/jsii-diagnostic.ts b/packages/jsii/lib/jsii-diagnostic.ts new file mode 100644 index 0000000000..3d22f9ada0 --- /dev/null +++ b/packages/jsii/lib/jsii-diagnostic.ts @@ -0,0 +1,804 @@ +import * as spec from '@jsii/spec'; +import { camel, constant as allCaps, pascal } from 'case'; +import * as ts from 'typescript'; +import { JSII_DIAGNOSTICS_CODE } from './utils'; + +/** + * Descriptors for all valid jsii diagnostic codes. + * + * The `category` or non-error codes can be updated, for example to treat + * warnings as errors, or to suppress certain undesirable warnings. + */ +export class Code< + T extends DiagnosticMessageFormatter = DiagnosticMessageFormatter +> { + private static readonly byCode: { [code: number]: Code } = {}; + private static readonly byName: { [name: string]: Code } = {}; + + /** + * @internal + */ + public static message({ + code, + name, + formatter, + }: { + code: number; + formatter: T; + name: string; + }) { + return new Code(code, name, ts.DiagnosticCategory.Message, formatter); + } + + /** + * @internal + */ + public static suggestion({ + code, + name, + formatter, + }: { + code: number; + formatter: T; + name: string; + }) { + return new Code(code, name, ts.DiagnosticCategory.Suggestion, formatter); + } + + /** + * @internal + */ + public static warning({ + code, + name, + formatter, + }: { + code: number; + formatter: T; + name: string; + }) { + return new Code(code, name, ts.DiagnosticCategory.Warning, formatter); + } + + /** + * @internal + */ + public static error({ + code, + name, + formatter, + }: { + code: number; + formatter: T; + name: string; + }) { + return new Code(code, name, ts.DiagnosticCategory.Error, formatter); + } + + /** + * Get a diagnostic code by code or name. + * + * @param codeOrName the looked up diagnostic code or name. + * + * @returns the JsiiDiagnosticCode instande, if one exists, or `undefined` + * + * @experimental this module is under active development and the error codes + * and names may change in the future. + */ + public static lookup(codeOrName: string | number): Code | undefined { + if (typeof codeOrName === 'number') { + return this.byCode[codeOrName]; + } + return this.byName[codeOrName]; + } + + // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility + readonly #defaultCategory: ts.DiagnosticCategory; + + // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility + #category?: ts.DiagnosticCategory; + + // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility + #formatter: T; + + /** + * Registers a new diagnostic code. + * + * @param code the numeric code for the diagnostic + * @param name the symbolic name for the diagnostic + * @param defaultCategory the default category this diagnostic ransk in + * @param formatter a message formatter for easy creation of diagnostics + */ + private constructor( + public readonly code: number, + public readonly name: string, + defaultCategory: ts.DiagnosticCategory, + formatter: T, + ) { + this.#defaultCategory = defaultCategory; + this.#formatter = formatter; + + if (code in Code.byCode) { + throw new Error( + `Attempted to create two instances of ${this.constructor.name} with code ${code}`, + ); + } + if (name in Code.byName) { + throw new Error( + `Attempted to create two instances of ${this.constructor.name} with name ${name}`, + ); + } + Code.byCode[code] = Code.byName[name] = this; + } + + /** + * Determines whether this diagnostic is a compilation error. Diagnostics + * where this is `true` cannot have their `category` overridden to a lower + * category. + */ + public get isError(): boolean { + return this.#defaultCategory === ts.DiagnosticCategory.Error; + } + + /** + * The diagnostic category this particular code is filed as. + */ + public get category(): ts.DiagnosticCategory { + return this.#category ?? this.#defaultCategory; + } + + /** + * Update the diagnostic category for this particular code. If `isError` is + * `true`, attempting to set anything other than `ts.DiagnosticCategory.Error` + * will result in an error being throw. + * + * @param newValue the new diagnostic category to be used. + */ + public set category(newValue: ts.DiagnosticCategory) { + if (this.isError && newValue !== ts.DiagnosticCategory.Error) { + throw new Error( + `Illegal attempt to override category of error ${this.code} to ${ts.DiagnosticCategory[newValue]}`, + ); + } + this.#category = newValue; + } + + /** + * Creates a new `JsiiDiagnostic` message without any source code location + * data. + * + * @param args the arguments to the message formatter. + * + * @deprecated It is preferred to specify a source code location for problem + * markers. Prefer the use of `create` while providing a value + * for the `location` parameter whenever possible. + */ + public createDetached(...args: Parameters): JsiiDiagnostic { + return new JsiiDiagnostic(this, this.#formatter(...args)); + } + + /** + * Creates a new `JsiiDiagnostic` message with source code location denoted + * by the provided `location` node. + * + * @param location the source code location attachment of the message. + * @param args the arguments to the message formatter. + */ + public create(location: ts.Node, ...args: Parameters): JsiiDiagnostic { + return new JsiiDiagnostic(this, this.#formatter(...args), location); + } +} + +/** + * A jsii-specific diagnostic entry. + */ +export class JsiiDiagnostic implements ts.Diagnostic { + /** + * This symbol unequivocally identifies the `JsiiDiagnostic` domain. + */ + private static readonly DOMAIN = Symbol('jsii'); + + ////////////////////////////////////////////////////////////////////////////// + // 0001 => 0999 -- PACKAGE METADATA PROBLEMS + + public static readonly JSII_0001_PKG_MISSING_DESCRIPTION = Code.suggestion({ + code: 1, + formatter: () => + `A "description" field should be specified in "package.json"`, + name: 'metadata/package-json-missing-description', + }); + + public static readonly JSII_0002_PKG_MISSING_HOMEPAGE = Code.suggestion({ + code: 2, + formatter: () => `A "homepage" field should be specified in "package.json"`, + name: 'metadata/package-json-missing-homepage', + }); + + public static readonly JSII_0003_MISSING_README = Code.warning({ + code: 3, + formatter: () => + `There is no "README.md" file. It is required in order to generate valid PyPI (Python) packages.`, + name: 'metadata/missing-readme', + }); + + public static readonly JSII_0004_COULD_NOT_FIND_ENTRYPOINT = Code.error({ + code: 4, + formatter: (mainFile: string) => `Could not find "main" file: ${mainFile}`, + name: 'metadata/could-not-find-entrypoint', + }); + + public static readonly JSII_0005_MISSING_PEER_DEPENDENCY = Code.warning({ + code: 5, + formatter: (assm: string, reference: string) => + `The type "${reference}" is exposed in the public API of this module. ` + + `Therefore, the module "${assm}" must also be defined under "peerDependencies". ` + + 'This will be auto-corrected unless --no-fix-peer-dependencies was specified.', + name: 'metadata/missing-peer-dependency', + }); + + ////////////////////////////////////////////////////////////////////////////// + // 1000 => 1999 -- TYPESCRIPT LANGUAGE RESTRICTIONS + + public static readonly JSII_1000_NO_CONST_ENUM = Code.error({ + code: 1000, + formatter: () => `Exported "const enum" declarations are not allowed`, + name: 'typescript-restrictions/no-const-enum', + }); + + public static readonly JSII_1001_TYPE_HAS_NO_SYMBOL = Code.error({ + code: 1001, + formatter: () => + `Non-primitive types without a symbol cannot be processed.`, + name: 'typescript-restrictions/type-has-no-symbol', + }); + + public static readonly JSII_1002_UNSPECIFIED_PROMISE = Code.error({ + code: 1002, + formatter: () => `Un-specified promise type. Specify it using "Promise"`, + name: 'typescript-restrictions/unspecified-promise', + }); + + public static readonly JSII_1003_UNSUPPORTED_TYPE = Code.error({ + code: 1003, + formatter: (messageText) => messageText, + name: 'typescript-restrictions/unsupported-type', + }); + + ////////////////////////////////////////////////////////////////////////////// + // 2000 => 2999 -- RESERVED + + ////////////////////////////////////////////////////////////////////////////// + // 3000 => 3999 -- TYPE MODEL COHERENCE + + public static readonly JSII_3000_EXPORTED_API_USES_HIDDEN_TYPE = Code.error({ + code: 3000, + formatter: (badFqn) => + `Exported APIs cannot use un-exported type "${badFqn}"`, + name: 'type-model/exported-api-cannot-use-unexported-type', + }); + + public static readonly JSII_3001_EXPOSED_INTERNAL_TYPE = Code.error({ + code: 3001, + formatter: (symbol: ts.Symbol, isThisType: boolean, typeUse: string) => + `Type ${ + isThisType ? `"this" (aka: "${symbol.name}")` : `"${symbol.name}"` + } cannot be used as the ${typeUse} because it is private or @internal`, + name: 'type-model/use-of-internal-type', + }); + + public static readonly JSII_3002_USE_OF_UNEXPORTED_FOREIGN_TYPE = Code.error({ + code: 3002, + formatter: (fqn: string, typeUse: string, pkg: spec.Assembly) => + `Type "${fqn}" cannot be used as a ${typeUse} because it is not exported from ${pkg.name}`, + name: 'type-model/unexported-foreign-type', + }); + + public static readonly JSII_3003_SYMBOL_IS_EXPORTED_TWICE = Code.error({ + code: 3003, + formatter: (ns1: string, ns2: string) => + `Symbol is exported under two distinct submodules: ${ns1} and ${ns2}`, + name: 'type-model/symbol-is-exported-twice', + }); + + public static readonly JSII_3004_INVALID_SUPERTYPE = Code.error({ + code: 3004, + formatter: (clause: ts.HeritageClause, badDeclaration: ts.Declaration) => { + return `Illegal ${clauseType(clause.token)} clause for an exported API: ${ + ts.SyntaxKind[badDeclaration.kind] + }`; + + function clauseType(token: ts.SyntaxKind): string { + switch (token) { + case ts.SyntaxKind.ExtendsKeyword: + return 'extends'; + case ts.SyntaxKind.ImplementsKeyword: + return 'implements'; + default: + return ts.SyntaxKind[token]; + } + } + }, + name: 'type-model/invalid-supertype', + }); + + public static readonly JSII_3005_TYPE_USED_AS_INTERFACE = Code.error({ + code: 3005, + formatter: (badType: spec.TypeReference) => + `Type "${spec.describeTypeReference( + badType, + )}" cannot be used as an interface`, + name: 'type-model/type-used-as-interface', + }); + + public static readonly JSII_3006_TYPE_USED_AS_CLASS = Code.error({ + code: 3006, + formatter: (badType: spec.TypeReference) => + `Type "${spec.describeTypeReference(badType)}" cannot be used as a class`, + name: 'type-model/type-used-as-class', + }); + + public static readonly JSII_3007_ILLEGAL_STRUCT_EXTENSION = Code.error({ + code: 3007, + formatter: (offender: spec.Type, struct: spec.InterfaceType) => + `Attempt to extend or implement struct "${struct.fqn}" from "${offender.fqn}"`, + name: 'type-model/illegal-struct-extension', + }); + + public static readonly JSII_3008_STRUCT_PROPS_MUST_BE_READONLY = Code.error({ + code: 3008, + formatter: (propName: string, struct: spec.InterfaceType) => + `The "${propName}" property of struct "${struct.fqn}" must be "readonly". Rename "${struct.fqn}" to "I${struct.name}" if it is meant to be a behavioral interface.`, + name: 'type-model/struct-props-must-be-readonly', + }); + + public static readonly JSII_3009_OPTIONAL_PARAMETER_BEFORE_REQUIRED = Code.error( + { + code: 3009, + formatter: (param: spec.Parameter, nextParam: spec.Parameter) => + `Parameter "${param.name}" cannot be optional, as it precedes required parameter "${nextParam.name}"`, + name: 'type-model/optional-parameter-before-required', + }, + ); + + public static readonly JSII_3999_INCOHERENT_TYPE_MODEL = Code.error({ + code: 3999, + formatter: (messageText) => messageText, + name: 'type-model/incoherent-type-model', + }); + + ////////////////////////////////////////////////////////////////////////////// + // 4000 => 4999 -- RESERVED + + ////////////////////////////////////////////////////////////////////////////// + // 5000 => 5999 -- LANGUAGE COMPATIBILITY ERRORS + + public static readonly JSII_5000_JAVA_GETTERS = Code.error({ + code: 5000, + formatter: (badName: string, typeName: string) => + `Methods and properties cannot have names like "getXxx": those conflict with Java property getters. Rename "${typeName}.${badName}"`, + name: 'language-compatibility/potential-java-getter-conflict', + }); + + public static readonly JSII_5001_JAVA_SETTERS = Code.error({ + code: 5001, + formatter: (badName: string, typeName: string) => + `Methods and properties cannot have names like "setXxx": those conflict with Java property setters. Rename "${typeName}.${badName}"`, + name: 'language-compatibility/potential-java-setter-conflict', + }); + + public static readonly JSII_5002_OVERRIDE_CHANGES_VISIBILITY = Code.error({ + code: 5002, + formatter: ( + newElement: string, + action: string, + newValue: 'protected' | 'public', + oldValue: 'protected' | 'public', + ) => + `"${newElement}" changes visibility to ${newValue} when ${action}. Change it to ${oldValue}`, + name: 'language-compatibility/override-changes-visibility', + }); + + public static readonly JSII_5003_OVERRIDE_CHANGES_RETURN_TYPE = Code.error({ + code: 5003, + formatter: ( + newElement: string, + action: string, + newValue: string, + oldValue: string, + ) => + `"${newElement}" changes the return type to "${newValue}" when ${action}. Change it to "${oldValue}"`, + name: 'language-compatibility/override-changes-return-type', + }); + + public static readonly JSII_5004_OVERRIDE_CHANGES_PROP_TYPE = Code.error({ + code: 5004, + formatter: ( + newElement: string, + action: string, + newType: spec.TypeReference, + oldType: spec.TypeReference, + ) => + `"${newElement}" changes the property type to "${spec.describeTypeReference( + newType, + )}" when ${action}. Change it to "${spec.describeTypeReference( + oldType, + )}"`, + name: 'language-compatibility/override-changes-property-type', + }); + + public static readonly JSII_5005_OVERRIDE_CHANGES_PARAM_COUNT = Code.error({ + code: 5005, + formatter: ( + newElement: string, + action: string, + newCount: number, + oldCount: number, + ) => + `"${newElement}" has ${newCount} parameters when ${action}. It should accept ${oldCount} parameters`, + name: 'language-compatibility/override-changes-param-count', + }); + + public static readonly JSII_5006_OVERRIDE_CHANGES_PARAM_TYPE = Code.error({ + code: 5006, + formatter: ( + newElement: string, + action: string, + newParam: spec.Parameter, + oldParam: spec.Parameter, + ) => + `"${newElement}" changes the type of parameter "${ + newParam.name + }" to ${spec.describeTypeReference( + newParam.type, + )} when ${action}. Change it to ${spec.describeTypeReference( + oldParam.type, + )}`, + name: 'language-compatibility/override-changes-param-type', + }); + + public static readonly JSII_5007_OVERRIDE_CHANGES_VARIADIC = Code.error({ + code: 5007, + formatter: ( + newElement: string, + action: string, + newVariadic = false, + oldVariadic = false, + ) => + `"${newElement}" turns ${ + newVariadic ? 'variadic' : 'non variadic' + } when ${action}. Make it ${oldVariadic ? 'variadic' : 'non-variadic'}`, + name: 'language-compatibility/override-changes-variadic', + }); + + public static readonly JSII_5008_OVERRIDE_CHANGES_PARAM_OPTIONAL = Code.error( + { + code: 5008, + formatter: ( + newElement: string, + action: string, + newParam: spec.Parameter, + oldParam: spec.Parameter, + ) => + `"${newElement}" turns parameter "${newParam.name}" ${ + newParam.optional ? 'optional' : 'required' + } when ${action}. Make it ${ + oldParam.optional ? 'optional' : 'required' + }`, + name: 'language-compatibility/override-changes-param-optional', + }, + ); + + public static readonly JSII_5009_OVERRIDE_CHANGES_PROP_OPTIONAL = Code.error({ + code: 5009, + formatter: ( + newElement: string, + action: string, + newOptional = false, + oldOptional = false, + ) => + `"${newElement}" turns ${ + newOptional ? 'optional' : 'required' + } when ${action}. Make it ${oldOptional ? 'optional' : 'required'}`, + name: 'language-compatibility/override-changes-prop-optional', + }); + + public static readonly JSII_5010_OVERRIDE_CHANGES_MUTABILITY = Code.error({ + code: 5010, + formatter: ( + newElement: string, + action: string, + newMutable = false, + oldMutable = false, + ) => + `"${newElement}" turns ${ + newMutable ? 'mutable' : 'readonly' + } when ${action}. Make it ${oldMutable ? 'mutable' : 'readonly'}`, + name: 'language-compatibility/override-changes-mutability', + }); + + public static readonly JSII_5011_SUBMODULE_NAME_CONFLICT = Code.error({ + code: 5011, + formatter: ( + submoduleName: string, + typeName: string, + reserved: readonly string[], + ) => + `Submodule "${submoduleName}" conflicts with "${typeName}, as different languages could represent it as: ${reserved + .map((x) => `"${x}"`) + .join(', ')}"`, + name: 'language-compatibility/submodule-name-conflicts', + }); + + public static readonly JSII_5012_NAMESPACE_IN_TYPE = Code.error({ + code: 5012, + formatter: (typeName: string, namespaceName: string) => + `All entities nested under a type (e.g: "${typeName}") must be concrete types, but "${namespaceName}" is a namespace. This structure cannot be supported in all languages (e.g: Java)`, + name: 'language-compatibility/namespace-in-type', + }); + + public static readonly JSII_5013_STATIC_INSTANCE_CONFLICT = Code.error({ + code: 5013, + formatter: (member: string, type: spec.ClassType) => + `Member "${member}" of class "${type.fqn}" has both a static and an instance delcaration`, + name: 'language-compatibility/static-instance-conflict', + }); + + public static readonly JSII_5014_INHERITED_STATIC_CONFLICT = Code.error({ + code: 5014, + formatter: ( + member: spec.Method | spec.Property, + type: spec.ClassType, + baseMember: spec.Method | spec.Property, + baseType: spec.ClassType, + ) => + `${member.static ? 'Static' : 'Instance'} member "${ + member.name + }" of class "${type.fqn}" conflicts with ${ + baseMember.static ? 'static' : 'instance' + } member in ancestor "${baseType.fqn}"`, + name: 'language-compatibility/inherited-static-conflict', + }); + + public static readonly JSII_5015_REDECLARED_INTERFACE_MEMBER = Code.error({ + code: 5015, + formatter: (memberName: string, iface: spec.InterfaceType) => + `Interface "${iface.fqn}" re-declares member "${memberName}". This is not supported as it results in invalid C#.`, + name: 'language-compatibility/redeclared-interface-member', + }); + + public static readonly JSII_5016_PROHIBITED_MEMBER_NAME = Code.error({ + code: 5016, + formatter: (badName: string) => + `Members cannot be named "${badName}" as it conflicts with synthetic declarations in some languages.`, + name: 'language-compatibility/prohibited-member-name', + }); + + public static readonly JSII_5017_POSITIONAL_KEYWORD_CONFLICT = Code.error({ + code: 5017, + formatter: (badName: string) => + `Parameter name "${badName}" is also the name of a property in a struct parameter. Rename the positional parameter.`, + name: 'language-compatibility/positional-keyword-conflict', + }); + + public static readonly JSII_5018_RESERVED_WORD = Code.warning({ + code: 5018, + formatter: (badName: string, languages: readonly string[]) => + `"${badName}" is a reserved word in ${languages.join( + ', ', + )}. Using this name may cause problems when generating language bindings. Consider a different name.`, + name: 'language-compatibility/reserved-word', + }); + + public static readonly JSII_5019_MEMBER_TYPE_NAME_CONFLICT = Code.warning({ + code: 5019, + formatter: ( + memberKind: 'method' | 'property', + memberSymbol: ts.Symbol, + declaringType: spec.Type, + ) => + `The ${memberKind} name "${memberSymbol.name}" conflicts with the declaring ${declaringType.kind} "${declaringType.name}". This will result in renaming the ${declaringType.kind} to "_${declaringType.name}" in C#. Consider renaming "${memberSymbol.name}".`, + name: 'language-compatibility/member-name-conflicts-with-type-name', + }); + + ////////////////////////////////////////////////////////////////////////////// + // 6000 => 6999 -- RESERVED + + ////////////////////////////////////////////////////////////////////////////// + // 7000 => 7999 -- DOCUMENTATION ERRORS + + public static readonly JSII_7000_NON_EXISTENT_PARAMETER = Code.warning({ + code: 7000, + formatter: (method: spec.Method, param: string) => + `Documentation for method "${method.name}" refers to non-existent @param "${param}"`, + name: 'documentation/non-existent-parameter', + }); + + public static readonly JSII_7999_DOCUMENTATION_ERROR = Code.error({ + code: 7999, + formatter: (messageText) => messageText, + name: 'documentation/documentation-error', + }); + + ////////////////////////////////////////////////////////////////////////////// + // 8000 => 8999 -- JSII STYLE ENFORCEMENT + + public static readonly JSII_8000_PASCAL_CASED_TYPE_NAMES = Code.error({ + code: 8000, + formatter: (badName: string) => + `Type names must be CamelCased. Rename "${badName}" to "${pascal( + badName, + )}"`, + name: 'code-style/type-names-must-use-pascal-case', + }); + + public static readonly JSII_8001_ALL_CAPS_ENUM_MEMBERS = Code.error({ + code: 8001, + formatter: (badName: string, typeName: string) => + `Enum members must be ALL_CAPS. Rename "${typeName}.${badName}" to "${allCaps( + badName, + )}"`, + name: 'code-style/enum-members-must-use-all-caps', + }); + + public static readonly JSII_8002_CAMEL_CASED_MEMBERS = Code.error({ + code: 8002, + formatter: (badName: string, typeName: string) => + `Method and property (unless they are static readonly) names must use camelCase. Rename "${typeName}.${badName}" to "${camel( + badName, + )}"`, + name: 'code-style/member-names-must-use-camel-case', + }); + + public static readonly JSII_8003_STATIC_CONST_CASING = Code.error({ + code: 8003, + formatter: (badName: string, typeName: string) => + `Static constant names must use ALL_CAPS, PascalCase, or camelCase. Rename "${typeName}.${badName}" to "${allCaps( + badName, + )}"`, + name: 'code-style/static-readonly-property-casing', + }); + + public static readonly JSII_8004_SUBMOULE_NAME_CASING = Code.error({ + code: 8004, + formatter: (badName: string) => + `Submodule namespaces must be camelCased or snake_cased. Rename "${badName}" to ${camel( + badName, + )}`, + name: 'code-style/submodule-name-casing', + }); + + public static readonly JSII_8005_INTERNAL_UNDERSCORE = Code.error({ + code: 8005, + formatter: (badName: string) => + `Members marked with @internal must have a name starting with "_". Rename "${badName}" to "_${badName}"`, + name: 'code-style/internal-members-underscore-prefix', + }); + + public static readonly JSII_8006_UNDERSCORE_INTERNAL = Code.error({ + code: 8006, + formatter: (badName: string) => + `Members with a name starting with "_" (e.g: "${badName}") must be marked @internal`, + name: 'code-style/underscored-members-must-be-internal', + }); + + public static readonly JSII_8007_BEHAVIORAL_INTERFACE_NAME = Code.error({ + code: 8007, + formatter: (badName: string) => + `Interface contains behavior. Rename "${badName}" to "I${badName}"`, + name: 'code-style/behavioral-interface-name', + }); + + ////////////////////////////////////////////////////////////////////////////// + // 9000 => 9999 -- SURPRISING ERRORS & INFORMATIONAL MESSAGES + + public static readonly JSII_9000_UNKNOWN_MODULE = Code.error({ + code: 9000, + formatter: (moduleName) => `Encountered unknown module: "${moduleName}"`, + name: 'miscellaneous/unknown-module', + }); + + public static readonly JSII_9001_TYPE_NOT_FOUND = Code.error({ + code: 9001, + formatter: (typeRef: spec.NamedTypeReference) => + `Type not found in the corresponding assembly: "${typeRef.fqn}"`, + name: 'miscellaneous/type-not-found', + }); + + public static readonly JSII_9002_UNRESOLVEABLE_TYPE = Code.error({ + code: 9002, + formatter: (reference: string) => + `Unable to resolve type "${reference}". It may be @iternal or not exported from the module's entry point (as configured in "package.json" as "main").`, + name: 'miscellaneous/unresolveable-type', + }); + + public static readonly JSII_9003_UNRESOLVEABLE_MODULE = Code.error({ + code: 9003, + formatter: (location: string) => + `Unable to resolve module location "${location}"`, + name: 'miscellaneous/unresolveable-module', + }); + + public static readonly JSII_9004_UNABLE_TO_COMPUTE_SIGNATURE = Code.error({ + code: 9004, + formatter: (methodName: string, type: spec.Type) => + `Unable to compute signature for method "${methodName}" of "${type.fqn}"`, + name: 'miscellaneous/unable-to-compute-signature', + }); + + public static readonly JSII_9998_UNSUPORTED_NODE = Code.message({ + code: 9998, + formatter: (kindOrMessage: ts.SyntaxKind | string) => + typeof kindOrMessage === 'string' + ? kindOrMessage + : `Unsupported ${ts.SyntaxKind[kindOrMessage]} node. This declaration will not be accessible from other languages.`, + name: 'miscellaneous/unsupported-node', + }); + + private static readonly JSII_9999_RELATED_INFO = Code.suggestion({ + code: 9999, + formatter: (messageText) => messageText, + name: 'miscellaneous/related-info', + }); + + ////////////////////////////////////////////////////////////////////////////// + + /** + * Determines whether a `Diagnostic` instance is a `JsiiDiagnostic` or not. + * @param diag + */ + public static isJsiiDiagnostic(diag: ts.Diagnostic): diag is JsiiDiagnostic { + return ( + ((diag as unknown) as JsiiDiagnostic).domain === JsiiDiagnostic.DOMAIN + ); + } + + private readonly domain = JsiiDiagnostic.DOMAIN; + + public readonly category: ts.DiagnosticCategory; + public readonly code: number = JSII_DIAGNOSTICS_CODE; + public readonly jsiiCode: number; + public readonly messageText: string | ts.DiagnosticMessageChain; + + public readonly file: ts.SourceFile | undefined; + public readonly start: number | undefined; + public readonly length: number | undefined; + + public readonly relatedInformation = new Array< + ts.DiagnosticRelatedInformation + >(); + + /** + * Creates a new `JsiiDiagnostic` with the provided properties. + * + * @internal + */ + public constructor( + code: Code, + messageText: string | ts.DiagnosticMessageChain, + location?: ts.Node, + ) { + this.category = code.category; + this.jsiiCode = code.code; + this.messageText = messageText; + + if (location != null) { + this.file = location.getSourceFile(); + this.start = location.getStart(this.file); + this.length = location.getEnd() - this.start; + } + } + + public addRelatedInformation( + node: ts.Node, + message: JsiiDiagnostic['messageText'], + ): this { + this.relatedInformation.push( + JsiiDiagnostic.JSII_9999_RELATED_INFO.create(node, message), + ); + return this; + } +} + +export type DiagnosticMessageFormatter = ( + ...args: any[] +) => JsiiDiagnostic['messageText']; diff --git a/packages/jsii/lib/utils.ts b/packages/jsii/lib/utils.ts index 317500ce83..cd190c0017 100644 --- a/packages/jsii/lib/utils.ts +++ b/packages/jsii/lib/utils.ts @@ -1,6 +1,8 @@ import * as log4js from 'log4js'; import * as ts from 'typescript'; +import { JsiiDiagnostic } from './jsii-diagnostic'; + /** * Name of the logger for diagnostics information */ @@ -47,7 +49,18 @@ export function diagnosticsLogger( } } -export function logDiagnostic(diagnostic: ts.Diagnostic, projectRoot: string) { +/** + * Formats a diagnostic message with color and context, if possible. + * + * @param diagnostic the diagnostic message ot be formatted. + * @param projectRoot the root of the TypeScript project. + * + * @returns a formatted string. + */ +export function formatDiagnostic( + diagnostic: ts.Diagnostic, + projectRoot: string, +) { const formatDiagnosticsHost: ts.FormatDiagnosticsHost = { getCurrentDirectory: () => projectRoot, getCanonicalFileName: (fileName) => fileName, @@ -60,13 +73,25 @@ export function logDiagnostic(diagnostic: ts.Diagnostic, projectRoot: string) { [diagnostic], formatDiagnosticsHost, ) - : ts.formatDiagnostics([diagnostic], formatDiagnosticsHost); + : ts.formatDiagnostic(diagnostic, formatDiagnosticsHost); + + if (!JsiiDiagnostic.isJsiiDiagnostic(diagnostic)) { + return message; + } + // This is our own diagnostics, so we'll format appropriately (replacing TS#### with JSII####). + return message.replace( + ` TS${JSII_DIAGNOSTICS_CODE}: `, + ` JSII${diagnostic.jsiiCode}: `, + ); +} + +export function logDiagnostic(diagnostic: ts.Diagnostic, projectRoot: string) { const logFunc = diagnosticsLogger(log4js.getLogger(DIAGNOSTICS), diagnostic); if (!logFunc) { return; } - logFunc(message.trim()); + logFunc(formatDiagnostic(diagnostic, projectRoot).trim()); } const PERSON_REGEX = /^\s*(.+?)(?:\s*<([^>]+)>)?(?:\s*\(([^)]+)\))?\s*$/; diff --git a/packages/jsii/lib/validator.ts b/packages/jsii/lib/validator.ts index aedaa7d771..2092126065 100644 --- a/packages/jsii/lib/validator.ts +++ b/packages/jsii/lib/validator.ts @@ -1,27 +1,28 @@ import * as Case from 'case'; import * as spec from '@jsii/spec'; import * as ts from 'typescript'; -import { Diagnostic, EmitResult, Emitter } from './emitter'; +import { Emitter } from './emitter'; +import { JsiiDiagnostic } from './jsii-diagnostic'; import { ProjectInfo } from './project-info'; -// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports -const deepEqual = require('deep-equal'); +// eslint-disable-next-line @typescript-eslint/no-require-imports +import deepEqual = require('deep-equal'); export class Validator implements Emitter { public static VALIDATIONS: ValidationFunction[] = _defaultValidations(); - private _diagnostics: Diagnostic[] = []; + private _diagnostics = new Array(); public constructor( public readonly projectInfo: ProjectInfo, public readonly assembly: spec.Assembly, ) {} - public async emit(): Promise { + public async emit(): Promise { this._diagnostics = []; for (const validation of Validator.VALIDATIONS) { - validation(this, this.assembly, this._diagnostic.bind(this)); + validation(this, this.assembly, (diag) => this._diagnostics.push(diag)); } try { @@ -36,24 +37,9 @@ export class Validator implements Emitter { delete this._diagnostics; } } - - private _diagnostic(category: ts.DiagnosticCategory, messageText: string) { - this._diagnostics.push({ - domain: 'JSII', - category, - code: 0, - messageText, - file: undefined, - start: undefined, - length: undefined, - }); - } } -export type DiagnosticEmitter = ( - category: ts.DiagnosticCategory, - messageText: string, -) => void; +export type DiagnosticEmitter = (diag: JsiiDiagnostic) => void; export type ValidationFunction = ( validator: Validator, assembly: spec.Assembly, @@ -79,8 +65,9 @@ function _defaultValidations(): ValidationFunction[] { for (const type of _allTypes(assembly)) { if (type.name !== Case.pascal(type.name)) { diagnostic( - ts.DiagnosticCategory.Error, - `Type names must use PascalCase: ${type.name}`, + JsiiDiagnostic.JSII_8000_PASCAL_CASED_TYPE_NAMES.createDetached( + type.name, + ), ); } } @@ -99,8 +86,10 @@ function _defaultValidations(): ValidationFunction[] { for (const member of type.members) { if (member.name && member.name !== Case.constant(member.name)) { diagnostic( - ts.DiagnosticCategory.Error, - `Enum members must use ALL_CAPS: ${member.name}`, + JsiiDiagnostic.JSII_8001_ALL_CAPS_ENUM_MEMBERS.createDetached( + member.name, + type.fqn, + ), ); } } @@ -112,14 +101,16 @@ function _defaultValidations(): ValidationFunction[] { assembly: spec.Assembly, diagnostic: DiagnosticEmitter, ) { - for (const member of _allMembers(assembly)) { + for (const { member, type } of _allMembers(assembly)) { if (member.static && (member as spec.Property).const) { continue; } if (member.name && member.name !== Case.camel(member.name)) { diagnostic( - ts.DiagnosticCategory.Error, - `Method and non-static non-readonly property names must use camelCase: ${member.name}`, + JsiiDiagnostic.JSII_8002_CAMEL_CASED_MEMBERS.createDetached( + member.name, + type.fqn, + ), ); } } @@ -130,7 +121,7 @@ function _defaultValidations(): ValidationFunction[] { assembly: spec.Assembly, diagnostic: DiagnosticEmitter, ) { - for (const member of _allMembers(assembly)) { + for (const { member, type } of _allMembers(assembly)) { if (!member.static || !(member as spec.Property).const) { continue; } @@ -141,8 +132,10 @@ function _defaultValidations(): ValidationFunction[] { member.name !== Case.camel(member.name) ) { diagnostic( - ts.DiagnosticCategory.Error, - `Static constant names must use TRUMP_CASE, PascalCase or camelCase: ${member.name}`, + JsiiDiagnostic.JSII_8003_STATIC_CONST_CASING.createDetached( + member.name, + type.name, + ), ); } } @@ -153,7 +146,7 @@ function _defaultValidations(): ValidationFunction[] { assembly: spec.Assembly, diagnostic: DiagnosticEmitter, ) { - for (const member of _allMembers(assembly)) { + for (const { member, type } of _allMembers(assembly)) { if (!member.name) { continue; } @@ -163,16 +156,20 @@ function _defaultValidations(): ValidationFunction[] { _isEmpty((member as spec.Method).parameters) ) { diagnostic( - ts.DiagnosticCategory.Error, - 'Methods and properties cannot have names like getXxx() - those conflict with Java property getters by the same name', + JsiiDiagnostic.JSII_5000_JAVA_GETTERS.createDetached( + member.name, + type.name, + ), ); } else if ( snakeName.startsWith('set_') && ((member as spec.Method).parameters ?? []).length === 1 ) { diagnostic( - ts.DiagnosticCategory.Error, - 'Methods and properties cannot have names like setXxx() - those conflict with Java property setters by the same name', + JsiiDiagnostic.JSII_5001_JAVA_SETTERS.createDetached( + member.name, + type.name, + ), ); } } @@ -188,8 +185,9 @@ function _defaultValidations(): ValidationFunction[] { if (assembly.name === assm) { if (!(typeRef.fqn in (assembly.types ?? {}))) { diagnostic( - ts.DiagnosticCategory.Error, - `Exported APIs cannot use un-exported type ${typeRef.fqn}`, + JsiiDiagnostic.JSII_3000_EXPORTED_API_USES_HIDDEN_TYPE.createDetached( + typeRef.fqn, + ), ); } continue; @@ -199,15 +197,13 @@ function _defaultValidations(): ValidationFunction[] { ); if (!foreignAssm) { diagnostic( - ts.DiagnosticCategory.Error, - `Type reference is rooted in unknown module: ${assm}`, + JsiiDiagnostic.JSII_9000_UNKNOWN_MODULE.createDetached(assm), ); continue; } if (!(typeRef.fqn in (foreignAssm.types ?? {}))) { diagnostic( - ts.DiagnosticCategory.Error, - `Type reference not found in ${assm}: ${typeRef.fqn}`, + JsiiDiagnostic.JSII_9001_TYPE_NOT_FOUND.createDetached(typeRef), ); } } @@ -396,24 +392,36 @@ function _defaultValidations(): ValidationFunction[] { const expVisibility = expected.protected ? 'protected' : 'public'; const actVisibility = actual.protected ? 'protected' : 'public'; diagnostic( - ts.DiagnosticCategory.Error, - `${label} changes visibility when ${action} (expected ${expVisibility}, found ${actVisibility})`, + JsiiDiagnostic.JSII_5002_OVERRIDE_CHANGES_VISIBILITY.createDetached( + label, + action, + actVisibility, + expVisibility, + ), ); } if (!deepEqual(actual.returns, expected.returns)) { const expType = spec.describeTypeReference(expected.returns?.type); const actType = spec.describeTypeReference(actual.returns?.type); diagnostic( - ts.DiagnosticCategory.Error, - `${label} changes the return type when ${action} (expected ${expType}, found ${actType})`, + JsiiDiagnostic.JSII_5003_OVERRIDE_CHANGES_RETURN_TYPE.createDetached( + label, + action, + actType, + expType, + ), ); } const expectedParams = expected.parameters ?? []; const actualParams = actual.parameters ?? []; if (expectedParams.length !== actualParams.length) { diagnostic( - ts.DiagnosticCategory.Error, - `${label} changes argument count when ${action} (expected ${expectedParams.length}, found ${actualParams.length})`, + JsiiDiagnostic.JSII_5005_OVERRIDE_CHANGES_PARAM_COUNT.createDetached( + label, + action, + actualParams.length, + expectedParams.length, + ), ); return; } @@ -421,28 +429,34 @@ function _defaultValidations(): ValidationFunction[] { const expParam = expectedParams[i]; const actParam = actualParams[i]; if (!deepEqual(expParam.type, actParam.type)) { - const expType = spec.describeTypeReference(expParam.type); - const actType = spec.describeTypeReference(actParam.type); diagnostic( - ts.DiagnosticCategory.Error, - `${label} changes type of argument ${actParam.name} when ${action} (expected ${expType}, found ${actType}`, + JsiiDiagnostic.JSII_5006_OVERRIDE_CHANGES_PARAM_TYPE.createDetached( + label, + action, + actParam, + expParam, + ), ); } // Not-ing those to force the values to a strictly boolean context (they're optional, undefined means false) if (expParam.variadic !== actParam.variadic) { diagnostic( - ts.DiagnosticCategory.Error, - `${label} changes the variadicity of parameter ${ - actParam.name - } when ${action} (expected ${!!expParam.variadic}, found ${!!actParam.variadic})`, + JsiiDiagnostic.JSII_5007_OVERRIDE_CHANGES_VARIADIC.createDetached( + label, + action, + actParam.variadic, + expParam.variadic, + ), ); } if (expParam.optional !== actParam.optional) { diagnostic( - ts.DiagnosticCategory.Error, - `${label} changes the optionality of paramerter ${ - actParam.name - } when ${action} (expected ${!!expParam.optional}, found ${!!actParam.optional})`, + JsiiDiagnostic.JSII_5008_OVERRIDE_CHANGES_PARAM_OPTIONAL.createDetached( + label, + action, + actParam, + expParam, + ), ); } } @@ -458,28 +472,42 @@ function _defaultValidations(): ValidationFunction[] { const expVisibility = expected.protected ? 'protected' : 'public'; const actVisibility = actual.protected ? 'protected' : 'public'; diagnostic( - ts.DiagnosticCategory.Error, - `${label} changes visibility when ${action} (expected ${expVisibility}, found ${actVisibility})`, + JsiiDiagnostic.JSII_5002_OVERRIDE_CHANGES_VISIBILITY.createDetached( + label, + action, + actVisibility, + expVisibility, + ), ); } if (!deepEqual(expected.type, actual.type)) { - const expType = spec.describeTypeReference(expected.type); - const actType = spec.describeTypeReference(actual.type); diagnostic( - ts.DiagnosticCategory.Error, - `${label} changes the type of property when ${action} (expected ${expType}, found ${actType})`, + JsiiDiagnostic.JSII_5004_OVERRIDE_CHANGES_PROP_TYPE.createDetached( + label, + action, + actual.type, + expected.type, + ), ); } if (expected.immutable !== actual.immutable) { diagnostic( - ts.DiagnosticCategory.Error, - `${label} changes immutability of property when ${action}`, + JsiiDiagnostic.JSII_5010_OVERRIDE_CHANGES_MUTABILITY.createDetached( + label, + action, + actual.immutable, + expected.immutable, + ), ); } if (expected.optional !== actual.optional) { diagnostic( - ts.DiagnosticCategory.Error, - `${label} changes optionality of property when ${action}`, + JsiiDiagnostic.JSII_5009_OVERRIDE_CHANGES_PROP_OPTIONAL.createDetached( + label, + action, + actual.optional, + expected.optional, + ), ); } } @@ -490,8 +518,10 @@ function _allTypes(assm: spec.Assembly): spec.Type[] { return Object.values(assm.types ?? {}); } -function _allMethods(assm: spec.Assembly): spec.Method[] { - const methods = new Array(); +function _allMethods( + assm: spec.Assembly, +): Array<{ member: spec.Method; type: spec.Type }> { + const methods = new Array<{ member: spec.Method; type: spec.Type }>(); for (const type of _allTypes(assm)) { if (!spec.isClassOrInterfaceType(type)) { continue; @@ -499,13 +529,15 @@ function _allMethods(assm: spec.Assembly): spec.Method[] { if (!type.methods) { continue; } - type.methods.forEach((method) => methods.push(method)); + type.methods.forEach((method) => methods.push({ member: method, type })); } return methods; } -function _allProperties(assm: spec.Assembly): spec.Property[] { - const properties = new Array(); +function _allProperties( + assm: spec.Assembly, +): Array<{ member: spec.Property; type: spec.Type }> { + const properties = new Array<{ member: spec.Property; type: spec.Type }>(); for (const type of _allTypes(assm)) { if (!spec.isClassOrInterfaceType(type)) { continue; @@ -513,12 +545,16 @@ function _allProperties(assm: spec.Assembly): spec.Property[] { if (!type.properties) { continue; } - type.properties.forEach((property) => properties.push(property)); + type.properties.forEach((property) => + properties.push({ member: property, type }), + ); } return properties; } -function _allMembers(assm: spec.Assembly): Array { +function _allMembers( + assm: spec.Assembly, +): Array<{ member: spec.Property | spec.Method; type: spec.Type }> { return [..._allMethods(assm), ..._allProperties(assm)]; } @@ -535,10 +571,10 @@ function _allTypeReferences(assm: spec.Assembly): spec.NamedTypeReference[] { type.interfaces.forEach((iface) => typeReferences.push({ fqn: iface })); } } - for (const prop of _allProperties(assm)) { + for (const { member: prop } of _allProperties(assm)) { _collectTypeReferences(prop.type); } - for (const meth of _allMethods(assm)) { + for (const { member: meth } of _allMethods(assm)) { if (meth.returns) { _collectTypeReferences(meth.returns.type); } diff --git a/packages/jsii/package.json b/packages/jsii/package.json index 58befc31b9..89acfc3821 100644 --- a/packages/jsii/package.json +++ b/packages/jsii/package.json @@ -54,14 +54,15 @@ "@types/jest": "^26.0.10", "@types/jest-expect-message": "^1.0.2", "@types/node": "^10.17.28", - "@types/semver": "^7.3.2", + "@types/semver": "^7.3.3", "@types/yargs": "^15.0.5", "clone": "^2.1.2", "eslint": "^7.7.0", - "jest": "^26.4.0", + "jest": "^26.4.2", "jest-expect-message": "^1.0.2", "jsii-build-tools": "^0.0.0", - "prettier": "^2.0.5" + "prettier": "^2.1.0", + "ts-jest": "^26.2.0" }, "jest": { "collectCoverage": true, @@ -85,7 +86,10 @@ ], "testEnvironment": "node", "testMatch": [ - "**/?(*.)+(spec|test).js" - ] + "**/?(*.)+(spec|test).ts" + ], + "transform": { + "\\.tsx?$": "ts-jest" + } } } diff --git a/packages/jsii/test/__snapshots__/negatives.test.js.snap b/packages/jsii/test/__snapshots__/negatives.test.js.snap deleted file mode 100644 index d9b1f709a2..0000000000 --- a/packages/jsii/test/__snapshots__/negatives.test.js.snap +++ /dev/null @@ -1,587 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`behavior-requires-iprefix 1`] = ` -"neg.behavior-requires-iprefix.ts:1:18 - error TS9999: JSII: Interface contains behavior: name should be \\"ISomething\\" - -1 export interface Something { - ~~~~~~~~~ -" -`; - -exports[`class-name 1`] = ` -"error TS0: Type names must use PascalCase: myclass -" -`; - -exports[`class-name.1 1`] = ` -"error TS0: Type names must use PascalCase: My_class -" -`; - -exports[`compilation-error 1`] = ` -"neg.compilation-error.ts:1:1 - error TS2304: Cannot find name 'boom'. - -1 boom! > CompilerErrorIsHere; - ~~~~ -neg.compilation-error.ts:1:9 - error TS2304: Cannot find name 'CompilerErrorIsHere'. - -1 boom! > CompilerErrorIsHere; - ~~~~~~~~~~~~~~~~~~~ -" -`; - -exports[`const-enum 1`] = ` -"neg.const-enum.ts:1:1 - error TS9999: JSII: Exported enum cannot be declared 'const' - - 1 export const enum NotAllowed { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2 ThisEnum, - ~~~~~~~~~~~ -... - 5 ForJsii, - ~~~~~~~~~~ - 6 } - ~ -" -`; - -exports[`double-interface-members 1`] = ` -"neg.double-interface-members.ts:2:3 - error TS9999: JSII: The property 'foo' in data type 'A' must be 'readonly' since data is passed by-value - -2 foo: number; - ~~~~~~~~~~~~ -neg.double-interface-members.ts:4:1 - error TS9999: JSII: Interface declares same member as inherited interface: foo - -4 export interface B extends A { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -5 foo: number; - ~~~~~~~~~~~~~~ -6 } - ~ -neg.double-interface-members.ts:5:3 - error TS9999: JSII: The property 'foo' in data type 'B' must be 'readonly' since data is passed by-value - -5 foo: number; - ~~~~~~~~~~~~ -" -`; - -exports[`double-interface-members-deeper 1`] = ` -"neg.double-interface-members-deeper.ts:9:1 - error TS9999: JSII: Interface declares same member as inherited interface: foo - - 9 export interface IC extends IB { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -10 foo(): void; - ~~~~~~~~~~~~~~ -11 } - ~ -" -`; - -exports[`double-interface-members-method 1`] = ` -"neg.double-interface-members-method.ts:4:1 - error TS9999: JSII: Interface declares same member as inherited interface: foo - -4 export interface IB extends IA { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -5 foo(): void; - ~~~~~~~~~~~~~~ -6 } - ~ -" -`; - -exports[`downgrade-to-readonly 1`] = ` -"error TS0: jsii.Implementation#property changes immutability of property when implementing jsii.IInterface -" -`; - -exports[`enum-members.1 1`] = ` -"error TS0: Enum members must use ALL_CAPS: Goo -" -`; - -exports[`enum-name.1 1`] = ` -"error TS0: Type names must use PascalCase: myEnum -" -`; - -exports[`enum-name.2 1`] = ` -"error TS0: Type names must use PascalCase: My_Enum -" -`; - -exports[`expose-unexported-type-external 1`] = ` -"error TS0: Exported APIs cannot use un-exported type jsii.UnexportedType -" -`; - -exports[`expose-unexported-type-internal 1`] = ` -"neg.expose-unexported-type-internal.ts:7:10 - error TS9999: JSII: Type \\"UnexportedType\\" cannot be used as the property type because it is private or @internal - -7 public p?: UnexportedType; - ~ - - neg.expose-unexported-type-internal.ts:4:7 - 4 class UnexportedType {} - ~~~~~~~~~~~~~~ - The referenced type is declared here -" -`; - -exports[`expose-unexported-type-internal-in-namespace 1`] = ` -"neg.expose-unexported-type-internal-in-namespace.ts:9:10 - error TS9999: JSII: Cannot use internal type MyNamespace.UnexportedType as a property type in exported declarations - -9 public p?: MyNamespace.UnexportedType; - ~ - - neg.expose-unexported-type-internal-in-namespace.ts:5:16 - 5 export class UnexportedType {} - ~~~~~~~~~~~~~~ - The referenced type is declared here -" -`; - -exports[`expose-unexported-type-this 1`] = ` -"neg.expose-unexported-type-this.ts:10:38 - warning TS9999: JSII: 'boolean' is a reserved word in Java. Using this name may cause problems when generating language bindings. Consider using a different name. - -10 public constructor(public readonly boolean = true) { - ~~~~~~~ -neg.expose-unexported-type-this.ts:10:38 - warning TS9999: JSII: 'boolean' is a reserved word in Java. Using this name may cause problems when generating language bindings. Consider using a different name. - -10 public constructor(public readonly boolean = true) { - ~~~~~~~ -neg.expose-unexported-type-this.ts:4:10 - error TS9999: JSII: Type \\"this\\" (aka: \\"HiddenBaseClass\\") cannot be used as the return type because it is private or @internal - -4 public returnsThis() { - ~~~~~~~~~~~ - - neg.expose-unexported-type-this.ts:3:16 - 3 abstract class HiddenBaseClass { - ~~~~~~~~~~~~~~~ - The referenced type is declared here -" -`; - -exports[`extend-struct 1`] = ` -"error TS9999: JSII: Attempted to extend struct jsii.Struct from regular interface jsii.IIllegal -" -`; - -exports[`implement-struct 1`] = ` -"neg.implement-struct.ts:6:1 - error TS9999: JSII: Attempted to implement struct jsii.Struct from class jsii.Illegal - - 6 export class Illegal implements Struct { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 7 public readonly field: string = 'foo'; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... - 11 } - ~~~ - 12 } - ~ -" -`; - -exports[`implementation-changes-types.1 1`] = ` -"error TS0: jsii.Something#returnSomething changes the return type when implementing jsii.ISomething (expected jsii.Superclass, found jsii.Subclass) -" -`; - -exports[`implementation-changes-types.2 1`] = ` -"error TS0: jsii.ISomethingElse#returnSomething changes the return type when implementing jsii.ISomething (expected jsii.Superclass, found jsii.Subclass) -" -`; - -exports[`implementation-changes-types.3 1`] = ` -"error TS0: jsii.Something#takeSomething changes type of argument _argument when implementing jsii.ISomething (expected jsii.Superclass, found jsii.Subclass -" -`; - -exports[`implementation-changes-types.4 1`] = ` -"error TS0: jsii.Something#something changes the type of property when implementing jsii.ISomething (expected jsii.Superclass, found jsii.Subclass) -" -`; - -exports[`implementation-changes-types.5 1`] = ` -"error TS0: jsii.ISomethingElse#something changes the type of property when implementing jsii.ISomething (expected jsii.Superclass, found jsii.Subclass) -" -`; - -exports[`implementing-method-changes-optionality 1`] = ` -"error TS0: jsii.Implementor#method changes the optionality of paramerter _optional when implementing jsii.IInterface (expected true, found false) -" -`; - -exports[`implementing-method-changes-optionality.1 1`] = ` -"error TS0: jsii.Implementor#method changes the optionality of paramerter _optional when overriding jsii.AbstractClass (expected true, found false) -" -`; - -exports[`implementing-method-changes-optionality.2 1`] = ` -"error TS0: jsii.Implementor#method changes the optionality of paramerter _optional when overriding jsii.ParentClass (expected true, found false) -" -`; - -exports[`implementing-property-changes-optionality 1`] = ` -"error TS0: jsii.Implementor#property changes optionality of property when implementing jsii.IInterface -" -`; - -exports[`implementing-property-changes-optionality.1 1`] = ` -"error TS0: jsii.Implementor#property changes optionality of property when overriding jsii.AbstractClass -" -`; - -exports[`implementing-property-changes-optionality.2 1`] = ` -"error TS0: jsii.Implementor#property changes optionality of property when overriding jsii.ParentClass -" -`; - -exports[`implements-class 1`] = ` -"neg.implements-class.ts:1:1 - error TS9999: JSII: Inheritance clause of jsii.TryingToImplementClass uses jsii.NotAnInterface as an interface - - 1 export class NotAnInterface { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2 public meaningOfTheUniverse() { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... - 4 } - ~~~ - 5 } - ~ -" -`; - -exports[`inheritance-changes-types.1 1`] = ` -"error TS0: jsii.SomethingSpecific#returnSomething changes the return type when overriding jsii.Something (expected jsii.Superclass, found jsii.Subclass) -" -`; - -exports[`inheritance-changes-types.2 1`] = ` -"error TS0: jsii.SomethingSpecific#returnSomething changes the return type when overriding jsii.Something (expected jsii.Superclass, found jsii.Subclass) -" -`; - -exports[`inheritance-changes-types.3 1`] = ` -"error TS0: jsii.SomethingSpecific#takeSomething changes type of argument _argument when overriding jsii.Something (expected jsii.Superclass, found jsii.Subclass -" -`; - -exports[`inheritance-changes-types.4 1`] = ` -"error TS0: jsii.SomethingSpecific#something changes the type of property when overriding jsii.Something (expected jsii.Superclass, found jsii.Subclass) -" -`; - -exports[`inheritance-changes-types.5 1`] = ` -"error TS0: jsii.SomethingElse#something changes the type of property when overriding jsii.Something (expected jsii.Superclass, found jsii.Subclass) -" -`; - -exports[`internal-underscore-class.5 1`] = ` -"neg.internal-underscore-class.5.ts:3:10 - error TS9999: JSII: propertyWithInternalButNotUnderscorePrefix: the name of members marked as @internal must begin with an underscore - -3 public propertyWithInternalButNotUnderscorePrefix?: string; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -" -`; - -exports[`internal-underscore-class.6 1`] = ` -"neg.internal-underscore-class.6.ts:2:10 - error TS9999: JSII: _propertyWithUnderscoreButNoInternal: members with names that begin with an underscore must be marked as @internal via a JSDoc tag - -2 public _propertyWithUnderscoreButNoInternal?: string; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -" -`; - -exports[`internal-underscore-class.7 1`] = ` -"neg.internal-underscore-class.7.ts:3:10 - error TS9999: JSII: methodWithInternalButNoUnderscore: the name of members marked as @internal must begin with an underscore - -3 public methodWithInternalButNoUnderscore(): string { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -" -`; - -exports[`internal-underscore-class.8 1`] = ` -"neg.internal-underscore-class.8.ts:2:3 - error TS9999: JSII: _methodWithUnderscoreButNoInternal: members with names that begin with an underscore must be marked as @internal via a JSDoc tag - -2 _methodWithUnderscoreButNoInternal(): void; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -" -`; - -exports[`internal-underscore-interface.1 1`] = ` -"neg.internal-underscore-interface.1.ts:3:3 - error TS9999: JSII: propertyWithInternalButNotUnderscorePrefix: the name of members marked as @internal must begin with an underscore - -3 propertyWithInternalButNotUnderscorePrefix: string; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -" -`; - -exports[`internal-underscore-interface.2 1`] = ` -"neg.internal-underscore-interface.2.ts:2:3 - error TS9999: JSII: _propertyWithUnderscoreButNoInternal: members with names that begin with an underscore must be marked as @internal via a JSDoc tag - -2 _propertyWithUnderscoreButNoInternal: string; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -" -`; - -exports[`internal-underscore-interface.3 1`] = ` -"neg.internal-underscore-interface.3.ts:3:3 - error TS9999: JSII: methodWithInternalButNoUnderscore: the name of members marked as @internal must begin with an underscore - -3 methodWithInternalButNoUnderscore(): string; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -" -`; - -exports[`internal-underscore-interface.4 1`] = ` -"neg.internal-underscore-interface.4.ts:2:10 - error TS9999: JSII: _methodWithUnderscoreButNoInternal: members with names that begin with an underscore must be marked as @internal via a JSDoc tag - -2 public _methodWithUnderscoreButNoInternal() { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -" -`; - -exports[`method-name.1 1`] = ` -"error TS0: Method and non-static non-readonly property names must use camelCase: METHOD -" -`; - -exports[`method-name.2 1`] = ` -"error TS0: Method and non-static non-readonly property names must use camelCase: hello_world -" -`; - -exports[`method-name.3 1`] = ` -"error TS0: Methods and properties cannot have names like getXxx() - those conflict with Java property getters by the same name -" -`; - -exports[`method-name.4 1`] = ` -"error TS0: Methods and properties cannot have names like setXxx() - those conflict with Java property setters by the same name -" -`; - -exports[`mix-datatype-and-arg-name 1`] = ` -"neg.mix-datatype-and-arg-name.ts:10:3 - error TS9999: JSII: Name occurs in both function arguments and in datatype properties, rename one: dontWorry - -10 public dance(dontWorry: string, lyrics: Lyrics) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -11 return \`\${dontWorry}: \${lyrics.beHappy}\`; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -12 } - ~~~ -" -`; - -exports[`mutable-datatype 1`] = ` -"neg.mutable-datatype.ts:3:3 - error TS9999: JSII: The property 'notOkay' in data type 'DataType' must be 'readonly' since data is passed by-value - -3 notOkay: number; // properties should be \\"readonly\\" - ~~~~~~~~~~~~~~~~ -" -`; - -exports[`non-optional-after-optional-ctor 1`] = ` -"neg.non-optional-after-optional-ctor.ts:2:3 - error TS9999: JSII: Parameter _arg2 cannot be optional, as it precedes non-optional parameter _arg3 - -2 constructor(_arg1: string, _arg2 = 'hello', _arg3: string) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -3 return; - ~~~~~~~~~~~ -4 } - ~~~ -" -`; - -exports[`non-optional-after-optional-method 1`] = ` -"neg.non-optional-after-optional-method.ts:2:3 - error TS9999: JSII: Parameter _arg2 cannot be optional, as it precedes non-optional parameter _argX - -2 public foo(_arg1: string, _arg2 = 'hello', _argX: string, _arg4?: boolean) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -3 return; - ~~~~~~~~~~~ -4 } - ~~~ -" -`; - -exports[`omit.1 1`] = ` -"neg.omit.1.ts:7:33 - error TS9999: JSII: Illegal \\"extends\\" value for an exported API: MappedType - -7 export interface BarBaz extends Omit { - ~~~~~~~~~~~~~~~~~~~ -" -`; - -exports[`omit.2 1`] = ` -"neg.omit.2.ts:7:32 - error TS9999: JSII: Illegal \\"implements\\" value for an exported API: MappedType - -7 export class BarBaz implements Omit { - ~~~~~~~~~~~~~~~~~~~ -" -`; - -exports[`omit.3 1`] = ` -"neg.omit.3.ts:8:3 - error TS9999: JSII: Only string-indexed map types are supported - -8 bar(): Omit; - ~~~ -" -`; - -exports[`omit.4 1`] = ` -"neg.omit.4.ts:8:7 - error TS9999: JSII: Only string-indexed map types are supported - -8 bar(opts: Omit): void; - ~~~~ -" -`; - -exports[`override-changes-visibility 1`] = ` -"error TS0: jsii.ChildClass#method changes visibility when overriding jsii.BaseClass (expected protected, found public) -error TS0: jsii.ChildClass#property changes visibility when overriding jsii.BaseClass (expected protected, found public) -" -`; - -exports[`prohibited-member-name 1`] = ` -"neg.prohibited-member-name.ts:4:3 - error TS9999: JSII: Prohibited member name: equals - -4 public equals(): boolean { - ~~~~~~~~~~~~~~~~~~~~~~~~~~ -5 return true; - ~~~~~~~~~~~~~~~~ -6 } - ~~~ -" -`; - -exports[`property-name.1 1`] = ` -"error TS0: Method and non-static non-readonly property names must use camelCase: PROP -" -`; - -exports[`property-name.2 1`] = ` -"error TS0: Method and non-static non-readonly property names must use camelCase: my_Prop -" -`; - -exports[`property-name.3 1`] = ` -"error TS0: Methods and properties cannot have names like getXxx() - those conflict with Java property getters by the same name -" -`; - -exports[`reserved.emits-warning 1`] = ` -"neg.reserved.emits-warning.ts:2:14 - warning TS9999: JSII: 'None' is a reserved word in Python. Using this name may cause problems when generating language bindings. Consider using a different name. - -2 export class None { - ~~~~ -neg.reserved.emits-warning.ts:3:19 - warning TS9999: JSII: 'do' is a reserved word in C#, Java. Using this name may cause problems when generating language bindings. Consider using a different name. - -3 public readonly do: boolean = true; - ~~ -neg.reserved.emits-warning.ts:5:10 - warning TS9999: JSII: 'assert' is a reserved word in Java, Python. Using this name may cause problems when generating language bindings. Consider using a different name. - -5 public assert(_internal: boolean): void { - ~~~~~~ -" -`; - -exports[`static-const-name 1`] = ` -"error TS0: Static constant names must use TRUMP_CASE, PascalCase or camelCase: snake_case -" -`; - -exports[`static-member-mixing.1 1`] = ` -"neg.static-member-mixing.1.ts:11:1 - error TS9999: JSII: non-static member 'funFunction' of class 'Sub' conflicts with static member in ancestor 'SuperDuper' - - 11 export class Sub extends Super { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 12 public funFunction() { - ~~~~~~~~~~~~~~~~~~~~~~~~ -... - 14 } - ~~~ - 15 } - ~ -" -`; - -exports[`static-member-mixing.2 1`] = ` -"neg.static-member-mixing.2.ts:1:1 - error TS9999: JSII: member 'funFunction' of class 'TheClass' cannot be declared both statically and non-statically - - 1 export class TheClass { - ~~~~~~~~~~~~~~~~~~~~~~~ - 2 public static funFunction() { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... - 8 } - ~~~ - 9 } - ~ -" -`; - -exports[`static-method-name 1`] = ` -"error TS0: Method and non-static non-readonly property names must use camelCase: METHOD -" -`; - -exports[`static-method-name.1 1`] = ` -"error TS0: Method and non-static non-readonly property names must use camelCase: MethodIsNotCamelCase -" -`; - -exports[`static-prop-name.1 1`] = ` -"error TS0: Method and non-static non-readonly property names must use camelCase: Prop -" -`; - -exports[`static-prop-name.2 1`] = ` -"error TS0: Method and non-static non-readonly property names must use camelCase: PROP -" -`; - -exports[`struct-extends-interface 1`] = ` -"neg.struct-extends-interface.ts:6:18 - error TS9999: JSII: Interface contains behavior: name should be \\"IStruct\\" - -6 export interface Struct extends IInterface { - ~~~~~~ -" -`; - -exports[`submodules-cannot-have-colliding-names 1`] = ` -"neg.submodules-cannot-have-colliding-names.ts:3:14 - error TS9999: JSII: Submodule \\"ns1\\" conflicts with \\"Ns1\\". Restricted names are: ns1, Ns1 - -3 export class Ns1 { - ~~~ - - neg.submodules-cannot-have-colliding-names.ts:1:13 - 1 export * as ns1 from './namespaced'; - ~~~ - This is the conflicting submodule declaration. -" -`; - -exports[`submodules-cannot-share-symbols 1`] = ` -"namespaced/index.ts:1:14 - error TS9999: JSII: Symbol is re-exported under two distinct submodules (ns1 and ns2) - -1 export class Declaration { - ~~~~~~~~~~~ - - neg.submodules-cannot-share-symbols.ts:1:8 - 1 export * as ns1 from './namespaced'; - ~~~~~~~~ - Symbol is exported under the \\"ns1\\" submodule - neg.submodules-cannot-share-symbols.ts:2:8 - 2 export * as ns2 from './namespaced'; - ~~~~~~~~ - Symbol is exported under the \\"ns2\\" submodule -" -`; - -exports[`submodules-must-be-camel-cased 1`] = ` -"neg.submodules-must-be-camel-cased.ts:1:13 - error TS9999: JSII: Submodule namespaces must be camelCased or snake_cased. Consider renaming to \\"ns1\\". - -1 export * as Ns1 from './namespaced'; - ~~~ -" -`; diff --git a/packages/jsii/test/__snapshots__/negatives.test.ts.snap b/packages/jsii/test/__snapshots__/negatives.test.ts.snap new file mode 100644 index 0000000000..3a256c964d --- /dev/null +++ b/packages/jsii/test/__snapshots__/negatives.test.ts.snap @@ -0,0 +1,673 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`behavior-requires-iprefix 1`] = ` +neg.behavior-requires-iprefix.ts:1:18 - error JSII8007: Interface contains behavior. Rename "Something" to "ISomething" + +1 export interface Something { + ~~~~~~~~~ + + +`; + +exports[`class-name 1`] = ` +error JSII8000: Type names must be CamelCased. Rename "myclass" to "Myclass" + +`; + +exports[`class-name.1 1`] = ` +error JSII8000: Type names must be CamelCased. Rename "My_class" to "MyClass" + +`; + +exports[`compilation-error 1`] = ` +neg.compilation-error.ts:1:1 - error TS2304: Cannot find name 'boom'. + +1 boom! > CompilerErrorIsHere; + ~~~~ +neg.compilation-error.ts:1:9 - error TS2304: Cannot find name 'CompilerErrorIsHere'. + +1 boom! > CompilerErrorIsHere; + ~~~~~~~~~~~~~~~~~~~ + +`; + +exports[`const-enum 1`] = ` +neg.const-enum.ts:1:8 - error JSII1000: Exported "const enum" declarations are not allowed + +1 export const enum NotAllowed { + ~~~~~ + + +`; + +exports[`double-interface-members 1`] = ` +neg.double-interface-members.ts:2:3 - error JSII3008: The "foo" property of struct "jsii.A" must be "readonly". Rename "jsii.A" to "IA" if it is meant to be a behavioral interface. + +2 foo: number; + ~~~ + +neg.double-interface-members.ts:4:1 - error JSII5015: Interface "jsii.B" re-declares member "foo". This is not supported as it results in invalid C#. + +4 export interface B extends A { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +5 foo: number; + ~~~~~~~~~~~~~~ +6 } + ~ + +neg.double-interface-members.ts:5:3 - error JSII3008: The "foo" property of struct "jsii.B" must be "readonly". Rename "jsii.B" to "IB" if it is meant to be a behavioral interface. + +5 foo: number; + ~~~ + + +`; + +exports[`double-interface-members-deeper 1`] = ` +neg.double-interface-members-deeper.ts:9:1 - error JSII5015: Interface "jsii.IC" re-declares member "foo". This is not supported as it results in invalid C#. + + 9 export interface IC extends IB { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +10 foo(): void; + ~~~~~~~~~~~~~~ +11 } + ~ + + +`; + +exports[`double-interface-members-method 1`] = ` +neg.double-interface-members-method.ts:4:1 - error JSII5015: Interface "jsii.IB" re-declares member "foo". This is not supported as it results in invalid C#. + +4 export interface IB extends IA { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +5 foo(): void; + ~~~~~~~~~~~~~~ +6 } + ~ + + +`; + +exports[`downgrade-to-readonly 1`] = ` +error JSII5010: "jsii.Implementation#property" turns mutable when implementing jsii.IInterface. Make it readonly + +`; + +exports[`enum-members.1 1`] = ` +error JSII8001: Enum members must be ALL_CAPS. Rename "jsii.MyEnum.Goo" to "GOO" + +`; + +exports[`enum-name.1 1`] = ` +error JSII8000: Type names must be CamelCased. Rename "myEnum" to "MyEnum" + +`; + +exports[`enum-name.2 1`] = ` +error JSII8000: Type names must be CamelCased. Rename "My_Enum" to "MyEnum" + +`; + +exports[`expose-unexported-type-external 1`] = ` +error JSII3000: Exported APIs cannot use un-exported type "jsii.UnexportedType" + +`; + +exports[`expose-unexported-type-internal 1`] = ` +neg.expose-unexported-type-internal.ts:7:10 - error JSII3001: Type "UnexportedType" cannot be used as the property type because it is private or @internal + +7 public p?: UnexportedType; + ~ + + neg.expose-unexported-type-internal.ts:4:1 + 4 class UnexportedType {} + ~~~~~~~~~~~~~~~~~~~~~~~ + The referenced type is declared here + +`; + +exports[`expose-unexported-type-internal-in-namespace 1`] = ` +neg.expose-unexported-type-internal-in-namespace.ts:9:10 - error JSII3001: Type "UnexportedType" cannot be used as the property type because it is private or @internal + +9 public p?: MyNamespace.UnexportedType; + ~ + + neg.expose-unexported-type-internal-in-namespace.ts:5:3 + 5 export class UnexportedType {} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + The referenced type is declared here + +`; + +exports[`expose-unexported-type-this 1`] = ` +neg.expose-unexported-type-this.ts:10:38 - warning JSII5018: "boolean" is a reserved word in Java. Using this name may cause problems when generating language bindings. Consider a different name. + +10 public constructor(public readonly boolean = true) { + ~~~~~~~ + +neg.expose-unexported-type-this.ts:10:38 - warning JSII5018: "boolean" is a reserved word in Java. Using this name may cause problems when generating language bindings. Consider a different name. + +10 public constructor(public readonly boolean = true) { + ~~~~~~~ + +neg.expose-unexported-type-this.ts:4:10 - error JSII3001: Type "this" (aka: "HiddenBaseClass") cannot be used as the return type because it is private or @internal + +4 public returnsThis() { + ~~~~~~~~~~~ + + neg.expose-unexported-type-this.ts:3:1 + 3 abstract class HiddenBaseClass { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 4 public returnsThis() { + ~~~~~~~~~~~~~~~~~~~~~~~~ + ... + 6 } + ~~~ + 7 } + ~ + The referenced type is declared here + +`; + +exports[`extend-struct 1`] = ` +neg.extend-struct.ts:6:1 - error JSII3007: Attempt to extend or implement struct "jsii.Struct" from "jsii.IIllegal" + +6 export interface IIllegal extends Struct { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +7 method(): void; + ~~~~~~~~~~~~~~~~~ +8 } + ~ + + +`; + +exports[`implement-struct 1`] = ` +neg.implement-struct.ts:6:1 - error JSII3007: Attempt to extend or implement struct "jsii.Struct" from "jsii.Illegal" + + 6 export class Illegal implements Struct { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 7 public readonly field: string = 'foo'; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +... + 11 } + ~~~ + 12 } + ~ + + +`; + +exports[`implementation-changes-types.1 1`] = ` +error JSII5003: "jsii.Something#returnSomething" changes the return type to "jsii.Subclass" when implementing jsii.ISomething. Change it to "jsii.Superclass" + +`; + +exports[`implementation-changes-types.2 1`] = ` +error JSII5003: "jsii.ISomethingElse#returnSomething" changes the return type to "jsii.Subclass" when implementing jsii.ISomething. Change it to "jsii.Superclass" + +`; + +exports[`implementation-changes-types.3 1`] = ` +error JSII5006: "jsii.Something#takeSomething" changes the type of parameter "_argument" to jsii.Subclass when implementing jsii.ISomething. Change it to jsii.Superclass + +`; + +exports[`implementation-changes-types.4 1`] = ` +error JSII5004: "jsii.SomethingImpl#something" changes the property type to "jsii.Subclass" when implementing jsii.ISomething. Change it to "jsii.Superclass" + +`; + +exports[`implementation-changes-types.5 1`] = ` +error JSII5004: "jsii.ISomethingElse#something" changes the property type to "jsii.Subclass" when implementing jsii.ISomething. Change it to "jsii.Superclass" + +`; + +exports[`implementing-method-changes-optionality 1`] = ` +error JSII5008: "jsii.Implementor#method" turns parameter "_optional" required when implementing jsii.IInterface. Make it optional + +`; + +exports[`implementing-method-changes-optionality.1 1`] = ` +error JSII5008: "jsii.Implementor#method" turns parameter "_optional" required when overriding jsii.AbstractClass. Make it optional + +`; + +exports[`implementing-method-changes-optionality.2 1`] = ` +error JSII5008: "jsii.Implementor#method" turns parameter "_optional" required when overriding jsii.ParentClass. Make it optional + +`; + +exports[`implementing-property-changes-optionality 1`] = ` +error JSII5009: "jsii.Implementor#property" turns required when implementing jsii.IInterface. Make it optional + +`; + +exports[`implementing-property-changes-optionality.1 1`] = ` +error JSII5009: "jsii.Implementor#property" turns required when overriding jsii.AbstractClass. Make it optional + +`; + +exports[`implementing-property-changes-optionality.2 1`] = ` +error JSII5009: "jsii.Implementor#property" turns required when overriding jsii.ParentClass. Make it optional + +`; + +exports[`implements-class 1`] = ` +neg.implements-class.ts:1:1 - error JSII3005: Type "jsii.NotAnInterface" cannot be used as an interface + + 1 export class NotAnInterface { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 2 public meaningOfTheUniverse() { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +... + 4 } + ~~~ + 5 } + ~ + + +`; + +exports[`inheritance-changes-types.1 1`] = ` +error JSII5003: "jsii.SomethingSpecific#returnSomething" changes the return type to "jsii.Subclass" when overriding jsii.Something. Change it to "jsii.Superclass" + +`; + +exports[`inheritance-changes-types.2 1`] = ` +error JSII5003: "jsii.SomethingSpecific#returnSomething" changes the return type to "jsii.Subclass" when overriding jsii.Something. Change it to "jsii.Superclass" + +`; + +exports[`inheritance-changes-types.3 1`] = ` +error JSII5006: "jsii.SomethingSpecific#takeSomething" changes the type of parameter "_argument" to jsii.Subclass when overriding jsii.Something. Change it to jsii.Superclass + +`; + +exports[`inheritance-changes-types.4 1`] = ` +error JSII5004: "jsii.SomethingSpecific#something" changes the property type to "jsii.Subclass" when overriding jsii.SomethingUnspecific. Change it to "jsii.Superclass" + +`; + +exports[`inheritance-changes-types.5 1`] = ` +error JSII5004: "jsii.SomethingElse#something" changes the property type to "jsii.Subclass" when overriding jsii.SomethingBase. Change it to "jsii.Superclass" + +`; + +exports[`internal-underscore-class.5 1`] = ` +neg.internal-underscore-class.5.ts:3:10 - error JSII8005: Members marked with @internal must have a name starting with "_". Rename "propertyWithInternalButNotUnderscorePrefix" to "_propertyWithInternalButNotUnderscorePrefix" + +3 public propertyWithInternalButNotUnderscorePrefix?: string; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +`; + +exports[`internal-underscore-class.6 1`] = ` +neg.internal-underscore-class.6.ts:2:10 - error JSII8006: Members with a name starting with "_" (e.g: "_propertyWithUnderscoreButNoInternal") must be marked @internal + +2 public _propertyWithUnderscoreButNoInternal?: string; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +`; + +exports[`internal-underscore-class.7 1`] = ` +neg.internal-underscore-class.7.ts:3:10 - error JSII8005: Members marked with @internal must have a name starting with "_". Rename "methodWithInternalButNoUnderscore" to "_methodWithInternalButNoUnderscore" + +3 public methodWithInternalButNoUnderscore(): string { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +`; + +exports[`internal-underscore-class.8 1`] = ` +neg.internal-underscore-class.8.ts:2:3 - error JSII8006: Members with a name starting with "_" (e.g: "_methodWithUnderscoreButNoInternal") must be marked @internal + +2 _methodWithUnderscoreButNoInternal(): void; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +`; + +exports[`internal-underscore-interface.1 1`] = ` +neg.internal-underscore-interface.1.ts:3:3 - error JSII8005: Members marked with @internal must have a name starting with "_". Rename "propertyWithInternalButNotUnderscorePrefix" to "_propertyWithInternalButNotUnderscorePrefix" + +3 propertyWithInternalButNotUnderscorePrefix: string; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +`; + +exports[`internal-underscore-interface.2 1`] = ` +neg.internal-underscore-interface.2.ts:2:3 - error JSII8006: Members with a name starting with "_" (e.g: "_propertyWithUnderscoreButNoInternal") must be marked @internal + +2 _propertyWithUnderscoreButNoInternal: string; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +`; + +exports[`internal-underscore-interface.3 1`] = ` +neg.internal-underscore-interface.3.ts:3:3 - error JSII8005: Members marked with @internal must have a name starting with "_". Rename "methodWithInternalButNoUnderscore" to "_methodWithInternalButNoUnderscore" + +3 methodWithInternalButNoUnderscore(): string; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +`; + +exports[`internal-underscore-interface.4 1`] = ` +neg.internal-underscore-interface.4.ts:2:10 - error JSII8006: Members with a name starting with "_" (e.g: "_methodWithUnderscoreButNoInternal") must be marked @internal + +2 public _methodWithUnderscoreButNoInternal() { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +`; + +exports[`member-named-after-type 1`] = ` +neg.member-named-after-type.ts:14:12 - warning JSII5019: The property name "myStruct" conflicts with the declaring interface "MyStruct". This will result in renaming the interface to "_MyStruct" in C#. Consider renaming "myStruct". + +14 readonly myStruct: string; + ~~~~~~~~ + + neg.member-named-after-type.ts:13:18 + 13 export interface MyStruct { + ~~~~~~~~ + The declaring interface is introduced here +neg.member-named-after-type.ts:4:19 - warning JSII5019: The property name "typeName" conflicts with the declaring class "TypeName". This will result in renaming the class to "_TypeName" in C#. Consider renaming "typeName". + +4 public readonly typeName = 1337; + ~~~~~~~~ + + neg.member-named-after-type.ts:3:14 + 3 export class TypeName { + ~~~~~~~~ + The declaring class is introduced here +neg.member-named-after-type.ts:8:10 - warning JSII5019: The method name "otherType" conflicts with the declaring class "OtherType". This will result in renaming the class to "_OtherType" in C#. Consider renaming "otherType". + +8 public otherType() { + ~~~~~~~~~ + + neg.member-named-after-type.ts:7:14 + 7 export class OtherType { + ~~~~~~~~~ + The declaring class is introduced here + +`; + +exports[`method-name.1 1`] = ` +error JSII8002: Method and property (unless they are static readonly) names must use camelCase. Rename "jsii.MyClass.METHOD" to "method" + +`; + +exports[`method-name.2 1`] = ` +error JSII8002: Method and property (unless they are static readonly) names must use camelCase. Rename "jsii.MyClass.hello_world" to "helloWorld" + +`; + +exports[`method-name.3 1`] = ` +error JSII5000: Methods and properties cannot have names like "getXxx": those conflict with Java property getters. Rename "MyClass.getFoo" + +`; + +exports[`method-name.4 1`] = ` +error JSII5001: Methods and properties cannot have names like "setXxx": those conflict with Java property setters. Rename "MyClass.setFoo" + +`; + +exports[`mix-datatype-and-arg-name 1`] = ` +neg.mix-datatype-and-arg-name.ts:10:3 - error JSII5017: Parameter name "dontWorry" is also the name of a property in a struct parameter. Rename the positional parameter. + +10 public dance(dontWorry: string, lyrics: Lyrics) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +11 return \`\${dontWorry}: \${lyrics.beHappy}\`; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +12 } + ~~~ + + +`; + +exports[`mutable-datatype 1`] = ` +neg.mutable-datatype.ts:3:3 - error JSII3008: The "notOkay" property of struct "jsii.DataType" must be "readonly". Rename "jsii.DataType" to "IDataType" if it is meant to be a behavioral interface. + +3 notOkay: number; // properties should be "readonly" + ~~~~~~~ + + +`; + +exports[`non-optional-after-optional-ctor 1`] = ` +neg.non-optional-after-optional-ctor.ts:2:3 - error JSII3009: Parameter "_arg2" cannot be optional, as it precedes required parameter "_arg3" + +2 constructor(_arg1: string, _arg2 = 'hello', _arg3: string) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +3 return; + ~~~~~~~~~~~ +4 } + ~~~ + + +`; + +exports[`non-optional-after-optional-method 1`] = ` +neg.non-optional-after-optional-method.ts:2:3 - error JSII3009: Parameter "_arg2" cannot be optional, as it precedes required parameter "_argX" + +2 public foo(_arg1: string, _arg2 = 'hello', _argX: string, _arg4?: boolean) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +3 return; + ~~~~~~~~~~~ +4 } + ~~~ + + +`; + +exports[`omit.1 1`] = ` +neg.omit.1.ts:7:33 - error JSII3004: Illegal extends clause for an exported API: MappedType + +7 export interface BarBaz extends Omit { + ~~~~~~~~~~~~~~~~~~~ + + ../../../../node_modules/typescript/lib/lib.es5.d.ts:1462:35 + 1462 type Pick = { + ~ + 1463 [P in K]: T[P]; + ~~~~~~~~~~~~~~~~~~~ + 1464 }; + ~ + The invalid super type is declared here. + +`; + +exports[`omit.2 1`] = ` +neg.omit.2.ts:7:32 - error JSII3004: Illegal implements clause for an exported API: MappedType + +7 export class BarBaz implements Omit { + ~~~~~~~~~~~~~~~~~~~ + + ../../../../node_modules/typescript/lib/lib.es5.d.ts:1462:35 + 1462 type Pick = { + ~ + 1463 [P in K]: T[P]; + ~~~~~~~~~~~~~~~~~~~ + 1464 }; + ~ + The invalid super type is declared here. + +`; + +exports[`omit.3 1`] = ` +neg.omit.3.ts:8:3 - error JSII1003: Only string-indexed map types are supported + +8 bar(): Omit; + ~~~ + + +`; + +exports[`omit.4 1`] = ` +neg.omit.4.ts:8:7 - error JSII1003: Only string-indexed map types are supported + +8 bar(opts: Omit): void; + ~~~~ + + +`; + +exports[`override-changes-visibility 1`] = ` +error JSII5002: "jsii.ChildClass#method" changes visibility to public when overriding jsii.BaseClass. Change it to protected +error JSII5002: "jsii.ChildClass#property" changes visibility to public when overriding jsii.BaseClass. Change it to protected + +`; + +exports[`prohibited-member-name 1`] = ` +neg.prohibited-member-name.ts:4:10 - error JSII5016: Members cannot be named "equals" as it conflicts with synthetic declarations in some languages. + +4 public equals(): boolean { + ~~~~~~ + + +`; + +exports[`property-name.1 1`] = ` +error JSII8002: Method and property (unless they are static readonly) names must use camelCase. Rename "jsii.MyClass.PROP" to "prop" + +`; + +exports[`property-name.2 1`] = ` +error JSII8002: Method and property (unless they are static readonly) names must use camelCase. Rename "jsii.MyClass.my_Prop" to "myProp" + +`; + +exports[`property-name.3 1`] = ` +error JSII5000: Methods and properties cannot have names like "getXxx": those conflict with Java property getters. Rename "MyClass.getFoo" + +`; + +exports[`reserved.emits-warning 1`] = ` +neg.reserved.emits-warning.ts:2:14 - warning JSII5018: "None" is a reserved word in Python. Using this name may cause problems when generating language bindings. Consider a different name. + +2 export class None { + ~~~~ + +neg.reserved.emits-warning.ts:3:19 - warning JSII5018: "do" is a reserved word in C#, Java. Using this name may cause problems when generating language bindings. Consider a different name. + +3 public readonly do: boolean = true; + ~~ + +neg.reserved.emits-warning.ts:5:10 - warning JSII5018: "assert" is a reserved word in Java, Python. Using this name may cause problems when generating language bindings. Consider a different name. + +5 public assert(_internal: boolean): void { + ~~~~~~ + + +`; + +exports[`static-const-name 1`] = ` +error JSII8003: Static constant names must use ALL_CAPS, PascalCase, or camelCase. Rename "MyClass.snake_case" to "SNAKE_CASE" + +`; + +exports[`static-member-mixing.1 1`] = ` +neg.static-member-mixing.1.ts:11:1 - error JSII5014: Instance member "funFunction" of class "jsii.Sub" conflicts with static member in ancestor "jsii.SuperDuper" + + 11 export class Sub extends Super { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 12 public funFunction() { + ~~~~~~~~~~~~~~~~~~~~~~~~ +... + 14 } + ~~~ + 15 } + ~ + + +`; + +exports[`static-member-mixing.2 1`] = ` +neg.static-member-mixing.2.ts:1:1 - error JSII5013: Member "funFunction" of class "jsii.TheClass" has both a static and an instance delcaration + + 1 export class TheClass { + ~~~~~~~~~~~~~~~~~~~~~~~ + 2 public static funFunction() { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +... + 8 } + ~~~ + 9 } + ~ + + +`; + +exports[`static-method-name 1`] = ` +error JSII8002: Method and property (unless they are static readonly) names must use camelCase. Rename "jsii.MyClass.METHOD" to "method" + +`; + +exports[`static-method-name.1 1`] = ` +error JSII8002: Method and property (unless they are static readonly) names must use camelCase. Rename "jsii.MyClass.MethodIsNotCamelCase" to "methodIsNotCamelCase" + +`; + +exports[`static-prop-name.1 1`] = ` +error JSII8002: Method and property (unless they are static readonly) names must use camelCase. Rename "jsii.MyClass.Prop" to "prop" + +`; + +exports[`static-prop-name.2 1`] = ` +error JSII8002: Method and property (unless they are static readonly) names must use camelCase. Rename "jsii.MyClass.PROP" to "prop" + +`; + +exports[`struct-extends-interface 1`] = ` +neg.struct-extends-interface.ts:6:18 - error JSII8007: Interface contains behavior. Rename "Struct" to "IStruct" + +6 export interface Struct extends IInterface { + ~~~~~~ + + +`; + +exports[`submodules-cannot-have-colliding-names 1`] = ` +neg.submodules-cannot-have-colliding-names.ts:3:14 - error JSII5011: Submodule "ns1" conflicts with "Ns1, as different languages could represent it as: "ns1", "Ns1"" + +3 export class Ns1 { + ~~~ + + neg.submodules-cannot-have-colliding-names.ts:1:13 + 1 export * as ns1 from './namespaced'; + ~~~ + This is the conflicting submodule declaration + +`; + +exports[`submodules-cannot-share-symbols 1`] = ` +namespaced/index.ts:1:14 - error JSII3003: Symbol is exported under two distinct submodules: ns1 and ns2 + +1 export class Declaration { + ~~~~~~~~~~~ + + neg.submodules-cannot-share-symbols.ts:1:8 + 1 export * as ns1 from './namespaced'; + ~~~~~~~~ + Symbol is exported under the "ns1" submodule + neg.submodules-cannot-share-symbols.ts:2:8 + 2 export * as ns2 from './namespaced'; + ~~~~~~~~ + Symbol is exported under the "ns2" submodule + +`; + +exports[`submodules-must-be-camel-cased 1`] = ` +neg.submodules-must-be-camel-cased.ts:1:13 - error JSII8004: Submodule namespaces must be camelCased or snake_cased. Rename "Ns1" to ns1 + +1 export * as Ns1 from './namespaced'; + ~~~ + + +`; diff --git a/packages/jsii/test/docs.test.ts b/packages/jsii/test/docs.test.ts index 6b51c2c16b..f2cd6da738 100644 --- a/packages/jsii/test/docs.test.ts +++ b/packages/jsii/test/docs.test.ts @@ -11,7 +11,7 @@ test('extract summary line from doc block, ends with a period', async () => { * Hello this is the documentation for this class */ export class Foo { - public foo() { } + public bar() { } } `); @@ -31,7 +31,7 @@ test('extract remarks from whitespace-separated doc block', async () => { * It looks pretty good, doesn't it? */ export class Foo { - public foo() { } + public bar() { } } `); @@ -49,7 +49,7 @@ test('separate long doc comment into summary and remarks', async () => { * doc block per API item and no structural separation. */ export class Foo { - public foo() { } + public bar() { } } `); @@ -71,7 +71,7 @@ test('separate non-space but newline terminated docs into summary&remarks', asyn * doc block per API item and no structural separation. */ export class Foo { - public foo() { } + public bar() { } } `); @@ -90,7 +90,7 @@ test('dont add period to summary that ends in exclamation mark', async () => { * I'm happy about this class! */ export class Foo { - public foo() { } + public bar() { } } `); @@ -106,7 +106,7 @@ test('parse method docs', async () => { /** * Do the foo */ - public foo(arg: string) { Array.isArray(arg); } + public bar(arg: string) { Array.isArray(arg); } } `); @@ -126,7 +126,7 @@ test('associate parameter comments with right parameter', async () => { * * @param arg First argument is best argument */ - public foo(arg: string) { Array.isArray(arg); } + public bar(arg: string) { Array.isArray(arg); } } `); @@ -147,16 +147,16 @@ test('read example', async () => { * @example * * // Example of fooing it up: - * new Foo().foo(); + * new Foo().bar(); */ - public foo() {} + public bar() {} } `); const classType = assembly.types!['testpkg.Foo'] as spec.ClassType; expect(classType.methods![0].docs!.example).toBe( - '// Example of fooing it up:\n' + 'new Foo().foo();', + '// Example of fooing it up:\n' + 'new Foo().bar();', ); }); @@ -200,7 +200,7 @@ test('read "returns" annotation', async () => { * * @returns Nothing, why would it? */ - public foo(arg: string) { Array.isArray(arg); } + public bar(arg: string) { Array.isArray(arg); } } `); @@ -218,7 +218,7 @@ test('can haz deprecated', async () => { * * @deprecated These days we do the bar */ - public foo(arg: string) { Array.isArray(arg); } + public bar(arg: string) { Array.isArray(arg); } } `); @@ -335,7 +335,7 @@ test('stability is inherited from parent type', async () => { Array.isArray(3); } - public foo() { + public bar() { Array.isArray(3); } } @@ -344,7 +344,7 @@ test('stability is inherited from parent type', async () => { const classType = assembly.types!['testpkg.Foo'] as spec.ClassType; const initializer = classType.initializer!; - const method = classType.methods!.find((m) => m.name === 'foo')!; + const method = classType.methods!.find((m) => m.name === 'bar')!; expect(classType.docs!.stability).toBe(stability); expect(initializer.docs!.stability).toBe(stability); diff --git a/packages/jsii/test/negatives.test.ts b/packages/jsii/test/negatives.test.ts index a370b78e78..c50cb71354 100644 --- a/packages/jsii/test/negatives.test.ts +++ b/packages/jsii/test/negatives.test.ts @@ -3,14 +3,14 @@ import * as path from 'path'; import * as ts from 'typescript'; import { Compiler } from '../lib/compiler'; import { ProjectInfo } from '../lib/project-info'; +import { formatDiagnostic } from '../lib/utils'; const SOURCE_DIR = path.join(__dirname, 'negatives'); -const formatHost: ts.FormatDiagnosticsHost = { - getCanonicalFileName: ts.sys.realpath ?? ts.sys.resolvePath, - getCurrentDirectory: () => SOURCE_DIR, - getNewLine: () => '\n', -}; +expect.addSnapshotSerializer({ + test: (val) => typeof val === 'string', + serialize: (val: string) => val, +}); for (const source of fs.readdirSync(SOURCE_DIR)) { if ( @@ -38,9 +38,7 @@ for (const source of fs.readdirSync(SOURCE_DIR)) { // Remove suggestion diagnostics, we don't care much for those for now... (diag) => diag.category !== ts.DiagnosticCategory.Suggestion, ) - .map((diag) => - ts.formatDiagnosticsWithColorAndContext([diag], formatHost), - ) + .map((diag) => formatDiagnostic(diag, SOURCE_DIR)) .sort(); expect(diagnostics.length).toBeGreaterThan(0); diff --git a/packages/jsii/test/negatives/mylib.d.ts b/packages/jsii/test/negatives/mylib.d.ts index 506758dc05..9b019fb094 100644 --- a/packages/jsii/test/negatives/mylib.d.ts +++ b/packages/jsii/test/negatives/mylib.d.ts @@ -1,2 +1 @@ -export declare class UnexportedType { -} +export declare class UnexportedType {} diff --git a/packages/jsii/test/negatives/neg.expose-unexported-type-external.ts b/packages/jsii/test/negatives/neg.expose-unexported-type-external.ts index 6187a30c64..38abb42d99 100644 --- a/packages/jsii/test/negatives/neg.expose-unexported-type-external.ts +++ b/packages/jsii/test/negatives/neg.expose-unexported-type-external.ts @@ -1,4 +1,4 @@ -// Attempt to expose an unexported type defined in another file should fial +// Attempt to expose an unexported type defined in another file should fail // because that type will not be available in the module spec. import { UnexportedType } from './mylib'; diff --git a/packages/jsii/test/negatives/neg.implementation-changes-types.4.ts b/packages/jsii/test/negatives/neg.implementation-changes-types.4.ts index 0d3c9ad79e..ee1973941c 100644 --- a/packages/jsii/test/negatives/neg.implementation-changes-types.4.ts +++ b/packages/jsii/test/negatives/neg.implementation-changes-types.4.ts @@ -5,6 +5,6 @@ export interface ISomething { something: Superclass; } -export class Something implements ISomething { +export class SomethingImpl implements ISomething { public something: Subclass = new Subclass(); } diff --git a/packages/jsii/test/negatives/neg.implementation-changes-types.5.ts b/packages/jsii/test/negatives/neg.implementation-changes-types.5.ts index 395d364a9b..ea2a5bfd19 100644 --- a/packages/jsii/test/negatives/neg.implementation-changes-types.5.ts +++ b/packages/jsii/test/negatives/neg.implementation-changes-types.5.ts @@ -10,7 +10,7 @@ export interface ISomethingElse extends ISomething { } // Should still fail even though 2-level inheritance -export class Something implements ISomethingElse { +export class SomethingImpl implements ISomethingElse { public something: Subclass = new Subclass(); - public addUnrelatedMember: number = 1; + public addUnrelatedMember = 1; } diff --git a/packages/jsii/test/negatives/neg.inheritance-changes-types.4.ts b/packages/jsii/test/negatives/neg.inheritance-changes-types.4.ts index ecad08428a..0092dc2062 100644 --- a/packages/jsii/test/negatives/neg.inheritance-changes-types.4.ts +++ b/packages/jsii/test/negatives/neg.inheritance-changes-types.4.ts @@ -1,10 +1,10 @@ export class Superclass {} export class Subclass extends Superclass {} -export class Something { +export class SomethingUnspecific { public something = new Superclass(); } -export class SomethingSpecific extends Something { +export class SomethingSpecific extends SomethingUnspecific { public something: Subclass = new Subclass(); } diff --git a/packages/jsii/test/negatives/neg.inheritance-changes-types.5.ts b/packages/jsii/test/negatives/neg.inheritance-changes-types.5.ts index 2ace670740..5b46b8c6bf 100644 --- a/packages/jsii/test/negatives/neg.inheritance-changes-types.5.ts +++ b/packages/jsii/test/negatives/neg.inheritance-changes-types.5.ts @@ -1,16 +1,16 @@ export class Superclass {} export class Subclass extends Superclass {} -export class Something { +export class SomethingBase { public something: Superclass = new Superclass(); } -export class SomethingElse extends Something { - public addUnrelatedMember: number = 3; +export class SomethingElse extends SomethingBase { + public addUnrelatedMember = 3; } // Should still fail even though 2-level inheritance export class SomethingDifferent extends SomethingElse { public something: Subclass = new Subclass(); - public addUnrelatedMember: number = 1; + public addUnrelatedMember = 1; } diff --git a/packages/jsii/test/negatives/neg.member-named-after-type.ts b/packages/jsii/test/negatives/neg.member-named-after-type.ts new file mode 100644 index 0000000000..f93e0b52af --- /dev/null +++ b/packages/jsii/test/negatives/neg.member-named-after-type.ts @@ -0,0 +1,15 @@ +///!STRICT! + +export class TypeName { + public readonly typeName = 1337; +} + +export class OtherType { + public otherType() { + return; + } +} + +export interface MyStruct { + readonly myStruct: string; +} diff --git a/packages/oo-ascii-tree/package.json b/packages/oo-ascii-tree/package.json index 0171cffe47..017b71bbf9 100644 --- a/packages/oo-ascii-tree/package.json +++ b/packages/oo-ascii-tree/package.json @@ -34,9 +34,9 @@ "@types/jest": "^26.0.10", "@types/node": "^10.17.28", "eslint": "^7.7.0", - "jest": "^26.4.0", + "jest": "^26.4.2", "jsii-build-tools": "^0.0.0", - "prettier": "^2.0.5", + "prettier": "^2.1.0", "typescript": "~3.9.7" }, "jest": { diff --git a/tsconfig-base.json b/tsconfig-base.json index 36781b9c1e..8ed313b06c 100644 --- a/tsconfig-base.json +++ b/tsconfig-base.json @@ -4,6 +4,7 @@ "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ "lib": ["es2018"], /* Specify library files to be included in the compilation: */ "strict": true, /* Enable all strict type-checking options. */ + "strictPropertyInitialization": true, /* Require all properties be initialized in the constructor. */ "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ "declaration": true, /* Generates corresponding '.d.ts' file. */ "esModuleInterop": false, /* Turn on babel and typesystem compatibility with ES modules */ @@ -17,5 +18,6 @@ "resolveJsonModule": true, /* Include modules imported with .json extension. */ "composite": true, /* Ensure TypeScript can determine where to find the outputs of the referenced project to compile project. */ "incremental": true, /* Enable incremental compilation by reading/writing information from prior compilations to a file on disk. */ + "useDefineForClassFields": false, /* Use Object.defineProperty for introducing class fields. */ } } diff --git a/yarn.lock b/yarn.lock index 6276c74b8f..d0f9accaf9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -376,13 +376,13 @@ jest-util "^26.3.0" slash "^3.0.0" -"@jest/core@^26.4.0": - version "26.4.0" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-26.4.0.tgz#8f42ae45640b46b4f8ffee134dcd408c210ab1ef" - integrity sha512-mpXm4OjWQbz7qbzGIiSqvfNZ1FxX6ywWgLtdSD2luPORt5zKPtqcdDnX7L8RdfMaj1znDBgN2+gB094ZIr7vnA== +"@jest/core@^26.4.2": + version "26.4.2" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-26.4.2.tgz#85d0894f31ac29b5bab07aa86806d03dd3d33edc" + integrity sha512-sDva7YkeNprxJfepOctzS8cAk9TOekldh+5FhVuXS40+94SHbiicRO1VV2tSoRtgIo+POs/Cdyf8p76vPTd6dg== dependencies: "@jest/console" "^26.3.0" - "@jest/reporters" "^26.4.0" + "@jest/reporters" "^26.4.1" "@jest/test-result" "^26.3.0" "@jest/transform" "^26.3.0" "@jest/types" "^26.3.0" @@ -392,17 +392,17 @@ exit "^0.1.2" graceful-fs "^4.2.4" jest-changed-files "^26.3.0" - jest-config "^26.4.0" + jest-config "^26.4.2" jest-haste-map "^26.3.0" jest-message-util "^26.3.0" jest-regex-util "^26.0.0" jest-resolve "^26.4.0" - jest-resolve-dependencies "^26.4.0" - jest-runner "^26.4.0" - jest-runtime "^26.4.0" - jest-snapshot "^26.4.0" + jest-resolve-dependencies "^26.4.2" + jest-runner "^26.4.2" + jest-runtime "^26.4.2" + jest-snapshot "^26.4.2" jest-util "^26.3.0" - jest-validate "^26.4.0" + jest-validate "^26.4.2" jest-watcher "^26.3.0" micromatch "^4.0.2" p-each-series "^2.1.0" @@ -432,19 +432,19 @@ jest-mock "^26.3.0" jest-util "^26.3.0" -"@jest/globals@^26.4.0": - version "26.4.0" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-26.4.0.tgz#ebab3ba937a200a4b3805f2e552bdf869465ffea" - integrity sha512-QKwoVAeL9d0xaEM9ebPvfc+bolN04F+o3zM2jswGDBiiNjCogZ3LvOaqumRdDyz6kLmbx+UhgMBAVuLunbXZ2A== +"@jest/globals@^26.4.2": + version "26.4.2" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-26.4.2.tgz#73c2a862ac691d998889a241beb3dc9cada40d4a" + integrity sha512-Ot5ouAlehhHLRhc+sDz2/9bmNv9p5ZWZ9LE1pXGGTCXBasmi5jnYjlgYcYt03FBwLmZXCZ7GrL29c33/XRQiow== dependencies: "@jest/environment" "^26.3.0" "@jest/types" "^26.3.0" - expect "^26.4.0" + expect "^26.4.2" -"@jest/reporters@^26.4.0": - version "26.4.0" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-26.4.0.tgz#dd3f03979170dd25dc6a9b746c693b591056d753" - integrity sha512-14OPAAuYhgRBSNxAocVluX6ksdMdK/EuP9NmtBXU9g1uKaVBrPnohn/CVm6iMot1a9iU8BCxa5715YRf8FEg/A== +"@jest/reporters@^26.4.1": + version "26.4.1" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-26.4.1.tgz#3b4d6faf28650f3965f8b97bc3d114077fb71795" + integrity sha512-aROTkCLU8++yiRGVxLsuDmZsQEKO6LprlrxtAuzvtpbIFl3eIjgIf3EUxDKgomkS25R9ZzwGEdB5weCcBZlrpQ== dependencies: "@bcoe/v8-coverage" "^0.2.3" "@jest/console" "^26.3.0" @@ -471,7 +471,7 @@ terminal-link "^2.0.0" v8-to-istanbul "^5.0.1" optionalDependencies: - node-notifier "^7.0.0" + node-notifier "^8.0.0" "@jest/source-map@^26.3.0": version "26.3.0" @@ -492,16 +492,16 @@ "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-sequencer@^26.4.0": - version "26.4.0" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-26.4.0.tgz#f4902772392d478d310dd6fd3b6818fb4bcc4c82" - integrity sha512-9Z7lCShS7vERp+DRwIVNH/6sHMWwJK1DPnGCpGeVLGJJWJ4Y08sQI3vIKdmKHu2KmwlUBpRM+BFf7NlVUkl5XA== +"@jest/test-sequencer@^26.4.2": + version "26.4.2" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-26.4.2.tgz#58a3760a61eec758a2ce6080201424580d97cbba" + integrity sha512-83DRD8N3M0tOhz9h0bn6Kl6dSp+US6DazuVF8J9m21WAp5x7CqSMaNycMP0aemC/SH/pDQQddbsfHRTBXVUgog== dependencies: "@jest/test-result" "^26.3.0" graceful-fs "^4.2.4" jest-haste-map "^26.3.0" - jest-runner "^26.4.0" - jest-runtime "^26.4.0" + jest-runner "^26.4.2" + jest-runtime "^26.4.2" "@jest/transform@^26.3.0": version "26.3.0" @@ -1499,10 +1499,10 @@ dependencies: "@types/node" "*" -"@types/inquirer@^7.3.0": - version "7.3.0" - resolved "https://registry.yarnpkg.com/@types/inquirer/-/inquirer-7.3.0.tgz#a1233632ea6249f14eb481dae91138e747b85664" - integrity sha512-wcPs5jTrZYQBzzPlvUEzBcptzO4We2sijSvkBq8oAKRMJoH8PvrmP6QQnxLB5RScNUmRfujxA+ngxD4gk4xe7Q== +"@types/inquirer@^7.3.1": + version "7.3.1" + resolved "https://registry.yarnpkg.com/@types/inquirer/-/inquirer-7.3.1.tgz#1f231224e7df11ccfaf4cf9acbcc3b935fea292d" + integrity sha512-osD38QVIfcdgsPCT0V3lD7eH0OFurX71Jft18bZrsVQWVRt6TuxRzlr0GJLrxoHZR2V5ph7/qP8se/dcnI7o0g== dependencies: "@types/through" "*" rxjs "^6.4.0" @@ -1549,7 +1549,7 @@ jest-diff "^25.2.1" pretty-format "^25.2.1" -"@types/json-schema@^7.0.3", "@types/json-schema@^7.0.4": +"@types/json-schema@^7.0.3", "@types/json-schema@^7.0.4", "@types/json-schema@^7.0.5": version "7.0.5" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.5.tgz#dcce4430e64b443ba8945f0290fb564ad5bac6dd" integrity sha512-7+2BITlgjgDhH0vvwZU/HZJVyk+2XUlvxXe8dFMedNX/aMkaOq++rMAFXc0tM7ij15QaWlbdQASBR9dihi+bDQ== @@ -1603,10 +1603,10 @@ resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.0.2.tgz#5bb52ee68d0f8efa9cc0099920e56be6cc4e37f3" integrity sha512-IkVfat549ggtkZUthUzEX49562eGikhSYeVGX97SkMFn+sTZrgRewXjQ4tPKFPCykZHkX1Zfd9OoELGqKU2jJA== -"@types/semver@^7.3.2": - version "7.3.2" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.2.tgz#39a0ee84ac60d77ed994b82c0d43895cbdd0e584" - integrity sha512-WrIesso5O0K9S/T87Uct2AvmEFqul11PnprQ98BZEyWILz8QYJt6/tlmqSOVKLNUtAgYHU7D9WGsOFVDb35nPA== +"@types/semver@^7.3.3": + version "7.3.3" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.3.tgz#3ad6ed949e7487e7bda6f886b4a2434a2c3d7b1a" + integrity sha512-jQxClWFzv9IXdLdhSaTf16XI3NYe6zrEbckSpb5xhKfPbWgIyAY0AFyWWWfaiDcBuj3UHmMkCIwSRqpKMTZL2Q== "@types/stack-utils@^1.0.1": version "1.0.1" @@ -1655,52 +1655,68 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@^3.9.0": - version "3.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.9.0.tgz#0fe529b33d63c9a94f7503ca2bb12c84b9477ff3" - integrity sha512-UD6b4p0/hSe1xdTvRCENSx7iQ+KR6ourlZFfYuPC7FlXEzdHuLPrEmuxZ23b2zW96KJX9Z3w05GE/wNOiEzrVg== +"@typescript-eslint/eslint-plugin@^3.10.0": + version "3.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.10.0.tgz#40fd53e81639c0d1a515b44e5fdf4c03dfd3cd39" + integrity sha512-Bbeg9JAnSzZ85Y0gpInZscSpifA6SbEgRryaKdP5ZlUjhTKsvZS4GUIE6xAZCjhNTrf4zXXsySo83ZdHL7it0w== dependencies: - "@typescript-eslint/experimental-utils" "3.9.0" + "@typescript-eslint/experimental-utils" "3.10.0" debug "^4.1.1" functional-red-black-tree "^1.0.1" regexpp "^3.0.0" semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@3.9.0": - version "3.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-3.9.0.tgz#3171d8ddba0bf02a8c2034188593630914fcf5ee" - integrity sha512-/vSHUDYizSOhrOJdjYxPNGfb4a3ibO8zd4nUKo/QBFOmxosT3cVUV7KIg8Dwi6TXlr667G7YPqFK9+VSZOorNA== +"@typescript-eslint/experimental-utils@3.10.0": + version "3.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-3.10.0.tgz#f97a669a84a78319ab324cd51169d0c52853a360" + integrity sha512-e5ZLSTuXgqC/Gq3QzK2orjlhTZVXzwxDujQmTBOM1NIVBZgW3wiIZjaXuVutk9R4UltFlwC9UD2+bdxsA7yyNg== dependencies: "@types/json-schema" "^7.0.3" - "@typescript-eslint/types" "3.9.0" - "@typescript-eslint/typescript-estree" "3.9.0" + "@typescript-eslint/types" "3.10.0" + "@typescript-eslint/typescript-estree" "3.10.0" eslint-scope "^5.0.0" eslint-utils "^2.0.0" -"@typescript-eslint/parser@^3.9.0": - version "3.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-3.9.0.tgz#344978a265d9a5c7c8f13e62c78172a4374dabea" - integrity sha512-rDHOKb6uW2jZkHQniUQVZkixQrfsZGUCNWWbKWep4A5hGhN5dLHMUCNAWnC4tXRlHedXkTDptIpxs6e4Pz8UfA== +"@typescript-eslint/experimental-utils@3.10.1": + version "3.10.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-3.10.1.tgz#e179ffc81a80ebcae2ea04e0332f8b251345a686" + integrity sha512-DewqIgscDzmAfd5nOGe4zm6Bl7PKtMG2Ad0KG8CUZAHlXfAKTF9Ol5PXhiMh39yRL2ChRH1cuuUGOcVyyrhQIw== + dependencies: + "@types/json-schema" "^7.0.3" + "@typescript-eslint/types" "3.10.1" + "@typescript-eslint/typescript-estree" "3.10.1" + eslint-scope "^5.0.0" + eslint-utils "^2.0.0" + +"@typescript-eslint/parser@^3.10.1": + version "3.10.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-3.10.1.tgz#1883858e83e8b442627e1ac6f408925211155467" + integrity sha512-Ug1RcWcrJP02hmtaXVS3axPPTTPnZjupqhgj+NnZ6BCkwSImWk/283347+x9wN+lqOdK9Eo3vsyiyDHgsmiEJw== dependencies: "@types/eslint-visitor-keys" "^1.0.0" - "@typescript-eslint/experimental-utils" "3.9.0" - "@typescript-eslint/types" "3.9.0" - "@typescript-eslint/typescript-estree" "3.9.0" + "@typescript-eslint/experimental-utils" "3.10.1" + "@typescript-eslint/types" "3.10.1" + "@typescript-eslint/typescript-estree" "3.10.1" eslint-visitor-keys "^1.1.0" -"@typescript-eslint/types@3.9.0": - version "3.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-3.9.0.tgz#be9d0aa451e1bf3ce99f2e6920659e5b2e6bfe18" - integrity sha512-rb6LDr+dk9RVVXO/NJE8dT1pGlso3voNdEIN8ugm4CWM5w5GimbThCMiMl4da1t5u3YwPWEwOnKAULCZgBtBHg== +"@typescript-eslint/types@3.10.0": + version "3.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-3.10.0.tgz#b81906674eca94a884345ba0bc1aaf6cd4da912a" + integrity sha512-ktUWSa75heQNwH85GRM7qP/UUrXqx9d6yIdw0iLO9/uE1LILW+i+3+B64dUodUS2WFWLzKTlwfi9giqrODibWg== -"@typescript-eslint/typescript-estree@3.9.0": - version "3.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-3.9.0.tgz#c6abbb50fa0d715cab46fef67ca6378bf2eaca13" - integrity sha512-N+158NKgN4rOmWVfvKOMoMFV5n8XxAliaKkArm/sOypzQ0bUL8MSnOEBW3VFIeffb/K5ce/cAV0yYhR7U4ALAA== +"@typescript-eslint/types@3.10.1": + version "3.10.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-3.10.1.tgz#1d7463fa7c32d8a23ab508a803ca2fe26e758727" + integrity sha512-+3+FCUJIahE9q0lDi1WleYzjCwJs5hIsbugIgnbB+dSCYUxl8L6PwmsyOPFZde2hc1DlTo/xnkOgiTLSyAbHiQ== + +"@typescript-eslint/typescript-estree@3.10.0": + version "3.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-3.10.0.tgz#65df13579a5e53c12afb4f1c5309589e3855a5de" + integrity sha512-yjuY6rmVHRhcUKgXaSPNVloRueGWpFNhxR5EQLzxXfiFSl1U/+FBqHhbaGwtPPEgCSt61QNhZgiFjWT27bgAyw== dependencies: - "@typescript-eslint/types" "3.9.0" - "@typescript-eslint/visitor-keys" "3.9.0" + "@typescript-eslint/types" "3.10.0" + "@typescript-eslint/visitor-keys" "3.10.0" debug "^4.1.1" glob "^7.1.6" is-glob "^4.0.1" @@ -1708,10 +1724,31 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/visitor-keys@3.9.0": - version "3.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-3.9.0.tgz#44de8e1b1df67adaf3b94d6b60b80f8faebc8dd3" - integrity sha512-O1qeoGqDbu0EZUC/MZ6F1WHTIzcBVhGqDj3LhTnj65WUA548RXVxUHbYhAW9bZWfb2rnX9QsbbP5nmeJ5Z4+ng== +"@typescript-eslint/typescript-estree@3.10.1": + version "3.10.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-3.10.1.tgz#fd0061cc38add4fad45136d654408569f365b853" + integrity sha512-QbcXOuq6WYvnB3XPsZpIwztBoquEYLXh2MtwVU+kO8jgYCiv4G5xrSP/1wg4tkvrEE+esZVquIPX/dxPlePk1w== + dependencies: + "@typescript-eslint/types" "3.10.1" + "@typescript-eslint/visitor-keys" "3.10.1" + debug "^4.1.1" + glob "^7.1.6" + is-glob "^4.0.1" + lodash "^4.17.15" + semver "^7.3.2" + tsutils "^3.17.1" + +"@typescript-eslint/visitor-keys@3.10.0": + version "3.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-3.10.0.tgz#6c0cac867e705a42e2c71b359bf6a10a88a28985" + integrity sha512-g4qftk8lWb/rHZe9uEp8oZSvsJhUvR2cfp7F7qE6DyUD2SsovEs8JDQTRP1xHzsD+pERsEpYNqkDgQXW6+ob5A== + dependencies: + eslint-visitor-keys "^1.1.0" + +"@typescript-eslint/visitor-keys@3.10.1": + version "3.10.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-3.10.1.tgz#cd4274773e3eb63b2e870ac602274487ecd1e931" + integrity sha512-9JgC82AaQeglebjZMgYR5wgmfUdUc+EitGUUMW8u2nDckaeimzW+VsoLV6FoimPv2id3VQzfjwBxEMVz08ameQ== dependencies: eslint-visitor-keys "^1.1.0" @@ -3603,9 +3640,9 @@ domexception@^2.0.1: webidl-conversions "^5.0.0" dot-prop@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57" - integrity sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ== + version "4.2.1" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.1.tgz#45884194a71fc2cda71cbb4bceb3a4dd2f433ba4" + integrity sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ== dependencies: is-obj "^1.0.0" @@ -4076,15 +4113,15 @@ expand-tilde@^2.0.0, expand-tilde@^2.0.2: dependencies: homedir-polyfill "^1.0.1" -expect@^26.4.0: - version "26.4.0" - resolved "https://registry.yarnpkg.com/expect/-/expect-26.4.0.tgz#34a0aae523343b0931ff1cf0aa972dfe40edfab4" - integrity sha512-dbYDJhFcqQsamlos6nEwAMe+ahdckJBk5fmw1DYGLQGabGSlUuT+Fm2jHYw5119zG3uIhP+lCQbjJhFEdZMJtg== +expect@^26.4.2: + version "26.4.2" + resolved "https://registry.yarnpkg.com/expect/-/expect-26.4.2.tgz#36db120928a5a2d7d9736643032de32f24e1b2a1" + integrity sha512-IlJ3X52Z0lDHm7gjEp+m76uX46ldH5VpqmU0006vqDju/285twh7zaWMRhs67VpQhBwjjMchk+p5aA0VkERCAA== dependencies: "@jest/types" "^26.3.0" ansi-styles "^4.0.0" jest-get-type "^26.3.0" - jest-matcher-utils "^26.4.0" + jest-matcher-utils "^26.4.2" jest-message-util "^26.3.0" jest-regex-util "^26.0.0" @@ -4579,7 +4616,7 @@ glob-to-regexp@^0.3.0: resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= -glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@~7.1.4: +glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@~7.1.6: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== @@ -4855,13 +4892,6 @@ iconv-lite@0.4.24, iconv-lite@^0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" -iconv-lite@^0.5.1: - version "0.5.2" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.5.2.tgz#af6d628dccfb463b7364d97f715e4b74b8c8c2b8" - integrity sha512-kERHXvpSaB4aU3eANwidg79K8FlrN77m8G9V+0vOR3HYaRifrlwMEpT7ZBJqLSEIHnEgJTHcWK82wwLwwKwtag== - dependencies: - safer-buffer ">= 2.1.2 < 3" - iconv-lite@^0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.2.tgz#ce13d1875b0c3a674bd6a04b7f76b01b1b6ded01" @@ -5451,12 +5481,12 @@ jest-changed-files@^26.3.0: execa "^4.0.0" throat "^5.0.0" -jest-cli@^26.4.0: - version "26.4.0" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-26.4.0.tgz#9cbd6be818cd818d85bafe2cffa1dbf043602b28" - integrity sha512-kw2Pr3V2x9/WzSDGsbz/MJBNlCoPMxMudrIavft4bqRlv5tASjU51tyO+1Os1LdW2dAnLQZYsxFUZ8oWPyssGQ== +jest-cli@^26.4.2: + version "26.4.2" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-26.4.2.tgz#24afc6e4dfc25cde4c7ec4226fb7db5f157c21da" + integrity sha512-zb+lGd/SfrPvoRSC/0LWdaWCnscXc1mGYW//NP4/tmBvRPT3VntZ2jtKUONsRi59zc5JqmsSajA9ewJKFYp8Cw== dependencies: - "@jest/core" "^26.4.0" + "@jest/core" "^26.4.2" "@jest/test-result" "^26.3.0" "@jest/types" "^26.3.0" chalk "^4.0.0" @@ -5464,19 +5494,19 @@ jest-cli@^26.4.0: graceful-fs "^4.2.4" import-local "^3.0.2" is-ci "^2.0.0" - jest-config "^26.4.0" + jest-config "^26.4.2" jest-util "^26.3.0" - jest-validate "^26.4.0" + jest-validate "^26.4.2" prompts "^2.0.1" yargs "^15.3.1" -jest-config@^26.4.0: - version "26.4.0" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-26.4.0.tgz#72ff3d0418b7ee7fdd9e2bcaef4dec10b38b3b02" - integrity sha512-MxsvrBug8YY+C4QcUBtmgnHyFeW7w3Ouk/w9eplCDN8VJGVyBEZFe8Lxzfp2pSqh0Dqurqv8Oik2YkbekGUlxg== +jest-config@^26.4.2: + version "26.4.2" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-26.4.2.tgz#da0cbb7dc2c131ffe831f0f7f2a36256e6086558" + integrity sha512-QBf7YGLuToiM8PmTnJEdRxyYy3mHWLh24LJZKVdXZ2PNdizSe1B/E8bVm+HYcjbEzGuVXDv/di+EzdO/6Gq80A== dependencies: "@babel/core" "^7.1.0" - "@jest/test-sequencer" "^26.4.0" + "@jest/test-sequencer" "^26.4.2" "@jest/types" "^26.3.0" babel-jest "^26.3.0" chalk "^4.0.0" @@ -5486,13 +5516,13 @@ jest-config@^26.4.0: jest-environment-jsdom "^26.3.0" jest-environment-node "^26.3.0" jest-get-type "^26.3.0" - jest-jasmine2 "^26.4.0" + jest-jasmine2 "^26.4.2" jest-regex-util "^26.0.0" jest-resolve "^26.4.0" jest-util "^26.3.0" - jest-validate "^26.4.0" + jest-validate "^26.4.2" micromatch "^4.0.2" - pretty-format "^26.4.0" + pretty-format "^26.4.2" jest-diff@^25.2.1: version "25.5.0" @@ -5504,15 +5534,15 @@ jest-diff@^25.2.1: jest-get-type "^25.2.6" pretty-format "^25.5.0" -jest-diff@^26.4.0: - version "26.4.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-26.4.0.tgz#d073a0a11952b5bd9f1ff39bb9ad24304a0c55f7" - integrity sha512-wwC38HlOW+iTq6j5tkj/ZamHn6/nrdcEOc/fKaVILNtN2NLWGdkfRaHWwfNYr5ehaLvuoG2LfCZIcWByVj0gjg== +jest-diff@^26.4.2: + version "26.4.2" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-26.4.2.tgz#a1b7b303bcc534aabdb3bd4a7caf594ac059f5aa" + integrity sha512-6T1XQY8U28WH0Z5rGpQ+VqZSZz8EN8rZcBtfvXaOkbwxIEeRre6qnuZQlbY1AJ4MKDxQF8EkrCvK+hL/VkyYLQ== dependencies: chalk "^4.0.0" diff-sequences "^26.3.0" jest-get-type "^26.3.0" - pretty-format "^26.4.0" + pretty-format "^26.4.2" jest-docblock@^26.0.0: version "26.0.0" @@ -5521,16 +5551,16 @@ jest-docblock@^26.0.0: dependencies: detect-newline "^3.0.0" -jest-each@^26.4.0: - version "26.4.0" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-26.4.0.tgz#c53605b20e7a0a58d6dcf4d8b2f309e607d35d5a" - integrity sha512-+cyBh1ehs6thVT/bsZVG+WwmRn2ix4Q4noS9yLZgM10yGWPW12/TDvwuOV2VZXn1gi09/ZwJKJWql6YW1C9zNw== +jest-each@^26.4.2: + version "26.4.2" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-26.4.2.tgz#bb14f7f4304f2bb2e2b81f783f989449b8b6ffae" + integrity sha512-p15rt8r8cUcRY0Mvo1fpkOGYm7iI8S6ySxgIdfh3oOIv+gHwrHTy5VWCGOecWUhDsit4Nz8avJWdT07WLpbwDA== dependencies: "@jest/types" "^26.3.0" chalk "^4.0.0" jest-get-type "^26.3.0" jest-util "^26.3.0" - pretty-format "^26.4.0" + pretty-format "^26.4.2" jest-environment-jsdom@^26.3.0: version "26.3.0" @@ -5593,10 +5623,10 @@ jest-haste-map@^26.3.0: optionalDependencies: fsevents "^2.1.2" -jest-jasmine2@^26.4.0: - version "26.4.0" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-26.4.0.tgz#f66b2237203df4227d3bdbb4b8a0de54ba877d35" - integrity sha512-cGBxwzDDKB09EPJ4pE69BMDv+2lO442IB1xQd+vL3cua2OKdeXQK6iDlQKoRX/iP0RgU5T8sn9yahLcx/+ox8Q== +jest-jasmine2@^26.4.2: + version "26.4.2" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-26.4.2.tgz#18a9d5bec30904267ac5e9797570932aec1e2257" + integrity sha512-z7H4EpCldHN1J8fNgsja58QftxBSL+JcwZmaXIvV9WKIM+x49F4GLHu/+BQh2kzRKHAgaN/E82od+8rTOBPyPA== dependencies: "@babel/traverse" "^7.1.0" "@jest/environment" "^26.3.0" @@ -5606,34 +5636,34 @@ jest-jasmine2@^26.4.0: "@types/node" "*" chalk "^4.0.0" co "^4.6.0" - expect "^26.4.0" + expect "^26.4.2" is-generator-fn "^2.0.0" - jest-each "^26.4.0" - jest-matcher-utils "^26.4.0" + jest-each "^26.4.2" + jest-matcher-utils "^26.4.2" jest-message-util "^26.3.0" - jest-runtime "^26.4.0" - jest-snapshot "^26.4.0" + jest-runtime "^26.4.2" + jest-snapshot "^26.4.2" jest-util "^26.3.0" - pretty-format "^26.4.0" + pretty-format "^26.4.2" throat "^5.0.0" -jest-leak-detector@^26.4.0: - version "26.4.0" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-26.4.0.tgz#1efeeef693af3c9332062876add5ac5f25cb0a70" - integrity sha512-7EXKKEKnAWUPyiVtGZzJflbPOtYUdlNoevNVOkAcPpdR8xWiYKPGNGA6sz25S+8YhZq3rmkQJYAh3/P0VnoRwA== +jest-leak-detector@^26.4.2: + version "26.4.2" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-26.4.2.tgz#c73e2fa8757bf905f6f66fb9e0070b70fa0f573f" + integrity sha512-akzGcxwxtE+9ZJZRW+M2o+nTNnmQZxrHJxX/HjgDaU5+PLmY1qnQPnMjgADPGCRPhB+Yawe1iij0REe+k/aHoA== dependencies: jest-get-type "^26.3.0" - pretty-format "^26.4.0" + pretty-format "^26.4.2" -jest-matcher-utils@^26.4.0: - version "26.4.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-26.4.0.tgz#2bce9a939e008b894faf1bd4b5bb58facd00c252" - integrity sha512-u+xdCdq+F262DH+PutJKXLGr2H5P3DImdJCir51PGSfi3TtbLQ5tbzKaN8BkXbiTIU6ayuAYBWTlU1nyckVdzA== +jest-matcher-utils@^26.4.2: + version "26.4.2" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-26.4.2.tgz#fa81f3693f7cb67e5fc1537317525ef3b85f4b06" + integrity sha512-KcbNqWfWUG24R7tu9WcAOKKdiXiXCbMvQYT6iodZ9k1f7065k0keUOW6XpJMMvah+hTfqkhJhRXmA3r3zMAg0Q== dependencies: chalk "^4.0.0" - jest-diff "^26.4.0" + jest-diff "^26.4.2" jest-get-type "^26.3.0" - pretty-format "^26.4.0" + pretty-format "^26.4.2" jest-message-util@^26.3.0: version "26.3.0" @@ -5667,14 +5697,14 @@ jest-regex-util@^26.0.0: resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-26.0.0.tgz#d25e7184b36e39fd466c3bc41be0971e821fee28" integrity sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A== -jest-resolve-dependencies@^26.4.0: - version "26.4.0" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-26.4.0.tgz#c911fc991e1ae034dd8d01c192f23459d66b87b7" - integrity sha512-hznK/hlrlhu8hwdbieRdHFKmcV83GW8t30libt/v6j1L3IEzb8iN21SaWzV8KRAAK4ijiU0kuge0wnHn+0rytQ== +jest-resolve-dependencies@^26.4.2: + version "26.4.2" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-26.4.2.tgz#739bdb027c14befb2fe5aabbd03f7bab355f1dc5" + integrity sha512-ADHaOwqEcVc71uTfySzSowA/RdxUpCxhxa2FNLiin9vWLB1uLPad3we+JSSROq5+SrL9iYPdZZF8bdKM7XABTQ== dependencies: "@jest/types" "^26.3.0" jest-regex-util "^26.0.0" - jest-snapshot "^26.4.0" + jest-snapshot "^26.4.2" jest-resolve@^26.4.0: version "26.4.0" @@ -5690,10 +5720,10 @@ jest-resolve@^26.4.0: resolve "^1.17.0" slash "^3.0.0" -jest-runner@^26.4.0: - version "26.4.0" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-26.4.0.tgz#4cb91b266390fbf266294a7d8250d0e7bf8c7a9d" - integrity sha512-XF+tnUGolnPriu6Gg+HHWftspMjD5NkTV2mQppQnpZe39GcUangJ0al7aBGtA3GbVAcRd048DQiJPmsQRdugjw== +jest-runner@^26.4.2: + version "26.4.2" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-26.4.2.tgz#c3ec5482c8edd31973bd3935df5a449a45b5b853" + integrity sha512-FgjDHeVknDjw1gRAYaoUoShe1K3XUuFMkIaXbdhEys+1O4bEJS8Avmn4lBwoMfL8O5oFTdWYKcf3tEJyyYyk8g== dependencies: "@jest/console" "^26.3.0" "@jest/environment" "^26.3.0" @@ -5704,27 +5734,27 @@ jest-runner@^26.4.0: emittery "^0.7.1" exit "^0.1.2" graceful-fs "^4.2.4" - jest-config "^26.4.0" + jest-config "^26.4.2" jest-docblock "^26.0.0" jest-haste-map "^26.3.0" - jest-leak-detector "^26.4.0" + jest-leak-detector "^26.4.2" jest-message-util "^26.3.0" jest-resolve "^26.4.0" - jest-runtime "^26.4.0" + jest-runtime "^26.4.2" jest-util "^26.3.0" jest-worker "^26.3.0" source-map-support "^0.5.6" throat "^5.0.0" -jest-runtime@^26.4.0: - version "26.4.0" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-26.4.0.tgz#0b860f2bcf4f6047919c5b3fe74ed6adbe0056b4" - integrity sha512-1fjZgGpkyQBUTo59Vi19I4IcsBwzY6uwVFNjUmR06iIi3XRErkY28yimi4IUDRrofQErqcDEw2n3DF9WmQ6vEg== +jest-runtime@^26.4.2: + version "26.4.2" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-26.4.2.tgz#94ce17890353c92e4206580c73a8f0c024c33c42" + integrity sha512-4Pe7Uk5a80FnbHwSOk7ojNCJvz3Ks2CNQWT5Z7MJo4tX0jb3V/LThKvD9tKPNVNyeMH98J/nzGlcwc00R2dSHQ== dependencies: "@jest/console" "^26.3.0" "@jest/environment" "^26.3.0" "@jest/fake-timers" "^26.3.0" - "@jest/globals" "^26.4.0" + "@jest/globals" "^26.4.2" "@jest/source-map" "^26.3.0" "@jest/test-result" "^26.3.0" "@jest/transform" "^26.3.0" @@ -5735,15 +5765,15 @@ jest-runtime@^26.4.0: exit "^0.1.2" glob "^7.1.3" graceful-fs "^4.2.4" - jest-config "^26.4.0" + jest-config "^26.4.2" jest-haste-map "^26.3.0" jest-message-util "^26.3.0" jest-mock "^26.3.0" jest-regex-util "^26.0.0" jest-resolve "^26.4.0" - jest-snapshot "^26.4.0" + jest-snapshot "^26.4.2" jest-util "^26.3.0" - jest-validate "^26.4.0" + jest-validate "^26.4.2" slash "^3.0.0" strip-bom "^4.0.0" yargs "^15.3.1" @@ -5756,25 +5786,25 @@ jest-serializer@^26.3.0: "@types/node" "*" graceful-fs "^4.2.4" -jest-snapshot@^26.4.0: - version "26.4.0" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-26.4.0.tgz#efd42eef09bcb33e9a3eb98e229f2368c73c9235" - integrity sha512-vFGmNGWHMBomrlOpheTMoqihymovuH3GqfmaEIWoPpsxUXyxT3IlbxI5I4m2vg0uv3HUJYg5JoGrkgMzVsAwCg== +jest-snapshot@^26.4.2: + version "26.4.2" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-26.4.2.tgz#87d3ac2f2bd87ea8003602fbebd8fcb9e94104f6" + integrity sha512-N6Uub8FccKlf5SBFnL2Ri/xofbaA68Cc3MGjP/NuwgnsvWh+9hLIR/DhrxbSiKXMY9vUW5dI6EW1eHaDHqe9sg== dependencies: "@babel/types" "^7.0.0" "@jest/types" "^26.3.0" "@types/prettier" "^2.0.0" chalk "^4.0.0" - expect "^26.4.0" + expect "^26.4.2" graceful-fs "^4.2.4" - jest-diff "^26.4.0" + jest-diff "^26.4.2" jest-get-type "^26.3.0" jest-haste-map "^26.3.0" - jest-matcher-utils "^26.4.0" + jest-matcher-utils "^26.4.2" jest-message-util "^26.3.0" jest-resolve "^26.4.0" natural-compare "^1.4.0" - pretty-format "^26.4.0" + pretty-format "^26.4.2" semver "^7.3.2" jest-util@26.x, jest-util@^26.3.0: @@ -5789,17 +5819,17 @@ jest-util@26.x, jest-util@^26.3.0: is-ci "^2.0.0" micromatch "^4.0.2" -jest-validate@^26.4.0: - version "26.4.0" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-26.4.0.tgz#3874a7cc9e27328afac88899ee9e2fae5e3a4293" - integrity sha512-t56Z/FRMrLP6mpmje7/YgHy0wOzcuc6i3LBXz6kjmsUWYN62OuMdC86Vg9/dX59SvyitSqqegOrx+h7BkNXeaQ== +jest-validate@^26.4.2: + version "26.4.2" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-26.4.2.tgz#e871b0dfe97747133014dcf6445ee8018398f39c" + integrity sha512-blft+xDX7XXghfhY0mrsBCYhX365n8K5wNDC4XAcNKqqjEzsRUSXP44m6PL0QJEW2crxQFLLztVnJ4j7oPlQrQ== dependencies: "@jest/types" "^26.3.0" camelcase "^6.0.0" chalk "^4.0.0" jest-get-type "^26.3.0" leven "^3.1.0" - pretty-format "^26.4.0" + pretty-format "^26.4.2" jest-watcher@^26.3.0: version "26.3.0" @@ -5823,14 +5853,14 @@ jest-worker@^26.3.0: merge-stream "^2.0.0" supports-color "^7.0.0" -jest@^26.4.0: - version "26.4.0" - resolved "https://registry.yarnpkg.com/jest/-/jest-26.4.0.tgz#495e81dcff40f8a656e567c664af87b29c5c5922" - integrity sha512-lNCOS+ckRHE1wFyVtQClBmbsOVuH2GWUTJMDL3vunp9DXcah+V8vfvVVApngClcdoc3rgZpqOfCNKLjxjj2l4g== +jest@^26.4.2: + version "26.4.2" + resolved "https://registry.yarnpkg.com/jest/-/jest-26.4.2.tgz#7e8bfb348ec33f5459adeaffc1a25d5752d9d312" + integrity sha512-LLCjPrUh98Ik8CzW8LLVnSCfLaiY+wbK53U7VxnFSX7Q+kWC4noVeDvGWIFw0Amfq1lq2VfGm7YHWSLBV62MJw== dependencies: - "@jest/core" "^26.4.0" + "@jest/core" "^26.4.2" import-local "^3.0.2" - jest-cli "^26.4.0" + jest-cli "^26.4.2" js-tokens@^4.0.0: version "4.0.0" @@ -6584,10 +6614,10 @@ mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.3: dependencies: minimist "^1.2.5" -mock-fs@^4.12.0: - version "4.12.0" - resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.12.0.tgz#a5d50b12d2d75e5bec9dac3b67ffe3c41d31ade4" - integrity sha512-/P/HtrlvBxY4o/PzXY9cCNBrdylDNxg7gnrv2sMNxj+UJ2m8jSpl0/A6fuJeNAWr99ZvGWH8XCbE0vmnM5KupQ== +mock-fs@^4.13.0: + version "4.13.0" + resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.13.0.tgz#31c02263673ec3789f90eb7b6963676aa407a598" + integrity sha512-DD0vOdofJdoaRNtnWcrXe6RQbpHkPPmtqGq14uRX0F8ZKJ5nv89CVTYl/BZdppDxBDaV0hl75htg3abpEWlPZA== modify-values@^1.0.0: version "1.0.1" @@ -6752,16 +6782,16 @@ node-modules-regexp@^1.0.0: resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= -node-notifier@^7.0.0: - version "7.0.2" - resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-7.0.2.tgz#3a70b1b70aca5e919d0b1b022530697466d9c675" - integrity sha512-ux+n4hPVETuTL8+daJXTOC6uKLgMsl1RYfFv7DKRzyvzBapqco0rZZ9g72ZN8VS6V+gvNYHYa/ofcCY8fkJWsA== +node-notifier@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-8.0.0.tgz#a7eee2d51da6d0f7ff5094bc7108c911240c1620" + integrity sha512-46z7DUmcjoYdaWyXouuFNNfUo6eFa94t23c53c+lG/9Cvauk4a98rAUp9672X5dxGdQmLpPzTxzu8f/OeEPaFA== dependencies: growly "^1.3.0" is-wsl "^2.2.0" semver "^7.3.2" shellwords "^0.1.1" - uuid "^8.2.0" + uuid "^8.3.0" which "^2.0.2" nopt@^4.0.1: @@ -7406,10 +7436,10 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.5.tgz#d6d56282455243f2f92cc1716692c08aa31522d4" - integrity sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg== +prettier@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.1.0.tgz#5a9789f767a243118c60f3e56d95cb6544914fbb" + integrity sha512-lz28cCbA1cDFHVuY8vvj6QuqOwIpyIfPUYkSl8AZ/vxH8qBXMMjE2knfLHCrZCmUsK/H1bg1P0tOo0dJkTJHvw== pretty-format@^25.2.1, pretty-format@^25.5.0: version "25.5.0" @@ -7421,10 +7451,10 @@ pretty-format@^25.2.1, pretty-format@^25.5.0: ansi-styles "^4.0.0" react-is "^16.12.0" -pretty-format@^26.4.0: - version "26.4.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.4.0.tgz#c08073f531429e9e5024049446f42ecc9f933a3b" - integrity sha512-mEEwwpCseqrUtuMbrJG4b824877pM5xald3AkilJ47Po2YLr97/siejYQHqj2oDQBeJNbu+Q0qUuekJ8F0NAPg== +pretty-format@^26.4.2: + version "26.4.2" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.4.2.tgz#d081d032b398e801e2012af2df1214ef75a81237" + integrity sha512-zK6Gd8zDsEiVydOCGLkoBoZuqv8VTiHyAbKznXe/gaph/DAeZOmit9yMfgIz5adIgAMMs5XfoYSwAX3jcCO1tA== dependencies: "@jest/types" "^26.3.0" ansi-regex "^5.0.0" @@ -8078,7 +8108,7 @@ schema-utils@^1.0.0: ajv-errors "^1.0.0" ajv-keywords "^3.1.0" -schema-utils@^2.6.6: +schema-utils@^2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.7.0.tgz#17151f76d8eae67fbbf77960c33c676ad9f4efc7" integrity sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A== @@ -8303,16 +8333,16 @@ source-list-map@^2.0.0: resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== -source-map-loader@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/source-map-loader/-/source-map-loader-1.0.1.tgz#703df5345b0816734f0336c1ccee8af66e082061" - integrity sha512-DE4CJyfCVoxFLsHyuVE9Sjcib8cs5qdmOq3wcev1Un/r6F2AfQJDhag4rzpPPA48A2QZyV3CTbc+NGoFMfKIOQ== +source-map-loader@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/source-map-loader/-/source-map-loader-1.0.2.tgz#b0a6582b2eaa387ede1ecf8061ae0b93c23f9eb0" + integrity sha512-oX8d6ndRjN+tVyjj6PlXSyFPhDdVAPsZA30nD3/II8g4uOv8fCz0DMn5sy8KtVbDfKQxOpGwGJnK3xIW3tauDw== dependencies: data-urls "^2.0.0" - iconv-lite "^0.5.1" + iconv-lite "^0.6.2" loader-utils "^2.0.0" - schema-utils "^2.6.6" - source-map "^0.6.0" + schema-utils "^2.7.0" + source-map "^0.6.1" source-map-resolve@^0.5.0: version "0.5.3" @@ -9001,10 +9031,10 @@ ts-jest@^26.2.0: semver "7.x" yargs-parser "18.x" -ts-node@^8.10.2: - version "8.10.2" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-8.10.2.tgz#eee03764633b1234ddd37f8db9ec10b75ec7fb8d" - integrity sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA== +ts-node@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-9.0.0.tgz#e7699d2a110cc8c0d3b831715e417688683460b3" + integrity sha512-/TqB4SnererCDR/vb4S/QvSZvzQMJN8daAslg7MeaiHvD8rDZsSfXmNeNumyZZzMned72Xoq/isQljYSt8Ynfg== dependencies: arg "^4.1.0" diff "^4.0.1" @@ -9107,22 +9137,27 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript-json-schema@^0.42.0: - version "0.42.0" - resolved "https://registry.yarnpkg.com/typescript-json-schema/-/typescript-json-schema-0.42.0.tgz#695f212a72d91d47c0605371dc697597b7817c1b" - integrity sha512-9WO+lVmlph7Ecb7lPd9tU84XFUQh44kpAf3cWe/Ym4G5EKw/SS6XGpi1DZDthvxqkIdNSDlWi7FhKfxuIV/3yw== +typescript-json-schema@^0.43.0: + version "0.43.0" + resolved "https://registry.yarnpkg.com/typescript-json-schema/-/typescript-json-schema-0.43.0.tgz#8bd9c832f1f15f006ff933907ce192222fdfd92f" + integrity sha512-4c9IMlIlHYJiQtzL1gh2nIPJEjBgJjDUs50gsnnc+GFyDSK1oFM3uQIBSVosiuA/4t6LSAXDS9vTdqbQC6EcgA== dependencies: - "@types/json-schema" "^7.0.3" - glob "~7.1.4" + "@types/json-schema" "^7.0.5" + glob "~7.1.6" json-stable-stringify "^1.0.1" - typescript "^3.5.3" - yargs "^14.0.0" + typescript "~4.0.2" + yargs "^15.4.1" -typescript@^3.5.3, typescript@~3.9.7: +typescript@~3.9.7: version "3.9.7" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa" integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw== +typescript@~4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.2.tgz#7ea7c88777c723c681e33bf7988be5d008d05ac2" + integrity sha512-e4ERvRV2wb+rRZ/IQeb3jm2VxBsirQLpQhdxplZ2MEzGvDkkMmPglecnNDfSUBivMjP93vRbngYYDQqQ/78bcQ== + uglify-js@^3.1.4: version "3.10.1" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.10.1.tgz#dd14767eb7150de97f2573a5ff210db14fffe4ad" @@ -9253,7 +9288,7 @@ uuid@^3.0.1, uuid@^3.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== -uuid@^8.2.0: +uuid@^8.3.0: version "8.3.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.0.tgz#ab738085ca22dc9a8c92725e459b1d507df5d6ea" integrity sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ== @@ -9728,7 +9763,7 @@ yargs@^13.3.2: y18n "^4.0.0" yargs-parser "^13.1.2" -yargs@^14.0.0, yargs@^14.2.2: +yargs@^14.2.2: version "14.2.3" resolved "https://registry.yarnpkg.com/yargs/-/yargs-14.2.3.tgz#1a1c3edced1afb2a2fea33604bc6d1d8d688a414" integrity sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg==