diff --git a/.all-contributorsrc b/.all-contributorsrc index af3ac25520..fa42641973 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -6,25 +6,20 @@ "commitConvention": "angular", "contributorsSortAlphabetically": true, "types": { - "dotnet": { - "symbol": "๐Ÿฅ…", - "description": ".NET Bindings", - "link": "https://github.com/aws/jsii/commits?author=<%= contributor.login %>" - }, - "go": { - "symbol": "๐Ÿšถโ€โ™€๏ธ", - "description": "Go Bindings", - "link": "https://github.com/aws/jsii/commits?author=<%= contributor.login %>" - }, - "java": { - "symbol": "โ˜•๏ธ", - "description": "Java Bindings", - "link": "https://github.com/aws/jsii/commits?author=<%= contributor.login %>" - }, - "python": { - "symbol": "๐Ÿ", - "description": "Python Bindings", - "link": "https://github.com/aws/jsii/commits?author=<%= contributor.login %>" + "bug": { + "symbol": "๐Ÿ›", + "description": "Bug reports", + "link": "https://github.com/aws/jsii/issues?q=author%3A<%= contributor.login %>+label%3Abug" + }, + "ideas": { + "symbol": "๐Ÿค”", + "description": "Feature requests", + "link": "https://github.com/aws/jsii/issues?q=author%3A<%= contributor.login %>+label%3Afeature-request" + }, + "maintenance": { + "symbol": "๐Ÿšง", + "description": "Maintenance", + "link": "https://github.com/aws/jsii/pulls?q=is%3Apr+author%3A<%= contributor.login %>" } }, "contributors": [ @@ -90,7 +85,6 @@ "contributions": [ "bug", "code", - "dotnet", "ideas", "review" ] @@ -148,7 +142,8 @@ "avatar_url": "https://avatars3.githubusercontent.com/u/416563?v=4", "profile": "https://github.com/CaerusKaru", "contributions": [ - "code" + "code", + "maintenance" ] }, { @@ -157,8 +152,7 @@ "avatar_url": "https://avatars3.githubusercontent.com/u/11984923?v=4", "profile": "https://github.com/campionfellin", "contributions": [ - "code", - "java" + "code" ] }, { @@ -197,7 +191,6 @@ "contributions": [ "bug", "code", - "dotnet", "ideas", "review" ] @@ -219,7 +212,6 @@ "profile": "https://github.com/dagnir", "contributions": [ "code", - "java", "review" ] }, @@ -279,7 +271,6 @@ "bug", "code", "ideas", - "python", "review" ] }, @@ -301,7 +292,6 @@ "bug", "code", "ideas", - "java", "maintenance", "review", "talk" @@ -354,7 +344,6 @@ "bug", "code", "ideas", - "python", "review" ] }, @@ -425,7 +414,6 @@ "avatar_url": "https://avatars3.githubusercontent.com/u/961963?v=4", "profile": "https://github.com/jasdel", "contributions": [ - "go", "ideas", "review" ] @@ -474,7 +462,8 @@ "profile": "https://github.com/jsteinich", "contributions": [ "bug", - "ideas" + "ideas", + "code" ] }, { @@ -492,7 +481,7 @@ "avatar_url": "https://avatars3.githubusercontent.com/u/4661536?v=4", "profile": "https://github.com/kiiadi", "contributions": [ - "java", + "code", "review" ] }, @@ -538,7 +527,8 @@ "avatar_url": "https://avatars2.githubusercontent.com/u/1559437?v=4", "profile": "http://www.matthewbonig.com/", "contributions": [ - "bug" + "bug", + "blog" ] }, { @@ -584,7 +574,6 @@ "profile": "https://github.com/mpiroc", "contributions": [ "code", - "dotnet", "ideas", "review" ] @@ -597,7 +586,6 @@ "contributions": [ "bug", "code", - "go", "ideas", "maintenance", "review" @@ -706,7 +694,6 @@ "code", "ideas", "maintenance", - "python", "review" ] }, @@ -719,13 +706,10 @@ "bug", "code", "design", - "dotnet", - "go", "ideas", - "java", "maintenance", - "python", - "review" + "review", + "blog" ] }, { @@ -818,7 +802,6 @@ "contributions": [ "code", "doc", - "go", "ideas", "review" ] @@ -947,6 +930,142 @@ "contributions": [ "bug" ] + }, + { + "login": "floydpink", + "name": "Hari Pachuveetil", + "avatar_url": "https://avatars2.githubusercontent.com/u/171072?v=4", + "profile": "https://harimenon.com/", + "contributions": [ + "blog", + "doc" + ] + }, + { + "login": "deccy-mcc", + "name": "deccy-mcc", + "avatar_url": "https://avatars0.githubusercontent.com/u/45844893?v=4", + "profile": "https://github.com/deccy-mcc", + "contributions": [ + "bug" + ] + }, + { + "login": "ThomasSteinbach", + "name": "Thomas Steinbach", + "avatar_url": "https://avatars0.githubusercontent.com/u/1683246?v=4", + "profile": "https://github.com/ThomasSteinbach", + "contributions": [ + "bug" + ] + }, + { + "login": "Ophirr33", + "name": "Ty Coghlan", + "avatar_url": "https://avatars2.githubusercontent.com/u/15920577?v=4", + "profile": "https://ty.coghlan.dev/", + "contributions": [ + "bug" + ] + }, + { + "login": "slotnick", + "name": "Dave Slotnick", + "avatar_url": "https://avatars3.githubusercontent.com/u/918175?v=4", + "profile": "https://github.com/slotnick", + "contributions": [ + "bug" + ] + }, + { + "login": "majasb", + "name": "Maja S Bratseth", + "avatar_url": "https://avatars2.githubusercontent.com/u/142510?v=4", + "profile": "https://github.com/majasb", + "contributions": [ + "bug" + ] + }, + { + "login": "benbridts", + "name": "Ben Bridts", + "avatar_url": "https://avatars0.githubusercontent.com/u/1301221?v=4", + "profile": "http://twiiter.com/benbridts", + "contributions": [ + "doc" + ] + }, + { + "login": "MohamadSoufan", + "name": "Mohamad Soufan", + "avatar_url": "https://avatars3.githubusercontent.com/u/28849417?v=4", + "profile": "https://github.com/MohamadSoufan", + "contributions": [ + "doc" + ] + }, + { + "login": "Chriscbr", + "name": "Christopher Rybicki", + "avatar_url": "https://avatars2.githubusercontent.com/u/5008987?v=4", + "profile": "https://rybicki.io/", + "contributions": [ + "doc" + ] + }, + { + "login": "bmacher", + "name": "Benjamin Macher", + "avatar_url": "https://avatars0.githubusercontent.com/u/32685580?v=4", + "profile": "http://macher.dev", + "contributions": [ + "doc" + ] + }, + { + "login": "camilobermudez85", + "name": "Camilo Bermรบdez", + "avatar_url": "https://avatars0.githubusercontent.com/u/7834055?v=4", + "profile": "https://camilobermudez85.github.io/", + "contributions": [ + "bug" + ] + }, + { + "login": "benfarr", + "name": "Ben Farr", + "avatar_url": "https://avatars0.githubusercontent.com/u/10361379?v=4", + "profile": "https://github.com/benfarr", + "contributions": [ + "doc" + ] + }, + { + "login": "JKCT", + "name": "James Kelley", + "avatar_url": "https://avatars.githubusercontent.com/u/24870481?v=4", + "profile": "https://github.com/JKCT", + "contributions": [ + "bug" + ] + }, + { + "login": "aniljava", + "name": "aniljava", + "avatar_url": "https://avatars.githubusercontent.com/u/412569?v=4", + "profile": "https://github.com/aniljava", + "contributions": [ + "code" + ] + }, + { + "login": "mattBrzezinski", + "name": "mattBrzezinski", + "avatar_url": "https://avatars.githubusercontent.com/u/4356074?v=4", + "profile": "https://github.com/mattBrzezinski", + "contributions": [ + "doc" + ] } ], "repoType": "github", diff --git a/.gitattributes b/.gitattributes index b2d7a6b1dc..bd2acce6f6 100644 --- a/.gitattributes +++ b/.gitattributes @@ -13,6 +13,6 @@ *.tar.gz binary # Github Linguist configuration (https://github.com/github/linguist) -yarn.lock linguidt-generated +yarn.lock linguist-generated *.snap linguist-generated docs/** linguist-documentation diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e7df1a3ff7..8e5104e642 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -2,49 +2,69 @@ version: 2 updates: - package-ecosystem: npm - directory: "/" + directory: '/' schedule: interval: daily - open-pull-requests-limit: 10 labels: - dependencies versioning-strategy: increase ignore: - dependency-name: typescript versions: - - ">= 3.10.a" - - dependency-name: "@types/node" + - '>= 3.10.a' + - dependency-name: '@types/node' versions: - - ">= 11.a" + - '>= 11.a' - package-ecosystem: nuget - directory: "/packages/@jsii/dotnet-runtime/src" + directory: '/packages/@jsii/dotnet-runtime/src' schedule: interval: daily - open-pull-requests-limit: 10 labels: - dependencies - language/dotnet - package-ecosystem: nuget - directory: "/packages/@jsii/dotnet-runtime-test/test" + directory: '/packages/@jsii/dotnet-runtime-test/test' schedule: interval: daily - open-pull-requests-limit: 10 labels: - dependencies - language/dotnet - package-ecosystem: pip - directory: "/packages/@jsii/python-runtime" + directory: '/packages/@jsii/python-runtime' schedule: interval: daily - open-pull-requests-limit: 10 labels: - dependencies - language/python - + + - package-ecosystem: pip + directory: '/gh-pages' + schedule: + interval: daily + labels: + - dependencies + - language/python + + - package-ecosystem: pip + directory: '/packages/jsii-pacmak/test/generated-code' + schedule: + interval: daily + labels: + - dependencies + - language/python + + - package-ecosystem: pip + directory: '/packages/jsii-pacmak/lib/targets/python' + schedule: + interval: daily + labels: + - dependencies + - language/python + - package-ecosystem: github-actions - directory: "/" + directory: '/' schedule: interval: daily diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.yml index b79031d97d..0a708a5c84 100644 --- a/.github/workflows/dependabot.yml +++ b/.github/workflows/dependabot.yml @@ -4,13 +4,15 @@ name: Dependabot Pull Requests on: pull_request: branches: - - master + - main paths: - "!**" # <-- Excludes everything by default - "**/package.json" # <-- Allows modfying any package.json - "**/*.csproj" # <-- Allows modifying any .csproj file - "**/Directory.Build.targets" # <-- Allows modifying any Directory.Build.targets file - "yarn.lock" # <-- Allows modifying yarn.lock + types: + - opened jobs: approve: diff --git a/.github/workflows/docker-images.yml b/.github/workflows/docker-images.yml index 53b9787e84..9ce8ce0469 100644 --- a/.github/workflows/docker-images.yml +++ b/.github/workflows/docker-images.yml @@ -3,9 +3,9 @@ name: Docker Images on: pull_request: - branches: [main, master, release] + branches: [main, release] push: - branches: [main, master, release] + branches: [main, release] jobs: superchain: @@ -27,9 +27,9 @@ jobs: echo "::set-output name=result::true" else # Fetch the base and head refs from origin so we can safely diff 'em - git fetch --depth=1 --quiet origin ${{ github.base_ref }} ${{ github.head_ref }} + git fetch --depth=1 --quiet origin ${{ github.base_ref }} # Otherwise, only run if the Dockerfile changed - changed=$(git diff --name-only origin/${{ github.base_ref }}..origin/${{ github.head_ref }}) + changed=$(git diff --name-only origin/${{ github.base_ref }}..HEAD) if grep Dockerfile <<< "${changed}" ; then echo 'โฏ Dockerfile changed' echo "::set-output name=result::true" @@ -45,8 +45,8 @@ jobs: # The DOCKER_CREDENTIALS secret is expected to contain a username:token pair run: |- docker login \ - --username=$(cut -d: -f1 <<< '${{ secrets.DOCKER_CREDENTIALS }})' \ - --password=$(cut -d: -f2 <<< '${{ secrets.DOCKER_CREDENTIALS }})' + --username=$(cut -d: -f1 <<< '${{ secrets.DOCKER_CREDENTIALS }}') \ + --password=$(cut -d: -f2 <<< '${{ secrets.DOCKER_CREDENTIALS }}') # Ensure we run with bash, because that's the syntax we're using here... shell: bash @@ -70,26 +70,14 @@ jobs: -w${{ github.workspace }} \ 'jsii/superchain:nightly' \ bash -c "yarn install --frozen-lockfile && yarn build && yarn test" - - name: Dump Image - if: steps.should-run.outputs.result == 'true' - run: |- - docker image save 'jsii/superchain:nightly' \ - > ${{ runner.temp }}/jsii-superchain.nightly.tar - - name: Upload Artifact - if: steps.should-run.outputs.result == 'true' - uses: actions/upload-artifact@v2 - with: - name: 'jsii-superchain.nightly' - path: ${{ runner.temp }}/jsii-superchain.nightly.tar - # Only when puhsing to master/main/release from now on + # Only when puhsing to main/release from now on - name: Publish (nightly) - if: steps.should-run.outputs.result == 'true' && github.event_name == 'push' && github.ref != 'ref/heads/release' + if: steps.should-run.outputs.result == 'true' && github.event_name == 'push' && github.ref != 'refs/heads/release' run: |- docker push jsii/superchain:nightly - name: Publish (latest) - if: steps.should-run.outputs.result == 'true' && github.event_name == 'push' && github.ref == 'ref/heads/release' + if: steps.should-run.outputs.result == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/release' run: |- docker tag jsii/superchain:nightly jsii/superchain:latest docker push jsii/superchain:latest - diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 0000000000..d2dc0074ed --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,79 @@ +# Workflow that publishes to the gh-pacges branch +name: GitHub Pages + +on: + pull_request: + branches: [main] + push: + branches: [main] + paths: [gh-pages/**] + +jobs: + build: + name: build + runs-on: ubuntu-latest + steps: + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.8' + - name: Check out + uses: actions/checkout@v2 + - name: Locate Caches + id: cache-locations + run: |- + echo "::set-output name=pip-cache::$(python3 -m pip cache dir)" + - name: Cache + uses: actions/cache@v2.1.4 + with: + path: ${{ steps.cache-locations.outputs.pip-cache }} + key: ${{ runner.os }}-${{ hashFiles('**/requirements-dev.txt') }} + restore-keys: ${{ runner.os }}- + - name: Install Dependencies + run: |- + pip install -r requirements-dev.txt + working-directory: gh-pages + - name: Build DocSite + run: |- + mkdir -p ${{ runner.temp }}/site + mkdocs build \ + --strict \ + --site-dir ${{ runner.temp }}/site + working-directory: gh-pages + - name: Upload Artifact + uses: actions/upload-artifact@v2 + with: + name: doc-site + path: ${{ runner.temp }}/site/ + + publish: + name: Publish + needs: build + if: github.event_name == 'push' + runs-on: ubuntu-latest + steps: + - name: Check out + uses: actions/checkout@v2 + with: + ref: gh-pages + token: ${{ secrets.AUTO_APPROVE_GITHUB_TOKEN }} + - name: Download Artifact + uses: actions/download-artifact@v2 + with: + name: doc-site + path: ${{ runner.temp }}/site + - name: Configure Git + run: |- + git config user.name "AWS CDK Automation" + git config user.email "aws-cdk+automation@amazon.com" + - name: Prepare Commit + run: |- + rsync --delete --exclude=.git --recursive ${{ runner.temp }}/site/ ./ + touch .nojekyll + git add . + git diff --cached --exit-code >/dev/null || ( + git commit -am 'docs: publish from ${{ github.sha }}' + ) + - name: Push + run: |- + git push origin gh-pages:gh-pages diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f1d81c5002..1110498fe1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,11 +1,11 @@ -# Workflows pertaining to the main/master branch +# Workflows pertaining to the main branch name: Main on: pull_request: - branches: [main, master, release] + branches: [main, release] push: - branches: [main, master, release] + branches: [main, release] env: DOTNET_NOLOGO: true @@ -22,16 +22,16 @@ jobs: runs-on: ubuntu-latest steps: # Set up all of our standard runtimes - - name: Set up .NET 3.1 + - name: Set up .NET 5 uses: actions/setup-dotnet@v1 with: - dotnet-version: '3.1.x' + dotnet-version: '5.0.x' - name: Set up Java 8 uses: actions/setup-java@v1 with: java-version: '8' - name: Set up Node 12 - uses: actions/setup-node@v2.1.2 + uses: actions/setup-node@v2.1.4 with: node-version: '12' - name: Set up Python 3.6 @@ -53,7 +53,7 @@ jobs: echo "::set-output name=pip-cache::$(python3 -m pip cache dir)" echo "::set-output name=yarn-cache::$(yarn cache dir)" - name: Cache - uses: actions/cache@v2 + uses: actions/cache@v2.1.4 with: path: |- ${{ steps.cache-locations.outputs.pip-cache }} @@ -76,7 +76,7 @@ jobs: yarn build - name: Prepare Artifact run: |- - tar Jcvf ${{ runner.temp }}/built-tree.tar.xz \ + tar zcvf ${{ runner.temp }}/built-tree.tgz \ --exclude='**/.env' \ --exclude='**/.nuget' \ --exclude='**/node_modules' \ @@ -89,7 +89,7 @@ jobs: uses: actions/upload-artifact@v2 with: name: built-tree - path: ${{ runner.temp }}/built-tree.tar.xz + path: ${{ runner.temp }}/built-tree.tgz # Ensure working directory is clean (build should not change checked in source code) - name: 'Assert clean working directory' if: runner.os != 'Windows' # Windows will see artificial permission changes, so we ignore it @@ -109,16 +109,16 @@ jobs: runs-on: ubuntu-latest steps: # Set up all of our standard runtimes - - name: Set up .NET 3.1 + - name: Set up .NET 5 uses: actions/setup-dotnet@v1 with: - dotnet-version: '3.1.x' + dotnet-version: '5.0.x' - name: Set up Java 8 uses: actions/setup-java@v1 with: java-version: '8' - name: Set up Node 12 - uses: actions/setup-node@v2.1.2 + uses: actions/setup-node@v2.1.4 with: node-version: '12' - name: Set up Python 3.6 @@ -140,7 +140,7 @@ jobs: echo "::set-output name=pip-cache::$(python3 -m pip cache dir)" echo "::set-output name=yarn-cache::$(yarn cache dir)" - name: Cache - uses: actions/cache@v2 + uses: actions/cache@v2.1.4 with: path: |- ${{ steps.cache-locations.outputs.pip-cache }} @@ -163,14 +163,14 @@ jobs: run: |- npx standard-version \ --compareUrlFormat='{{host}}/{{owner}}/{{repository}}/compare/{{previousTag}}...${{ github.sha }}' \ - --prerelease=pr${{ github.event.pull_request.number }} \ + --prerelease=dev.${{ github.event.pull_request.number }} \ --skip.commit - name: Standard Version (Nightly) if: github.event_name == 'push' run: |- npx standard-version \ --compareUrlFormat='{{host}}/{{owner}}/{{repository}}/compare/{{previousTag}}...${{ github.sha }}' \ - --prerelease=nightly.$(date -u +'%Y%m%d') \ + --prerelease=dev.$(date -u +'%Y%m%d') \ --skip.commit # Now we'll be preparing a release package (with the "real" version) - name: Run "align-version.sh" @@ -217,7 +217,7 @@ jobs: python: '3.6' # Test alternate .NETs - java: '8' - dotnet: '5.0.100-rc.1.20452.10' # Pre-release matching requires exact version for now + dotnet: '5.0.x' node: '10' os: ubuntu-latest python: '3.6' @@ -238,6 +238,11 @@ jobs: java: '8' node: '10' os: ubuntu-latest + - python: '3.9' + dotnet: '3.1.x' + java: '8' + node: '10' + os: ubuntu-latest runs-on: ${{ matrix.os }} @@ -252,7 +257,7 @@ jobs: with: java-version: ${{ matrix.java }} - name: Set up Node ${{ matrix.node }} - uses: actions/setup-node@v2.1.2 + uses: actions/setup-node@v2.1.4 with: node-version: ${{ matrix.node }} - name: Set up Python ${{ matrix.python }} @@ -262,27 +267,17 @@ jobs: - name: 'Linux: Install python3-venv' if: runner.os == 'Linux' run: sudo apt install -y python3-venv - - name: 'Windows: Expose python3 command' - if: runner.os == 'Windows' - shell: bash - run: cp ${pythonLocation}/python.exe ${pythonLocation}/python3.exe - name: Download Artifact uses: actions/download-artifact@v2 with: name: built-tree - # Put GitBash ahead of $PATH, so we avoid surprises due to bad tar, etc... - # (technically a hack around https://github.com/actions/virtual-environments/issues/282) - - name: 'Windows: Put GitBash ahead of $PATH' - if: runner.os == 'Windows' - run: |- - echo "::add-path::C:\Program Files\Git\usr\bin" - name: Extract Artifact run: |- echo "::group::Untar Archive" - tar Jxvf built-tree.tar.xz + tar zxvf built-tree.tgz echo "::endgroup" - rm built-tree.tar.xz + rm built-tree.tgz - name: Locate Caches id: cache-locations run: |- @@ -294,7 +289,7 @@ jobs: echo "::set-output name=pip-cache::$(python3 -m pip cache dir)" echo "::set-output name=yarn-cache::$(yarn cache dir)" - name: Cache - uses: actions/cache@v2 + uses: actions/cache@v2.1.4 with: path: |- ${{ steps.cache-locations.outputs.pip-cache }} @@ -340,13 +335,13 @@ jobs: - name: Set up .NET 3.1 uses: actions/setup-dotnet@v1 with: - dotnet-version: '3.1.x' + dotnet-version: '5.0.x' - name: Set up Java 8 uses: actions/setup-java@v1 with: java-version: '8' - name: Set up Node 10 - uses: actions/setup-node@v2.1.2 + uses: actions/setup-node@v2.1.4 with: node-version: '10' - name: Set up Python 3.6 @@ -377,7 +372,7 @@ jobs: echo "::set-output name=pip-cache::$(python3 -m pip cache dir)" echo "::set-output name=yarn-cache::$(yarn cache dir)" - name: Cache - uses: actions/cache@v2 + uses: actions/cache@v2.1.4 with: path: |- ${{ steps.cache-locations.outputs.pip-cache }} @@ -409,19 +404,22 @@ jobs: npm install --no-save ${{ runner.temp }}/private/*.tgz --only=prod # 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 "JSII=${{ github.workspace }}/node_modules/.bin/jsii" >> $GITHUB_ENV + echo "CDK_BUILD_JSII=${{ github.workspace }}/node_modules/.bin/jsii" >> $GITHUB_ENV - 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 "PACMAK=${{ github.workspace }}/node_modules/.bin/jsii-pacmak" >> $GITHUB_ENV + echo "CDK_PACKAGE_JSII_PACMAK=${{ github.workspace }}/node_modules/.bin/jsii-pacmak" >> $GITHUB_ENV - 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" + echo "ROSETTA=${{ github.workspace }}/node_modules/.bin/jsii-rosetta" >> $GITHUB_ENV + echo "CDK_PACKAGE_JSII_ROSETTA=${{ github.workspace }}/node_modules/.bin/jsii-rosetta" >> $GITHUB_ENV - name: Integration Test (build) run: |- - npx lerna run build --stream 2>&1 > ${{ runner.temp }}/build.log + npx lerna run build --concurrency=2 --stream 2>&1 > ${{ runner.temp }}/build.log working-directory: aws-cdk + env: + # Make lots of memory available, aws-cdk-lib is __large__ + NODE_OPTIONS: --max-old-space-size=8192 # In the interest of speed, only process monocdk-experiment / aws-cdk-lib from now on - name: Integration Test (jsii-rosetta) @@ -458,3 +456,36 @@ jobs: path: |- ${{ github.workspace }}/aws-cdk/dist/ ${{ github.workspace }}/aws-cdk/**/dist/ + + push-go-runtime: + needs: build + if: github.event_name == 'push' + runs-on: ubuntu-latest + steps: + - name: Set up Node 12 + uses: actions/setup-node@v2.1.4 + with: + node-version: '12' + - name: Download Artifact + uses: actions/download-artifact@v2 + with: + name: built-tree + path: ${{ github.workspace }}/jsii-built-tree + - name: Extract Artifact + working-directory: ${{ github.workspace }}/jsii-built-tree + run: |- + tar zxvf built-tree.tgz + rm built-tree.tgz + - name: Release + working-directory: ${{ github.workspace }}/jsii-built-tree + if: github.ref == 'refs/head/release' + run: |- + VERSION=$(node -p 'require("./lerna.json").version') + cd ./packages/@jsii/go-runtime/jsii-runtime-go + echo ${VERSION} > version + npx -p jsii-release@latest jsii-release-golang . + env: + GIT_USER_NAME: AWS CDK Team + GIT_USER_EMAIL: aws-cdk-dev@amazon.com + GITHUB_TOKEN: ${{ secrets.GO_PUBLISHING_TOKEN }} + diff --git a/.github/workflows/yarn-upgrade.yml b/.github/workflows/yarn-upgrade.yml index 66e84ff982..6d8807f142 100644 --- a/.github/workflows/yarn-upgrade.yml +++ b/.github/workflows/yarn-upgrade.yml @@ -16,7 +16,7 @@ jobs: uses: actions/checkout@v2 - name: Set up Node - uses: actions/setup-node@v2.1.2 + uses: actions/setup-node@v2.1.4 with: node-version: 10 @@ -25,7 +25,7 @@ jobs: run: echo "::set-output name=dir::$(yarn cache dir)" - name: Restore Yarn cache - uses: actions/cache@v2 + uses: actions/cache@v2.1.4 with: path: ${{ steps.yarn-cache.outputs.dir }} key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} @@ -97,9 +97,12 @@ jobs: lerna exec --parallel ncu -- --upgrade --target=latest \ --reject='@types/fs-extra,typescript,${{ steps.production-dependencies.outputs.list }},${{ steps.monorepo-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" - run: yarn install --force + # This will ensure the current lockfile is up-to-date with the dependency specifications (necessary for "yarn update" to run) + - name: Run "yarn install" + run: yarn install + + - name: Run "yarn upgrade" + run: yarn upgrade - name: Make Pull Request uses: peter-evans/create-pull-request@v3 diff --git a/.mergify/config.yml b/.mergify/config.yml index 23938983bd..cdc9fb36a8 100644 --- a/.mergify/config.yml +++ b/.mergify/config.yml @@ -4,7 +4,7 @@ pull_request_rules: - name: label core actions: label: - add: [ contribution/core ] + add: [contribution/core] conditions: - author~=^(eladb|RomainMuller|garnaat|nija-at|shivlaks|skinny85|rix0rrr|NGL321|Jerry-AWS|SomayaB|MrArnoldPalmer|NetaNir|iliapolo|njlynch)$ - -label~="contribution/core" @@ -25,13 +25,13 @@ pull_request_rules: - -merged - -closed - -approved-reviews-by~=author - - "#approved-reviews-by>=1" - - "#review-requested=0" - - "#changes-requested-reviews-by=0" + - '#approved-reviews-by>=1' + - '#review-requested=0' + - '#changes-requested-reviews-by=0' - status-success~=AWS CodeBuild us-east-1 - status-success=Semantic Pull Request # Docker image validation - - status-success=Docker Images / jsii/superchain + - status-success=jsii/superchain # Integration Tests - status-success=Integration Test # One test for each OS @@ -42,13 +42,17 @@ pull_request_rules: - status-success~=^Test \(.* node 10 .*$ - status-success~=^Test \(.* node 12 .*$ - status-success~=^Test \(.* node 14 .*$ + # One test for each supported dotnet version + - status-success~=^Test \(.* dotnet 3\.1\.x .*$ + - status-success~=^Test \(.* dotnet 5\.0\.x .*$ # One test for Java 8 and 11 - status-success~=^Test \(.* java 8 .*$ - status-success~=^Test \(.* java 11 .*$ - # One test for Python 3.6, 3.7, and 3.8 + # One test for Python 3.6 through 3.9 - status-success~=^Test \(.* python 3\.6[ )].*$ - status-success~=^Test \(.* python 3\.7[ )].*$ - status-success~=^Test \(.* python 3\.8[ )].*$ + - status-success~=^Test \(.* python 3\.9[ )].*$ - name: Synchronize that PR to upstream and merge it (squash) actions: @@ -56,7 +60,7 @@ pull_request_rules: approved: true changes_requested: false merge: - strict: smart + strict: smart+fasttrack method: squash strict_method: merge commit_message: title+body @@ -73,13 +77,13 @@ pull_request_rules: - -merged - -closed - -approved-reviews-by~=author - - "#approved-reviews-by>=1" - - "#review-requested=0" - - "#changes-requested-reviews-by=0" + - '#approved-reviews-by>=1' + - '#review-requested=0' + - '#changes-requested-reviews-by=0' - status-success~=AWS CodeBuild us-east-1 - status-success=Semantic Pull Request # Docker image validation - - status-success=Docker Images / jsii/superchain + - status-success=jsii/superchain # Integration Tests - status-success=Integration Test # One test for each OS @@ -90,13 +94,17 @@ pull_request_rules: - status-success~=^Test \(.* node 10 .*$ - status-success~=^Test \(.* node 12 .*$ - status-success~=^Test \(.* node 14 .*$ + # One test for each supported dotnet version + - status-success~=^Test \(.* dotnet 3\.1\.x .*$ + - status-success~=^Test \(.* dotnet 5\.0\.x .*$ # One test for Java 8 and 11 - status-success~=^Test \(.* java 8 .*$ - status-success~=^Test \(.* java 11 .*$ - # One test for Python 3.6, 3.7, and 3.8 + # One test for Python 3.6 through 3.9 - status-success~=^Test \(.* python 3\.6[ )].*$ - status-success~=^Test \(.* python 3\.7[ )].*$ - status-success~=^Test \(.* python 3\.8[ )].*$ + - status-success~=^Test \(.* python 3\.9[ )].*$ - name: Synchronize that PR to upstream and merge it (no-squash) actions: @@ -104,7 +112,7 @@ pull_request_rules: approved: true changes_requested: false merge: - strict: smart + strict: smart+fasttrack method: merge strict_method: merge commit_message: title+body @@ -121,13 +129,13 @@ pull_request_rules: - -merged - -closed - -approved-reviews-by~=author - - "#approved-reviews-by>=1" - - "#review-requested=0" - - "#changes-requested-reviews-by=0" + - '#approved-reviews-by>=1' + - '#review-requested=0' + - '#changes-requested-reviews-by=0' - status-success~=AWS CodeBuild us-east-1 - status-success=Semantic Pull Request # Docker image validation - - status-success=Docker Images / jsii/superchain + - status-success=jsii/superchain # Integration Tests - status-success=Integration Test # One test for each OS @@ -138,13 +146,17 @@ pull_request_rules: - status-success~=^Test \(.* node 10 .*$ - status-success~=^Test \(.* node 12 .*$ - status-success~=^Test \(.* node 14 .*$ + # One test for each supported dotnet version + - status-success~=^Test \(.* dotnet 3\.1\.x .*$ + - status-success~=^Test \(.* dotnet 5\.0\.x .*$ # One test for Java 8 and 11 - status-success~=^Test \(.* java 8 .*$ - status-success~=^Test \(.* java 11 .*$ - # One test for Python 3.6, 3.7, and 3.8 + # One test for Python 3.6 through 3.9 - status-success~=^Test \(.* python 3\.6[ )].*$ - status-success~=^Test \(.* python 3\.7[ )].*$ - status-success~=^Test \(.* python 3\.8[ )].*$ + - status-success~=^Test \(.* python 3\.9[ )].*$ - name: Clean branch up actions: @@ -165,7 +177,7 @@ pull_request_rules: approved: true changes_requested: false conditions: - - base=master + - base=main - author!=dependabot[bot] - author!=dependabot-preview[bot] - label!=contribution/core diff --git a/.prettierrc.yaml b/.prettierrc.yaml index ad85bd7d05..9a8fa96093 100644 --- a/.prettierrc.yaml +++ b/.prettierrc.yaml @@ -4,3 +4,13 @@ semi: true singleQuote: true tabWidth: 2 trailingComma: all + +overrides: + - files: "*.md" + options: + printWidth: 120 + proseWrap: always + semi: true + singleQuote: true + quoteProps: as-needed + trailingComma: all diff --git a/CHANGELOG.md b/CHANGELOG.md index 32f02298d9..b10d960fce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,171 @@ 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.21.0](https://github.com/aws/jsii/compare/v1.20.1...v1.21.0) (2021-02-15) + + +### Bug Fixes + +* **pacmak:** examples with multi-line strings produce invalid python docstrings ([#2571](https://github.com/aws/jsii/issues/2571)) ([d5c2e3a](https://github.com/aws/jsii/commit/d5c2e3aeb89524462fd4544df5aacea379cf9dd7)), closes [#2569](https://github.com/aws/jsii/issues/2569) +* **pacmak:** TypeError when operating with Worker threads ([#2550](https://github.com/aws/jsii/issues/2550)) ([5822e48](https://github.com/aws/jsii/commit/5822e48f53e49e8116a57ed4b2da7e30b483f289)), closes [isaacs/node-graceful-fs#204](https://github.com/isaacs/node-graceful-fs/issues/204) [isaacs/node-graceful-fs#205](https://github.com/isaacs/node-graceful-fs/issues/205) +* **rosetta,pacmak:** TypeError in node 10 with --experimental-worker ([#2554](https://github.com/aws/jsii/issues/2554)) ([4728e86](https://github.com/aws/jsii/commit/4728e866956c238a0fabe1a9d8c4b270ed05a990)), closes [isaacs/node-graceful-fs#204](https://github.com/isaacs/node-graceful-fs/issues/204) + +## [1.20.1](https://github.com/aws/jsii/compare/v1.20.0...v1.20.1) (2021-02-05) + + +### Bug Fixes + +* **python:** ValueError: write to closed file ([#2541](https://github.com/aws/jsii/issues/2541)) ([64c6853](https://github.com/aws/jsii/commit/64c68535a3ef16b85f2eedc7997fb4404846e003)) + +## [1.20.0](https://github.com/aws/jsii/compare/v1.19.0...v1.20.0) (2021-02-03) + + +### Features + +* **runtime:** use a dedicated file descriptor for sync IPC ([#2411](https://github.com/aws/jsii/issues/2411)) ([0413081](https://github.com/aws/jsii/commit/0413081583df52fd42ab378a88a0ddb7c9b9200d)) + + +### Bug Fixes + +* **go:** invalid major version suffix for submodules and jsii init ([#2519](https://github.com/aws/jsii/issues/2519)) ([12e9b27](https://github.com/aws/jsii/commit/12e9b27373bdfce70456fddb9f38df0be6dbd511)), closes [#2507](https://github.com/aws/jsii/issues/2507) [#2507](https://github.com/aws/jsii/issues/2507) + +## [1.19.0](https://github.com/aws/jsii/compare/v1.18.0...v1.19.0) (2021-02-02) + + +### Features + +* add runtime type info (fqn and version) to compiled sources ([481e7a4](https://github.com/aws/jsii/commit/481e7a47a8f4dd7348ba4aba683902b869d11c84)), closes [/github.com/aws/aws-cdk-rfcs/blob/master/text/0253-cdk-metadata-v2.md#appendix-1](https://github.com/aws//github.com/aws/aws-cdk-rfcs/blob/master/text/0253-cdk-metadata-v2.md/issues/appendix-1) +* **go:** version file in the generated module directory ([#2492](https://github.com/aws/jsii/issues/2492)) ([da3ea25](https://github.com/aws/jsii/commit/da3ea25330a8a73f3102db1dfc8f94ea1d6eca3c)) + + +### Bug Fixes + +* **go:** major version suffix is missing in module names for >=v2 ([#2507](https://github.com/aws/jsii/issues/2507)) ([32c0add](https://github.com/aws/jsii/commit/32c0add5edd0ed57d535241b483168e2b7e731ce)), closes [#2509](https://github.com/aws/jsii/issues/2509) + +## [1.18.0](https://github.com/aws/jsii/compare/v1.17.1...v1.18.0) (2021-01-28) + + +### Features + +* add support for bin-scripts (python only) ([#1941](https://github.com/aws/jsii/issues/1941)) ([61ef5ed](https://github.com/aws/jsii/commit/61ef5edc9696c41a45984c907dc30771c675e20b)) +* **dotnet,java:** kernel process inherits host's STDERR ([#2248](https://github.com/aws/jsii/issues/2248)) ([70ce153](https://github.com/aws/jsii/commit/70ce15312d7553bc44c2e4f8981b596563b5ecd7)) +* submodules expose readmes and targets via `jsii-reflect` ([#2482](https://github.com/aws/jsii/issues/2482)) ([33f41eb](https://github.com/aws/jsii/commit/33f41eb7f1e5acddcf505070ecb3f8dee6f9f4b1)) +* **go:** run "go build" on generated code ([#2485](https://github.com/aws/jsii/issues/2485)) ([d3602ec](https://github.com/aws/jsii/commit/d3602ece2fb7fa329557cef6043106669fd22608)), closes [#2463](https://github.com/aws/jsii/issues/2463) +* **go:** runtime release tagging ([#2417](https://github.com/aws/jsii/issues/2417)) ([9ffd204](https://github.com/aws/jsii/commit/9ffd20481bd804ff288ab4bf91b9f394d52d3d90)) +* **jsii:** experimental --strip-deprecated feature ([#2437](https://github.com/aws/jsii/issues/2437)) ([f958f5a](https://github.com/aws/jsii/commit/f958f5a9603da990146ed6fe3674094fee227079)) + + +### Bug Fixes + +* **dotnet:** Use nested classes for proxies to avoid name collision ([#2368](https://github.com/aws/jsii/issues/2368)) ([90b17e2](https://github.com/aws/jsii/commit/90b17e2a7da159879a7e618ce6f2edca336f316e)), closes [#2367](https://github.com/aws/jsii/issues/2367) +* **go:** generated code runtime dependency version ([#2399](https://github.com/aws/jsii/issues/2399)) ([f1a06e5](https://github.com/aws/jsii/commit/f1a06e5f71e599fcf6efccaa0906cee8cd93d3e1)) +* **go:** invalid output for multi-line [@return](https://github.com/return) and [@deprecated](https://github.com/deprecated) comments ([#2462](https://github.com/aws/jsii/issues/2462)) ([590681a](https://github.com/aws/jsii/commit/590681a4adc672345febdc274e1aa45658a8d7a5)), closes [#2457](https://github.com/aws/jsii/issues/2457) +* **jsii:** errors when invoking with a project root argument ([#2351](https://github.com/aws/jsii/issues/2351)) ([9c66340](https://github.com/aws/jsii/commit/9c66340d2471db36175000c6673d1d498f4ec2c5)) +* **jsii:** submodules of dependencies show up in assembly ([#2481](https://github.com/aws/jsii/issues/2481)) ([2630a80](https://github.com/aws/jsii/commit/2630a8046dc5f9c799546248e783d24ed58a6783)) +* **jsii:** unknown error in Assembler._validateHeritageClauses ([#2350](https://github.com/aws/jsii/issues/2350)) ([3120bf4](https://github.com/aws/jsii/commit/3120bf448cc160cb0249aa57a0a2bd62e35c1659)), closes [#2349](https://github.com/aws/jsii/issues/2349) +* bad working directory in go runtime push ([#2356](https://github.com/aws/jsii/issues/2356)) ([53457e2](https://github.com/aws/jsii/commit/53457e2f6063e5f0202eac7040ad03e1ed64805e)) +* **pacmak:** illegal static overrides in java & c# ([#2373](https://github.com/aws/jsii/issues/2373)) ([4672e4b](https://github.com/aws/jsii/commit/4672e4b5f37a83ebfe6e2296c81839af6b296d8f)), closes [#2358](https://github.com/aws/jsii/issues/2358) +* **python:** mypy validation errors ([#2472](https://github.com/aws/jsii/issues/2472)) ([2b2e9a8](https://github.com/aws/jsii/commit/2b2e9a86e80a8a608b0ff5f0c4114e2a7b43883e)), closes [#2464](https://github.com/aws/jsii/issues/2464) [#2476](https://github.com/aws/jsii/issues/2476) +* **python:** pin mypy to the exact version ([#2476](https://github.com/aws/jsii/issues/2476)) ([01a46d6](https://github.com/aws/jsii/commit/01a46d64fe30d81913b58c27d81899e1529715a3)), closes [#2464](https://github.com/aws/jsii/issues/2464) +* **rosetta:** correctly emit multi-line string literals ([#2419](https://github.com/aws/jsii/issues/2419)) ([a30a996](https://github.com/aws/jsii/commit/a30a996479f961c93523ce9e378ededa39424948)) + +## [1.17.1](https://github.com/aws/jsii/compare/v1.17.0...v1.17.1) (2021-01-13) + +### Bug Fixes + +* **python:** process.terminate() got an unexpected keyword argument 'timeout' ([#2421](https://github.com/aws/jsii/issues/2421)), closes [#2398](https://github.com/aws/jsii/issues/2398) + + +## [1.17.0](https://github.com/aws/jsii/compare/v1.16.0...v1.17.0) (2021-01-13) + + +### Features + +* add support for bin-scripts (python only) ([#1941](https://github.com/aws/jsii/issues/1941)) ([61ef5ed](https://github.com/aws/jsii/commit/61ef5edc9696c41a45984c907dc30771c675e20b)) +* **dotnet,java:** kernel process inherits host's STDERR ([#2248](https://github.com/aws/jsii/issues/2248)) ([70ce153](https://github.com/aws/jsii/commit/70ce15312d7553bc44c2e4f8981b596563b5ecd7)) + + +### Bug Fixes + +* bad working directory in go runtime push ([#2356](https://github.com/aws/jsii/issues/2356)) ([53457e2](https://github.com/aws/jsii/commit/53457e2f6063e5f0202eac7040ad03e1ed64805e)) +* **dotnet:** Use nested classes for proxies to avoid name collision ([#2368](https://github.com/aws/jsii/issues/2368)) ([90b17e2](https://github.com/aws/jsii/commit/90b17e2a7da159879a7e618ce6f2edca336f316e)), closes [#2367](https://github.com/aws/jsii/issues/2367) +* **go:** generated code runtime dependency version ([#2399](https://github.com/aws/jsii/issues/2399)) ([f1a06e5](https://github.com/aws/jsii/commit/f1a06e5f71e599fcf6efccaa0906cee8cd93d3e1)) +* **jsii:** errors when invoking with a project root argument ([#2351](https://github.com/aws/jsii/issues/2351)) ([9c66340](https://github.com/aws/jsii/commit/9c66340d2471db36175000c6673d1d498f4ec2c5)) +* **jsii:** unknown error in Assembler._validateHeritageClauses ([#2350](https://github.com/aws/jsii/issues/2350)) ([3120bf4](https://github.com/aws/jsii/commit/3120bf448cc160cb0249aa57a0a2bd62e35c1659)), closes [#2349](https://github.com/aws/jsii/issues/2349) +* **pacmak:** illegal static overrides in java & c# ([#2373](https://github.com/aws/jsii/issues/2373)) ([4672e4b](https://github.com/aws/jsii/commit/4672e4b5f37a83ebfe6e2296c81839af6b296d8f)), closes [#2358](https://github.com/aws/jsii/issues/2358) + +## [1.16.0](https://github.com/aws/jsii/compare/v1.15.0...v1.16.0) (2020-12-07) + + +### Bug Fixes + +* **java:** exception is logged when Java VM is shutting down ([#2305](https://github.com/aws/jsii/issues/2305)) ([8e1e7bd](https://github.com/aws/jsii/commit/8e1e7bd2a038dc0e3eb6f0b3f9c616da4caa464d)), closes [#2303](https://github.com/aws/jsii/issues/2303) +* **runtime:** excessive latency introduced by sleep ([#2298](https://github.com/aws/jsii/issues/2298)) ([1a94b85](https://github.com/aws/jsii/commit/1a94b859dbde4e002b4b3c04dfedf3ba97804962)), closes [#2284](https://github.com/aws/jsii/issues/2284) + +## [1.15.0](https://github.com/aws/jsii/compare/v1.14.1...v1.15.0) (2020-11-25) + + +### Features + +* **dotnet,java:** finalize kernel process on VM shutdown ([#2247](https://github.com/aws/jsii/issues/2247)) ([29b2262](https://github.com/aws/jsii/commit/29b226281c71e62049f72a9418011925e17dc615)), closes [#2100](https://github.com/aws/jsii/issues/2100) +* **go:** generate go.mod files ([#2265](https://github.com/aws/jsii/issues/2265)) ([4164eb5](https://github.com/aws/jsii/commit/4164eb53e8b5dbbe54e6a727ad77b92f3a325196)), closes [#2090](https://github.com/aws/jsii/issues/2090) +* **go:** Runtime arg type casting ([8ba6aa9](https://github.com/aws/jsii/commit/8ba6aa90e7e45743da5deac70bb05ccabe58a403)) +* **go:** Runtime interface type casting ([bfce93d](https://github.com/aws/jsii/commit/bfce93d9d3552591e96f7dc2a687ee636b451c95)) +* **jsii:** configure diagnostics in package.json ([#2233](https://github.com/aws/jsii/issues/2233)) ([2bbef1f](https://github.com/aws/jsii/commit/2bbef1fb13efe27261b85a8bcc445f4c2e7caf3a)) +* **rosetta:** hoist imports above fixtures ([#2211](https://github.com/aws/jsii/issues/2211)) ([66e2ac8](https://github.com/aws/jsii/commit/66e2ac874295db7a25b2aa414da7f34047c14741)) +* **rosetta:** make assembly validation opt-in ([#2252](https://github.com/aws/jsii/issues/2252)) ([302dbb9](https://github.com/aws/jsii/commit/302dbb9d07d13823f24dd4b27f3cba7421038c53)) +* **rosetta:** support "strict" assemblies ([#2253](https://github.com/aws/jsii/issues/2253)) ([6cbde78](https://github.com/aws/jsii/commit/6cbde789fb02e77bac645e8d4091789eb778e829)) +* **rosetta:** support computed properties ([#2230](https://github.com/aws/jsii/issues/2230)) ([80b3aae](https://github.com/aws/jsii/commit/80b3aae22c5fae5963d79aeb915317357cc363f6)) + + +### Bug Fixes + +* **go:** generate concrete structs for behavioral interfaces ([#2257](https://github.com/aws/jsii/issues/2257)) ([6da0870](https://github.com/aws/jsii/commit/6da0870844ec9d37131e7727e408af34d32e1c32)) +* **go:** Method call return reference an implMap ([af5b27b](https://github.com/aws/jsii/commit/af5b27bdd387acd9076a1649a55f2a1f6808b0dc)) +* **python:** update `cattrs` dependency specification ([#2212](https://github.com/aws/jsii/issues/2212)) ([4f2836b](https://github.com/aws/jsii/commit/4f2836bed7c72d5e502f352ec4c0df232f9c5d69)), closes [aws/aws-cdk#11219](https://github.com/aws/aws-cdk/issues/11219) +* **runtime:** "Error: EOF: end of file, read" on Windows ([#2238](https://github.com/aws/jsii/issues/2238)) ([1453ed3](https://github.com/aws/jsii/commit/1453ed34736917b54cfc212b2fa5e381714d1654)) + +## [1.14.1](https://github.com/aws/jsii/compare/v1.14.0...v1.14.1) (2020-11-04) + + +### Bug Fixes + +* **python:** update `cattrs` dependency specification ([#2212](https://github.com/aws/jsii/issues/2212)) ([d7731f9](https://github.com/aws/jsii/commit/d7731f997a95ec2e41d4fcf027695bb5267a7514)), closes [aws/aws-cdk#11219](https://github.com/aws/aws-cdk/issues/11219) + +## [1.14.0](https://github.com/aws/jsii/compare/v1.13.0...v1.14.0) (2020-10-29) + + +### โš  BREAKING CHANGES + +* The `jsii/superchain` Docker image no longer includes `ruby` and `gcc`. Users who need those should install them as part of their initialization script. + +### Features + +* **dotnet:** introduce `UnsafeCast()` method ([#2192](https://github.com/aws/jsii/issues/2192)) ([5e22e81](https://github.com/aws/jsii/commit/5e22e8182516c17757f857f8a4d50feca9a79b42)), closes [aws/aws-cdk#3284](https://github.com/aws/aws-cdk/issues/3284) [aws/aws-cdk-rfcs#193](https://github.com/aws/aws-cdk-rfcs/issues/193) +* **go:** dynamically load npm packages as needed ([#2067](https://github.com/aws/jsii/issues/2067)) ([7dbdbeb](https://github.com/aws/jsii/commit/7dbdbebe336bde2d02de598dc21d86d469a6abf0)) +* **go:** embed jsii runtime application ([#2066](https://github.com/aws/jsii/issues/2066)) ([85764de](https://github.com/aws/jsii/commit/85764deffd70af92333363bf38478440351654da)) +* **go:** Runtime method and static invoke support ([#2145](https://github.com/aws/jsii/issues/2145)) ([ff882c1](https://github.com/aws/jsii/commit/ff882c12defd6b703a32efe77cd3979b5cd2de9c)) +* **go:** runtime object creation ([#2117](https://github.com/aws/jsii/issues/2117)) ([977a063](https://github.com/aws/jsii/commit/977a063013601d70cc7a66e0a4cc6dce64789976)) +* **pacmak:** prerelease identifier support ([#2146](https://github.com/aws/jsii/issues/2146)) ([1338fc2](https://github.com/aws/jsii/commit/1338fc2492295f683381d00a04fb88517f3c4d55)), closes [#2114](https://github.com/aws/jsii/issues/2114) +* **pacmak/java:** emit default interface implementations ([#2076](https://github.com/aws/jsii/issues/2076)) ([c618de3](https://github.com/aws/jsii/commit/c618de3940085847bf0a0b44acc758b57508a842)), closes [#2014](https://github.com/aws/jsii/issues/2014) + + +### Bug Fixes + +* **dotnet:** abundant nullability warnings in generated code ([#2061](https://github.com/aws/jsii/issues/2061)) ([01a2951](https://github.com/aws/jsii/commit/01a295105b9d60edaf0ee0a3133e4b5942a971f2)) +* **go:** fix generation of readonly and static properties ([#2133](https://github.com/aws/jsii/issues/2133)) ([57b7d56](https://github.com/aws/jsii/commit/57b7d566bffb3516863308c4eb33d71a50b065bd)), closes [#2093](https://github.com/aws/jsii/issues/2093) +* **go:** runtime api json invalid tags ([#2115](https://github.com/aws/jsii/issues/2115)) ([a9d96db](https://github.com/aws/jsii/commit/a9d96db055b6b48797eaf0dad41c238807a75015)) +* **go:** Submodule File Paths ([#2147](https://github.com/aws/jsii/issues/2147)) ([8863493](https://github.com/aws/jsii/commit/886349335778b89ba57191a9b747940382df9497)) +* **jsii:** annotation '[@internal](https://github.com/internal)' causes missing type declarations downstream ([#2172](https://github.com/aws/jsii/issues/2172)) ([e80a4f7](https://github.com/aws/jsii/commit/e80a4f7869d11bcd9de8078e86fe137ac4d54237)), closes [#1947](https://github.com/aws/jsii/issues/1947) [#1830](https://github.com/aws/jsii/issues/1830) +* **jsii:** TypeError: Cannot read property 'getJsDocTags' of undefined ([#2163](https://github.com/aws/jsii/issues/2163)) ([5d87101](https://github.com/aws/jsii/commit/5d87101941ea71555927f5354a8f1da58df2d6d5)), closes [#2098](https://github.com/aws/jsii/issues/2098) +* **jsii-diff:** external structs returned from methods cannot be changed ([#2070](https://github.com/aws/jsii/issues/2070)) ([11e9389](https://github.com/aws/jsii/commit/11e9389c0fa2444502e2c8e232e7ac549dc13f04)), closes [#2064](https://github.com/aws/jsii/issues/2064) +* **pacmak/python:** escape character escapes in python docs ([#2138](https://github.com/aws/jsii/issues/2138)) ([1578899](https://github.com/aws/jsii/commit/1578899b524494b11f39faf9764fa17b854b51d1)), closes [#2137](https://github.com/aws/jsii/issues/2137) +* **python:** leftover jsii-kernel-* directories in TMPDIR ([#2100](https://github.com/aws/jsii/issues/2100)) ([c119994](https://github.com/aws/jsii/commit/c11999499e6f9679da0272d96a1422025bbc0502)) +* **rosetta:** duplicated problem markers ([#2130](https://github.com/aws/jsii/issues/2130)) ([21c6fb5](https://github.com/aws/jsii/commit/21c6fb5df90751323a0e71a205a4f71185d1e8f4)) + + +* removes unused software from superchain to reduce image size ([#2092](https://github.com/aws/jsii/issues/2092)) ([fe2c597](https://github.com/aws/jsii/commit/fe2c5972a4c5c867b21cfa5c7d37a428f271296b)) + ## [1.13.0](https://github.com/aws/jsii/compare/v1.12.0...v1.13.0) (2020-09-29) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5be56ea028..ea3a13b90f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,7 +14,7 @@ will need a number of tools. We have built a Docker image with all the required tools, which we are using for our own CI/CD: the ["superchain" image][superchain] from. -[superchain]: https://github.com/aws/jsii/blob/master/superchain/Dockerfile +[superchain]: https://github.com/aws/jsii/blob/main/superchain/Dockerfile The image can be built for local usage, too: @@ -63,7 +63,7 @@ in your development environment. The project is managed as a [monorepo] using [lerna]. -[monorepo]: https://github.com/babel/babel/blob/master/doc/design/monorepo.md +[monorepo]: https://github.com/babel/babel/blob/main/doc/design/monorepo.md [lerna]: https://github.com/lerna/lerna 1. Check out this respository and change directory to its root. @@ -163,7 +163,7 @@ example to work from. ## Releasing ### The `jsii/superchain` Docker image -Upon merging new changes to the `master` branch, the `jsii/superchain:nightly` +Upon merging new changes to the `main` branch, the `jsii/superchain:nightly` image will be released by TravisCI after a last validation build. Upon making a new `jsii` release (when the GitHub release entry - and its diff --git a/README.md b/README.md index caf5c8ea3f..59de047abd 100644 --- a/README.md +++ b/README.md @@ -1,356 +1,48 @@ # ![jsii](./logo/png/128.png) [![Join the chat at https://cdk.Dev](https://img.shields.io/static/v1?label=Slack&message=cdk.dev&color=brightgreen&logo=slack)](https://cdk.dev) -[![All Contributors](https://img.shields.io/github/all-contributors/aws/jsii?label=%E2%9C%A8%20All%20Contributors)](#contributors-) - -![Build Status](https://github.com/aws/jsii/workflows/Main/badge.svg) -![Build Status](https://img.shields.io/travis/aws/jsii?label=Travis-CI&logo=travis) - +[![All Contributors](https://img.shields.io/github/all-contributors/aws/jsii/main?label=%E2%9C%A8%20All%20Contributors)](#contributors-) +[![Build Status](https://github.com/aws/jsii/workflows/Main/badge.svg)](https://github.com/aws/jsii/actions?query=workflow%3AMain+branch%3Amain) [![npm](https://img.shields.io/npm/v/jsii?logo=npm)](https://www.npmjs.com/package/jsii) [![docker](https://img.shields.io/badge/docker-jsii%2Fsuperchain-brightgreen?logo=docker)](https://hub.docker.com/r/jsii/superchain) ## Overview -`jsii` allows code in any language to naturally interact with JavaScript -classes. It is the technology that enables the [AWS Cloud Development Kit][cdk] -to deliver polyglot libraries from a single codebase! +`jsii` allows code in any language to naturally interact with JavaScript classes. It is the technology that enables the +[AWS Cloud Development Kit][cdk] to deliver polyglot libraries from a single codebase! [cdk]: https://github.com/aws/aws-cdk -A class library written in **TypeScript** can be used in projects authored in -**TypeScript** or **Javascript** (as usual), but also in **Python**, **Java**, -**C#** (and other languages from the *.NET* family), ... - -> NOTE: Due to performance of the hosted **Javascript** engine and marshaling -> costs, `jsii` modules are best suited for development and build tools, as -> opposed to performance-sensitive or resource-constrained applications. -> -> See [Runtime Architecture] for more information. -> -> [Runtime Architecture]: ./docs/runtime-architecture.md - -### An example is worth a thousand words - -Consider the following **TypeScript** class: - -```ts -export class HelloJsii { - public sayHello(name: string) { - return `Hello, ${name}!` - } -} -``` - -By compiling our source module using `jsii`, we can now package it as modules -in one of the supported target languages. Each target module has the exact same -API as the source. This allows users of that target language to use `HelloJsii` -like any other class: - -- In **Python**: - ```python - hello = HelloJsii() - hello.say_hello("World"); # => Hello, World! - ``` -- In **Java** - ```java - final HelloJsii hello = new HelloJsii(); - hello.sayHello("World"); // => Hello, World! - ``` -- In **C#** - ```csharp - var hello = new HelloJsii(); - hello.SayHello("World"); // => Hello, World! - ``` -- ... and more to come! - -## Toolchain - -__jsii__ consists of multiple single-purposed programs which can be used to compose various workflows. - -> We are considering creating an "umbrella entrypoint" to make it easier to consume. - - Name | Stability | Description ------------------|--------------|----------------------------------------------------------------------------------- -[`jsii`] | Stable | Compiles TypeScript to jsii module -[`jsii-pacmak`] | Stable | Creates ready-to-publish language-specific packages from jsii modules -[`jsii-reflect`] | Stable | Strong-typed reflection library for jsii type systems -[`jsii-diff`] | Stable | API backwards compatibility checker -[`jsii-rosetta`] | Experimental | Transpile code snippets (in docs) from TypeScript to jsii languages -[`jsii-config`] | Experimental | Interactive tool for generating jsii configuration -[`jsii-release`] | Community | Publishes jsii modules to all supported package managers -[`jsii-srcmak`] | Community | Generates relocatable source code in jsii languages from typescript -[`jsii-docgen`] | Community | Generates markdown API documentation for jsii modules - -[`jsii`]: https://github.com/aws/jsii/tree/master/packages/jsii -[`jsii-pacmak`]: https://github.com/aws/jsii/tree/master/packages/jsii-pacmak -[`jsii-reflect`]: https://github.com/aws/jsii/tree/master/packages/jsii-reflect -[`jsii-config`]: https://github.com/aws/jsii/tree/master/packages/jsii-config -[`jsii-diff`]: https://github.com/aws/jsii/tree/master/packages/jsii-diff -[`jsii-rosetta`]: https://github.com/aws/jsii/tree/master/packages/jsii-rosetta -[`jsii-release`]: https://github.com/eladb/jsii-release -[`jsii-srcmak`]: https://github.com/eladb/jsii-srcmak -[`jsii-docgen`]: https://github.com/eladb/jsii-docgen - -> *"Community"*: a community-maintained project, not officially supported by the jsii team. - -## Getting Started - -Let's create our first jsii TypeScript module (actual outputs may slightly -differ): - -```console -$ mkdir hello-jsii -$ cd hello-jsii -$ npm init -y -Wrote to /tmp/hello-jsii/package.json: - -{ - "name": "hello-jsii", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "keywords": [], - "author": "", - "license": "ISC" -} -$ npm i --save-dev jsii jsii-pacmak -npm notice created a lockfile as package-lock.json. You should commit this file. -npm WARN hello-jsii@1.0.0 No description -npm WARN hello-jsii@1.0.0 No repository field. - -+ jsii-pacmak@0.14.3 -+ jsii@0.14.3 -added 65 packages from 54 contributors and audited 191 packages in 7.922s -found 0 vulnerabilities -``` - -Edit the `package.json` file: - -```js -/// package.json -{ - // ... - "main": "lib/index.js", - "types": "lib/index.d.ts", - "scripts": { - "build": "jsii", - "build:watch": "jsii -w", - "package": "jsii-pacmak" - }, - "jsii": { - "outdir": "dist", - "targets": { - "python": { - "distName": "acme.hello-jsii", - "module": "acme.hello_jsii" - }, - "java": { - "package": "com.acme.hello", - "maven": { - "groupId": "com.acme.hello", - "artifactId": "hello-jsii" - } - }, - "dotnet": { - "namespace": "Acme.HelloNamespace", - "packageId": "Acme.HelloPackage" - } - } - }, - "author": { - "name": "John Doe" - }, - "repository": { - "url": "https://github.com/acme/hello-jsii.git" - } - // ... -} -``` - -Read more about what those configuration entries do in the [configuration] -documentation. - -[configuration]: ./docs/configuration.md +A class library written in **TypeScript** can be used in projects authored in **TypeScript** or **Javascript** (as +usual), but also in **Python**, **Java**, **C#** (and other languages from the _.NET_ family), ... -Okay, we are ready to write some code. Create a `lib/index.ts` file: +## :question: Documentation -```ts -/// lib/index.ts -export class HelloJsii { - public sayHello(name: string) { - return `Hello, ${name}!`; - } -} -``` +Head over to our [documentation website](https://aws.github.io/jsii)! -Build your module: +# :book: Blog Posts -```console -$ npm run build -``` +Here's a collection of blog posts (in chronological order) related to `jsii`: -If build succeeds, you will see the resulting `lib/index.js` and -`lib/index.d.ts` files were produced, as well as the `.jsii` file (contents may -vary): +- **2020-01-11:** [How to Create CDK Constructs][mbonig-2020-01-11], by [Matthew Bonig][@mbonig] +- **2020-05-27:** [Generate Python, Java, and .NET software libraries from a TypeScript + source][floydpink-2020-05-27], by [Hari Pachuveetil][@floydpink] +- **2020-12-23:** [How the jsii open source framework meets developers where they are + ][romain-2020-12-23], by [Romain Marcadier][@RomainMuller] -```js -/// .jsii -{ - "author": { - "name": "John Doe", - "roles": [ - "author" - ] - }, - "description": "hello-jsii", - "homepage": "https://github.com/acme/hello-jsii.git", - "jsiiVersion": "0.14.3 (build 1b1062d)", - "license": "ISC", - "name": "hello-jsii", - "repository": { - "type": "git", - "url": "https://github.com/acme/hello-jsii.git" - }, - "schema": "jsii/0.10.0", - "targets": { - "dotnet": { - "namespace": "Acme.HelloNamespace", - "packageId": "Acme.HelloPackage" - }, - "java": { - "maven": { - "artifactId": "hello-jsii", - "groupId": "com.acme.hello" - }, - "package": "com.acme.hello" - }, - "js": { - "npm": "hello-jsii" - }, - "python": { - "distName": "acme.hello-jsii", - "module": "acme.hello_jsii" - } - }, - "types": { - "hello-jsii.HelloJsii": { - "assembly": "hello-jsii", - "fqn": "hello-jsii.HelloJsii", - "initializer": {}, - "kind": "class", - "locationInModule": { - "filename": "lib/index.ts", - "line": 1 - }, - "methods": [ - { - "locationInModule": { - "filename": "lib/index.ts", - "line": 2 - }, - "name": "sayHello", - "parameters": [ - { - "name": "name", - "type": { - "primitive": "string" - } - } - ], - "returns": { - "type": { - "primitive": "string" - } - } - } - ], - "name": "HelloJsii" - } - }, - "version": "1.0.0", - "fingerprint": "XYWYOiOupH4MmIjFj84wTSRfWqSw8hW37vHkVMO7iuY=" -} -``` +[mbonig-2020-01-11]: https://www.matthewbonig.com/2020/01/11/creating-constructs/ +[floydpink-2020-05-27]: + https://aws.amazon.com/fr/blogs/opensource/generate-python-java-dotnet-software-libraries-from-typescript-source/ +[romain-2020-12-23]: + https://aws.amazon.com/blogs/opensource/how-the-jsii-open-source-framework-meets-developers-where-they-are/ +[@mbonig]: http://www.matthewbonig.com/ +[@floydpink]: https://harimenon.com/ +[@romainmuller]: https://github.com/RomainMuller -This file includes all the information needed in order to package your module -into every `jsii`-supported language. It contains the module metadata from -`package.json` and a full declaration of your module's public API. +> :information_source: If you wrote blog posts about `jsii` and would like to have them referenced here, do not hesitate +> to file a pull request to add the links here! -Okay, now the magic happens: - -```console -$ npm run package - -> hello-jsii@1.0.0 package /Users/rmuller/Development/Demos/hello-jsii -> jsii-pacmak -v - -[jsii-pacmak] [INFO] Building hello-jsii (python,java,dotnet,js) into dist -[jsii-pacmak] [INFO] Packaged. java (4.3s) | dotnet (2.0s) | python (0.9s) | npm pack (0.5s) | js (0.0s) -``` - -Now, if you check out the contents of `dist`, you'll find: - -``` -dist -โ”œโ”€โ”€ dotnet -โ”‚ โ”œโ”€โ”€ Acme.HelloPackage.1.0.0.nupkg -โ”‚ โ””โ”€โ”€ Acme.HelloPackage.1.0.0.symbols.nupkg -โ”œโ”€โ”€ java -โ”‚ โ””โ”€โ”€ com -โ”‚ โ””โ”€โ”€ acme -โ”‚ โ””โ”€โ”€ hello -โ”‚ โ””โ”€โ”€ hello-jsii -โ”‚ โ”œโ”€โ”€ 1.0.0 -โ”‚ โ”‚ โ”œโ”€โ”€ hello-jsii-1.0.0-javadoc.jar -โ”‚ โ”‚ โ”œโ”€โ”€ hello-jsii-1.0.0-javadoc.jar.md5 -โ”‚ โ”‚ โ”œโ”€โ”€ hello-jsii-1.0.0-javadoc.jar.sha1 -โ”‚ โ”‚ โ”œโ”€โ”€ hello-jsii-1.0.0-sources.jar -โ”‚ โ”‚ โ”œโ”€โ”€ hello-jsii-1.0.0-sources.jar.md5 -โ”‚ โ”‚ โ”œโ”€โ”€ hello-jsii-1.0.0-sources.jar.sha1 -โ”‚ โ”‚ โ”œโ”€โ”€ hello-jsii-1.0.0.jar -โ”‚ โ”‚ โ”œโ”€โ”€ hello-jsii-1.0.0.jar.md5 -โ”‚ โ”‚ โ”œโ”€โ”€ hello-jsii-1.0.0.jar.sha1 -โ”‚ โ”‚ โ”œโ”€โ”€ hello-jsii-1.0.0.pom -โ”‚ โ”‚ โ”œโ”€โ”€ hello-jsii-1.0.0.pom.md5 -โ”‚ โ”‚ โ””โ”€โ”€ hello-jsii-1.0.0.pom.sha1 -โ”‚ โ”œโ”€โ”€ maven-metadata.xml -โ”‚ โ”œโ”€โ”€ maven-metadata.xml.md5 -โ”‚ โ””โ”€โ”€ maven-metadata.xml.sha1 -โ”œโ”€โ”€ js -โ”‚ โ””โ”€โ”€ hello-jsii@1.0.0.jsii.tgz -โ””โ”€โ”€ python - โ”œโ”€โ”€ acme.hello-jsii-1.0.0.tar.gz - โ””โ”€โ”€ acme.hello_jsii-1.0.0-py3-none-any.whl -``` - -These files are ready-to-publish artifacts for each target language. You can see -the npm tarball under `js`, the `python` package under `python`, the Maven repo -under `java`, etc... - -That's it. You are ready to rock! - -## Features - -### Source Languages - -* __TypeScript__ with [some restrictions](docs/typescript-restrictions.md) - -### Target Languages - -* __Javascript__ - generates an NPM package implicitly (no configuration - required). -* __Python__ - generates a ready-to-publish PyPI package. -* __Java__ - generates a ready-to-publish Maven package. -* __.NET__ - generates a ready-to-publish NuGet package. - -See the [configuration](./docs/configuration.md#targets) documentation for more -information on configuring the various targets. - - -# Contributing +# :gear: Contributing See [CONTRIBUTING](./CONTRIBUTING.md). @@ -363,134 +55,157 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + + + + + + + + + + + + +

Abdallah Hodieb

๐Ÿ›

ajnarang

๐Ÿค”

Alex Pulver

๐Ÿ›

Andy Slezak

๐Ÿ’ป

Anshul Guleria

๐Ÿค”

Ari Palo

๐Ÿค”

Hamza Assyad

๐Ÿ› ๐Ÿ’ป ๐Ÿฅ… ๐Ÿค” ๐Ÿ‘€

AWS CDK Automation

๐Ÿšง ๐Ÿ‘€

Aaron Costley

๐Ÿ› ๐Ÿ’ป ๐Ÿค” ๐Ÿ‘€

Abdallah Hodieb

๐Ÿ›

Adam Ruka

๐Ÿ› ๐Ÿ’ป ๐Ÿšง ๐Ÿ‘€

Alex Pulver

๐Ÿ›

Andy Slezak

๐Ÿ’ป

Anshul Guleria

๐Ÿค”

Ari Palo

๐Ÿค”

Bartล‚omiej Jurek

๐Ÿ›

Ben Bridts

๐Ÿ“–

Ben Farr

๐Ÿ“–

Ben Walters

๐Ÿค”

Benjamin Macher

๐Ÿ“–

Benjamin Maizels

๐Ÿ’ป ๐Ÿ‘€

AWS CDK Automation

๐Ÿšง ๐Ÿ‘€

Ben Walters

๐Ÿค”

Bartล‚omiej Jurek

๐Ÿ›

Benjamin Maizels

๐Ÿ’ป ๐Ÿ‘€

Brecht Verhoeve

๐Ÿค”

CaerusKaru

๐Ÿ’ป

Campion Fellin

๐Ÿ’ป โ˜•๏ธ

Bill Cauchois

๐Ÿค”

Brecht Verhoeve

๐Ÿค”

Breland Miley

๐Ÿ’ป

CaerusKaru

๐Ÿ’ป ๐Ÿšง

Camilo Bermรบdez

๐Ÿ›

Campion Fellin

๐Ÿ’ป

Carter Van Deuren

๐Ÿ›

Carter Van Deuren

๐Ÿ›

Christopher Currie

๐Ÿ’ป ๐Ÿค”

Raphael

๐Ÿ›

Aaron Costley

๐Ÿ› ๐Ÿ’ป ๐Ÿฅ… ๐Ÿค” ๐Ÿ‘€

CyrusNajmabadi

๐Ÿ› ๐Ÿค”

Dongie Agnir

๐Ÿ’ป โ˜•๏ธ ๐Ÿ‘€

Daniel Dinu

๐Ÿ› ๐Ÿ’ป

Christopher Currie

๐Ÿ’ป ๐Ÿค”

Christopher Rybicki

๐Ÿ“–

CyrusNajmabadi

๐Ÿ› ๐Ÿค”

Daniel Dinu

๐Ÿ› ๐Ÿ’ป

Daniel Schroeder

๐Ÿ› ๐Ÿ’ป ๐Ÿ“– ๐Ÿค” ๐Ÿšง

Dave Slotnick

๐Ÿ›

Donald Stufft

๐Ÿ› ๐Ÿ’ป ๐Ÿค” ๐Ÿ‘€

dependabot-preview[bot]

๐Ÿ› ๐Ÿšง

dependabot[bot]

๐Ÿšง

dheffx

๐Ÿ›

Shane Witbeck

๐Ÿค”

Donald Stufft

๐Ÿ› ๐Ÿ’ป ๐Ÿค” ๐Ÿ ๐Ÿ‘€

Junix

๐Ÿ›

Elad Ben-Israel

๐Ÿ› ๐Ÿ’ป ๐Ÿค” โ˜•๏ธ ๐Ÿšง ๐Ÿ‘€ ๐Ÿ“ข

Dongie Agnir

๐Ÿ’ป ๐Ÿ‘€

Eduardo Sena S. Rosa

๐Ÿ›

Elad Ben-Israel

๐Ÿ› ๐Ÿ’ป ๐Ÿค” ๐Ÿšง ๐Ÿ‘€ ๐Ÿ“ข

Eli Polonsky

๐Ÿ› ๐Ÿ’ป ๐Ÿค” ๐Ÿšง ๐Ÿ‘€

Eric Z. Beard

๐Ÿ“†

Erik Karlsson

๐Ÿ›

Eugene Kozlov

๐Ÿ’ป

Eric Z. Beard

๐Ÿ“†

Fabio Gentile

๐Ÿ›

James Mead

๐Ÿ’ป

Jason Fulghum

๐Ÿค” ๐Ÿ“† ๐Ÿ‘€

Mitch Garnaat

๐Ÿ› ๐Ÿ’ป ๐Ÿค” ๐Ÿ ๐Ÿ‘€

The Gitter Badger

๐Ÿ’ป ๐Ÿšง

Graham Lea

๐Ÿค” ๐Ÿ‘€

Fabio Gentile

๐Ÿ›

Florian Eitel

๐Ÿค”

Graham Lea

๐Ÿค” ๐Ÿ‘€

Hamza Assyad

๐Ÿ› ๐Ÿ’ป ๐Ÿค” ๐Ÿ‘€

Hari Pachuveetil

๐Ÿ“ ๐Ÿ“–

Hsing-Hui Hsu

๐Ÿ’ป ๐Ÿ“– ๐Ÿค” ๐Ÿ‘€

James Kelley

๐Ÿ›

gregswdl

๐Ÿ›

Thorsten Hoeger

๐Ÿ’ป

Eli Polonsky

๐Ÿ› ๐Ÿ’ป ๐Ÿค” ๐Ÿšง ๐Ÿ‘€

James Siri

๐Ÿ’ป ๐Ÿšง

Jason Del Ponte

๐Ÿšถโ€โ™€๏ธ ๐Ÿค” ๐Ÿ‘€

Jerry Kindall

๐Ÿ“– ๐Ÿค”

Joseph Lawson

๐Ÿ‘€

James Mead

๐Ÿ’ป

James Siri

๐Ÿ’ป ๐Ÿšง

Jason Del Ponte

๐Ÿค” ๐Ÿ‘€

Jason Fulghum

๐Ÿค” ๐Ÿ“† ๐Ÿ‘€

Jerry Kindall

๐Ÿ“– ๐Ÿค”

Jimmy Gaussen

๐Ÿค”

Jon Steinich

๐Ÿ› ๐Ÿค” ๐Ÿ’ป

Joseph Martin

๐Ÿ›

Justin Taylor

๐Ÿ›

Jon Steinich

๐Ÿ› ๐Ÿค”

Quentin Loos

๐Ÿค”

Kyle Thomson

โ˜•๏ธ ๐Ÿ‘€

Eugene Kozlov

๐Ÿ’ป

Vladimir Shchur

๐Ÿ›

Joseph Lawson

๐Ÿ‘€

Joseph Martin

๐Ÿ›

Junix

๐Ÿ›

Justin Taylor

๐Ÿ›

Kyle Thomson

๐Ÿ’ป ๐Ÿ‘€

Leandro Padua

๐Ÿ›

Maja S Bratseth

๐Ÿ›

Leandro Padua

๐Ÿ›

Marcos Diez

๐Ÿ›

Matthew Bonig

๐Ÿ›

Erik Karlsson

๐Ÿ›

mergify[bot]

๐Ÿšง

Mike Lane

๐Ÿ›

Breland Miley

๐Ÿ’ป

Marcos Diez

๐Ÿ›

Matthew Bonig

๐Ÿ› ๐Ÿ“

Matthew Pirocchi

๐Ÿ’ป ๐Ÿค” ๐Ÿ‘€

Mike Lane

๐Ÿ›

Mitch Garnaat

๐Ÿ› ๐Ÿ’ป ๐Ÿค” ๐Ÿ‘€

Mitchell Valine

๐Ÿ› ๐Ÿ’ป ๐Ÿค” ๐Ÿšง ๐Ÿ‘€

Mohamad Soufan

๐Ÿ“–

Matthew Pirocchi

๐Ÿ’ป ๐Ÿฅ… ๐Ÿค” ๐Ÿ‘€

Mitchell Valine

๐Ÿ› ๐Ÿ’ป ๐Ÿšถโ€โ™€๏ธ ๐Ÿค” ๐Ÿšง ๐Ÿ‘€

Neta Nir

๐Ÿ’ป ๐Ÿค” ๐Ÿšง ๐Ÿ‘€

Noah Litov

๐Ÿ’ป ๐Ÿšง ๐Ÿ‘€

Niranjan Jayakar

๐Ÿ› ๐Ÿ’ป ๐Ÿค” ๐Ÿšง ๐Ÿ‘€

Nick Lynch

๐Ÿ› ๐Ÿ’ป ๐Ÿšง ๐Ÿ‘€

Jimmy Gaussen

๐Ÿค”

Neta Nir

๐Ÿ’ป ๐Ÿค” ๐Ÿšง ๐Ÿ‘€

Nick Lynch

๐Ÿ› ๐Ÿ’ป ๐Ÿšง ๐Ÿ‘€

Niranjan Jayakar

๐Ÿ› ๐Ÿ’ป ๐Ÿค” ๐Ÿšง ๐Ÿ‘€

Noah Litov

๐Ÿ’ป ๐Ÿšง ๐Ÿ‘€

PIDZ - Bart

๐Ÿค”

Petra Barus

๐Ÿ’ป

Philip Cali

๐Ÿค”

Petra Barus

๐Ÿ’ป

Philip Cali

๐Ÿค”

PIDZ - Bart

๐Ÿค”

Richard H Boyd

๐Ÿ›

Rico Huijbers

๐Ÿ› ๐Ÿ’ป ๐Ÿค” ๐Ÿšง ๐Ÿ ๐Ÿ‘€

Romain Marcadier

๐Ÿ› ๐Ÿ’ป ๐ŸŽจ ๐Ÿฅ… ๐Ÿšถโ€โ™€๏ธ ๐Ÿค” โ˜•๏ธ ๐Ÿšง ๐Ÿ ๐Ÿ‘€

SADIK KUZU

๐Ÿ‘€

Quentin Loos

๐Ÿค”

Raphael

๐Ÿ›

Richard H Boyd

๐Ÿ›

Rico Huijbers

๐Ÿ› ๐Ÿ’ป ๐Ÿค” ๐Ÿšง ๐Ÿ‘€

Romain Marcadier

๐Ÿ› ๐Ÿ’ป ๐ŸŽจ ๐Ÿค” ๐Ÿšง ๐Ÿ‘€ ๐Ÿ“

SADIK KUZU

๐Ÿ‘€

SK

๐Ÿค”

Sam Goodwin

๐Ÿ‘€

seiyashima42

๐Ÿ› ๐Ÿ’ป ๐Ÿ“–

Tim Wagner

๐Ÿ› ๐Ÿค”

Shiv Lakshminarayan

๐Ÿ’ป ๐Ÿšง ๐Ÿ‘€

SK

๐Ÿค”

Adam Ruka

๐Ÿ› ๐Ÿ’ป ๐Ÿšง ๐Ÿ‘€

Sebastian Korfmann

๐Ÿ› ๐Ÿ’ป ๐Ÿค”

Sam Fink

๐Ÿ’ป ๐Ÿ‘€

Sam Goodwin

๐Ÿ‘€

Sebastian Korfmann

๐Ÿ› ๐Ÿ’ป ๐Ÿค”

Shane Witbeck

๐Ÿค”

Shiv Lakshminarayan

๐Ÿ’ป ๐Ÿšง ๐Ÿ‘€

Somaya

๐Ÿ’ป ๐Ÿค” ๐Ÿšง ๐Ÿ‘€

The Gitter Badger

๐Ÿ’ป ๐Ÿšง

Hsing-Hui Hsu

๐Ÿ’ป ๐Ÿ“– ๐Ÿšถโ€โ™€๏ธ ๐Ÿค” ๐Ÿ‘€

Somaya

๐Ÿ’ป ๐Ÿค” ๐Ÿšง ๐Ÿ‘€

Sam Fink

๐Ÿ’ป ๐Ÿ‘€

sullis

๐Ÿ’ป

Thomas Poignant

๐Ÿ›

Tobias Lidskog

๐Ÿ’ป

Tyler van Hensbergen

๐Ÿค”

Thomas Poignant

๐Ÿ›

Thomas Steinbach

๐Ÿ›

Thorsten Hoeger

๐Ÿ’ป

Tim Wagner

๐Ÿ› ๐Ÿค”

Tobias Lidskog

๐Ÿ’ป

Ty Coghlan

๐Ÿ›

Tyler van Hensbergen

๐Ÿค”

Daniel Schroeder

๐Ÿ› ๐Ÿ’ป ๐Ÿ“– ๐Ÿค” ๐Ÿšง

vaneek

๐Ÿ›

Vlad Hrybok

๐Ÿ›

Bill Cauchois

๐Ÿค”

Florian Eitel

๐Ÿค”

Yan Zhulanow

๐Ÿ’ป

Eduardo Sena S. Rosa

๐Ÿ›

Vlad Hrybok

๐Ÿ›

Vladimir Shchur

๐Ÿ›

Yan Zhulanow

๐Ÿ’ป

ajnarang

๐Ÿค”

aniljava

๐Ÿ’ป

deccy-mcc

๐Ÿ›

dependabot-preview[bot]

๐Ÿ› ๐Ÿšง

dependabot[bot]

๐Ÿšง

dheffx

๐Ÿ›

gregswdl

๐Ÿ›

mattBrzezinski

๐Ÿ“–

mergify[bot]

๐Ÿšง

seiyashima42

๐Ÿ› ๐Ÿ’ป ๐Ÿ“–

sullis

๐Ÿ’ป

vaneek

๐Ÿ›
- + + -This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! +This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. +Contributions of any kind welcome! -## License +## :balance_scale: License -__jsii__ is distributed under the [Apache License, Version 2.0][Apache-2.0]. +**jsii** is distributed under the [Apache License, Version 2.0][apache-2.0]. See [LICENSE](./LICENSE) and [NOTICE](./NOTICE) for more information. -[Apache-2.0]: https://www.apache.org/licenses/LICENSE-2.0 +[apache-2.0]: https://www.apache.org/licenses/LICENSE-2.0 diff --git a/buildspec.yaml b/buildspec.yaml index 53a77826f2..00fbd9c063 100644 --- a/buildspec.yaml +++ b/buildspec.yaml @@ -6,9 +6,6 @@ phases: # Temporarily - install yarn if it's not there already - yarn --version || npm install --global yarn - yarn install --frozen-lockfile - pre_build: - commands: - - yarn fetch-dotnet-snk build: commands: - yarn build && yarn test diff --git a/docs/assembly.md b/docs/assembly.md deleted file mode 100644 index aa6ad72ea0..0000000000 --- a/docs/assembly.md +++ /dev/null @@ -1,184 +0,0 @@ -# `.jsii` Assemblies - -This document describes the contents of the `.jsii` assembly documents generated -by the `jsii` compiler, and explains the semantics behind the various entities -it represents. This serves as a reference for front-end language implementors. - -## Schema - -`.jsii` assemblies are JSON-formatted documents. The specification is mastered -under the [`jsii-spec`](../packages/jsii-spec) package. Refer to the inline -documentation in the [`spec.ts`](../packages/jsii-spec/lib/spec.ts) file for -more information about the general content of the assembly documents. - -The most important part of the assembly documentation, which is described in -detail in this document, is the `types` map, which contains the descriptions of -all types declared by the `.jsii` assembly. It is a map from `jsii` fully -qualified type names to a type specification. - -All `boolean` attributes in the document specification are optional, and are -left out (`undefined`) when `false`. - -### Common Attributes - -Certain optional attributes are shared by API entities (types and members): - -* `docs` - documentation attached to the API entity - * `deprecated` - contains a message explaining why an API was deprecated - and/or how users should migrate away - * `stability` - the stability level of the API entity. The ultimate meaning of - the stability level is up to the package maintainer, but a baseline - interpretation of the valid values follows: - + `experimental` denotes an API that is actively worked on and are not - subject to semantic versioning gurantees (they may receive breaking - change on a *minor* version release) - + `stable` denotes an API that is safe to use in production systems and - are subject ot semantic versioning guarantees (they may not receive - breaking changes without a *major* version bump) - + `deprecated` denotes an API that should no longer be used. The - `deprecated` entry in the `docs` object should contain a message - explaining how users should migrate away - + `external` denotes an API that is not owned by the package's maintainer - and may change in unexpected ways. Such APIs are usually derived from - external artifacts, which the package maintainers do not have control - over. - * additional entries represent user-defined `JSDoc` tags with meaning defined - by convention and/or the package maintainer -* `locationInModule` - coordinates of the declaration in the source - * `fileName` - the path to the source file, relative to the package root - * `line` - the line number on which the entity is declared (or the first line - when a declaration spans multiple lines) - -### Types - -#### Classes - -Attribute | Type | Description --------------|-------------|---------------------------------------------------- -`kind` |`'class'` |Discriminator to identify classes -`abstract` |`boolean` |Whether this class is *abstract* -`assembly` |`string` |The name of the assembly this class is a part of -`base` |`string` |The fully-qualified name of the parent class of this class -`fqn` |`string` |The fully-qualified name of the class -`initializer`|`Constructor`|The class' [constructor] -`interfaces` |`string[]` |The fully-qualified names of interfaces implemented by this class -`methods` |`Method[]` |The [methods] declared by this class -`name` |`string` |The simple name of the class -`properties` |`Property[]` |The [properties] declared by this class - -[constructor]: #constructors -[interfaces]: #interfaces -[methods]: #methods -[properties]: #properties - -#### Interfaces - -`jsii` interfaces are declarations of type signatures that can be implemented by -classes. *Interface* names must be prefixed with an `I` (e.g: `IFoo`). - -Attribute | Type | Description --------------|-------------|---------------------------------------------------- -`kind` |`'interface'`|Discriminator to identify interfaces -`assembly` |`string` |The name of the assembly this interface is a part of -`fqn` |`string` |The fully-qualified name of the interface -`interfaces` |`string[]` |The fully-qualified names of interfaces extended by this inteface -`methods` |`Method[]` |The [methods] declared by this interface -`name` |`string` |The simple name of the interface -`properties` |`Property[]` |The [properties] declared by this interface - -#### Structs (a.k.a. Data Types) - -*Structs* (or *Data Types*) are immutable, data-only interfaces: -* They declare no methods -* All [properties] they declare are `readonly` -* They can only implement other *structs* -* They cannot be extended by interfaces that are not *structs* -* They cannot be implemented by *classes* - -Unlike regular *interfaes*, `jsii` *struct* names are not required to have -any particular prefix. - -Since those are immutable, pure data objects, the `jsii-runtime` exchanges -instances of those *by value*, instead of *by reference*, allowing to save -cross-language communication overhead when working with the data. - -Attribute | Type | Description --------------|-------------|---------------------------------------------------- -`kind` |`'inteface'` |Discriminator to identify interfaces -`datatype` |`true` |Indicates a *struct* / *data type* declaration -`assembly` |`string` |The name of the assembly this struct is a part of -`fqn` |`string` |The fully-qualified name of the struct -`interfaces` |`string[]` |The fully-qualified names of *struct* extended by this *struct* -`name` |`string` |The simple name of the struct -`properties` |`Property[]` |The [properties] declared by this struct (all `readonly`) - -#### Enums - -Attribute | Type | Description --------------|--------------|--------------------------------------------------- -`kind` |`'enum'` |Discriminator to identify enums -`assembly` |`string` |The name of the assembly this enum is a part of -`fqn` |`string` |The fully-qualified name of the enum -`members` |`EnumMember[]`|The [enum members] declared by this enum -`name` |`string` |The simple name of the enum - -[enum members]: #enum-members - -### Members - -#### Constructors - -Attribute | Type | Description --------------|--------------|--------------------------------------------------- -`overrides` |`string` |The fully-qualified name of the class/interface that declares the overridden constructor -`parameters` |`Parameter[]` |Parameters of this constructor -`protected` |`boolean` |Whether this constructor is protected -`variadic` |`boolean` |Whether the last parameter is `variadic` - -#### Enum Members - -Attribute | Type | Description --------------|--------------|--------------------------------------------------- -`name` |`string` |The name of the enum member. Must be `UPPER_SNAKE_CASED` - -#### Methods - -Attribute | Type | Description --------------|---------------|-------------------------------------------------- -`abstract` |`boolean` |Whether this method is `abstract` -`async` |`boolean` |Whether this method is asynchronous -`name` |`string` |The name of the method -`overrides` |`string` |The fully-qualified name of the class/interface that declares the overridden method -`parameters` |`Parameter[]` |Parameters of this method -`protected` |`boolean` |Whether this method is protected -`returns` |`OptionalValue`|The return type of the method -`static` |`boolean` |Whether this method is `static` -`variadic` |`boolean` |Whether the last parameter is `variadic` - -Methods with the `abstract` feature may only be members of `abstract` classes or -[interfaces], and all methods that are members of [interfaces] must be -`abstract`. - -Methods that are `static` cannot feature the `overrides` attribute, as `static` -members are not inherited. - -#### Properties - -Attribute | Type | Description --------------|---------------|-------------------------------------------------- -`abstract` |`boolean` |Whether this property is `abstract` -`const` |`boolean` |Whether this property is a constant (implies `static` and `immutable`) -`immutable` |`boolean` |Whether this property is immutable -`name` |`string` |The name of the property -`optional` |`boolean` |Whether this property is optional -`overrides` |`string` |The fully-qualified name of the class/interface that declares the overridden property -`protected` |`boolean` |Whether this constructor is protected -`static` |`boolean` |Whether this property is `static` -`type` |`TypeReference`|The type of the property - -Properties that are `const` must have a `name` that is `UPPER_SNAKE_CASED`. They -represent constants similar to [Enum Members], which can be proactively resolved -by the `jsii` runtimes. - -Proeprties that are `static` cannot feature the `overrides` attribute, as -`static` members are not inherited. diff --git a/docs/configuration.md b/docs/configuration.md deleted file mode 100644 index 93b3837af0..0000000000 --- a/docs/configuration.md +++ /dev/null @@ -1,366 +0,0 @@ -# Configuration - -The configuration for `jsii` is recorded in the `package.json` file, which is -the standard package manifest for NPM packages. This document describes the -constraints and extensions `jsii` adds to the [package.json schema]. - -[package.json schema]: https://docs.npmjs.com/files/package.json - -## jsii-config - -Use [jsii-config](../packages/jsii-config) to aid in configuring a new jsii module. - -## Additional Requirements & Extensions - -In order to be able to generate valid packages for all the supported target -package managers, certain fields that are optional in the standard -[package.json schema] are required by `jsii`. - -For example, Maven Central requires packages to carry [sufficient metadata], -such as *developer information* and *license*, in order to be valid for -publishing. - -Field | Required | Extensions -------------|----------|-------------------------------------------------------- -`author` | Required | `author.organization` -`license` | Required | -`main` | Required | -`repository`| Required | -`stability` | | The field itself is an extension -`types` | Required | - -[sufficient metadata]: https://central.sonatype.org/pages/requirements.html#sufficient-metadata - -### Attribution & Licensing - -* The [`author`][npm-author] field must be set. Although the string form - (`"The Octocat (https://github.com/octocat)"`) works, - it is recommended to set the value using the `object` format: - ```js - { - // ... - "author": { - "name": "The Octocat", // Required - "email": "octocat@github.com", // Optional - "url": "https://github.com/octocat", // Optional - "organization": false // Optional (defaults to false) - }, - // ... - } - ``` - The `organization` field is an extension from the [package.json schema] that - can be used to signal the `author` field refers to an `organization` and not - and individual person. -* The [`license`][npm-license] field must be set to a valid [SPDX license id]. - If you do not intend to release your package for third party consumption, - `UNLICENSED` (not to be confused with `Unlicense`) is a valid option. - -[npm-author]: https://docs.npmjs.com/files/package.json#people-fields-author-contributors -[npm-license]: https://docs.npmjs.com/files/package.json#license -[SPDX license id]: https://spdx.org/licenses/ - -### Source Control Information - -The [`repository`][npm-repository] field must be set to the URL of the -source-control system (such as a `git` repository) for the package. The -recommended way to provide the value is using the `object` representation: -```js -{ - "repository": { - "url": "https://github.com/aws/jsii.git", // Required - "type": "git", // Recommended - "directory": "/path" // Optional - } -} -``` - -[npm-repository]: https://docs.npmjs.com/files/package.json#repository - -### Library Entry Point - -Both the [`main`][npm-main] field must be set to the `.js` file that acts as the -entry point of your library (what node's `require('library-name')` will load). -Additionally, `TypeScript`'s [`types`][ts-types] field must be set to the -`.d.ts` file corresponding to the `main` file. The assembly emitted by `jsii` -will only represent types that are exported from the `types` file. - -[npm-main]: https://docs.npmjs.com/files/package.json#main -[ts-types]: https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html#including-declarations-in-your-npm-package - -### Package-level API Stability - -The [`.jsii` assembly document](./assembly.md) allows representing API stability -levels on individual API elements. The default value set for API elements for -which a stability declaration is not found can be configured using the -`stability` field of the `package.json` file. It can be set to one of the -following values: `experimental`, `stable`, `deprecated` and `external`. While -the exact semantic value of those fields is defined by the package maintainer, -the generic interpretation for those on packages is: - -* `experimental` - the package is not yet ready for production usage, as it is - still in the early stages if it's development. -* `stable` - the package is ready for production and it's APIs should be - expected to adhere to [semantic versioning]. -* `deprecated` - the package should no longer be used and may no longer be - maintained. It is a good practice to set the `deprecated` field in - `package.json` with an explanation of how consumers of the package should - update their dependencies. -* `external` - the package includes APIs that are derived from external - artifacts, and the owners of those artifacts control their stability. - - -## The `jsii` section - -In order to configure the behavior of `jsii`, the `package.json` file must -include a `jsii` section that can contain the following entries: - -Field | Type | Required | Default --------------------|------------|----------|------------------------------------ -`excludeTypescript`|`string[]` | | *none* -`metadata` |`object` | | *none* -`projectReferences`|`boolean` | | `true` -`targets` |`object` | Required | -`tsc` |`object` | | `{ outDir: '.', rootDir: '.' }` -`versionFormat` |`short|full`| | `full` - -### `excludeTypescript` - -By default, `jsii` will include _all_ `*.ts` files (except `.d.ts` files) in the -`TypeScript` compiler input. This can be problematic for example when the -package's build or test procedure generates `.ts` files that cannot be compiled -with `jsii`'s compiler settings. - -The `excludeTypescript` configuration accepts a list of glob patterns. Files -matching any of those patterns will be excluded from the `TypeScript` compiler -input. - -### `metadata` - -The `metadata` section can be used to record additional metadata as key-value -pairs that will be recorded as-is into the `.jsii` assembly file. That metadata -can later be inspected using [`jsii-reflect`](../packages/jsii-reflect) -utilities, for example. - -### `targets` - -The `targets` section is where `jsii` packages define which target languages -they support. This provides the package generators with the additional -information they require in order to name generated artifacts. Configuration is -provided as a mapping from target name to a configuration object. - -#### Configuring `Python` - -The `python` target requires two configuration entries: -* `module` - the name of the generated **Python** module, which will be used by - users in `import` directives. -* `distName` - the [PyPI] distribution name for the package. -* `classifiers` - a list of [trove classifiers] to declare on the package. It is - the user's responsibility to specify *valid* values (the authoritative list of - valid [trove classifiers] is masted in the [pypa/trove-classifiers] package). - * Some classifiers are automatically included (and should not be added to the - `classifiers` property) based on relevant configuration from the - `package.json` file: - * `Development Status :: ` is determined based on the package's `stability` - * `License ::` is determined based on the package's `license` - * `Operating System :: OS Independent` is always set - * `Typing :: Typed` is always set - * Additionally, the following `Programming Language ::` classifiers are - already set (more could be added by the user if relevant): - * `Programming Language :: Python :: 3 :: Only` - * `Programming Language :: Python :: 3.6` - * `Programming Language :: Python :: 3.7` - * `Programming Language :: Python :: 3.8` - -Example: -```js -{ - "jsii": { - "targets": { - "python": { - "module": "hello_jsii", // Required - "distName": "hello-jsii", // Required - "classifiers": [ // Optional - "Framework :: AWS CDK", - "Framework :: AWS CDK :: 1" - ] - }, - // ... - } - // ... - }, - // ... -} -``` - -The resulting package can be published to [PyPI]. - -[PyPI]: https://pypi.org/ -[trove classifiers]: https://www.python.org/dev/peps/pep-0301/#distutils-trove-classification -[pypa/trove-classifiers]: https://github.com/pypa/trove-classifiers - -#### Configuring `Java` - -The `java` target requires the following configuration: -* `maven` - the `groupId` and `artifactId` for the **Maven** package. - + Optionally a `versionSuffix` can be provided that will be appended at the - end of the **Maven** package's `version` field. The suffix must start with - a `.` or a `-`. -* `package` - the root **Java** package name under which the types will be - declared. - -Example: -```js -{ - "jsii": { - "java": { - "package": "acme.jsii.hello", // Required - "maven": { - "groupId": "acme", // Required - "artifactId": "jsii-hello", // Required - "versionSuffix": ".PREVIEW" // Optional - } - }, - // ... - }, - // ... -} -``` - -The resulting artifact is a **Maven** package that can be deployed to -[Maven Central] using the `deploy-staged-repository` command of the -[nexus-staging-maven-plugin]. - -[Maven Centra]: https://search.maven.org -[nexus-staging-maven-plugin]: https://mvnrepository.com/artifact/org.sonatype.plugins/nexus-staging-maven-plugin - -#### Configuring `.NET` - -The `dotnet` target requires the following configuration: -* `namespace` - the root namespace under which types will be declared. -* `packageId` - the identified of the package in the NuGet registry. -* `iconUrl` - the URL of the icon to be shown in the [NuGet Gallery][NuGet]. It - should be at least 64x64 pixels and a transparent background is recommended. - See the [.NET documentation] for more information. -* `versionSuffix` - an optional suffix that will be appended at the end of the - NuGet package's `version` field. The suffix must start with a `-`. -* `signAssembly` - whether the assembly should be strong-name signed. Defaults - to `false` when not specified. -* `assemblyOriginatorKeyFile`- the path to the strong-name signing key to be - used. When not specified or if the file referred to does not exist, the - assembly will not be strong-name signed. - -Example: -```js -{ - "jsii": { - "dotnet": { - "namespace": "Acme.HelloJsii", // Required - "packageId": "Acme.HelloJsii", // Required - "iconUrl": "https://cdn.acme.com/icon.png", // Optional - "signAssembly": true, // Optional - "assemblyOriginatorKeyFile": "./key.snk", // Optional - "versionSuffix": "-preview" // Optional - }, - // ... - }, - // ... -} -``` - -The resulting artifact is a NuGet package that can be published to [NuGet] using -the standard [`nuget push`][nuget-push] command. - -[NuGet]: https://www.nuget.org -[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` -runtimes, `jsii` generates a [`tsconfig.json`] file with fixed settings at the -beginning of the compilation pass. Certain configuration options can however -be set by the maintainers in order to better suit their development workflow -or processes. Those configuration are set in the `jsii.tsc` section of the -`package.json` file, but use the same name as [`tsconfig.json`]: - -* `outDir` - path to the directory when artifacts generated by the `TypeScript` - compiler will be placed. - * This influences the location of `.d.ts` and `.js` files, but will not affect - the location of the `.jsii` file, which will _always_ be placed at the - package's root. -* `rootDir` - specifies the root directory that contains all of the `.ts` source - files. This is used in conjunction with `outDir`, to control the directory - structure that gets generated. - -Refer to the [TypeScript compiler options reference][ts-options] for more -information about those options. - -[`tsconfig.json`]: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html -[ts-options]: https://www.typescriptlang.org/docs/handbook/compiler-options.html - -### `versionFormat` - -Determines the format of the `jsii` toolchain version string that will be -included in the `.jsii` assembly file's `jsiiVersion` attribute. - -* `full` (the default) - a version number including a commit hash will be used - * For example: `0.14.3 (build 1b1062d)` -* `short` - only the version number of `jsii` will be used - * For example: `0.14.3` - -This option is primarily useful for developing regression tests when developing -`jsii` itself, as using the `short` format reduces volatility in the assemblies -generated by development versions of `jsii`. Users of `jsii` are advised to -leave the default setting, as having full version information can be essential -when trying to troubleshoot assembly generation problems. - -## Dependency considerations - -Like any node library, `jsii` packages can declare runtime dependencies using -the [`dependencies`][npm-reps] section of `package.json`. - -[npm-deps]: https://docs.npmjs.com/files/package.json#dependencies - -### Dependencies that are `jsii` modules - -Node modules are conventionally versioned using [semantic versioning], but that -is not true of all package managers that `jsii` is able to target. Additionally, -only one version of the `jsii` runtime and kernel can be used within a given -application. In order to avoid version resolution surprises at run-time, `jsii` -requires duplicating `jsii` modules declarations from [`dependencies`][npm-deps] -into the [`peerDependencies`][npm-peer-deps] section. - -[npm-peer-deps]: https://docs.npmjs.com/files/package.json#peerdependencies -[semantic versioning]: https://semver.org - -### Dependencies that are not `jsii` modules - -The `jsii` runtimes in non-**javascript** languages do not use `npm install`, -and as a consequence cannot rely on `npm install` bringing in a package's -dependencies. As a consequence, dependencies that are not themselves `jsii` -modules, __must__ also be referenced in the [`bundledDependencies`][npm-bundled] -section, so that they are bundled within the NPM package. - -[npm-bundled]: https://docs.npmjs.com/files/package.json#bundleddependencies diff --git a/docs/handbooks/language-implementation.md b/docs/handbooks/language-implementation.md deleted file mode 100644 index 931ab54f7d..0000000000 --- a/docs/handbooks/language-implementation.md +++ /dev/null @@ -1,217 +0,0 @@ -# Language Implementation Handbook - -This handbook provides an overview of the process that should be followed when -looking to implement support for a new programming language in *jsii*. It -attempts to provide a step-by-step procedure, while drawing the reader's -attention on points that have been found to cause problems in the past. - -__Table of Contents__ -1. [Foreword](#foreword) -1. [Scoping & Planning](#scoping-&-planning) - 1. [Language Proposition RFC](#language-proposition-rfc) -1. [Code Generation](#code-generation) -1. [Host Library](#host-library) -1. [Building & Packaging](#building-&-packaging) -1. [Documentation](#documentation) -1. [Developer Preview](#developer-preview) -1. [General Availability](#general-availability) - --------------------------------------------------------------------------------- - -## Foreword - -Implementing a new language in *jsii* is not just a matter of implementing code -generation. Mapping the *[jsii type system]* to a new programming language means -finding how to represent an API originally designed in TypeScript to a form that -is as idiomatic as possible in the new language. This is a craft that often -requires trial and error, and the best (if not only) way to validate a proposal -is to put it in front of users and seek feedback. As a consequence, this -endeavor should be expected to span months, not weeks. - - -## Scoping & Planning - -The first step of most successful projects is to start by scoping work out and -establishing a baseline plan to execute on. For contributors not yet familiar -with *jsii*, the [specification] document is a great place to start. In -particular, the [New Language Intake] document provides a high-level view of the -recommended process for implementing new language support. - -The work of implementing support for a new language involves many different -components: -- The [`jsii`] compiler emits warnings when a language's reserved words are used - to name types, methods or properties; as this will later require slugification - or escaping in the generated code - usually resulting in a degraded developer - experience. -- The [`jsii-pacmak`] tool includes code generators for all supported languages, - and a new implementation must be provided for the new language. -- Code generation usually requires specific configuration to be provided in - order to be able to generate valid packages (for example, the **Java** code - generator requires a base java package to generate into, as well as a Maven - group and artifact ID for the package). The [`jsii-config`] tool needs to be - updated with support generating a configuration block with the required - entries for the new code generator. -- [`jsii-rosetta`] tool translates **TypeScript** example code found in the - original documentation into the new target language. A new translation - implementation needs to be added for the new language. -- Building and publishing infrastructure elements are provided by - [`aws-delivlib`] to make it easier for *jsii* users to publish their libraries - to all supported package registries. - -### Language Proposition RFC - -The recommended way to formalize the initial plan is to write it into an RFC -hosted in the [CDK RFC repository]. Enough time has to be spent considering the -requirements in order to get the work scoped and planned well, ensuring smooth -execution. - -An additional benefit of following the RFC process is that it makes it easier -to track learnings accumulated through the implementation process, as those will -be tracked as comments or iterations on the RFC document. - -It is possible (and sometimes desirable) to start prototyping code-generation -for the new language, as this can highlight implementation challenges that need -to be discussed in the RFC document. In any case, examples of the API signatures -that are expected to be rendered allow early feedback to be provided by possible -future users, and still helps identify challenges. - -The following questions should be answered as early as possible in the process, -to avoid surprises later on that result in significant re-engineering effort: - -* What do the generated APIs look like, for the typical API idioms? - - *Classes* (constructors, properties, methods, inheritance strategy, abstract - members, ...) - + The [AWS CDK] (one of the main consumers of *jsii*) uses specific patterns - to offer a better experience in many programming languages. For example, - constructor signatures where the last argument is a *jsii struct* allows - for keyword argument lifting in **Python**, and convenient `Builder` APIs - in **Java**. - - *Enums* - - *Interfaces* and *Structs* (properties, methods, inheritance strategy, - implementation, ...). In particular, how are new optional properties handled - (those are not considered breaking change within the [jsii type system]). - - *Structs* (properties, inheritance strategy, implementation, ...) -* What information is needed in order for the code-generator to produce - artifacts? What should the configuration block look like? -* What is the standard way to publish packages for the new language? - - Are there any requirements (code signature, special metadata, ...) that need - to be implemented in order to publish valid packages? - - How are dependencies modeled? If [semantic versioning] is not the norm, - what is the strategy to correctly represent semantic version ranges? -* What are the toolchain and platform requirements? - - For example, **Java** requires an OpenJDK 8 distribution and `maven`, - **Python** requires `python` 3.6 or above, etc... - -## Code Generation - -First, implement a first version of the code generation for the new language -before getting too far into the *[host library](#host-library)* implementation. -This top-down approach ensures the requirements for the lower level parts of -the implementation are well-defined before they are implemented (reducing the -chances that significant re-work has to be done), and enables using the [Standard -Compliance Suite] to ensure the overall implementation is *correct* according -to the [specification] (since the code necessary to implement the test cases -will be available right from the start). - -This work happens within the [`jsii-pacmak`] package. - -Focus initially on the API signatures before getting into their implementation. -The first version may even throw a *not implemented* exception when called. - -The [`jsii-calc`] package, can be used as a sample consuming library which uses -*jsii* to generate code in all target languages. Start by making sure a decent -API is generated from this package and its dependencies, and use those to -implement the tests from the [Standard Compliance Suite]. You'll also get a -feeling for whether the generated code achieves a good developer experience or -not. - -## Host Library - -Now that we are generating "empty shell" APIs that represent the necessary -entities to back the [Standard Compliance Suite] tests, start implementing the -*host library* and update the code generator until all the tests pass. It is -possible to publish artifacts even when tests in the suite are failing. As soon -as basic features are working, work on [Building and -Packaging](#building-and-packaging) can start, so early feedback can be -gathered. - -> :construction: A standard architecture for the *host library* has not been -> documented yet. Upcoming language implementations should contribute to this -> process by documenting a general architecture that should be implementable -> in any programming languages (and thus, abstracting away language -> specificities). - -## Building & Packaging - -The necessary toolchains should be added to he [`jsii/superchain`] Docker image, -so that the [`jsii-pacmak`] generation can be changed to support building ready -to publish artifacts instead of just code. - -Before publishing any artifacts, ensure all packages (the *host library* as well -as generated artifacts) are designated as *experimental* (e.g: **Python** -packages were annotated with the `Development Status :: 4 - Beta` trove -classifier on PyPI, and **NuGet** packages were published with a pre-release -version such as `1.2.3-pre`). - -Additionally, [`aws-delivlib`] needs to be augmented to support publishing -artifacts to the language's package repository. - -> :construction: The package publishing is being extracted from [`aws-delivlib`] -> into a standalone library, currently hosted at -> [`eladb/jsii-release`](https://github.com/eladb/jsii-release). - -## Documentation - -Before releasing the new language support to *Developer Preview*, basic -documentation needs to be produced to explain how to configure a *jsii* project -to support the new language, and any peculiarities in working with libraries -generated by [`jsii-pacmak`] for this language. - -Support for example code translation should also be built into [`jsii-rosetta`]. - -## Developer Preview - -Once the full [Standard Compliance Suite] passes (possibly with the exception of -certain fringy features), and the documentation covering all aspects of using -the language bindings have been produced, the new language can be released to -*Developer Preview*. - -It is recommended that new languages stay in *Developer Preview* for a minimum -of 4 weeks, ideally until they have received sufficient usage to have built -confidence that there are no major usability concerns: once out of *Developer -Preview*, it will no longer be possible to introduce breaking changes to the -generated code in order to address usability issues or bugs. - -In order to improve the chances of catching usability issues, focused user -experience studies will be conducted with an audience composed of developers -with varied degrees of experience with the new language. - -> :construction: A user experience template will be provided to ensure coverage -> of critical aspects of the experience. Any critical user experience issue -> (for example, issues that required breaking changes to the generated code) -> discovered but not covered in the template should be added to the template so -> that subsequent language implementations do not fall to the same problem. - -## General Availability - -Once the new language has been in *Developer Preview* without any significant -usability issues or bugs for a sufficient amount of time and is used in -real-world use-cases such as for [AWS CDK] applications, it becomes a candidate -to be declared *Generally Available*. At this point, breaking changes are no -longer possible on the generated code. - - -[jsii type system]: ../specifications/2-type-system.md -[specification]: ../specifications/1-introduction.md -[New Language Intake]: ../specifications/5-new-language-intake.md -[CDK RFC repository]: https://github.com/awslabs/aws-cdk-rfcs#readme -[`jsii`]: ../../packages/jsii -[`jsii-calc`]: ../../packages/jsii-calc -[`jsii-config`]: ../../packages/jsii-config -[`jsii-pacmak`]: ../../packages/jsii-pacmak -[`jsii-rosetta`]: ../../packages/jsii-rosetta -[Standard Compliance Suite]: ../specifications/4-standard-compliance-suite.md -[`jsii/superchain`]: ../../superchain -[`aws-delivlib`]: https://github.com/awslabs/aws-delivlib -[AWS CDK]: https://github.com/aws/aws-cdk -[semantic versioning]: https://semver.org diff --git a/docs/runtime-architecture.md b/docs/runtime-architecture.md deleted file mode 100644 index 6756f46274..0000000000 --- a/docs/runtime-architecture.md +++ /dev/null @@ -1,63 +0,0 @@ -# Runtime Architecture -## Generated Libraries - -When using `jsii-pacmak` to generate libraries in different programming -languages, the **Javascript** code is bundled within the generated library, so -that it can be used during at runtime. This is the reason why a `node` runtime -needs to be available in order to execute code that depends on *jsii* libraries. - -The generated libraries have a dependency on a *Runtime client* library for the -language, which contains the necessary logic to start a child `node` process -with the `jsii-runtime`. The `jsii-runtime` manages JSON-based inter-process -communication over its `STDIN` and `STDOUT`, and manages a `@jsii/kernel` -instance that acts as a container for the **Javascript** code that backs the -*jsii* libraries. - -## Architecture Overview - -A simplified representation of the execution environment of an application using -*jsii* libraries from a different language follows: - -``` -โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ” -โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ -โ”‚ User's Application โ”‚ โ”‚@jsii/kernelโ”‚LibAโ”‚LibBโ”‚...โ”‚ -โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ -โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”ค -โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ -โ”‚ โ”‚Generated Bindingsโ”‚ โ”‚ @jsii/runtime โ”‚ -โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ -โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค -โ”‚ โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ถโ”‚ STDIN โ”‚ โ”‚ -โ”‚ โ”‚Host jsii Runtime โ”‚ JSON โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ -โ”‚ โ”‚ โ”‚โ—€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค STDOUT โ”‚ node โ”‚ -โ”œโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ -โ”‚ โ”‚ โ”‚ (Child Process) โ”‚ -โ”‚ JVM / .NET / ... โ”‚ โ”‚ โ”‚ -โ”‚ โ”‚ โ”‚ โ”‚ -โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค -โ”‚ โ”‚ -โ”‚ Operating System โ”‚ -โ”‚ โ”‚ -โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ -``` - -The initialization workflow can be described as: -1. The *host* (**Java**, **.NET**, ...) application starts on its own runtime - (JVM, .NET Runtime, ...) -2. When the *host* code encounters a *jsii* entity for the first time (creating - an instance of a *jsii* type, loading a static constant, ...), the *runtime - client library* creates a child `node` process, and loads the `jsii-runtime` - library (specified by the `JSII_RUNTIME` environment variable, or the - version that is bundled in the *runtime client library*) -3. The *runtime client library* interacts with the child `node` process by - exchanging JSON-encoded messages through the `node` process' *STDIN* and - *STDOUT* -4. The *runtime client library* automatically loads the **Javascript** modules - bundled within the *generated bindings* (and their depedencies, bundled in - other *generated bindings*) into the `node` process when needed. -5. Calls into the *Generated bindings* are encoded into JSON requests and sent - to the child `node` process, which will execute the corresponding - **Javascript** code, then responds back. -6. Upon exiting, the *host* process closes the communication channels with the - child `node` process, causing it to exit. diff --git a/docs/specifications/1-introduction.md b/docs/specifications/1-introduction.md deleted file mode 100644 index 51926e8d74..0000000000 --- a/docs/specifications/1-introduction.md +++ /dev/null @@ -1,210 +0,0 @@ -# Introduction - -This document provides a high level overview of *jsii*, starting with its -design tenets. It introduces the concepts and components that compose *jsii*. - - -## Updating the Specification - -### Introduction - -The *jsii* specification follows the guiding principles of an RFC. It is a -living document that describes the current understanding of how the various -[components](#components) of *jsii* are operating, as well as the approaches -used to ensure consistent behavior across the various supported languages. - -The document is mastered with the *jsii* codebase, making it easy to determine -what specification was in place at the time of a give *jsii* release (by ways of -referring to the `vX.Y.Z` git tag). A single version of the specification is -considered **active** at any given time: the version of the specification that -is represented on the `HEAD` commit of the `master` branch of the [`aws/jsii`] -repository. The **active** specification must be the base version for any update -proposal. - -[`aws/jsii`]: https://github.com/aws/jsii - -The process to update the specification is intended to be as lightweight as -possible, while ensuring sufficient conversation takes place before implementing -significant (and breaking) changes. Since the process to update the -specification is part of the specification itself, it is amenable to be changed -following the process described in the currently **active** specification. - -### Process - -While the general process for updating the specification is to create a GitHub -pull request against the [`aws/jsii`] repository, the exact requirements for -what should be included in the pull request vary depending on the type of update -that is proposed: - -- [:warning: Changing Behavior](#new-behavior) describes the process to be - followed when introducing changes to the behavior of any component of *jsii*: - new features, breaking changes to existing features, ... -- [:mag: Addressing Gaps](#addressing-gaps) is the process used for adding - specification around existing but unspecified behavior. -- [:thumbsup: Trivial Changes](#trivial) explains how to propose changes that - improve the specification without changing its meaning. - -####
:warning: Changing Behavior - -If the change is **not backwards compatible** (it is a breaking change to an -existing feature, or it is a new feature that requires all runtime libraries -implement support immediately), a new RFC should be created in the -[`awslabs/aws-cdk-rfcs`] repository, following the [RFC Process]. This ensures -enough time is spent considering alternatives to breaking changes, and to create -consensus that the change is desirable before time is spent implementing it. - -[`awslabs/aws-cdk-rfcs`]: https://github.com/awslabs/aws-cdk-rfcs -[RFC Process]: https://github.com/aws/aws-cdk-rfcs#what-the-process-is - -> While going through the RFC process upfront is **strongly recommended**, -> contributors may choose not to file an RFC for a behavior change. In this case -> however, any core maintainer may decide that an RFC is required and block the -> contribution until the RFC process has been followed. -> -> It is worth noting that a draft pull request with proposed modifications to -> the specification (and possibly a proof-of-concept implementation), can b - -When the RFC is **ready**, a GitHub pull request is created that must contain: - -- Relevant additions or modifications to the specification documents -- Relevant additions or modifications to the compliance suite -- Implementation of the new behavior, including new or updated tests in all the - language bindings - -The pull request's body must reference the RFC if there has been one, and -otherwise must include all discussion necessary to explain the reasoning behind -the proposal (including alternatives considered, risks, ...). - -#### :mag: Addressing Gaps - -Proposals that increase the specification's coverage (desribing behavior that -already exists) are handled as GitHub pull requests that must contain the -following elements: - -- Relevant additions to the specification documents -- New compliance test(s) that enshrine the described behavior -- Implementation of the new compliance test(s) for all *Generally Available* - language bindings - -The pull request body should provide pointers to any and all elements that can -be used to verify that the behavior that is described is indeed what is -currently implemented. - -#### :thumbsup: Trivial Changes - -Proposal of trivial changes, such as correcting typos in the document, or -re-phrasing elements of the specification without altering the meaning -(typically to improve clarity) are handled in a simple GitHub pull request. - - -## Design Tenets (unless you know better ones) - -* *jsii* APIs strive to feel idiomatic in all supported languages. -* *jsii* applications behave identically regardless of the language they are - written in. It favors correctness over performance. -* *jsii* **does not** attempt to support all TypeScript idioms (many features of - TypeScript cannot be expressed in some target languages). - * Unsupported idioms will cause a compile-time error to be emitted. - * When prohibiting an idiom, *jsii* strives to provide an error message that - gives the user insight into why the pattern cannot be supported. -* *jsii* does not force API design opinions on the developer: - * Reserved names are limited to a minimum. - * TypeScript API design patterns that are known to result in poor developer - experience when represented in other languages will cause warnings to be - issued, but the developer is ultimately entitled to decide whether they want - to take or leave the advice. -* *jsii* produces artifacts compatible with idiomatic tools whenever possible: - * Generated libraries can be easily published to the "standard" package - repository for the language. - * Standard tools can be used to work with the generated libraries, and do not - require any special configuration. - - -## Annotations - -Annotations are present in the *jsii* specification to provide additional -information to the reader that is non-normative. Those take the form of -block-quotes that use the following chart: - -- > :construction: Is used to annotate parts of the specification that are known - > to be partially or incorrectly implemented in the current releases. Those - > are known issues in the current implementation that will be addressed in the - > future. - -- > :question: Is used to annotate open questions. They are typically in parts - > of the specification that is likely to change in future releases, and that - > may be good candidates for introducing RFCs. - -- > :warning: Is used to draw the reader's attention on specific points. They - > are used primarily to help the reader identify areas of the specification - > that, when incorrectly implemented, may result in hard-to-troubleshoot bugs; - > or to identify behavior that is intentionally undefined. - -- > :information_source: Is used to provide additional context which may not be - > obvious to the reader. They typically contain trivia that can help the - > reader understand the motivation for certain behaviors that are not always - > intuitive. - -## Concepts - -*jsii* allows developers to author code once in **TypeScript**, while allowing -use in a variety of other programming languages (including **C#**, **Java** and -**Python**). - -### Assemblies - -The *jsii Assembly* document contains a specific representation of the API -exported by the **TypeScript** module. Similar to a header file in the **C++** -world, it contains only information about the signatures of APIs (type names -with method and property signatures, associated documentation elements, ...) and -no implementation. - -The *npm* package produced as a result of compiling the **TypeScript** source -remains the source of truth with respects to implementation of the API. - -### Host & Kernel - -The [*jsii* runtime architecture] defines two processes: - -1. The *host* process runs the users' code native environment (a Java virtual - machine, the .NET Runtime, ...). -2. The *kernel* process hosts the **JavaScript** code from the standard *npm* - package defined by the user (and their dependencies), which is loaded and - managed by a standardized `@jsii/kernel` package. - -The *host* process is responsible for starting the *kernel* process as needed. A -designated *host runtime library* provides helper functions that will perform -the necessary initialization when needed, so the *host* app does not need to -include any special boilerplate code. - -The two processes exchange messages over a designated communication channel (for -example, using pipes), using a *kernel API* that is standardized in the *jsii -specification*. - -[*jsii* runtime architecture]: ../runtime-architecture.md - - -## Components - -Several tools are involved in making this possible: - -* [`jsii`] is a modified **TypeScript** compiler. In addition to generating - **JavaScript** code from the source, it produces a *jsii Assembly* document. -* [`jsii-pacmak`] generates language bindings from a package compiled using - `jsii`. It generates code in *host* languages that expose the API declared in - the *jsii Assembly* document. -* *Host runtime libraries* centralize features used by code generated by - [`jsii-pacmak`], such as primitives to interact with the *kernel* process, so - that this code does not need to be duplicated in every generated module. -* [`@jsii/kernel`] (and [`@jsii/runtime`]) provide the functionality exposed by - the *kernel* process, and allow the *host* code to seamlessly interact with - the **JavaScript** implementation. - -[`jsii`]: ../../../packages/jsii -[`jsii-pacmak`]: ../../../packages/jsii-pacmak -[`@jsii/kernel`]: ../../../packages/@jsii/kernel -[`@jsii/runtime`]: ../../../packages/@jsii/runtime - --------------------------------------------------------------------------------- - -Continue to [Type System](./2-type-system.md) diff --git a/docs/specifications/2-type-system.md b/docs/specifications/2-type-system.md deleted file mode 100644 index ab906b4421..0000000000 --- a/docs/specifications/2-type-system.md +++ /dev/null @@ -1,420 +0,0 @@ -# The *jsii* type system - -## Preamble -The base language for authoring *jsii* libraries for re-use from other languages -is **TypeScript**, which compiles to **JavaScript**. Consequently, the base type -system that *jsii* sources from is that of **TypeScript**. - -When used from another language than **TypeScript** or **JavaScript**, *jsii* -libraries are running the **JavaScript** code in a child *node* process, and -data is exchanged using **JSON**-based protocol. - -This document describes how **TypeScript** types map into the *jsii* type -system. - -The API represented by the *jsii* assembly only covers declarations that are -exported from the main file in the **TypeScript** project (as specified in the -`package.json` file by the `types` attribute). Restrictions described in this -document only apply to such declarations, the rest of the module can leverage -any **TypeScript** feature. - -## Basic Types - -### Introduction -In order to build useful programs, the simplest units of data need to be -modeled: booleans, numbers, strings, etc... Those basic building blocks are the -foundations on which APIs stand. *jsii* supports much of the same types that -**TypeScript** and **JavaScript** support, although with notable differences. - -### Boolean -The *jsii* type system mirrors **TypeScript**'s `boolean`, which is the simplest -primitive data types, with only two supported values: `true` and `false`. - -### Number -The *jsii* type system mirrors **TypeScript**'s `number`. All numbers are -floating point values. - -### String -The *jsii* type system mirrors **TypeScript**'s `string`. Strings are used to -represent textual data. - -### List -**TypeScript** arrays (`Array`, `T[]`, `ReadonlyArray` and `readonly T[]`) -are represented as *lists* in the *jsii* type model. Lists are shared between -the *node* process and the host process by-value, meaning a copy of the array is -produced each time it is passed through the process boundary. - -> :information_source: Items in the list may be passed by-reference (according -> to their type's specification), in which case mutating operations performed on -> those may be visible across the process boundary. - -### Enum -As in many languages, `enum` can be used to represent a group of related -constants. While **TypeScript** `enum` entries are associated with a value that -is either a `string` or a `number`, the *jsii* type system does not allow for -those to be down-casted to their value type (e.g: a `string`-valued `enum` entry -cannot be directly passed into a `string` parameter). - -> :information_source: Unlike in certain languages such as **Java**, `enum` -> types cannot declare new properties or methods. - -### Any and Unknown -**TypeScript** defines two opaque types: `any` and `unknown` that can be used to -represent a value of arbitary type. The difference between them is that while -`any` is assignable to any other type, `unknown` requires a type assertion or -explicit cast to be performed before it can be assigned. - -Both of these types map to an `Any` *primitive type* in the *jsii* type system, -and the subtle distinction between `any` and `unknown` is lost in the process. - -> :information_source: It is important to note that, contrary to the other types -> in the **TypeScript** type system, `any` and `unknown` types are inherently -> `null`-able. - -### Void -As in most languages, the `void` type is used to denote a method does not return -anything. - -### Null and Undefined -**JavaScript** differentiates `undefined` and `null` values. While `undefined` -denotes that *no value* has been set, `null` denotes an intentional signal of -there being *no data*. Most other programming languages (particularly statically -typed languages) however lack this distinction, and the *jsii* type model -consequently considers `null` and `undefined` are semantically equivalent. - -> :information_source: Unlike certain other programming languages, such as -> **Java**, **TypeScript** does not allow `null` (or `undefined`) values unless -> the type signature expressedly supports that (with the exception of `any` and -> `unknown`, which are implicitly `null`-able, as was discussed earlier). - -### Object -**TypeScript**'s `object` type denotes anything that is not a *primitive* type, -meaning anything other than a `number`, `string`, `boolean`, `bigint`, `symbol`, -`null` or `undefined`. - -In the *jsii* type model, `object` indicates a block of structured data that can -be shared by-value across the process boundary. As a consequence, they may not -include any method. - -> :construction: This type is called `Json` in the current implementation. - -> :question: The by-value nature of `object` is problematic because -> **TypeScript** makes no guarantee with respects to the absence of methods on -> `object`, and properties may be dynamic. - -### Promises -*jsii* supports asynchronous methods, and the **TypeScript** `Promise` type -has to be used as the result of `async` methods. Promises can only be used as -the result type of methods, not as the type of a property or parameter. - -### Unsupported **TypeScript** basic types -Due to how such types cannot be represented in many other programming languages, -the *jsii* type model does not support the following **TypeScript** entities: -- Tuples, a group of arbitrarily-typed values, often used as the result type for - multi-valued functions. -- The `never` type, which is used as the return type of functions that will not - yield control back to their invoker (infinite loops, `process.exit()`, ...). -- `bigint` and `symbol` don't have equivalents in many other programming - languages and are generally of limited value in API design. - - -## Complex Types -The goal of the *jsii* is to enable cross-language re-use of class libraries. -**TypeScript** enables representing classic object-oriented concepts, such as -*classes* and *interfaces*. The *jsii* type system supports some -additional nuances on top of those, to better represent **TypeScript** and -**JavaScript** idioms in a way that enables generating convenient APIs in other -languages. - -### Classes -Exported **TypeScript** classes are represented in the *jsii* type system, with -the following restrictions from plain **TypeScript**: -- Methods overloads are not supported. -- Overridden methods or properties must retain the exact same type signature as - the one declared in a parent type. The **jsii** type system strictly enforces - the [Liskov substitution principle]. - -[Liskov substitution principle]: https://en.wikipedia.org/wiki/Liskov_substitution_principle - -### Interfaces & Structs -Exported **TypeScript** interfaces are interpreted as one of two entities in the -*jsii* type system: -- If the `interface` name is prefixed with an `I` (e.g: `ISomething`), it is - interpreted as a *behavioral interface*. -- Otherwise (e.g: `Something`), it is interpreted as a *struct*. - -#### Behavioral Interfaces -*Behavioral interfaces* are the usual object-oriented interface: they can extend -other *behavioral interfaces*, and can be extended by *classes*. They may -however not extend *structs*. - -#### Structs -*Structs* are used to model the **JavaScript** idiom of receiving options as an -object literal passed as the last parameter of a function. They are a formal -description of a bag of properties, and are not meant to be implemented by other -types. Since those types are used as inputs, they can be handled as pure-data, -immutable objects, and the following restrictions apply: -- A *struct* cannot declare any *method*: they must be kept behavior-free. -- All properties declared by a *struct* must be `readonly`. The values of the - properties may however be mutable. - -*Structs* may extend one or more other *structs*, but cannot extend or be -extended by *behavioral interfaces*, and may not be implemented by *classes*. - -### Type Unions -In certain cases, several different kinds of values are acceptable for a given -parameter or return type. **TypeScript** models those cases using *type unions*, -which are represented as `TypeA | TypeB`. The *jsii* type model supports those, -however most other statically typed languages do not have such a concept, making -those parameters or return values difficult to use from those languages, as the -value has to be declared using the most generic reference type available (for -example, in **Java**, those are returned as `java.lang.Object`). - -When used as inputs (parameters, or properties of a *struct*), it may be -possible to generate method overloads that will allow for a convenient API in -languages that support overloads. - -In general however, *type unions* are discouraged and should only be used when -there is no alternative way to model the API. - - -## Serialization Behavior - -When values are passed between the *host* process and the `node` process, they -are serialized as JSON documents. They can be passed by value or by reference, -depending on the type of the value as well as the declared type of the transfer -point (method return type, property type, argument type, ...). - -The table below describes the serialization behavior applied for each possible -*declared* type (rows) for a value of a given dynamic type (columns). The :x: -sign expresses cases that are illegal and should cause immediate failure. The -term *primitive* encompasses `boolean`, `string`, and `number`. - -  | `undefined` | `Date` | *primitive* | `Array` | *instance* | `object` -------------|-------------|-------------|-------------|-------------|-------------|------------- -`void` | `undefined` | `undefined` | `undefined` | `undefined` | `undefined` | `undefined` -`Date` | `undefined` | [Date] | :x: | :x: | :x: | :x: -*primitive* | `undefined` | :x: | [Identity] | :x: | :x: | :x: -`enum` | `undefined` | :x: | [Enum] | :x: | :x: | :x: -`List` | `undefined` | :x: | :x: | [Array] | :x: | :x: -`Map` | `undefined` | :x: | :x: | :x: | :x: | [Mapping] -`interface` | `undefined` | :x: | :x: | :x: | [Reference] | [Reference] -`struct` | `undefined` | :x: | :x: | :x: | :x: | [Value] -`class` | `undefined` | :x: | :x: | :x: | [Reference] | [Reference] -`any` | `undefined` | [Date] | [Identity] | [Array] | [Reference] | [Value] or [Reference] - -In the case of `object` being passed though `any`, the value may be serialized -by [Value] only if the value being passed does not have any method or dynamic -accessor. Otherwise, it must be passed by [Reference] instead. - -> :warning: The serialization behavior around `undefined` values is affected by -> the `optional` attribute of the declared type. As discussed earlier, the `any` -> type is implicitly `optional`; but all other types' serialization process will -> only allow serialization of `undefined` if they were declared `optional`. - - -### Array Serialization -[Array]: #array-serialization - -Arrays are serialized into the standard JSON representation for them. Each value -in the array is serialized according to the behavior dictated by the declared -element type of the list, combined with the dynamic type of the value itself. - -### Date Serialization -[Date]: #date-serialization - -JSON has no standard expression for `Date`. A special JSON object representation -is used to allow unambiguously conveying a date. The wrapper has a single key -(`$jsii.date`) with the [ISO 8601-1] UTC representation of the `Date` value: - -```json -{ "$jsii.date": "2020-01-20T14:04:00.000Z" } -``` - -[ISO 8601-1]: https://www.iso.org/obp/ui#iso:std:iso:8601:-1:ed-1:v1:en - -### Enum Serialization -[Enum]: #enum-serialization - -In **JavaScript**, `enum` entries are represented by their value equivalent. In -order to support statically typed representations in other languages, these are -serialized using a dedicated wrapper object, using a single key (`$jsii.enum`) -with the fully qualified name of the `enum` entry: - -```json -{ "$jsii.enum": "@scope/module.EnumType.ENTRY_NAME" } -``` - -### Identity Serialization -[Identity]: #identity-serialization - -The identity serialization is achieved by using the standard JSON representation -of the primitive type. JSON strings are expressed using the `UTF-8` character -set. - -### Mapping Serialization -[Mapping]: #mapping-serialization - -Key-value pairs are passed by-value between the processes and is wrapped using a -single-key (`$jsii.map`) associated with the JSON representation of the encoded -object; where values are serialized according to the behavior dictated by the -element type of the mapping, combined with the dynamic type of the value itself: - -```json -{ - "$jsii.map": { - "foo": { - "date": { "$jsii.date": "2020-01-20T14:04:00.000Z" }, - "map": { "$jsii.map": {} } - } - } -} -``` - -### Reference Serialization -[Reference]: #reference-serialization - -Objects serialized by reference are passed using a special object that provides -sufficient information to tie back to the instance within its owning process. -It includes a `$jsii.byref` key associated with a string that uniquely -identifies the instance, and an optional `$jsii.interfaces` key that provides a -list of interfaces that the object implements. - -```js -{ - "$jsii.byref": "@scope/module.Foo@1337", - "$jsii.interfaces": ["@scope/module.IBar", "@scope/module.IBaz"] -} -``` - -### Value Serialization -[Value]: #value-serialization - -*Structs* can be serialized by-value. In those cases, the value is wrapped using -a special object that encapsulates the type information for the provided data as -well as the *struct*'s members. - -The wrapper uses a single `$jsii.struct` key with a `fqn` key that indicates the -fully qualified name of the *struct* type, and a `data` key that contains the -members of the *struct*, serialized according to the behavior described in this -document. - -```js -{ - "$jsii.struct": { - "fqn": "@scope/module.StructType", - "data": { - "enumValue": { "$jsii.enum": "@scope/module.EnumType.ENTRY_NAME" }, - "stringProperty": "Hello, I'm a string!" - } - } -} -``` - -## Submodules - -> :construction: The *submodules* feature is still under active development and -> the specific behavior around it (in particular with respects to code -> generation) are still subject to change. - -### Overview - -Typescript allows grouping declarations together in *namespaces*, which are -interpreted by *jsii* as *submodules*. *Submodules* names are the fully -qualified name of the namespace from the package's root (if a package `foo` -defines a namespace `ns1`, which itself contains `ns2`, the submodule for `ns2` -will be named `foo.ns1.ns2`). - -*Submodules* are delcared in the *jsii* assembly under the `submodules` key. -This is also where specific [configuration](#submodule-configuration) -is registered, if different from the parent submodule or package. - -*Submodules* are hierarchical, and their fully qualified name is representative -of the relationship. For example the `assm.foo.bar` submodule is considered to -be nested under the `assm.foo` submodule. - -### Restrictions - -*Submodules* cannot be involved in dependency cycles. While it is possible to -build such cycles in **JavaScript**, that configuration cannot be reliably -reprensented in certain other programming languages (e.g: **Python**). - -> :construction: [`jsii`] does not currently check for circular submodule -> dependencies. Invalid dependency patterns may result in errors at code -> generation by [`jsii-pacmak`], or at runtime. - -Since this would result in ambiguity that cannot be consistently resolved, a -given type can only be exported as part of one *submodule*. - -[`jsii`]: ../../packages/jsii -[`jsii-pacmak`]: ../../packages/jsii-pacmak - -### Declaration - -There are two supported ways to introduce *submodules*: -* Using the namespaced export syntax: - ```ts - export * as ns from './module'; - ``` -* Using an explicit namespace declaration: - ```ts - export namespace ns { /* ... */ } - ``` - -*Submodules* declared using the `export * as ns from './module';` syntax can be -documented using a markdown document located at `./module/README.md`. - -> :construction: The `./module/README.md` file support is not yet implemented. - -### Submodule Configuration - -In languages where this is relevant (e.g: **Python**), *submodules* are rendered -as native *submodules*. In languages where a namespace system exists (**Java** -uses *packages*, **C#** uses *namespaces*, ...), *submodules* are rendered using -that. - -By default, *submodule* names are rendered appropriately in the target language -(this typically involves adjusting the case of *submodule* name fragments to the -idiomatic form in the language). In certain cases however, a developer can -choose to use a different configuration by defining the *submodule* using the -namespaced-export syntax (`export * as namespace from './module-name';`) ny -placing a `.jsiirc.json` file next to the entry point of the namespaced module. -For example, if `./module-name`'s entry point is `foo/bar/module-name/index.ts`, -the *submodule* configuration resides in `foo/bar/module-name/.jsiirc.json`. - -Since *submodules* are hierarchical, the configuration of a given *submodule* -defines the default configuration of *submodules* nested under it. - -## Code Generation - -In order to generate code in various programming languages, [`jsii-pacmak`] -needs configuration that provides naming directives (e.g: **Java** package -names, **C#** namespaces, **Python** module names, ...). This configuration is -language-specific and each language implementation specifies and documents its -own configuration schema. - -Configuration is sourced in the `package.json` file at the root of the npm -package, under the special `jsii` key. The general schema is described in the -[configuration] document. - -> :construction: There is a proposition to allow this configuration to be placed -> in a `.jsiirc.json` file, which would take precedence over what is specified -> in `package.json`. *Submodules* introduced using the -> `export * as ns from './module';` syntax would then be able to define -> *submodule*-local configuration using the `./module/.jsiirc.json` file. - -[configuration]: ../configuration.md - -## References - -The [**TypeScript** Handbook] describes the language's type system and syntax -elements that serve as the basis for the *jsii* type system. Additionally, the -**JavaScript** type system is described in the [**JavaScript** Fundamentals] -document. - -[**JavaScript** Fundamentals]: https://javascript.info/types -[**TypeScript** Handbook]: https://www.typescriptlang.org/docs/handbook/basic-types.html - --------------------------------------------------------------------------------- - -Continue to [Kernel API](./3-kernel-api.md) diff --git a/docs/specifications/4-standard-compliance-suite.md b/docs/specifications/4-standard-compliance-suite.md deleted file mode 100644 index 4adde7ff1b..0000000000 --- a/docs/specifications/4-standard-compliance-suite.md +++ /dev/null @@ -1,513 +0,0 @@ -# Standard Compliance Suite - -## Goal -The goal of the standard compliance suite is to be a normative description of -the behaviors that all language runtime implementations (*host runtime library* -in combination with *code generation*) must implement. This description takes -the form of a collection of test cases that must be re-implemented in each -*host* language, so that compliance can be asserted. - -Since the goal of *jsii* is to expose a single Object-Oriented API to multiple -programming languages, it is important to ensure the behavior is consistent -across all of them. This can be achieved by making sure that the interactions -between the *host* and *kernel* processes are the same for a given use-case. - -## Format -In order to assert whether a new runtime implementation is correct, a formal -compliance test suite is defined, that all language runtimes must fully -implement before they can be deemed eligible for General Availability. - -This document describes these tests, as well as a general approach for ensuring -conformance requirements are met in a systematic manner. - -### Categories -Test cases in the standard compliance suite are grouped by categories, which -help implementors direct their effort in the early stages of the implementation -of new language bindings. Each category is declared in an `H3` title (a line -that starts with `### `) within the [`## Test Suite`] title. A description of -the category immediately follows the opening title. The category ends with the -end of the document, or whenever another `H2` title is reached. - -[`## Test Suite`]: #test-suite - -### Test Case -Within a category title, test cases are delimited by `H4` (`#### `) titles, -which correspond to the test case name. The test case name should be kept -concise (ideally within 75 characters) and try to be as descriptive as possible. - -Immediately after the `H4` title is an English language description of the test -case that explains the property the test is designed to validate in as much -detail as possible. As much as possible, test case descriptions should be -self-sufficient. - -After the attributes table, a **TypeScript** block of code describes the -canonical form of the test. It includes any type declaration that is used by the -test (so the code example is self-contained). Assertions performed by the test -should be written in the form of [`jest`] expectations. - -> :question: The assertion code is intended as a formal representation of the -> tests' normative procedure. It is not currently executed against the *kernel*, -> but this could be achieved in the future. Additionally, we might be able to -> automatically transliterate the tests to other languages using -> [`jsii-rosetta`]. - -[`jest`]: https://jestjs.io/docs/en/getting-started -[`jsii-rosetta`]: ../../../packages/jsii-rosetta - -Finally, another code block details the sequence of messages that should be -exchanged between the *host* and `node` processes during the execution of the -test case, such that implementations can assert coherent behavior. - -Initial messages corresponding to the `hello` and `load` calls can be omitted at -the beginning of the kernel trace. Those messages are typically identical -across tests and there is little value in asserting around those. However, any `load` -call happening after the first call that is neither the `hello` message or -another `load` call **must** be included. - -The dialogue is the sequence of JSON formatted messages, from the perspective of -the *host* app, using the following notation: - -* Messages sent by the *host* runtime to the `node` process: - ``` - > { "api": "foo" } - ``` -* Messages received by the *host* runtime from the `node` process: - ``` - < { "result": "bar" } - ``` -* Comments to improve readability of the trace: - ``` - # Comment continues until the end of the line - ``` -* Blank lines can be added to logically group trace elements - -> :question: is there a need to support some form of a capture mechanism to -> provision for non-deterministic results, or non-normative elements such as -> the exact Object IDs issued for created instances? - -
Show Template - -Below is the template markdown to copy-paste when introducing a new test case in -the compliance suite. New tests should always be added at the very end of the -category they belong to, right after the last test in said category. - -````md -### Test Category -#### Test Case Name - -A short english language description of what property this test verifies. The -description should include enough detail for a reader to be able to understand -the test without having to search for any additional information. Prefer a long, -unambiguous description to a terse one that could be subject to interpretation. - -
Show test - -##### Reference Implementation -```ts -// GIVEN -export class Foo { /* ... */ } - -// WHEN -const bar = new Foo().bar(); - -// THEN -expect(bar.baz).toBeUndefined(); -``` - -##### Reference Kernel Messaging -``` -## You can omit the initial hello/load messages -# < { "hello": "@jsii/runtime@1.2.3" } -# > { "load": { "name": "test-case-001", "version": "1.2.3", "tarball": "/tmp/jsii-kernel-test/lib.tgz" } } -# < { "assembly": "test-case-001", "types": 3 } -``` -
-```` -
- -## Compliance -In order to be able to assert compliance of language binding libraries to the -standard test suite, implementations are responsible for providing a test -harness (typically as part of the runtime library) that can produce a -standardized test report in the form of a JSON document that follows the -following schema: - -```ts -interface TestReport { - /** The report is broken down by test category, using the name as-is */ - [category: string]: { - /** For each test in the category, using its name as-is */ - [test: string]: { - /** Whether the test passed or failed */ - status: 'PASS' | 'FAIL'; - /** The kernel messages captured during the test */ - kernelTrace: Array; - }; - }; -} - -interface KernelMessage { - /** The direction the message was sent (Host -> Kernel / Kernel -> Host) */ - direction: 'FromKernel' | 'ToKernel'; - /** The message, as a JSON object */ - message: { [key: string]: unknown }; -} -``` - -The `@jsii/compliance` package provides the necessary tools to consume such a -test report, together with the Markdown document describing the compliance suite, -and procuces a report describing compliance test coverage as well as information -about any non-conformant test result. - -> :construction: The `@jsii/compliance` tool does not exist yet. - -> :question: Should a "somewhat standard" format such as XUnit test report be -> used instead of rolling our own JSON document? - -## Test Suite - -### Legacy -This section is due to contain all compliance tests that were implemented before -the *jsii specification* was initially written. They are going to be gradually -replaced by more focused tests with better descriptions. - -#### Type Unions are correctly disambiguated by the Kernel -In certain cases, two or more types in a *Type Union* can overlap in such a way -that they are all valid structural types for the value. Statically typed -languages however will not be satisfied with structural typing only, and require -the correct declared type to be preserved. - -
Show test - -##### Reference Implementation -```ts -// GIVEN -export interface BluePill { - readonly offeredTo: string; - readonly makesYouForgetTheMatrix?: boolean; -} -export interface RedPill { - readonly offeredTo: string; - readonly makesYouExitTheMatrix?: boolean; -} -export class Morpheus { - public static isBlue(pill: BluePill | RedPill): pill is BluePill { - const keys = new Set(Object.keys(pill)); - switch (keys.size) { - case 1: - return keys.has('offeredTo'); - case 2: - return keys.has('offeredTo') && keys.has('makesYouForgetTheMatrix'); - default: - return false; - } - } - public static isRed(pill: BluePill | RedPill): pill is RedPill { - const keys = new Set(Object.keys(pill)); - switch (keys.size) { - case 1: - return keys.has('offeredTo'); - case 2: - return keys.has('offeredTo') && keys.has('makesYouExitTheMatrix'); - default: - return false; - } - } - private constructor(){} -} -export class Neo { - public readonly tookBlue: boolean; - public readonly tookRed: boolean; - - public constructor(public readonly pill: BluePill | RedPill) { - this.tookBlue = pill.offeredTo == 'Neo' && Morpheus.isBlue(pill); - this.tookRed = pill.offeredTo == 'Neo' && Morpheus.isRed(pill); - } -} - -// WHEN -const bluePillA = new Neo({ offeredTo: 'not Neo' }); -const bluePillB = new Neo({ offeredTo: 'Neo', makesYouForgetTheMatrix: true }); -const redPillA = new Neo({ offeredTo: 'not Neo' }); -const redPillB = new Neo({ offeredTo: 'Neo', makesYouExitTheMatrix: true }); - -// THEN -expect(bluePillA.pill instanceof BluePill).toBeTruthy(); -expect(bluePillA.tookBlue).toBeFalsy(); -expect(bluePillA.tookRed).toBeFalsy(); - -expect(bluePillB.pill instanceof BluePill).toBeTruthy(); -expect(bluePillA.tookBlue).toBeTruthy(); -expect(bluePillA.tookRed).toBeFalsy(); - -expect(redPillA.pill instanceof RedPill).toBeTruthy(); -expect(bluePillA.tookBlue).toBeFalsy(); -expect(bluePillA.tookRed).toBeFalsy(); - -expect(redPillB.pill instanceof RedPill).toBeTruthy(); -expect(bluePillA.tookBlue).toBeFalsy(); -expect(bluePillA.tookRed).toBeTruthy(); -``` - -##### Kernel Trace -``` -``` -
- -#### Partially initialized object consumption -When a constructor passes `this` out from **JavaScript** to the *host* app, the -reference must be correctly identified and passed across. - -> :construction: The .NET Runtime does not currently honor object identity, -> meaning that despite the same object reference is returned twice, two distinct -> proxies exist for it in the *host* .NET app. -> -> Generally speaking, using pure object identity on *jsii* language front-ends -> is dangerous, as certain statically typed language will require the runtime to -> have different instances for different static types a given object reference -> is surfaced as. It may be necessary to introduce a helper akin to -> `Jsii.isSameObject(a, b)` to enable identity predicates to be used. Other -> helper functions may be necessary, too, such as one to obtain a "consistent" -> object hash for instances in Java (so they can be safely used with `HashMap`, -> ...). - -
Show test - -##### Reference Implementation -```ts -// GIVEN -export abstract class PartiallyInitializedThisConsumer { - public abstract consumePartiallyInitializedThis(obj: ConstructorPassesThisOut): void; -} -export class ConstructorPassesThisOut { - public constructor(consumer: PartiallyInitializedThisConsumer) { - consumer.consumePartiallyInitializedThis(this); - } -} - -// WHEN -class MyConsumer extends PartiallyInitializedThisConsumer { - public obj?: ConstructorPassesThisOut = null; - - public consumePartiallyInitializedThis(obj: ConstructorPassesThisOut) { - this.obj = obj; - } -} -const consumer = new MyConsumer(); -const object = new ConstructorPassesThisOut(consumer); - -// THEN -expect(consumer.obj).toBe(object); -``` - -##### Kernel Trace -``` -# < {"hello":"@jsii/runtime@..."} -# > {"api":"load","name":"...","version":"...","tarball":"..."} -# < {"ok":{"assembly":"...","types":2}} - -> {"api":"create","fqn":"test.PartiallyInitializedThisConsumer","args":[],"overrides":[{"method":"consumePartiallyInitializedThis"}],"interfaces":[]} -< {"ok":{"$jsii.byref":"test.PartiallyInitializedThisConsumer@10000"}} -> {"api":"create","fqn":"test.ConstructorPassesThisOut","args":[{"$jsii.byref":"test.PartiallyInitializedThisConsumer@10000","$jsii.interfaces":[]}],"overrides":[],"interfaces":[]} -< {"callback":{"cbid":"jsii::callback::20000","invoke":{"objref":{"$jsii.byref":"test.PartiallyInitializedThisConsumer@10000"},"method":"consumePartiallyInitializedThis","args":[{"$jsii.byref":"test.ConstructorPassesThisOut@10001"}]}}} -> {"complete":{"api":"complete","cbid":"jsii::callback::20000"}} -< {"ok":{"$jsii.byref":"test.ConstructorPassesThisOut@10001"}} -``` -
- -### Interfaces -Tests in this section ensure correct behavior of *behavioral interfaces*. - -#### Host app can implement an interface "from scratch" -It is possible for a "pure" host interface implementation to be passed across -the language boundary, it's methods and properties can be used by **JavaScript** -code within the Kernel process. - -> :construction: The .NET Runtime currently requires that pure interfaces -> implementations extend from `Amazon.JSII.Rutime.Deputy.DepytyBase`. - -> :construction: The Python Runtime currently expects a somewhat un-pythonic way -> to implement interfaces, which requires decorating the implementing class with -> `@jsii.implements("implemented-type.JsiiInterfaceFQN")`. - -
Show test - -##### Reference Implementation -```ts -// GIVEN -export interface IBehavioralInterface { - methodCall(): string; - readonly property: number; -} -export class InterfaceConsumer { - constructor(private readonly iface: IBehavioralInterface) { } - - public composeResult() { - return `${this.iface.methodCall()} / ${this.iface.property}`; - } -} - -// WHEN -class Implementation implements IBehavioralInterface { - public readonly property = 1337; - public methodCall() { return "Hello!"; } -} -const impl = new Implementation(); -const consumer = new InterfaceConsumer(impl); - -// THEN -expect(consumer.composeResult()).toBe("Hello! / 1337") -``` - -##### Kernel Trace -``` -# < {"hello":"@jsii/runtime@..."} -# > {"api":"load","name":"...","version":"...","tarball":"..."} -# < {"ok":{"assembly":"...","types":2}} - -> {"api":"create","fqn":"Object","args":[],"overrides":[{"method":"methodCall"},{"property":"property"}],"interfaces":["test.IBehavioralInterface"]} -< {"ok":{"$jsii.byref":"Object@10000","$jsii.interfaces":["test.IBehavioralInterface"]}} -> {"api":"create","fqn":"test.InterfaceConsumer","args":[{"$jsii.byref":"Object@10000","$jsii.interfaces":[]}],"overrides":[],"interfaces":[]} -< {"ok":{"$jsii.byref":"test.InterfaceConsumer@10001"}} -> {"api":"invoke","objref":{"$jsii.byref":"test.InterfaceConsumer@10001"},"method":"composeResult","args":[]} -< {"callback":{"cbid":"jsii::callback::20000","invoke":{"objref":{"$jsii.byref":"Object@10000","$jsii.interfaces":["test.IBehavioralInterface"]},"method":"methodCall","args":[]}}} -> {"complete":{"api":"complete","cbid":"jsii::callback::20000","result":"Hello!"}} -< {"callback":{"cbid":"jsii::callback::20001","get":{"objref":{"$jsii.byref":"Object@10000","$jsii.interfaces":["test.IBehavioralInterface"]},"property":"property"}}} -> {"complete":{"api":"complete","cbid":"jsii::callback::20001","result":1337.0}} -< {"ok":{"result":"Hello! / 1337"}} -``` -
- -### Structs & Keyword Arguments - -#### Ambiguous arguments are handled correctly -When a method accepts both a positional parameter named `foo` and a struct -parameter with a property named `foo`, the respective values are passed in the -correct parameter location when calling into the **JavaScript** code. - -
Show test - -##### Reference Implementation -```ts -// GIVEN -export interface StructType { - readonly foo: string; -} -export class ClassType { - public constructor( - public readonly foo: number, - public readonly opts: StructType, - ) {} -} - -// WHEN -var result = new ClassType('Bazinga!', { foo: 1337 }); - -// THEN -expect(typeof result.foo).toBe(1337); -expect(typeof result.opts.foo).toBe('Bazinga!'); -``` - -##### Kernel Trace -``` -# < {"hello":"@jsii/runtime@..."} -# > {"api":"load","name":"...","version":"...","tarball":"..."} -# < {"ok":{"assembly":"...","types":2}} - -> {"api":"create","fqn":"test.ClassType","args":[1337.0,{"$jsii.struct":{"fqn":"test.StructType","data":{"foo":"Bazinga!"}}}],"overrides":[],"interfaces":[]} -< {"ok":{"$jsii.byref":"test.ClassType@10000"}} -> {"api":"get","objref":{"$jsii.byref":"test.ClassType@10000"},"property":"foo"} -< {"ok":{"value":1337}} -> {"api":"get","objref":{"$jsii.byref":"test.ClassType@10000"},"property":"opts"} -< {"ok":{"value":{"$jsii.byref":"Object@10001","$jsii.interfaces":["test.StructType"]}}} -> {"api":"get","objref":{"$jsii.byref":"Object@10001"},"property":"foo"} -< {"ok":{"value":"Bazinga!"}} -``` -
- -### Collections -Tests in this section ensure correct behavior of collections (`List` and `Map`). - -#### Struct elements of `List` are deserialized to the correct apparent type -When the declared element type of a `List` is a *struct*, the resulting list -must contain elements of the correct static type. This is a requirement for -statically typed languages such as Java where type parameters are reified. - -
Show test - -##### Reference Implementation -```ts -// GIVEN -export interface StructType { - readonly property: string; -} -export class StructProvider { - public static provide(): StructType[] { - return [{ property: 'value' }]; - } -} - -// WHEN -const items = StructProvider.provide(); - -// THEN -expect(items.length).toBeGreaterThan(0); -for (const item of items) { - expect(item instanceof StructType).toBeTruthy(); -} -``` - -##### Kernel Trace -``` -# < {"hello":"@jsii/runtime@..."} -# > {"api":"load","name":"...","version":"...","tarball":"..."} -# < {"ok":{"assembly":"...","types":2}} - -> {"api":"sinvoke","fqn":"test.StructProvider","method":"provide","args":[]} -< {"ok":{"result":[{"$jsii.byref":"Object@10000","$jsii.interfaces":["test.StructType"]}]}} -``` -
- -#### Struct elements of `Map` are deserialized to the correct apparent type -When the declared element type of a `Map` is a *struct*, the resulting list -must contain elements of the correct static type. This is a requirement for -statically typed languages such as Java where type parameters are reified. - -
Show test - -##### Reference Implementation -```ts -// GIVEN -export interface StructType { - readonly property: string; -} -export class StructProvider { - public static provide(): { [key: string]: StructType } { - return { foo: { property: 'value' } }; - } -} - -// WHEN -const items = StructProvider.provide(); - -// THEN -expect(items.length).toBeGreaterThan(0); -for (const item of Object.values(items)) { - expect(item instanceof StructType).toBeTruthy(); -} -``` - -##### Kernel Trace -``` -# < {"hello":"@jsii/runtime@..."} -# > {"api":"load","name":"...","version":"...","tarball":"..."} -# < {"ok":{"assembly":"...","types":2}} - -> {"api":"sinvoke","fqn":"test.StructProvider","method":"provide","args":[]} -< {"ok":{"result":{"$jsii.map":{"foo":{"$jsii.byref":"Object@10000","$jsii.interfaces":["test.StructType"]}}}}} -``` -
- --------------------------------------------------------------------------------- - -Continue to [New Language Intake](./5-new-language-intake.md) diff --git a/docs/specifications/5-new-language-intake.md b/docs/specifications/5-new-language-intake.md deleted file mode 100644 index b8357b21d3..0000000000 --- a/docs/specifications/5-new-language-intake.md +++ /dev/null @@ -1,138 +0,0 @@ -# New Language Intake -This document outlines the process to be followed when introducing a new *jsii* -target language, including an estimated timeline (the exact timeline may vary -significantly depending on the specifics of the language being added). - -The estimated total duration for the process is 4 to 6 months. - -## Planning - -**:alarm_clock: Estimated Duration:** 2 weeks - -The first step is to study the *jsii* specification, as well as existing -language implementations, in order to have the knowledge necessary to write a -new language support proposal [RFC]. The [RFC] document produced will evolve and -be polished as development of the new language support progresses, but the -following elements must be present before any implementation begins: - -* Identification of the language's standard package repository -* Proposal for the binding's configuration block -* Sample API representations in the proposed language - + In particular, any element from the *jsii* type model that does not - naturally map into the proposed new language needs to be represented - + Where several options exist, links to prior art are instrumental to validate - the direction chosen -* Toolchain and platform requirements - -[RFC]: https://github.com/awslabs/aws-cdk-rfcs#readme - -## Code Generation (`jsii-pacmak`) - -**:alarm_clock: Estimated Duration:** 4 to 6 weeks - -The necessary code must be added to [`jsii-pacmak`] in order to map the *jsii* -assembly's declared types into the proposed language. While this code ought to -leverage the new language's *host* runtime library, we begin with writing the -code generator in order to ensure the appropriate developer experience is -achieved in the new language before writing the back-end components. - -Code generators are authored in **TypeScript**. - -The necessary reserved words need to be registered in the `jsii` compiler, so -that warnings are produced when identifiers are used in **TypeScript** code that -require slugification or escaping in the target language (and will hence cause a -degraded developer experience). - -[`jsii-pacmak`]: ../../packages/jsii-pacmak - -## Runtime Library - -**:alarm_clock: Estimated Duration:** 4 to 6 weeks - -Now that the appropriate developer experience has been identified, the *host* -runtime library supporting the generated code can be written. This component -must be written in the new language. - -> :construction: A reference architecture for *host* runtime libraries is to be -> developed, in order to ensure consistent naming and behavior across all the -> runtimes, reducing the cost of maintaining many of those. - -## Building & Packaging - -**:alarm_clock: Estimated Duration:** 2 weeks - -Once code is generated and it has a *host* runtime library to rely on, -[`jsii-pacmak`] needs to receive the additional logic required to compile and -package the generated libraries as required, producing ready-to-publish -artifacts. - -The necessary toolchain needs to be added to the [`jsii/superchain`] *Docker* -image, so that `jsii` customers can rely on this to build artifacts for any of -the supported languages. - -In addition to this, standardized *Amazon CodePipeline* actions need to be -developed in order to support publishing to the relevant idiomatic package -managers. - -[`jsii/superchain`]: ../../superchain - -## Compliance Tests - -**:alarm_clock: Estimated Duration:** 6 weeks - -The full standard compliance suite must be implemented for the new language. -Leveraging the new code generator, *host* runtime library and compilation logic, -the tests demonstrate that the new library behaves consistently with all other -language bindings. - -While it is possible to declare *developer preview* on a new language before all -the tests pass, full compliance is a pre-requisite to declaring *general -availability* of the new language. - -## Documentation - -**:alarm_clock: Estimated Duration:** 1 week - -The necessary documentation needs to be provided to support customers who want -to onboard the new language. This also includes updating [`jsii-config`] with -support for the new languages' configuration block. - -[`jsii-config`]: ../../packages/jsii-config - -## Developer Preview - -**:alarm_clock: Recommended Duration:** 4 to 8 weeks - -It is possible to declare *Developer Preview* for a new language support as soon -as the code generation and *host* runtime library are mature enough to be useful, -and cover the majority of use-cases. While certain edge-cases may still be -uncovered at the beginning of *Developer Preview*, a clear plan should exist -that ensures a path exists to address any known gaps. It is required to have -implemented most of the standard compliance suite prior to declaring *Developer -Preview*. - -During the *Developer Preview* phase, user experience studies should be -conducted to validate assumptions made during the code generator's design. If -any significant change is dictated by the results of the user experience studies, -fluback studies should be performed in order to confirm that the desired impact -has been achieved. - -> :construction: A standard set of user experience study tasks will be -> developed, ensuring the learnings from previous experiences is factored into -> subsequent studies conducted. - -Finally, it is essential to give time to the community to use and vet the new -language support prior to considering *General Availability*. A minimum of a -full month without a major bug reported is advised. During this period, -intentional hands-on usage of the product msut be performed by engineers -familiar with the new language as well as engineers unfamilar with it. This -ensures the new experience is considered holistically, in a manner unbiased by -knowledge of the implementation. - -## General Availability - -Once the new language support has been *Developer Preview* for long enough and -the engineers involved have gained confidence that the API is stable, covers all -known use-cases reliably, and behaves consistently with other *Generally -Available* languages, the new support can be considered for *General -Availability*. diff --git a/docs/typescript-restrictions.md b/docs/typescript-restrictions.md deleted file mode 100644 index d629bf509f..0000000000 --- a/docs/typescript-restrictions.md +++ /dev/null @@ -1,223 +0,0 @@ -# Restrictions over vanilla **TypeScript** - -`jsii` can only accept APIs that can be represented in all the supported target -languages, and **TypeScript** is a feature-rich, modern programming language. As a -consequence, `jsii` needs to impose restrictions on what **TypeScript** language -features can be used. Certain common **Javascript** idioms are also interpreted -specially by `jsii` in order to support providing a more consistent developer -experience across various languages. - -As `jsii` only needs to represent those types that are part of the *exported* -APIs of the package, the restrictions outlined in this document do not apply to -*private* (or *internal*) types and functions. - -## Reserved Words - -### Target language considerations - -`jsii` will emit warnings if reserved words are used as identifiers for any API -element (which will cause a compilation failure if `--fail-on-warnings` is set). -The list of reserved words (which are not also reserved in **TypeScript**), -derived from [`jsii/lib/reserved-words.ts`] is: - -**C#** | **Java** | **Python** ----------------|----------------|--------------- -`abstract` | `abstract` | `False` -`base` | `assert` | `None` -`bool` | `boolean` | `True` -`byte` | `byte` | `and` -`char` | `char` | `assert` -`checked` | `double` | `def` -`decimal` | `final` | `del` -`delegate` | `float` | `elif` -`double` | `goto` | `except` -`event` | `int` | `from` -`explicit` | `long` | `global` -`extern` | `native` | `is` -`fixed` | `short` | `lambda` -`float` | `strictfp` | `nonlocal` -`foreach` | `synchronized` | `not` -`goto` | `throws` | `or` -`implicit` | `transient` | `pass` -`int` | `volatile` | `raise` -`internal` | | -`is` | | -`lock` | | -`long` | | -`namespace` | | -`object` | | -`operator` | | -`out` | | -`override` | | -`params` | | -`readonly` | | -`ref` | | -`sbyte` | | -`sealed` | | -`short` | | -`sizeof` | | -`stackalloc` | | -`string` | | -`struct` | | -`uint` | | -`ulong` | | -`unchecked` | | -`unsafe` | | -`ushort` | | -`using` | | -`virtual` | | -`volatile` | | - -Code generators from `jsii-pacmak` will try to work around those reserved words -when they are encountered, but may resort to using names that could clash with -other identifiers used in your API, or result in suboptimal experience for -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* -and *Behavioral Interfaces*. Both of those entities are represeted using -**TypeScript** interfaces, but have distinct sets of requirements. - -### Behavioral Interfaces - -Behavioral interfaces are the specification of a contract that a type can elect -to adhere to. They can define a number of `public` members which can be -properties or methods. `jsii` requires that behavioral interfaces have names -prefixed with an uppercase `I`. - -```ts -// โ›”๏ธ Illegal name -export interface Foo { /* ... */ } -// โœ… Legal -export interface IFoo { /* ... */ } - -// โ›”๏ธ Illegal name -export interface InstanceProvider { /* ... */ } -// โœ… Legal -export interface IInstanceProvider { /* ... */ } - -// โ›”๏ธ Illegal extension of a struct -export interface IBar extends SomeStruct { /* ... */ } -``` - -Interfaces can be implemented by classes or extended by other interfaces, but -may not extend (or be extended by) structs. - -### Structs - -Structs, on the other hand, are pure data constructs. They may not declare -methods, only `readonly` properties. Those types model what **Javascript** -developers use to model keyword arguments, where they typically pass an object -literal with configuration values to a method or constructor. Structs do not -have names starting with an uppercase `I` (making it possible to define a -behavioral interface that only declares read-only properties as part of its -contract). - -```ts -// โ›”๏ธ Illegal -export interface Foo { - foo(): void; // Structs cannot define methods -} - -// โ›”๏ธ Illegal -export interface Bar { - foo: number; // Struct members must be readonly -} -// โœ… Legal -export interface Baz { - readonly foo: number; -} - -// โ›”๏ธ Illegal extension of a behavioral interface -export interface SomeStruct extends IBehavioralInterface { /* ... */ } -// โœ… Legal -export interface SomeStruct extends OtherStruct { /* ... */ } - -// โ›”๏ธ Illegal implementation of a struct -export class BazImpl implements Baz { /* ... */ } -``` - -Structs can be extended by other structs, but may not extend (or be extended by) -behavioral interfaces, nor can they be implemented by classes. - -## Parameterized Types (a.k.a. "Generics") - -Due to the lack of a *generics* concept in certain candidate programming -languages (such as **go**), **TypeScript** parameterized types are not -supported by `jsii`, with the exception of standard promises (`Promise`) as -well as arrays (`Array`, which is equivalent to `T[]`). - -```ts -// โ›”๏ธ Illegal -export interface Provider { - get(): ValueType; -} - -// โœ… Legal -export interface AsyncFooMaker { - makeFoo(): Promise; - makeFoos(count: number): Array>; -} -``` diff --git a/eslint-config.yaml b/eslint-config.yaml index 4a95cdd3aa..1de84da372 100644 --- a/eslint-config.yaml +++ b/eslint-config.yaml @@ -33,6 +33,9 @@ settings: typescript: directory: ./**/tsconfig.json +ignorePatterns: + # Ignore Jest configuration file (it's excluded from tsconfig.json, so it's problematic!) + - jest.config.ts rules: # Custom Configurations @@ -78,6 +81,9 @@ rules: '@typescript-eslint/no-for-in-array': - error + '@typescript-eslint/no-misused-promises': + - error + '@typescript-eslint/no-require-imports': - error @@ -107,6 +113,10 @@ rules: '@typescript-eslint/prefer-for-of': - error + '@typescript-eslint/prefer-nullish-coalescing': + - error + - ignoreMixedLogicalExpressions: true + '@typescript-eslint/prefer-readonly': - error @@ -124,6 +134,13 @@ rules: '@typescript-eslint/require-await': - error + '@typescript-eslint/return-await': + - error + - 'in-try-catch' + + '@typescript-eslint/switch-exhaustiveness-check': + - error + 'complexity': - off @@ -138,6 +155,9 @@ rules: - always - null: ignore + 'import/no-duplicates': + - error + 'import/no-extraneous-dependencies': - error - devDependencies: ['**/test/**'] # Only allow importing devDependencies from tests @@ -146,6 +166,18 @@ rules: 'import/no-unresolved': - error + - ignore: [worker_threads] + + 'import/order': + - error + - alphabetize: + order: asc + caseInsensitive: true + groups: + - [builtin, external] + - [parent, sibling] + - [index, unknown] + newlines-between: always 'no-alert': - error diff --git a/gh-pages/.gitignore b/gh-pages/.gitignore new file mode 100644 index 0000000000..21d0b898ff --- /dev/null +++ b/gh-pages/.gitignore @@ -0,0 +1 @@ +.venv/ diff --git a/gh-pages/content/.pages.yml b/gh-pages/content/.pages.yml new file mode 100644 index 0000000000..254d27321f --- /dev/null +++ b/gh-pages/content/.pages.yml @@ -0,0 +1,6 @@ +--- +nav: + - ... + - user-guides + - specification + - decisions diff --git a/gh-pages/content/assets/images/favicon.png b/gh-pages/content/assets/images/favicon.png new file mode 100644 index 0000000000..25353cd6f3 Binary files /dev/null and b/gh-pages/content/assets/images/favicon.png differ diff --git a/gh-pages/content/assets/images/logo.png b/gh-pages/content/assets/images/logo.png new file mode 100644 index 0000000000..be9c9e39d9 Binary files /dev/null and b/gh-pages/content/assets/images/logo.png differ diff --git a/gh-pages/content/assets/stylesheets/amazon-ember-display.css b/gh-pages/content/assets/stylesheets/amazon-ember-display.css new file mode 100644 index 0000000000..5cf596d04b --- /dev/null +++ b/gh-pages/content/assets/stylesheets/amazon-ember-display.css @@ -0,0 +1,36 @@ +@font-face { + font-family: 'AmazonEmberDisplay'; + src: url('../typefaces/AmazonEmberDisplay_Lt.woff2') format('woff2'), + url('../typefaces/AmazonEmberDisplay_Lt.woff') format('woff'), + url('../typefaces/AmazonEmberDisplay_Lt.eot') format('embedded-opentype'), + url('../typefaces/AmazonEmberDisplay_Lt.ttf') format('truetype'); + font-weight: 300; + font-style: normal; +} +@font-face { + font-family: 'AmazonEmberDisplay'; + src: url('../typefaces/AmazonEmberDisplay_Rg.woff2') format('woff2'), + url('../typefaces/AmazonEmberDisplay_Rg.woff') format('woff'), + url('../typefaces/AmazonEmberDisplay_Rg.eot') format('embedded-opentype'), + url('../typefaces/AmazonEmberDisplay_Rg.ttf') format('truetype'); + font-weight: 400; + font-style: normal; +} +@font-face { + font-family: 'AmazonEmberDisplay'; + src: url('../typefaces/AmazonEmberDisplay_Md.woff2') format('woff2'), + url('../typefaces/AmazonEmberDisplay_Md.woff') format('woff'), + url('../typefaces/AmazonEmberDisplay_Md.eot') format('embedded-opentype'), + url('../typefaces/AmazonEmberDisplay_Md.ttf') format('truetype'); + font-weight: 500; + font-style: normal; +} +@font-face { + font-family: 'AmazonEmberDisplay'; + src: url('../typefaces/AmazonEmberDisplay_Bd.woff2') format('woff2'), + url('../typefaces/AmazonEmberDisplay_Bd.woff') format('woff'), + url('../typefaces/AmazonEmberDisplay_Bd.eot') format('embedded-opentype'), + url('../typefaces/AmazonEmberDisplay_Bd.ttf') format('truetype'); + font-weight: 700; + font-style: normal; +} diff --git a/gh-pages/content/assets/stylesheets/extra.css b/gh-pages/content/assets/stylesheets/extra.css new file mode 100644 index 0000000000..d921a3e0cb --- /dev/null +++ b/gh-pages/content/assets/stylesheets/extra.css @@ -0,0 +1,96 @@ +:root { + --amazon-orange: #ff9900; + --amazon-squid-ink: #232f3e; + + --md-primary-bg-color: white; + --md-primary-fg-color: var(--amazon-squid-ink); + --md-accent-fg-color: var(--amazon-orange); + + --md-default-fg-color--light: #606060; + --md-default-fg-color--lighter: #909090; + --md-default-fg-color--lightest: #c0c0c0; +} + +:root .highlight > * { + /* Code color shades */ + --md-code-fg-color: #c9d1d9; + --md-code-bg-color: #0d1117; + + /* Code highlighting color shades */ + --md-code-hl-color: rgba(187, 128, 9, 0.25); + --md-code-hl-number-color: #56d364; + --md-code-hl-special-color: #388bfd; + --md-code-hl-function-color: #d2a8ff; + --md-code-hl-constant-color: #79c0ff; + --md-code-hl-keyword-color: #ff7b72; + --md-code-hl-string-color: #a5d6ff; + --md-code-hl-name-color: #d2a8ff; + --md-code-hl-operator-color: #79c0ff; + --md-code-hl-punctuation-color: #c9d1d9; + --md-code-hl-comment-color: #8b949e; + --md-code-hl-generic-color: #c9d1d9; + --md-code-hl-variable-color: #ffa657; + + /* Typeset color shades */ + --md-typeset-color: var(--md-primary-fg-color); + --md-typeset-a-color: var(--md-accent-fg-color); + + /* Typeset `mark` color shades */ + --md-typeset-mark-color: #f00; + + /* Typeset `del` and `ins` color shades */ + --md-typeset-del-color: rgba(218, 54, 51, 0.15); + --md-typeset-ins-color: rgba(35, 134, 54, 0.15); + + /* Footer color shades */ + --md-footer-fg-color: white; + --md-footer-fg-color--light: var(--md-default-fg-color--lighter); + --md-footer-fg-color--lighter: var(--md-default-fg-color--lightest); + --md-footer-bg-color: var(--amazon-squid-ink); + --md-footer-bg-color--dark: var(--amazon-squid-ink); +} + +body { + font-family: 'AmazonEmberDisplay', 'Helvetica Neue', Roboto, Arial, sans-serif; +} + +code, +pre, +kbd { + font-family: Monaco, Menlo, Consolas, 'Courier Prime', Courier, 'Courier New', + monospace; +} + +.md-logo img { + width: auto !important; +} + +.md-tabs__link--active, +.md-nav__item .md-nav__link--active { + color: var(--md-accent-fg-color); + font-weight: bolder; +} + +/* Custom look for highlighted lines */ +.highlight .hll { + box-shadow: inset 4px 0 0 var(--amazon-orange); + border-collapse: collapse; +} + +/* Custom look for console session rendering */ +.highlight .gp { + color: var(--md-code-hl-special-color); +} +.highlight .go { + color: var(--md-code-hl-comment-color); +} + +/* Custom look for arbitrary names */ +.highlight .nx { + color: var(--md-code-hl-name-color); +} + +/* Custom look for links */ +.md-typeset a { + color: #5b79a0; +} diff --git a/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Bd.eot b/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Bd.eot new file mode 100755 index 0000000000..94f8dc019b Binary files /dev/null and b/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Bd.eot differ diff --git a/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Bd.ttf b/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Bd.ttf new file mode 100755 index 0000000000..ffc978a642 Binary files /dev/null and b/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Bd.ttf differ diff --git a/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Bd.woff b/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Bd.woff new file mode 100755 index 0000000000..5b0146ebc5 Binary files /dev/null and b/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Bd.woff differ diff --git a/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Bd.woff2 b/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Bd.woff2 new file mode 100755 index 0000000000..7031e15152 Binary files /dev/null and b/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Bd.woff2 differ diff --git a/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Lt.eot b/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Lt.eot new file mode 100755 index 0000000000..06f73d8017 Binary files /dev/null and b/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Lt.eot differ diff --git a/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Lt.ttf b/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Lt.ttf new file mode 100755 index 0000000000..c52e7151f8 Binary files /dev/null and b/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Lt.ttf differ diff --git a/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Lt.woff b/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Lt.woff new file mode 100755 index 0000000000..6cd516bfc0 Binary files /dev/null and b/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Lt.woff differ diff --git a/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Lt.woff2 b/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Lt.woff2 new file mode 100755 index 0000000000..73c5cc3d78 Binary files /dev/null and b/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Lt.woff2 differ diff --git a/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Md.eot b/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Md.eot new file mode 100755 index 0000000000..a340601238 Binary files /dev/null and b/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Md.eot differ diff --git a/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Md.ttf b/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Md.ttf new file mode 100644 index 0000000000..c54166f847 Binary files /dev/null and b/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Md.ttf differ diff --git a/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Md.woff b/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Md.woff new file mode 100755 index 0000000000..0851c05370 Binary files /dev/null and b/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Md.woff differ diff --git a/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Md.woff2 b/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Md.woff2 new file mode 100755 index 0000000000..28a10bec94 Binary files /dev/null and b/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Md.woff2 differ diff --git a/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Rg.eot b/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Rg.eot new file mode 100755 index 0000000000..7bb09cc491 Binary files /dev/null and b/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Rg.eot differ diff --git a/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Rg.ttf b/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Rg.ttf new file mode 100755 index 0000000000..7a70e55c01 Binary files /dev/null and b/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Rg.ttf differ diff --git a/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Rg.woff b/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Rg.woff new file mode 100755 index 0000000000..3a804d6632 Binary files /dev/null and b/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Rg.woff differ diff --git a/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Rg.woff2 b/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Rg.woff2 new file mode 100755 index 0000000000..15003bbcb4 Binary files /dev/null and b/gh-pages/content/assets/typefaces/AmazonEmberDisplay_Rg.woff2 differ diff --git a/gh-pages/content/decisions/.pages.yml b/gh-pages/content/decisions/.pages.yml new file mode 100644 index 0000000000..ac6acd1185 --- /dev/null +++ b/gh-pages/content/decisions/.pages.yml @@ -0,0 +1,6 @@ +--- +title: Architecture Decisions +order: desc +nav: + - introduction.md + - ... | regex=\d{4}-\d{2}-\d{2}-.+.md diff --git a/gh-pages/content/decisions/_README.md b/gh-pages/content/decisions/_README.md new file mode 100644 index 0000000000..e80818cdf6 --- /dev/null +++ b/gh-pages/content/decisions/_README.md @@ -0,0 +1,17 @@ +# Format + +So you want to add a new Architecture Decision Record to this section. This +document highlights how to proceed in order to achieve a consistent look and +feel, and that we capture sufficient information. + +## Create a new document + +Each ADR document should be named using the following format: +`YYYY-MM-DD-short-name.md`. This allows ensuring the documents are rendered in +the correct order on the website. If is recommended to prefix the file name +with the date at which the decision has been made, in ISO-8601 format. + +## Template + +The following template is to be used: +https://github.com/joelparkerhenderson/architecture_decision_record/blob/master/adr_template_madr.md diff --git a/gh-pages/content/decisions/introduction.md b/gh-pages/content/decisions/introduction.md new file mode 100644 index 0000000000..7ee31e9fb7 --- /dev/null +++ b/gh-pages/content/decisions/introduction.md @@ -0,0 +1,5 @@ +# Introduction + +This section of the *jsii reference* is a log of all *Architectural Decisions* +taken during the development of the *jsii* project. The *Records* are presented +in reverse-chronological order (most recent decisions are listed first). diff --git a/gh-pages/content/index.md b/gh-pages/content/index.md new file mode 100644 index 0000000000..065dd6abc7 --- /dev/null +++ b/gh-pages/content/index.md @@ -0,0 +1,110 @@ +# Introduction + +`jsii` allows code in any language to naturally interact with **JavaScript** classes. It is the technology that enables +the [AWS Cloud Development Kit][cdk] to deliver polyglot libraries from a single codebase! + +[cdk]: https://github.com/aws/aws-cdk + +A class library written in **TypeScript** can be used in projects authored in **TypeScript** or **Javascript** (as +usual), but also in **C#** (and other languages from the _.NET_ family), **Go**, **Java**, **Python**, ... More +languages will be added in the future! + +!!! warning + Due to *JSON* marshaling costs and the absence of a distributed garbage collector feature, `jsii` modules are best + suited for development and build tools, as opposed to performance-sensitive or resource-constrained applications. + + See [Runtime Architecture] for more information. + + [runtime architecture]: overview/runtime-architecture.md + +## An example is worth a thousand words + +Consider the following **TypeScript** class: + +```ts +/** + * A simple greeter, hello world style. + */ +export class Greeter { + /** + * Greets the designated person. + * + * @param name the person to greet. + * + * @returns a greeting. + */ + public greet(name: string) { + return `Hello, ${name}!`; + } +} +``` + +By compiling our source module using `jsii`, we can now package it as modules in one of the supported target languages. +Each target module has the exact same API as the source. This allows users of that target language to use `Greeter` like +any other native type: + +=== "C#" + + ```csharp + var greeter = new Greeter(); + greeter.Greet("World"); // => Hello, World! + ``` + +=== "Go" + + ```go + greeter := NewGreeter() + greeter.Greet("World") // => Hello, World! + ``` + +=== "Java" + + ```java + final Greeter greeter = new Greeter(); + greeter.greet("World"); // => Hello, World! + ``` + +=== "JavaScript" + + ```java + const greeter = new Greeter(); + greeter.greet("World"); // => Hello, World! + ``` + +=== "Python" + + ```python + greeter = Greeter() + greeter.greet("World") # => Hello, World! + ``` + +## How to use this website + +The documentation in this website is separated in different topics, which can be navigated using links in the site's +header bar: + +- The [Welcome](./index.md) section provides a high level overview of *jsii. +- The [User Guides](./user-guides) section includes the following: + + - The [Library Author Guide](user-guides/lib-author) is intended for developers who are looking to author libraries + using *jsii* to enable polyglot support for their work. + - The [Library Consumer Guide](user-guides/lib-user) is intended for developers who are consuming libraries + generated by *jsii* in the various supported target languages. + - The [Language Implementation](user-guides/language-support) is intended for developers who are looking to add + support for a new *target language* in *jsii*. + +- The [Specification](specification) provides detailed information on the internal components of *jsii*. +- The [Architecture Decision Records](adrs) contains the log of all architectural decisions made while developing the + *jsii* project. + +## How to contribute + +The [*jsii project*](https://github.com/aws/jsii) welcomes all kind of contributions. You can refer to the +[Contribution Guide](https://github.com/aws/jsii/trees/main/CONTRIBUTING.md) on GitHub to get more information about how +to contribute to the project in general. + +!!! tip + You can submit pull requests for documentation updates without leaving the comfort of your web browser! + + All pages of this website have a :material-pencil: icon on the top right of each page that links to a GitHub web + editor for the source of the page in question. diff --git a/gh-pages/content/overview/features.md b/gh-pages/content/overview/features.md new file mode 100644 index 0000000000..505444f80c --- /dev/null +++ b/gh-pages/content/overview/features.md @@ -0,0 +1,49 @@ +# Features + +## TypeScript Support + +The `jsii` compiler leverages the original [TypeScript] compiler API to compile **TypeScript** source files and produce +**JavaScript** output and _TypeScript declaration files_, while also extracting the compiled module's API signatures in +a _jsii assembly file_. + +To determine the version of **TypeScript** that is in use by the installed release of `jsii`, simply look at the +`jsii --version` output: + +```console +# jsii --version +1.15.0 (build 585166b), typescript 3.9.7 +``` + +You can then refer to the [TypeScript] documentation to determine which language features are available in that specific +[TypeScript] release. + +!!! warning + The `jsii` compiler imposes some restrictions on what **TypeScript** features can be used to declare the APIs + exported by a *jsii module*, in order to ensure those APIs can be consistently represented in other languages. For + more information, refer to the [TypeScript Restrictions page][restrictions]. + + [restrictions]: ../user-guides/lib-author/typescript-restrictions.md + +[typescript]: https://www.typescriptlang.org + +## Target Languages + +The following target languages are currently offered by `jsii-pacmak`, or are currently being developed: + +| Language | Status | +| ---------- | ---------------------------------------------- | +| C# | :octicons-check-circle-24: Generally Available | +| Go | :octicons-tools-24: Development | +| Java | :octicons-check-circle-24: Generally Available | +| JavaScript | :octicons-check-circle-24: Generally Available | +| Kotlin | :octicons-tools-24: Development | +| Python | :octicons-check-circle-24: Generally Available | +| TypeScript | :octicons-check-circle-24: Generally Available | + +??? question "Status Definitions" + - **:octicons-check-circle-24: Generally Available** languages are fully supported. The generated APIs will not + change in breaking ways across minor and patch releases. + - **:octicons-beaker-24: Developer Preview** languages are experimental. The generated APIs may change in breaking + ways across minor releases. + - **:octicons-tools-24: Development** languages are not yet ready for consumption. They are actively developed and + may still lack certain essential features. diff --git a/gh-pages/content/overview/runtime-architecture.md b/gh-pages/content/overview/runtime-architecture.md new file mode 100644 index 0000000000..5f7ed76823 --- /dev/null +++ b/gh-pages/content/overview/runtime-architecture.md @@ -0,0 +1,158 @@ +# Runtime Architecture +## Generated Libraries + +When using `jsii-pacmak` to generate libraries in different programming +languages, the **Javascript** code is bundled within the generated library, so +that it can be used at runtime. This is the reason why a `node` runtime +needs to be available in order to execute code that depends on *jsii* libraries. + +The generated libraries have a dependency on a *Runtime client* library for the +language, which contains the necessary logic to start a child `node` process +with the `jsii-runtime`. The `jsii-runtime` manages JSON-based inter-process +communication over its `STDIN`, `STDOUT` and `STDERR`, and manages a +`@jsii/kernel` instance that acts as a container for the **Javascript** code +that backs the *jsii* libraries. + +## Architecture Overview + +A representation of the execution environment of an application using *jsii* +libraries from a different language follows: + +``` +โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ” +โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ +โ”‚ Host Application โ”‚ โ”‚@jsii/kernelโ”‚LibAโ”‚LibBโ”‚... โ”‚ +โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ +โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ค +โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ +โ”‚ โ”‚Generated Bindingsโ”‚ โ”‚ @jsii/runtime โ”‚ +โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ +โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค Requests โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค +โ”‚ โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ถSTDIN โ”‚ โ”‚ +โ”‚ โ”‚Host jsii Runtime โ”‚ Responses โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ +โ”‚ โ”‚ Library โ—€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”คSTDOUTโ”‚ โ”‚ +โ”‚ โ”‚ โ”‚ Console โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”ค node โ”‚ +โ”‚ โ”‚ โ—€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”คSTDERRโ”‚ โ”‚ +โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ +โ”‚ Host Runtime โ”‚ โ”‚ (Child Process) โ”‚ +โ”‚ (JVM, .NET Core, ...) โ”‚ โ”‚ โ”‚ +โ”‚ โ”‚ โ”‚ โ”‚ +โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค +โ”‚ โ”‚ +โ”‚ Operating System โ”‚ +โ”‚ โ”‚ +โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ +``` + +## Communication Protocol + +As shown in the [architecture overview](#architecture-overview) diagram, the +`@jsii/runtime` process receives requests via its `STDIN` stream, sends +responses via its `STDOUT` stream, and sends console output through the `STDERR` +stream. + +All those messages are sent in JSON-encoded objects. On `STDIN` and `STDOUT`, +the request-response protocol is defined by the [kernel api specification]. On +`STDERR` messages are encoded in the following way: + +- `#!json { "stderr": "" }` when the console data is to be + written on the *Host Application*'s `STDERR` stream. +- `#!json { "stdout": "" }` when the console data is to be + written on the *Host Application*'s `STDOUT` stream. +- Any data that is not valid JSON, or that does not match either of the formats + described avove must be written as-is on the *Host Application*'s `STDERR` + stream. + +[kernel api specification]: ../specification/3-kernel-api.md + +In order to allow the hosted original **JavaScript** libraries to naturally +interact with `process.stdout`, `process.stderr` and all other APIs that make +use of those streams (such as `console.log` and `console.error`), the +`@jsii/runtime` process does in fact spawn a second `node` process to allow +intercepting the console data to properly encode it. Below is a diagram +describing the process arrangement that achieves this: + +``` + โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ” + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ + โ”‚@jsii/kernelโ”‚LibAโ”‚LibBโ”‚... โ”‚ + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ +โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ค +โ”‚ โ”‚ โ”‚ โ”‚ +โ”‚ @jsii/runtime Wrapper โ”‚ โ”‚ @jsii/runtime Core โ”‚ +โ”‚ โ”‚ โ”‚ โ”‚ +โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค +โ”‚STDIN โ”‚ โ”‚ Xโ”€โ”€โ”€โ”€โ”€โ”€โ–ถSTDIN โ”‚ โ”‚ +โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ Console โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ +โ”‚STDOUTโ”‚ โ—€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”คSTDOUTโ”‚ โ”‚ +โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ Console โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”ค node โ”‚ +โ”‚STDERRโ”‚ node โ—€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”คSTDERRโ”‚ โ”‚ +โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ JSON โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”ค (Child Process) โ”‚ +โ”‚ โ—€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ถ FD#3 โ”‚ โ”‚ +โ”‚ โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ +โ”‚ โ”‚ โ”‚ โ”‚ +โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค +โ”‚ โ”‚ +โ”‚ Operating System โ”‚ +โ”‚ โ”‚ +โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ +``` + +!!! bug "Missing Feature" + As shown on the diagram above, there is nothing connected to the *Core* + process' `FD#0` (`STDIN`). This feature will be added in the future, but + currently this means *jsii* libraries have no way of accepting input though + `STDIN`. + +The *Wrapper* process manages the *Core* process such that: + +!!! info + It would be possible to use a single `node` process (the *`@jsii/runtime` + Core* process) for any platform that supposed spawning child processes with + additional open file descriptors. This is for example not possible in + **Java** and **C#**, which is why this dual-process contraption was devised. + + In such cases, the *Host Application* would spawn the *Core* process and + directly operate on the file descriptors as described below. + +- Any requests received from the *Host Application* through the *Wrapper*'s + `STDIN` stream is forwarded to the *Core* process' `FD#3`. +- Any response written to the *Core*'s `FD#3` stream is forwarded to the *Host + Application* though the *Wrapper*'s `STDOUT`. +- Any data sent to the *Core*'s `STDERR` is base64-encoded and wrapped in a JSON + object with the `"stderr"` key, then forwarded to the *Host + Application* through the *Wrapper*'s `STDERR` +- Any data sent to the *Core*'s `STDOUT` is base64-encoded and wrapped in a JSON + object with the `"stdout"` key, then forwarded to the *Host + Application* through the *Wrapper*'s `STDERR` + +!!! danger + As with any file descriptor besides `FD#0` (`STDIN`), `FD#1` (`STDOUT`) and + `FD#2` (`STDERR`) that was not opened by the application, **JavaScript** + libraries loaded in the `@jsii/kernel` instance are not allowed to interact + directly with file descriptor `FD#3`. + +## Initialization Process + +The initialization workflow can be described as: + +1. The *host* (**Java**, **.NET**, ...) application starts on its own runtime + (JVM, .NET Runtime, ...) +2. When the *host* code encounters a *jsii* entity for the first time (creating + an instance of a *jsii* type, loading a static constant, ...), the *runtime + client library* creates a child `node` process, and loads the `jsii-runtime` + library (specified by the `JSII_RUNTIME` environment variable, or the + version that is bundled in the *runtime client library*) +3. The *runtime client library* interacts with the child `node` process by + exchanging JSON-encoded messages through the `node` process' *STDIN* and + `STDOUT`. It maintains a thread (or equivalent) that decodes messages from + the child's `STDERR` stream, and forwards the decoded data to it's host + process' `STDERR` and `STDOUT` as needed. +4. The *runtime client library* automatically loads the **Javascript** modules + bundled within the *generated bindings* (and their depedencies, bundled in + other *generated bindings*) into the `node` process when needed. +5. Calls into the *Generated bindings* are encoded into JSON requests and sent + to the child `node` process, which will execute the corresponding + **Javascript** code, then responds back. +6. Upon exiting, the *host* process closes the communication channels with the + child `node` process, causing it to exit. diff --git a/gh-pages/content/overview/runtime-architecture.monopic b/gh-pages/content/overview/runtime-architecture.monopic new file mode 100644 index 0000000000..bd7538173c Binary files /dev/null and b/gh-pages/content/overview/runtime-architecture.monopic differ diff --git a/gh-pages/content/overview/toolchain.md b/gh-pages/content/overview/toolchain.md new file mode 100644 index 0000000000..1fc3e11611 --- /dev/null +++ b/gh-pages/content/overview/toolchain.md @@ -0,0 +1,38 @@ +# Toolchain + +**jsii** consists of multiple single-purposed programs which can be used to compose various workflows. + +!!! info + We are considering creating an "umbrella entrypoint" to make it easier to consume. + +| Name | Stability | Description | +| -------------- | ------------ | --------------------------------------------------------------------- | +| [jsii] | Stable | Compiles TypeScript to jsii module | +| [jsii-pacmak] | Stable | Creates ready-to-publish language-specific packages from jsii modules | +| [jsii-reflect] | Stable | Strong-typed reflection library for jsii type systems | +| [jsii-diff] | Stable | API backwards compatibility checker | +| [jsii-rosetta] | Experimental | Transpile code snippets (in docs) from TypeScript to jsii languages | +| [jsii-config] | Experimental | Interactive tool for generating jsii configuration | +| [jsii-release] | Community | Publishes jsii modules to all supported package managers | +| [jsii-srcmak] | Community | Generates relocatable source code in jsii languages from typescript | +| [jsii-docgen] | Community | Generates markdown API documentation for jsii modules | + +??? question "Stability Definitions" + - **Stable**: Projects that comply with the [Semantic Versioning][semver] specification, and will hence not change + behavior or receive other breaking changes across minor and patch version bumps. + - **Experimental**: Projects that are under active development and may change behavior or receive other breaking + changes across minor releases. + - **Community**: a community-maintained project, not officially supported by the *jsii core team*. + + [semver]: https://semver.org/spec/v2.0.0.html + + +[jsii]: https://github.com/aws/jsii/tree/main/packages/jsii +[jsii-pacmak]: https://github.com/aws/jsii/tree/main/packages/jsii-pacmak +[jsii-reflect]: https://github.com/aws/jsii/tree/main/packages/jsii-reflect +[jsii-config]: https://github.com/aws/jsii/tree/main/packages/jsii-config +[jsii-diff]: https://github.com/aws/jsii/tree/main/packages/jsii-diff +[jsii-rosetta]: https://github.com/aws/jsii/tree/main/packages/jsii-rosetta +[jsii-release]: https://github.com/eladb/jsii-release +[jsii-srcmak]: https://github.com/eladb/jsii-srcmak +[jsii-docgen]: https://github.com/eladb/jsii-docgen diff --git a/gh-pages/content/specification/.pages.yml b/gh-pages/content/specification/.pages.yml new file mode 100644 index 0000000000..493ce64c80 --- /dev/null +++ b/gh-pages/content/specification/.pages.yml @@ -0,0 +1,8 @@ +--- +title: Specification +nav: + - 1-introduction.md + - The jsii type system: 2-type-system.md + - The jsii kernel API: 3-kernel-api.md + - 4-standard-compliance-suite.md + - 5-new-language-intake.md diff --git a/gh-pages/content/specification/1-introduction.md b/gh-pages/content/specification/1-introduction.md new file mode 100644 index 0000000000..40d9a5c1d2 --- /dev/null +++ b/gh-pages/content/specification/1-introduction.md @@ -0,0 +1,173 @@ +# Introduction + +This document provides a high level overview of _jsii_, starting with its design tenets. It introduces the concepts and +components that compose _jsii_. + +## Updating the Specification + +### Introduction + +The _jsii_ specification follows the guiding principles of an RFC. It is a living document that describes the current +understanding of how the various [components](#components) of _jsii_ are operating, as well as the approaches used to +ensure consistent behavior across the various supported languages. + +The document is hosted with the _jsii_ codebase, making it easy to determine what specification was in place at the time +of a give _jsii_ release (by ways of referring to the `vX.Y.Z` git tag). A single version of the specification is +considered **active** at any given time: the version of the specification that is represented on the `HEAD` commit of +the `main` branch of the [`aws/jsii`][aws/jsii] repository. The **active** specification must be the base version for +any update proposal. + +[aws/jsii]: https://github.com/aws/jsii + +The process to update the specification is intended to be as lightweight as possible, while ensuring sufficient +conversation takes place before implementing significant (and breaking) changes. Since the process to update the +specification is part of the specification itself, it is amenable to be changed following the process described in the +currently **active** specification. + +### Process + +While the general process for updating the specification is to create a GitHub pull request against the +[`aws/jsii`][aws/jsii] repository, the exact requirements for what should be included in the pull request vary depending +on the type of update that is proposed: + +- [:warning: Changing Behavior](#new-behavior) describes the process to be followed when introducing changes to the + behavior of any component of _jsii_: new features, breaking changes to existing features, ... +- [:mag: Addressing Gaps](#addressing-gaps) is the process used for adding specification around existing but unspecified + behavior. +- [:thumbsup: Trivial Changes](#trivial) explains how to propose changes that improve the specification without changing + its meaning. + +####
:warning: Changing Behavior + +If the change is **not backwards compatible** (it is a breaking change to an existing feature, or it is a new feature +that requires all runtime libraries implement support immediately), a new RFC should be created in the +[`awslabs/aws-cdk-rfcs`][awslabs/aws-cdk-rfcs] repository, following the [RFC Process]. This ensures enough time is +spent considering alternatives to breaking changes, and to create consensus that the change is desirable before time is +spent implementing it. + +[awslabs/aws-cdk-rfcs]: https://github.com/awslabs/aws-cdk-rfcs +[rfc process]: https://github.com/aws/aws-cdk-rfcs#what-the-process-is + +!!! note + While going through the RFC process upfront is **strongly recommended**, contributors may choose not to file an RFC + for a behavior change. In this case however, any core maintainer may decide that an RFC is required and block the + contribution until the RFC process has been followed. + + It is worth noting that a draft pull request with proposed modifications to the specification (and possibly a + proof-of-concept implementation), can be extremely useful. + +When the RFC is **ready**, a GitHub pull request is created that must contain: + +- Relevant additions or modifications to the specification documents +- Relevant additions or modifications to the compliance suite +- Implementation of the new behavior, including new or updated tests in all the language bindings + +The pull request's body must reference the RFC if there has been one, and otherwise must include all discussion +necessary to explain the reasoning behind the proposal (including alternatives considered, risks, ...). + +#### :mag: Addressing Gaps + +Proposals that increase the specification's coverage (desribing behavior that already exists) are handled as GitHub pull +requests that must contain the following elements: + +- Relevant additions to the specification documents +- New compliance test(s) that enshrine the described behavior +- Implementation of the new compliance test(s) for all _Generally Available_ language bindings + +The pull request body should provide pointers to any and all elements that can be used to verify that the behavior that +is described is indeed what is currently implemented. + +#### :thumbsup: Trivial Changes + +Proposal of trivial changes, such as correcting typos in the document, or re-phrasing elements of the specification +without altering the meaning (typically to improve clarity) are handled in a simple GitHub pull request. + +## Design Tenets (unless you know better ones) + +- _jsii_ APIs strive to feel idiomatic in all supported languages. +- _jsii_ applications behave identically regardless of the language they are written in. It favors correctness over + performance. +- _jsii_ **does not** attempt to support all TypeScript idioms (many features of TypeScript cannot be expressed in some + target languages). + - Unsupported idioms will cause a compile-time error to be emitted. + - When prohibiting an idiom, _jsii_ strives to provide an error message that gives the user insight into why the + pattern cannot be supported. +- _jsii_ does not force API design opinions on the developer: + - Reserved names are limited to a minimum. + - TypeScript API design patterns that are known to result in poor developer experience when represented in other + languages will cause warnings to be issued, but the developer is ultimately entitled to decide whether they want to + take or leave the advice. +- _jsii_ produces artifacts compatible with idiomatic tools whenever possible: + - Generated libraries can be easily published to the "standard" package repository for the language. + - Standard tools can be used to work with the generated libraries, and do not require any special configuration. + +## Annotations + +Annotations are present in the _jsii_ specification to provide additional information to the reader that is +non-normative. Those take the form of block-quotes that use the following chart: + +!!! bug "Unimplemented" + Is used to annotate parts of the specification that are known to be partially or incorrectly implemented in the + current releases. Those are known issues in the current implementation that will be addressed in the future. + +!!! question + Is used to annotate open questions. They are typically in parts of the specification that is likely to change in + future releases, and that may be good candidates for introducing RFCs. + +!!! danger + Is used to draw the reader's attention on specific points. They are used primarily to help the reader identify areas + of the specification that, when incorrectly implemented, may result in hard-to-troubleshoot bugs; or to identify + behavior that is intentionally undefined. + +!!! info + Is used to provide additional context which may not be obvious to the reader. They typically contain trivia that can + help the reader understand the motivation for certain behaviors that are not always intuitive. + +## Concepts + +_jsii_ allows developers to author code once in **TypeScript**, while allowing use in a variety of other programming +languages (including **C#**, **Java** and **Python**). + +### Assemblies + +The _jsii Assembly_ document contains a specific representation of the API exported by the **TypeScript** module. +Similar to a header file in the **C++** world, it contains only information about the signatures of APIs (type names +with method and property signatures, associated documentation elements, ...) and no implementation. + +The _npm_ package produced as a result of compiling the **TypeScript** source remains the source of truth with respects +to implementation of the API. + +### Host & Kernel + +The [_jsii_ runtime architecture][runtime-architecture] defines two processes: + +1. The _host_ process runs the users' code native environment (a Java virtual machine, the .NET Runtime, ...). +2. The _kernel_ process hosts the **JavaScript** code from the standard _npm_ package defined by the user (and their + dependencies), which is loaded and managed by a standardized `@jsii/kernel` package. + +The _host_ process is responsible for starting the _kernel_ process as needed. A designated _host runtime library_ +provides helper functions that will perform the necessary initialization when needed, so the _host_ app does not need to +include any special boilerplate code. + +The two processes exchange messages over a designated communication channel (for example, using pipes), using a _kernel +API_ that is standardized in the _jsii specification_. + +[runtime-architecture]: ../overview/runtime-architecture.md + +## Components + +Several tools are involved in making this possible: + +- [`jsii`][jsii] is a modified **TypeScript** compiler. In addition to generating **JavaScript** code from the source, it + produces a _jsii Assembly_ document. +- [`jsii-pacmak`][jsii-pacmak] generates language bindings from a package compiled using `jsii`. It generates code in _host_ + languages that expose the API declared in the _jsii Assembly_ document. +- _Host runtime libraries_ centralize features used by code generated by [`jsii-pacmak`][jsii-pacmak], such as primitives to interact + with the _kernel_ process, so that this code does not need to be duplicated in every generated module. +- [`@jsii/kernel`][@jsii/kernel] (and [`@jsii/runtime`][@jsii/runtime]) provide the functionality exposed by the _kernel_ process, and allow the + _host_ code to seamlessly interact with the **JavaScript** implementation. + +[jsii]: https://github.com/aws/jsii/tree/main/packages/jsii +[jsii-pacmak]: https://github.com/aws/jsii/tree/main/packages/jsii-pacmak +[@jsii/kernel]: https://github.com/aws/jsii/tree/main/packages/@jsii/kernel +[@jsii/runtime]: https://github.com/aws/jsii/tree/main/packages/@jsii/runtime diff --git a/gh-pages/content/specification/2-type-system.md b/gh-pages/content/specification/2-type-system.md new file mode 100644 index 0000000000..5bad34a67a --- /dev/null +++ b/gh-pages/content/specification/2-type-system.md @@ -0,0 +1,395 @@ +# The _jsii_ type system + +## Preamble + +The base language for authoring _jsii_ libraries for re-use from other languages is **TypeScript**, which compiles to +**JavaScript**. Consequently, the base type system that _jsii_ sources from is that of **TypeScript**. + +When used from another language than **TypeScript** or **JavaScript**, _jsii_ libraries are running the **JavaScript** +code in a child _node_ process, and data is exchanged using **JSON**-based protocol. + +This document describes how **TypeScript** types map into the _jsii_ type system. + +The API represented by the _jsii_ assembly only covers declarations that are exported from the main file in the +**TypeScript** project (as specified in the `package.json` file by the `types` attribute). Restrictions described in +this document only apply to such declarations, the rest of the module can leverage any **TypeScript** feature. + +## Basic Types + +### Introduction + +In order to build useful programs, the simplest units of data need to be modeled: booleans, numbers, strings, etc... +Those basic building blocks are the foundations on which APIs stand. _jsii_ supports much of the same types that +**TypeScript** and **JavaScript** support, although with notable differences. + +### Boolean + +The _jsii_ type system mirrors **TypeScript**'s `boolean`, which is the simplest primitive data types, with only two +supported values: `true` and `false`. + +### Number + +The _jsii_ type system mirrors **TypeScript**'s `number`. All numbers are floating point values. + +### String + +The _jsii_ type system mirrors **TypeScript**'s `string`. Strings are used to represent textual data. + +### List + +**TypeScript** arrays (`Array`, `T[]`, `ReadonlyArray` and `readonly T[]`) are represented as _lists_ in the +_jsii_ type model. Lists are shared between the _node_ process and the host process by-value, meaning a copy of the +array is produced each time it is passed through the process boundary. + +!!! info + Items in the list may be passed by-reference (according to their type's specification), in which case mutating + operations performed on those may be visible across the process boundary. + +### Enum + +As in many languages, `enum` can be used to represent a group of related constants. While **TypeScript** `enum` entries +are associated with a value that is either a `string` or a `number`, the _jsii_ type system does not allow for those to +be down-casted to their value type (e.g: a `string`-valued `enum` entry cannot be directly passed into a `string` +parameter). + +!!! info + Unlike in certain languages such as **Java**, `enum` types cannot declare new properties or methods. + +### Any and Unknown + +**TypeScript** defines two opaque types: `any` and `unknown` that can be used to represent a value of arbitary type. The +difference between them is that while `any` is assignable to any other type, `unknown` requires a type assertion or +explicit cast to be performed before it can be assigned. + +Both of these types map to an `Any` _primitive type_ in the _jsii_ type system, and the subtle distinction between `any` +and `unknown` is lost in the process. + +!!! info + It is important to note that, contrary to the other types in the **TypeScript** type system, `any` and `unknown` + types are inherently `null`-able. + +### Void + +As in most languages, the `void` type is used to denote a method does not return anything. + +### Null and Undefined + +**JavaScript** differentiates `undefined` and `null` values. While `undefined` denotes that _no value_ has been set, +`null` denotes an intentional signal of there being _no data_. Most other programming languages (particularly statically +typed languages) however lack this distinction, and the _jsii_ type model consequently considers `null` and `undefined` +are semantically equivalent. + +!!! info + Unlike certain other programming languages, such as **Java**, **TypeScript** does not allow `null` (or `undefined`) + values unless the type signature expressedly supports that (with the exception of `any` and `unknown`, which are + implicitly `null`-able, as was discussed earlier). + +### Object + +**TypeScript**'s `object` type denotes anything that is not a _primitive_ type, meaning anything other than a `number`, +`string`, `boolean`, `bigint`, `symbol`, `null` or `undefined`. + +In the _jsii_ type model, `object` indicates a block of structured data that can be shared by-value across the process +boundary. As a consequence, they may not include any method. + +!!! bug "Unimplemented" + This type is called `Json` in the current implementation. + +!!! question + The by-value nature of `object` is problematic because **TypeScript** makes no guarantee with respects to the + absence of methods on `object`, and properties may be dynamic. + +### Promises + +_jsii_ supports asynchronous methods, and the **TypeScript** `Promise` type has to be used as the result of `async` +methods. Promises can only be used as the result type of methods, not as the type of a property or parameter. + +### Unsupported **TypeScript** basic types + +Due to how such types cannot be represented in many other programming languages, the _jsii_ type model does not support +the following **TypeScript** entities: + +- Tuples, a group of arbitrarily-typed values, often used as the result type for multi-valued functions. +- The `never` type, which is used as the return type of functions that will not yield control back to their invoker + (infinite loops, `process.exit()`, ...). +- `bigint` and `symbol` don't have equivalents in many other programming languages and are generally of limited value in + API design. + +## Complex Types + +The goal of the _jsii_ is to enable cross-language re-use of class libraries. **TypeScript** enables representing +classic object-oriented concepts, such as _classes_ and _interfaces_. The _jsii_ type system supports some additional +nuances on top of those, to better represent **TypeScript** and **JavaScript** idioms in a way that enables generating +convenient APIs in other languages. + +### Classes + +Exported **TypeScript** classes are represented in the _jsii_ type system, with the following restrictions from plain +**TypeScript**: + +- Methods overloads are not supported. +- Overridden methods or properties must retain the exact same type signature as the one declared in a parent type. The + **jsii** type system strictly enforces the [Liskov substitution principle]. + +[liskov substitution principle]: https://en.wikipedia.org/wiki/Liskov_substitution_principle + +### Interfaces & Structs + +Exported **TypeScript** interfaces are interpreted as one of two entities in the _jsii_ type system: + +- If the `interface` name is prefixed with an `I` (e.g: `ISomething`), it is interpreted as a _behavioral interface_. +- Otherwise (e.g: `Something`), it is interpreted as a _struct_. + +#### Behavioral Interfaces + +_Behavioral interfaces_ are the usual object-oriented interface: they can extend other _behavioral interfaces_, and can +be extended by _classes_. They may however not extend _structs_. + +#### Structs + +_Structs_ are used to model the **JavaScript** idiom of receiving options as an object literal passed as the last +parameter of a function. They are a formal description of a bag of properties, and are not meant to be implemented by +other types. Since those types are used as inputs, they can be handled as pure-data, immutable objects, and the +following restrictions apply: + +- A _struct_ cannot declare any _method_: they must be kept behavior-free. +- All properties declared by a _struct_ must be `readonly`. The values of the properties may however be mutable. + +_Structs_ may extend one or more other _structs_, but cannot extend or be extended by _behavioral interfaces_, and may +not be implemented by _classes_. + +### Type Unions + +In certain cases, several different kinds of values are acceptable for a given parameter or return type. **TypeScript** +models those cases using _type unions_, which are represented as `TypeA | TypeB`. The _jsii_ type model supports those, +however most other statically typed languages do not have such a concept, making those parameters or return values +difficult to use from those languages, as the value has to be declared using the most generic reference type available +(for example, in **Java**, those are returned as `java.lang.Object`). + +When used as inputs (parameters, or properties of a _struct_), it may be possible to generate method overloads that will +allow for a convenient API in languages that support overloads. + +In general however, _type unions_ are discouraged and should only be used when there is no alternative way to model the +API. + +## Serialization Behavior + +When values are passed between the _host_ process and the `node` process, they are serialized as JSON documents. They +can be passed by value or by reference, depending on the type of the value as well as the declared type of the transfer +point (method return type, property type, argument type, ...). + +The table below describes the serialization behavior applied for each possible _declared_ type (rows) for a value of a +given dynamic type (columns). The :x: sign expresses cases that are illegal and should cause immediate failure. The term +_primitive_ encompasses `boolean`, `string`, and `number`. + +|   | `undefined` | `Date` | _primitive_ | `Array` | _instance_ | `object` | +| ----------- | ----------- | ----------- | ----------- | ----------- | ----------- | ---------------------- | +| `void` | `undefined` | `undefined` | `undefined` | `undefined` | `undefined` | `undefined` | +| `Date` | `undefined` | [Date] | :x: | :x: | :x: | :x: | +| _primitive_ | `undefined` | :x: | [Identity] | :x: | :x: | :x: | +| `enum` | `undefined` | :x: | [Enum] | :x: | :x: | :x: | +| `List` | `undefined` | :x: | :x: | [Array] | :x: | :x: | +| `Map` | `undefined` | :x: | :x: | :x: | :x: | [Mapping] | +| `interface` | `undefined` | :x: | :x: | :x: | [Reference] | [Reference] | +| `struct` | `undefined` | :x: | :x: | :x: | :x: | [Value] | +| `class` | `undefined` | :x: | :x: | :x: | [Reference] | [Reference] | +| `any` | `undefined` | [Date] | [Identity] | [Array] | [Reference] | [Value] or [Reference] | + +In the case of `object` being passed though `any`, the value may be serialized by [Value] only if the value being passed +does not have any method or dynamic accessor. Otherwise, it must be passed by [Reference] instead. + +!!! danger + The serialization behavior around `undefined` values is affected by the `optional` attribute of the declared type. + As discussed earlier, the `any` type is implicitly `optional`; but all other types' serialization process will only + allow serialization of `undefined` if they were declared `optional`. + +### Array Serialization + +[array]: #array-serialization + +Arrays are serialized into the standard JSON representation for them. Each value in the array is serialized according to +the behavior dictated by the declared element type of the list, combined with the dynamic type of the value itself. + +### Date Serialization + +[date]: #date-serialization + +JSON has no standard expression for `Date`. A special JSON object representation is used to allow unambiguously +conveying a date. The wrapper has a single key (`$jsii.date`) with the [ISO 8601-1] UTC representation of the `Date` +value: + +```json +{ "$jsii.date": "2020-01-20T14:04:00.000Z" } +``` + +[iso 8601-1]: https://www.iso.org/obp/ui#iso:std:iso:8601:-1:ed-1:v1:en + +### Enum Serialization + +[enum]: #enum-serialization + +In **JavaScript**, `enum` entries are represented by their value equivalent. In order to support statically typed +representations in other languages, these are serialized using a dedicated wrapper object, using a single key +(`$jsii.enum`) with the fully qualified name of the `enum` entry: + +```json +{ "$jsii.enum": "@scope/module.EnumType.ENTRY_NAME" } +``` + +### Identity Serialization + +[identity]: #identity-serialization + +The identity serialization is achieved by using the standard JSON representation of the primitive type. JSON strings are +expressed using the `UTF-8` character set. + +### Mapping Serialization + +[mapping]: #mapping-serialization + +Key-value pairs are passed by-value between the processes and is wrapped using a single-key (`$jsii.map`) associated +with the JSON representation of the encoded object; where values are serialized according to the behavior dictated by +the element type of the mapping, combined with the dynamic type of the value itself: + +```json +{ + "$jsii.map": { + "foo": { + "date": { "$jsii.date": "2020-01-20T14:04:00.000Z" }, + "map": { "$jsii.map": {} } + } + } +} +``` + +### Reference Serialization + +[reference]: #reference-serialization + +Objects serialized by reference are passed using a special object that provides sufficient information to tie back to +the instance within its owning process. It includes a `$jsii.byref` key associated with a string that uniquely +identifies the instance, and an optional `$jsii.interfaces` key that provides a list of interfaces that the object +implements. + +```json +{ + "$jsii.byref": "@scope/module.Foo@1337", + "$jsii.interfaces": ["@scope/module.IBar", "@scope/module.IBaz"] +} +``` + +### Value Serialization + +[value]: #value-serialization + +_Structs_ can be serialized by-value. In those cases, the value is wrapped using a special object that encapsulates the +type information for the provided data as well as the _struct_'s members. + +The wrapper uses a single `$jsii.struct` key with a `fqn` key that indicates the fully qualified name of the _struct_ +type, and a `data` key that contains the members of the _struct_, serialized according to the behavior described in this +document. + +```json +{ + "$jsii.struct": { + "fqn": "@scope/module.StructType", + "data": { + "enumValue": { "$jsii.enum": "@scope/module.EnumType.ENTRY_NAME" }, + "stringProperty": "Hello, I'm a string!" + } + } +} +``` + +## Submodules + +### Overview + +Typescript allows grouping declarations together in _namespaces_, which are interpreted by _jsii_ as _submodules_. +_Submodules_ names are the fully qualified name of the namespace from the package's root (if a package `foo` defines a +namespace `ns1`, which itself contains `ns2`, the submodule for `ns2` will be named `foo.ns1.ns2`). + +_Submodules_ are delcared in the _jsii_ assembly under the `submodules` key. This is also where specific +[configuration](#submodule-configuration) is registered, if different from the parent submodule or package. + +_Submodules_ are hierarchical, and their fully qualified name is representative of the relationship. For example the +`assm.foo.bar` submodule is considered to be nested under the `assm.foo` submodule. + +### Restrictions + +_Submodules_ cannot be involved in dependency cycles. While it is possible to build such cycles in **JavaScript**, that +configuration cannot be reliably reprensented in certain other programming languages (e.g: **Python**). + +!!! bug "Unimplemented" + [`jsii`][jsii] does not currently check for circular submodule dependencies. Invalid dependency patterns may result + in errors at code generation by [`jsii-pacmak`][jsii-pacmak], or at runtime. + +Since this would result in ambiguity that cannot be consistently resolved, a given type can only be exported as part of +one _submodule_. + +[jsii]: https://github.com/aws/jsii/tree/main/packages/jsii +[jsii-pacmak]: https://github.com/aws/jsii/tree/main/packages/jsii-pacmak + +### Declaration + +There are two supported ways to introduce _submodules_: + +- Using the namespaced export syntax: + ```ts + export * as ns from './module'; + ``` +- Using an explicit namespace declaration: + ```ts + export namespace ns { + /* ... */ + } + ``` + +_Submodules_ declared using the `export * as ns from './module';` syntax can be documented using a markdown document +located at `./module/README.md`. + +!!! bug "Unimplemented" + The `./module/README.md` file support is not yet implemented. + +### Submodule Configuration + +In languages where this is relevant (e.g: **Python**), _submodules_ are rendered as native _submodules_. In languages +where a namespace system exists (**Java** uses _packages_, **C#** uses _namespaces_, ...), _submodules_ are rendered +using that. + +By default, _submodule_ names are rendered appropriately in the target language (this typically involves adjusting the +case of _submodule_ name fragments to the idiomatic form in the language). In certain cases however, a developer can +choose to use a different configuration by defining the _submodule_ using the namespaced-export syntax +(`export * as namespace from './module-name';`) by placing a `.jsiirc.json` file next to the entry point of the +namespaced module. For example, if `./module-name`'s entry point is `foo/bar/module-name/index.ts`, the _submodule_ +configuration resides in `foo/bar/module-name/.jsiirc.json`. + +Since _submodules_ are hierarchical, the configuration of a given _submodule_ defines the default configuration of +_submodules_ nested under it. + +## Code Generation + +In order to generate code in various programming languages, [`jsii-pacmak`][jsii-pacmak] needs configuration that +provides naming directives (e.g: **Java** package names, **C#** namespaces, **Python** module names, ...). This +configuration is language-specific and each language implementation specifies and documents its own configuration +schema. + +Configuration is sourced in the `package.json` file at the root of the npm package, under the special `jsii` key. The +general schema is described in the [configuration] document. + +!!! bug "Unimplemented" + There is a proposition to allow this configuration to be placed in a `.jsiirc.json` file, which would take + precedence over what is specified in `package.json`. _Submodules_ introduced using the + `export * as ns from './module';` syntax would then be able to define _submodule_-local configuration using the + `./module/.jsiirc.json` file. + +[configuration]: ../user-guides/lib-author/configuration/index.md + +## References + +The [**TypeScript** Handbook][ts-handbook] describes the language's type system and syntax elements that serve as the +basis for the _jsii_ type system. Additionally, the **JavaScript** type system is described in the +[**JavaScript** Fundamentals][js-fundamentals] document. + +[js-fundamentals]: https://javascript.info/types +[ts-handbook]: https://www.typescriptlang.org/docs/handbook/basic-types.html diff --git a/docs/specifications/3-kernel-api.md b/gh-pages/content/specification/3-kernel-api.md similarity index 51% rename from docs/specifications/3-kernel-api.md rename to gh-pages/content/specification/3-kernel-api.md index a57792f8ce..f99d2d9777 100644 --- a/docs/specifications/3-kernel-api.md +++ b/gh-pages/content/specification/3-kernel-api.md @@ -1,18 +1,18 @@ -# The *jsii* kernel API -This document describes the API for the `@jsii/kernel` module, which is to be -used by all *host* libraries. It provides the fundamental features necessary for -*host* processes to interact with the original module's code. +# The _jsii_ kernel API -> :construction: Currently, `@jsii/kernel` contains the bulk of the logic, -> however a separate `@jsii/runtime` package owns the dialogue between the -> *host* and *kernel* processes. The `@jsii/runtime` is a very thin glue layer -> and it will eventually be merged into `@jsii/kernel`. +This document describes the API for the `@jsii/kernel` module, which is to be used by all _host_ libraries. It provides +the fundamental features necessary for _host_ processes to interact with the original module's code. + +!!! note + Currently, `@jsii/kernel` contains the bulk of the logic, however a separate `@jsii/runtime` package owns the + dialogue between the _host_ and _kernel_ processes. The `@jsii/runtime` is a very thin glue layer and it will + eventually be merged into `@jsii/kernel`. ## Errors -Most of the calls described in this document may result in an error being -raised. It is the responsibility of the *host* runtime library to deal with such -errors correctly: action retries, propagate the error to the *host* app's code, -and so on. + +Most of the calls described in this document may result in an error being raised. It is the responsibility of the _host_ +runtime library to deal with such errors correctly: action retries, propagate the error to the _host_ app's code, and so +on. Error responses are signaled by the `error` key: @@ -25,65 +25,86 @@ export interface ErrorResponse { } ``` -Where possible, the *host* runtime libraries should make sure to affix their own -stack trace information where relevant to the *kernel* process's stack trace -when such errors are propagated to *host* app's code, in order to offer as much +Where possible, the _host_ runtime libraries should make sure to affix their own stack trace information where relevant +to the _kernel_ process's stack trace when such errors are propagated to _host_ app's code, in order to offer as much relevant context information as possible. ## Initialization - the `hello` message -The *host* library is responsible for spawning the `node` process that will run -the original module's code. This `node` process runs the `@jsii/kernel` -application, and API messages are exchanged of the `node` processes' standard -input and output pipes. -Upon initialization, the `@jsii/kernel` process introduces itself to the *host* -application by emitting a single JSON message: +The _host_ library is responsible for spawning the `node` process that will run the original module's code. This `node` +process runs the `@jsii/kernel` application, and API messages are exchanged via the `node` processes' standard input and +output pipes. -```js +Upon initialization, the `@jsii/kernel` process introduces itself to the _host_ application by emitting a single JSON +message: + +```json { - // The package name@version of the @jsii/kernel in use - "hello": "@jsii/runtime@0.21.1", + "hello": "@jsii/runtime@0.21.1" } ``` -Any additional key present on the `hello` message will be silently ignored by a -*host* library that does not know how to process it, ensuring forward -compatibility of this message, if and when new attributes are added. +Any additional key present on the `hello` message will be silently ignored by a _host_ library that does not know how to +process it, ensuring forward compatibility of this message, if and when new attributes are added. + +!!! note + In the future, this message may be augmented with additional keys to enable feature negotiation between the _host_ + application and the `@jsii/kernel`. -> :construction: In the future, this message may be augmented with additional -> keys to enable feature negotiation between the *host* application and the -> `@jsii/kernel`. +## Teardown - the `exit` message + +The _host_ library should send the `exit` message when it no longer needs the `@jsii/kernel`. This message enables the +`@jsii/kernel` to trigger clean-up operations, such as getting rid of temporary directories, in order to avoid littering +the temporary directory with leftover files. + +The `exit` message has the following schema: + +```ts +interface Exit { + /** The exit code the `@jsii/kernel` process should return. Typically `0`. */ + readonly exit: number; +} +``` + +!!! danger "Important" + Once the `exit` message has been sent, no more data should be sent through to the `@jsii/kernel` process. The + request stream should be closed as soon as the `exit` message was sent. Additional data may however be received from + the `@jsii/kernel` that is intended to the `STDOUT` or `STDERR` console streams. ## General Kernel API -Once the `hello` handshake is complete, a sequence of request and responses are -exchanged with the `@jsii/kernel`. Requests take the form of JSON-encoded -messages that all follow the following pattern: + +Once the `hello` handshake is complete, a sequence of request and responses are exchanged with the `@jsii/kernel`. +Requests take the form of JSON-encoded messages that all follow the following pattern: ```ts interface Request { /** * This field discriminates the various request types. */ - api: 'load' // Loading jsii assemblies into the Kernel - | 'naming' // Obtaining naming information for loaded assemblies - | 'stats' // Obtaining statistics about the Kernel usage - | 'create' // Creating objects - | 'del' // Destroying objects - | 'invoke' | 'sinvoke' // Invoking methods (and static methods) - | 'get' | 'sget' // Invoking getters (and static getters) - | 'set' | 'sset' // Invoking setters (and static setters) - | 'begin' | 'end' // Asynchronous method invocation - ; + api: + | 'load' // Loading jsii assemblies into the Kernel + | 'naming' // Obtaining naming information for loaded assemblies + | 'stats' // Obtaining statistics about the Kernel usage + | 'create' // Creating objects + | 'del' // Destroying objects + | 'invoke' + | 'sinvoke' // Invoking methods (and static methods) + | 'get' + | 'sget' // Invoking getters (and static getters) + | 'set' + | 'sset' // Invoking setters (and static setters) + | 'begin' + | 'end'; // Asynchronous method invocation // ... request-type specific fields ... } ``` -### Loading *jsii* assemblies into the Kernel -Before any *jsii* type can be used, the assembly that provides it must be loaded -into the kernel. Similarly, all dependencies of a given *jsii* module must have -been loaded into the kernel before the module itself can be loaded (the -`@jsii/kernel` do not perofrm any kind of dependency resolution). +### Loading _jsii_ assemblies into the Kernel + +Before any _jsii_ type can be used, the assembly that provides it must be loaded into the kernel. Similarly, all +dependencies of a given _jsii_ module must have been loaded into the kernel before the module itself can be loaded (the +`@jsii/kernel` does not perform any kind of dependency resolution). Loading new assemblies into the `@jsii/kernel` is done using the `load` API: @@ -101,9 +122,8 @@ interface LoadRequest { } ``` -The response to the `load` call provides some high level information pertaining -to the loaded assembly, which may be used by the *host* app to validate the -result of the operation: +The response to the `load` call provides some high-level information pertaining to the loaded assembly, which may be +used by the _host_ app to validate the result of the operation: ```ts interface LoadResponse { @@ -117,9 +137,9 @@ interface LoadResponse { Once a module is loaded, all the types it declares immediately become available. ### Obtaining naming information for loaded assemblies -In certain cases, *host* runtime libraries may need to obtain naming information -from assemblies in order to determine the translation table from a *jsii* -fully-qualified name to a *host*-native name. This can be retrieved using the + +In certain cases, _host_ runtime libraries may need to obtain naming information from assemblies in order to determine +the translation table from a _jsii_ fully-qualified name to a _host_-native name. This can be retrieved using the `naming` call: ```ts @@ -132,8 +152,8 @@ export interface NamingRequest { } ``` -In response to the `naming` call, the `@jsii/kernel` returns the configuration -block for each language supported by the named `assembly`: +In response to the `naming` call, the `@jsii/kernel` returns the configuration block for each language supported by the +named `assembly`: ```ts export interface NamingResponse { @@ -149,9 +169,9 @@ export interface NamingResponse { ``` ### Obtaining statistics about the Kernel usage -The `stats` call can be used to obtain information about the current `Kernel` -instance, which can be leveraged by unit tests or in order to produce metrics -for tracking the health of a long-running *jsii* app. + +The `stats` call can be used to obtain information about the current `Kernel` instance, which can be leveraged by unit +tests or in order to produce metrics for tracking the health of a long-running _jsii_ app. ```ts export interface StatsRequest { @@ -160,8 +180,7 @@ export interface StatsRequest { } ``` -The response to the `stats` call contains synthetic information about the -current state of the `Kernel`: +The response to the `stats` call contains synthetic information about the current state of the `Kernel`: ```ts export interface StatsResponse { @@ -171,13 +190,12 @@ export interface StatsResponse { ``` ### Creating objects -Most *jsii* workflows start with creating instances of objects. This can mean -creating a pure **JavaScript** object, instantiating a sub-class of some -**JavaScript** class, or even creating a pure-*host* instance that implements -a collection of *behavioral interfaces*. -Creating objects is achieved using the `create` API, which accepts the following -parameters: +Most _jsii_ workflows start with creating instances of objects. This can mean creating a pure **JavaScript** object, +instantiating a sub-class of some **JavaScript** class, or even creating a pure-_host_ instance that implements a +collection of _behavioral interfaces_. + +Creating objects is achieved using the `create` API, which accepts the following parameters: ```ts interface CreateRequest { @@ -195,9 +213,8 @@ interface CreateRequest { } ``` -The response to the object call is a decorated `ObjectReference` object (which -is a common parameter to other calls in the `@jsii/kernel` API, used to refer -to a particular instance): +The response to the object call is a decorated `ObjectReference` object (which is a common parameter to other calls in +the `@jsii/kernel` API, used to refer to a particular instance): ```ts interface ObjectReference { @@ -211,8 +228,7 @@ interface CreateResponse extends ObjectReference { } ``` -The value of the `'$jsii.byref'` field of the `ObjectReference` type is -formatted in the following way: +The value of the `'$jsii.byref'` field of the `ObjectReference` type is formatted in the following way: ``` @aws-cdk/core.Stack@10003 @@ -221,39 +237,34 @@ formatted in the following way: โ””โ”€ Object instance's base class' jsii fully qualified name ``` -The first part of the reference identifier can have the special un-qualified -value `Object` to denote the absence of a *jsii*-known base class (for example -when the object *only* implements a *jsii* interface). +The first part of the reference identifier can have the special un-qualified value `Object` to denote the absence of a +_jsii_-known base class (for example when the object _only_ implements a _jsii_ interface). #### Additional Interfaces -Sometimes, the *host* app will extend a *jsii* class and implement new *jsii* -interfaces that were not present on the original type. Such interfaces must be -declared by providing their *jsii* fully qualified name as an entry in the + +Sometimes, the _host_ app will extend a _jsii_ class and implement new _jsii_ interfaces that were not present on the +original type. Such interfaces must be declared by providing their _jsii_ fully qualified name as an entry in the `interfaces` list. -Providing interfaces in this list that are implicitly present from another -delcaration (either because they are already implemented by the class denoted by -the `fqn` field, or because another entry in the `interfaces` list extends it) -is valid, but not necessary. The `@jsii/kernel` is responsible for correctly -handling redundant declarations. +Providing interfaces in this list that are implicitly present from another delcaration (either because they are already +implemented by the class denoted by the `fqn` field, or because another entry in the `interfaces` list extends it) is +valid, but not necessary. The `@jsii/kernel` is responsible for correctly handling redundant declarations. -**:warning:** while declared `interfaces` may contain redundant declarations of -members already declared by other `interfaces` or by the type denoted by `fqn`, -undefined behavior results if any such declaration is not identical to the -others (e.g: property `foo` declared with type `boolean` on one of the -`interfaces`, and with type `string` on another). +!!! danger + While declared `interfaces` may contain redundant declarations of members already declared by other `interfaces` or + by the type denoted by `fqn`, undefined behavior results if any such declaration is not identical to the others + (e.g: property `foo` declared with type `boolean` on one of the `interfaces`, and with type `string` on another). #### Overrides -For any method that is implemented or overridden from the *host* app, the -`create` call must specify an `override` entry. This will inform the Kernel that -calls to these methods must be relayed to the *host* app for execution, instead + +For any method that is implemented or overridden from the _host_ app, the `create` call must specify an `override` +entry. This will inform the Kernel that calls to these methods must be relayed to the _host_ app for execution, instead of executing the original library's version. -An optional `cookie` string can be provided. This string will be recorded on the -**Javascript** proxying implementation, and will be provided to the **host** app -with any *callback* request. This information can be used, for example, to -improve the performance of implementation lookups in the *host* app, where the -necessary reflection calls would otherwise be prohibitively expensive. +An optional `cookie` string can be provided. This string will be recorded on the **Javascript** proxying implementation, +and will be provided to the **host** app with any _callback_ request. This information can be used, for example, to +improve the performance of implementation lookups in the _host_ app, where the necessary reflection calls would +otherwise be prohibitively expensive. Override declarations adhere to the following schema: @@ -276,18 +287,16 @@ type Override = MethodOverride | PropertyOverride; ``` #### A note about callbacks -All `@jsii/runtime` calls that interact with object instances (that is, any call -except for `load`, `naming` and `stats`; as well as the `del` call since *jsii* -does not support customized destructors or finalizers) may result in the need to -execute code that is defined in the *host* app, when the code path traverses a -method or property that was implemented or overridden in the *host* app. -Such cases will result in a callback request substituting itself to the response -of the original call being made; execution of which will resume once the -callback response is provided. +All `@jsii/runtime` calls that interact with object instances (that is, any call except for `load`, `naming` and +`stats`; as well as the `del` call since _jsii_ does not support customized destructors or finalizers) may result in the +need to execute code that is defined in the _host_ app, when the code path traverses a method or property that was +implemented or overridden in the _host_ app. + +Such cases will result in a callback request substituting itself to the response of the original call being made; +execution of which will resume once the callback response is provided. -A callback request is sent from the `@jsii/kernel`'s `node` process to the -*host* app and has the following schema: +A callback request is sent from the `@jsii/kernel`'s `node` process to the _host_ app and has the following schema: ```ts interface CallbackRequest { @@ -324,14 +333,12 @@ interface SetCallback extends CallbackBase { type Callback = InvokeCallback | GetCallback | SetCallback; ``` -In order to fulfill the callback request, the *host* app may need to perform -futher API calls (loading new assemblies, creating new instances, invoking -methods - including delegating to the `super` implementation, ...). Such calls -will behave as they otherwise would (including the possible introduction of -further callback requests). +In order to fulfill the callback request, the _host_ app may need to perform futher API calls (loading new assemblies, +creating new instances, invoking methods - including delegating to the `super` implementation, ...). Such calls will +behave as they otherwise would (including the possible introduction of further callback requests). -Once the *host* app has fulfilled the request, it must signal the result of -that execution back to the `@jsii/kernel` process by using the `complete` call: +Once the _host_ app has fulfilled the request, it must signal the result of that execution back to the `@jsii/kernel` +process by using the `complete` call: ```ts interface CompleteBase { @@ -355,12 +362,10 @@ interface CallbackFailure extends CompleteBase { type CompleteRequest = CallbackSuccess | CallbackFailure; ``` -As discussed earlier, the response to the `complete` call is the result of -resuming execution of the code path that triggered the callback request. This -may be another callback request, or the final result of that call. +As discussed earlier, the response to the `complete` call is the result of resuming execution of the code path that +triggered the callback request. This may be another callback request, or the final result of that call. -The `callbacks` call may be used to determine the list of all outstanding -callback requests: +The `callbacks` call may be used to determine the list of all outstanding callback requests: ```ts interface CallbacksRequest { @@ -379,9 +384,9 @@ interface CallbacksResponse { ``` ### Destroying Objects -Once the *host* app no longer needs a particular object, it can be discarded. -This can happen for example when the *host* reference to an object is garbage -collected or freed. In order to allow the **JavaScript** process to also + +Once the _host_ app no longer needs a particular object, it can be discarded. This can happen for example when the +_host_ reference to an object is garbage collected or freed. In order to allow the **JavaScript** process to also reclaim the associated memory footprint, the `del` API must be used: ```ts @@ -394,29 +399,28 @@ interface DelRequest { } ``` -> **:warning:** Failure to use the `del` API will result in memory leakage as -> the **JavaScript** process accumulates garbage in its Kernel instance. This -> can eventually result in a *Javascript heap out of memory* error, and the -> abnormal termination of the `node` process, and consequently of the *host* app. +!!! danger + Failure to use the `del` API will result in memory leakage as the **JavaScript** process accumulates garbage in its + Kernel instance. This can eventually result in a _Javascript heap out of memory_ error, and the abnormal termination + of the `node` process, and consequently of the _host_ app. -> :construction: The existing *host* runtime libraries do not implement this -> behavior! +!!! bug "Unimplemented" + The existing _host_ runtime libraries do not implement this behavior! -> :question: There is currently no provision for the `node` process to inform -> the *host* app about object references it dropped. This mechanism is necessary -> in order to support garbage collection of resources that involve -> *host*-implemented code (in such cases, the *host* app must hold on to any -> instance it passed to **JavaScript** until it is no longer reachable from -> there). +!!! question + There is currently no provision for the `node` process to inform the _host_ app about object references it dropped. + This mechanism is necessary in order to support garbage collection of resources that involve _host_-implemented code + (in such cases, the _host_ app must hold on to any instance it passed to **JavaScript** until it is no longer + reachable from there). -Upon successfully deleting an object reference, the `@jsii/kernel` will return -an empty response object: +Upon successfully deleting an object reference, the `@jsii/kernel` will return an empty response object: ```ts export interface DelResponse {} ``` ### Invoking methods (and static methods) + Invoking methods is done via the `invoke` call: ```ts @@ -433,8 +437,7 @@ interface InvokeRequest { } ``` -Static method invocations do not have a receiving instance, and instead are -implemented by way of the `sinvoke` call: +Static method invocations do not have a receiving instance, and instead are implemented by way of the `sinvoke` call: ```ts interface StaticInvokeRequest { @@ -450,9 +453,8 @@ interface StaticInvokeRequest { } ``` -Note that, unlike in certain programming languages such as **Java**, it is -illegal to attempt invoking a static method on the static type of some instance -using the `invoke` call. All static invocations *must* be done using `sinvoke`. +Note that, unlike in certain programming languages such as **Java**, it is illegal to attempt invoking a static method +on the static type of some instance using the `invoke` call. All static invocations _must_ be done using `sinvoke`. Both the `invoke` and `sinvoke` calls result in the same response: @@ -463,18 +465,16 @@ interface InvokeResponse { } ``` -When the method's return type is `void`, the `result` value should typically be -`undefined`, however it may not be ?? (**TypeScript** may in certain circumstances -allow returning a value from a `void` method): the *host* app should ignore such -values. +When the method's return type is `void`, the `result` value should typically be `undefined`, however it may not be ?? +(**TypeScript** may in certain circumstances allow returning a value from a `void` method): the _host_ app should ignore +such values. #### Asynchronous method invocation -The `invoke` call can only be used to invoke *synchronous* methods. In order to -invoke *asynchronous* methods, the `begin` and `end` calls must be used instead. -Once the *host* app has entered an asynchronous workflow (after it makes the -first `begin` call), and until it has completed all asynchronous operations -(after all `begin` class are matched with an `end` call), no *synchronous* -operation (including synchronous callbacks) may be initiated. + +The `invoke` call can only be used to invoke _synchronous_ methods. In order to invoke _asynchronous_ methods, the +`begin` and `end` calls must be used instead. Once the _host_ app has entered an asynchronous workflow (after it makes +the first `begin` call), and until it has completed all asynchronous operations (after all `begin` class are matched +with an `end` call), no _synchronous_ operation (including synchronous callbacks) may be initiated. ```ts interface BeginRequest { @@ -490,7 +490,8 @@ interface BeginRequest { } ``` -> :construction: There is no static form of this call. Should there be one? +!!! question + There is no static form of this call. Should there be one? The `begin` call results in a promise being made: @@ -504,8 +505,8 @@ interface BeginResponse { } ``` -Whenever the *host* app needs to obtain the promised value (possibly in a -blocking way), it makes the corresponding `end` call: +Whenever the _host_ app needs to obtain the promised value (possibly in a blocking way), it makes the corresponding +`end` call: ```ts interface EndRequest { @@ -526,11 +527,12 @@ interface EndResponse { } ``` -> **:warning:** All `begin` calls must be matched with an `end` call. Failure to -> do so may result in unhandled promise rejections that might cause the -> application to terminate in certain environments. +!!! danger + All `begin` calls must be matched with an `end` call. Failure to do so may result in unhandled promise rejections + that might cause the application to terminate in certain environments. ### Invoking getters (and static getters) + In order to obtain the value of properties, the `get` call is used: ```ts @@ -545,8 +547,8 @@ interface GetRequest { } ``` -When operating on static properties, or in order to obtain the value of `enum` -constants, the `sget` API must be used instead: +When operating on static properties, or in order to obtain the value of `enum` constants, the `sget` API must be used +instead: ```ts interface StaticGetRequest { @@ -570,6 +572,7 @@ interface GetResponse { ``` ### Invoking setters (and static setters) + In order to change the value of a property, the `set` call is used: ```ts @@ -602,13 +605,8 @@ interface StaticSetRequest { } ``` -Both the `set` and `sset` calls result in the same response, which is an empty -object: +Both the `set` and `sset` calls result in the same response, which is an empty object: ```ts interface SetResponse {} ``` - --------------------------------------------------------------------------------- - -Continue to [Standard Compliance Suite](./4-standard-compliance-suite.md) diff --git a/gh-pages/content/specification/4-standard-compliance-suite.md b/gh-pages/content/specification/4-standard-compliance-suite.md new file mode 100644 index 0000000000..ea220c1ca1 --- /dev/null +++ b/gh-pages/content/specification/4-standard-compliance-suite.md @@ -0,0 +1,504 @@ +# Standard Compliance Suite + +## Goal + +The goal of the standard compliance suite is to be a normative description of the behaviors that all language runtime +implementations (_host runtime library_ in combination with _code generation_) must implement. This description takes +the form of a collection of test cases that must be re-implemented in each _host_ language, so that compliance can be +asserted. + +Since the goal of _jsii_ is to expose a single Object-Oriented API to multiple programming languages, it is important to +ensure the behavior is consistent across all of them. This can be achieved by making sure that the interactions between +the _host_ and _kernel_ processes are the same for a given use-case. + +## Format + +In order to assert whether a new runtime implementation is correct, a formal compliance test suite is defined, that all +language runtimes must fully implement before they can be deemed eligible for General Availability. + +This document describes these tests, as well as a general approach for ensuring conformance requirements are met in a +systematic manner. + +### Categories + +Test cases in the standard compliance suite are grouped by categories, which help implementors direct their effort in +the early stages of the implementation of new language bindings. Each category is declared in an `H3` title (a line that +starts with `### `) within the [`## Test Suite`] title. A description of the category immediately follows the opening +title. The category ends with the end of the document, or whenever another `H2` title is reached. + +[`## test suite`]: #test-suite + +### Test Case + +Within a category title, test cases are delimited by `H4` (`#### `) titles, which correspond to the test case name. The +test case name should be kept concise (ideally within 75 characters) and try to be as descriptive as possible. + +Immediately after the `H4` title is an English language description of the test case that explains the property the test +is designed to validate in as much detail as possible. As much as possible, test case descriptions should be +self-sufficient. + +After the attributes table, a **TypeScript** block of code describes the canonical form of the test. It includes any +type declaration that is used by the test (so the code example is self-contained). Assertions performed by the test +should be written in the form of [`jest`] expectations. + +!!! question + The assertion code is intended as a formal representation of the tests' normative procedure. It is not currently + executed against the _kernel_, but this could be achieved in the future. Additionally, we might be able to + automatically transliterate the tests to other languages using [`jsii-rosetta`]. + +[`jest`]: https://jestjs.io/docs/en/getting-started +[`jsii-rosetta`]: https://github.com/aws/jsii/tree/main/packages/jsii-rosetta + +Finally, another code block details the sequence of messages that should be exchanged between the _host_ and `node` +processes during the execution of the test case, such that implementations can assert coherent behavior. + +Initial messages corresponding to the `hello` and `load` calls can be omitted at the beginning of the kernel trace. +Those messages are typically identical across tests and there is little value in asserting around those. However, any +`load` call happening after the first call that is neither the `hello` message or another `load` call **must** be +included. + +The dialogue is the sequence of JSON formatted messages, from the perspective of the _host_ app, using the following +notation: + +- Messages sent by the _host_ runtime to the `node` process: + ``` + > { "api": "foo" } + ``` +- Messages received by the _host_ runtime from the `node` process: + ``` + < { "result": "bar" } + ``` +- Comments to improve readability of the trace: + ``` + # Comment continues until the end of the line + ``` +- Blank lines can be added to logically group trace elements + +!!! question + Is there a need to support some form of a capture mechanism to provision for non-deterministic results, or + non-normative elements such as the exact Object IDs issued for created instances? + +??? example "Show Template" + Below is the template markdown to copy-paste when introducing a new test case in the compliance suite. New tests should + always be added at the very end of the category they belong to, right after the last test in said category. + + ````md + ### Test Category + + #### Test Case Name + + A short english language description of what property this test verifies. The description should include enough detail + for a reader to be able to understand the test without having to search for any additional information. Prefer a long, + unambiguous description to a terse one that could be subject to interpretation. + +
Show test + + ##### Reference Implementation + + ```ts + // GIVEN + export class Foo { + /* ... */ + } + + // WHEN + const bar = new Foo().bar(); + + // THEN + expect(bar.baz).toBeUndefined(); + ``` + + ##### Reference Kernel Messaging + + ``` + ## You can omit the initial hello/load messages + # < { "hello": "@jsii/runtime@1.2.3" } + # > { "load": { "name": "test-case-001", "version": "1.2.3", "tarball": "/tmp/jsii-kernel-test/lib.tgz" } } + # < { "assembly": "test-case-001", "types": 3 } + ``` + +
+ ```` + +## Compliance + +In order to be able to assert compliance of language binding libraries to the standard test suite, implementations are +responsible for providing a test harness (typically as part of the runtime library) that can produce a standardized test +report in the form of a JSON document that follows the following schema: + +```ts +interface TestReport { + /** The report is broken down by test category, using the name as-is */ + [category: string]: { + /** For each test in the category, using its name as-is */ + [test: string]: { + /** Whether the test passed or failed */ + status: 'PASS' | 'FAIL'; + /** The kernel messages captured during the test */ + kernelTrace: Array; + }; + }; +} + +interface KernelMessage { + /** The direction the message was sent (Host -> Kernel / Kernel -> Host) */ + direction: 'FromKernel' | 'ToKernel'; + /** The message, as a JSON object */ + message: { [key: string]: unknown }; +} +``` + +The `@jsii/compliance` package provides the necessary tools to consume such a test report, together with the Markdown +document describing the compliance suite, and procuces a report describing compliance test coverage as well as +information about any non-conformant test result. + +!!! bug "Unimplemented" + The `@jsii/compliance` tool does not exist yet. + +!!! question + Should a "somewhat standard" format such as XUnit test report be used instead of rolling our own JSON document? + +## Test Suite + +### Legacy + +This section is due to contain all compliance tests that were implemented before the _jsii specification_ was initially +written. They are going to be gradually replaced by more focused tests with better descriptions. + +#### Type Unions are correctly disambiguated by the Kernel + +In certain cases, two or more types in a _Type Union_ can overlap in such a way that they are all valid structural types +for the value. Statically typed languages however will not be satisfied with structural typing only, and require the +correct declared type to be preserved. + +??? example "Show test" + ##### Reference Implementation + + ```ts + // GIVEN + export interface BluePill { + readonly offeredTo: string; + readonly makesYouForgetTheMatrix?: boolean; + } + export interface RedPill { + readonly offeredTo: string; + readonly makesYouExitTheMatrix?: boolean; + } + export class Morpheus { + public static isBlue(pill: BluePill | RedPill): pill is BluePill { + const keys = new Set(Object.keys(pill)); + switch (keys.size) { + case 1: + return keys.has('offeredTo'); + case 2: + return keys.has('offeredTo') && keys.has('makesYouForgetTheMatrix'); + default: + return false; + } + } + public static isRed(pill: BluePill | RedPill): pill is RedPill { + const keys = new Set(Object.keys(pill)); + switch (keys.size) { + case 1: + return keys.has('offeredTo'); + case 2: + return keys.has('offeredTo') && keys.has('makesYouExitTheMatrix'); + default: + return false; + } + } + private constructor() {} + } + export class Neo { + public readonly tookBlue: boolean; + public readonly tookRed: boolean; + + public constructor(public readonly pill: BluePill | RedPill) { + this.tookBlue = pill.offeredTo == 'Neo' && Morpheus.isBlue(pill); + this.tookRed = pill.offeredTo == 'Neo' && Morpheus.isRed(pill); + } + } + + // WHEN + const bluePillA = new Neo({ offeredTo: 'not Neo' }); + const bluePillB = new Neo({ offeredTo: 'Neo', makesYouForgetTheMatrix: true }); + const redPillA = new Neo({ offeredTo: 'not Neo' }); + const redPillB = new Neo({ offeredTo: 'Neo', makesYouExitTheMatrix: true }); + + // THEN + expect(bluePillA.pill instanceof BluePill).toBeTruthy(); + expect(bluePillA.tookBlue).toBeFalsy(); + expect(bluePillA.tookRed).toBeFalsy(); + + expect(bluePillB.pill instanceof BluePill).toBeTruthy(); + expect(bluePillA.tookBlue).toBeTruthy(); + expect(bluePillA.tookRed).toBeFalsy(); + + expect(redPillA.pill instanceof RedPill).toBeTruthy(); + expect(bluePillA.tookBlue).toBeFalsy(); + expect(bluePillA.tookRed).toBeFalsy(); + + expect(redPillB.pill instanceof RedPill).toBeTruthy(); + expect(bluePillA.tookBlue).toBeFalsy(); + expect(bluePillA.tookRed).toBeTruthy(); + ``` + + ##### Kernel Trace + + ``` + + ``` + +#### Partially initialized object consumption + +When a constructor passes `this` out from **JavaScript** to the _host_ app, the reference must be correctly identified +and passed across. + +!!! bug "Unimplemented" + The .NET Runtime does not currently honor object identity, meaning that despite the same object reference is + returned twice, two distinct proxies exist for it in the _host_ .NET app. + + Generally speaking, using pure object identity on _jsii_ language front-ends is dangerous, as certain statically + typed language will require the runtime to have different instances for different static types a given object + reference is surfaced as. It may be necessary to introduce a helper akin to `Jsii.isSameObject(a, b)` to enable + identity predicates to be used. Other helper functions may be necessary, too, such as one to obtain a "consistent" + object hash for instances in Java (so they can be safely used with `HashMap`, ...). + +??? example "Show test" + ##### Reference Implementation + + ```ts + // GIVEN + export abstract class PartiallyInitializedThisConsumer { + public abstract consumePartiallyInitializedThis(obj: ConstructorPassesThisOut): void; + } + export class ConstructorPassesThisOut { + public constructor(consumer: PartiallyInitializedThisConsumer) { + consumer.consumePartiallyInitializedThis(this); + } + } + + // WHEN + class MyConsumer extends PartiallyInitializedThisConsumer { + public obj?: ConstructorPassesThisOut = null; + + public consumePartiallyInitializedThis(obj: ConstructorPassesThisOut) { + this.obj = obj; + } + } + const consumer = new MyConsumer(); + const object = new ConstructorPassesThisOut(consumer); + + // THEN + expect(consumer.obj).toBe(object); + ``` + + ##### Kernel Trace + + ``` + # < {"hello":"@jsii/runtime@..."} + # > {"api":"load","name":"...","version":"...","tarball":"..."} + # < {"ok":{"assembly":"...","types":2}} + + > {"api":"create","fqn":"test.PartiallyInitializedThisConsumer","args":[],"overrides":[{"method":"consumePartiallyInitializedThis"}],"interfaces":[]} + < {"ok":{"$jsii.byref":"test.PartiallyInitializedThisConsumer@10000"}} + > {"api":"create","fqn":"test.ConstructorPassesThisOut","args":[{"$jsii.byref":"test.PartiallyInitializedThisConsumer@10000","$jsii.interfaces":[]}],"overrides":[],"interfaces":[]} + < {"callback":{"cbid":"jsii::callback::20000","invoke":{"objref":{"$jsii.byref":"test.PartiallyInitializedThisConsumer@10000"},"method":"consumePartiallyInitializedThis","args":[{"$jsii.byref":"test.ConstructorPassesThisOut@10001"}]}}} + > {"complete":{"api":"complete","cbid":"jsii::callback::20000"}} + < {"ok":{"$jsii.byref":"test.ConstructorPassesThisOut@10001"}} + ``` + +### Interfaces + +Tests in this section ensure correct behavior of _behavioral interfaces_. + +#### Host app can implement an interface "from scratch" + +It is possible for a "pure" host interface implementation to be passed across the language boundary, it's methods and +properties can be used by **JavaScript** code within the Kernel process. + +!!! bug + The .NET Runtime currently requires that pure interfaces implementations extend from + `Amazon.JSII.Rutime.Deputy.DepytyBase`. + +!!! bug + The Python Runtime currently expects a somewhat un-pythonic way to implement interfaces, which requires decorating + the implementing class with `@jsii.implements("implemented-type.JsiiInterfaceFQN")`. + +??? example "Show test" + ##### Reference Implementation + + ```ts + // GIVEN + export interface IBehavioralInterface { + methodCall(): string; + readonly property: number; + } + export class InterfaceConsumer { + constructor(private readonly iface: IBehavioralInterface) {} + + public composeResult() { + return `${this.iface.methodCall()} / ${this.iface.property}`; + } + } + + // WHEN + class Implementation implements IBehavioralInterface { + public readonly property = 1337; + public methodCall() { + return 'Hello!'; + } + } + const impl = new Implementation(); + const consumer = new InterfaceConsumer(impl); + + // THEN + expect(consumer.composeResult()).toBe('Hello! / 1337'); + ``` + + ##### Kernel Trace + + ``` + # < {"hello":"@jsii/runtime@..."} + # > {"api":"load","name":"...","version":"...","tarball":"..."} + # < {"ok":{"assembly":"...","types":2}} + + > {"api":"create","fqn":"Object","args":[],"overrides":[{"method":"methodCall"},{"property":"property"}],"interfaces":["test.IBehavioralInterface"]} + < {"ok":{"$jsii.byref":"Object@10000","$jsii.interfaces":["test.IBehavioralInterface"]}} + > {"api":"create","fqn":"test.InterfaceConsumer","args":[{"$jsii.byref":"Object@10000","$jsii.interfaces":[]}],"overrides":[],"interfaces":[]} + < {"ok":{"$jsii.byref":"test.InterfaceConsumer@10001"}} + > {"api":"invoke","objref":{"$jsii.byref":"test.InterfaceConsumer@10001"},"method":"composeResult","args":[]} + < {"callback":{"cbid":"jsii::callback::20000","invoke":{"objref":{"$jsii.byref":"Object@10000","$jsii.interfaces":["test.IBehavioralInterface"]},"method":"methodCall","args":[]}}} + > {"complete":{"api":"complete","cbid":"jsii::callback::20000","result":"Hello!"}} + < {"callback":{"cbid":"jsii::callback::20001","get":{"objref":{"$jsii.byref":"Object@10000","$jsii.interfaces":["test.IBehavioralInterface"]},"property":"property"}}} + > {"complete":{"api":"complete","cbid":"jsii::callback::20001","result":1337.0}} + < {"ok":{"result":"Hello! / 1337"}} + ``` + +### Structs & Keyword Arguments + +#### Ambiguous arguments are handled correctly + +When a method accepts both a positional parameter named `foo` and a struct parameter with a property named `foo`, the +respective values are passed in the correct parameter location when calling into the **JavaScript** code. + +??? example "Show test" + ##### Reference Implementation + + ```ts + // GIVEN + export interface StructType { + readonly foo: string; + } + export class ClassType { + public constructor(public readonly foo: number, public readonly opts: StructType) {} + } + + // WHEN + var result = new ClassType('Bazinga!', { foo: 1337 }); + + // THEN + expect(typeof result.foo).toBe(1337); + expect(typeof result.opts.foo).toBe('Bazinga!'); + ``` + + ##### Kernel Trace + + ``` + # < {"hello":"@jsii/runtime@..."} + # > {"api":"load","name":"...","version":"...","tarball":"..."} + # < {"ok":{"assembly":"...","types":2}} + + > {"api":"create","fqn":"test.ClassType","args":[1337.0,{"$jsii.struct":{"fqn":"test.StructType","data":{"foo":"Bazinga!"}}}],"overrides":[],"interfaces":[]} + < {"ok":{"$jsii.byref":"test.ClassType@10000"}} + > {"api":"get","objref":{"$jsii.byref":"test.ClassType@10000"},"property":"foo"} + < {"ok":{"value":1337}} + > {"api":"get","objref":{"$jsii.byref":"test.ClassType@10000"},"property":"opts"} + < {"ok":{"value":{"$jsii.byref":"Object@10001","$jsii.interfaces":["test.StructType"]}}} + > {"api":"get","objref":{"$jsii.byref":"Object@10001"},"property":"foo"} + < {"ok":{"value":"Bazinga!"}} + ``` + +### Collections + +Tests in this section ensure correct behavior of collections (`List` and `Map`). + +#### Struct elements of `List` are deserialized to the correct apparent type + +When the declared element type of a `List` is a _struct_, the resulting list must contain elements of the correct static +type. This is a requirement for statically typed languages such as Java where type parameters are reified. + +??? example "Show test" + ##### Reference Implementation + + ```ts + // GIVEN + export interface StructType { + readonly property: string; + } + export class StructProvider { + public static provide(): StructType[] { + return [{ property: 'value' }]; + } + } + + // WHEN + const items = StructProvider.provide(); + + // THEN + expect(items.length).toBeGreaterThan(0); + for (const item of items) { + expect(item instanceof StructType).toBeTruthy(); + } + ``` + + ##### Kernel Trace + + ``` + # < {"hello":"@jsii/runtime@..."} + # > {"api":"load","name":"...","version":"...","tarball":"..."} + # < {"ok":{"assembly":"...","types":2}} + + > {"api":"sinvoke","fqn":"test.StructProvider","method":"provide","args":[]} + < {"ok":{"result":[{"$jsii.byref":"Object@10000","$jsii.interfaces":["test.StructType"]}]}} + ``` + +#### Struct elements of `Map` are deserialized to the correct apparent type + +When the declared element type of a `Map` is a _struct_, the resulting list must contain elements of the correct static +type. This is a requirement for statically typed languages such as Java where type parameters are reified. + +??? example "Show test" + ##### Reference Implementation + + ```ts + // GIVEN + export interface StructType { + readonly property: string; + } + export class StructProvider { + public static provide(): { [key: string]: StructType } { + return { foo: { property: 'value' } }; + } + } + + // WHEN + const items = StructProvider.provide(); + + // THEN + expect(items.length).toBeGreaterThan(0); + for (const item of Object.values(items)) { + expect(item instanceof StructType).toBeTruthy(); + } + ``` + + ##### Kernel Trace + + ``` + # < {"hello":"@jsii/runtime@..."} + # > {"api":"load","name":"...","version":"...","tarball":"..."} + # < {"ok":{"assembly":"...","types":2}} + + > {"api":"sinvoke","fqn":"test.StructProvider","method":"provide","args":[]} + < {"ok":{"result":{"$jsii.map":{"foo":{"$jsii.byref":"Object@10000","$jsii.interfaces":["test.StructType"]}}}}} + ``` diff --git a/gh-pages/content/specification/5-new-language-intake.md b/gh-pages/content/specification/5-new-language-intake.md new file mode 100644 index 0000000000..52c970a17a --- /dev/null +++ b/gh-pages/content/specification/5-new-language-intake.md @@ -0,0 +1,118 @@ +# New Language Intake + +This document outlines the process to be followed when introducing a new _jsii_ target language, including an estimated +timeline (the exact timeline may vary significantly depending on the specifics of the language being added). + +The estimated total duration for the process is 4 to 6 months. + +## Planning + +**:alarm_clock: Estimated Duration:** 2 weeks + +The first step is to study the _jsii_ specification, as well as existing language implementations, in order to have the +knowledge necessary to write a new language support proposal [RFC]. The [RFC] document produced will evolve and be +polished as development of the new language support progresses, but the following elements must be present before any +implementation begins: + +- Identification of the language's standard package repository +- Proposal for the binding's configuration block +- Sample API representations in the proposed language + - In particular, any element from the _jsii_ type model that does not naturally map into the proposed new language + needs to be represented + - Where several options exist, links to prior art are instrumental to validate the direction chosen +- Toolchain and platform requirements + +[rfc]: https://github.com/awslabs/aws-cdk-rfcs#readme + +## Code Generation (`jsii-pacmak`) + +**:alarm_clock: Estimated Duration:** 4 to 6 weeks + +The necessary code must be added to [`jsii-pacmak`] in order to map the _jsii_ assembly's declared types into the +proposed language. While this code ought to leverage the new language's _host_ runtime library, we begin with writing +the code generator in order to ensure the appropriate developer experience is achieved in the new language before +writing the back-end components. + +Code generators are authored in **TypeScript**. + +The necessary reserved words need to be registered in the `jsii` compiler, so that warnings are produced when +identifiers are used in **TypeScript** code that require slugification or escaping in the target language (and will +hence cause a degraded developer experience). + +[`jsii-pacmak`]: https://github.com/aws/jsii/tree/main/packages/jsii-pacmak + +## Runtime Library + +**:alarm_clock: Estimated Duration:** 4 to 6 weeks + +Now that the appropriate developer experience has been identified, the _host_ runtime library supporting the generated +code can be written. This component must be written in the new language. + +!!! bug "Unimplemented" + A reference architecture for _host_ runtime libraries is to be developed, in order to ensure consistent naming and + behavior across all the runtimes, reducing the cost of maintaining many of those. + +## Building & Packaging + +**:alarm_clock: Estimated Duration:** 2 weeks + +Once code is generated and it has a _host_ runtime library to rely on, [`jsii-pacmak`] needs to receive the additional +logic required to compile and package the generated libraries as required, producing ready-to-publish artifacts. + +The necessary toolchain needs to be added to the [`jsii/superchain`] _Docker_ image, so that `jsii` customers can rely +on this to build artifacts for any of the supported languages. + +In addition to this, standardized _Amazon CodePipeline_ actions need to be developed in order to support publishing to +the relevant idiomatic package managers. + +[`jsii/superchain`]: https://github.com/aws/jsii/tree/main/superchain + +## Compliance Tests + +**:alarm_clock: Estimated Duration:** 6 weeks + +The full standard compliance suite must be implemented for the new language. Leveraging the new code generator, _host_ +runtime library and compilation logic, the tests demonstrate that the new library behaves consistently with all other +language bindings. + +While it is possible to declare _developer preview_ on a new language before all the tests pass, full compliance is a +pre-requisite to declaring _general availability_ of the new language. + +## Documentation + +**:alarm_clock: Estimated Duration:** 1 week + +The necessary documentation needs to be provided to support customers who want to onboard the new language. This also +includes updating [`jsii-config`] with support for the new languages' configuration block. + +[`jsii-config`]: https://github.com/aws/jsii/tree/main/packages/jsii-config + +## Developer Preview + +**:alarm_clock: Recommended Duration:** 4 to 8 weeks + +It is possible to declare _Developer Preview_ for a new language support as soon as the code generation and _host_ +runtime library are mature enough to be useful, and cover the majority of use-cases. While certain edge-cases may still +be uncovered at the beginning of _Developer Preview_, a clear plan should exist that ensures a path exists to address +any known gaps. It is required to have implemented most of the standard compliance suite prior to declaring _Developer +Preview_. + +During the _Developer Preview_ phase, user experience studies should be conducted to validate assumptions made during +the code generator's design. If any significant change is dictated by the results of the user experience studies, +fluback studies should be performed in order to confirm that the desired impact has been achieved. + +!!! bug "Unimplemented" + A standard set of user experience study tasks will be developed, ensuring the learnings from previous experiences is + factored into subsequent studies conducted. + +Finally, it is essential to give time to the community to use and vet the new language support prior to considering +_General Availability_. A minimum of a full month without a major bug reported is advised. During this period, +intentional hands-on usage of the product msut be performed by engineers familiar with the new language as well as +engineers unfamilar with it. This ensures the new experience is considered holistically, in a manner unbiased by +knowledge of the implementation. + +## General Availability + +Once the new language support has been _Developer Preview_ for long enough and the engineers involved have gained +confidence that the API is stable, covers all known use-cases reliably, and behaves consistently with other _Generally +Available_ languages, the new support can be considered for _General Availability_. diff --git a/gh-pages/content/user-guides/.pages.yml b/gh-pages/content/user-guides/.pages.yml new file mode 100644 index 0000000000..c610174c03 --- /dev/null +++ b/gh-pages/content/user-guides/.pages.yml @@ -0,0 +1,6 @@ +--- +nav: + - index.md + - lib-author + - lib-user + - language-support diff --git a/gh-pages/content/user-guides/index.md b/gh-pages/content/user-guides/index.md new file mode 100644 index 0000000000..b27689ab17 --- /dev/null +++ b/gh-pages/content/user-guides/index.md @@ -0,0 +1,31 @@ +# Introduction + +This section of the *jsii reference* contains user-guides for different +audiences. The below sections provide an overview of each section. + +## Library author guide + +The [library author guide](./lib-author) provides information to developers who +want to use the [jsii toolchain] to author libraries that will be usable from +all supported programming languages. + +It contains important information on [TypeScript restrictions], as well as the +language binding [configuration reference]. + + +## Library consumer guide + +The [library consumer guide](./lib-user) provides specific information +intended for developers leveraging libraries generated by the [jsii toolchain]. +In particular, it provides guidance for how to correctly use those libraries, in +cases where the generated bindings are somewhat non-idiomatic. + +## Language implementation guide + +The [language implementation guide](./language-support) provides +information to developers who are interested in contributing support for a new +language in the [jsii toolchain]. + +[TypeScript restrictions]: ./lib-author/typescript-restrictions.md +[configuration reference]: ./lib-author/configuration +[jsii toolchain]: ../overview/toolchain.md diff --git a/gh-pages/content/user-guides/language-support/.pages.yml b/gh-pages/content/user-guides/language-support/.pages.yml new file mode 100644 index 0000000000..1016546c6b --- /dev/null +++ b/gh-pages/content/user-guides/language-support/.pages.yml @@ -0,0 +1,6 @@ +--- +title: Language Implementation +nav: + - index.md + - .jsii Assemblies: assembly.md + - callbacks.md diff --git a/gh-pages/content/user-guides/language-support/assembly.md b/gh-pages/content/user-guides/language-support/assembly.md new file mode 100644 index 0000000000..08f8e57ae7 --- /dev/null +++ b/gh-pages/content/user-guides/language-support/assembly.md @@ -0,0 +1,174 @@ +# `.jsii` Assemblies + +This document describes the contents of the `.jsii` assembly documents generated by the `jsii` compiler, and explains +the semantics behind the various entities it represents. This serves as a reference for front-end language implementors. + +## Schema + +`.jsii` assemblies are JSON-formatted documents. The specification is hosted under the [`jsii-spec`][jsii-spec] package. +Refer to the inline documentation in the [`spec.ts`][spec.ts] file for more information about the general content of the +assembly documents. + +The most important part of the assembly documentation, which is described in detail in this document, is the `types` +map, which contains the descriptions of all types declared by the `.jsii` assembly. It is a map from `jsii` fully- +qualified type names to a type specification. + +All `boolean` attributes in the document specification are optional, and are left out (`undefined`) when `false`. + +[jsii-spec]: https://github.com/aws/jsii/tree/main/packages/jsii-spec +[spec.ts]: https://github.com/aws/jsii/tree/main/packages/jsii-spec/lib/spec.ts + +### Common Attributes + +Certain optional attributes are shared by API entities (types and members): + +- `docs` - documentation attached to the API entity + - `deprecated` - contains a message explaining why an API was deprecated and/or how users should migrate away + - `stability` - the stability level of the API entity. The ultimate meaning of the stability level is up to the + package maintainer, but a baseline interpretation of the valid values follows: + - `experimental` denotes an API that is actively worked on and are not subject to semantic versioning gurantees + (they may receive breaking change on a _minor_ version release) + - `stable` denotes an API that is safe to use in production systems and are subject ot semantic versioning + guarantees (they may not receive breaking changes without a _major_ version bump) + - `deprecated` denotes an API that should no longer be used. The `deprecated` entry in the `docs` object should + contain a message explaining how users should migrate away + - `external` denotes an API that is not owned by the package's maintainer and may change in unexpected ways. Such + APIs are usually derived from external artifacts, which the package maintainers do not have control over. + - additional entries represent user-defined `JSDoc` tags with meaning defined by convention and/or the package + maintainer +- `locationInModule` - coordinates of the declaration in the source + - `fileName` - the path to the source file, relative to the package root + - `line` - the line number on which the entity is declared (or the first line when a declaration spans multiple lines) + +### Types + +#### Classes + +| Attribute | Type | Description | +| ------------- | ------------- | ----------------------------------------------------------------- | +| `kind` | `'class'` | Discriminator to identify classes | +| `abstract` | `boolean` | Whether this class is _abstract_ | +| `assembly` | `string` | The name of the assembly this class is a part of | +| `base` | `string` | The fully-qualified name of the parent class of this class | +| `fqn` | `string` | The fully-qualified name of the class | +| `initializer` | `Constructor` | The class' [constructor] | +| `interfaces` | `string[]` | The fully-qualified names of interfaces implemented by this class | +| `methods` | `Method[]` | The [methods] declared by this class | +| `name` | `string` | The simple name of the class | +| `properties` | `Property[]` | The [properties] declared by this class | + +[constructor]: #constructors +[interfaces]: #interfaces +[methods]: #methods +[properties]: #properties + +#### Interfaces + +`jsii` interfaces are declarations of type signatures that can be implemented by classes. _Interface_ names must be +prefixed with an `I` (e.g: `IFoo`). + +| Attribute | Type | Description | +| ------------ | ------------- | ------------------------------------------------------------------ | +| `kind` | `'interface'` | Discriminator to identify interfaces | +| `assembly` | `string` | The name of the assembly this interface is a part of | +| `fqn` | `string` | The fully-qualified name of the interface | +| `interfaces` | `string[]` | The fully-qualified names of interfaces extended by this interface | +| `methods` | `Method[]` | The [methods] declared by this interface | +| `name` | `string` | The simple name of the interface | +| `properties` | `Property[]` | The [properties] declared by this interface | + +#### Structs (a.k.a. Data Types) + +_Structs_ (or _Data Types_) are immutable, data-only interfaces: + +- They declare no methods +- All [properties] they declare are `readonly` +- They can only implement other _structs_ +- They cannot be extended by interfaces that are not _structs_ +- They cannot be implemented by _classes_ + +Unlike regular _interfaces_, `jsii` _struct_ names are not required to have any particular prefix. + +Since those are immutable, pure data objects, the `jsii-runtime` exchanges instances of those _by value_, instead of _by +reference_, allowing to save cross-language communication overhead when working with the data. + +| Attribute | Type | Description | +| ------------ | ------------- | --------------------------------------------------------------- | +| `kind` | `'interface'` | Discriminator to identify interfaces | +| `datatype` | `true` | Indicates a _struct_ / _data type_ declaration | +| `assembly` | `string` | The name of the assembly this struct is a part of | +| `fqn` | `string` | The fully-qualified name of the struct | +| `interfaces` | `string[]` | The fully-qualified names of _struct_ extended by this _struct_ | +| `name` | `string` | The simple name of the struct | +| `properties` | `Property[]` | The [properties] declared by this struct (all `readonly`) | + +#### Enums + +| Attribute | Type | Description | +| ---------- | -------------- | ----------------------------------------------- | +| `kind` | `'enum'` | Discriminator to identify enums | +| `assembly` | `string` | The name of the assembly this enum is a part of | +| `fqn` | `string` | The fully-qualified name of the enum | +| `members` | `EnumMember[]` | The [enum members] declared by this enum | +| `name` | `string` | The simple name of the enum | + +[enum members]: #enum-members + +### Members + +#### Constructors + +| Attribute | Type | Description | +| ------------ | ------------- | ---------------------------------------------------------------------------------------- | +| `overrides` | `string` | The fully-qualified name of the class/interface that declares the overridden constructor | +| `parameters` | `Parameter[]` | Parameters of this constructor | +| `protected` | `boolean` | Whether this constructor is protected | +| `variadic` | `boolean` | Whether the last parameter is `variadic` | + +#### Enum Members + +| Attribute | Type | Description | +| --------- | -------- | -------------------------------------------------------- | +| `name` | `string` | The name of the enum member. Must be `UPPER_SNAKE_CASED` | + +#### Methods + +| Attribute | Type | Description | +| ------------ | --------------- | ----------------------------------------------------------------------------------- | +| `abstract` | `boolean` | Whether this method is `abstract` | +| `async` | `boolean` | Whether this method is asynchronous | +| `name` | `string` | The name of the method | +| `overrides` | `string` | The fully-qualified name of the class/interface that declares the overridden method | +| `parameters` | `Parameter[]` | Parameters of this method | +| `protected` | `boolean` | Whether this method is protected | +| `returns` | `OptionalValue` | The return type of the method | +| `static` | `boolean` | Whether this method is `static` | +| `variadic` | `boolean` | Whether the last parameter is `variadic` | + +Methods with the `abstract` feature may only be members of `abstract` classes or [interfaces], and all methods that are +members of [interfaces] must be `abstract`. + +Methods that are `static` cannot feature the `overrides` attribute, as `static` members are not inherited. + +#### Properties + +| Attribute | Type | Description | +| ----------- | --------------- | ------------------------------------------------------------------------------------- | +| `abstract` | `boolean` | Whether this property is `abstract` | +| `const` | `boolean` | Whether this property is a constant (implies `static` and `immutable`) | +| `immutable` | `boolean` | Whether this property is immutable | +| `name` | `string` | The name of the property | +| `optional` | `boolean` | Whether this property is optional | +| `overrides` | `string` | The fully-qualified name of the class/interface that declares the overridden property | +| `protected` | `boolean` | Whether this constructor is protected | +| `static` | `boolean` | Whether this property is `static` | +| `type` | `TypeReference` | The type of the property | + +Properties that are `const` must have a `name` that is `UPPER_SNAKE_CASED`. They represent constants similar to [Enum +Members], which can be proactively resolved by the `jsii` runtimes. + +!!! danger + Properties and methods that are `static` **can** feature the `overrides` attribute, as `static` members are + inherited with the prototype in **JavaScript** (as part of the ES6 specification). Not all target languages have + this capability (most, like **C#** and **Java**, only support *hiding* static declarations), and consequently code + generators may ignore this (or explicitly hide parent declarations) instead. diff --git a/gh-pages/content/user-guides/language-support/callbacks.md b/gh-pages/content/user-guides/language-support/callbacks.md new file mode 100644 index 0000000000..e194bd8b35 --- /dev/null +++ b/gh-pages/content/user-guides/language-support/callbacks.md @@ -0,0 +1,157 @@ +--- +last_revision: 2020-10-14T10:25:00Z +--- + +# Callbacks and Overrides + +This document provides a high-level overview of the mechanisms used by _jsii_ to allow _foreign_ code to override +**JavaScript** methods. It details the responsibilities of the _jsii kernel_ and of the _foreign library_, and provides +implementation guidelines. + +## Identifying Overrides + +The _jsii kernel_ allows _foreign_ code to register overrides for the following use-cases: + +- Overriding a class' non-static member +- Implementing an abstract member (including interface members) + +!!! info + It is possible for _foreign_ code to override a class' constructor, but those cannot be registered in the _jsii + kernel_ as it cannot trigger instantiation of a _foreign_ class directly. _Foreign_ constructors always delegate to + the **JavaScript** constructor, which is happens via the [`create`][kernel.create] operation, during which overrides + are registered. + +All cases where _foreign_ code should be executed in lieu of **JavaScript** code must be identified and declared +properly, as the _jsii kernel_ otherwise has no way to determine a _foreign_ implementation exists. + +Where possible, the _jsii runtime library_ for the _foreign_ language will use reflection APIs to transparently discover +which API elements are overridden or implemented. In cases where reflection is expensive, the _jsii runtime library_ +will try to cache findings as appropriate in order to avoid duplication of this effort. + +In case the _foreign_ language does not have direct support for overriding (e.g: **Go**), or lacks the necessary +reflection tools to allow automatic identification of overrides, the _jsii runtime library_ may expose APIs allowing +users to register implementation overrides manually. + +## Declaring Overrides + +The foreign library is responsible for declaring overrides to the _jsii kernel_. Those are declared for every object +instance using the [`overrides`][kernel.create.overrides] property of the [`kernel.create` request][kernel.create]. Each +entry in the [`overrides`][kernel.create.overrides] list declares an overriden property or method. + +Each override declaration may optionally include a `cookie`: this string will not be interpreted by the _jsii kernel_ in +any way, and will simply be passed back passed back with any request to invoke the overridden member's foreign +implementation. + +!!! info + It is possible to register overrides to members that do not formally exist on a type. Since the _jsii kernel_ has no + type information available for those, it will handle them as follows: + + - Method overrides are assumed to have the following signature: + ```ts + overridden(...args: any[]): any + ``` + - Property overrides are assumed to be `any`-valued and mutable + + !!! danger + This should generally be avoided as it can result in incoherent data serialization happening when the _jsii + kernel_ receives and returns values. + +[kernel.create]: ../../specification/3-kernel-api.md#creating-objects +[kernel.create.overrides]: ../../specification/3-kernel-api.md#overrides + +## Invoking Overrides + +Once object instances have been created in the _jsii kernel_ with overrides, execution of **JavaScript** code may +require executing _foreign_ code. The _jsii kernel_ signals this to the _jsii runtime library_ by responding with a +[`callback` request][kernel.callback] instead of the typical response type for the original request (i.e: +`InvokeResponse`, `GetResponse` or `SetResponse`). Several such [callbacks][kernel.callback] may be necessary in order +to complete the original request. When the original request is finally able to complete, its response is returned. + +The _jsii runtime library_ must respond to each [`callback` request][kernel.callback] with a `complete` response, +allowing the _jsii kernel_ to resume fulfilling the original request. In order to do this, the _jsii runtime library_ +obtains the _foreign_ object corresponding to the [`callback` request][kernel.callback]'s receiver, then invokes the +corresponding implementation (for example, using reflection). + +When needed, the _original_ **JavaScript** implementation can be delegated to (many languages refer to this as +`super(...)` or some similar idiom). + +[kernel.callback]: ../../specification/3-kernel-api.md#a-note-about-callbacks + +### Example + +Assuming we have the following **TypeScript** types defined: + +```ts +export abstract class FooClass { + protected abstract baz: string; + + public bar(): string { + return this.reverse() ? Array.from(this.baz).reverse().join('') : this.baz; + } + + protected reverse(): boolean { + return false; + } +} +``` + +And we have the following _Foreign_ application (assuming **Java**): + +```java +public final class Main extends FooClass { + public static final void main(final String[] args) { + final FooClass self = new Main(); + System.out.println(self.bar()); + } + + @Override + public String getBaz() { + return "baz"; + } + + @Override + public boolean reverse() { + return true; + } +} +``` + +The schematized exchange between the _jsii runtime library_ and the _jsii kernem_ is the following: + + + +``` +โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”“ โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”“ +โ”ƒ Kernel โ”ƒ โ”ƒRuntime Libraryโ”ƒ +โ”—โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”› โ”—โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”› + โ”ƒ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”ƒ + โ”ƒโ—€โ”€โ”ค Create(FQN: "FooClass", Overrides=["baz", "reverse"]) โ”œโ”€โ”€โ”ƒ + โ”ƒ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”ƒ + โ”ƒ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”ƒ + โ”ƒโ”€โ”€โ”ค OK(ObjID: "Foo") โ”œโ”€โ–ถโ”ƒ + โ”ƒ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”ƒ + โ”ƒ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”ƒ + โ”ƒโ—€โ”€โ”ค InvokeRequest(ObjID: "Foo", Method: "bar") โ”œโ”€โ”€โ”ƒ + โ”ƒ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”ƒ + โ”ƒ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”ƒ + โ”ƒโ”€โ”€โ”ค CallbackRequest(ID: 1, ObjID: "Foo", Invoke: "reverse") โ”œโ”€โ–ถโ”ƒโ”€โ”€โ”€โ”€โ” + โ”ƒ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”ƒ โ”‚call + โ”ƒ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”ƒ โ”‚obj("Foo").reverse() + โ”ƒโ—€โ”€โ”ค Complete(CallbackID: 1, OK: true) โ”œโ”€โ”€โ”ƒโ—€โ”€โ”€โ”€โ”˜ + โ”ƒ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”ƒ + โ”ƒ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”ƒ + โ”ƒโ”€โ”€โ”ค CallbackRequest(ID: 2, ObjID: "Foo", Get: "baz") โ”œโ”€โ–ถโ”ƒโ”€โ”€โ”€โ”€โ” + โ”ƒ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”ƒ โ”‚get + โ”ƒ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”ƒ โ”‚obj("Foo").baz + โ”ƒโ—€โ”€โ”ค Complete(CallbackID: 2, OK: "baz") โ”œโ”€โ”€โ”ƒโ—€โ”€โ”€โ”€โ”˜ + โ”ƒ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”ƒ + โ”ƒ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”ƒ + โ”ƒโ”€โ”€โ”ค InvokeResponse(OK: "zab") โ”œโ”€โ–ถโ”ƒ + โ”ƒ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”ƒ + โ”ƒ โ”ƒ +``` + +## See Also + +- [The _jsii_ runtime architecture](../../overview/runtime-architecture.md) +- [The _jsii_ kernel API](../../specification/3-kernel-api.md) diff --git a/gh-pages/content/user-guides/language-support/callbacks.monopic b/gh-pages/content/user-guides/language-support/callbacks.monopic new file mode 100644 index 0000000000..c65915ae42 Binary files /dev/null and b/gh-pages/content/user-guides/language-support/callbacks.monopic differ diff --git a/gh-pages/content/user-guides/language-support/index.md b/gh-pages/content/user-guides/language-support/index.md new file mode 100644 index 0000000000..6bad2ebf33 --- /dev/null +++ b/gh-pages/content/user-guides/language-support/index.md @@ -0,0 +1,171 @@ +# Language Implementation + +This handbook provides an overview of the process that should be followed when looking to implement support for a new +programming language in _jsii_. It attempts to provide a step-by-step procedure, while drawing the reader's attention on +points that have been found to cause problems in the past. + +## Foreword + +Implementing a new language in _jsii_ is not just a matter of implementing code generation. Mapping the _[jsii type +system]_ to a new programming language means finding how to represent an API originally designed in TypeScript to a form +that is as idiomatic as possible in the new language. This is a craft that often requires trial and error, and the best +(if not only) way to validate a proposal is to put it in front of users and seek feedback. As a consequence, this +endeavor should be expected to span months, not weeks. + +## Scoping & Planning + +The first step of most successful projects is to start by scoping work out and establishing a baseline plan to execute +on. For contributors not yet familiar with _jsii_, the [specification] document is a great place to start. In +particular, the [New Language Intake] document provides a high-level view of the recommended process for implementing +new language support. + +The work of implementing support for a new language involves many different components: + +- The [`jsii`] compiler emits warnings when a language's reserved words are used to name types, methods or properties; + as this will later require slugification or escaping in the generated code - usually resulting in a degraded developer + experience. +- The [`jsii-pacmak`] tool includes code generators for all supported languages, and a new implementation must be + provided for the new language. +- Code generation usually requires specific configuration to be provided in order to be able to generate valid packages + (for example, the **Java** code generator requires a base java package to generate into, as well as a Maven group and + artifact ID for the package). The [`jsii-config`] tool needs to be updated with support generating a configuration + block with the required entries for the new code generator. +- [`jsii-rosetta`] tool translates **TypeScript** example code found in the original documentation into the new target + language. A new translation implementation needs to be added for the new language. +- Building and publishing infrastructure elements are provided by [`aws-delivlib`] to make it easier for _jsii_ users to + publish their libraries to all supported package registries. + +### Language Proposition RFC + +The recommended way to formalize the initial plan is to write it into an RFC hosted in the [CDK RFC repository]. Enough +time has to be spent considering the requirements in order to get the work scoped and planned well, ensuring smooth +execution. + +An additional benefit of following the RFC process is that it makes it easier to track learnings accumulated through the +implementation process, as those will be tracked as comments or iterations on the RFC document. + +It is possible (and sometimes desirable) to start prototyping code-generation for the new language, as this can +highlight implementation challenges that need to be discussed in the RFC document. In any case, examples of the API +signatures that are expected to be rendered allow early feedback to be provided by possible future users, and still +helps identify challenges. + +The following questions should be answered as early as possible in the process, to avoid surprises later on that result +in significant re-engineering effort: + +- What do the generated APIs look like, for the typical API idioms? + - _Classes_ (constructors, properties, methods, inheritance strategy, abstract members, ...) + - The [AWS CDK] (one of the main consumers of _jsii_) uses specific patterns to offer a better experience in many + programming languages. For example, constructor signatures where the last argument is a _jsii struct_ allows for + keyword argument lifting in **Python**, and convenient `Builder` APIs in **Java**. + - _Enums_ + - _Interfaces_ and _Structs_ (properties, methods, inheritance strategy, implementation, ...). In particular, how are + new optional properties handled (those are not considered breaking change within the [jsii type system]). + - _Structs_ (properties, inheritance strategy, implementation, ...) +- What information is needed in order for the code-generator to produce artifacts? What should the configuration block + look like? +- What is the standard way to publish packages for the new language? + - Are there any requirements (code signature, special metadata, ...) that need to be implemented in order to publish + valid packages? + - How are dependencies modeled? If [semantic versioning] is not the norm, what is the strategy to correctly represent + semantic version ranges? +- What are the toolchain and platform requirements? + - For example, **Java** requires an OpenJDK 8 distribution and `maven`, **Python** requires `python` 3.6 or above, + etc... + +## Code Generation + +First, implement a first version of the code generation for the new language before getting too far into the +_[host library](#host-library)_ implementation. This top-down approach ensures the requirements for the lower level +parts of the implementation are well-defined before they are implemented (reducing the chances that significant re-work +has to be done), and enables using the [Standard Compliance Suite] to ensure the overall implementation is _correct_ +according to the [specification] (since the code necessary to implement the test cases will be available right from the +start). + +This work happens within the [`jsii-pacmak`] package. + +Focus initially on the API signatures before getting into their implementation. The first version may even throw a _not +implemented_ exception when called. + +The [`jsii-calc`] package, can be used as a sample consuming library which uses _jsii_ to generate code in all target +languages. Start by making sure a decent API is generated from this package and its dependencies, and use those to +implement the tests from the [Standard Compliance Suite]. You'll also get a feeling for whether the generated code +achieves a good developer experience or not. + +## Host Library + +Now that we are generating "empty shell" APIs that represent the necessary entities to back the [Standard Compliance +Suite] tests, start implementing the _host library_ and update the code generator until all the tests pass. It is +possible to publish artifacts even when tests in the suite are failing. As soon as basic features are working, work on +[Building and Packaging](#building-and-packaging) can start, so early feedback can be gathered. + +!!! bug "Unimplemented" + A standard architecture for the _host library_ has not been documented yet. Upcoming language implementations should + contribute to this process by documenting a general architecture that should be implementable in any programming + languages (and thus, abstracting away language specificities). + +## Building & Packaging + +The necessary toolchains should be added to he [`jsii/superchain`] Docker image, so that the [`jsii-pacmak`] generation +can be changed to support building ready to publish artifacts instead of just code. + +Before publishing any artifacts, ensure all packages (the _host library_ as well as generated artifacts) are designated +as _experimental_ (e.g: **Python** packages were annotated with the `Development Status :: 4 - Beta` trove classifier on +PyPI, and **NuGet** packages were published with a pre-release version such as `1.2.3-pre`). + +Additionally, [`aws-delivlib`] needs to be augmented to support publishing artifacts to the language's package +repository. + +!!! bug "Unimplemented" + The package publishing is being extracted from [`aws-delivlib`] into a standalone library, currently hosted at + [`eladb/jsii-release`](https://github.com/eladb/jsii-release). + +## Documentation + +Before releasing the new language support to _Developer Preview_, basic documentation needs to be produced to explain +how to configure a _jsii_ project to support the new language, and any peculiarities in working with libraries generated +by [`jsii-pacmak`] for this language. + +Support for example code translation should also be built into [`jsii-rosetta`]. + +## Developer Preview + +Once the full [Standard Compliance Suite] passes (possibly with the exception of certain fringy features), and the +documentation covering all aspects of using the language bindings have been produced, the new language can be released +to _Developer Preview_. + +It is recommended that new languages stay in _Developer Preview_ for a minimum of 4 weeks, ideally until they have +received sufficient usage to have built confidence that there are no major usability concerns: once out of _Developer +Preview_, it will no longer be possible to introduce breaking changes to the generated code in order to address +usability issues or bugs. + +In order to improve the chances of catching usability issues, focused user experience studies will be conducted with an +audience composed of developers with varied degrees of experience with the new language. + +!!! bug "Unimplemented" + A user experience template will be provided to ensure coverage of critical aspects of the experience. Any critical + user experience issue (for example, issues that required breaking changes to the generated code) discovered but not + covered in the template should be added to the template so that subsequent language implementations do not fall to + the same problem. + +## General Availability + +Once the new language has been in _Developer Preview_ without any significant usability issues or bugs for a sufficient +amount of time and is used in real-world use-cases such as for [AWS CDK] applications, it becomes a candidate to be +declared _Generally Available_. At this point, breaking changes are no longer possible on the generated code. + + + +[jsii type system]: ../../specification/2-type-system.md +[specification]: ../../specification/1-introduction.md +[new language intake]: ../../specification/5-new-language-intake.md +[cdk rfc repository]: https://github.com/awslabs/aws-cdk-rfcs#readme +[`jsii`]: ../../packages/jsii +[`jsii-calc`]: ../../packages/jsii-calc +[`jsii-config`]: ../../packages/jsii-config +[`jsii-pacmak`]: ../../packages/jsii-pacmak +[`jsii-rosetta`]: ../../packages/jsii-rosetta +[standard compliance suite]: ../../specification/4-standard-compliance-suite.md +[`jsii/superchain`]: ../../superchain +[`aws-delivlib`]: https://github.com/awslabs/aws-delivlib +[aws cdk]: https://github.com/aws/aws-cdk +[semantic versioning]: https://semver.org diff --git a/gh-pages/content/user-guides/lib-author/.pages.yml b/gh-pages/content/user-guides/lib-author/.pages.yml new file mode 100644 index 0000000000..50a3e1cb10 --- /dev/null +++ b/gh-pages/content/user-guides/lib-author/.pages.yml @@ -0,0 +1,8 @@ +--- +title: Library Author Guide +nav: + - index.md + - quick-start + - typescript-restrictions.md + - configuration + - toolchain diff --git a/gh-pages/content/user-guides/lib-author/configuration/.pages.yml b/gh-pages/content/user-guides/lib-author/configuration/.pages.yml new file mode 100644 index 0000000000..c9ede6f27a --- /dev/null +++ b/gh-pages/content/user-guides/lib-author/configuration/.pages.yml @@ -0,0 +1,7 @@ +--- +title: Configuration Reference +nav: + - .NET: dotnet.md + - Go: go.md + - Java: java.md + - Python: python.md diff --git a/gh-pages/content/user-guides/lib-author/configuration/index.md b/gh-pages/content/user-guides/lib-author/configuration/index.md new file mode 100644 index 0000000000..0fd93d4d21 --- /dev/null +++ b/gh-pages/content/user-guides/lib-author/configuration/index.md @@ -0,0 +1,228 @@ +# Overview + +The configuration for `jsii` is recorded in the `package.json` file, which is the standard package manifest for NPM +packages. This document describes the constraints and extensions `jsii` adds to the [package.json schema]. + +[package.json schema]: https://docs.npmjs.com/files/package.json + +## jsii-config + +Use [jsii-config](https://github.com/aws/jsii/tree/main/packages/jsii-config) to aid in configuring a new jsii module. + +## Additional Requirements & Extensions + +In order to be able to generate valid packages for all the supported target package managers, certain fields that are +optional in the standard [package.json schema] are required by `jsii`. + +For example, Maven Central requires packages to carry [sufficient metadata], such as _developer information_ and +_license_, in order to be valid for publishing. + +| Field | Required | Extensions | +| ------------ |:-------------------------------:| -------------------------------- | +| `author` | :octicons-check-circle-fill-24: | `author.organization` | +| `license` | :octicons-check-circle-fill-24: | | +| `main` | :octicons-check-circle-fill-24: | | +| `repository` | :octicons-check-circle-fill-24: | | +| `stability` | | The field itself is an extension | +| `types` | :octicons-check-circle-fill-24: | | + +[sufficient metadata]: https://central.sonatype.org/pages/requirements.html#sufficient-metadata + +### Attribution & Licensing + +- The [`author`][npm-author] field must be set. Although the string form + (`"The Octocat (https://github.com/octocat)"`) works, it is recommended to set the value using + the `object` format: + ```js + { + // ... + "author": { + "name": "The Octocat", // Required + "email": "octocat@github.com", // Optional + "url": "https://github.com/octocat", // Optional + "organization": false // Optional (defaults to false) + }, + // ... + } + ``` + The `organization` field is an extension from the [package.json schema] that can be used to signal the `author` field + refers to an `organization` and not and individual person. +- The [`license`][npm-license] field must be set to a valid [SPDX license id]. If you do not intend to release your + package for third-party consumption, `UNLICENSED` (not to be confused with `Unlicense`) is a valid option. + +[npm-author]: https://docs.npmjs.com/files/package.json#people-fields-author-contributors +[npm-license]: https://docs.npmjs.com/files/package.json#license +[spdx license id]: https://spdx.org/licenses/ + +### Source Control Information + +The [`repository`][npm-repository] field must be set to the URL of the source-control system (such as a `git` +repository) for the package. The recommended way to provide the value is using the `object` representation: + +```js +{ + "repository": { + "url": "https://github.com/aws/jsii.git", // Required + "type": "git", // Recommended + "directory": "/path" // Optional + } +} +``` + +[npm-repository]: https://docs.npmjs.com/files/package.json#repository + +### Library Entry Point + +Both the [`main`][npm-main] field must be set to the `.js` file that acts as the entry point of your library (what +node's `require('library-name')` will load). Additionally, `TypeScript`'s [`types`][ts-types] field must be set to the +`.d.ts` file corresponding to the `main` file. The assembly emitted by `jsii` will only represent types that are +exported from the `types` file. + +[npm-main]: https://docs.npmjs.com/files/package.json#main +[ts-types]: + https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html#including-declarations-in-your-npm-package + +### Package-level API Stability + +The [`.jsii` assembly document](../../language-support/assembly.md) allows representing API stability levels on +individual API elements. The default value set for API elements for which a stability declaration is not found can be +configured using the `stability` field of the `package.json` file. It can be set to one of the following values: +`experimental`, `stable`, `deprecated` and `external`. While the exact semantic value of those fields is defined by the +package maintainer, the generic interpretation for those on packages is: + +- `experimental` - the package is not yet ready for production usage, as it is still in the early stages of its + development. +- `stable` - the package is ready for production and its APIs should be expected to adhere to [semantic versioning]. +- `deprecated` - the package should no longer be used and may no longer be maintained. It is a good practice to set the + `deprecated` field in `package.json` with an explanation of how consumers of the package should update their + dependencies. +- `external` - the package includes APIs that are derived from external artifacts, and the owners of those artifacts + control their stability. + +## The `jsii` section + +In order to configure the behavior of `jsii`, the `package.json` file must include a `jsii` section that can contain the +following entries: + +| Field | Type | Required | Default | +| ------------------- | ----------------------- |:-------------------------------:| ------------------------------------ | +| `excludeTypescript` | `#!ts string[]` | | _none_ | +| `metadata` | `#!ts object` | | _none_ | +| `projectReferences` | `#!ts boolean` | | `#!ts true` | +| `targets` | `#!ts object` | :octicons-check-circle-fill-24: | | +| `tsc` | `#!ts object` | | `#!ts { outDir: '.', rootDir: '.' }` | +| `versionFormat` | `#!ts 'short' | 'full'` | | `#!ts 'full'` | + +### `excludeTypescript` + +By default, `jsii` will include _all_ `*.ts` files (except `.d.ts` files) in the `TypeScript` compiler input. This can +be problematic for example when the package's build or test procedure generates `.ts` files that cannot be compiled with +`jsii`'s compiler settings. + +The `excludeTypescript` configuration accepts a list of glob patterns. Files matching any of those patterns will be +excluded from the `TypeScript` compiler input. + +### `metadata` + +The `metadata` section can be used to record additional metadata as key-value pairs that will be recorded as-is into the +`.jsii` assembly file. That metadata can later be inspected using [`jsii-reflect`][jsii-reflect] utilities, for example. + +[jsii-reflect]: https://github.com/aws/jsii/tree/main/packages/jsii-reflect + +### `targets` + +The `targets` section is where `jsii` packages define which target languages they support. This provides the package +generators with the additional information they require in order to name generated artifacts. Configuration is provided +as a mapping from target name to a configuration object. + +The specific configuration accepted for each supported language is presented in dedicated pages: + +- [:octicons-book-24: .NET Target](targets/dotnet.md) +- [:octicons-book-24: Go Target](targets/go.md) +- [:octicons-book-24: Java Target](targets/java.md) +- [:octicons-book-24: Python Target](targets/python.md) + +### `tsc` + +In order to the generated `javascript` can be properly loaded by the `jsii` runtimes, `jsii` generates a +[`tsconfig.json`] file with fixed settings at the beginning of the compilation pass. Certain configuration options can +however be set by the maintainers in order to better suit their development workflow or processes. Those configuration +are set in the `jsii.tsc` section of the `package.json` file, but use the same name as [`tsconfig.json`]: + +- `outDir` - path to the directory when artifacts generated by the `TypeScript` compiler will be placed. + - This influences the location of `.d.ts` and `.js` files, but will not affect the location of the `.jsii` file, which + will _always_ be placed at the package's root. +- `rootDir` - specifies the root directory that contains all of the `.ts` source files. This is used in conjunction with + `outDir`, to control the directory structure that gets generated. + +Refer to the [TypeScript compiler options reference][ts-options] for more information about those options. + +[`tsconfig.json`]: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html +[ts-options]: https://www.typescriptlang.org/docs/handbook/compiler-options.html + +### `versionFormat` + +Determines the format of the `jsii` toolchain version string that will be included in the `.jsii` assembly file's +`jsiiVersion` attribute. + +- `full` (the default) - a version number including a commit hash will be used + - For example: `0.14.3 (build 1b1062d)` +- `short` - only the version number of `jsii` will be used + - For example: `0.14.3` + +This option is primarily useful for developing regression tests when developing `jsii` itself, as using the `short` +format reduces volatility in the assemblies generated by development versions of `jsii`. Users of `jsii` are advised to +leave the default setting, as having full version information can be essential when trying to troubleshoot assembly +generation problems. + +### Diagnostics + +JSII produces a number of diagnostic information. These have been categorized into "error", "warning", "suggestion" and +"message", by default. Diagnostics categorized as "error" will fail the jsii compiler and the rest will be printed to +console. + +These can be re-configured to a different category under the `diagnostics` key as so - + +```json +"jsii": { + // ... + "diagnostics": { + "documentation/non-existent-parameter": "error", + "code-style/submodule-name-casing": "suggestion", + "JSII9998": "error", + "JSII9001": "warning" + } +} +``` + +As noted in the example above, the diagnostic code can be the human readable string, or the numeric code prefixed with +`JSII`. + +The full list of diagnostic codes can be found in +[`jsii-diagnostic.ts`](https://github.com/aws/jsii/tree/main/packages/jsii/lib/jsii-diagnostic.ts). + +## Dependency considerations + +Like any node library, `jsii` packages can declare runtime dependencies using the [`dependencies`][npm-deps] section of +`package.json`. + +[npm-deps]: https://docs.npmjs.com/files/package.json#dependencies + +### Dependencies that are `jsii` modules + +Node modules are conventionally versioned using [semantic versioning], but that is not true of all package managers that +`jsii` is able to target. Additionally, only one version of the `jsii` runtime and kernel can be used within a given +application. In order to avoid version resolution surprises at run-time, `jsii` requires duplicating `jsii` modules +declarations from [`dependencies`][npm-deps] into the [`peerDependencies`][npm-peer-deps] section. + +[npm-peer-deps]: https://docs.npmjs.com/files/package.json#peerdependencies +[semantic versioning]: https://semver.org + +### Dependencies that are not `jsii` modules + +The `jsii` runtimes in non-**javascript** languages do not use `npm install`, and as a consequence cannot rely on +`npm install` bringing in a package's dependencies. As a consequence, dependencies that are not themselves `jsii` +modules, **must** also be referenced in the [`bundledDependencies`][npm-bundled] section, so that they are bundled +within the NPM package. + +[npm-bundled]: https://docs.npmjs.com/files/package.json#bundleddependencies diff --git a/gh-pages/content/user-guides/lib-author/configuration/targets/dotnet.md b/gh-pages/content/user-guides/lib-author/configuration/targets/dotnet.md new file mode 100644 index 0000000000..53afbb9ffc --- /dev/null +++ b/gh-pages/content/user-guides/lib-author/configuration/targets/dotnet.md @@ -0,0 +1,39 @@ +# :fontawesome-brands-microsoft: .NET + +The `dotnet` target requires the following configuration: + +- `namespace` - the root namespace under which types will be declared. +- `packageId` - the identified of the package in the NuGet registry. +- `iconUrl` - the URL of the icon to be shown in the [NuGet Gallery][nuget]. It should be at least 64x64 pixels and a + transparent background is recommended. See the [.NET documentation] for more information. +- `versionSuffix` - an optional suffix that will be appended at the end of the NuGet package's `version` field. The + suffix must start with a `-`. +- `signAssembly` - whether the assembly should be strong-name signed. Defaults to `false` when not specified. +- `assemblyOriginatorKeyFile`- the path to the strong-name signing key to be used. When not specified or if the file + referred to does not exist, the assembly will not be strong-name signed. + +Example: + +```js +{ + "jsii": { + "dotnet": { + "namespace": "Acme.HelloJsii", // Required + "packageId": "Acme.HelloJsii", // Required + "iconUrl": "https://cdn.acme.com/icon.png", // Optional + "signAssembly": true, // Optional + "assemblyOriginatorKeyFile": "./key.snk", // Optional + "versionSuffix": "-preview" // Optional + }, + // ... + }, + // ... +} +``` + +The resulting artifact is a NuGet package that can be published to [NuGet] using the standard [`nuget push`][nuget-push] +command. + +[nuget]: https://www.nuget.org +[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 diff --git a/gh-pages/content/user-guides/lib-author/configuration/targets/go.md b/gh-pages/content/user-guides/lib-author/configuration/targets/go.md new file mode 100644 index 0000000000..78756aa74d --- /dev/null +++ b/gh-pages/content/user-guides/lib-author/configuration/targets/go.md @@ -0,0 +1,21 @@ +# Go + +!!! danger + 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. + +```json +{ + "jsii": { + "targets": { + "go": {}, + // ... + }, + // ... + }, + // ... +} +``` diff --git a/gh-pages/content/user-guides/lib-author/configuration/targets/java.md b/gh-pages/content/user-guides/lib-author/configuration/targets/java.md new file mode 100644 index 0000000000..cb63b36d59 --- /dev/null +++ b/gh-pages/content/user-guides/lib-author/configuration/targets/java.md @@ -0,0 +1,33 @@ +# :fontawesome-brands-java: Java + +The `java` target requires the following configuration: + +- `maven` - the `groupId` and `artifactId` for the **Maven** package. + - Optionally a `versionSuffix` can be provided that will be appended at the end of the **Maven** package's `version` + field. The suffix must start with a `.` or a `-`. +- `package` - the root **Java** package name under which the types will be declared. + +Example: + +```js +{ + "jsii": { + "java": { + "package": "acme.jsii.hello", // Required + "maven": { + "groupId": "acme", // Required + "artifactId": "jsii-hello", // Required + "versionSuffix": ".PREVIEW" // Optional + } + }, + // ... + }, + // ... +} +``` + +The resulting artifact is a **Maven** package that can be deployed to [Maven Central] using the +`deploy-staged-repository` command of the [nexus-staging-maven-plugin]. + +[maven central]: https://search.maven.org +[nexus-staging-maven-plugin]: https://mvnrepository.com/artifact/org.sonatype.plugins/nexus-staging-maven-plugin diff --git a/gh-pages/content/user-guides/lib-author/configuration/targets/python.md b/gh-pages/content/user-guides/lib-author/configuration/targets/python.md new file mode 100644 index 0000000000..372fab2206 --- /dev/null +++ b/gh-pages/content/user-guides/lib-author/configuration/targets/python.md @@ -0,0 +1,68 @@ +# :fontawesome-brands-python: Python + +The `python` target requires two configuration entries: + +- `module` - the name of the generated **Python** module, which will be used by users in `import` directives. +- `distName` - the [PyPI] distribution name for the package. +- `classifiers` - a list of [trove classifiers] to declare on the package. It is the user's responsibility to specify + _valid_ values (the authoritative list of valid [trove classifiers] is defined in the [pypa/trove-classifiers] + package). + - Some classifiers are automatically included (and should not be added to the `classifiers` property) based on + relevant configuration from the `package.json` file: + - `Development Status :: ` is determined based on the package's `stability` + - `License ::` is determined based on the package's `license` + - `Operating System :: OS Independent` is always set + - `Typing :: Typed` is always set + - Additionally, the following `Programming Language ::` classifiers are already set (more could be added by the user + if relevant): + - `Programming Language :: Python :: 3 :: Only` + - `Programming Language :: Python :: 3.6` + - `Programming Language :: Python :: 3.7` + - `Programming Language :: Python :: 3.8` + - `Programming Language :: Python :: 3.9` + +Example: + +```js +{ + "jsii": { + "targets": { + "python": { + "module": "hello_jsii", // Required + "distName": "hello-jsii", // Required + "classifiers": [ // Optional + "Framework :: AWS CDK", + "Framework :: AWS CDK :: 1" + ] + }, + // ... + } + // ... + }, + // ... +} +``` + +The resulting package can be published to [PyPI]. + +[pypi]: https://pypi.org/ +[trove classifiers]: https://www.python.org/dev/peps/pep-0301/#distutils-trove-classification +[pypa/trove-classifiers]: https://github.com/pypa/trove-classifiers + +## Prerelease Versions + +The original `npm` package may feature a version number that includes a [SemVer 2.0][semver]-compliant prerelease +identifer (e.g: `1.2.3-pre.4`). Python packages distributed to [PyPI] must however use a different format to express +prerelease versions, as specified in [PEP-440]. In order to generate valid packages, only certain prerelease identifiers +are accepted by `jsii-pacmak`, and are translated according to the following table: + +| Source Version (`npm`) | Python Version ([PEP-440]) | Notes | +| ---------------------- | -------------------------- | -------------------------------- | +| `X.Y.Z.dev.N` | `X.Y.Z.devN` | Development, iteration `N`. | +| `X.Y.Z.pre.N` | `X.Y.Z.devN` | Development, iteration `N` | +| `X.Y.Z.alpha.N` | `X.Y.Z.aN` | Alpha release, iteration `N` | +| `X.Y.Z.beta.N` | `X.Y.Z.bN` | Beta release, iteration `N` | +| `X.Y.Z.rc.N` | `X.Y.Z.rcN` | Release candidate, iteration `N` | + +[semver]: https://semver.org/spec/v2.0.0.html +[pep-440]: https://www.python.org/dev/peps/pep-0440/#pre-releases diff --git a/gh-pages/content/user-guides/lib-author/index.md b/gh-pages/content/user-guides/lib-author/index.md new file mode 100644 index 0000000000..4793d37bd3 --- /dev/null +++ b/gh-pages/content/user-guides/lib-author/index.md @@ -0,0 +1,45 @@ +# Prerequisites + +## :fontawesome-brands-node-js: Common Runtime + +Whether you are developing _jsii modules_ or consuming them (see [Runtime Architecture]), a compatible `node` runtime +must be available. Current `node` runtime versions support status is as follows: + +--8<-- "partials/node-support-table.md" + +[runtime architecture]: ../../overview/runtime-architecture.md + +## :octicons-file-code-24: Other Languages + +When developing _jsii modules_, the SDK for each desired target language must be available for `jsii-pacmak` to be able +to produce releasable artifacts. + +| Language/Platform | SDK Requirement | +| ----------------- | ---------------------------- | +| .NET | .NET Core โ‰ฅ 3.1 / .NET โ‰ฅ 5.0 | +| Go | Go โ‰ฅ 1.15 | +| Java | JDK โ‰ฅ 8 *and* Maven โ‰ฅ 3.6 | +| Python | Python โ‰ฅ 3.6 | + + +## :octicons-desktop-download-24: Download Locations + +This table provides typical download locations for the prerequisites mentioned in this document. Most of these tools can +also be installed using traditional package managers (standard for the operating system and platform). + +| Tool | Description | Location | +| --------------- | ---------------------------------------- | ------------------------| +| .NET | Official Microsoft .NET SDK distribution | [Download][dl-dotnet] | +| Amazon Corretto | Amazon's free OpenJDK distribution | [Download][dl-corretto] | +| Go | Official Go distribution | [Download][dl-go] | +| OpenJDK | Oracle OpenJDK distribution | [Download][dl-openjdk] | +| Maven | Official Maven distribution | [Download][dl-mvn] | +| Node | Official NodeJS distribution | [Download][dl-node] | + +[dl-dotnet]: https://dotnet.microsoft.com/download +[dl-go]: https://golang.org/dl/ +[dl-openjdk]: https://openjdk.java.net/install/index.html +[dl-corretto]: https://aws.amazon.com/fr/corretto/ +[dl-mvn]: https://maven.apache.org/download.cgi +[dl-python]: https://www.python.org/downloads/ +[dl-node]: https://nodejs.org/en/download/ diff --git a/gh-pages/content/user-guides/lib-author/quick-start/set-up.md b/gh-pages/content/user-guides/lib-author/quick-start/set-up.md new file mode 100644 index 0000000000..98ef644469 --- /dev/null +++ b/gh-pages/content/user-guides/lib-author/quick-start/set-up.md @@ -0,0 +1,128 @@ +# Set Up + +## Creating a new _npm_ package + +Start by creating a new empty _npm_ package: + +```console +# mkdir project-name +# cd project-name +# npm init -y +Wrote to /Users/rmuller/Downloads/project-name/package.json: + +{ + "name": "project-name", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC" +} +``` + +## Adding mandatory metadata + +Then, add the mandatory information to the new `package.json` file that was created. Specifically, _jsii modules_ must +have an `author` and `repository` setting (those are necessary to generate _valid_ libraries for certain distribution +points, such as _Maven Central_): + +```json hl_lines="4 10-13 14-16" +{ + "name": "project-name", + "version": "1.0.0", + "description": "A demonstration jsii library", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": { + "name": "John Doe", + "email": "john.doe@acme.com" + }, + "repository": { + "url": "https://github.com/acme/project-name.git" + }, + "license": "ISC" +} +``` + +## Setting up the _jsii_ configuration + +Finish up the configuration by running `jsii-config`, and letting the assistant guide you through the process: + +```console +# npx jsii-config +? Target Languages (Press to select, to toggle all, to invert selection) +โฏโ—ฏ java + โ—ฏ python + โ—ฏ dotnet +... +Success! +``` + +## Install Dependencies + +Now, you're ready to install the basic tools into the packages' dependency closure. The exact instructions depend on the +**JavaScript** package manager you want to be using: + +=== "yarn" + + ```console + # yarn add -D jsii jsii-pacmak + yarn add v1.22.10 + info No lockfile found. + [1/4] ๐Ÿ” Resolving packages... + [2/4] ๐Ÿšš Fetching packages... + [3/4] ๐Ÿ”— Linking dependencies... + [4/4] ๐Ÿ”จ Building fresh packages... + success Saved lockfile. + success Saved 66 new dependencies. + ... + ``` + +=== "npm" + + ```console + # npm install --save-dev jsii jsii-pacmak + + added 107 packages, and audited 107 packages in 4s + + 39 packages are looking for funding + run `npm fund` for details + + found 0 vulnerabilities + ``` + +## Set up essential scripts + +Finally, you might want to configure convenience scripts in your `package.json` file in order to facilitate working with +your project: + +```json hl_lines="7-9" +{ + "name": "project-name", + "version": "1.0.0", + "description": "A demonstration jsii library", + "main": "index.js", + "scripts": { + "build": "jsii", + "build:watch": "jsii --watch", + "package": "jsii-pacmak" + }, + "keywords": [] + // ... +} +``` + +Those scripts have the following effect: + +| Script | Description | +| ------------- | ------------------------------------------------- | +| `build` | Compiles the project | +| `build:watch` | Watches for file changes and recompiles as needed | +| `package` | Generates libraries for all languages | diff --git a/gh-pages/content/user-guides/lib-author/quick-start/write-code.md b/gh-pages/content/user-guides/lib-author/quick-start/write-code.md new file mode 100644 index 0000000000..df4cad3be5 --- /dev/null +++ b/gh-pages/content/user-guides/lib-author/quick-start/write-code.md @@ -0,0 +1,70 @@ +# Write Code + +## The `index.ts` content + +Create a new `index.ts` file with your initial code: + +```ts +export interface GreeterProps { + readonly greetee: string; +} + +export class Greeter { + private readonly greetee: string; + + public constructor(props: GreeterProps) { + this.greetee = props.greetee; + } + + public greet(): string { + return `Hello, ${this.greetee}!` + } +} +``` + +## Iterate + +Either run the `build` or `build:watch` script from the [Set Up](set-up.md) step in order to compile the project. The +necessary `tsconfig.json` is automatically created so the **TypeScript** compiler produces the correct output. + +## Generate Targets + +Once you are satisfied with the library, bindings in all supproted languages can be generated by running `jsii-pacmak`, +typically by using the `package` script from the [Set Up](set-up.md) step. Publishable artifacts will be generated and +placed in per-language sub-directories of the `dist` folder: + +```console +$ tree dist +dist +โ”œโ”€โ”€ dotnet +โ”‚ โ”œโ”€โ”€ Acme.ProjectName.1.0.0.nupkg +โ”‚ โ””โ”€โ”€ Acme.ProjectName.1.0.0.snupkg +โ”œโ”€โ”€ java +โ”‚ โ””โ”€โ”€ com +โ”‚ โ””โ”€โ”€ acme +โ”‚ โ””โ”€โ”€ sample +โ”‚ โ””โ”€โ”€ project-name +โ”‚ โ”œโ”€โ”€ 1.0.0 +โ”‚ โ”‚ โ”œโ”€โ”€ project-name-1.0.0-javadoc.jar +โ”‚ โ”‚ โ”œโ”€โ”€ project-name-1.0.0-javadoc.jar.md5 +โ”‚ โ”‚ โ”œโ”€โ”€ project-name-1.0.0-javadoc.jar.sha1 +โ”‚ โ”‚ โ”œโ”€โ”€ project-name-1.0.0-sources.jar +โ”‚ โ”‚ โ”œโ”€โ”€ project-name-1.0.0-sources.jar.md5 +โ”‚ โ”‚ โ”œโ”€โ”€ project-name-1.0.0-sources.jar.sha1 +โ”‚ โ”‚ โ”œโ”€โ”€ project-name-1.0.0.jar +โ”‚ โ”‚ โ”œโ”€โ”€ project-name-1.0.0.jar.md5 +โ”‚ โ”‚ โ”œโ”€โ”€ project-name-1.0.0.jar.sha1 +โ”‚ โ”‚ โ”œโ”€โ”€ project-name-1.0.0.pom +โ”‚ โ”‚ โ”œโ”€โ”€ project-name-1.0.0.pom.md5 +โ”‚ โ”‚ โ””โ”€โ”€ project-name-1.0.0.pom.sha1 +โ”‚ โ”œโ”€โ”€ maven-metadata.xml +โ”‚ โ”œโ”€โ”€ maven-metadata.xml.md5 +โ”‚ โ””โ”€โ”€ maven-metadata.xml.sha1 +โ”œโ”€โ”€ js +โ”‚ โ””โ”€โ”€ project-name@1.0.0.jsii.tgz +โ””โ”€โ”€ python + โ”œโ”€โ”€ project-name-1.0.0.tar.gz + โ””โ”€โ”€ project_name-1.0.0-py3-none-any.whl + +9 directories, 20 files +``` diff --git a/gh-pages/content/user-guides/lib-author/toolchain/.pages.yml b/gh-pages/content/user-guides/lib-author/toolchain/.pages.yml new file mode 100644 index 0000000000..4eba5361f5 --- /dev/null +++ b/gh-pages/content/user-guides/lib-author/toolchain/.pages.yml @@ -0,0 +1,2 @@ +--- +title: Toolchain diff --git a/gh-pages/content/user-guides/lib-author/toolchain/jsii.md b/gh-pages/content/user-guides/lib-author/toolchain/jsii.md new file mode 100644 index 0000000000..9836f17b1b --- /dev/null +++ b/gh-pages/content/user-guides/lib-author/toolchain/jsii.md @@ -0,0 +1,80 @@ +# jsii + +The `jsii` tool wraps the standard **TypeScript** compiler, applies the +[TypeScript restrictions](../typescript-restrictions.md), producing additional +diagnostic messages as necessary. + +## Options + +!!! info + This section discusses the main options of `jsii` only. There may be + additional options not mentioned on this page, which can learn about using + `jsii --help`. + +### `--watch` + +The `--watch` option behaves similar to that of the standard **TypeScript** +compiler. It will make `jsii` listen to file changes within the project, and +recompile whenever a source file has changed (including producing diagnostic +messages, and a new `.jsii` assembly file as needed). + +This option is useful when iterating on your code, as it provides a faster +feedback loop than periodically manually re-compiling. + +### `--project-references` + +When `--project-references` is specified, `jsii` will generate a `tsconfig.json` +file that includes `references` to any other local `jsii` project present in the +dependency closure of the current one. + +This option is recommended for any project that is part of a mono-repository, +where multiple `jsii` packages are being maintained. It can result in improved +build times, and a better IDE experience. + +### `--fail-on-warnings` + +The `--fail-on-warnings` option causes compilation top fail if any `warning` +diagnostic is emitted. This setting is recommended for users who want to ensure +the best possible experience for developers using their library in all supported +languages, as it will prevent inadvertent use of one of those languages' +reserved words in an identifier. + +!!! warning + Setting this option might occasionally cause compilation to fail when + performing a minor version upgrade to `jsii`; in particular when support for + a new language is introduced (as this may introduce additional reserved + words, too). + + This situation will be improved in the future, as `jsii` will offer an + option to only warn about reserved words of languages that are configured + for the current project. + +### :test_tube: Experimental Features + +!!! danger + The features discussed in this section are experimental. Their behavior may + change as bugs are addressed, and requirements are clarified through early + adopters. Use at your own risk, and don't forget to [report bugs] you + encounter while doing so! + + [report bugs]: https://github.com/aws/jsii/issues/new/choose + +#### `--strip-dependencies` + +The `--strip-dependencies` option modifies the compilation flow such that all +declarations (types, members) documented with the `@deprecated` tag will be +erased from the visible API of the module: + +- They will be removed from the **TypeScript** declarations (`.d.ts`) files +- They will be removed from the `.jsii` assembly file +- Inheritance chains of non-`@deprecated` types will have their `@deprecated` + bases transitively replaced with non-`@deprecated` bases thereof (or if there + are no such parents, the inheritance relationship will simply be erased) +- Errors will be reported for each remaining use of a `@deprecated` type in the + API (this includes property types, method parameter types, and method return + types) + +However, in order to ensure the underlying code continues to work as designed, +the *implementation* of such declarations will remain in the **JavaScript** +(`.js`) files produced by the compilation. This is, in fact, similar to marking +all `@deprecated` members `@internal`. diff --git a/gh-pages/content/user-guides/lib-author/typescript-restrictions.md b/gh-pages/content/user-guides/lib-author/typescript-restrictions.md new file mode 100644 index 0000000000..499828a201 --- /dev/null +++ b/gh-pages/content/user-guides/lib-author/typescript-restrictions.md @@ -0,0 +1,239 @@ +# TypeScript Restrictions + +Since the API exported by *jsii modules* will be represented in a variety of other languages, certain restrictions are +enforced by the `jsii` compiler. + +!!! info + Since those restrictions are solely intended to ensure the exported API can be represented in other languages, they + do not apply to any internal declarations such as `#!ts private` members and declarations annotated with the + `#!ts /** @internal */` tag. + +## Dependencies + +A *jsii module* can declare dependencies on any other *jsii module* by adding entries in the `dependencies` key in the +`package.json` file. Since most other platforms do not support multiple different versions of the same library to +coexist in the same closure, it is recommended to also declare all such dependencies as `peerDependencies`. + +Occasionally, a dependency on a *non-jsii module* is useful. Since such dependencies do not have generated bindings in +all the supported languages, they must be bundled with the *jsii module* that depends on them, by adding the library +into the `bundleDependencies` array in `package.json`. The API of the *jsii module* can not expose any type from bundled +dependencies, since those types would not be available in other languages. + +!!! info + For more information on `package.json` file contents, refer to the [npm documentation][package-json]. + + [package-json]: https://docs.npmjs.com/cli/v6/configuring-npm/package-json + +## Naming + +### Class Members + +Members of *classes* cannot share the same *PascalCased* representation as the declaring *class* itself, as this results +in invalid **C#** code: + +```ts hl_lines="2-3 7-8" +export class Foo { + // ๐Ÿ’ฅ Illegal property name + public foo: string; +} + +export class Bar { + // ๐Ÿ’ฅ Illegal method name + public bar(): void { /* ... */ } +} +``` + +!!! danger + Due to existing usage, this restriction is only enforced when `jsii` is invoked with the `--strict` option. The + generated **C#** class name will receive a `_` suffix if any of it's members conflict, which is a breaking change to + existing **.NET** consumers when a conflicting member is introduced after the initial release. + +### Interfaces + +The `jsii` type model distinguishes two kinds of *interfaces*: + +- *Behavioral interfaces*, which can declare methods and properties +- *Structs*, which are immutable pure data entities, and can consequently only declare `#!ts readonly` properties + +A name convention is used to distinguish between these two: *behavioral interfaces* must have a name that starts with a +`I` prefix, while *structs* must not have such a prefix. + +```ts hl_lines="5-8" +/** + * Since there is no `I` prefix, Foo is considered to be a struct. + */ +export interface Foo { + // ๐Ÿ’ฅ Structs are not allowed to declare methods + foo(): void; + // ๐Ÿ’ฅ Structs are not allowed to declare mutable properties + mutableProperty: number; + // โœ… Structs can declare immutable properties + readonly immutableProperty: string; +} + +/** + * Since there is an `I` prefix, IFoo is considered to be a behavioral interface. + */ +export interface IFoo { + // โœ… Behavioral interfaces can declare methods + foo(): void; + // โœ… Behavioral interfaces can declare mutable properties + mutableProperty: number; + // โœ… Behavioral interfaces can declare immutable properties + readonly immutableProperty: string; +} +``` + +## Inheritance + +### Structs + +As *structs* are pure data entities, they can only be extended by other *structs*: + +```ts hl_lines="3-4 6-7" +export interface Struct { /* ...readonly properties... */ } + +// ๐Ÿ’ฅ Structs cannot be extended by behavioral interfaces +export interface IBehavioralInterface extends Struct { /* ... */ } + +// ๐Ÿ’ฅ Structs cannot be implemented by classes +export class ConcreteType implements Struct { /* ... */ } + +// โœ… Structs can extend other structs +export interface SuperStruct extends Struct { /* ...readonly properties */ } +``` + +### Member Visibility + +The **C#** language does not allow overriding members to change the visibility of the overridden declaration, even if +the updated visibility is more permissive. As a consequence, overridden members are required to retain the same +visibility as their parents. + +!!! danger + This makes changing the visibility of a `#!ts protected` member to `#!ts public` is a breaking change in `jsii` + libraries! + +```ts hl_lines="6-7" +export class Base { + protected method(): void { /* ... */ } +} + +export class Subclass extends Base { + // ๐Ÿ’ฅ Illegal change of visibility from protected to public + public method(): void { /* ... */ } +} +``` + +### Covariant Overrides & Parameter List Changes + +In **TypeScript**, overriding members can have a signature that differs from the overridden member as long as the new +signature is compatible with the parent. This is however not supported as: + +- **Java** and **C#** do not support omitting parameters when overriding or implementing a member +- **C#** does not support overriding or implementing a member using covariant parameter or return types + +!!! note + **C# 9** introduces support for covariant return types, which would allow relaxing this restriction, however `jsii` + must build code targetting the `.NET Core 3.1` runtime, which only supports **C# 8**. Once `.NET Core 3.1` becimes + end-of-life, this may change. + +```ts hl_lines="6-7 9-10 12-13" +export class Base { + public method(param: any): any { /* ... */ } +} + +export class Child extends Base { + // ๐Ÿ’ฅ Parameter signatures do not match + public method(): any { /* ... */ } + + // ๐Ÿ’ฅ Parameter types do not match, even though they are covariant + public method(param: string): any { /* ... */ } + + // ๐Ÿ’ฅ Return type does not match, even though it is covariant + public method(param: any): string { /* ... */ } +} +``` + +## Parameterized Types (aka: Generics) + +Parameterized types are not consistently supported in all supported target languages. **Go** does not currently support +generics, and the differences in generic semantics between **TypeScript**, **C#** and **Java** make it difficult to +correctly represent such types in all those languages. As a consequence, `jsii` does not support declaring parameterized +types. + +Only certain *built-in* parameterized types can be used in `jsii` modules: +- `Array`, which is equivalent to `T[]` +- `Record`, which is equivalent to `{ [key: string]: T }` +- `Promise`, which is the return type of any *asynchronous* method + +```ts hl_lines="1-4" +// ๐Ÿ’ฅ Parameterized types cannot be introduced +export interface Parameterized { + readonly value: T; +} + +export interface IAsyncFooMaker { + // โœ… Asynchronous methods must return promises + makeFoo(): Promise; + // โœ… Arrays are supported + makeFoos(count: number): Array>; +} +``` + +# Soft-Reserved Words + +In order to guarantee a consistent developer experience across all supported languages, `jsii` emits warnings whenever +a declaration is named after any target language's *reserved words*, as those will need renaming in target languages: + +**C#** | **Java** | **Python** | **Go** +---------------|----------------|--------------|------------- +`abstract` | `abstract` | `False` | `break` +`base` | `assert` | `None` | `case` +`bool` | `boolean` | `True` | `chan` +`byte` | `byte` | `and` | `const` +`char` | `char` | `assert` | `continue` +`checked` | `double` | `def` | `default` +`decimal` | `final` | `del` | `defer` +`delegate` | `float` | `elif` | `else` +`double` | `goto` | `except` | `fallthrough` +`event` | `int` | `from` | `for` +`explicit` | `long` | `global` | `func` +`extern` | `native` | `is` | `go` +`fixed` | `short` | `lambda` | `goto` +`float` | `strictfp` | `nonlocal` | `if` +`foreach` | `synchronized` | `not` | `import` +`goto` | `throws` | `or` | `interface` +`implicit` | `transient` | `pass` | `map` +`int` | `volatile` | `raise` | `package` +`internal` | | | `range` +`is` | | | `return` +`lock` | | | `select` +`long` | | | `struct` +`namespace` | | | `switch` +`object` | | | `type` +`operator` | | | `var` +`out` | | | +`override` | | | +`params` | | | +`readonly` | | | +`ref` | | | +`sbyte` | | | +`sealed` | | | +`short` | | | +`sizeof` | | | +`stackalloc` | | | +`string` | | | +`struct` | | | +`uint` | | | +`ulong` | | | +`unchecked` | | | +`unsafe` | | | +`ushort` | | | +`using` | | | +`virtual` | | | +`volatile` | | | + +!!! info + The list of reserved words is derived from [`jsii/lib/reserved-words.ts`][reserved-words.ts]. + + [reserved-words.ts]: https://github.com/aws/jsii/tree/main/packages/jsii/lib/reserved-words.ts diff --git a/gh-pages/content/user-guides/lib-user/.pages.yml b/gh-pages/content/user-guides/lib-user/.pages.yml new file mode 100644 index 0000000000..ccc56071c8 --- /dev/null +++ b/gh-pages/content/user-guides/lib-user/.pages.yml @@ -0,0 +1,5 @@ +--- +title: Library Consumer Guide +nav: + - index.md + - language-specific diff --git a/gh-pages/content/user-guides/lib-user/index.md b/gh-pages/content/user-guides/lib-user/index.md new file mode 100644 index 0000000000..f297a92bf1 --- /dev/null +++ b/gh-pages/content/user-guides/lib-user/index.md @@ -0,0 +1,11 @@ +# Prerequisites + +## :fontawesome-brands-node-js: Common Runtime + +Regardless of which language or platform your application is developed in, using *jsii modules* requires a compatible +`node` runtime to be available in `$PATH`(see [Runtime Architecture]). Current `node` runtime versions support status is +as follows: + +--8<-- "partials/node-support-table.md" + +[runtime architecture]: ../../overview/runtime-architecture.md diff --git a/gh-pages/content/user-guides/lib-user/language-specific/.pages.yml b/gh-pages/content/user-guides/lib-user/language-specific/.pages.yml new file mode 100644 index 0000000000..62118e63eb --- /dev/null +++ b/gh-pages/content/user-guides/lib-user/language-specific/.pages.yml @@ -0,0 +1,4 @@ +--- +title: Language Specific +nav: + - Python: python.md diff --git a/gh-pages/content/user-guides/lib-user/language-specific/python.md b/gh-pages/content/user-guides/lib-user/language-specific/python.md new file mode 100644 index 0000000000..059fd59478 --- /dev/null +++ b/gh-pages/content/user-guides/lib-user/language-specific/python.md @@ -0,0 +1,85 @@ +# :fontawesome-brands-python: Python + +Due to the use of a [custom metaclass][metaclass] as part of the *jsii runtime for Python*, certain **Python** idioms +require unusual syntax when *jsii modules* are involved. + +[metaclass]: https://docs.python.org/3/reference/datamodel.html#metaclasses + +!!! info + Our intention is to make working with *jsii modules* from **Python** as idiomatic as possible. Removing the [custom + metaclass][metaclass] usage without breaking existing code is a challenging task, and the situation may consequently + remain sub-optional for the near future at least. + +## Implementing Interfaces + +Traditionally, **Python** developers expect to be able to either *implicitly* implement an interface by declaring all +required members, or *explicitly* implement interfaces by simply adding the interface to their class' or interface's +inheritance chain (and implementing all required members): + +!!! bug "Incorrect Use" + + ```py hl_lines="3" + from jsii_dependency import IJsiiInterface + + class MyNewClass(IJsiiInterface): + """ Traditional implementation of an interface in Python. + + This will not work with interfaces defined by jsii modules, as this will + likely cause a metaclass conflict that the user cannot solve. + """ + + # Member implementations... + + ... + ``` + +The [jsii type system][jsii-type-system] however does not support *structural typing*, and interfaces must **always** be +*explicitly* implemented. In order to correctly declare implementation of an interface from a *jsii module*, the +following syntax is used: + +```py hl_lines="1 4" +import jsii +from jsii_dependency import IJsiiInterface + +@jsii.implements(IJsiiInterface) +class MyNewClass(): + """ A jsii-supported implementation of the `IJsiiInterface` interface + + This will correctly register the explicit interface implementation on the + type's metadata, and ensure instances get correctly serialized to and from + the jsii kernel. + """ + + # Member implementations... + + ... +``` + +[jsii-type-system]: ../../../specification/2-type-system.md + +## Property Overrides + +When extending or implementing types provided by *jsii modules*, properties must always be implemented using a dynamic +accessor, ensuring the *jsii runtime for Python* is able to correctly process access to those by the *jsii kernel*. This +leverages **Python**'s standard `#!py @property` decorator: + +```py hl_lines="10 14" +from jsii_greeter import Greeter + +class Shouter(Greeter): + """ Shouter extends Greeter up-cases the greetee's name. + + The replacement is implemented using a dynamic @property implementation so + it works properly with the jsii kernel. + """ + + @property + def greetee(self) -> str: + return super().greetee.upper() + + @greetee.setter + def greetee(self, value): + super().greetee = value + + ... +``` diff --git a/gh-pages/mkdocs.yml b/gh-pages/mkdocs.yml new file mode 100644 index 0000000000..bc00bf0df6 --- /dev/null +++ b/gh-pages/mkdocs.yml @@ -0,0 +1,66 @@ +site_name: The jsii reference +site_description: jsii allows code in any language to naturally interact with JavaScript classes. +repo_name: aws/jsii +repo_url: https://github.com/aws/jsii +site_url: https://aws.github.io/jsii/ +edit_uri: edit/main/gh-pages/content/ +copyright: Copyright © 2021 Amazon Web Services, Inc. + +docs_dir: content +extra_css: + - assets/stylesheets/amazon-ember-display.css + - assets/stylesheets/extra.css + +nav: + - Welcome: + - index.md + - Overview: + - overview/features.md + - overview/toolchain.md + - overview/runtime-architecture.md + - ... + +extra: + social: + - icon: fontawesome/brands/aws + name: Amazon Web Services, Inc. + link: https://aws.amazon.com + +theme: + name: material + font: false + logo: assets/images/logo.png + icon: + logo: fontawesome/brands/aws + repo: fontawesome/brands/github + favicon: assets/images/favicon.png + palette: + scheme: default + features: + - navigation.expand + - navigation.instant + - navigation.tabs + +markdown_extensions: + - admonition + - pymdownx.details + - pymdownx.highlight + - pymdownx.inlinehilite + - pymdownx.magiclink: + repo_url_shorthand: true + repo_url_shortener: true + provider: github + user: aws + repo: jsii + - pymdownx.snippets + - pymdownx.superfences + - pymdownx.tabbed + - pymdownx.emoji: + emoji_index: !!python/name:materialx.emoji.twemoji + emoji_generator: !!python/name:materialx.emoji.to_svg + +plugins: + - awesome-pages: + filename: .pages.yml + - git-revision-date + - search diff --git a/gh-pages/partials/node-support-table.md b/gh-pages/partials/node-support-table.md new file mode 100644 index 0000000000..90102663b8 --- /dev/null +++ b/gh-pages/partials/node-support-table.md @@ -0,0 +1,24 @@ +| Release | Status | +| --------- | ---------------------------- | +| `<10.3.0` | :x: Defunct | +| `^10.3.0` | :white_check_mark: Supported | +| `^11.0.0` | :warning: Unsupported | +| `^12.0.0` | :white_check_mark: Supported | +| `^13.0.0` | :warning: Unsupported | +| `^14.0.0` | :white_check_mark: Supported | +| `^15.0.0` | :test_tube: Best effort | + +??? question "Status Definitions" + - **:white_check_mark: Supported**: Long Term Support (LTS) releases (those with an even major version) are + supported and bugs specific to those releases are addressed with the highest priority. Every `jsii` release is + automatically tested against those releases. + - **:test_tube: Best effort**: Development releases (those with an odd major version) are supported on a best-effort + basis. No automated testing is performed against those releases. + - **:warning: Unsupported**: End-of-Life releases are not supported. Bugs affecting those may not be fixed, and + users are strongly advised to migrate to more recent releases. + - **:x: Defunct**: Very old releases (these have been End-of-Live for a while now) are unlikely to work at all. + + The [node releases schedule][node-releases] provides up-to-date information on the current status of all active + releases, and indicates the timelines for support (including planned End-of-Life dates for each). + + [node-releases]: https://nodejs.org/en/about/releases/ diff --git a/gh-pages/requirements-dev.txt b/gh-pages/requirements-dev.txt new file mode 100644 index 0000000000..71e8bf015c --- /dev/null +++ b/gh-pages/requirements-dev.txt @@ -0,0 +1,4 @@ +mkdocs~=1.1.2 +mkdocs-awesome-pages-plugin~=2.5.0 +mkdocs-material~=6.2.8 +mkdocs-git-revision-date-plugin~=0.3.1 diff --git a/gh-pages/start.sh b/gh-pages/start.sh new file mode 100755 index 0000000000..4f7ba24713 --- /dev/null +++ b/gh-pages/start.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +### +# Starts a local server for the documentation website, for easy iteration. +## + +if [ ! -d .venv ]; then + python3 -m venv --system-site-packages .venv +fi +source .venv/bin/activate + +python3 -m pip install -r requirements-dev.txt --upgrade + +python3 -m mkdocs serve diff --git a/jest.config.ts b/jest.config.ts new file mode 100644 index 0000000000..590dba534b --- /dev/null +++ b/jest.config.ts @@ -0,0 +1,77 @@ +import type { Config } from '@jest/types'; +import { defaults } from 'jest-config'; +import { env } from 'process'; + +/** + * This is the shared Jest configuration for all the project. Jest does not + * typically look for this file in parent directories, so it should be symlinked + * in all the packages, so it gets properly discovered. If some values need to + * be overridden (for example, the coverage threshold), then a new + * `jest.config.ts` file should be created that imports from this one and + * modifies just what needs to be modified, typically using `overriddenConfig`. + */ +const config: Config.InitialOptions = { + ...defaults, + + collectCoverage: true, + coverageReporters: ['lcov', 'text'], + coverageThreshold: { + global: { + branches: 60, + statements: 60, + }, + }, + errorOnDeprecated: true, + // When in Continuous Integration, use only 1 worker (assuming "frugal" runner type) + maxWorkers: env.CI === 'true' ? 1 : defaults.maxWorkers, + setupFilesAfterEnv: ['jest-expect-message'], + testEnvironment: 'node', + testMatch: ['**/?(*.)+(spec|test).ts'], + testRunner: 'jest-circus/runner', + // When in Continuous Integration, allow double the default test timeout (assuming "frugal" runner type) + testTimeout: env.CI === 'true' ? 10_000 : undefined, + transform: { + '\\.tsx?$': 'ts-jest', + }, +}; + +/** + * Overrides the default configuration with the provided values. The merge + * operation works deeply on objects, but overrides that are not objects (e.g: + * arrays, strings, ...) simply replace the original value. + * + * @param overrides values to be used for overriding the orignal configuration. + */ +export function overriddenConfig(overrides: Config.InitialOptions) { + return merge(config, overrides); + + function merge(original: T, override: T): T { + if (typeof original === 'object') { + // Arrays are objects, too! + if (Array.isArray(override)) { + return override; + } + + const result: any = {}; + const allKeys = new Set([ + ...Object.keys(original), + ...Object.keys(override), + ]); + for (const key of Array.from(allKeys).sort()) { + const originalValue: unknown = (original as any)[key]; + const overrideValue: unknown = (override as any)[key]; + if (originalValue == null) { + result[key] = overrideValue; + } else if (overrideValue == null) { + result[key] = originalValue; + } else { + result[key] = merge(originalValue, overrideValue); + } + } + return result; + } + return override; + } +} + +export default config; diff --git a/lerna.json b/lerna.json index 5249dcad98..8c08d9568b 100644 --- a/lerna.json +++ b/lerna.json @@ -10,5 +10,5 @@ "rejectCycles": true } }, - "version": "1.13.0" + "version": "1.21.0" } diff --git a/package.json b/package.json index ac5f24a32d..ffb5c48f0e 100644 --- a/package.json +++ b/package.json @@ -8,26 +8,31 @@ "lint:fix": "lerna run lint:fix --stream --sort", "bump": "bash scripts/bump.sh", "dist-clean": "lerna run dist-clean --stream && rm -rf dist", - "fetch-dotnet-snk": "bash scripts/fetch-dotnet-snk.sh", "package": "bash scripts/package.sh", "test": "lerna run test --concurrency=1 --stream", "test:integ": "lerna run test:integ --stream", "test:update": "lerna run test:update --concurrency=1 --stream" }, "devDependencies": { - "@typescript-eslint/eslint-plugin": "^4.4.1", - "@typescript-eslint/parser": "^4.4.1", - "all-contributors-cli": "^6.19.0", - "eslint": "^7.11.0", - "eslint-config-prettier": "^6.12.0", + "@jest/types": "^26.6.2", + "@typescript-eslint/eslint-plugin": "^4.15.0", + "@typescript-eslint/parser": "^4.15.0", + "all-contributors-cli": "^6.20.0", + "eslint": "^7.19.0", + "eslint-config-prettier": "^7.2.0", "eslint-import-resolver-node": "^0.3.4", "eslint-import-resolver-typescript": "^2.3.0", "eslint-plugin-import": "^2.22.1", - "eslint-plugin-prettier": "^3.1.4", + "eslint-plugin-prettier": "^3.3.1", + "jest-circus": "^26.6.3", + "jest-config": "^26.6.3", + "jest-expect-message": "^1.0.2", "lerna": "^3.22.1", - "prettier": "^2.1.2", - "standard-version": "^9.0.0", - "typescript": "~3.9.7" + "prettier": "^2.2.1", + "standard-version": "^9.1.0", + "ts-jest": "^26.5.1", + "ts-node": "^9.1.1", + "typescript": "~3.9.9" }, "repository": { "type": "git", diff --git a/packages/@jsii/Directory.Build.targets b/packages/@jsii/Directory.Build.targets index 4ce0b00393..4560114102 100644 --- a/packages/@jsii/Directory.Build.targets +++ b/packages/@jsii/Directory.Build.targets @@ -2,23 +2,20 @@ - - - - + + + - - - + + + - + - + - - diff --git a/packages/@jsii/dotnet-runtime-test/package.json b/packages/@jsii/dotnet-runtime-test/package.json index 8e28620ce0..ef3f050780 100644 --- a/packages/@jsii/dotnet-runtime-test/package.json +++ b/packages/@jsii/dotnet-runtime-test/package.json @@ -31,9 +31,9 @@ }, "devDependencies": { "@jsii/dotnet-runtime": "^0.0.0", - "@types/node": "^10.17.39", - "jsii-calc": "^0.0.0", + "@types/node": "^10.17.51", + "jsii-calc": "^3.20.120", "jsii-pacmak": "^0.0.0", - "typescript": "~3.9.7" + "typescript": "~3.9.9" } } diff --git a/packages/@jsii/dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests.FSharp/Amazon.JSII.Runtime.IntegrationTests.FSharp.fsproj b/packages/@jsii/dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests.FSharp/Amazon.JSII.Runtime.IntegrationTests.FSharp.fsproj index 6885d9d77c..43ff8ed915 100644 --- a/packages/@jsii/dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests.FSharp/Amazon.JSII.Runtime.IntegrationTests.FSharp.fsproj +++ b/packages/@jsii/dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests.FSharp/Amazon.JSII.Runtime.IntegrationTests.FSharp.fsproj @@ -3,6 +3,9 @@ netcoreapp3.1 + true + AllEnabledByDefault + enable true @@ -27,7 +30,6 @@ - diff --git a/packages/@jsii/dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/Amazon.JSII.Runtime.IntegrationTests.csproj b/packages/@jsii/dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/Amazon.JSII.Runtime.IntegrationTests.csproj index 844685f567..411ca0bdcb 100644 --- a/packages/@jsii/dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/Amazon.JSII.Runtime.IntegrationTests.csproj +++ b/packages/@jsii/dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/Amazon.JSII.Runtime.IntegrationTests.csproj @@ -5,6 +5,9 @@ false + true + AllEnabledByDefault + enable true @@ -24,7 +27,6 @@ - diff --git a/packages/@jsii/dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/ServiceContainerFixture.cs b/packages/@jsii/dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/ServiceContainerFixture.cs index 8ee32af60b..0e5e806461 100644 --- a/packages/@jsii/dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/ServiceContainerFixture.cs +++ b/packages/@jsii/dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/ServiceContainerFixture.cs @@ -1,12 +1,15 @@ using System; using Amazon.JSII.Runtime.Deputy; using Amazon.JSII.Runtime.Services; +using Microsoft.Extensions.DependencyInjection; using Xunit.Abstractions; namespace Amazon.JSII.Runtime.IntegrationTests { public sealed class ServiceContainerFixture : IDisposable - { + { + private ServiceProvider? _serviceProvider = null; + public ServiceContainerFixture() { Environment.SetEnvironmentVariable("JSII_DEBUG", "true"); @@ -16,7 +19,7 @@ public void SetOverride(ITestOutputHelper outputHelper) { if (ServiceContainer.ServiceProviderOverride == null) { - ServiceContainer.ServiceProviderOverride = ServiceContainer.BuildServiceProvider( + ServiceContainer.ServiceProviderOverride = _serviceProvider = ServiceContainer.BuildServiceProvider( new XUnitLoggerFactory(outputHelper) ); } @@ -25,7 +28,9 @@ public void SetOverride(ITestOutputHelper outputHelper) void IDisposable.Dispose() { ServiceContainer.ServiceProviderOverride = null; + _serviceProvider?.Dispose(); + _serviceProvider = null; JsiiTypeAttributeBase.Reset(); } } -} \ No newline at end of file +} diff --git a/packages/@jsii/dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/XUnitLogger.cs b/packages/@jsii/dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/XUnitLogger.cs index ed5f69e8c9..a86031077e 100644 --- a/packages/@jsii/dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/XUnitLogger.cs +++ b/packages/@jsii/dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/XUnitLogger.cs @@ -4,33 +4,33 @@ namespace Amazon.JSII.Runtime.IntegrationTests { - public sealed class XUnitLoggerFactory : ILoggerFactory + internal sealed class XUnitLoggerFactory : ILoggerFactory { - readonly ITestOutputHelper _output; + private readonly ITestOutputHelper _output; public XUnitLoggerFactory(ITestOutputHelper output) { _output = output ?? throw new ArgumentNullException(nameof(output)); } - public void AddProvider(ILoggerProvider provider) + void ILoggerFactory.AddProvider(ILoggerProvider provider) { } - public ILogger CreateLogger(string categoryName) + ILogger ILoggerFactory.CreateLogger(string categoryName) { return new XUnitLogger(_output, categoryName); } - public void Dispose() + void IDisposable.Dispose() { } } - public sealed class XUnitLogger : ILogger, IDisposable + internal sealed class XUnitLogger : ILogger, IDisposable { - readonly ITestOutputHelper _output; - readonly string _categoryName; + private readonly ITestOutputHelper _output; + private readonly string _categoryName; public XUnitLogger(ITestOutputHelper output, string categoryName) { @@ -38,7 +38,7 @@ public XUnitLogger(ITestOutputHelper output, string categoryName) _categoryName = categoryName ?? throw new ArgumentNullException(nameof(categoryName)); } - public void Log(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func formatter) + void ILogger.Log(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func formatter) { var str = state?.ToString() ?? ""; // Only log lines starting with > or < (kernel traces) @@ -48,17 +48,17 @@ public void Log(LogLevel logLevel, EventId eventId, TState state, Except } } - public IDisposable BeginScope(TState state) + IDisposable ILogger.BeginScope(TState state) { return this; } - public bool IsEnabled(LogLevel logLevel) + bool ILogger.IsEnabled(LogLevel logLevel) { return true; } - public void Dispose() + void IDisposable.Dispose() { } } diff --git a/packages/@jsii/dotnet-runtime/.gitignore b/packages/@jsii/dotnet-runtime/.gitignore index f9ae73407a..c9cb60dbb8 100644 --- a/packages/@jsii/dotnet-runtime/.gitignore +++ b/packages/@jsii/dotnet-runtime/.gitignore @@ -5,23 +5,23 @@ test/Amazon.JSII.Tests.Calculator* src/Amazon.JSII.Runtime/jsii-runtime # generated by generate.sh -src/Amazon.JSII.Generator/JsiiVersion.cs +src/Amazon.JSII.Runtime/Services/JsiiRuntimeProvider.cs src/Directory.Build.props src/NuGet.Metadata.props -# consumed by generate.sh -!*.t.js - *.js *.d.ts node_modules/ .nyc_output/ coverage/ - *.nupkg *.snupkg bin/ cli/ obj/ *.DotSettings.user +.nuget/ + +# consumed by generate.sh +!*.t.js diff --git a/packages/@jsii/dotnet-runtime/JsiiRuntimeProvider.t.js b/packages/@jsii/dotnet-runtime/JsiiRuntimeProvider.t.js new file mode 100644 index 0000000000..1715b5c0e8 --- /dev/null +++ b/packages/@jsii/dotnet-runtime/JsiiRuntimeProvider.t.js @@ -0,0 +1,84 @@ +const fs = require('fs'); +const path = require('path'); + +const { version } = require('./package.json'); + +const resources = discoverResources(); +const entryPoint = 'bin/jsii-runtime.js'; + +process.stdout.write(`using System.CodeDom.Compiler; +using System.Reflection; + +namespace Amazon.JSII.Runtime.Services +{ + [GeneratedCode("${path.basename(__filename)}", "${version}")] + internal sealed class JsiiRuntimeProvider : IJsiiRuntimeProvider + { + private const string BAG_NAME = "jsii-runtime"; + + public JsiiRuntimeProvider(IResourceExtractor resourceExtractor) + { + // deploy embedded resources to the temp directory + var assembly = Assembly.GetExecutingAssembly(); + +${resources.map(extractResource).map(indent(12)).join('\n')} + } + + public string JsiiRuntimePath { get; } + } +} +`); + +function discoverResources( + root = path.resolve(__dirname, 'src', 'Amazon.JSII.Runtime', 'jsii-runtime'), + dir = '.', +) { + const result = []; + + for (const file of fs.readdirSync(path.resolve(root, dir))) { + // Ignore dot-files + if (file.startsWith('.')) { + continue; + } + const stat = fs.statSync(path.resolve(root, dir, file)); + if (stat.isDirectory()) { + result.push(...discoverResources(root, path.join(dir, file))); + continue; + } + result.push(path.join(dir, file)); + } + + return result; +} + +function extractResource(name) { + const parts = name.split(/[\\/]/); + for (let i = 0; i < parts.length - 1; i++) { + // Replacing - with _ in directory names + parts[i] = parts[i].replace(/-/m, '_'); + } + + // Resource names are "."-delimited (and not "/"-delimited) + const resourceName = `Amazon.JSII.Runtime.jsii_runtime.${parts.join('.')}`; + + const extract = `resourceExtractor.ExtractResource(assembly, "${resourceName}", BAG_NAME, "${name}");`; + + if (name === entryPoint) { + return `JsiiRuntimePath = ${extract}`; + } else { + return extract; + } +} + +function indent(count) { + const spaces = ' '.repeat(count); + return (str) => + str + .split('\n') + .map((x) => `${spaces}${x}`) + .join('\n'); +} + +function quote(x) { + return `"${x}"`; +} diff --git a/packages/@jsii/dotnet-runtime/build.sh b/packages/@jsii/dotnet-runtime/build.sh deleted file mode 100644 index 7978fee11a..0000000000 --- a/packages/@jsii/dotnet-runtime/build.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -set -euo pipefail - -# embed @jsii/runtime as a resource -bundle_dir="src/Amazon.JSII.Runtime/jsii-runtime" -mkdir -p ${bundle_dir} -rsync -av $(node -p 'require("path").dirname(require.resolve("@jsii/runtime/package.json"))')/webpack/ ${bundle_dir} - -# Build just Runtime and it's dependencies instead of the -# solution to avoid integration tests from trying to be -# built before the calc packages are generated. -dotnet build --force -c Release ./src/Amazon.JSII.Runtime.sln diff --git a/packages/@jsii/dotnet-runtime/generate.sh b/packages/@jsii/dotnet-runtime/generate.sh index 5a5764b0d9..4c3e70324e 100644 --- a/packages/@jsii/dotnet-runtime/generate.sh +++ b/packages/@jsii/dotnet-runtime/generate.sh @@ -5,3 +5,12 @@ src="./src" # Generate metadata files based on package.json. /usr/bin/env node ./Directory.Build.props.t.js > ${src}/Directory.Build.props /usr/bin/env node ./NuGet.Metadata.props.t.js > ${src}/NuGet.Metadata.props + +# Embed @jsii/runtime as a resource +bundle_dir="src/Amazon.JSII.Runtime/jsii-runtime" +mkdir -p ${bundle_dir} +rsync -av $(node -p 'require("path").dirname(require.resolve("@jsii/runtime/package.json"))')/webpack/ ${bundle_dir} + + +# Generate Source +/usr/bin/env node ./JsiiRuntimeProvider.t.js > ${src}/Amazon.JSII.Runtime/Services/JsiiRuntimeProvider.cs diff --git a/packages/@jsii/dotnet-runtime/package.json b/packages/@jsii/dotnet-runtime/package.json index e3f1079019..36a8eec561 100644 --- a/packages/@jsii/dotnet-runtime/package.json +++ b/packages/@jsii/dotnet-runtime/package.json @@ -31,18 +31,18 @@ "types": "lib/index.d.ts", "scripts": { "gen": "bash ./generate.sh", - "build": "npm run gen && tsc --build && bash ./build.sh", - "dist-clean": "rm -rf dist && dotnet clean -c Release ./src/Amazon.JSII.Runtime.sln", - "test": "bash ./test.sh", + "build": "npm run gen && tsc --build && dotnet build --force -c Release src/Amazon.JSII.Runtime.sln", + "dist-clean": "rm -rf dist && dotnet clean -c Release src/Amazon.JSII.Runtime.sln", + "test": "dotnet test -c Release src/Amazon.JSII.Runtime.sln", "test:update": "UPDATE_DIFF=1 npm run test", - "package": "package-dotnet ./src/Amazon.JSII.Runtime.sln && package-private" + "package": "package-dotnet src/Amazon.JSII.Runtime.sln && package-private" }, "devDependencies": { "@jsii/runtime": "^0.0.0", - "@types/node": "^10.17.39", + "@types/node": "^10.17.51", "@types/semver": "^7.3.4", "jsii-build-tools": "^0.0.0", - "semver": "^7.3.2", - "typescript": "~3.9.7" + "semver": "^7.3.4", + "typescript": "~3.9.9" } } diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Analyzers.UnitTests/Amazon.JSII.Analyzers.UnitTests.csproj b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Analyzers.UnitTests/Amazon.JSII.Analyzers.UnitTests.csproj index f1ad302f8f..31acdd2ac4 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Analyzers.UnitTests/Amazon.JSII.Analyzers.UnitTests.csproj +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Analyzers.UnitTests/Amazon.JSII.Analyzers.UnitTests.csproj @@ -5,6 +5,9 @@ false Amazon.JSII.Analyzers.UnitTests + true + AllEnabledByDefault + enable true @@ -16,7 +19,6 @@ - diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Analyzers/Amazon.JSII.Analyzers.csproj b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Analyzers/Amazon.JSII.Analyzers.csproj index 45995b8d22..b59a7f6aca 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Analyzers/Amazon.JSII.Analyzers.csproj +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Analyzers/Amazon.JSII.Analyzers.csproj @@ -7,13 +7,15 @@ netstandard2.0 true icon.png + + true + AllEnabledByDefault - @@ -21,7 +23,7 @@ - + diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.JsonModel/Amazon.JSII.JsonModel.csproj b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.JsonModel/Amazon.JSII.JsonModel.csproj index e7f3556a73..aca3945e0b 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.JsonModel/Amazon.JSII.JsonModel.csproj +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.JsonModel/Amazon.JSII.JsonModel.csproj @@ -7,12 +7,14 @@ [DEPRECATED] .NET JsonModel for JSII icon.png + true + AllEnabledByDefault + enable true - diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/Amazon.JSII.Runtime.UnitTests.csproj b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/Amazon.JSII.Runtime.UnitTests.csproj index 5e27a0d1ae..1a41780b23 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/Amazon.JSII.Runtime.UnitTests.csproj +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/Amazon.JSII.Runtime.UnitTests.csproj @@ -5,6 +5,9 @@ Amazon.JSII.Runtime.UnitTests false + true + AllEnabledByDefault + enable true @@ -16,7 +19,6 @@ - diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/Client/RuntimeTests.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/Client/RuntimeTests.cs index 1f433a0cbe..632d6486cc 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/Client/RuntimeTests.cs +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/Client/RuntimeTests.cs @@ -11,17 +11,15 @@ public sealed class RuntimeTests private const string Prefix = "Runtime."; private INodeProcess _nodeProcessMock; - + private IRuntime _sut; public RuntimeTests() { _nodeProcessMock = Substitute.For(); var standardOutputMock = Substitute.For(); - var standardErrorMock = Substitute.For(); _nodeProcessMock.StandardOutput.Returns(standardOutputMock); - _nodeProcessMock.StandardError.Returns(standardErrorMock); _sut = new Services.Runtime(_nodeProcessMock); } @@ -30,10 +28,9 @@ public RuntimeTests() public void ThrowsJsiiExceptionWhenResponseNotReceived() { _nodeProcessMock.StandardOutput.ReadLine().ReturnsNull(); - _nodeProcessMock.StandardError.ReadToEnd().Returns("This is a test."); var ex = Assert.Throws(() => _sut.ReadResponse()); - Assert.Equal("Child process exited unexpectedly: This is a test.", ex.Message); + Assert.Equal("Child process exited unexpectedly!", ex.Message); } } -} \ No newline at end of file +} diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/Deputy/DeputyBaseTests.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/Deputy/DeputyBaseTests.cs new file mode 100644 index 0000000000..5c91886f0b --- /dev/null +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/Deputy/DeputyBaseTests.cs @@ -0,0 +1,55 @@ +using Amazon.JSII.Runtime.Deputy; +using System; +using Amazon.JSII.Runtime.Services; +using Microsoft.Extensions.DependencyInjection; +using NSubstitute; +using Xunit; + +namespace Amazon.JSII.Runtime.UnitTests.Deputy +{ + public sealed class DeputyBaseTests: IDisposable + { + const string Prefix = "Runtime.Deputy." + nameof(DeputyBase) + "."; + + private readonly ServiceProvider _serviceProvider; + + public DeputyBaseTests() + { + ServiceContainer.ServiceProviderOverride = _serviceProvider = new ServiceCollection() + .AddLogging() + .AddSingleton() + .AddSingleton() + .BuildServiceProvider(); + } + + void IDisposable.Dispose() + { + ServiceContainer.ServiceProviderOverride = null; + } + + [Fact(DisplayName = Prefix + nameof(CanCastToAnyInterface))] + public void CanCastToAnyInterface() + { + var subject = new AnonymousObject(new ByRefValue("object@10000", Array.Empty())); + var result = subject.UnsafeCast(); + Assert.IsType(result); + } + + [JsiiInterface(typeof(IManagedInterface), "test.IManagedInterface")] + private interface IManagedInterface + { + bool BooleanProperty { get; } + } + + [JsiiTypeProxy(typeof(IManagedInterface), "test.IManagedInterface")] + private class ManagedInterfaceProxy : DeputyBase, IManagedInterface + { + public ManagedInterfaceProxy(ByRefValue byRef): base(byRef) + { + BooleanProperty = true; + } + + public bool BooleanProperty { get; } + } + } +} diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Amazon.JSII.Runtime.csproj b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Amazon.JSII.Runtime.csproj index 72153fd8ea..9a5afea231 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Amazon.JSII.Runtime.csproj +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Amazon.JSII.Runtime.csproj @@ -7,6 +7,9 @@ .NET Runtime for JSII icon.png + true + AllEnabledByDefault + enable true @@ -15,13 +18,11 @@ - - - + diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Deputy/AnonymousObject.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Deputy/AnonymousObject.cs index 23d11236dd..f40e33b849 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Deputy/AnonymousObject.cs +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Deputy/AnonymousObject.cs @@ -2,7 +2,7 @@ namespace Amazon.JSII.Runtime.Deputy { internal sealed class AnonymousObject : DeputyBase { - AnonymousObject(ByRefValue byRefValue) : base(byRefValue) + internal AnonymousObject(ByRefValue byRefValue) : base(byRefValue) { } } diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Deputy/DeputyBase.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Deputy/DeputyBase.cs index e3aab5b871..5d77f36cb5 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Deputy/DeputyBase.cs +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Deputy/DeputyBase.cs @@ -7,9 +7,13 @@ using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; +using System.Globalization; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; +using System.Security.Authentication.ExtendedProtection; +using Newtonsoft.Json; +using Type = System.Type; namespace Amazon.JSII.Runtime.Deputy { @@ -116,7 +120,7 @@ protected DeputyBase(ByRefValue reference) referenceMap.AddNativeReference(Reference, this); } - public ByRefValue Reference { get; } + internal ByRefValue Reference { get; } #region GetProperty @@ -127,7 +131,7 @@ protected static T GetStaticProperty(System.Type type, [CallerMemberName] str propertyName = propertyName ?? throw new ArgumentNullException(nameof(propertyName)); JsiiTypeAttributeBase.Load(type.Assembly); - + var classAttribute = ReflectionUtils.GetClassAttribute(type)!; var propertyAttribute = GetStaticPropertyAttribute(type, propertyName); @@ -178,7 +182,7 @@ protected static void SetStaticProperty(System.Type type, T value, [CallerMem propertyName = propertyName ?? throw new ArgumentNullException(nameof(propertyName)); JsiiTypeAttributeBase.Load(type.Assembly); - + var classAttribute = ReflectionUtils.GetClassAttribute(type)!; var propertyAttribute = GetStaticPropertyAttribute(type, propertyName); @@ -229,12 +233,12 @@ protected void InvokeInstanceVoidMethod(System.Type[] parameterTypes, object?[] { InvokeInstanceMethod(parameterTypes, arguments, methodName); } - + [return: MaybeNull] protected static T InvokeStaticMethod(System.Type type, System.Type[] parameterTypes, object?[] arguments, [CallerMemberName] string methodName = "") { JsiiTypeAttributeBase.Load(type.Assembly); - + var methodAttribute = GetStaticMethodAttribute(type, methodName, parameterTypes); var classAttribute = ReflectionUtils.GetClassAttribute(type)!; @@ -289,7 +293,7 @@ private static T InvokeMethodCore( { throw new NotSupportedException($"Could not convert result '{result}' for method '{methodAttribute.Name}'"); } - + return (T)frameworkValue!; object? GetResult() @@ -466,99 +470,137 @@ private static JsiiMethodAttribute GetMethodAttributeCore(System.Type type, stri } #endregion - + #region IConvertible - + + /// + /// Unsafely obtains a proxy of a given type for this instance. This method allows obtaining a proxy instance + /// that is not known to be supported by the backing object instance; in which case the behavior of any + /// operation that is not supported by the backing instance is undefined. + /// + /// + /// A jsii-managed interface to obtain a proxy for. + /// This interface must carry a attribute. + /// + /// + /// An instance of T + /// + /// + /// If the type provided for T does not carry the attribute. + /// + public T UnsafeCast() where T: class + { + if (this is T result) + { + return result; + } + + try + { + return (T) Convert.ChangeType(this, typeof(T), CultureInfo.InvariantCulture); + } + catch (InvalidCastException) + { + // At this point, we are converting to a type that we don't know for sure is applicable + if (MakeProxy(typeof(T), true, out var proxy)) + { + return (T)proxy; + } + + throw; + } + } + private IDictionary Proxies { get; } = new Dictionary(); - + TypeCode IConvertible.GetTypeCode() { return TypeCode.Object; } - + object IConvertible.ToType(System.Type conversionType, IFormatProvider? provider) { if (Proxies.ContainsKey(conversionType)) { return Proxies[conversionType]; } - + if (ToTypeCore(out var converted)) { return Proxies[conversionType] = converted!; } - + throw new InvalidCastException($"Unable to cast {this.GetType().FullName} into {conversionType.FullName}"); - + bool ToTypeCore(out object? result) { - if (conversionType.IsInstanceOfType(this)) - { - result = this; - return true; - } - - if (!conversionType.IsInterface || Reference.Interfaces.Length == 0) - { - // We can only convert to interfaces that are declared on the Reference. - result = null; - return false; - } + if (!conversionType.IsInstanceOfType(this)) return MakeProxy(conversionType, false, out result); - var interfaceAttribute = conversionType.GetCustomAttribute(); - if (interfaceAttribute == null) - { - // We can only convert to interfaces decorated with the JsiiInterfaceAttribute - result = null; - return false; - } + result = this; + return true; - var types = ServiceContainer.ServiceProvider.GetRequiredService(); - - if (!TryFindSupportedInterface(interfaceAttribute.FullyQualifiedName, Reference.Interfaces, types, out var adequateFqn)) - { - // We can only convert to interfaces declared by this Reference - result = null; - return false; - } - - var proxyType = types.GetProxyType(interfaceAttribute.FullyQualifiedName); - var constructorInfo = proxyType.GetConstructor( - BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, - null, - new[] {typeof(ByRefValue)}, - null - ); - if (constructorInfo == null) - { - throw new JsiiException($"Could not find constructor to instantiate {proxyType.FullName}"); - } + } + } - result = constructorInfo.Invoke(new object[]{ Reference.ForProxy() }); - return true; + private bool MakeProxy(Type interfaceType, bool force, [NotNullWhen(true)] out object? result) + { + if (!interfaceType.IsInterface) + { + result = null; + return false; + } - bool TryFindSupportedInterface(string declaredFqn, string[] availableFqns, ITypeCache types, out string? foundFqn) - { - var declaredType = types.GetInterfaceType(declaredFqn); + var interfaceAttribute = interfaceType.GetCustomAttribute(); + if (interfaceAttribute == null) + { + // We can only convert to interfaces decorated with the JsiiInterfaceAttribute + result = null; + return false; + } - foreach (var candidate in availableFqns) - { - var candidateType = types.GetInterfaceType(candidate); - if (declaredType.IsAssignableFrom(candidateType)) - { - foundFqn = candidate; - return true; - } - } - - foundFqn = null; - return false; + var types = ServiceContainer.ServiceProvider.GetRequiredService(); + + if (!TryFindSupportedInterface(interfaceAttribute.FullyQualifiedName, Reference.Interfaces, types, out var adequateFqn)) + { + // We can only convert to interfaces declared by this Reference + result = null; + return false; + } + + var proxyType = types.GetProxyType(interfaceAttribute.FullyQualifiedName); + var constructorInfo = proxyType.GetConstructor( + BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, + null, + new[] {typeof(ByRefValue)}, + null + ); + if (constructorInfo == null) + { + throw new JsiiException($"Could not find constructor to instantiate {proxyType.FullName}"); + } + + result = constructorInfo.Invoke(new object[]{ Reference.ForProxy() }); + return true; + + bool TryFindSupportedInterface(string declaredFqn, string[] availableFqns, ITypeCache types, out string? foundFqn) + { + var declaredType = types.GetInterfaceType(declaredFqn); + + foreach (var candidate in availableFqns) + { + var candidateType = types.GetInterfaceType(candidate); + if (!declaredType.IsAssignableFrom(candidateType)) continue; + foundFqn = candidate; + return true; } + + foundFqn = declaredFqn; + return force; } } #region Impossible Conversions - + bool IConvertible.ToBoolean(IFormatProvider? provider) { throw new InvalidCastException(); @@ -568,17 +610,17 @@ byte IConvertible.ToByte(IFormatProvider? provider) { throw new InvalidCastException(); } - + char IConvertible.ToChar(IFormatProvider? provider) { throw new InvalidCastException(); } - + DateTime IConvertible.ToDateTime(IFormatProvider? provider) { throw new InvalidCastException(); } - + decimal IConvertible.ToDecimal(IFormatProvider? provider) { throw new InvalidCastException(); @@ -635,7 +677,7 @@ ulong IConvertible.ToUInt64(IFormatProvider? provider) } #endregion - + #endregion } } diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/INodeProcess.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/INodeProcess.cs index 344cab0303..78c5361bb4 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/INodeProcess.cs +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/INodeProcess.cs @@ -8,7 +8,5 @@ internal interface INodeProcess : IDisposable TextWriter StandardInput { get; } TextReader StandardOutput { get; } - - TextReader StandardError { get; } } } diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/JsiiRuntimeProvider.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/JsiiRuntimeProvider.cs deleted file mode 100644 index 619d2c21bf..0000000000 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/JsiiRuntimeProvider.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System.Reflection; - -namespace Amazon.JSII.Runtime.Services -{ - internal sealed class JsiiRuntimeProvider : IJsiiRuntimeProvider - { - private const string ENTRYPOINT = "jsii-runtime.js"; - - public JsiiRuntimeProvider(IResourceExtractor resourceExtractor) - { - string[] files = { ENTRYPOINT, ENTRYPOINT + ".map" }; - - // deploy embedded resources to the temp directory - var assembly = Assembly.GetExecutingAssembly(); - foreach (var name in files) - { - var resourceName = "Amazon.JSII.Runtime.jsii_runtime." + name; - var path = resourceExtractor.ExtractResource(assembly, resourceName, "jsii-runtime", name); - - if (name == ENTRYPOINT) - { - JsiiRuntimePath = path; - } - } - } - - public string? JsiiRuntimePath { get; } - } -} diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/NodeProcess.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/NodeProcess.cs index 71f4367992..721debb878 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/NodeProcess.cs +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/NodeProcess.cs @@ -3,21 +3,28 @@ using System.Globalization; using System.IO; using System.Reflection; +using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Text; +using System.Threading; using Microsoft.Extensions.Logging; +using Newtonsoft.Json; namespace Amazon.JSII.Runtime.Services { internal sealed class NodeProcess : INodeProcess { readonly Process _process; + private readonly Thread _stderrSink; readonly ILogger _logger; + private const string JsiiRuntime = "JSII_RUNTIME"; private const string JsiiDebug = "JSII_DEBUG"; private const string JsiiAgent = "JSII_AGENT"; private const string JsiiAgentVersionString = "DotNet/{0}/{1}/{2}"; + private bool Disposed = false; + public NodeProcess(IJsiiRuntimeProvider jsiiRuntimeProvider, ILoggerFactory loggerFactory) { loggerFactory = loggerFactory ?? throw new ArgumentNullException(nameof(loggerFactory)); @@ -28,48 +35,124 @@ public NodeProcess(IJsiiRuntimeProvider jsiiRuntimeProvider, ILoggerFactory logg runtimePath = jsiiRuntimeProvider.JsiiRuntimePath; var utf8 = new UTF8Encoding(false /* no BOM */); - _process = new Process + var startInfo = new ProcessStartInfo { - StartInfo = new ProcessStartInfo - { - FileName = "node", - Arguments = $"--max-old-space-size=4096 {runtimePath}", - RedirectStandardInput = true, - StandardInputEncoding = utf8, - RedirectStandardOutput = true, - StandardOutputEncoding = utf8, - RedirectStandardError = true, - StandardErrorEncoding = utf8 - } + FileName = "node", + Arguments = $"--max-old-space-size=4096 {runtimePath}", + RedirectStandardInput = true, + StandardInputEncoding = utf8, + RedirectStandardOutput = true, + StandardOutputEncoding = utf8, + RedirectStandardError = true, + StandardErrorEncoding = utf8, + UseShellExecute = false, }; var assemblyVersion = GetAssemblyFileVersion(); - _process.StartInfo.EnvironmentVariables.Add(JsiiAgent, + startInfo.EnvironmentVariables.Add(JsiiAgent, string.Format(CultureInfo.InvariantCulture, JsiiAgentVersionString, Environment.Version, assemblyVersion.Item1, assemblyVersion.Item2)); var debug = Environment.GetEnvironmentVariable(JsiiDebug); - if (!string.IsNullOrWhiteSpace(debug) && !_process.StartInfo.EnvironmentVariables.ContainsKey(JsiiDebug)) - _process.StartInfo.EnvironmentVariables.Add(JsiiDebug, debug); + if (!string.IsNullOrWhiteSpace(debug) && !startInfo.EnvironmentVariables.ContainsKey(JsiiDebug)) + startInfo.EnvironmentVariables.Add(JsiiDebug, debug); _logger.LogDebug("Starting jsii runtime..."); - _logger.LogDebug($"{_process.StartInfo.FileName} {_process.StartInfo.Arguments}"); + _logger.LogDebug($"{startInfo.FileName} {startInfo.Arguments}"); - _process.Start(); - } + // Registering shutdown hook to have JS process gracefully terminate. + AppDomain.CurrentDomain.ProcessExit += (snd, evt) => { + ((IDisposable)this).Dispose(); + }; - public TextWriter StandardInput => _process.StandardInput; + _process = Process.Start(startInfo); - public TextReader StandardOutput => _process.StandardOutput; + StandardInput = _process.StandardInput; + StandardOutput = _process.StandardOutput; - public TextReader StandardError => _process.StandardError; + _stderrSink = new Thread(StderrSink); + _stderrSink.Name = "NodeProcess.StderrSink"; + // Background threads don't prevent the VM from exiting + _stderrSink.IsBackground = true; + _stderrSink.Start(); + + void StderrSink() + { + string? line; + using (var standardError = _process.StandardError) + using (Stream stderr = Console.OpenStandardError()) + using (Stream stdout = Console.OpenStandardOutput()) + { + while ((line = standardError.ReadLine()) != null) + { + try { + var entry = JsonConvert.DeserializeObject(line); + if (entry.Stderr != null) + { + byte[] buffer = Convert.FromBase64String(entry.Stderr); + stderr.Write(buffer, 0, buffer.Length); + } + if (entry.Stdout != null) + { + byte[] buffer = Convert.FromBase64String(entry.Stdout); + stdout.Write(buffer, 0, buffer.Length); + } + } + catch + { + // Could not parse line - so just coying to stderr + Console.Error.WriteLine(line); + } + } + } + } + } + + public TextWriter StandardInput { get; } + + public TextReader StandardOutput { get; } + + [MethodImpl(MethodImplOptions.Synchronized)] void IDisposable.Dispose() { - StandardInput.Dispose(); - StandardOutput.Dispose(); - StandardError.Dispose(); - _process.Dispose(); + if (Disposed) return; + + Disposed = true; + + using (_process) + { + if (!_process.HasExited) + { + // Write "exit" message + StandardInput.WriteLine("{\"exit\":0}");; + } + + StandardInput.Dispose(); + StandardOutput.Dispose(); + + // Give the STDERR sink thread 5 seconds to finish consuming outstanding buffers + _stderrSink.Join(5_000); + + try + { + // Give the kernel 5 seconds to clean up after itself + if (!_process.WaitForExit(5_000)) { + // Kill the child process if needed + _process.Kill(); + } + } + catch (InvalidOperationException) + { + // This means the process had already exited, because it was faster to clean up + // than we were to process it's termination. We still re-check if the process has + // exited and re-throw if not (meaning it was a different issue). + if (!_process.HasExited) + { + throw; + } + } + } } /// @@ -89,5 +172,11 @@ private static Tuple GetAssemblyFileVersion() assemblyFileVersionAttribute?.Version ?? "Unknown" ); } + + private sealed class ConsoleEntry + { + public string? Stderr { get; set; } + public string? Stdout { get; set; } + } } } diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/ResourceExtractor.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/ResourceExtractor.cs index 2263f914aa..c6c93c133f 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/ResourceExtractor.cs +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/ResourceExtractor.cs @@ -3,17 +3,20 @@ using System.IO; using System.Reflection; using System.Collections.Generic; +using Microsoft.Extensions.Logging; namespace Amazon.JSII.Runtime.Services { internal sealed class ResourceExtractor : IResourceExtractor { - readonly IDictionary _bags = new Dictionary(); - readonly IFileSystem _fileSystem; + private readonly IDictionary _bags = new Dictionary(); + private readonly IFileSystem _fileSystem; + private readonly ILogger _logger; - public ResourceExtractor(IFileSystem fileSystem) + public ResourceExtractor(IFileSystem fileSystem, ILoggerFactory loggerFactory) { _fileSystem = fileSystem; + _logger = loggerFactory.CreateLogger(); } public string ExtractResource(Assembly assembly, string resourceName, string bag, string? fileName) @@ -26,12 +29,19 @@ public string ExtractResource(Assembly assembly, string resourceName, string bag } var outputPath = Path.Combine(workingDirectory, fileName ?? resourceName); + + // In case the fileName included path delimiters... + var outputDir = Path.GetDirectoryName(outputPath); + if (outputDir != null && !_fileSystem.Directory.Exists(outputDir)) + { + _fileSystem.Directory.CreateDirectory(outputDir); + } using (var output = _fileSystem.File.Create(outputPath)) { using var stream = assembly.GetManifestResourceStream(resourceName); if (stream == null) { - throw new JsiiException("Cannot find embedded resource: " + resourceName + " in assembly " + assembly.GetName(), null); + throw new JsiiException($"Cannot find embedded resource: {resourceName} in {String.Join(", ", assembly.GetManifestResourceNames())}", null); } stream.CopyTo(output); @@ -44,7 +54,14 @@ void IDisposable.Dispose() { foreach (var workdir in _bags.Values) { - Directory.Delete(workdir, true); + try + { + Directory.Delete(workdir, true); + } + catch (Exception e) + { + _logger.LogError(e, $"Error cleaning up working directory {workdir}: {e.Message}"); + } } } } diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/Runtime.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/Runtime.cs index d624257822..7e2adadb4a 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/Runtime.cs +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/Runtime.cs @@ -1,5 +1,4 @@ ๏ปฟusing System; -using System.Threading.Tasks; namespace Amazon.JSII.Runtime.Services { @@ -10,10 +9,6 @@ internal sealed class Runtime : IRuntime public Runtime(INodeProcess nodeProcess) { _nodeProcess = nodeProcess ?? throw new ArgumentNullException(nameof(nodeProcess)); - if (Environment.GetEnvironmentVariable("JSII_DEBUG") != null) - { - Task.Run(() => RedirectStandardError()); - } } public string ReadResponse() @@ -21,8 +16,7 @@ public string ReadResponse() var response = _nodeProcess.StandardOutput.ReadLine(); if (string.IsNullOrEmpty(response)) { - var errorMessage = _nodeProcess.StandardError.ReadToEnd(); - throw new JsiiException("Child process exited unexpectedly: " + errorMessage); + throw new JsiiException("Child process exited unexpectedly!"); } return response; @@ -43,13 +37,5 @@ public void WriteRequest(string request) _nodeProcess.StandardInput.WriteLine(request); _nodeProcess.StandardInput.Flush(); } - - private void RedirectStandardError() - { - while (true) - { - Console.Error.WriteLine(_nodeProcess.StandardError.ReadLine()); - } - } } } diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/ServiceContainer.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/ServiceContainer.cs index 42e74f7bee..cb75507921 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/ServiceContainer.cs +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/ServiceContainer.cs @@ -18,7 +18,7 @@ public static class ServiceContainer internal static IServiceProvider ServiceProvider => ServiceProviderOverride ?? _serviceProvider.Value; - public static IServiceProvider BuildServiceProvider(ILoggerFactory? loggerFactoryOverride = null) + public static ServiceProvider BuildServiceProvider(ILoggerFactory? loggerFactoryOverride = null) { IServiceCollection serviceCollection = new ServiceCollection(); @@ -43,7 +43,7 @@ public static IServiceProvider BuildServiceProvider(ILoggerFactory? loggerFactor serviceCollection.AddSingleton(); serviceCollection.AddTransient(); - IServiceProvider serviceProvider = serviceCollection.BuildServiceProvider(); + ServiceProvider serviceProvider = serviceCollection.BuildServiceProvider(); IClient client = serviceProvider.GetRequiredService(); client.Hello(); diff --git a/packages/@jsii/dotnet-runtime/src/NuGet.Config b/packages/@jsii/dotnet-runtime/src/NuGet.Config new file mode 100644 index 0000000000..00fb09ef41 --- /dev/null +++ b/packages/@jsii/dotnet-runtime/src/NuGet.Config @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/packages/@jsii/dotnet-runtime/test.sh b/packages/@jsii/dotnet-runtime/test.sh deleted file mode 100644 index 7de688f3cf..0000000000 --- a/packages/@jsii/dotnet-runtime/test.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -set -euo pipefail - -# Run unit tests -echo "Running library unit tests" -dotnet test -c Release ./src/Amazon.JSII.Runtime.sln diff --git a/packages/@jsii/go-runtime/.eslintrc.yaml b/packages/@jsii/go-runtime/.eslintrc.yaml new file mode 100644 index 0000000000..308d08c432 --- /dev/null +++ b/packages/@jsii/go-runtime/.eslintrc.yaml @@ -0,0 +1,8 @@ +--- +extends: ../../../eslint-config.yaml +rules: + 'import/no-extraneous-dependencies': + - error + - devDependencies: ['**/build-tools/**'] # Only allow importing devDependencies from tests + optionalDependencies: false # Disallow importing optional dependencies (those shouldn't be used here) + peerDependencies: false # Disallow importing peer dependencies (those shouldn't be used here) diff --git a/packages/@jsii/go-runtime/.gitignore b/packages/@jsii/go-runtime/.gitignore index 8d293c96e0..deeeb002ec 100644 --- a/packages/@jsii/go-runtime/.gitignore +++ b/packages/@jsii/go-runtime/.gitignore @@ -1,2 +1,5 @@ /jsii-calc/ *.generated.go + +*.js +*.d.ts diff --git a/packages/@jsii/go-runtime/README.md b/packages/@jsii/go-runtime/README.md new file mode 100644 index 0000000000..62487c3590 --- /dev/null +++ b/packages/@jsii/go-runtime/README.md @@ -0,0 +1,22 @@ +# JSII Go Runtime + +This is a go module used for communicating between jsii-pacmak generated go code and the JSII node process. JSII modules, when compiled into go modules, depend on this package and call the various functions in `jsii-runtime-go/runtime.go` to setup and communicate with the JSII kernel process. + +To see what this looks like in practice you can perform the following steps: +1. Clone the repository and build all packages with `yarn install && yarn build` from the root +2. Navigate to the `packages/@jsii/go-runtime` directory +3. run `yarn test:calc` + +This will run code generation against all of the jsii-calc modules and place the built go modules into the `jsii-calc/golang` directory. The code in `jsii-calc-test` imports these generated modules and can be used to test runtime functionality. `yarn test:calc` also runs `go run ./jsii-calc-test`. + +## Development Workflow + +Unit tests are run with `go test`. New unit test files can be added in the `jsii-runtime-go` directory. + +The `jsii-calc-test` module contains the integration test suite. + +#### Test Commands + +- `yarn test:unit` - run unit tests +- `yarn test:calc` - run `jsii-calc-test` module binary +- `yarn test` - runs unit and integration tests diff --git a/packages/@jsii/go-runtime/build-tools/_constants.ts b/packages/@jsii/go-runtime/build-tools/_constants.ts index 1b16c657fb..6193453d99 100644 --- a/packages/@jsii/go-runtime/build-tools/_constants.ts +++ b/packages/@jsii/go-runtime/build-tools/_constants.ts @@ -8,7 +8,6 @@ export function runCommand( const result = spawnSync(command, args, { ...opts, shell: process.platform === 'win32', - stdio: 'inherit', }); if (result.error) { throw result.error; diff --git a/packages/@jsii/go-runtime/build-tools/gen-calc.ts b/packages/@jsii/go-runtime/build-tools/gen-calc.ts index f879fe2372..bbdeb1c82b 100644 --- a/packages/@jsii/go-runtime/build-tools/gen-calc.ts +++ b/packages/@jsii/go-runtime/build-tools/gen-calc.ts @@ -2,6 +2,7 @@ import { removeSync } from 'fs-extra'; import { join, resolve } from 'path'; + import { runCommand } from './_constants'; const genRoot = join(__dirname, '..', 'jsii-calc'); @@ -19,4 +20,5 @@ runCommand( '--recurse', resolve(__dirname, '..', '..', '..', 'jsii-calc'), ], + { stdio: 'inherit' }, ); diff --git a/packages/@jsii/go-runtime/build-tools/gen.ts b/packages/@jsii/go-runtime/build-tools/gen.ts index 6b83fcdc96..aaaeb51900 100644 --- a/packages/@jsii/go-runtime/build-tools/gen.ts +++ b/packages/@jsii/go-runtime/build-tools/gen.ts @@ -1,7 +1,7 @@ #!/usr/bin/env npx ts-node import { CodeMaker } from 'codemaker'; -import { readdirSync, readFileSync } from 'fs'; +import { readdirSync, readFileSync, statSync } from 'fs'; import { resolve } from 'path'; const EMBEDDED_RUNTIME_ROOT = resolve( @@ -12,7 +12,7 @@ const EMBEDDED_RUNTIME_ROOT = resolve( 'webpack', ); -const OUTPUT_DIR = resolve(__dirname, '..', 'jsii-experimental'); +const OUTPUT_DIR = resolve(__dirname, '..', 'jsii-runtime-go'); const RUNTIME_FILE = 'embeddedruntime.generated.go'; const VERSION_FILE = 'version.generated.go'; @@ -24,21 +24,40 @@ code.line('package jsii'); code.line(); code.open('var embeddedruntime = map[string][]byte{'); const bytesPerLine = 16; -const files = readdirSync(EMBEDDED_RUNTIME_ROOT); const fileSize: Record = {}; -for (const file of files) { - const byteSlice = getByteSlice(resolve(EMBEDDED_RUNTIME_ROOT, file)); - fileSize[file] = byteSlice.length; - code.open(`${JSON.stringify(file)}: []byte{`); - for (let i = 0; i < byteSlice.length; i += bytesPerLine) { - const line = byteSlice.slice(i, i + bytesPerLine); - code.line(`${line.join(', ')},`); + +(function emitFiles(directory: string, prefix?: string) { + for (const file of readdirSync(directory)) { + // Ignore dot-files + if (file.startsWith('.')) { + continue; + } + const fullPath = resolve(directory, file); + + if (statSync(fullPath).isDirectory()) { + // Not using path.join because we don't want Windows delimiters here! + emitFiles(fullPath, prefix ? `${prefix}/${file}` : file); + continue; + } + + const key = prefix ? `${prefix}/${file}` : file; + + const byteSlice = getByteSlice(fullPath); + fileSize[key] = byteSlice.length; + code.open(`${JSON.stringify(key)}: []byte{`); + for (let i = 0; i < byteSlice.length; i += bytesPerLine) { + const line = byteSlice.slice(i, i + bytesPerLine); + code.line(`${line.join(', ')},`); + } + code.close('},'); } - code.close('},'); -} +})(EMBEDDED_RUNTIME_ROOT); + code.close('}'); code.line(); -const mainKey = JSON.stringify(files.find((f) => f.endsWith('.js')))!; +const mainKey = JSON.stringify( + Object.keys(fileSize).find((f) => f.endsWith('jsii-runtime.js')), +)!; code.line(`const embeddedruntimeMain = ${mainKey}`); code.line(); // This performs sanity tests upon initialization @@ -56,11 +75,13 @@ code.closeFile(RUNTIME_FILE); code.openFile(VERSION_FILE); code.line('package jsii'); code.line(); + +// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports const thisVersion = require('../package.json').version; code.line(`const version = ${JSON.stringify(thisVersion)}`); code.closeFile(VERSION_FILE); -code.save(OUTPUT_DIR); +code.save(OUTPUT_DIR).catch(console.error); function getByteSlice(path: string) { const fileData = readFileSync(path).toString('hex'); diff --git a/packages/@jsii/go-runtime/go.mod b/packages/@jsii/go-runtime/go.mod index 2ce1b320d7..57b9a15a5f 100644 --- a/packages/@jsii/go-runtime/go.mod +++ b/packages/@jsii/go-runtime/go.mod @@ -1,3 +1,17 @@ -module github.com/aws-cdk/jsii +module github.com/aws/jsii go 1.15 + +require ( + github.com/aws/jsii-runtime-go v0.0.0 + github.com/aws/jsii/jsii-calc/go/jsiicalc/v3 v3.20.120 + github.com/aws/jsii/jsii-calc/go/scopejsiicalclib v0.0.0 +) + +replace ( + github.com/aws/jsii-runtime-go v0.0.0 => ./jsii-runtime-go + github.com/aws/jsii/jsii-calc/go/jsiicalc/v3 v3.20.120 => ./jsii-calc/go/jsiicalc + github.com/aws/jsii/jsii-calc/go/scopejsiicalcbase v0.0.0 => ./jsii-calc/go/scopejsiicalcbase + github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2 v2.1.1 => ./jsii-calc/go/scopejsiicalcbaseofbase + github.com/aws/jsii/jsii-calc/go/scopejsiicalclib v0.0.0 => ./jsii-calc/go/scopejsiicalclib +) diff --git a/packages/@jsii/go-runtime/jsii-calc-test/main.go b/packages/@jsii/go-runtime/jsii-calc-test/main.go deleted file mode 100644 index 11dbd5bd1c..0000000000 --- a/packages/@jsii/go-runtime/jsii-calc-test/main.go +++ /dev/null @@ -1,21 +0,0 @@ -package main - -import ( - // "fmt" - calc "github.com/aws-cdk/jsii/jsii-calc/golang/jsiicalc" - "github.com/aws-cdk/jsii/jsii-experimental" - "math" -) - -func main() { - defer jsii.Close() - - calculator := calc.NewCalculator(calc.CalculatorProps{InitialValue: 0, MaximumValue: math.MaxFloat64}) - calculator.Add(1337) - calculator.Mul(42) - - if calculator.GetValue() != 1337.*42. { - // TODO: right now implementations are just NOOP. - // panic(fmt.Sprintf("Unexpected calculator value: expected %f, but received %f", 1337.*42., calculator.GetValue())) - } -} diff --git a/packages/@jsii/go-runtime/jsii-calc-test/main_test.go b/packages/@jsii/go-runtime/jsii-calc-test/main_test.go new file mode 100644 index 0000000000..d19d5e48ac --- /dev/null +++ b/packages/@jsii/go-runtime/jsii-calc-test/main_test.go @@ -0,0 +1,168 @@ +package main + +import ( + "fmt" + "math" + "os" + "reflect" + "strings" + "testing" + + "github.com/aws/jsii-runtime-go" + calc "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3" + param "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/submodule/param" + returnsParam "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/submodule/returnsparam" + calclib "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" +) + +func TestMain(m *testing.M) { + status := m.Run() + jsii.Close() + os.Exit(status) +} + +// Only uses first argument as initial value. This is just a convenience for +// tests that want to assert against the initialValue +func initCalculator(initialValue float64) calc.CalculatorIface { + calculatorProps := calc.CalculatorProps{InitialValue: initialValue, MaximumValue: math.MaxFloat64} + return calc.NewCalculator(&calculatorProps) +} + +func TestCalculator(t *testing.T) { + // Object creation + t.Run("Object creation", func(t *testing.T) { + calculator := initCalculator(0) + if reflect.ValueOf(calculator).IsZero() { + t.Errorf("Expected calculator object to be valid") + } + }) + + t.Run("Property access", func(t *testing.T) { + expected := float64(10) + calculator := initCalculator(expected) + actual := calculator.GetValue() + if actual != expected { + t.Errorf("Expected: %f; Actual %f;", expected, actual) + } + }) + + t.Run("Property mutation", func(t *testing.T) { + calculator := initCalculator(float64(0)) + var newVal float64 = 12345 + currentProps := calclib.NewNumber(newVal) + calculator.SetCurr(currentProps) + actual := calculator.GetValue() + if newVal != actual { + t.Errorf("Expected: %f; Actual %f;", newVal, actual) + } + }) + + t.Run("Method with side effect", func(t *testing.T) { + initial, factor := float64(10), float64(3) + calculator := initCalculator(initial) + calculator.Mul(factor) + expectedProduct := initial * factor + actualProduct := calculator.GetValue() + if actualProduct != expectedProduct { + t.Errorf("Expected quotient: %f; Actual %f;", expectedProduct, actualProduct) + } + }) + + t.Run("Method returning interface{} has embedded data", func(t *testing.T) { + calculator := initCalculator(0) + expectedTypeName := "Calculator" + actualTypeName := calculator.TypeName() + // JSII tells us this return value is an "any" type. Therefore the + // value received by go is type `interface{}` and can be further + // specialized using reflection. + switch retType := actualTypeName.(type) { + case string: + if actualTypeName != expectedTypeName { + t.Errorf("Expected type name: %s; Actual %s", expectedTypeName, actualTypeName) + } + default: + t.Errorf("Expected type: %s; Actual type: %s", "string", retType) + } + }) + + t.Run("Method with args and string return type", func(t *testing.T) { + calculator := initCalculator(0) + lhs, rhs := 10, 3 + calculator.SetCurr(calc.NewMultiply( + calclib.NewNumber(float64(lhs)), + calclib.NewNumber(float64(rhs)), + )) + expectedString := fmt.Sprintf("(%d * %d)", lhs, rhs) + actualString := calculator.ToString() + if actualString != expectedString { + t.Errorf("Expected string: %s; Actual %s;", expectedString, actualString) + } + }) +} + +func TestUpcasingReflectable(t *testing.T) { + delegate := make(map[string]interface{}) + key, val := "key1", "value1" + delegate[key] = val + upReflectable := calc.NewUpcasingReflectable(delegate) + entries := upReflectable.GetEntries() + + if len(entries) != 1 { + t.Errorf("Entries expected to have length of: 1; Actual: %d", len(entries)) + } + + entry := entries[0] + upperKey := strings.ToUpper(key) + actualKey, actualVal := entry.GetKey(), entry.GetValue() + if actualKey != upperKey { + t.Errorf("Expected Key: %s; Received Key: %s", upperKey, actualKey) + } + + if actualVal != val { + t.Errorf("Expected Value: %s; Received Value: %s", val, actualVal) + } +} + +func TestAllTypes(t *testing.T) { + allTypes := calc.NewAllTypes() + + t.Run("Array property", func(t *testing.T) { + expected1, expected2 := "val1", "val2" + allTypes.SetArrayProperty([]string{expected1, expected2}) + actual := allTypes.GetArrayProperty() + actual1, actual2 := actual[0], actual[1] + + if actual1 != expected1 || actual2 != expected2 { + t.Errorf("Expected Values: %s, %s; Received: %s, %s", expected1, expected2, actual1, actual2) + } + }) + + t.Run("Any property", func(t *testing.T) { + key, val := "key1", "val1" + expected := make(map[string]string) + expected[key] = val + allTypes.SetAnyProperty(expected) + + actual := allTypes.GetAnyProperty() + actualVal := reflect.ValueOf(actual) + switch actualVal.Kind() { + case reflect.Map: + extractedVal := reflect.ValueOf(actualVal.MapIndex(reflect.ValueOf(key)).Interface()).String() + if extractedVal != val { + t.Errorf("Expected map: %s; received: %s", expected, actual) + } + default: + t.Errorf("Expected type: %s; Actual type: %s", "map[string]string", actualVal.Type()) + } + }) +} + +func TestReturnsSpecialParam(t *testing.T) { + retSpecialParam := returnsParam.NewReturnsSpecialParameter() + val := retSpecialParam.ReturnsSpecialParam() + expected := reflect.TypeOf(¶m.SpecialParameter{}) + actual := reflect.TypeOf(val) + if actual != expected { + t.Errorf("Expected type: %s; Actual: %s", expected, actual) + } +} diff --git a/packages/@jsii/go-runtime/jsii-experimental/api.go b/packages/@jsii/go-runtime/jsii-experimental/api.go deleted file mode 100644 index 356bebc194..0000000000 --- a/packages/@jsii/go-runtime/jsii-experimental/api.go +++ /dev/null @@ -1,317 +0,0 @@ -package jsii - -import ( - "encoding/json" - "errors" -) - -// JSII Kernel API - -// Override is a public interface implementing a private method `isOverride` -// implemented by the private custom type `override`. This is embedded by -// MethodOverride and PropertyOverride to simulate the union type of Override = -// MethodOverride | PropertyOverride. -type Override interface { - isOverride() -} - -type override struct{} - -func (o override) isOverride() { - return -} - -type MethodOverride struct { - override - - Method *string `json:"method"` - Cookie *string `json:"cookie"` -} - -type PropertyOverride struct { - override - - Property *string `json:"property"` - Cookie *string `json:"cookie"` -} - -func isMethodOverride(value Override) bool { - switch value.(type) { - case MethodOverride, *MethodOverride: - return true - default: - return false - } -} - -func isPropertyOverride(value Override) bool { - switch value.(type) { - case PropertyOverride, *PropertyOverride: - return true - default: - return false - } -} - -// KernelRequest and KernelResponse allow creating a union of KernelRequest and -// KernelResponse types by defining private method implemented by a private -// custom type, which is embedded in all relevant types. -type KernelRequest interface { - isRequest() -} - -type kernelRequester struct { -} - -func (r kernelRequester) isRequest() { - return -} - -type KernelResponse interface { - isResponse() -} - -type kernelResponder struct { -} - -func (r kernelResponder) isResponse() { - return -} - -type LoadRequest struct { - kernelRequester - - Api string `json:"api"` - Name string `json:"name"` - Version string `json:"version"` - Tarball string `json:"tarball"` -} - -type LoadResponse struct { - kernelResponder - - Assembly string `json:"assembly"` - Types float64 `json:"types"` -} - -type CreateRequest struct { - kernelRequester - - Api string `json:"api"` - Fqn string `json:"fqn"` - Interfaces []string `json:"interfaces"` - Args []Any `json:"args"` - Overrides []Override `json:"overrides"` -} - -// TODO extends AnnotatedObjRef? -type CreateResponse struct { - kernelResponder -} - -type DelRequest struct { - kernelRequester - - Api string `json:"api"` - // Objref ObjRef -} - -type DelResponse struct { - kernelResponder -} - -type GetRequest struct { - kernelRequester - - Api string `json:"api"` - Property *string `json:"property"` - // Objref ObjRef -} - -type StaticGetRequest struct { - kernelRequester - - Api string `json:"api"` - Fqn *string `json:"fqn"` - Property *string `json:"property"` -} -type GetResponse struct { - kernelResponder - - Value Any `json:"value"` -} - -type StaticSetRequest struct { - kernelRequester - - Api string `json:"api"` - Fqn *string `json:"fqn"` - Property *string `json:"property"` - Value Any `json:"value"` -} - -type SetRequest struct { - kernelRequester - - Api string `json:"api"` - Property *string `json:"property"` - Value Any `json:"value"` - // Objref ObjRef -} - -type SetResponse struct { - kernelResponder -} - -type StaticInvokeRequest struct { - kernelRequester - - Api string `json:"api"` - Fqn *string `json:"fqn"` - Method *string `json:"method"` - Args []Any `json:"args"` -} - -type InvokeRequest struct { - kernelRequester - - Api string `json:"api"` - Method *string `json:"method"` - Args []Any `json:"args"` - // Objref ObjRef -} - -type InvokeResponse struct { - kernelResponder - - Result Any `json:result` -} - -type BeginRequest struct { - kernelRequester - - Api string `json:"api"` - Method *string `json:"method"` - Args []Any `json:"args"` - // Objref ObjRef -} - -type BeginResponse struct { - kernelResponder - - Promiseid *string `json:"promise_id"` -} - -type EndRequest struct { - kernelRequester - - Api string `json:"api"` - Promiseid *string `json:"promise_id"` -} - -type EndResponse struct { - kernelResponder - - Result Any `json:"result"` -} - -type CallbacksRequest struct { - kernelRequester - - Api string `json:"api"` -} - -type CallbacksResponse struct { - kernelResponder - - Callbacks []Callback `json:"callbacks"` -} - -type CompleteRequest struct { - kernelRequester - - Api string `json:"api"` - Cbid *string `json:"cbid"` - Err *string `json:"err"` - Result Any `json:"result"` -} - -type CompleteResponse struct { - kernelResponder - - Cbid *string `json:"cbid"` -} - -type NamingRequest struct { - kernelRequester - - Api string `json:"api"` - Assembly string `json:"assembly"` -} - -type NamingResponse struct { - kernelResponder - // readonly naming: { - // readonly [language: string]: { readonly [key: string]: any } | undefined; - // }; -} - -type StatsRequest struct { - kernelRequester - - Api string `json:"api"` -} - -type StatsResponse struct { - kernelResponder - - ObjectCount float64 `json:"object_count"` -} - -// HelloResponse? -type InitOkResponse struct { - kernelResponder - - Hello string `json:"hello"` -} - -type Callback struct { - Cbid *string `json:"cbid"` - Cookie *string `json:"cookie"` - Invoke InvokeRequest `json:"invoke"` - Get GetRequest `json:"get"` - Set SetRequest `json:"set"` -} - -type OkayResponse struct { - Ok Any `json:"ok"` -} - -type ErrorResponse struct { - Error *string `json:"error"` - Stack *string `json:"stack"` -} - -// Custom unmarshalling implementation for response structs. Creating new types -// is required in order to avoid infinite recursion. -func (r *LoadResponse) UnmarshalJSON(data []byte) error { - type response LoadResponse - return unmarshalKernelResponse(data, (*response)(r)) -} - -// Custom unmarshaling for kernel responses, checks for presence of `error` key on json and returns if present -func unmarshalKernelResponse(data []byte, resstruct interface{}) error { - datacopy := make([]byte, len(data)) - copy(datacopy, data) - - var response map[string]json.RawMessage - if err := json.Unmarshal(datacopy, &response); err != nil { - return err - } - - if errmessage, ok := response["error"]; ok { - return errors.New(string(errmessage)) - } - - return json.Unmarshal(data, resstruct) -} diff --git a/packages/@jsii/go-runtime/jsii-experimental/no_op.go b/packages/@jsii/go-runtime/jsii-experimental/no_op.go deleted file mode 100644 index 13d4179630..0000000000 --- a/packages/@jsii/go-runtime/jsii-experimental/no_op.go +++ /dev/null @@ -1,17 +0,0 @@ -// NoOp module stubs out runtime functionality during development -// TODO: Delete once runtime client is complete and functional -package jsii - -import ( - "fmt" -) - -type NoOpApiRequest struct { - Class string - Method string - Args []string -} - -func NoOpRequest(req NoOpApiRequest) { - fmt.Println(req) -} diff --git a/packages/@jsii/go-runtime/jsii-experimental/runtime.go b/packages/@jsii/go-runtime/jsii-experimental/runtime.go deleted file mode 100644 index 1e8fd385b0..0000000000 --- a/packages/@jsii/go-runtime/jsii-experimental/runtime.go +++ /dev/null @@ -1,48 +0,0 @@ -package jsii - -import ( - "fmt" - "io/ioutil" - "os" - "regexp" -) - -// Load ensures a npm package is loaded in the jsii kernel. -func Load(name string, version string, tarball []byte) { - client := getClient() - - tmpfile, err := ioutil.TempFile("", fmt.Sprintf( - "%s-%s.*.tgz", - regexp.MustCompile("[^a-zA-Z0-9_-]").ReplaceAllString(name, "-"), - version, - )) - if err != nil { - panic(err) - } - defer os.Remove(tmpfile.Name()) - if _, err := tmpfile.Write(tarball); err != nil { - panic(err) - } - tmpfile.Close() - - _, err = client.load(LoadRequest{ - Api: "load", - Name: name, - Version: version, - Tarball: tmpfile.Name(), - }) - if err != nil { - panic(err) - } -} - -// Close finalizes the runtime process, signalling the end of the execution to -// the jsii kernel process, and waiting for graceful termination. The best -// practice is to defer call thins at the beginning of the "main" function. -// -// If a jsii client is used *after* Close was called, a new jsii kernel process -// will be initialized, and Close should be called again to correctly finalize -// that, too. This behavior is intended for use in unit/integration tests. -func Close() { - closeClient() -} diff --git a/packages/@jsii/go-runtime/jsii-runtime-go/CODE_OF_CONDUCT.md b/packages/@jsii/go-runtime/jsii-runtime-go/CODE_OF_CONDUCT.md new file mode 100644 index 0000000000..5b627cfa60 --- /dev/null +++ b/packages/@jsii/go-runtime/jsii-runtime-go/CODE_OF_CONDUCT.md @@ -0,0 +1,4 @@ +## Code of Conduct +This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). +For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact +opensource-codeofconduct@amazon.com with any additional questions or comments. diff --git a/packages/@jsii/go-runtime/jsii-runtime-go/CONTRIBUTING.md b/packages/@jsii/go-runtime/jsii-runtime-go/CONTRIBUTING.md new file mode 100644 index 0000000000..f8ce9463e3 --- /dev/null +++ b/packages/@jsii/go-runtime/jsii-runtime-go/CONTRIBUTING.md @@ -0,0 +1 @@ +The go JSII runtime source code is managed in [the main JSII repository](https://github.com/aws/jsii). See the [contributing](https://github.com/aws/jsii/blob/main/CONTRIBUTING.md) guide for details on filing issues and PRs. diff --git a/packages/@jsii/go-runtime/jsii-runtime-go/LICENSE b/packages/@jsii/go-runtime/jsii-runtime-go/LICENSE new file mode 100644 index 0000000000..129acd53d9 --- /dev/null +++ b/packages/@jsii/go-runtime/jsii-runtime-go/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/packages/@jsii/go-runtime/jsii-runtime-go/NOTICE b/packages/@jsii/go-runtime/jsii-runtime-go/NOTICE new file mode 100644 index 0000000000..dc4ac3f857 --- /dev/null +++ b/packages/@jsii/go-runtime/jsii-runtime-go/NOTICE @@ -0,0 +1,2 @@ +jsii +Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@jsii/go-runtime/jsii-runtime-go/README.md b/packages/@jsii/go-runtime/jsii-runtime-go/README.md new file mode 100644 index 0000000000..8e831d68f2 --- /dev/null +++ b/packages/@jsii/go-runtime/jsii-runtime-go/README.md @@ -0,0 +1,3 @@ +# JSII Go Runtime + +This is the JSII runtime for go. This repository is used only for publishing the go module. The source code is managed in [the main JSII repository](https://github.com/aws/jsii). Refer to the [go-runtime readme there](https://github.com/aws/jsii/blob/main/packages/%40jsii/go-runtime/README.md) for details on building and testing the module. diff --git a/packages/@jsii/go-runtime/jsii-runtime-go/api.go b/packages/@jsii/go-runtime/jsii-runtime-go/api.go new file mode 100644 index 0000000000..ca8dafa357 --- /dev/null +++ b/packages/@jsii/go-runtime/jsii-runtime-go/api.go @@ -0,0 +1,352 @@ +package jsii + +import ( + "encoding/json" + "errors" +) + +// JSII Kernel API + +// Override is a public interface implementing a private method `isOverride` +// implemented by the private custom type `override`. This is embedded by +// MethodOverride and PropertyOverride to simulate the union type of Override = +// MethodOverride | PropertyOverride. +type Override interface { + isOverride() +} + +type override struct{} + +func (o override) isOverride() { + return +} + +// FQN represents a fully-qualified type name in the jsii type system. +type FQN string + +// MethodOverride is used to register a "go-native" implementation to be +// substituted to the default javascript implementation on the created object. +type MethodOverride struct { + override + + Method *string `json:"method"` + Cookie *string `json:"cookie"` +} + +// PropertyOverride is used to register a "go-native" implementation to be +// substituted to the default javascript implementation on the created object. +type PropertyOverride struct { + override + + Property *string `json:"property"` + Cookie *string `json:"cookie"` +} + +func isMethodOverride(value Override) bool { + switch value.(type) { + case MethodOverride, *MethodOverride: + return true + default: + return false + } +} + +func isPropertyOverride(value Override) bool { + switch value.(type) { + case PropertyOverride, *PropertyOverride: + return true + default: + return false + } +} + +// KernelRequest and KernelResponse allow creating a union of KernelRequest and +// KernelResponse types by defining private method implemented by a private +// custom type, which is embedded in all relevant types. +type kernelRequest interface { + isRequest() +} + +type kernelRequester struct { +} + +func (r kernelRequester) isRequest() { + return +} + +type kernelResponse interface { + isResponse() +} + +type kernelResponder struct { +} + +func (r kernelResponder) isResponse() { + return +} + +type objref struct { + InstanceID string `json:"$jsii.byref"` +} + +type loadRequest struct { + kernelRequester + + API string `json:"api"` + Name string `json:"name"` + Version string `json:"version"` + Tarball string `json:"tarball"` +} + +type loadResponse struct { + kernelResponder + + Assembly string `json:"assembly"` + Types float64 `json:"types"` +} + +type createRequest struct { + kernelRequester + + API string `json:"api"` + FQN FQN `json:"fqn"` + Interfaces []FQN `json:"interfaces"` + Arguments []interface{} `json:"args"` + Overrides []Override `json:"overrides"` +} + +// TODO extends AnnotatedObjRef? +type createResponse struct { + kernelResponder + + InstanceID string `json:"$jsii.byref"` +} + +type delRequest struct { + kernelRequester + + API string `json:"api"` + ObjRef objref `json:"objref"` +} + +type delResponse struct { + kernelResponder +} + +type getRequest struct { + kernelRequester + + API string `json:"api"` + Property string `json:"property"` + ObjRef objref `json:"objref"` +} + +type staticGetRequest struct { + kernelRequester + + API string `json:"api"` + FQN FQN `json:"fqn"` + Property string `json:"property"` +} + +type getResponse struct { + kernelResponder + + Value interface{} `json:"value"` +} + +type setRequest struct { + kernelRequester + + API string `json:"api"` + Property string `json:"property"` + Value interface{} `json:"value"` + ObjRef objref `json:"objref"` +} + +type staticSetRequest struct { + kernelRequester + + API string `json:"api"` + FQN FQN `json:"fqn"` + Property string `json:"property"` + Value interface{} `json:"value"` +} + +type setResponse struct { + kernelResponder +} + +type staticInvokeRequest struct { + kernelRequester + + API string `json:"api"` + FQN FQN `json:"fqn"` + Method string `json:"method"` + Arguments []interface{} `json:"args"` +} + +type invokeRequest struct { + kernelRequester + + API string `json:"api"` + Method string `json:"method"` + Arguments []interface{} `json:"args"` + ObjRef objref `json:"objref"` +} + +type invokeResponse struct { + kernelResponder + + Result interface{} `json:"result"` +} + +type beginRequest struct { + kernelRequester + + API string `json:"api"` + Method *string `json:"method"` + Arguments []interface{} `json:"args"` + ObjRef objref `json:"objref"` +} + +type beginResponse struct { + kernelResponder + + PromiseID *string `json:"promise_id"` +} + +type endRequest struct { + kernelRequester + + API string `json:"api"` + PromiseID *string `json:"promise_id"` +} + +type endResponse struct { + kernelResponder + + Result interface{} `json:"result"` +} + +type callbacksRequest struct { + kernelRequester + + API string `json:"api"` +} + +type callbacksResponse struct { + kernelResponder + + Callbacks []callback `json:"callbacks"` +} + +type completeRequest struct { + kernelRequester + + API string `json:"api"` + CallbackID *string `json:"cbid"` + Error *string `json:"err"` + Result interface{} `json:"result"` +} + +type completeResponse struct { + kernelResponder + + CallbackID *string `json:"cbid"` +} + +type namingRequest struct { + kernelRequester + + API string `json:"api"` + Assembly string `json:"assembly"` +} + +type namingResponse struct { + kernelResponder + // readonly naming: { + // readonly [language: string]: { readonly [key: string]: any } | undefined; + // }; +} + +type statsRequest struct { + kernelRequester + + API string `json:"api"` +} + +type statsResponse struct { + kernelResponder + + ObjectCount float64 `json:"object_count"` +} + +// HelloResponse? +type initOKResponse struct { + kernelResponder + + Hello string `json:"hello"` +} + +type callback struct { + CallbackID *string `json:"cbid"` + Cookie *string `json:"cookie"` + Invoke invokeRequest `json:"invoke"` + Get getRequest `json:"get"` + Set setRequest `json:"set"` +} + +type okayResponse struct { + OK interface{} `json:"ok"` +} + +type errorResponse struct { + Error *string `json:"error"` + Stack *string `json:"stack"` +} + +// UnmarshalJSON provides custom unmarshalling implementation for response +// structs. Creating new types is required in order to avoid infinite recursion. +func (r *loadResponse) UnmarshalJSON(data []byte) error { + type response loadResponse + return unmarshalKernelResponse(data, (*response)(r)) +} + +func (r *createResponse) UnmarshalJSON(data []byte) error { + type response createResponse + return unmarshalKernelResponse(data, (*response)(r)) +} + +func (r *invokeResponse) UnmarshalJSON(data []byte) error { + type response invokeResponse + return unmarshalKernelResponse(data, (*response)(r)) +} + +func (r *getResponse) UnmarshalJSON(data []byte) error { + type response getResponse + return unmarshalKernelResponse(data, (*response)(r)) +} + +func (r *setResponse) UnmarshalJSON(data []byte) error { + type response setResponse + return unmarshalKernelResponse(data, (*response)(r)) +} + +// Custom unmarshaling for kernel responses, checks for presence of `error` key on json and returns if present +func unmarshalKernelResponse(data []byte, resstruct interface{}) error { + datacopy := make([]byte, len(data)) + copy(datacopy, data) + + var response map[string]json.RawMessage + if err := json.Unmarshal(datacopy, &response); err != nil { + return err + } + + if errmessage, ok := response["error"]; ok { + return errors.New(string(errmessage)) + } + + err := json.Unmarshal(response["ok"], resstruct) + return err +} diff --git a/packages/@jsii/go-runtime/jsii-experimental/client.go b/packages/@jsii/go-runtime/jsii-runtime-go/client.go similarity index 63% rename from packages/@jsii/go-runtime/jsii-experimental/client.go rename to packages/@jsii/go-runtime/jsii-runtime-go/client.go index bc34b68ac2..01078361d7 100644 --- a/packages/@jsii/go-runtime/jsii-experimental/client.go +++ b/packages/@jsii/go-runtime/jsii-runtime-go/client.go @@ -1,12 +1,12 @@ package jsii import ( + "bufio" "encoding/json" "errors" "fmt" "io" "io/ioutil" - "log" "os" "os/exec" "path" @@ -21,6 +21,23 @@ var ( clientOnce sync.Once ) +// The client struct owns the jsii child process and its io interfaces. It also +// owns a map (objects) that tracks all object references by ID. This is used +// to call methods and access properties on objects passed by the runtime +// process by reference. +type client struct { + process *exec.Cmd + RuntimeVersion string + writer *json.Encoder + reader *json.Decoder + + // Keeping track of state that'll need cleaning up in close() + stdin io.WriteCloser + tmpdir string + + objects map[interface{}]string +} + // getClient returns a singleton client instance, initializing one the first // time it is called. func getClient() *client { @@ -61,29 +78,15 @@ func closeClient() { } } -type Any interface{} - -type client struct { - process *exec.Cmd - RuntimeVersion string - writer *json.Encoder - reader *json.Decoder - - // Keeping track of state that'll need cleaning up in close() - stdin io.WriteCloser - tmpdir string -} - -func CheckFatalError(e error) { - if e != nil { - log.Fatal(e) - } -} - // newClient starts the kernel child process and verifies the "hello" message // was correct. func newClient() (*client, error) { - clientinstance := &client{} + // Initialize map of object instances + objmap := make(map[interface{}]string) + + clientinstance := &client{ + objects: objmap, + } // Register a finalizer to call Close() goruntime.SetFinalizer(clientinstance, func(c *client) { @@ -108,6 +111,9 @@ func newClient() (*client, error) { for file, data := range embeddedruntime { filepath := path.Join(tmpdir, file) + if err := os.MkdirAll(path.Dir(filepath), 0700); err != nil { + return nil, err + } if err := ioutil.WriteFile(filepath, data, 0644); err != nil { return nil, err } @@ -126,9 +132,6 @@ func newClient() (*client, error) { fmt.Sprintf("JSII_AGENT=%s/%s/%s", goruntime.Version(), goruntime.GOOS, goruntime.GOARCH), ) - // Forward child process STDERR to this process' STDERR for immediate feedback - clientinstance.process.Stderr = os.Stderr - // Pipe child process STDIN from a JSON encoder in, err := clientinstance.process.StdinPipe() if err != nil { @@ -144,6 +147,43 @@ func newClient() (*client, error) { } clientinstance.reader = json.NewDecoder(out) + stderr, err := clientinstance.process.StderrPipe() + if err != nil { + return nil, err + } + + // Start a gorouting to process what comes in on that StderrPipe + go func() { + reader := bufio.NewReader(stderr) + + type consoleMessage struct { + Stderr []byte `json:"stderr"` + Stdout []byte `json:"stdout"` + } + + eof := false + for !eof { + line, err := reader.ReadBytes('\n') + if len(line) == 0 || err == io.EOF { + eof = true + } + if len(line) > 0 { + result := consoleMessage{} + err := json.Unmarshal(line, &result) + if (err != nil) { + fmt.Fprintf(os.Stderr, "%s\n", line) + } else { + if (result.Stderr != nil) { + os.Stderr.Write(result.Stderr) + } + if (result.Stdout != nil) { + os.Stdout.Write(result.Stdout) + } + } + } + } + }() + // Start process if err := clientinstance.process.Start(); err != nil { return nil, err @@ -159,7 +199,7 @@ func newClient() (*client, error) { return clientinstance, nil } -func (c *client) request(req KernelRequest, res KernelResponse) error { +func (c *client) request(req kernelRequest, res kernelResponse) error { err := c.writer.Encode(req) if err != nil { return err @@ -168,7 +208,7 @@ func (c *client) request(req KernelRequest, res KernelResponse) error { return c.response(res) } -func (c *client) response(res KernelResponse) error { +func (c *client) response(res kernelResponse) error { if c.reader.More() { return c.reader.Decode(res) } @@ -178,7 +218,7 @@ func (c *client) response(res KernelResponse) error { } func (c *client) processHello() (string, error) { - response := InitOkResponse{} + response := initOKResponse{} if err := c.response(&response); err != nil { return "", err @@ -189,13 +229,54 @@ func (c *client) processHello() (string, error) { return version, nil } -func (c *client) load(request LoadRequest) (LoadResponse, error) { - response := LoadResponse{} +func (c *client) findObjectRef(obj interface{}) (refid string, ok bool) { + refid, ok = c.objects[obj] + return +} + +func (c *client) load(request loadRequest) (loadResponse, error) { + response := loadResponse{} + return response, c.request(request, &response) +} + +func (c *client) create(request createRequest) (createResponse, error) { + response := createResponse{} + return response, c.request(request, &response) +} + +func (c *client) invoke(request invokeRequest) (invokeResponse, error) { + response := invokeResponse{} + return response, c.request(request, &response) +} + +func (c *client) sinvoke(request staticInvokeRequest) (invokeResponse, error) { + response := invokeResponse{} + return response, c.request(request, &response) +} + +func (c *client) get(request getRequest) (getResponse, error) { + response := getResponse{} + return response, c.request(request, &response) +} + +func (c *client) sget(request staticGetRequest) (getResponse, error) { + response := getResponse{} + return response, c.request(request, &response) +} + +func (c *client) set(request setRequest) (setResponse, error) { + response := setResponse{} + return response, c.request(request, &response) +} + +func (c *client) sset(request staticSetRequest) (setResponse, error) { + response := setResponse{} return response, c.request(request, &response) } func (c *client) close() { if c.process != nil { + c.stdin.Write([]byte("{\"exit\":0}\n")) c.stdin.Close() c.process.Wait() } diff --git a/packages/@jsii/go-runtime/jsii-experimental/client_test.go b/packages/@jsii/go-runtime/jsii-runtime-go/client_test.go similarity index 83% rename from packages/@jsii/go-runtime/jsii-experimental/client_test.go rename to packages/@jsii/go-runtime/jsii-runtime-go/client_test.go index 2d68e30357..3ebfd2e18a 100644 --- a/packages/@jsii/go-runtime/jsii-experimental/client_test.go +++ b/packages/@jsii/go-runtime/jsii-runtime-go/client_test.go @@ -10,7 +10,7 @@ func TestClient(t *testing.T) { client, err := newClient() if err != nil { t.Log(err) - t.Errorf(fmt.Sprintf("Client init error: %s", err.Error())) + panic(fmt.Sprintf("Client init error: %s", err.Error())) } defer client.close() @@ -20,8 +20,8 @@ func TestClient(t *testing.T) { } t.Run("Client Load Error", func(t *testing.T) { - request := LoadRequest{ - Api: "load", + request := loadRequest{ + API: "load", Name: "jsii-calc", Version: "0.0.0", Tarball: "jsii-calc-tarball.tgz", diff --git a/packages/@jsii/go-runtime/jsii-runtime-go/go.mod b/packages/@jsii/go-runtime/jsii-runtime-go/go.mod new file mode 100644 index 0000000000..d7711d50c9 --- /dev/null +++ b/packages/@jsii/go-runtime/jsii-runtime-go/go.mod @@ -0,0 +1,3 @@ +module github.com/aws/jsii-runtime-go + +go 1.15 diff --git a/packages/@jsii/go-runtime/jsii-runtime-go/runtime.go b/packages/@jsii/go-runtime/jsii-runtime-go/runtime.go new file mode 100644 index 0000000000..f435c82b67 --- /dev/null +++ b/packages/@jsii/go-runtime/jsii-runtime-go/runtime.go @@ -0,0 +1,303 @@ +package jsii + +import ( + "fmt" + "io/ioutil" + "os" + "reflect" + "regexp" +) + +// Maps interface types to their concrete implementation structs. Used by +// `castAndSetToPtr` to instantiate a concrete type that implements the +// the interface as dictated by the type of the ret value. +type implementationMap = map[reflect.Type]reflect.Type + +// Load ensures a npm package is loaded in the jsii kernel. +func Load(name string, version string, tarball []byte) { + client := getClient() + + tmpfile, err := ioutil.TempFile("", fmt.Sprintf( + "%s-%s.*.tgz", + regexp.MustCompile("[^a-zA-Z0-9_-]").ReplaceAllString(name, "-"), + version, + )) + if err != nil { + panic(err) + } + defer os.Remove(tmpfile.Name()) + if _, err := tmpfile.Write(tarball); err != nil { + panic(err) + } + tmpfile.Close() + + _, err = client.load(loadRequest{ + API: "load", + Name: name, + Version: version, + Tarball: tmpfile.Name(), + }) + if err != nil { + panic(err) + } +} + +// Create will construct a new JSII object within the kernel runtime. This is +// called by jsii object constructors. +func Create(fqn FQN, args []interface{}, interfaces []FQN, overrides []Override, ret interface{}) { + client := getClient() + + res, err := client.create(createRequest{ + API: "create", + FQN: fqn, + Arguments: castPtrsToRef(args), + Interfaces: interfaces, + Overrides: overrides, + }) + + if err != nil { + panic(err) + } + + client.objects[ret] = res.InstanceID +} + +// Invoke will call a method on a jsii class instance. The response should be +// decoded into the expected return type for the method being called. +func Invoke(obj interface{}, method string, args []interface{}, hasReturn bool, ret interface{}, implMap implementationMap) { + client := getClient() + + // Find reference to class instance in client + refid, found := client.findObjectRef(obj) + + if !found { + panic("No Object Found") + } + + res, err := client.invoke(invokeRequest{ + API: "invoke", + Method: method, + Arguments: castPtrsToRef(args), + ObjRef: objref{ + InstanceID: refid, + }, + }) + + if err != nil { + panic(err) + } + + if hasReturn { + castAndSetToPtr(ret, res.Result, implMap) + } +} + +// InvokeStatic will call a static method on a given jsii class. The response +// should be decoded into the expected return type for the method being called. +func InvokeStatic(fqn FQN, method string, args []interface{}, hasReturn bool, ret interface{}, implMap implementationMap) { + client := getClient() + + res, err := client.sinvoke(staticInvokeRequest{ + API: "sinvoke", + FQN: fqn, + Method: method, + Arguments: castPtrsToRef(args), + }) + + if err != nil { + panic(err) + } + + if hasReturn { + castAndSetToPtr(ret, res.Result, implMap) + } +} + +// Get reads a property value on a given jsii class instance. The response +// should be decoded into the expected type of the property being read. +func Get(obj interface{}, property string, ret interface{}, implMap implementationMap) { + client := getClient() + + // Find reference to class instance in client + refid, found := client.findObjectRef(obj) + + if !found { + panic("No Object Found") + } + + res, err := client.get(getRequest{ + API: "get", + Property: property, + ObjRef: objref{ + InstanceID: refid, + }, + }) + + if err != nil { + panic(err) + } + + castAndSetToPtr(ret, res.Value, implMap) +} + +// StaticGet reads a static property value on a given jsii class. The response +// should be decoded into the expected type of the property being read. +func StaticGet(fqn FQN, property string, ret interface{}, implMap implementationMap) { + client := getClient() + + res, err := client.sget(staticGetRequest{ + API: "sget", + FQN: fqn, + Property: property, + }) + + if err != nil { + panic(err) + } + + castAndSetToPtr(ret, res.Value, implMap) +} + +// Set writes a property on a given jsii class instance. The value should match +// the type of the property being written, or the jsii kernel will crash. +func Set(obj interface{}, property string, value interface{}) { + client := getClient() + + // Find reference to class instance in client + refid, found := client.findObjectRef(obj) + + if !found { + panic("No Object Found") + } + + _, err := client.set(setRequest{ + API: "set", + Property: property, + Value: castPtrToRef(value), + ObjRef: objref{ + InstanceID: refid, + }, + }) + + if err != nil { + panic(err) + } +} + +// StaticSet writes a static property on a given jsii class. The value should +// match the type of the property being written, or the jsii kernel will crash. +func StaticSet(fqn FQN, property string, value interface{}) { + client := getClient() + + _, err := client.sset(staticSetRequest{ + API: "sset", + FQN: fqn, + Property: property, + Value: value, + }) + + if err != nil { + panic(err) + } +} + +func castValToRef(data interface{}) (objref, bool) { + ref := objref{} + ok := false + dataVal := reflect.ValueOf(data) + + if dataVal.Kind() == reflect.Map { + for _, k := range dataVal.MapKeys() { + // Finding values type requires extracting from reflect.Value + // otherwise .Kind() returns `interface{}` + v := reflect.ValueOf(dataVal.MapIndex(k).Interface()) + + if k.Kind() == reflect.String && k.String() == "$jsii.byref" && v.Kind() == reflect.String { + ref.InstanceID = v.String() + ok = true + } + + } + } + + return ref, ok +} + +// Accepts pointers to structs that implement interfaces and searches for an +// existing object reference in the client. If it exists, it casts it to an +// objref for the runtime. Recursively casts types that may contain nested +// object references. +func castPtrToRef(data interface{}) interface{} { + client := getClient() + dataVal := reflect.ValueOf(data) + + if dataVal.Kind() == reflect.Ptr { + valref, valHasRef := client.findObjectRef(data) + if valHasRef { + return objref{InstanceID: valref} + } + } else if dataVal.Kind() == reflect.Slice { + refs := make([]interface{}, dataVal.Len()) + for i := 0; i < dataVal.Len(); i++ { + refs[i] = dataVal.Index(i).Interface() + } + return refs + } + + return data +} + +// Casts slice of data into new slice of data with pointers to interfaces +// converted to objrefs. This is useful for casting arguments to methods and +// constructors to data that can be serialized before being passed over the +// wire. +func castPtrsToRef(args []interface{}) []interface{} { + argRefs := make([]interface{}, len(args)) + for i, arg := range args { + argRefs[i] = castPtrToRef(arg) + } + + return argRefs +} + +// castAndSetToPtr accepts a pointer to any type and attempts to cast the value +// argument to be the same type. Then it sets the value of the pointer element +// to be the newly cast data. This is used to cast payloads from JSII to +// expected return types for Get and Invoke functions. +func castAndSetToPtr(ptr interface{}, data interface{}, implMap implementationMap) { + ptrVal := reflect.ValueOf(ptr).Elem() + dataVal := reflect.ValueOf(data) + + ref, isRef := castValToRef(data) + + if ptrVal.Kind() == reflect.Slice && dataVal.Kind() == reflect.Slice { + // If return type is a slice, recursively cast elements + for i := 0; i < dataVal.Len(); i++ { + innerType := ptrVal.Type().Elem() + inner := reflect.New(innerType) + + castAndSetToPtr(inner.Interface(), dataVal.Index(i).Interface(), implMap) + ptrVal.Set(reflect.Append(ptrVal, inner.Elem())) + } + } else if isRef { + // If return data is JSII object references, add to objects table. + concreteType := implMap[ptrVal.Type()] + ptrVal.Set(reflect.New(concreteType)) + client := getClient() + client.objects[ptrVal.Interface()] = ref.InstanceID + } else { + val := reflect.ValueOf(data) + ptrVal.Set(val) + } +} + +// Close finalizes the runtime process, signalling the end of the execution to +// the jsii kernel process, and waiting for graceful termination. The best +// practice is to defer call thins at the beginning of the "main" function. +// +// If a jsii client is used *after* Close was called, a new jsii kernel process +// will be initialized, and Close should be called again to correctly finalize +// that, too. This behavior is intended for use in unit/integration tests. +func Close() { + closeClient() +} diff --git a/packages/@jsii/go-runtime/lib/index.ts b/packages/@jsii/go-runtime/lib/index.ts new file mode 100644 index 0000000000..85ed26e4c4 --- /dev/null +++ b/packages/@jsii/go-runtime/lib/index.ts @@ -0,0 +1,3 @@ +import * as path from 'path'; + +export const runtimePath = path.resolve(__dirname, '..', 'jsii-runtime-go'); diff --git a/packages/@jsii/go-runtime/package.json b/packages/@jsii/go-runtime/package.json index 2e48b2b13a..1c71b71f29 100644 --- a/packages/@jsii/go-runtime/package.json +++ b/packages/@jsii/go-runtime/package.json @@ -3,15 +3,17 @@ "version": "0.0.0", "private": true, "description": "", - "main": "index.js", + "main": "lib/index.js", "scripts": { - "fmt": "go fmt ./jsii-experimental ./jsii-calc-test", - "gen:calc": "ts-node build-tools/gen-calc.ts", - "gen:rt": "ts-node build-tools/gen.ts", + "build": "tsc --build && npm run gen:rt && (cd ./jsii-runtime-go && go build)", + "fmt": "go fmt ./... && (cd ./jsii-runtime-go && go fmt)", + "gen:calc": "node build-tools/gen-calc.js", + "gen:rt": "node build-tools/gen.js", "generate": "npm run gen:rt && npm run gen:calc", - "build": "npm run generate && go build ./jsii-experimental", - "test": "go test ./jsii-experimental && npm run test:calc", - "test:calc": "npm run gen:calc && go run ./jsii-calc-test" + "lint": "go vet ./... && (cd ./jsii-runtime-go && go vet)", + "lint:fix": "yarn lint --fix", + "test": "(cd ./jsii-runtime-go && go test) && npm run test:calc", + "test:calc": "npm run gen:calc && go test ./jsii-calc-test" }, "keywords": [], "author": "", @@ -21,12 +23,14 @@ }, "devDependencies": { "@types/fs-extra": "^8.1.1", - "@types/node": "^10.17.39", + "@types/node": "^10.17.51", "codemaker": "^0.0.0", - "fs-extra": "^9.0.1", - "jsii-calc": "^0.0.0", + "eslint": "^7.19.0", + "fs-extra": "^9.1.0", + "jsii-calc": "^3.20.120", "jsii-pacmak": "^0.0.0", - "ts-node": "^9.0.0", - "typescript": "~3.9.7" + "prettier": "^2.2.1", + "ts-node": "^9.1.1", + "typescript": "~3.9.9" } } diff --git a/packages/@jsii/go-runtime/tsconfig.json b/packages/@jsii/go-runtime/tsconfig.json new file mode 100644 index 0000000000..5228b0f5a3 --- /dev/null +++ b/packages/@jsii/go-runtime/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../../../tsconfig-base", + "include": ["**/*.ts"] +} diff --git a/packages/@jsii/integ-test/jest.config.ts b/packages/@jsii/integ-test/jest.config.ts new file mode 100644 index 0000000000..8b3086802b --- /dev/null +++ b/packages/@jsii/integ-test/jest.config.ts @@ -0,0 +1,6 @@ +import { overriddenConfig } from '../../../jest.config'; + +export default overriddenConfig({ + // We don't need coverage for the integration tests + collectCoverage: false, +}); diff --git a/packages/@jsii/integ-test/package.json b/packages/@jsii/integ-test/package.json index 54cfd8415b..d4e3526ed2 100644 --- a/packages/@jsii/integ-test/package.json +++ b/packages/@jsii/integ-test/package.json @@ -17,30 +17,23 @@ }, "license": "Apache-2.0", "dependencies": { - "@octokit/rest": "^18.0.6", + "@octokit/rest": "^18.1.1", "dotenv": "^8.2.0", - "fs-extra": "^9.0.1", - "jest": "^26.5.2", + "fs-extra": "^9.1.0", + "jest": "^26.6.3", "jsii": "^0.0.0", "jsii-pacmak": "^0.0.0", "jsii-rosetta": "^0.0.0", - "tar": "^6.0.5" + "tar": "^6.1.0" }, "devDependencies": { "@types/dotenv": "^8.2.0", "@types/fs-extra": "^8.1.1", - "@types/jest": "^26.0.14", - "@types/node": "^10.17.39", - "@types/tar": "^4.0.3", - "eslint": "^7.11.0", - "prettier": "^2.1.2", - "typescript": "~3.9.7" - }, - "jest": { - "errorOnDeprecated": true, - "testEnvironment": "node", - "testMatch": [ - "**/?(*.)+(spec|test).js" - ] + "@types/jest": "^26.0.20", + "@types/node": "^10.17.51", + "@types/tar": "^4.0.4", + "eslint": "^7.19.0", + "prettier": "^2.2.1", + "typescript": "~3.9.9" } } diff --git a/packages/@jsii/integ-test/test/build-cdk.test.ts b/packages/@jsii/integ-test/test/build-cdk.test.ts index d7b750143f..dc4a8ddd87 100644 --- a/packages/@jsii/integ-test/test/build-cdk.test.ts +++ b/packages/@jsii/integ-test/test/build-cdk.test.ts @@ -3,6 +3,7 @@ import * as dotenv from 'dotenv'; import { mkdtemp, readdir, remove } from 'fs-extra'; import { tmpdir } from 'os'; import * as path from 'path'; + import { downloadReleaseAsset, minutes, diff --git a/packages/@jsii/integ-test/tsconfig.json b/packages/@jsii/integ-test/tsconfig.json index 75177cc9b5..78bdd385b9 100644 --- a/packages/@jsii/integ-test/tsconfig.json +++ b/packages/@jsii/integ-test/tsconfig.json @@ -4,5 +4,6 @@ "declaration": false }, "extends": "../../../tsconfig-base", - "include": ["**/*.ts"] + "include": ["**/*.ts"], + "exclude": ["jest.config.ts"], } diff --git a/packages/@jsii/java-runtime-test/package.json b/packages/@jsii/java-runtime-test/package.json index 4f2270e62f..bd7e8259a1 100644 --- a/packages/@jsii/java-runtime-test/package.json +++ b/packages/@jsii/java-runtime-test/package.json @@ -29,7 +29,7 @@ }, "devDependencies": { "@jsii/java-runtime": "^0.0.0", - "jsii-calc": "^0.0.0", + "jsii-calc": "^3.20.120", "jsii-pacmak": "^0.0.0" } } diff --git a/packages/@jsii/java-runtime-test/pom.xml.t.js b/packages/@jsii/java-runtime-test/pom.xml.t.js index 6548b283de..d661dbde3e 100644 --- a/packages/@jsii/java-runtime-test/pom.xml.t.js +++ b/packages/@jsii/java-runtime-test/pom.xml.t.js @@ -18,6 +18,13 @@ process.stdout.write(` + + ${groupId} + ${artifactId} + ${version} + test + + software.amazon.jsii.tests calculator diff --git a/packages/@jsii/java-runtime/BundledRuntime.t.js b/packages/@jsii/java-runtime/BundledRuntime.t.js new file mode 100644 index 0000000000..5bc380d0fd --- /dev/null +++ b/packages/@jsii/java-runtime/BundledRuntime.t.js @@ -0,0 +1,92 @@ +const fs = require('fs'); +const path = require('path'); + +const resources = discoverResources(); +const entryPoint = 'bin/jsii-runtime.js'; + +process.stdout.write(`package software.amazon.jsii; + +import static software.amazon.jsii.Util.extractResource; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; + +@javax.annotation.Generated(value = "${path.basename( + __filename, +)}", date = "${new Date().toISOString()}") +final class BundledRuntime { + /** + * Extracts all files needed for jsii-runtime.js from JAR into a temporary + * directory. + * + * @param klass the {@link Class} that requests the extraction (it will be + * used to determine the appropriate {@link ClassLoader}) + * + * @return The full path for jsii-runtime.js + */ + static String extract(final Class klass) { + try { + final Path directory = Files.createTempDirectory("jsii-java-runtime"); + directory.toFile().deleteOnExit(); + +${resources.map(extractResource).map(indent(12)).join('\n')} + + return entrypoint.toString(); + } catch (final IOException ioe) { + throw new JsiiException("Unable to extract bundled @jsii/runtime library", ioe); + } + } + + private BundledRuntime() {} +} +`); + +function discoverResources( + root = path.resolve( + __dirname, + 'project', + 'src', + 'main', + 'resources', + 'software', + 'amazon', + 'jsii', + ), + dir = '.', +) { + const result = []; + + for (const file of fs.readdirSync(path.resolve(root, dir))) { + // Ignore dot-files + if (file.startsWith('.')) { + continue; + } + const stat = fs.statSync(path.resolve(root, dir, file)); + if (stat.isDirectory()) { + result.push(...discoverResources(root, path.join(dir, file))); + continue; + } + result.push(path.join(dir, file)); + } + + return result; +} + +function extractResource(name) { + const call = `extractResource(klass, "${name}", directory)`; + + if (name === entryPoint) { + return [ + `final Path entrypoint = ${call};`, + `entrypoint.toFile().deleteOnExit();`, + ].join('\n'); + } else { + return `${call}.toFile().deleteOnExit();`; + } +} + +function indent(count) { + const spaces = ' '.repeat(count); + return (str) => str.replace(/^/gm, spaces); +} diff --git a/packages/@jsii/java-runtime/generate.sh b/packages/@jsii/java-runtime/generate.sh index ca47faa1dc..5271fc6c7f 100755 --- a/packages/@jsii/java-runtime/generate.sh +++ b/packages/@jsii/java-runtime/generate.sh @@ -7,8 +7,10 @@ mkdir -p conf # generate pom.xml and JsiiVersion.java with version from package.json /usr/bin/env node ./pom.xml.t.js > ${project}/pom.xml /usr/bin/env node ./user.xml.t.js > ${project}/user.xml -/usr/bin/env node JsiiVersion.t.js > ${project}/src/main/java/software/amazon/jsii/JsiiVersion.java +/usr/bin/env node ./JsiiVersion.t.js > ${project}/src/main/java/software/amazon/jsii/JsiiVersion.java # embed @jsii/runtime as a resource mkdir -p ${project}/src/main/resources/software/amazon/jsii rsync -av $(node -p 'require("path").dirname(require.resolve("@jsii/runtime/package.json"))')/webpack/ ${project}/src/main/resources/software/amazon/jsii + +/usr/bin/env node ./BundledRuntime.t.js > ${project}/src/main/java/software/amazon/jsii/BundledRuntime.java diff --git a/packages/@jsii/java-runtime/package.json b/packages/@jsii/java-runtime/package.json index 93d61c7013..3ece8f9db3 100644 --- a/packages/@jsii/java-runtime/package.json +++ b/packages/@jsii/java-runtime/package.json @@ -33,8 +33,8 @@ }, "devDependencies": { "@jsii/runtime": "^0.0.0", - "@types/node": "^10.17.39", + "@types/node": "^10.17.51", "jsii-build-tools": "^0.0.0", - "typescript": "~3.9.7" + "typescript": "~3.9.9" } } diff --git a/packages/@jsii/java-runtime/pom.xml.t.js b/packages/@jsii/java-runtime/pom.xml.t.js index 55629cbb09..ae0381d875 100644 --- a/packages/@jsii/java-runtime/pom.xml.t.js +++ b/packages/@jsii/java-runtime/pom.xml.t.js @@ -61,6 +61,7 @@ process.stdout.write(` [1.3,1.4-a0) [2.11.3,2.12-a0) + [1.3.2,1.4.0) [13.0.0,20.0-a0) [5.7.0,5.8-a0) [3.5.13,4.0-a0) @@ -119,6 +120,13 @@ process.stdout.write(` \${mockito.version} test + + + + javax.annotation + javax.annotation-api + \${javax-annotations.version} + diff --git a/packages/@jsii/java-runtime/project/.gitignore b/packages/@jsii/java-runtime/project/.gitignore index ef7082424e..0b36c1b068 100644 --- a/packages/@jsii/java-runtime/project/.gitignore +++ b/packages/@jsii/java-runtime/project/.gitignore @@ -6,6 +6,7 @@ pom.xml user.xml # generated by JsiiVersion.java.t.js +src/main/java/software/amazon/jsii/BundledRuntime.java src/main/java/software/amazon/jsii/JsiiVersion.java # @jsii/runtime bundle (copied during build from @jsii/runtime/dist) diff --git a/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/Internal.java b/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/Internal.java new file mode 100644 index 0000000000..e81ede3b16 --- /dev/null +++ b/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/Internal.java @@ -0,0 +1,20 @@ +package software.amazon.jsii; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Annotates API elements that are intended for jsii's internal use only. Such APIs elements are not public by design + * and likely to be removed or renamed, have their signature change, or have their access level decreased in future + * versions of the library without notice. + * + * Annotated elements are eligible for immediate modification or removal and are not subject to semantic versioning. + */ +@Documented +@Retention(RetentionPolicy.SOURCE) +@Target({ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.METHOD, ElementType.PACKAGE, ElementType.TYPE}) +public @interface Internal { +} diff --git a/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/JsiiClient.java b/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/JsiiClient.java index 1cc6559213..b730bcfa63 100644 --- a/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/JsiiClient.java +++ b/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/JsiiClient.java @@ -21,6 +21,7 @@ /** * HTTP client for jsii-server. */ +@Internal public final class JsiiClient { /** * JSON node factory. diff --git a/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/JsiiEngine.java b/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/JsiiEngine.java index 716a22d7f2..d9dbc8e33d 100644 --- a/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/JsiiEngine.java +++ b/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/JsiiEngine.java @@ -8,6 +8,8 @@ import com.fasterxml.jackson.databind.JsonNode; +import org.jetbrains.annotations.Nullable; + import java.io.IOException; import java.io.PrintWriter; import java.io.StringWriter; @@ -21,6 +23,7 @@ /** * The javascript engine which supports jsii objects. */ +@Internal public final class JsiiEngine implements JsiiCallbackHandler { /** * The singleton instance. @@ -32,6 +35,14 @@ public final class JsiiEngine implements JsiiCallbackHandler { */ private static final String INTERFACE_PROXY_CLASS_NAME = "Jsii$Proxy"; + /** + * A map that associates value instances with the {@link JsiiEngine} that + * created them or which first interacted with them. Using a weak hash map + * so that {@link JsiiEngine} instances can be garbage collected after all + * instances they are assigned to are themselves collected. + */ + private static Map engineAssociations = new WeakHashMap<>(); + /** * Object cache. */ @@ -47,6 +58,14 @@ public final class JsiiEngine implements JsiiCallbackHandler { */ private Map loadedModules = new HashMap<>(); + /** + * A map that associates value instances with the {@link JsiiObjectRef} that + * represents them across the jsii process boundary. Using a weak hash map + * so that {@link JsiiObjectRef} instances can be garbage collected after + * all instances they are assigned to are themselves collected. + */ + private Map objectRefs = new WeakHashMap<>(); + /** * @return The singleton instance. */ @@ -57,6 +76,47 @@ public static JsiiEngine getInstance() { return INSTANCE; } + /** + * Retrieves the {@link JsiiEngine} associated with the provided instance. If none was assigned yet, the current + * value of {@link JsiiEngine#getInstance()} will be assigned then returned. + * + * @param instance The object instance for which a {@link JsiiEngine} is requested. + * + * @return a {@link JsiiEngine} instance. + */ + static JsiiEngine getEngineFor(final Object instance) { + return JsiiEngine.getEngineFor(instance, null); + } + + /** + * Retrieves the {@link JsiiEngine} associated with the provided instance. If none was assigned yet, the current + * value of {@code defaultEngine} will be assigned then returned. If {@code instance} is a {@link JsiiObject} + * instance, then the value will be recorded on the instance itself (the responsibility of this process is on the + * {@link JsiiObject} constructors). + * + * @param instance The object instance for which a {@link JsiiEngine} is requested. + * @param defaultEngine The engine to use if none was previously assigned. If {@code null}, the value of + * {@link #getInstance()} is used instead. + * + * @return a {@link JsiiEngine} instance. + */ + static JsiiEngine getEngineFor(final Object instance, @Nullable final JsiiEngine defaultEngine) { + Objects.requireNonNull(instance, "instance is required"); + + if (instance instanceof JsiiObject) { + final JsiiObject jsiiObject = (JsiiObject) instance; + if (jsiiObject.jsii$engine != null) { + return jsiiObject.jsii$engine; + } + return defaultEngine != null ? defaultEngine : JsiiEngine.getInstance(); + } + + return engineAssociations.computeIfAbsent( + instance, + (_k) -> defaultEngine != null ? defaultEngine : JsiiEngine.getInstance() + ); + } + /** * Resets the singleton instance of JsiiEngine. This will cause a new process to be spawned (the previous process * will terminate itself). This method is intended to be used by compliance tests to ensure a complete and @@ -131,15 +191,6 @@ public void loadModule(final Class moduleClass) { this.loadedModules.put(module.getModuleName(), module); } - /** - * Registers an object into the object cache. - * @param objRef The object reference. - * @param obj The object to register. - */ - public void registerObject(final JsiiObjectRef objRef, final Object obj) { - this.objects.put(objRef.getObjId(), obj); - } - /** * Returns the native java object for a given jsii object reference. * If it already exists in our native objects cache, we return it. @@ -160,32 +211,58 @@ public Object nativeFromObjRef(final JsiiObjectRef objRef) { } /** - * Returns the jsii object reference given a native object. + * Assigns a {@link JsiiObjectRef} to a given instance. * - * If the native object extends JsiiObject (directly or indirectly), we can grab the objref - * from within the JsiiObject. + * @param objRef The object reference to be assigned. + * @param instance The instance to which the JsiiObjectRef is to be linked. * - * Otherwise, we have a "pure" native object on our hands, so we will first perform a reverse lookup in - * the objects cache to see if it was already created, and if it wasn't, we create a new empty JS object. - * Note that any native overrides will be applied by createNewObject(). + * @throws IllegalStateException if another {@link JsiiObjectRef} was + * previously assigned to {@code instance}. + */ + final void registerObject(final JsiiObjectRef objRef, final Object instance) { + Objects.requireNonNull(instance, "instance is required"); + Objects.requireNonNull(objRef, "objRef is required"); + + final JsiiObjectRef assigned; + if (instance instanceof JsiiObject) { + final JsiiObject jsiiObject = (JsiiObject) instance; + if (jsiiObject.jsii$objRef == null) { + jsiiObject.jsii$objRef = objRef; + } + assigned = jsiiObject.jsii$objRef; + } else { + assigned = this.objectRefs.computeIfAbsent( + instance, + (key) -> objRef + ); + } + if (!assigned.equals(objRef)) { + throw new IllegalStateException("Another object reference was previously assigned to this instance!"); + } + this.objects.put(assigned.getObjId(), instance); + } + + /** + * Returns the jsii object reference given a native object. If the object + * does not have one yet, a new object reference is requested from the jsii + * kernel, and gets assigned to the instance before being returned. * * @param nativeObject The native object to obtain the reference for + * * @return A jsii object reference */ public JsiiObjectRef nativeToObjRef(final Object nativeObject) { if (nativeObject instanceof JsiiObject) { - return ((JsiiObject) nativeObject).getObjRef(); - } - - for (String objid : this.objects.keySet()) { - Object obj = this.objects.get(objid); - if (obj == nativeObject) { - return JsiiObjectRef.fromObjId(objid); + final JsiiObject jsiiObject = (JsiiObject) nativeObject; + if (jsiiObject.jsii$objRef == null) { + jsiiObject.jsii$objRef = this.createNewObject(jsiiObject); } + return jsiiObject.jsii$objRef; } - - // we don't know of an jsii object that represents this object, so we will need to create it. - return createNewObject(nativeObject); + return this.objectRefs.computeIfAbsent( + nativeObject, + (_k) -> this.createNewObject(nativeObject) + ); } /** @@ -526,10 +603,6 @@ public JsiiObjectRef createNewObject(final Object uninitializedNativeObject, fin JsiiObjectRef objRef = this.getClient().createObject(fqn, Arrays.asList(args), overrides, interfaces); registerObject(objRef, uninitializedNativeObject); - if (uninitializedNativeObject instanceof JsiiObject) { - ((JsiiObject) uninitializedNativeObject).setObjRef(objRef); - } - return objRef; } diff --git a/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/JsiiModule.java b/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/JsiiModule.java index cadc77cbe7..4f74e016ed 100644 --- a/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/JsiiModule.java +++ b/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/JsiiModule.java @@ -6,6 +6,7 @@ /** * Represents a jsii JavaScript module. */ +@Internal public abstract class JsiiModule { /** * The module class. diff --git a/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/JsiiObject.java b/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/JsiiObject.java index 4b31c4c448..776b1bbf7a 100644 --- a/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/JsiiObject.java +++ b/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/JsiiObject.java @@ -8,27 +8,27 @@ import java.lang.reflect.InvocationTargetException; import java.util.HashMap; import java.util.Map; -import java.util.Objects; /** * Represents a JavaScript object in the Java world. */ public class JsiiObject implements JsiiSerializable { - /** - * The jsii engine used by this object. + * The interface-proxies that this object can also be represented as. */ - private final JsiiEngine engine; + private final Map, JsiiObject> proxies = new HashMap<>(); /** - * The interface-proxies that this object can also be represented as. + * The jsii engine used by this object. */ - private final Map, JsiiObject> proxies = new HashMap<>(); + final JsiiEngine jsii$engine; /** * The underlying {@link JsiiObjectRef} instance. */ - private JsiiObjectRef objRef; + @Nullable + @Internal + JsiiObjectRef jsii$objRef; /** * A special constructor that allows creating wrapper objects while bypassing the normal constructor @@ -37,7 +37,7 @@ public class JsiiObject implements JsiiSerializable { * @param initializationMode Must always be set to "JSII". */ protected JsiiObject(final InitializationMode initializationMode) { - this(JsiiEngine.getInstance(), initializationMode); + this(null, initializationMode); } /** @@ -49,8 +49,9 @@ protected JsiiObject(final InitializationMode initializationMode) { * @param engine The {@link JsiiEngine} to use. * @param initializationMode Must always be set to "JSII". */ - JsiiObject(final JsiiEngine engine, final InitializationMode initializationMode) { - this.engine = Objects.requireNonNull(engine); + @Internal + JsiiObject(@Nullable final JsiiEngine engine, final InitializationMode initializationMode) { + this.jsii$engine = JsiiEngine.getEngineFor(this, engine); if (initializationMode != InitializationMode.JSII) { throw new JsiiException("The only supported initialization mode is '" + InitializationMode.JSII + "'"); } @@ -61,8 +62,9 @@ protected JsiiObject(final InitializationMode initializationMode) { * * @param objRef Reference to existing managed JSII node object. */ + @Internal protected JsiiObject(final JsiiObjectRef objRef) { - this(JsiiEngine.getInstance(), objRef); + this(null, objRef); } /** @@ -73,9 +75,12 @@ protected JsiiObject(final JsiiObjectRef objRef) { * @param engine the {@link JsiiEngine} to use. * @param objRef Reference to existing managed JSII node object. */ - JsiiObject(final JsiiEngine engine, final JsiiObjectRef objRef) { - this.objRef = objRef; - this.engine = Objects.requireNonNull(engine); + @Internal + JsiiObject(@Nullable final JsiiEngine engine, @Nullable final JsiiObjectRef objRef) { + this.jsii$engine = JsiiEngine.getEngineFor(this, engine); + this.jsii$objRef = objRef; + + this.jsii$engine.registerObject(objRef, this); } /** @@ -98,27 +103,31 @@ public enum InitializationMode { * @param Java type for the return value. * @return A return value. * - * @deprecated use {@link #jsiiCall(String, NativeType, Object...)} instead + * @deprecated use {@link Kernel#call(Object, String, NativeType, Object...)} instead */ @Nullable @Deprecated + @Internal protected final T jsiiCall(final String method, final Class returnType, @Nullable final Object... args) { return jsiiCall(method, NativeType.forType(returnType), args); } /** * Calls a JavaScript method on the object. + * * @param method The name of the method. * @param nativeType The return type. * @param args Method arguments. * @param Java type for the return value. - * * @return A return value. + * + * @deprecated use {@link Kernel#call(Object, String, NativeType, Object...)} instead */ @Nullable + @Deprecated + @Internal protected final T jsiiCall(final String method, final NativeType nativeType, @Nullable final Object... args) { - final JsonNode result = this.engine.getClient().callMethod(this.objRef, method, JsiiObjectMapper.valueToTree(args)); - return JsiiObjectMapper.treeToValue(result, nativeType); + return Kernel.call(this, method, nativeType, args); } /** @@ -135,12 +144,14 @@ protected final T jsiiCall(final String method, final NativeType nativeTy */ @Nullable @Deprecated + @Internal protected static T jsiiStaticCall(final Class nativeClass, final String method, final Class returnType, @Nullable final Object... args) { return jsiiStaticCall(nativeClass, method, NativeType.forType(returnType), args); } /** * Calls a static method. + * * @param nativeClass The java class. * @param method The method to call. * @param nativeType The return type. @@ -150,6 +161,7 @@ protected static T jsiiStaticCall(final Class nativeClass, final String m * @return Return value. */ @Nullable + @Internal protected static T jsiiStaticCall(final Class nativeClass, final String method, final NativeType nativeType, @Nullable final Object... args) { return jsiiStaticCall(JsiiEngine.getInstance(), nativeClass, method, nativeType, args); } @@ -169,6 +181,7 @@ protected static T jsiiStaticCall(final Class nativeClass, final String m * @return Return value. */ @Nullable + @Internal static T jsiiStaticCall(final JsiiEngine engine, final Class nativeClass, final String method, final NativeType nativeType, @Nullable final Object... args) { final String fqn = engine.loadModuleForClass(nativeClass); final JsonNode result = engine.getClient().callStaticMethod(fqn, method, JsiiObjectMapper.valueToTree(args)); @@ -184,10 +197,11 @@ static T jsiiStaticCall(final JsiiEngine engine, final Class nativeClass, * @param Java type for the return value. * @return A return value. * - * @deprecated use {@link #jsiiAsyncCall(String, NativeType, Object...)} instead + * @deprecated use {@link Kernel#asyncCall(Object, String, NativeType, Object...)} instead */ @Nullable @Deprecated + @Internal protected final T jsiiAsyncCall(final String method, final Class returnType, @Nullable final Object... args) { return jsiiAsyncCall(method, NativeType.forType(returnType), args); } @@ -200,15 +214,13 @@ protected final T jsiiAsyncCall(final String method, final Class returnTy * @param Java type for the return value. * * @return A return value. + * + * @deprecated Use {@link Kernel#asyncCall(Object, String, NativeType, Object...)} instead */ @Nullable + @Internal protected final T jsiiAsyncCall(final String method, final NativeType nativeType, @Nullable final Object... args) { - final JsiiClient client = engine.getClient(); - final JsiiPromise promise = client.beginAsyncMethod(this.objRef, method, JsiiObjectMapper.valueToTree(args)); - - engine.processAllPendingCallbacks(); - - return JsiiObjectMapper.treeToValue(client.endAsyncMethod(promise), nativeType); + return Kernel.asyncCall(this, method, nativeType, args); } /** @@ -220,25 +232,31 @@ protected final T jsiiAsyncCall(final String method, final NativeType nat * * @return The property value. * - * @deprecated use {@link #jsiiGet(String, NativeType)} instead + * @deprecated use {@link Kernel#get(Object, String, NativeType)} instead */ @Nullable @Deprecated + @Internal protected final T jsiiGet(final String property, final Class type) { return jsiiGet(property, NativeType.forType(type)); } /** * Gets a property value from the object. + * * @param property The property name. * @param type The Java type of the property. * @param The Java type of the property. + * * @return The property value. + * + * @deprecated use {@link Kernel#get(Object, String, NativeType)} instead */ @Nullable + @Deprecated + @Internal protected final T jsiiGet(final String property, final NativeType type) { - final JsonNode result = engine.getClient().getPropertyValue(this.objRef, property); - return JsiiObjectMapper.treeToValue(result, type); + return Kernel.get(this, property, type); } /** @@ -255,19 +273,23 @@ protected final T jsiiGet(final String property, final NativeType type) { */ @Nullable @Deprecated + @Internal protected static T jsiiStaticGet(final Class nativeClass, final String property, final Class type) { return jsiiStaticGet(nativeClass, property, NativeType.forType(type)); } /** * Returns the value of a static property. + * * @param nativeClass The java class. * @param property The name of the property. * @param type The expected java return type. * @param Return type + * * @return Return value */ @Nullable + @Internal protected static T jsiiStaticGet(final Class nativeClass, final String property, final NativeType type) { return jsiiStaticGet(JsiiEngine.getInstance(), nativeClass, property, type); } @@ -286,6 +308,7 @@ protected static T jsiiStaticGet(final Class nativeClass, final String pr * @return Return value */ @Nullable + @Internal static T jsiiStaticGet(final JsiiEngine engine, final Class nativeClass, final String property, final NativeType type) { final String fqn = engine.loadModuleForClass(nativeClass); final JsonNode result = engine.getClient().getStaticPropertyValue(fqn, property); @@ -297,9 +320,13 @@ static T jsiiStaticGet(final JsiiEngine engine, final Class nativeClass, * * @param property The name of the property. * @param value The property value. + * + * @deprecated Use {@link Kernel#set(Object, String, Object)} instead */ + @Deprecated + @Internal protected final void jsiiSet(final String property, @Nullable final Object value) { - engine.getClient().setPropertyValue(this.objRef, property, JsiiObjectMapper.valueToTree(value)); + Kernel.set(this, property, value); } /** @@ -309,6 +336,7 @@ protected final void jsiiSet(final String property, @Nullable final Object value * @param property The name of the property * @param value The value */ + @Internal protected static void jsiiStaticSet(final Class nativeClass, final String property, @Nullable final Object value) { jsiiStaticSet(JsiiEngine.getInstance(), nativeClass, property, value); } @@ -323,29 +351,12 @@ protected static void jsiiStaticSet(final Class nativeClass, final String pro * @param property The name of the property * @param value The value */ - static void jsiiStaticSet(final JsiiEngine engine, final Class nativeClass, final String property, @Nullable final Object value) { + @Internal + protected static void jsiiStaticSet(final JsiiEngine engine, final Class nativeClass, final String property, @Nullable final Object value) { final String fqn = engine.loadModuleForClass(nativeClass); engine.getClient().setStaticPropertyValue(fqn, property, JsiiObjectMapper.valueToTree(value)); } - /** - * Sets the jsii object reference for this object. - * - * @param objRef The objref - */ - final void setObjRef(final JsiiObjectRef objRef) { - this.objRef = objRef; - } - - /** - * Gets the jsii object reference for this object. - * - * @return The objref. - */ - final JsiiObjectRef getObjRef() { - return objRef; - } - /** * Create a view of this {@link JsiiObject} as the implementation of an interface. * @@ -354,6 +365,7 @@ final JsiiObjectRef getObjRef() { * * @return a view on the same {@link JsiiObject}. */ + @Internal final T asInterfaceProxy(final Class proxyClass) { if (!this.proxies.containsKey(proxyClass)) { try { @@ -362,7 +374,7 @@ final T asInterfaceProxy(final Class proxyCl final boolean oldAccessible = constructor.isAccessible(); try { constructor.setAccessible(true); - final JsiiObject proxyInstance = constructor.newInstance(this.getObjRef()); + final JsiiObject proxyInstance = constructor.newInstance(this.jsii$engine.nativeToObjRef(this)); this.proxies.put(proxyClass, proxyInstance); } finally { constructor.setAccessible(oldAccessible); 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 16dfba81b9..2dd7d317c8 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 @@ -23,6 +23,7 @@ /** * Provides a correctly configured JSON processor for handling JSII requests and responses. */ +@Internal public final class JsiiObjectMapper { /** * An ObjectMapper that can be used to serialize and deserialize JSII requests and responses. diff --git a/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/JsiiObjectRef.java b/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/JsiiObjectRef.java index 7851af3ab9..0a795b93a4 100644 --- a/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/JsiiObjectRef.java +++ b/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/JsiiObjectRef.java @@ -11,6 +11,7 @@ /** * Represents a remote jsii object reference. */ +@Internal public final class JsiiObjectRef { /** diff --git a/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/JsiiRuntime.java b/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/JsiiRuntime.java index 342da4e77f..b079d11281 100644 --- a/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/JsiiRuntime.java +++ b/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/JsiiRuntime.java @@ -1,38 +1,33 @@ package software.amazon.jsii; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.jetbrains.annotations.Nullable; import software.amazon.jsii.api.Callback; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.JsonNodeFactory; import com.fasterxml.jackson.databind.node.ObjectNode; -import java.io.BufferedReader; -import java.io.BufferedWriter; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; +import java.io.*; import java.lang.reflect.InvocationTargetException; import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Path; -import java.util.stream.Collectors; +import java.util.concurrent.TimeUnit; import static software.amazon.jsii.JsiiVersion.JSII_RUNTIME_VERSION; -import static software.amazon.jsii.Util.extractResource; /** * Manages the jsii-runtime child process. */ +@Internal public final class JsiiRuntime { /** * Extract the "+" postfix from a full version number. */ private static final String VERSION_BUILD_PART_REGEX = "\\+[a-z0-9]+$"; - /** - * True to print server traces to STDERR. - */ - private static boolean traceEnabled = false; - /** * */ @@ -48,11 +43,6 @@ public final class JsiiRuntime { */ private Process childProcess; - /** - * Child's standard error. - */ - private BufferedReader stderr; - /** * Child's standard output. */ @@ -68,6 +58,11 @@ public final class JsiiRuntime { */ private JsiiCallbackHandler callbackHandler; + /** + * The JVM shutdown hook registered by this instance, if any. + */ + private Thread shutdownHook; + /** * The main API of this class. Sends a JSON request to jsii-runtime and returns the JSON response. * @param request The JSON request @@ -177,58 +172,79 @@ protected void finalize() throws Throwable { } } - public void terminate() throws InterruptedException, IOException { - if (stderr != null) { - stderr.close(); - stderr = null; - } + synchronized void terminate() { + try { + // The jsii Kernel process exists after having received the "exit" message + if (stdin != null) { + stdin.write("{\"exit\":0}\n"); + stdin.close(); + stdin = null; + } - if (stdout != null) { - stdout.close(); - stdout = null; - } + if (childProcess != null) { + // Wait for the child process to complete + try { + // Giving the process up to 5 seconds to clean up and exit + if (!childProcess.waitFor(5, TimeUnit.SECONDS)) { + // If it's still not done, forcibly terminate it at this point. + childProcess.destroy(); + } + } catch (final InterruptedException ie) { + throw new RuntimeException(ie); + } + childProcess = null; + } - if (stdin != null) { - stdin.close(); - stdin = null; - } + // Cleaning up stdout (ensuring buffers are flushed, etc...) + if (stdout != null) { + stdout.close(); + stdout = null; + } - if (childProcess != null) { - // Wait for the child process to complete - childProcess.waitFor(); - childProcess = null; + // We shut down already, no need for the shutdown hook anymore + if (this.shutdownHook != null) { + try { + Runtime.getRuntime().removeShutdownHook(this.shutdownHook); + } catch (final IllegalStateException ise) { + // VM Shutdown is in progress, removal is now impossible (and unnecessary) + } + this.shutdownHook = null; + } + } catch (final IOException ioe) { + throw new UncheckedIOException(ioe); } } /** * Starts jsii-server as a child process if it is not already started. */ - private void startRuntimeIfNeeded() { + private synchronized void startRuntimeIfNeeded() { if (childProcess != null) { return; } // If JSII_DEBUG is set, enable traces. String jsiiDebug = System.getenv("JSII_DEBUG"); - if (jsiiDebug != null + boolean traceEnabled = jsiiDebug != null && !jsiiDebug.isEmpty() && !jsiiDebug.equalsIgnoreCase("false") - && !jsiiDebug.equalsIgnoreCase("0")) { - traceEnabled = true; - } + && !jsiiDebug.equalsIgnoreCase("0"); // If JSII_RUNTIME is set, use it to find the jsii-server executable // otherwise, we default to "jsii-runtime" from PATH. String jsiiRuntimeExecutable = System.getenv("JSII_RUNTIME"); if (jsiiRuntimeExecutable == null) { - jsiiRuntimeExecutable = prepareBundledRuntime(); + jsiiRuntimeExecutable = BundledRuntime.extract(getClass()); } if (traceEnabled) { System.err.println("jsii-runtime: " + jsiiRuntimeExecutable); } - ProcessBuilder pb = new ProcessBuilder("node", jsiiRuntimeExecutable); + ProcessBuilder pb = new ProcessBuilder("node", jsiiRuntimeExecutable) + .redirectInput(ProcessBuilder.Redirect.PIPE) + .redirectOutput(ProcessBuilder.Redirect.PIPE) + .redirectError(ProcessBuilder.Redirect.PIPE); if (traceEnabled) { pb.environment().put("JSII_DEBUG", "1"); @@ -238,27 +254,23 @@ private void startRuntimeIfNeeded() { try { this.childProcess = pb.start(); + this.shutdownHook = new Thread(this::terminate, "Terminate jsii client"); + Runtime.getRuntime().addShutdownHook(this.shutdownHook); } catch (IOException e) { - throw new JsiiException("Cannot find the 'jsii-runtime' executable (JSII_RUNTIME or PATH)"); + throw new JsiiException("Cannot find the 'jsii-runtime' executable (JSII_RUNTIME or PATH)", e); } OutputStreamWriter stdinStream = new OutputStreamWriter(this.childProcess.getOutputStream(), StandardCharsets.UTF_8); InputStreamReader stdoutStream = new InputStreamReader(this.childProcess.getInputStream(), StandardCharsets.UTF_8); - InputStreamReader stderrStream = new InputStreamReader(this.childProcess.getErrorStream(), StandardCharsets.UTF_8); - this.stderr = new BufferedReader(stderrStream); + new ErrorStreamSink(this.childProcess.getErrorStream()).start(); + this.stdout = new BufferedReader(stdoutStream); this.stdin = new BufferedWriter(stdinStream); handshake(); this.client = new JsiiClient(this); - - // if trace is enabled, start a thread that continuously reads from the child process's - // STDERR and prints to my STDERR. - if (traceEnabled) { - startPipeErrorStreamThread(); - } } /** @@ -285,8 +297,7 @@ JsonNode readNextResponse() { try { String responseLine = this.stdout.readLine(); if (responseLine == null) { - String error = this.stderr.lines().collect(Collectors.joining("\n\t")); - throw new JsiiException("Child process exited unexpectedly: " + error); + throw new JsiiException("Child process exited unexpectedly!"); } final JsonNode response = JsiiObjectMapper.INSTANCE.readTree(responseLine); JsiiRuntime.notifyInspector(response, MessageInspector.MessageType.Response); @@ -296,28 +307,6 @@ JsonNode readNextResponse() { } } - /** - * Starts a thread that pipes STDERR from the child process to our STDERR. - */ - private void startPipeErrorStreamThread() { - Thread daemon = new Thread(() -> { - while (true) { - try { - String line = stderr.readLine(); - System.err.println(line); - if (line == null) { - break; - } - } catch (IOException e) { - e.printStackTrace(); - } - } - }); - - daemon.setDaemon(true); - daemon.start(); - } - /** * This will return the server process in case it is not already started. * @return A {@link JsiiClient} connected to the server process. @@ -330,13 +319,6 @@ public JsiiClient getClient() { return this.client; } - /** - * Prints jsii-server traces to STDERR. - */ - public static void enableTrace() { - traceEnabled = true; - } - /** * Asserts that a peer runtimeVersion is compatible with this Java runtime version, which means * they share the same version components, with the possible exception of the build number. @@ -356,31 +338,65 @@ static void assertVersionCompatible(final String expectedVersion, final String a } } - /** - * Extracts all files needed for jsii-runtime.js from JAR into a temp directory. - * @return The full path for jsii-runtime.js - */ - private String prepareBundledRuntime() { - try { - Path directory = Files.createTempDirectory("jsii-java-runtime"); - directory.toFile().deleteOnExit(); + private static void notifyInspector(final JsonNode message, final MessageInspector.MessageType type) { + final MessageInspector inspector = JsiiRuntime.messageInspector.get(); + if (inspector == null) { + return; + } + inspector.inspect(message, type); + } - Path entrypoint = extractResource(getClass(), "jsii-runtime.js", directory); - entrypoint.toFile().deleteOnExit(); + private static final class ErrorStreamSink extends Thread { + private final InputStream inputStream; - extractResource(getClass(), "jsii-runtime.js.map", directory).toFile().deleteOnExit(); + public ErrorStreamSink(final InputStream inputStream) { + super("JsiiRuntime.ErrorStreamSink"); + // This is a daemon thread, shouldn't keep the VM alive. + this.setDaemon(true); - return entrypoint.toString(); - } catch (IOException e) { - throw new JsiiException("Unable to extract bundle of jsii-runtime.js from jar", e); + this.inputStream = inputStream; + } + + public void run() { + try (final InputStreamReader inputStreamReader = new InputStreamReader(this.inputStream); + final BufferedReader reader = new BufferedReader(inputStreamReader)) { + String line; + final ObjectMapper objectMapper = new ObjectMapper(); + while ((line = reader.readLine()) != null) { + try { + final JsonNode tree = objectMapper.readTree(line); + final ConsoleOutput consoleOutput = objectMapper.treeToValue(tree, ConsoleOutput.class); + if (consoleOutput.stderr != null) { + System.err.write(consoleOutput.stderr, 0, consoleOutput.stderr.length); + } + if (consoleOutput.stdout != null) { + System.out.write(consoleOutput.stdout, 0, consoleOutput.stdout.length); + } + } catch (final JsonParseException | JsonMappingException exception) { + // If not JSON, then this goes straight to stderr without touches... + System.err.println(line); + } + } + } catch (final IOException error) { + System.err.printf("I/O Error reading jsii Kernel's STDERR: %s%n", error); + throw new UncheckedIOException(error); + } } } - private static void notifyInspector(final JsonNode message, final MessageInspector.MessageType type) { - final MessageInspector inspector = JsiiRuntime.messageInspector.get(); - if (inspector == null) { - return; + private static final class ConsoleOutput { + @Nullable + public final byte[] stderr; + @Nullable + public final byte[] stdout; + + @JsonCreator + public ConsoleOutput( + @JsonProperty("stderr") @Nullable final byte[] stderr, + @JsonProperty("stdout") @Nullable final byte[] stdout + ) { + this.stderr = stderr; + this.stdout = stdout; } - inspector.inspect(message, type); } } diff --git a/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/JsiiSerializable.java b/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/JsiiSerializable.java index 854b15ddca..9078e79684 100644 --- a/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/JsiiSerializable.java +++ b/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/JsiiSerializable.java @@ -9,12 +9,14 @@ * types, but Jackson doesn't support selecting serializers by annotations, so we needed a type as a marker. * See {@link JsiiObjectMapper} for details. */ +@Internal public interface JsiiSerializable { /** * Serializes this object to JSON. The default behavior is to return an object reference. * However, builders implement this method by emitting an actual JSON object of the key/values. * @return the jsii/JSON representation of this object */ + @Internal default TreeNode $jsii$toJson() { JsiiObjectRef objRef = JsiiEngine.getInstance().nativeToObjRef(this); return objRef.toJson(); diff --git a/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/Kernel.java b/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/Kernel.java new file mode 100644 index 0000000000..dcb1160413 --- /dev/null +++ b/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/Kernel.java @@ -0,0 +1,94 @@ +package software.amazon.jsii; + +import com.fasterxml.jackson.databind.JsonNode; +import org.jetbrains.annotations.Nullable; + +/** + * A static helper to interact with the kernel in a "simple" way. + */ +@Internal +public final class Kernel { + /** + * Calls an async method on the object. + * + * @param receiver the receiver for the method call. + * @param method The name of the method. + * @param nativeType The return type. + * @param args Method arguments. + * @param Java type for the return value. + * + * @return A return value. + */ + @Nullable + @Internal + public static T asyncCall(final Object receiver, final String method, final NativeType nativeType, @Nullable final Object... args) { + final JsiiEngine engine = JsiiEngine.getEngineFor(receiver); + final JsiiObjectRef objRef = engine.nativeToObjRef(receiver); + + final JsiiClient client = engine.getClient(); + final JsiiPromise promise = client.beginAsyncMethod(objRef, method, JsiiObjectMapper.valueToTree(args)); + + engine.processAllPendingCallbacks(); + + return JsiiObjectMapper.treeToValue(client.endAsyncMethod(promise), nativeType); + } + + /** + * Calls a JavaScript method on a receiver. + * + * @param receiver the receiver for hte method call + * @param method The name of the method. + * @param nativeType The return type. + * @param args Method arguments. + * @param Java type for the return value. + * + * @return A return value. + */ + @Nullable + @Internal + public static T call(final Object receiver, final String method, final NativeType nativeType, @Nullable final Object... args) { + final JsiiEngine engine = JsiiEngine.getEngineFor(receiver); + final JsiiObjectRef objRef = engine.nativeToObjRef(receiver); + final JsonNode result = engine.getClient().callMethod(objRef, method, JsiiObjectMapper.valueToTree(args)); + return JsiiObjectMapper.treeToValue(result, nativeType); + } + + /** + * Gets a property value from the object. + * + * @param receiver The receiver of the property access. + * @param property The property name. + * @param type The Java type of the property. + * @param The Java type of the property. + * + * @return The property value. + */ + @Nullable + @Internal + public static T get(final Object receiver, final String property, final NativeType type) { + final JsiiEngine engine = JsiiEngine.getEngineFor(receiver); + final JsiiObjectRef objRef = engine.nativeToObjRef(receiver); + + final JsonNode result = engine.getClient().getPropertyValue(objRef, property); + return JsiiObjectMapper.treeToValue(result, type); + } + + /** + * Sets a property value of an object. + * + * @param receiver The receiver of the property access. + * @param property The name of the property. + * @param value The property value. + */ + @Internal + public static void set(final Object receiver, final String property, @Nullable final Object value) { + final JsiiEngine engine = JsiiEngine.getEngineFor(receiver); + final JsiiObjectRef objRef = engine.nativeToObjRef(receiver); + + engine.getClient().setPropertyValue(objRef, property, JsiiObjectMapper.valueToTree(value)); + } + + private Kernel() { + throw new UnsupportedOperationException(); + } +} diff --git a/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/NativeType.java b/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/NativeType.java index 1f9b768453..9633fffa7f 100644 --- a/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/NativeType.java +++ b/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/NativeType.java @@ -11,6 +11,7 @@ import java.util.Map; import java.util.stream.Collectors; +@Internal public abstract class NativeType { protected static final JavaType[] NO_TYPE_PARAMS = {}; diff --git a/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/api/Callback.java b/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/api/Callback.java index 8be2c3a35d..0dbb386c2d 100644 --- a/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/api/Callback.java +++ b/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/api/Callback.java @@ -1,8 +1,11 @@ package software.amazon.jsii.api; +import software.amazon.jsii.Internal; + /** * The "callback" struct. */ +@Internal public class Callback { /** * Callback ID. diff --git a/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/api/CreateRequest.java b/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/api/CreateRequest.java index 5c07c81f57..b22834d426 100644 --- a/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/api/CreateRequest.java +++ b/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/api/CreateRequest.java @@ -2,9 +2,12 @@ import java.util.Collection; +import software.amazon.jsii.Internal; + /** * Represents a "create" jsii-runtime request. */ +@Internal public class CreateRequest { /** * The FQN of the class to create. diff --git a/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/api/GetRequest.java b/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/api/GetRequest.java index 60ff65bb28..6054772329 100644 --- a/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/api/GetRequest.java +++ b/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/api/GetRequest.java @@ -2,9 +2,12 @@ import com.fasterxml.jackson.databind.node.ObjectNode; +import software.amazon.jsii.Internal; + /** * Represents a "get property" jsii-runtime request. */ +@Internal public class GetRequest { /** * The object reference. diff --git a/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/api/InvokeRequest.java b/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/api/InvokeRequest.java index 3fd51a9c59..c1cddd5ae4 100644 --- a/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/api/InvokeRequest.java +++ b/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/api/InvokeRequest.java @@ -5,9 +5,12 @@ import java.util.List; +import software.amazon.jsii.Internal; + /** * Represents a method invocation jsii-runtime request. */ +@Internal public class InvokeRequest { /** * The object reference. diff --git a/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/api/JsiiOverride.java b/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/api/JsiiOverride.java index a93cb08824..9666692902 100644 --- a/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/api/JsiiOverride.java +++ b/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/api/JsiiOverride.java @@ -1,8 +1,11 @@ package software.amazon.jsii.api; +import software.amazon.jsii.Internal; + /** * Represents an override. */ +@Internal public class JsiiOverride { /** * The name of the overridden method (or null if this is property override). diff --git a/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/api/SetRequest.java b/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/api/SetRequest.java index 13dd37eafd..fc2c03ce4d 100644 --- a/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/api/SetRequest.java +++ b/packages/@jsii/java-runtime/project/src/main/java/software/amazon/jsii/api/SetRequest.java @@ -2,9 +2,12 @@ import com.fasterxml.jackson.databind.JsonNode; +import software.amazon.jsii.Internal; + /** * Represents a "set property" jsii-runtime request. */ +@Internal public class SetRequest { /** * The jsii object reference. diff --git a/packages/@jsii/java-runtime/project/src/test/java/software/amazon/jsii/JsiiObjectTest.java b/packages/@jsii/java-runtime/project/src/test/java/software/amazon/jsii/JsiiObjectTest.java index c40a2c84e6..b4bc57b47a 100644 --- a/packages/@jsii/java-runtime/project/src/test/java/software/amazon/jsii/JsiiObjectTest.java +++ b/packages/@jsii/java-runtime/project/src/test/java/software/amazon/jsii/JsiiObjectTest.java @@ -7,6 +7,7 @@ import com.fasterxml.jackson.databind.node.ObjectNode; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.ArgumentCaptor; import org.mockito.junit.jupiter.MockitoExtension; import org.mockito.junit.jupiter.MockitoSettings; import org.mockito.quality.Strictness; @@ -35,17 +36,23 @@ public void testJsiiCall_Legacy_ReturnsListOfInterfaces() { // WHEN when(mockEngine.getClient()).thenReturn(mockClient); + when(mockEngine.nativeToObjRef(any())).thenReturn(objectRef); when(mockClient.callMethod(objectRef, "listOfInterfaces", nodeFactory.arrayNode())) .thenReturn(nodeFactory.arrayNode() .add(makeObjectReferenceNode()) .add(makeObjectReferenceNode())); // THEN - final List result = new LegacySubject(mockEngine, objectRef).listOfInterfaces(); + final LegacySubject subject = new LegacySubject(mockEngine, objectRef); + final List result = subject.listOfInterfaces(); assertNotNull(result); for (final Object element : result) { assertTrue(element instanceof JsiiObject, String.format("Element %s (of type %s) is not a %s", element, element.getClass(), JsiiObject.class)); } + + final ArgumentCaptor capture = ArgumentCaptor.forClass(LegacySubject.class); + verify(mockEngine).registerObject(eq(objectRef), capture.capture()); + assertEquals(subject, capture.getValue()); } /** @@ -63,17 +70,23 @@ public void testJsiiGet_ReturnsListOfInterfaces() { // WHEN when(mockEngine.getClient()).thenReturn(mockClient); + when(mockEngine.nativeToObjRef(any())).thenReturn(objectRef); when(mockClient.getPropertyValue(objectRef, "interfaces")) .thenReturn(nodeFactory.arrayNode() .add(makeObjectReferenceNode()) .add(makeObjectReferenceNode())); // THEN - final List result = new LegacySubject(mockEngine, objectRef).getInterfaces(); + final LegacySubject subject = new LegacySubject(mockEngine, objectRef); + final List result = subject.getInterfaces(); assertNotNull(result); for (final Object element : result) { assertTrue(element instanceof JsiiObject, String.format("Element %s (of type %s) is not a %s", element, element.getClass(), JsiiObject.class)); } + + final ArgumentCaptor capture = ArgumentCaptor.forClass(LegacySubject.class); + verify(mockEngine).registerObject(eq(objectRef), capture.capture()); + assertEquals(subject, capture.getValue()); } /** @@ -91,16 +104,22 @@ public void testJsiiCall_ReturnsMapOfInterfaces() { // WHEN when(mockEngine.getClient()).thenReturn(mockClient); + when(mockEngine.nativeToObjRef(any())).thenReturn(objectRef); when(mockClient.callMethod(objectRef, "mapOfInterfaces", nodeFactory.arrayNode())) .thenReturn(nodeFactory.objectNode().set("A", makeObjectReferenceNode())); // THEN - final Map result = new LegacySubject(mockEngine, objectRef).mapOfInterfaces(); + final LegacySubject subject = new LegacySubject(mockEngine, objectRef); + final Map result = subject.mapOfInterfaces(); assertNotNull(result); for (final Object element : result.values()) { assertTrue(element instanceof JsiiObject, String.format("Element %s (of type %s) is not a %s", element, element.getClass(), JsiiObject.class)); } + + final ArgumentCaptor capture = ArgumentCaptor.forClass(LegacySubject.class); + verify(mockEngine).registerObject(eq(objectRef), capture.capture()); + assertEquals(subject, capture.getValue()); } /** @@ -118,16 +137,22 @@ public void testJsiiGet_ReturnsMapOfInterfaces() { // WHEN when(mockEngine.getClient()).thenReturn(mockClient); + when(mockEngine.nativeToObjRef(any())).thenReturn(objectRef); when(mockClient.getPropertyValue(objectRef, "interfaceMap")) .thenReturn(nodeFactory.objectNode().set("A", makeObjectReferenceNode())); // THEN - final Map result = new LegacySubject(mockEngine, objectRef).getInterfaceMap(); + final LegacySubject subject = new LegacySubject(mockEngine, objectRef); + final Map result = subject.getInterfaceMap(); assertNotNull(result); for (final Object element : result.values()) { assertTrue(element instanceof JsiiObject, String.format("Element %s (of type %s) is not a %s", element, element.getClass(), JsiiObject.class)); } + + final ArgumentCaptor capture = ArgumentCaptor.forClass(LegacySubject.class); + verify(mockEngine).registerObject(eq(objectRef), capture.capture()); + assertEquals(subject, capture.getValue()); } private ObjectNode makeObjectReferenceNode() { diff --git a/packages/@jsii/kernel/README.md b/packages/@jsii/kernel/README.md index d625a18e53..31a31fc881 100644 --- a/packages/@jsii/kernel/README.md +++ b/packages/@jsii/kernel/README.md @@ -8,7 +8,7 @@ process. It provides the basic interaction API that allows language-specific proxy object to interact with javascript objects they represent. [jsii]: https://github.com/aws/jsii -[@jsii/runtime]: https://github.com/aws/jsii/tree/master/packages/@jsii/runtime +[@jsii/runtime]: https://github.com/aws/jsii/tree/main/packages/@jsii/runtime See [`api.ts`](./lib/api.ts) for request/response API. diff --git a/packages/@jsii/kernel/jest.config.ts b/packages/@jsii/kernel/jest.config.ts new file mode 100644 index 0000000000..6da6af03e8 --- /dev/null +++ b/packages/@jsii/kernel/jest.config.ts @@ -0,0 +1,3 @@ +import config from '../../../jest.config'; + +export default config; diff --git a/packages/@jsii/kernel/lib/api.ts b/packages/@jsii/kernel/lib/api.ts index 1eb4f7b416..113077df57 100644 --- a/packages/@jsii/kernel/lib/api.ts +++ b/packages/@jsii/kernel/lib/api.ts @@ -100,6 +100,19 @@ export interface LoadResponse { readonly types: number; } +export interface InvokeScriptRequest { + readonly assembly: string; + readonly script: string; + readonly args?: string[]; +} + +export interface InvokeScriptResponse { + readonly status: number | null; + readonly stdout: Buffer; + readonly stderr: Buffer; + readonly signal: string | null; +} + export interface CreateRequest { /** * The FQN of the class of which an instance is requested (or "Object") diff --git a/packages/@jsii/kernel/lib/kernel.ts b/packages/@jsii/kernel/lib/kernel.ts index 313e3fd807..d6f5f220d8 100644 --- a/packages/@jsii/kernel/lib/kernel.ts +++ b/packages/@jsii/kernel/lib/kernel.ts @@ -1,12 +1,15 @@ -import * as fs from 'fs-extra'; import * as spec from '@jsii/spec'; +import * as cp from 'child_process'; +import * as fs from 'fs-extra'; import * as os from 'os'; import * as path from 'path'; import * as tar from 'tar'; import * as vm from 'vm'; + import * as api from './api'; import { TOKEN_REF } from './api'; import { ObjectTable, tagJsiiConstructor } from './objects'; +import * as onExit from './on-exit'; import * as wire from './serialization'; export class Kernel { @@ -64,24 +67,11 @@ export class Kernel { ); } - if (!this.installDir) { - this.installDir = fs.mkdtempSync(path.join(os.tmpdir(), 'jsii-kernel-')); - fs.mkdirpSync(path.join(this.installDir, 'node_modules')); - this._debug('creating jsii-kernel modules workdir:', this.installDir); - - process.on('exit', () => { - if (this.installDir) { - this._debug('removing install dir', this.installDir); - fs.removeSync(this.installDir); // can't use async version during exit - } - }); - } - const pkgname = req.name; const pkgver = req.version; // check if we already have such a module - const packageDir = path.join(this.installDir, 'node_modules', pkgname); + const packageDir = this._getPackageDir(pkgname); if (fs.pathExistsSync(packageDir)) { // module exists, verify version const epkg = fs.readJsonSync(path.join(packageDir, 'package.json')); @@ -146,6 +136,50 @@ export class Kernel { }; } + public invokeBinScript( + req: api.InvokeScriptRequest, + ): api.InvokeScriptResponse { + const packageDir = this._getPackageDir(req.assembly); + if (fs.pathExistsSync(packageDir)) { + // module exists, verify version + const epkg = fs.readJsonSync(path.join(packageDir, 'package.json')); + + if (!epkg.bin) { + throw new Error('There is no bin scripts defined for this package.'); + } + + const scriptPath = epkg.bin[req.script]; + + if (!epkg.bin) { + throw new Error(`Script with name ${req.script} was not defined.`); + } + + const result = cp.spawnSync( + path.join(packageDir, scriptPath), + req.args ?? [], + { + encoding: 'utf-8', + env: { + ...process.env, + // Make sure the current NODE_OPTIONS are honored if we shell out to node + NODE_OPTIONS: process.execArgv.join(' '), + // Make sure "this" node is ahead of $PATH just in case + PATH: `${path.dirname(process.execPath)}:${process.env.PATH}`, + }, + shell: true, + }, + ); + + return { + stdout: result.stdout, + stderr: result.stderr, + status: result.status, + signal: result.signal, + }; + } + throw new Error(`Package with name ${req.assembly} was not loaded.`); + } + public create(req: api.CreateRequest): api.CreateResponse { return this._create(req); } @@ -492,6 +526,17 @@ export class Kernel { } } + private _getPackageDir(pkgname: string): string { + if (!this.installDir) { + this.installDir = fs.mkdtempSync(path.join(os.tmpdir(), 'jsii-kernel-')); + fs.mkdirpSync(path.join(this.installDir, 'node_modules')); + this._debug('creating jsii-kernel modules workdir:', this.installDir); + + onExit.removeSync(this.installDir); + } + return path.join(this.installDir, 'node_modules', pkgname); + } + // prefixed with _ to allow calling this method internally without // getting it recorded for testing. private _create(req: api.CreateRequest): api.CreateResponse { diff --git a/packages/@jsii/kernel/lib/objects.ts b/packages/@jsii/kernel/lib/objects.ts index 5c2581fe1d..d852761db2 100644 --- a/packages/@jsii/kernel/lib/objects.ts +++ b/packages/@jsii/kernel/lib/objects.ts @@ -1,4 +1,5 @@ import * as spec from '@jsii/spec'; + import * as api from './api'; import { EMPTY_OBJECT_FQN } from './serialization'; diff --git a/packages/@jsii/kernel/lib/on-exit.ts b/packages/@jsii/kernel/lib/on-exit.ts new file mode 100644 index 0000000000..1a6fbdfb46 --- /dev/null +++ b/packages/@jsii/kernel/lib/on-exit.ts @@ -0,0 +1,32 @@ +import * as fs from 'fs-extra'; +import * as process from 'process'; + +const removeSyncPaths = new Array(); + +export function removeSync(path: string): void { + registerIfNeeded(); + removeSyncPaths.push(path); +} + +let registered = false; + +/** + * Registers the exist handler if it has not been registered already. This is done exactly ocne per + * process, so that processes with multiple kernels don't end up creating too many exit handlers, as + * this reduces the chances they will correctly run. + */ +function registerIfNeeded() { + if (registered) { + return; + } + process.once('exit', onExitHandler); + registered = true; + + function onExitHandler() { + if (removeSyncPaths.length > 0) { + for (const path of removeSyncPaths) { + fs.removeSync(path); + } + } + } +} diff --git a/packages/@jsii/kernel/lib/serialization.ts b/packages/@jsii/kernel/lib/serialization.ts index 7ec2bfa633..c1295613d6 100644 --- a/packages/@jsii/kernel/lib/serialization.ts +++ b/packages/@jsii/kernel/lib/serialization.ts @@ -27,6 +27,7 @@ */ import * as spec from '@jsii/spec'; + import { isObjRef, isWireDate, @@ -42,6 +43,7 @@ import { TOKEN_STRUCT, } from './api'; import { jsiiTypeFqn, objectReference, ObjectTable } from './objects'; + import { api } from '.'; /** @@ -517,7 +519,7 @@ export const SERIALIZERS: { [k: string]: Serializer } = { ? [expectedType.fqn] : undefined; const jsiiType = - jsiiTypeFqn(value) || + jsiiTypeFqn(value) ?? (spec.isClassType(expectedType) ? expectedType.fqn : 'Object'); return host.objects.registerObject(value, jsiiType, interfaces); diff --git a/packages/@jsii/kernel/package.json b/packages/@jsii/kernel/package.json index 593d5d2516..c69e553ab3 100644 --- a/packages/@jsii/kernel/package.json +++ b/packages/@jsii/kernel/package.json @@ -32,51 +32,24 @@ }, "dependencies": { "@jsii/spec": "^0.0.0", - "fs-extra": "^9.0.1", - "tar": "^6.0.5" + "fs-extra": "^9.1.0", + "tar": "^6.1.0" }, "devDependencies": { "@scope/jsii-calc-base": "^0.0.0", "@scope/jsii-calc-lib": "^0.0.0", "@types/fs-extra": "^8.1.1", - "@types/jest": "^26.0.14", - "@types/jest-expect-message": "^1.0.2", - "@types/node": "^10.17.39", - "@types/tar": "^4.0.3", - "eslint": "^7.11.0", - "jest": "^26.5.2", + "@types/jest": "^26.0.20", + "@types/jest-expect-message": "^1.0.3", + "@types/node": "^10.17.51", + "@types/tar": "^4.0.4", + "eslint": "^7.19.0", + "jest": "^26.6.3", "jest-expect-message": "^1.0.2", "jsii-build-tools": "^0.0.0", - "jsii-calc": "^0.0.0", - "prettier": "^2.1.2", - "ts-jest": "^26.4.1", - "typescript": "~3.9.7" - }, - "jest": { - "collectCoverage": true, - "collectCoverageFrom": [ - "**/lib/**/*.js" - ], - "coverageReporters": [ - "lcov", - "text" - ], - "coverageThreshold": { - "global": { - "branches": 60, - "statements": 60 - } - }, - "errorOnDeprecated": true, - "setupFilesAfterEnv": [ - "jest-expect-message" - ], - "testEnvironment": "node", - "testMatch": [ - "**/?(*.)+(spec|test).ts" - ], - "transform": { - "\\.tsx?$": "ts-jest" - } + "jsii-calc": "^3.20.120", + "prettier": "^2.2.1", + "ts-jest": "^26.5.1", + "typescript": "~3.9.9" } } diff --git a/packages/@jsii/kernel/test/kernel.test.ts b/packages/@jsii/kernel/test/kernel.test.ts index 842e814810..b8d430aa64 100644 --- a/packages/@jsii/kernel/test/kernel.test.ts +++ b/packages/@jsii/kernel/test/kernel.test.ts @@ -4,6 +4,7 @@ import * as os from 'os'; import { join } from 'path'; import * as path from 'path'; import * as vm from 'vm'; + import { api, Kernel } from '../lib'; import { Callback, @@ -94,7 +95,7 @@ defineTest.skip = function ( }); expect(result.result).toBe(0o644); - return closeRecording(kernel); + return await closeRecording(kernel); } finally { // Restore the original umask process.umask(originalUmask); @@ -399,7 +400,7 @@ defineTest( packageId: 'Amazon.JSII.Tests.CalculatorPackageId', }, go: { - moduleName: 'github.com/aws-cdk/jsii/jsii-calc/golang', + moduleName: 'github.com/aws/jsii/jsii-calc/go', }, java: { package: 'software.amazon.jsii.tests.calculator', @@ -423,7 +424,7 @@ defineTest( versionSuffix: '-devpreview', }, go: { - moduleName: 'github.com/aws-cdk/jsii/jsii-calc/golang', + moduleName: 'github.com/aws/jsii/jsii-calc/go', }, java: { package: 'software.amazon.jsii.tests.calculator.lib', @@ -2133,6 +2134,18 @@ defineTest('Override transitive property', (sandbox) => { expect(propValue).toBe('N3W'); }); +defineTest('invokeBinScript() return output', (sandbox) => { + const result = sandbox.invokeBinScript({ + assembly: 'jsii-calc', + script: 'calc', + }); + + expect(result.stdout).toEqual('Hello World!\n'); + expect(result.stderr).toEqual(''); + expect(result.status).toEqual(0); + expect(result.signal).toBeNull(); +}); + // ================================================================================================= const testNames: { [name: string]: boolean } = {}; @@ -2203,7 +2216,7 @@ async function preparePackage(module: string, useCache = true) { }); const stdout = new Array(); child.stdout.on('data', (chunk) => stdout.push(Buffer.from(chunk))); - child.once('exit', (code, signal) => { + child.once('close', (code, signal) => { if (code === 0) { return ok(); } diff --git a/packages/@jsii/kernel/test/recording.ts b/packages/@jsii/kernel/test/recording.ts index e0db8cb38c..0dd1f995c0 100644 --- a/packages/@jsii/kernel/test/recording.ts +++ b/packages/@jsii/kernel/test/recording.ts @@ -1,4 +1,5 @@ import * as fs from 'fs-extra'; + import { Kernel } from '../lib'; export async function closeRecording(kernel: Kernel): Promise { @@ -30,12 +31,11 @@ export function recordInteraction(kernel: Kernel, inputOutputLogPath: string) { const logfile = fs.createWriteStream(inputOutputLogPath); (kernel as any).logfile = logfile; - Object.getOwnPropertyNames(Kernel.prototype) - .filter((p) => !p.startsWith('_')) - .forEach((api) => { - const old = Object.getOwnPropertyDescriptor(Kernel.prototype, api)!; - + Object.entries(Object.getOwnPropertyDescriptors(Kernel.prototype)) + .filter(([p, v]) => !p.startsWith('_') && typeof v.value === 'function') + .forEach(([api, old]) => { Object.defineProperty(kernel, api, { + ...old, value(...args: any[]) { logInput({ api, ...args[0] }); try { @@ -67,12 +67,10 @@ export function recordInteraction(kernel: Kernel, inputOutputLogPath: string) { }); function logInput(obj: any) { - const inputLine = `${JSON.stringify(obj)}\n`; - logfile.write(`> ${inputLine}`); + logfile.write(`> ${JSON.stringify(obj)}\n`); } function logOutput(obj: any) { - const outputLine = `${JSON.stringify(obj)}\n`; - logfile.write(`< ${outputLine}`); + logfile.write(`< ${JSON.stringify(obj)}\n`); } } diff --git a/packages/@jsii/kernel/test/serialization.test.ts b/packages/@jsii/kernel/test/serialization.test.ts index 523dc413c3..92b82388cb 100644 --- a/packages/@jsii/kernel/test/serialization.test.ts +++ b/packages/@jsii/kernel/test/serialization.test.ts @@ -1,4 +1,5 @@ import { CANONICAL_ANY, OptionalValue, PrimitiveType } from '@jsii/spec'; + import { TOKEN_REF } from '../lib/api'; import { ObjectTable } from '../lib/objects'; import { diff --git a/packages/@jsii/kernel/tsconfig.json b/packages/@jsii/kernel/tsconfig.json index f5cbea296c..27cdb8c0e7 100644 --- a/packages/@jsii/kernel/tsconfig.json +++ b/packages/@jsii/kernel/tsconfig.json @@ -1,7 +1,8 @@ { "extends": "../../../tsconfig-base", "include": ["**/*.ts"], - "references": [{ - "path": "../spec" - }] + "exclude": ["jest.config.ts"], + "references": [ + { "path": "../spec" }, + ], } diff --git a/packages/@jsii/python-runtime/build-tools/gen-calc.ts b/packages/@jsii/python-runtime/build-tools/gen-calc.ts index da1667f3c1..d3f55cbff5 100644 --- a/packages/@jsii/python-runtime/build-tools/gen-calc.ts +++ b/packages/@jsii/python-runtime/build-tools/gen-calc.ts @@ -33,7 +33,11 @@ runCommand(join(venv.bin, 'python'), [ 'install', '--no-input', '--upgrade', + '--force-reinstall', ...readdirSync(join(genRoot, 'python')) .filter((file) => file.endsWith('.whl')) .map((file) => join(genRoot, 'python', file)), + // Avoid a PyPI published release of jsii replaces the local one: + '-e', + '.', ]); diff --git a/packages/@jsii/python-runtime/build-tools/gen.ts b/packages/@jsii/python-runtime/build-tools/gen.ts index 9ad96931da..e375f61a0a 100644 --- a/packages/@jsii/python-runtime/build-tools/gen.ts +++ b/packages/@jsii/python-runtime/build-tools/gen.ts @@ -1,7 +1,7 @@ #!/usr/bin/env npx ts-node -import { copyFileSync, readdirSync, writeFileSync } from 'fs'; -import { join, resolve } from 'path'; +import { copyFileSync, readdirSync, statSync, writeFileSync } from 'fs'; +import { resolve } from 'path'; const EMBEDDED_SOURCE = resolve(__dirname, '..', '..', 'runtime', 'webpack'); const EMBEDDED_INFO = resolve(__dirname, '..', '..', 'runtime', 'package.json'); @@ -30,10 +30,60 @@ writeFileSync( { encoding: 'utf-8' }, ); -for (const filename of readdirSync(EMBEDDED_SOURCE)) { - const filepath = join(EMBEDDED_SOURCE, filename); - copyFileSync( - filepath, - resolve(__dirname, '..', 'src', 'jsii', '_embedded', 'jsii', filename), - ); +const EMBEDDED_TARGET = resolve( + __dirname, + '..', + 'src', + 'jsii', + '_embedded', + 'jsii', +); + +function embedFiles( + sourceDirectory: string, + prefix?: string, +): { [path: string]: string } { + const result: { [path: string]: string } = {}; + + for (const filename of readdirSync(sourceDirectory)) { + // Ignore dot-files + if (filename.startsWith('.')) { + continue; + } + const filepath = resolve(sourceDirectory, filename); + if (statSync(filepath).isDirectory()) { + // Not using path.join because we don't want Windows path separators here + const nextPrefix = prefix ? `${prefix}/${filename}` : filename; + Object.assign(result, embedFiles(filepath, nextPrefix)); + continue; + } + + const embeddedFileName = prefix + ? `${prefix.replace(/[/]/g, '__')}__${filename}` + : filename; + const targetFile = resolve(EMBEDDED_TARGET, embeddedFileName); + copyFileSync(filepath, targetFile); + // Not using path.join because we don't want Windows path separators here + result[embeddedFileName] = prefix ? `${prefix}/${filename}` : filename; + } + + return result; } + +const embeddedFiles = embedFiles(EMBEDDED_SOURCE); + +writeFileSync( + resolve(EMBEDDED_TARGET, '__init__.py'), + `EMBEDDED_FILES = { +${Object.entries(embeddedFiles) + // Sorting to ensure `bin/jsii-runtime.js` is first. + .map(([embedded, actual]) => ` "${embedded}": "${actual}",`) + .join('\n')} +} + +ENTRYPOINT = ${JSON.stringify('bin/jsii-runtime.js'.replace(/[/]/g, '__'))} + +__all__ = ["EMBEDDED_FILES", "ENTRYPOINT"] +`, + { encoding: 'utf-8' }, +); diff --git a/packages/@jsii/python-runtime/package.json b/packages/@jsii/python-runtime/package.json index 0a2879f2e5..8028c99b5a 100644 --- a/packages/@jsii/python-runtime/package.json +++ b/packages/@jsii/python-runtime/package.json @@ -37,11 +37,11 @@ "@jsii/runtime": "^0.0.0" }, "devDependencies": { - "fs-extra": "^9.0.1", + "fs-extra": "^9.1.0", "jsii-build-tools": "^0.0.0", - "jsii-calc": "^0.0.0", + "jsii-calc": "^3.20.120", "jsii-pacmak": "^0.0.0", - "ts-node": "^9.0.0", - "typescript": "~3.9.7" + "ts-node": "^9.1.1", + "typescript": "~3.9.9" } } diff --git a/packages/@jsii/python-runtime/requirements.txt b/packages/@jsii/python-runtime/requirements.txt index c90b3ab229..4b3d9f9573 100644 --- a/packages/@jsii/python-runtime/requirements.txt +++ b/packages/@jsii/python-runtime/requirements.txt @@ -1,8 +1,9 @@ black~=20.8b1 -pytest~=6.1 -pytest-mypy~=0.7 -pip~=20.2 -setuptools~=50.3 -wheel~=0.35 +mypy==0.800 +pip~=21.0 +pytest~=6.2 +pytest-mypy~=0.8 +setuptools~=53.0 +wheel~=0.36 -e . diff --git a/packages/@jsii/python-runtime/setup.py b/packages/@jsii/python-runtime/setup.py index b91695751d..bb858f883d 100644 --- a/packages/@jsii/python-runtime/setup.py +++ b/packages/@jsii/python-runtime/setup.py @@ -31,12 +31,13 @@ }, install_requires=[ "attrs~=20.1", - "cattrs~=1.0", + "cattrs~=1.0.0 ; python_version < '3.7'", + "cattrs~=1.1.0 ; python_version >= '3.7'", "importlib_resources ; python_version < '3.7'", "python-dateutil", "typing_extensions~=3.7", ], - python_requires=">=3.6", + python_requires="~=3.6", classifiers=[ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", @@ -46,6 +47,7 @@ "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries", "Topic :: Utilities", "Typing :: Typed", diff --git a/packages/@jsii/python-runtime/src/jsii/_embedded/jsii/__init__.py b/packages/@jsii/python-runtime/src/jsii/_embedded/jsii/.gitkeep similarity index 100% rename from packages/@jsii/python-runtime/src/jsii/_embedded/jsii/__init__.py rename to packages/@jsii/python-runtime/src/jsii/_embedded/jsii/.gitkeep diff --git a/packages/@jsii/python-runtime/src/jsii/_kernel/__init__.py b/packages/@jsii/python-runtime/src/jsii/_kernel/__init__.py index 984f180bc8..ebf137cf48 100644 --- a/packages/@jsii/python-runtime/src/jsii/_kernel/__init__.py +++ b/packages/@jsii/python-runtime/src/jsii/_kernel/__init__.py @@ -33,6 +33,7 @@ GetResponse, InvokeRequest, InvokeResponse, + InvokeScriptRequest, KernelResponse, LoadRequest, ObjRef, @@ -242,6 +243,20 @@ def __init__(self, provider_class: Type[BaseProvider] = ProcessProvider) -> None def load(self, name: str, version: str, tarball: str) -> None: self.provider.load(LoadRequest(name=name, version=version, tarball=tarball)) + def invokeBinScript( + self, pkgname: str, script: str, args: Optional[List[Any]] = None + ) -> None: + if args is None: + args = [] + + self.provider.invokeBinScript( + InvokeScriptRequest( + pkgname=pkgname, + script=script, + args=_make_reference_for_native(self, args), + ) + ) + # TODO: Is there a way to say that obj has to be an instance of klass? def create(self, klass: Type, obj: Any, args: Optional[List[Any]] = None) -> ObjRef: if args is None: diff --git a/packages/@jsii/python-runtime/src/jsii/_kernel/providers/base.py b/packages/@jsii/python-runtime/src/jsii/_kernel/providers/base.py index 145c654804..06ba5347e5 100644 --- a/packages/@jsii/python-runtime/src/jsii/_kernel/providers/base.py +++ b/packages/@jsii/python-runtime/src/jsii/_kernel/providers/base.py @@ -11,6 +11,8 @@ GetResponse, InvokeRequest, InvokeResponse, + InvokeScriptRequest, + InvokeScriptResponse, DeleteRequest, DeleteResponse, SetRequest, @@ -45,6 +47,10 @@ class BaseProvider(metaclass=abc.ABCMeta): def load(self, request: LoadRequest) -> LoadResponse: ... + @abc.abstractmethod + def invokeBinScript(self, request: InvokeScriptRequest) -> InvokeScriptResponse: + ... + @abc.abstractmethod def create(self, request: CreateRequest) -> CreateResponse: ... diff --git a/packages/@jsii/python-runtime/src/jsii/_kernel/providers/process.py b/packages/@jsii/python-runtime/src/jsii/_kernel/providers/process.py index 1fb6fac3ee..ef960c90a4 100644 --- a/packages/@jsii/python-runtime/src/jsii/_kernel/providers/process.py +++ b/packages/@jsii/python-runtime/src/jsii/_kernel/providers/process.py @@ -1,16 +1,19 @@ import atexit +import base64 import datetime import contextlib import enum -import importlib.machinery import json import os import os.path +import pathlib import platform import subprocess +import sys import tempfile +import threading -from typing import TYPE_CHECKING, Type, Union, Mapping, Any, Optional +from typing import TYPE_CHECKING, Type, Union, Mapping, IO, Any, AnyStr, Optional import attr import cattr # type: ignore @@ -38,6 +41,8 @@ GetResponse, InvokeRequest, InvokeResponse, + InvokeScriptRequest, + InvokeScriptResponse, SetRequest, SetResponse, StaticGetRequest, @@ -158,6 +163,10 @@ def __init__(self): LoadRequest, _with_api_key("load", self._serializer.unstructure_attrs_asdict), ) + self._serializer.register_unstructure_hook( + InvokeScriptRequest, + _with_api_key("invokeBinScript", self._serializer.unstructure_attrs_asdict), + ) self._serializer.register_unstructure_hook( CreateRequest, _with_api_key("create", self._serializer.unstructure_attrs_asdict), @@ -218,48 +227,20 @@ def __init__(self): def __del__(self): self.stop() - def _jsii_runtime(self): - # We have the JSII Runtime bundled with our package and we want to extract it, - # however if we just blindly use importlib.resources for this, we're going to - # have our jsii-runtime.js existing in a *different* temporary directory from - # the jsii-runtime.js.map, which we don't want. We can manually set up a - # temporary directory and extract our resources to there, but we don't want to - # pay the case of setting up a a temporary directory and shuffling bytes around - # in the common case where these files already exist on disk side by side. So - # we will check what loader the embedded package used, if it's a - # SourceFileLoader then we'll assume it's going to be on the filesystem and - # just use importlib.resources.path. - - # jsii-runtime.js MUST be the first item in this list. - filenames = ["jsii-runtime.js", "jsii-runtime.js.map"] - - if isinstance( - jsii._embedded.jsii.__loader__, importlib.machinery.SourceFileLoader - ): - paths = [ - self._ctx_stack.enter_context( - importlib_resources.path(jsii._embedded.jsii, f) - ) - for f in filenames - ] - else: - tmpdir = self._ctx_stack.enter_context(tempfile.TemporaryDirectory()) - paths = [os.path.join(tmpdir, filename) for filename in filenames] - - for path, filename in zip(paths, filenames): - with open(path, "wb") as fp: - fp.write( - importlib_resources.read_binary(jsii._embedded.jsii, filename) - ) + def _jsii_runtime(self) -> str: + tmpdir = self._ctx_stack.enter_context(tempfile.TemporaryDirectory()) + resources = { + resname: os.path.join(tmpdir, filename.replace("/", os.sep)) + for resname, filename in jsii._embedded.jsii.EMBEDDED_FILES.items() + } - # Ensure that our jsii-runtime.js is the first entry in our paths, and that all - # of our paths, are in a commmon directory, and we didn't get them split into - # multiple directories somehow. - assert os.path.basename(paths[0]) == filenames[0] - assert os.path.commonpath(paths) == os.path.dirname(paths[0]) + for resname, filename in resources.items(): + pathlib.Path(os.path.dirname(filename)).mkdir(exist_ok=True) + with open(filename, "wb") as fp: + fp.write(importlib_resources.read_binary(jsii._embedded.jsii, resname)) # Return our first path, which should be the path for jsii-runtime.js - return str(paths[0]) + return resources[jsii._embedded.jsii.ENTRYPOINT] def _next_message(self) -> Mapping[Any, Any]: return json.loads(self._process.stdout.readline(), object_hook=ohook) @@ -271,12 +252,27 @@ def start(self): jsii_runtime = environ.get("JSII_RUNTIME", self._jsii_runtime()) self._process = subprocess.Popen( - ["node", jsii_runtime], + [ + "node", + "--max-old-space-size=4069", + jsii_runtime, + ], stdin=subprocess.PIPE, stdout=subprocess.PIPE, + stderr=subprocess.PIPE, env=environ, ) + self.sink_thread = threading.Thread( + name="process.stderr_sink", + target=stderr_sink, + # Trailing comma here is important (this is a 1-value tuple, not a value between parentheses) + args=(self._process.stderr,), + # Thread is a daemon so it does not hold the VM from shutting down + daemon=True, + ) + self.sink_thread.start() + # Clean this process up at exit, so it terminates "gracefully" atexit.register(self.stop) @@ -286,16 +282,18 @@ def stop(self): # This process is closing already, un-registering the hook to not fire twice atexit.unregister(self.stop) - # Close the process' STDIN, singalling we are done with it - self._process.stdin.close() + if not self._process.stdin.closed: + self._process.stdin.write(b'{"exit":0}\n') + # Close the process' STDIN, singaling we are done with it + self._process.stdin.close() try: self._process.wait(timeout=5) except subprocess.TimeoutExpired: - try: - self._process.terminate(timeout=5) - except subprocess.TimeoutExpired: - self._process.kill() + self._process.terminate() + + if self.sink_thread.is_alive(): + self.sink_thread.join(timeout=5) self._ctx_stack.close() @@ -343,6 +341,9 @@ def _process(self) -> _NodeProcess: def load(self, request: LoadRequest) -> LoadResponse: return self._process.send(request, LoadResponse) + def invokeBinScript(self, request: InvokeScriptRequest) -> InvokeScriptResponse: + return self._process.send(request, InvokeScriptResponse) + def create(self, request: CreateRequest) -> CreateResponse: return self._process.send(request, CreateResponse) @@ -389,3 +390,18 @@ def stats(self, request: Optional[StatsRequest] = None) -> StatsResponse: if request is None: request = StatsRequest() return self._process.send(request, StatsResponse) + + +def stderr_sink(reader: IO[AnyStr]) -> None: + # An empty string is used to signal EOF... + for line in iter(reader.readline, b""): + if line == b"": + break + try: + console = json.loads(line) + if console.get("stderr") is not None: + sys.stderr.buffer.write(base64.b64decode(console["stderr"])) + if console.get("stdout") is not None: + sys.stdout.buffer.write(base64.b64decode(console["stdout"])) + except: + print(line, file=sys.stderr) diff --git a/packages/@jsii/python-runtime/src/jsii/_kernel/types.py b/packages/@jsii/python-runtime/src/jsii/_kernel/types.py index 8adf783748..cc0f73c022 100644 --- a/packages/@jsii/python-runtime/src/jsii/_kernel/types.py +++ b/packages/@jsii/python-runtime/src/jsii/_kernel/types.py @@ -47,6 +47,23 @@ class LoadResponse: types: int +@attr.s(auto_attribs=True, frozen=True, slots=True) +class InvokeScriptRequest: + + pkgname: str + script: str + args: List[Any] = attr.Factory(list) + + +@attr.s(auto_attribs=True, frozen=True, slots=True) +class InvokeScriptResponse: + + status: int + stdout: str + stderr: str + output: List[str] + + @attr.s(auto_attribs=True, frozen=True, slots=True) class CreateRequest: @@ -226,6 +243,7 @@ class StatsResponse: GetRequest, StaticGetRequest, InvokeRequest, + InvokeScriptRequest, StaticInvokeRequest, StatsRequest, ] @@ -237,6 +255,7 @@ class StatsResponse: DeleteResponse, GetResponse, InvokeResponse, + InvokeScriptResponse, SetResponse, StatsResponse, Callback, diff --git a/packages/@jsii/python-runtime/src/jsii/_runtime.py b/packages/@jsii/python-runtime/src/jsii/_runtime.py index c632035556..14ac3b7763 100644 --- a/packages/@jsii/python-runtime/src/jsii/_runtime.py +++ b/packages/@jsii/python-runtime/src/jsii/_runtime.py @@ -3,7 +3,7 @@ import attr -from typing import ClassVar +from typing import cast, Any, Callable, ClassVar, List, Optional, Mapping, Type, TypeVar from . import _reference_map from ._compat import importlib_resources @@ -27,7 +27,7 @@ class JSIIAssembly: filename: str @classmethod - def load(cls, *args, _kernel=kernel, **kwargs): + def load(cls, *args, _kernel=kernel, **kwargs) -> "JSIIAssembly": # Our object here really just acts as a record for our JSIIAssembly, it doesn't # offer any functionality itself, besides this class method that will trigger # the loading of the given assembly in the JSII Kernel. @@ -45,9 +45,23 @@ def load(cls, *args, _kernel=kernel, **kwargs): # Give our record of the assembly back to the caller. return assembly + @classmethod + def invokeBinScript( + cls, pkgname: str, script: str, *args: str, _kernel=kernel + ) -> None: + response = _kernel.invokeBinScript(pkgname, script, *args) + print(response.stdout) + class JSIIMeta(_ClassPropertyMeta, type): - def __new__(cls, name, bases, attrs, *, jsii_type=None): + def __new__( + cls: Type["JSIIMeta"], + name: str, + bases: tuple, + attrs: dict, + *, + jsii_type: Optional[str] = None, + ) -> "JSIIMeta": # We want to ensure that subclasses of a JSII class do not require setting the # jsii_type keyword argument. They should be able to subclass it as normal. # Since their parent class will have the __jsii_type__ variable defined, they @@ -63,9 +77,9 @@ def __new__(cls, name, bases, attrs, *, jsii_type=None): if jsii_type is not None: _reference_map.register_type(obj) - return obj + return cast("JSIIMeta", obj) - def __call__(cls, *args, **kwargs): + def __call__(cls: Type[Any], *args: Any, **kwargs) -> Any: inst = super().__call__(*args, **kwargs) # Register this instance with our reference map. @@ -78,7 +92,11 @@ class JSIIAbstractClass(abc.ABCMeta, JSIIMeta): pass -def enum(*, jsii_type): +F = TypeVar("F", bound=Callable[..., Any]) +T = TypeVar("T", bound=Type[Any]) + + +def enum(*, jsii_type: str) -> Callable[[T], T]: def deco(cls): cls.__jsii_type__ = jsii_type _reference_map.register_enum(cls) @@ -87,7 +105,12 @@ def deco(cls): return deco -def data_type(*, jsii_type, jsii_struct_bases, name_mapping): +def data_type( + *, + jsii_type: str, + jsii_struct_bases: List[Type[Any]], + name_mapping: Mapping[str, str], +) -> Callable[[T], T]: def deco(cls): cls.__jsii_type__ = jsii_type cls.__jsii_struct_bases__ = jsii_struct_bases @@ -98,7 +121,7 @@ def deco(cls): return deco -def member(*, jsii_name): +def member(*, jsii_name: str) -> Callable[[F], F]: def deco(fn): fn.__jsii_name__ = jsii_name return fn @@ -106,7 +129,7 @@ def deco(fn): return deco -def implements(*interfaces): +def implements(*interfaces: Type[Any]) -> Callable[[T], T]: def deco(cls): cls.__jsii_type__ = getattr(cls, "__jsii_type__", None) cls.__jsii_ifaces__ = getattr(cls, "__jsii_ifaces__", []) + list(interfaces) @@ -115,7 +138,7 @@ def deco(cls): return deco -def interface(*, jsii_type): +def interface(*, jsii_type: str) -> Callable[[T], T]: def deco(iface): iface.__jsii_type__ = jsii_type _reference_map.register_interface(iface) @@ -124,12 +147,12 @@ def deco(iface): return deco -def proxy_for(abstract_class): +def proxy_for(abstract_class: Type[Any]) -> Type[Any]: if not hasattr(abstract_class, "__jsii_proxy_class__"): raise TypeError(f"{abstract_class} is not a JSII Abstract class.") return abstract_class.__jsii_proxy_class__() -def python_jsii_mapping(cls): +def python_jsii_mapping(cls: Type[Any]) -> Optional[Mapping[str, str]]: return getattr(cls, "__jsii_name_mapping__", None) diff --git a/packages/@jsii/python-runtime/tests/conftest.py b/packages/@jsii/python-runtime/tests/conftest.py deleted file mode 100644 index 04db5eb90b..0000000000 --- a/packages/@jsii/python-runtime/tests/conftest.py +++ /dev/null @@ -1,3 +0,0 @@ -import os - -os.environ["JSII_DEBUG"] = "1" diff --git a/packages/@jsii/python-runtime/tests/test_compliance.py b/packages/@jsii/python-runtime/tests/test_compliance.py index 9262679811..28aa6b6220 100644 --- a/packages/@jsii/python-runtime/tests/test_compliance.py +++ b/packages/@jsii/python-runtime/tests/test_compliance.py @@ -85,7 +85,6 @@ from scope.jsii_calc_lib import IFriendly, EnumFromScopedModule, Number from scope.jsii_calc_lib.custom_submodule_name import IReflectable, ReflectableEntry - # Note: The names of these test functions have been chosen to map as closely to the # Java Compliance tests as possible. # Note: While we could write more expressive and better tests using the functionality diff --git a/packages/@jsii/runtime/README.md b/packages/@jsii/runtime/README.md index f3937a427b..2c0caf2d6d 100644 --- a/packages/@jsii/runtime/README.md +++ b/packages/@jsii/runtime/README.md @@ -9,10 +9,10 @@ classes, such as getting/setting properties or invoking methods is transmitted via a simple STDIN/STDOUT protocol to the actual object hosted within the VM. [jsii]: https://github.com/aws/jsii -[@jsii/kernel]: https://github.com/aws/jsii/tree/master/packages/@jsii/kernel +[@jsii/kernel]: https://github.com/aws/jsii/tree/main/packages/@jsii/kernel See [STDIN/STDOUT protocol](./lib/in-out.ts) and [@jsii/kernel -API](https://github.com/aws/jsii/blob/master/packages/@jsii/kernel/lib/api.ts) +API](https://github.com/aws/jsii/blob/main/packages/@jsii/kernel/lib/api.ts) for details. ## License diff --git a/packages/@jsii/runtime/bin/jsii-runtime b/packages/@jsii/runtime/bin/jsii-runtime index edc2c78b96..2de9a4bfa2 100755 --- a/packages/@jsii/runtime/bin/jsii-runtime +++ b/packages/@jsii/runtime/bin/jsii-runtime @@ -1,2 +1,2 @@ #!/usr/bin/env node -require('../lib/program.js'); \ No newline at end of file +require('./jsii-runtime.js'); diff --git a/packages/@jsii/runtime/bin/jsii-runtime.ts b/packages/@jsii/runtime/bin/jsii-runtime.ts new file mode 100644 index 0000000000..5bd80030b9 --- /dev/null +++ b/packages/@jsii/runtime/bin/jsii-runtime.ts @@ -0,0 +1,82 @@ +import { spawn } from 'child_process'; +import { error } from 'console'; +import { constants as os } from 'os'; +import { resolve } from 'path'; +import { execArgv, execPath, exit, on, stdin, stdout } from 'process'; +import { Duplex } from 'stream'; + +// Spawn another node process, with the following file descriptor setup: +// - No STDIN will be provided +// - STDOUT and STDERR will be intercepted, contents wrapped & forward to STDERR +// - FD#3 is the communication pipe to read jsii API messages +// - FD#4 is the communication pipe to write jsii API responses +const child = spawn( + execPath, + [...execArgv, resolve(__dirname, '..', 'lib', 'program.js')], + { stdio: ['ignore', 'pipe', 'pipe', 'pipe'] }, +); + +//#region Exit, error and signal forwarders + +child.once('end', (code, signal) => { + if (signal != null) { + // Child was killed by signal, this is usually reflected by exiting with + // 128 + + exit(128 + (os.signals[signal as keyof typeof os.signals] ?? 0)); + } + // Child exited, so we reflect it's exit code to our creator + exit(code); +}); + +child.once('error', (err) => { + console.error('Failed to spawn child process:', err.stack); + exit(-1); +}); + +for (const signal of Object.keys(os.signals)) { + // Those signals cannot be trapped (libuv would throw EINVAL). + if (signal === 'SIGKILL' || signal === 'SIGSTOP') { + continue; + } + + // Forward all signals to the child + on(signal, (sig) => child.kill(sig)); +} + +//#endregion + +//#region STDOUT and STDERR handlers + +/** + * Creates chunk handlers for the child process' STDOUT and STDERR, which will + * forward any data received through to this process' STDERR after having base64 + * encoded the data and wrapped it in a simple JSON blob denoting which stream + * the data is for. + * + * @param tag the name of the stream (stdout or stderr) that received the data + * + * @returns a new handler for the `Readable.on('data', handler)` event. + */ +function makeHandler( + tag: 'stdout' | 'stderr', +): (chunk: string | Buffer) => void { + return (chunk) => { + const buffer = Buffer.from(chunk); + error(JSON.stringify({ [tag]: buffer.toString('base64') })); + }; +} + +child.stdout.on('data', makeHandler('stdout')); +child.stderr.on('data', makeHandler('stderr')); + +//#endregion + +//#region Piping jsii API requests & responses + +const commands: Duplex = (child.stdio as any)[3]; +// Forwarding requests from this process' STDIN to the child's FD#3 +stdin.pipe(commands); +// Forwarding responses from the child's FD#3 to this process' STDOUT +commands.pipe(stdout); + +//#endregion diff --git a/packages/@jsii/runtime/jest.config.ts b/packages/@jsii/runtime/jest.config.ts new file mode 100644 index 0000000000..84550ec62b --- /dev/null +++ b/packages/@jsii/runtime/jest.config.ts @@ -0,0 +1,13 @@ +import { overriddenConfig } from '../../../jest.config'; + +export default overriddenConfig({ + coveragePathIgnorePatterns: [ + // This cannot be tested in a way that enables collection of coverage + '/lib/sync-stdio.ts', + ], + coverageThreshold: { + global: { + branches: 48, + }, + }, +}); diff --git a/packages/@jsii/runtime/lib/host.ts b/packages/@jsii/runtime/lib/host.ts index d5a5d64288..9522d22e01 100644 --- a/packages/@jsii/runtime/lib/host.ts +++ b/packages/@jsii/runtime/lib/host.ts @@ -1,13 +1,14 @@ import { api, Kernel } from '@jsii/kernel'; -import { Input, InputOutput } from './in-out'; import { EventEmitter } from 'events'; +import { Input, IInputOutput } from './in-out'; + export class KernelHost { private readonly kernel = new Kernel(this.callbackHandler.bind(this)); private readonly eventEmitter = new EventEmitter(); public constructor( - private readonly inout: InputOutput, + private readonly inout: IInputOutput, private readonly opts: { debug?: boolean; noStack?: boolean } = {}, ) { this.kernel.traceEnabled = opts.debug ? true : false; @@ -15,8 +16,8 @@ export class KernelHost { public run() { const req = this.inout.read(); - if (!req) { - this.eventEmitter.emit('exit'); + if (!req || 'exit' in req) { + this.eventEmitter.emit('exit', req?.exit ?? 0); return; // done } @@ -27,8 +28,8 @@ export class KernelHost { }); } - public on(event: 'exit', listener: () => void) { - this.eventEmitter.on(event, listener); + public once(event: 'exit', listener: (code: number) => void) { + this.eventEmitter.once(event, listener); } private callbackHandler(callback: api.Callback) { @@ -41,7 +42,7 @@ export class KernelHost { function completeCallback(this: KernelHost): void { const req = this.inout.read(); - if (!req) { + if (!req || 'exit' in req) { throw new Error('Interrupted before callback returned'); } diff --git a/packages/@jsii/runtime/lib/in-out.ts b/packages/@jsii/runtime/lib/in-out.ts index 98424234e6..41b4a9234d 100644 --- a/packages/@jsii/runtime/lib/in-out.ts +++ b/packages/@jsii/runtime/lib/in-out.ts @@ -1,6 +1,7 @@ -import { SyncStdio } from './sync-stdio'; import { api } from '@jsii/kernel'; +import { SyncStdio } from './sync-stdio'; + export type Output = | { hello: string } | { ok: api.KernelResponse } @@ -12,10 +13,31 @@ export type Input = | ({ api: string } & api.KernelRequest) | { complete: api.CompleteRequest }; -export class InputOutput { +export type Exit = { exit: number }; + +/** + * An IO provider for jsii API exchanges. + */ +export interface IInputOutput { + /** + * Writes a message to the jsii API host. + * @param message the message to be sent. + */ + write(message: Output): void; + + /** + * Wait for a message from the jsii API host, then return it. + * + * @returns the received message, or `undefined` if the API host has no more + * requests to send. + */ + read(): Input | Exit | undefined; +} + +export class InputOutput implements IInputOutput { public debug = false; - private readonly stdio = new SyncStdio(); + public constructor(private readonly stdio: SyncStdio) {} public write(obj: Output) { const output = JSON.stringify(obj); diff --git a/packages/@jsii/runtime/lib/program.ts b/packages/@jsii/runtime/lib/program.ts index bc7ab4f714..2655ff01a6 100644 --- a/packages/@jsii/runtime/lib/program.ts +++ b/packages/@jsii/runtime/lib/program.ts @@ -1,6 +1,9 @@ +import * as process from 'process'; + import * as packageInfo from '../package.json'; import { KernelHost } from './host'; import { InputOutput } from './in-out'; +import { SyncStdio } from './sync-stdio'; const name = packageInfo.name; const version = packageInfo.version; @@ -8,9 +11,25 @@ const version = packageInfo.version; const noStack = !!process.env.JSII_NOSTACK; const debug = !!process.env.JSII_DEBUG; -const inout = new InputOutput(); +// This assumes FD#3 is opened for reading and writing. This is normally +// performed by`bin/jsii-runtime.js`, and we will not be verifying this once +// again...Meaning that failure to have set this up correctly results in +// undefined behavior(likely a crash). +const stdio = new SyncStdio({ + // "process.stderr.fd" is not in @types/node definitions because it can be + // absent in certain circumstances (for example, in `worker_threads` workers). + // We'll fall-back to `2` - its expected value - in this case; but this is not + // supposed to be happening here (we don't use `worker_threads`). + errorFD: (process.stderr as any).fd ?? 2, + readFD: 3, + writeFD: 3, +}); + +const inout = new InputOutput(stdio); const host = new KernelHost(inout, { debug, noStack }); +host.once('exit', process.exit.bind(process)); + // say hello inout.write({ hello: `${name}@${version}` }); inout.debug = debug; // we don't want "hello" emitted diff --git a/packages/@jsii/runtime/lib/sync-stdio.ts b/packages/@jsii/runtime/lib/sync-stdio.ts index 0bfd15c5a7..b04b725684 100644 --- a/packages/@jsii/runtime/lib/sync-stdio.ts +++ b/packages/@jsii/runtime/lib/sync-stdio.ts @@ -1,48 +1,47 @@ import * as fs from 'fs'; -const STDIN_FD = 0; -const STDOUT_FD = 1; -const STDERR_FD = 2; -const INPUT_BUFFER_SIZE = 1024 * 1024; // not related to max line length - -const EMPTY_BUFFER = Buffer.alloc(0); +const INPUT_BUFFER_SIZE = 1_048_576; // 1MiB (aka: 1024 * 1024), not related to max line length export class SyncStdio { - private bufferedData = EMPTY_BUFFER; + private bufferedData = Buffer.alloc(0); + + private readonly stderr: number; + private readonly stdin: number; + private readonly stdout: number; + + // A buffer that will be used for all reading operations. + private readonly readBuffer = Buffer.alloc(INPUT_BUFFER_SIZE); + + public constructor({ errorFD, readFD, writeFD }: SyncStdioOptions) { + this.stderr = errorFD; + this.stdin = readFD; + this.stdout = writeFD; + } public writeErrorLine(line: string) { - this.writeBuffer(Buffer.from(`${line}\n`), STDERR_FD); + this.writeBuffer(Buffer.from(`${line}\n`), this.stderr); } public writeLine(line: string) { - this.writeBuffer(Buffer.from(`${line}\n`), STDOUT_FD); + this.writeBuffer(Buffer.from(`${line}\n`), this.stdout); } public readLine(): string | undefined { - const buff = Buffer.alloc(INPUT_BUFFER_SIZE); while (!this.bufferedData.includes('\n', 0, 'utf-8')) { - try { - const read = fs.readSync(STDIN_FD, buff, 0, buff.length, null); - - if (read === 0) { - return undefined; - } + const read = fs.readSync( + this.stdin, + this.readBuffer, + 0, + this.readBuffer.length, + null, + ); - const newData = buff.slice(0, read); - this.bufferedData = Buffer.concat([this.bufferedData, newData]); - } catch (e) { - // HACK: node may set O_NONBLOCK on it's STDIN depending on what kind of input it is made - // of (see https://github.com/nodejs/help/issues/2663). When STDIN has O_NONBLOCK, calls may - // result in EAGAIN. In such cases, the call should be retried until it succeeds. This kind - // of polling will result in horrible CPU thrashing, but there does not seem to be a way to - // force a O_SYNC access to STDIN in a reliable way within node. - // In order to make this stop we need to either stop depending on synchronous reads, or to - // provision our own communication channel that can reliably be synchronous. This work is - // "tracked" at https://github.com/aws/aws-cdk/issues/5187 - if (e.code !== 'EAGAIN') { - throw e; - } + if (read === 0) { + return undefined; } + + const newData = this.readBuffer.slice(0, read); + this.bufferedData = Buffer.concat([this.bufferedData, newData]); } const newLinePos = this.bufferedData.indexOf('\n', 0, 'utf-8'); @@ -58,6 +57,10 @@ export class SyncStdio { try { offset += fs.writeSync(fd, buffer, offset); } catch (e) { + // We might get EAGAIN if the file descriptor was not opened for + // blocking (O_SYNC) writes. In such cases, we'll keep trying until it + // succeeds. This shouldn't take long as the process on the other side + // is expected to actively wait for data on those pipes. if (e.code !== 'EAGAIN') { throw e; } @@ -65,3 +68,23 @@ export class SyncStdio { } } } + +export interface SyncStdioOptions { + /** + * The file descriptor from which data is to be read. This MUST be opened for + * blocking (O_SYNC) reading. + */ + readonly readFD: number; + + /** + * The file descriptor to which data is to be written. This SHOULD be opened + * for blocking (O_SYNC) writing. + */ + readonly writeFD: number; + + /** + * The file descriptor to which errors data is to be written. This SHOULD be + * opened for blocking (O_SYNC) writing. + */ + readonly errorFD: number; +} diff --git a/packages/@jsii/runtime/package.json b/packages/@jsii/runtime/package.json index d54e649c33..aed09a102c 100644 --- a/packages/@jsii/runtime/package.json +++ b/packages/@jsii/runtime/package.json @@ -40,46 +40,17 @@ "devDependencies": { "@scope/jsii-calc-base": "^0.0.0", "@scope/jsii-calc-lib": "^0.0.0", - "@types/jest": "^26.0.14", - "@types/node": "^10.17.39", - "eslint": "^7.11.0", - "jest": "^26.5.2", + "@types/jest": "^26.0.20", + "@types/node": "^10.17.51", + "eslint": "^7.19.0", + "jest": "^26.6.3", "jsii-build-tools": "^0.0.0", - "jsii-calc": "^0.0.0", - "prettier": "^2.1.2", - "source-map-loader": "^1.1.1", - "ts-jest": "^26.4.1", - "typescript": "~3.9.7", - "wasm-loader": "^1.3.0", - "webpack": "^5.1.0", - "webpack-cli": "^3.3.12" - }, - "jest": { - "collectCoverage": true, - "collectCoverageFrom": [ - "**/bin/**/*.js", - "**/lib/**/*.js" - ], - "coverageReporters": [ - "lcov", - "text" - ], - "coverageThreshold": { - "global": { - "branches": 43, - "statements": 56 - } - }, - "errorOnDeprecated": true, - "setupFilesAfterEnv": [ - "jest-expect-message" - ], - "testEnvironment": "node", - "testMatch": [ - "**/?(*.)+(spec|test).ts" - ], - "transform": { - "\\.tsx?$": "ts-jest" - } + "jsii-calc": "^3.20.120", + "prettier": "^2.2.1", + "source-map-loader": "^2.0.1", + "ts-jest": "^26.5.1", + "typescript": "~3.9.9", + "webpack": "^5.21.2", + "webpack-cli": "^4.5.0" } } diff --git a/packages/@jsii/runtime/test/kernel-host.test.ts b/packages/@jsii/runtime/test/kernel-host.test.ts index a6d668e092..53d821e400 100644 --- a/packages/@jsii/runtime/test/kernel-host.test.ts +++ b/packages/@jsii/runtime/test/kernel-host.test.ts @@ -1,9 +1,10 @@ -import * as child from 'child_process'; -import * as fs from 'fs'; import { api } from '@jsii/kernel'; import * as spec from '@jsii/spec'; +import * as child from 'child_process'; +import * as fs from 'fs'; import * as path from 'path'; -import { KernelHost, InputOutput, Input, Output } from '../lib'; + +import { KernelHost, IInputOutput, Input, Output } from '../lib'; test('can load libraries from within a callback', () => { const inout = new TestInputOutput([ @@ -26,19 +27,21 @@ test('can load libraries from within a callback', () => { ]); const host = new KernelHost(inout, { noStack: true, debug: false }); return new Promise((ok) => { - host.on('exit', () => ok(inout.expectCompleted())); + host.once('exit', (code) => { + expect(code).toBe(0); + ok(inout.expectCompleted()); + }); host.run(); }); }); -class TestInputOutput extends InputOutput { +class TestInputOutput implements IInputOutput { private readonly inputCommands: Input[]; public constructor( inputCommands: Input[], private readonly allowErrors = false, ) { - super(); this.inputCommands = inputCommands.reverse(); } diff --git a/packages/@jsii/runtime/test/playback.test.ts b/packages/@jsii/runtime/test/playback.test.ts index fed5cbba51..b4bcdab792 100644 --- a/packages/@jsii/runtime/test/playback.test.ts +++ b/packages/@jsii/runtime/test/playback.test.ts @@ -4,7 +4,7 @@ import * as os from 'os'; import * as path from 'path'; import * as process from 'process'; -import { InputOutput, KernelHost, Input, Output } from '../lib'; +import { IInputOutput, Input, KernelHost, Output } from '../lib'; const recordsDir = createRecords(); const records = fs @@ -22,7 +22,8 @@ describe(`replay records in ${recordsDir}`, () => { const host = new KernelHost(inout, { noStack: true, debug: false }); return new Promise((ok) => { - host.on('exit', () => { + host.once('exit', (code) => { + expect(code).toBe(0); ok(inout.expectCompleted()); }); @@ -41,17 +42,19 @@ function createRecords(): string { [ ...process.execArgv, require.resolve('jest/bin/jest'), - '--coverage=false', + '--no-coverage', + '--runInBand', 'test/kernel.test.ts', ], { - env: { ...process.env, JSII_RECORD: records, JSII_NOSTACK: '1' }, - stdio: ['inherit', 'pipe', 'pipe'], cwd: path.resolve( require.resolve('@jsii/kernel/test/kernel.test.js'), '..', '..', ), + env: { ...process.env, JSII_RECORD: records, JSII_NOSTACK: '1' }, + stdio: ['inherit', 'pipe', 'pipe'], + timeout: 300_000, // 5 minutes }, ); @@ -87,12 +90,11 @@ function createRecords(): string { return records; } -class PlaybackInputOutput extends InputOutput { +class PlaybackInputOutput implements IInputOutput { public readonly inputCommands: Input[]; public readonly expectedOutputs: Output[]; public constructor(recordPath: string) { - super(); const inputLines = fs .readFileSync(recordPath, { encoding: 'utf-8' }) .split('\n'); diff --git a/packages/@jsii/runtime/test/stress.test.ts b/packages/@jsii/runtime/test/stress.test.ts index f53dc3dd30..1796188779 100755 --- a/packages/@jsii/runtime/test/stress.test.ts +++ b/packages/@jsii/runtime/test/stress.test.ts @@ -1,10 +1,9 @@ -import { InputOutput, Input, Output } from '../lib/in-out'; import { KernelHost } from '../lib/host'; +import { IInputOutput, Input, Output } from '../lib/in-out'; const requestCount = 250_000; -class FakeInputOutput extends InputOutput { - public debug = false; +class FakeInputOutput implements IInputOutput { private count = 0; public write(_: Output) { diff --git a/packages/@jsii/runtime/tsconfig.json b/packages/@jsii/runtime/tsconfig.json index eba1a88d05..e17ee07e03 100644 --- a/packages/@jsii/runtime/tsconfig.json +++ b/packages/@jsii/runtime/tsconfig.json @@ -4,8 +4,11 @@ "**/*.ts", "package.json" ], - "exclude": ["./package.d.ts"], + "exclude": [ + "package.d.ts", + "jest.config.ts", + ], "references": [ - { "path": "../kernel" } - ] + { "path": "../kernel" }, + ], } diff --git a/packages/@jsii/runtime/webpack.config.js b/packages/@jsii/runtime/webpack.config.js index e2c5d0cf7f..8ae01e216e 100644 --- a/packages/@jsii/runtime/webpack.config.js +++ b/packages/@jsii/runtime/webpack.config.js @@ -1,26 +1,52 @@ +const TerserPlugin = require('terser-webpack-plugin'); + module.exports = { - context: __dirname, - mode: 'production', - entry: './lib/program.js', - output: { - path: __dirname + '/webpack', - filename: 'jsii-runtime.js' + context: __dirname, + mode: 'production', + entry: { + wrapper: { + import: './bin/jsii-runtime.js', + filename: 'bin/jsii-runtime.js', }, - devtool: 'source-map', - target: 'node10.3', - node: { - global: false, - __filename: false, - __dirname: false, + program: { + import: './lib/program.js', + filename: 'lib/program.js', }, - module: { - rules: [{ - test: /\.js$/, - use: ['source-map-loader'], - enforce: 'pre' - }] - }, - optimization: { - minimize: false - } -} + }, + output: { + path: __dirname + '/webpack', + iife: false, + }, + devtool: 'source-map', + target: 'node10.3', + node: { + global: false, + __filename: false, + __dirname: false, + }, + module: { + rules: [ + { + test: /\.js$/, + use: ['source-map-loader'], + enforce: 'pre', + }, + ], + }, + optimization: { + minimize: true, + minimizer: [ + new TerserPlugin({ + terserOptions: { + compress: false, + format: { + beautify: true, + comments: 'some', + }, + mangle: false, + }, + extractComments: false, + }), + ], + }, +}; diff --git a/packages/@jsii/spec/jest.config.ts b/packages/@jsii/spec/jest.config.ts new file mode 100644 index 0000000000..2ca2a39215 --- /dev/null +++ b/packages/@jsii/spec/jest.config.ts @@ -0,0 +1,9 @@ +import { overriddenConfig } from '../../../jest.config'; + +export default overriddenConfig({ + coverageThreshold: { + global: { + branches: 28, + }, + }, +}); diff --git a/packages/@jsii/spec/lib/assembly.ts b/packages/@jsii/spec/lib/assembly.ts index b9477241a0..d26e4cce95 100644 --- a/packages/@jsii/spec/lib/assembly.ts +++ b/packages/@jsii/spec/lib/assembly.ts @@ -107,7 +107,7 @@ export interface Assembly extends AssemblyConfiguration, Documentable { /** * Direct dependencies on other assemblies (with semver), the key is the JSII - * assembly name, and the value is a SemVer expression.. + * assembly name, and the value is a SemVer expression. * * @default none */ @@ -138,11 +138,11 @@ export interface Assembly extends AssemblyConfiguration, Documentable { types?: { [fqn: string]: Type }; /** - * The top-level readme document for this assembly (if any). + * List of bin-scripts * * @default none */ - readme?: { markdown: string }; + bin?: { readonly [script: string]: string }; } /** @@ -154,30 +154,46 @@ export interface AssemblyConfiguration extends Targetable { * * @default none */ - submodules?: { [fqn: string]: SourceLocatable & Targetable }; + submodules?: { [fqn: string]: Submodule }; } /** - * An entity on which targets may be configured. + * A targetable module-like thing + * + * Has targets and a readme. Used for Assemblies and Submodules. */ export interface Targetable { /** - * Submodules defined in this assembly, if any, associated with their - * designated targets configuration. + * A map of target name to configuration, which is used when generating + * packages for various languages. * * @default none */ - submodules?: { [fqn: string]: { targets?: AssemblyTargets } }; + targets?: AssemblyTargets; /** - * A map of target name to configuration, which is used when generating - * packages for various languages. + * The readme document for this module (if any). * * @default none */ - targets?: AssemblyTargets; + readme?: ReadMe; } +/** + * README information + */ +export interface ReadMe { + markdown: string; +} + +/** + * A submodule + * + * The difference between a top-level module (the assembly) and a submodule is + * that the submodule is annotated with its location in the repository. + */ +export type Submodule = SourceLocatable & Targetable; + /** * Versions of the JSII Assembly Specification. */ diff --git a/packages/@jsii/spec/lib/validate-assembly.ts b/packages/@jsii/spec/lib/validate-assembly.ts index c223e239a3..250c6ae478 100644 --- a/packages/@jsii/spec/lib/validate-assembly.ts +++ b/packages/@jsii/spec/lib/validate-assembly.ts @@ -1,4 +1,5 @@ import { Schema, Validator } from 'jsonschema'; + import { Assembly } from './assembly'; // eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires diff --git a/packages/@jsii/spec/package.json b/packages/@jsii/spec/package.json index 8ade6432ea..8c2c677b89 100644 --- a/packages/@jsii/spec/package.json +++ b/packages/@jsii/spec/package.json @@ -31,38 +31,16 @@ "package": "package-js" }, "dependencies": { - "jsonschema": "^1.2.11" + "jsonschema": "^1.4.0" }, "devDependencies": { - "@types/jest": "^26.0.14", - "@types/node": "^10.17.39", - "eslint": "^7.11.0", - "jest": "^26.5.2", + "@types/jest": "^26.0.20", + "@types/node": "^10.17.51", + "eslint": "^7.19.0", + "jest": "^26.6.3", "jsii-build-tools": "^0.0.0", - "prettier": "^2.1.2", - "typescript": "~3.9.7", - "typescript-json-schema": "^0.43.0" - }, - "jest": { - "collectCoverage": true, - "collectCoverageFrom": [ - "**/bin/**/*.js", - "**/lib/**/*.js" - ], - "coverageReporters": [ - "lcov", - "text" - ], - "coverageThreshold": { - "global": { - "branches": 25, - "statements": 60 - } - }, - "errorOnDeprecated": true, - "testEnvironment": "node", - "testMatch": [ - "**/?(*.)+(spec|test).js" - ] + "prettier": "^2.2.1", + "typescript": "~3.9.9", + "typescript-json-schema": "^0.49.0" } } diff --git a/packages/@jsii/spec/test/name-tree.test.ts b/packages/@jsii/spec/test/name-tree.test.ts index f645697c04..ad1f3f7a8c 100644 --- a/packages/@jsii/spec/test/name-tree.test.ts +++ b/packages/@jsii/spec/test/name-tree.test.ts @@ -1,5 +1,5 @@ -import { NameTree } from '../lib/name-tree'; import * as spec from '../lib/assembly'; +import { NameTree } from '../lib/name-tree'; const assemblyName = '@foo/bar'; diff --git a/packages/@jsii/spec/test/validate-assembly.test.ts b/packages/@jsii/spec/test/validate-assembly.test.ts index d3c57b7008..91b9cae5fd 100644 --- a/packages/@jsii/spec/test/validate-assembly.test.ts +++ b/packages/@jsii/spec/test/validate-assembly.test.ts @@ -1,5 +1,6 @@ import { readFileSync, readdirSync } from 'fs'; import { resolve } from 'path'; + import { validateAssembly } from '../lib/validate-assembly'; test('rejects invalid assembly', () => diff --git a/packages/@jsii/spec/tsconfig.json b/packages/@jsii/spec/tsconfig.json index 5228b0f5a3..bf3f4f118b 100644 --- a/packages/@jsii/spec/tsconfig.json +++ b/packages/@jsii/spec/tsconfig.json @@ -1,4 +1,5 @@ { "extends": "../../../tsconfig-base", - "include": ["**/*.ts"] + "include": ["**/*.ts"], + "exclude": ["jest.config.ts"], } diff --git a/packages/@scope/jsii-calc-base-of-base/package.json b/packages/@scope/jsii-calc-base-of-base/package.json index e663ca2a44..97e59d1550 100644 --- a/packages/@scope/jsii-calc-base-of-base/package.json +++ b/packages/@scope/jsii-calc-base-of-base/package.json @@ -1,6 +1,6 @@ { "name": "@scope/jsii-calc-base-of-base", - "version": "0.0.0", + "version": "2.1.1", "private": true, "description": "An example transitive dependency for jsii-calc.", "license": "Apache-2.0", @@ -30,17 +30,17 @@ "test:update": "npm run build && UPDATE_DIFF=1 npm run test" }, "devDependencies": { - "@types/node": "^10.17.39", + "@types/node": "^10.17.51", "jsii": "^0.0.0", "jsii-build-tools": "^0.0.0", "jsii-rosetta": "^0.0.0", - "prettier": "^2.1.2" + "prettier": "^2.2.1" }, "jsii": { "outdir": "dist", "targets": { "go": { - "moduleName": "github.com/aws-cdk/jsii/jsii-calc/golang" + "moduleName": "github.com/aws/jsii/jsii-calc/go" }, "java": { "package": "software.amazon.jsii.tests.calculator.baseofbase", @@ -62,6 +62,13 @@ "outDir": "./build", "rootDir": "." }, - "versionFormat": "short" + "versionFormat": "short", + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } } } 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 192b68bce3..16b45fea3f 100644 --- a/packages/@scope/jsii-calc-base-of-base/test/assembly.jsii +++ b/packages/@scope/jsii-calc-base-of-base/test/assembly.jsii @@ -11,6 +11,16 @@ "homepage": "https://github.com/aws/jsii", "jsiiVersion": "0.0.0", "license": "Apache-2.0", + "metadata": { + "jsii": { + "pacmak": { + "hasDefaultInterfaces": true + }, + "rosetta": { + "strict": true + } + } + }, "name": "@scope/jsii-calc-base-of-base", "repository": { "directory": "packages/@scope/jsii-calc-base-of-base", @@ -24,7 +34,7 @@ "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId" }, "go": { - "moduleName": "github.com/aws-cdk/jsii/jsii-calc/golang" + "moduleName": "github.com/aws/jsii/jsii-calc/go" }, "java": { "maven": { @@ -150,6 +160,6 @@ ] } }, - "version": "0.0.0", - "fingerprint": "XzppfL+BknRpBHYygvGjf8OOXrTyNAx6cllN3vONLoU=" + "version": "2.1.1", + "fingerprint": "rbtJN11MzD+pqofNrrkTb/GoS1wpG+lpZoOWh+HXysE=" } diff --git a/packages/@scope/jsii-calc-base/lib/index.ts b/packages/@scope/jsii-calc-base/lib/index.ts index 284de8c438..45e66cddf8 100644 --- a/packages/@scope/jsii-calc-base/lib/index.ts +++ b/packages/@scope/jsii-calc-base/lib/index.ts @@ -1,21 +1,34 @@ -import { IVeryBaseInterface, VeryBaseProps } from '@scope/jsii-calc-base-of-base'; +import { + IVeryBaseInterface, + VeryBaseProps, + StaticConsumer as StaticConsumerBase, +} from '@scope/jsii-calc-base-of-base'; /** * A base class. */ export abstract class Base { - /** - * @returns the name of the class (to verify native type names are created for derived classes). - */ - public typeName() { - return (this.constructor as any).name; - } + /** + * @returns the name of the class (to verify native type names are created for derived classes). + */ + public typeName() { + return (this.constructor as any).name; + } } export interface BaseProps extends VeryBaseProps { - readonly bar: string; + readonly bar: string; } export interface IBaseInterface extends IVeryBaseInterface { - bar(): void; -} \ No newline at end of file + bar(): void; +} + +/** + * Hides the transitive dependency of base-of-base + */ +export class StaticConsumer { + public static consume(...args: any[]) { + return StaticConsumerBase.consume(...args); + } +} diff --git a/packages/@scope/jsii-calc-base/package.json b/packages/@scope/jsii-calc-base/package.json index 65c80e6b93..2c16eb6f1c 100644 --- a/packages/@scope/jsii-calc-base/package.json +++ b/packages/@scope/jsii-calc-base/package.json @@ -29,23 +29,33 @@ "test:update": "npm run build && UPDATE_DIFF=1 npm run test" }, "dependencies": { - "@scope/jsii-calc-base-of-base": "^0.0.0" + "@scope/jsii-calc-base-of-base": "^2.1.1" }, "peerDependencies": { - "@scope/jsii-calc-base-of-base": "^0.0.0" + "@scope/jsii-calc-base-of-base": "^2.1.1" }, "devDependencies": { - "@types/node": "^10.17.39", + "@types/node": "^10.17.51", "jsii": "^0.0.0", "jsii-build-tools": "^0.0.0", "jsii-rosetta": "^0.0.0", - "prettier": "^2.1.2" + "prettier": "^2.2.1" }, "jsii": { + "metadata": { + "jsii": { + "pacmak": { + "hasDefaultInterfaces": false + }, + "rosetta": { + "strict": true + } + } + }, "outdir": "dist", "targets": { "go": { - "moduleName": "github.com/aws-cdk/jsii/jsii-calc/golang" + "moduleName": "github.com/aws/jsii/jsii-calc/go" }, "java": { "package": "software.amazon.jsii.tests.calculator.base", diff --git a/packages/@scope/jsii-calc-base/test/assembly.jsii b/packages/@scope/jsii-calc-base/test/assembly.jsii index 7f2a4f4a29..32aa0dc9f8 100644 --- a/packages/@scope/jsii-calc-base/test/assembly.jsii +++ b/packages/@scope/jsii-calc-base/test/assembly.jsii @@ -8,7 +8,7 @@ "url": "https://aws.amazon.com" }, "dependencies": { - "@scope/jsii-calc-base-of-base": "^0.0.0" + "@scope/jsii-calc-base-of-base": "^2.1.1" }, "dependencyClosure": { "@scope/jsii-calc-base-of-base": { @@ -18,7 +18,7 @@ "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId" }, "go": { - "moduleName": "github.com/aws-cdk/jsii/jsii-calc/golang" + "moduleName": "github.com/aws/jsii/jsii-calc/go" }, "java": { "maven": { @@ -41,6 +41,16 @@ "homepage": "https://github.com/aws/jsii", "jsiiVersion": "0.0.0", "license": "Apache-2.0", + "metadata": { + "jsii": { + "pacmak": { + "hasDefaultInterfaces": false + }, + "rosetta": { + "strict": true + } + } + }, "name": "@scope/jsii-calc-base", "repository": { "directory": "packages/@scope/jsii-calc-base", @@ -54,7 +64,7 @@ "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BasePackageId" }, "go": { - "moduleName": "github.com/aws-cdk/jsii/jsii-calc/golang" + "moduleName": "github.com/aws/jsii/jsii-calc/go" }, "java": { "maven": { @@ -83,7 +93,7 @@ "kind": "class", "locationInModule": { "filename": "lib/index.ts", - "line": 6 + "line": 10 }, "methods": [ { @@ -92,7 +102,7 @@ }, "locationInModule": { "filename": "lib/index.ts", - "line": 10 + "line": 14 }, "name": "typeName", "returns": { @@ -114,7 +124,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/index.ts", - "line": 15 + "line": 19 }, "name": "BaseProps", "properties": [ @@ -123,7 +133,7 @@ "immutable": true, "locationInModule": { "filename": "lib/index.ts", - "line": 16 + "line": 20 }, "name": "bar", "type": { @@ -141,21 +151,55 @@ "kind": "interface", "locationInModule": { "filename": "lib/index.ts", - "line": 19 + "line": 23 }, "methods": [ { "abstract": true, "locationInModule": { "filename": "lib/index.ts", - "line": 20 + "line": 24 }, "name": "bar" } ], "name": "IBaseInterface" + }, + "@scope/jsii-calc-base.StaticConsumer": { + "assembly": "@scope/jsii-calc-base", + "docs": { + "summary": "Hides the transitive dependency of base-of-base." + }, + "fqn": "@scope/jsii-calc-base.StaticConsumer", + "initializer": {}, + "kind": "class", + "locationInModule": { + "filename": "lib/index.ts", + "line": 30 + }, + "methods": [ + { + "locationInModule": { + "filename": "lib/index.ts", + "line": 31 + }, + "name": "consume", + "parameters": [ + { + "name": "args", + "type": { + "primitive": "any" + }, + "variadic": true + } + ], + "static": true, + "variadic": true + } + ], + "name": "StaticConsumer" } }, "version": "0.0.0", - "fingerprint": "wIp2/3p7NHxnOxUbXktrzg6Y+CqdjDLxChiFLMaYQXc=" + "fingerprint": "rKhrKvGvuY8DnHhiQFIGMiFOU8AU+S9ZVk9c3/rUJNk=" } diff --git a/packages/@scope/jsii-calc-lib/package.json b/packages/@scope/jsii-calc-lib/package.json index 158dbf847b..47f766bba5 100644 --- a/packages/@scope/jsii-calc-lib/package.json +++ b/packages/@scope/jsii-calc-lib/package.json @@ -36,20 +36,20 @@ }, "peerDependencies": { "@scope/jsii-calc-base": "^0.0.0", - "@scope/jsii-calc-base-of-base": "^0.0.0" + "@scope/jsii-calc-base-of-base": "^2.1.1" }, "devDependencies": { - "@types/node": "^10.17.39", + "@types/node": "^10.17.51", "jsii": "^0.0.0", "jsii-build-tools": "^0.0.0", "jsii-rosetta": "^0.0.0", - "prettier": "^2.1.2" + "prettier": "^2.2.1" }, "jsii": { "outdir": "dist", "targets": { "go": { - "moduleName": "github.com/aws-cdk/jsii/jsii-calc/golang" + "moduleName": "github.com/aws/jsii/jsii-calc/go" }, "java": { "package": "software.amazon.jsii.tests.calculator.lib", @@ -72,6 +72,13 @@ "tsc": { "outDir": "build" }, - "versionFormat": "short" + "versionFormat": "short", + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } } } diff --git a/packages/@scope/jsii-calc-lib/test/assembly.jsii b/packages/@scope/jsii-calc-lib/test/assembly.jsii index 76dcd4dcf9..87898e58f2 100644 --- a/packages/@scope/jsii-calc-lib/test/assembly.jsii +++ b/packages/@scope/jsii-calc-lib/test/assembly.jsii @@ -9,7 +9,7 @@ }, "dependencies": { "@scope/jsii-calc-base": "^0.0.0", - "@scope/jsii-calc-base-of-base": "^0.0.0" + "@scope/jsii-calc-base-of-base": "^2.1.1" }, "dependencyClosure": { "@scope/jsii-calc-base": { @@ -19,7 +19,7 @@ "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BasePackageId" }, "go": { - "moduleName": "github.com/aws-cdk/jsii/jsii-calc/golang" + "moduleName": "github.com/aws/jsii/jsii-calc/go" }, "java": { "maven": { @@ -44,7 +44,7 @@ "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId" }, "go": { - "moduleName": "github.com/aws-cdk/jsii/jsii-calc/golang" + "moduleName": "github.com/aws/jsii/jsii-calc/go" }, "java": { "maven": { @@ -71,6 +71,16 @@ "homepage": "https://github.com/aws/jsii", "jsiiVersion": "0.0.0", "license": "Apache-2.0", + "metadata": { + "jsii": { + "pacmak": { + "hasDefaultInterfaces": true + }, + "rosetta": { + "strict": true + } + } + }, "name": "@scope/jsii-calc-lib", "repository": { "directory": "packages/@scope/jsii-calc-lib", @@ -104,7 +114,7 @@ "versionSuffix": "-devpreview" }, "go": { - "moduleName": "github.com/aws-cdk/jsii/jsii-calc/golang" + "moduleName": "github.com/aws/jsii/jsii-calc/go" }, "java": { "maven": { @@ -766,5 +776,5 @@ } }, "version": "0.0.0", - "fingerprint": "/PrQbD8BlAtg3N9iuntBks7Q/oIyS45A/S7RvNATePA=" + "fingerprint": "7STgxc8/b+pajng4R4fEptbcOF2aQJBiQkO4bMAWpI4=" } diff --git a/packages/codemaker/jest.config.ts b/packages/codemaker/jest.config.ts new file mode 100644 index 0000000000..e37577d92f --- /dev/null +++ b/packages/codemaker/jest.config.ts @@ -0,0 +1,3 @@ +import config from '../../jest.config'; + +export default config; diff --git a/packages/codemaker/lib/case-utils.ts b/packages/codemaker/lib/case-utils.ts index 79a7092b37..c382477c27 100644 --- a/packages/codemaker/lib/case-utils.ts +++ b/packages/codemaker/lib/case-utils.ts @@ -16,14 +16,14 @@ const ABBREV_RE = new RegExp( `(^|[^A-Z])(${COMMON_ABBREVIATIONS.map(regexQuote).join('|')})($|[^a-z])`, 'g', ); -export function toSnakeCase(s: string, sep = '_'): string { +export function toSnakeCase(s: string, separator = '_'): string { // Save common abbrevations s = s.replace( ABBREV_RE, (_, before: string, abbr: string, after: string) => before + ucfirst(abbr.toLowerCase()) + after, ); - return decamelize(s, sep); + return decamelize(s, { separator }); function ucfirst(str: string) { return str.substr(0, 1).toUpperCase() + str.substr(1).toLowerCase(); diff --git a/packages/codemaker/lib/codemaker.ts b/packages/codemaker/lib/codemaker.ts index aafe39f141..8d0bd703fe 100644 --- a/packages/codemaker/lib/codemaker.ts +++ b/packages/codemaker/lib/codemaker.ts @@ -1,4 +1,5 @@ import * as util from 'util'; + import * as caseutils from './case-utils'; import FileBuffer from './filebuff'; diff --git a/packages/codemaker/package.json b/packages/codemaker/package.json index a8a47bc4d0..6b1a199fa1 100644 --- a/packages/codemaker/package.json +++ b/packages/codemaker/package.json @@ -31,39 +31,17 @@ "package": "rm -fr dist/js && mkdir -p dist/js && mv $(npm pack) dist/js" }, "dependencies": { - "camelcase": "^6.1.0", - "decamelize": "^4.0.0", - "fs-extra": "^9.0.1" + "camelcase": "^6.2.0", + "decamelize": "^5.0.0", + "fs-extra": "^9.1.0" }, "devDependencies": { "@types/fs-extra": "^8.1.1", - "@types/jest": "^26.0.14", - "@types/node": "^10.17.39", - "eslint": "^7.11.0", - "jest": "^26.5.2", - "prettier": "^2.1.2", - "typescript": "~3.9.7" - }, - "jest": { - "collectCoverage": true, - "collectCoverageFrom": [ - "**/bin/**/*.js", - "**/lib/**/*.js" - ], - "coverageReporters": [ - "lcov", - "text" - ], - "coverageThreshold": { - "global": { - "branches": 60, - "statements": 85 - } - }, - "errorOnDeprecated": true, - "testEnvironment": "node", - "testMatch": [ - "**/?(*.)+(spec|test).js" - ] + "@types/jest": "^26.0.20", + "@types/node": "^10.17.51", + "eslint": "^7.19.0", + "jest": "^26.6.3", + "prettier": "^2.2.1", + "typescript": "~3.9.9" } } diff --git a/packages/codemaker/test/filebuff.test.ts b/packages/codemaker/test/filebuff.test.ts index 334a2a12e6..8293a7a9d0 100644 --- a/packages/codemaker/test/filebuff.test.ts +++ b/packages/codemaker/test/filebuff.test.ts @@ -1,6 +1,7 @@ import * as fs from 'fs-extra'; import * as os from 'os'; import * as path from 'path'; + import FileBuffer from '../lib/filebuff'; test('file buffer', async () => { diff --git a/packages/codemaker/test/source.test.ts b/packages/codemaker/test/source.test.ts index 5123d75810..fe67fdad88 100644 --- a/packages/codemaker/test/source.test.ts +++ b/packages/codemaker/test/source.test.ts @@ -1,6 +1,7 @@ import * as fs from 'fs-extra'; import * as os from 'os'; import * as path from 'path'; + import { CodeMaker } from '../lib'; test('cannot write before opening a file', () => { diff --git a/packages/codemaker/tsconfig.json b/packages/codemaker/tsconfig.json index 388615743a..34b48fb638 100644 --- a/packages/codemaker/tsconfig.json +++ b/packages/codemaker/tsconfig.json @@ -1,4 +1,5 @@ { "extends": "../../tsconfig-base", - "include": ["**/*.ts"] + "include": ["**/*.ts"], + "exclude": ["jest.config.ts"], } diff --git a/packages/jsii-calc/bin/run b/packages/jsii-calc/bin/run new file mode 100755 index 0000000000..ea7dde785e --- /dev/null +++ b/packages/jsii-calc/bin/run @@ -0,0 +1,2 @@ +#!/usr/bin/env node +require('./run.js'); diff --git a/packages/jsii-calc/bin/run.cmd b/packages/jsii-calc/bin/run.cmd new file mode 100644 index 0000000000..8c083b0bff --- /dev/null +++ b/packages/jsii-calc/bin/run.cmd @@ -0,0 +1,2 @@ +@echo off +node "%~dp0\run" %* diff --git a/packages/jsii-calc/bin/run.ts b/packages/jsii-calc/bin/run.ts new file mode 100755 index 0000000000..296a77b93d --- /dev/null +++ b/packages/jsii-calc/bin/run.ts @@ -0,0 +1,5 @@ +#!/usr/bin/env node + +/* eslint-disable no-console */ + +console.info('Hello World!'); diff --git a/packages/jsii-calc/lib/compliance.ts b/packages/jsii-calc/lib/compliance.ts index 43a187a47c..94c433094c 100644 --- a/packages/jsii-calc/lib/compliance.ts +++ b/packages/jsii-calc/lib/compliance.ts @@ -1,3 +1,4 @@ +import * as base from '@scope/jsii-calc-base'; import { EnumFromScopedModule, IDoublable, @@ -7,11 +8,12 @@ import { StructWithOnlyOptionals, NumericValue, } from '@scope/jsii-calc-lib'; +import * as crypto from 'crypto'; import * as fs from 'fs'; -import * as path from 'path'; import * as os from 'os'; -import * as crypto from 'crypto'; +import * as path from 'path'; import { promisify } from 'util'; + import { IFriendlyRandomGenerator, IRandomNumberGenerator, @@ -25,7 +27,6 @@ import { // eslint-disable-next-line @typescript-eslint/no-require-imports,@typescript-eslint/no-var-requires const bundled = require('@fixtures/jsii-calc-bundled'); -import * as base from '@scope/jsii-calc-base'; const readFile = promisify(fs.readFile); @@ -289,7 +290,7 @@ export class RuntimeTypeChecking { * Used to verify verification of number of method arguments. */ public methodWithOptionalArguments(arg1: number, arg2: string, arg3?: Date) { - StaticConsumer.consume(arg1, arg2, arg3); + base.StaticConsumer.consume(arg1, arg2, arg3); } public methodWithDefaultedArguments( @@ -297,11 +298,11 @@ export class RuntimeTypeChecking { arg2?: string, arg3: Date = new Date(), ) { - StaticConsumer.consume(arg1, arg2, arg3); + base.StaticConsumer.consume(arg1, arg2, arg3); } public methodWithOptionalAnyArgument(arg?: any) { - StaticConsumer.consume(arg); + base.StaticConsumer.consume(arg); } } @@ -730,7 +731,7 @@ export class Statics { } /** - *Jsdocs for static setter. + * Jsdocs for static setter. */ public static set instance(val: Statics) { this._instance = val; @@ -2786,8 +2787,6 @@ export abstract class BurriedAnonymousObject { public abstract giveItBack(value: any): any; } -import { StaticConsumer } from '@scope/jsii-calc-base-of-base'; - /** * Ensures we can override a dynamic property that was inherited. */ @@ -2840,3 +2839,36 @@ export namespace LevelOne { readonly value: boolean; } } + +/** + * Static methods that override parent class are technically overrides (the + * inheritance of statics is part of the ES6 specification), but certain other + * languages such as Java do not carry statics in the inheritance chain at all, + * so they cannot be overridden, only hidden. + * + * The difference is fairly minor (for typical use-cases, the end result is the + * same), however this has implications on what the generated code should look + * like. + */ +export class StaticHelloParent { + public static get property(): number { + return 1337; + } + + public static method(): void { + /* A static method */ + } +} +export class StaticHelloChild extends StaticHelloParent { + public static get property(): number { + return 42; + } + + public static method(): void { + /* An ES6 Override */ + } + + private constructor() { + super(); + } +} diff --git a/packages/jsii-calc/lib/documented.ts b/packages/jsii-calc/lib/documented.ts index c4b6d6b0c8..d9d6c81ff0 100644 --- a/packages/jsii-calc/lib/documented.ts +++ b/packages/jsii-calc/lib/documented.ts @@ -6,17 +6,24 @@ * * Multiple paragraphs are separated by an empty line. * + * @example + * const x = 12 + 44; + * const s1 = "string"; + * const s2 = "string \nwith new newlines"; // see https://github.com/aws/jsii/issues/2569 + * const s3 = `string + * with + * new lines`; * @stable */ export class DocumentedClass { /** * Greet the indicated person. * - * This will print out a friendly greeting intended for - * the indicated person. + * This will print out a friendly greeting intended for the indicated person. * * @param greetee The person to be greeted. - * @returns A number that everyone knows very well + * @returns A number that everyone knows very well and represents the answer + * to the ultimate question */ public greet(greetee: Greetee = {}): number { process.stdout.write(`Hello, ${greetee.name ?? 'world'}\n`); @@ -48,7 +55,8 @@ export interface Greetee { /** * Old class * - * @deprecated Use the new class + * @deprecated Use the new class or the old class whatever you want because + * whatever you like is always the best */ export class Old { /** diff --git a/packages/jsii-calc/lib/submodule/README.md b/packages/jsii-calc/lib/submodule/README.md new file mode 100644 index 0000000000..46841ecd5e --- /dev/null +++ b/packages/jsii-calc/lib/submodule/README.md @@ -0,0 +1,4 @@ +Read you, read me +================= + +This is the readme of the `jsii-calc.submodule` module. diff --git a/packages/jsii-calc/lib/submodule/index.ts b/packages/jsii-calc/lib/submodule/index.ts index befb9e2d33..3bba85f95e 100644 --- a/packages/jsii-calc/lib/submodule/index.ts +++ b/packages/jsii-calc/lib/submodule/index.ts @@ -1,5 +1,7 @@ export * as child from './child'; export * as isolated from './isolated'; +export * as param from './param'; +export * as returnsparam from './returns-param'; export * from './my-class'; export * from './nested_submodule'; export * as back_references from './refers-to-parent'; diff --git a/packages/jsii-calc/lib/submodule/isolated.README.md b/packages/jsii-calc/lib/submodule/isolated.README.md new file mode 100644 index 0000000000..b0e359d02f --- /dev/null +++ b/packages/jsii-calc/lib/submodule/isolated.README.md @@ -0,0 +1,4 @@ +Read you, read me +================= + +This is the readme of the `jsii-calc.submodule.isolated` module. diff --git a/packages/jsii-calc/lib/submodule/my-class.ts b/packages/jsii-calc/lib/submodule/my-class.ts index 48d711997a..a3b9aa8ed6 100644 --- a/packages/jsii-calc/lib/submodule/my-class.ts +++ b/packages/jsii-calc/lib/submodule/my-class.ts @@ -1,6 +1,7 @@ -import { nested_submodule } from './nested_submodule'; -import { Awesomeness, Goodness, SomeStruct } from './child'; import { AllTypes } from '..'; +import { Awesomeness, Goodness, SomeStruct } from './child'; +import { nested_submodule } from './nested_submodule'; +import { SpecialParameter } from './param'; export class MyClass implements nested_submodule.deeplyNested.INamespaced { public readonly definedAt = __filename; @@ -9,4 +10,8 @@ export class MyClass implements nested_submodule.deeplyNested.INamespaced { public allTypes?: AllTypes; public constructor(public readonly props: SomeStruct) {} + + public methodWithSpecialParam(param: SpecialParameter) { + return param.value; + } } diff --git a/packages/jsii-calc/lib/submodule/param/index.ts b/packages/jsii-calc/lib/submodule/param/index.ts new file mode 100644 index 0000000000..4677d6ff74 --- /dev/null +++ b/packages/jsii-calc/lib/submodule/param/index.ts @@ -0,0 +1,3 @@ +export interface SpecialParameter { + readonly value: string; +} diff --git a/packages/jsii-calc/lib/submodule/returns-param/index.ts b/packages/jsii-calc/lib/submodule/returns-param/index.ts new file mode 100644 index 0000000000..f0068dab6d --- /dev/null +++ b/packages/jsii-calc/lib/submodule/returns-param/index.ts @@ -0,0 +1,8 @@ +import { SpecialParameter } from '../param'; + +export class ReturnsSpecialParameter { + public returnsSpecialParam(): SpecialParameter { + const ret = { value: 'foo' }; + return ret; + } +} diff --git a/packages/jsii-calc/package.json b/packages/jsii-calc/package.json index 1a3eb62872..0eac78f4e1 100644 --- a/packages/jsii-calc/package.json +++ b/packages/jsii-calc/package.json @@ -1,6 +1,6 @@ { "name": "jsii-calc", - "version": "0.0.0", + "version": "3.20.120", "private": true, "description": "A simple calcuator built on JSII.", "stability": "stable", @@ -14,6 +14,9 @@ "bugs": { "url": "https://github.com/aws/jsii/issues" }, + "bin": { + "calc": "bin/run" + }, "repository": { "type": "git", "url": "https://github.com/aws/jsii.git", @@ -34,33 +37,31 @@ "watch": "jsii --project-references -w", "lint": "eslint . --ext .js,.ts --ignore-path=.gitignore", "lint:fix": "yarn lint --fix", - "test": "node test/test.calc.js && diff-test test/assembly.jsii .jsii", + "test": "(ls test/test.*.js | xargs -n1 node) && diff-test test/assembly.jsii .jsii", "test:update": "npm run build && UPDATE_DIFF=1 npm run test" }, "dependencies": { "@fixtures/jsii-calc-bundled": "file:../@fixtures/jsii-calc-bundled", "@scope/jsii-calc-base": "^0.0.0", - "@scope/jsii-calc-base-of-base": "^0.0.0", "@scope/jsii-calc-lib": "^0.0.0" }, "peerDependencies": { "@scope/jsii-calc-base": "^0.0.0", - "@scope/jsii-calc-base-of-base": "^0.0.0", "@scope/jsii-calc-lib": "^0.0.0" }, "devDependencies": { - "@types/node": "^10.17.39", - "eslint": "^7.11.0", + "@types/node": "^10.17.51", + "eslint": "^7.19.0", "jsii": "^0.0.0", "jsii-build-tools": "^0.0.0", "jsii-rosetta": "^0.0.0", - "prettier": "^2.1.2" + "prettier": "^2.2.1" }, "jsii": { "outdir": "dist", "targets": { "go": { - "moduleName": "github.com/aws-cdk/jsii/jsii-calc/golang" + "moduleName": "github.com/aws/jsii/jsii-calc/go" }, "java": { "package": "software.amazon.jsii.tests.calculator", @@ -87,6 +88,11 @@ "jsii:number": 1337, "jsii:object": { "string": "yes!" + }, + "jsii": { + "rosetta": { + "strict": true + } } }, "versionFormat": "short" diff --git a/packages/jsii-calc/test/assembly.jsii b/packages/jsii-calc/test/assembly.jsii index 28f05c35b4..59bb5b1e7f 100644 --- a/packages/jsii-calc/test/assembly.jsii +++ b/packages/jsii-calc/test/assembly.jsii @@ -7,6 +7,9 @@ ], "url": "https://aws.amazon.com" }, + "bin": { + "calc": "bin/run" + }, "bundled": { "@fixtures/jsii-calc-bundled": "^0.19.0" }, @@ -35,7 +38,6 @@ ], "dependencies": { "@scope/jsii-calc-base": "^0.0.0", - "@scope/jsii-calc-base-of-base": "^0.0.0", "@scope/jsii-calc-lib": "^0.0.0" }, "dependencyClosure": { @@ -46,7 +48,7 @@ "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BasePackageId" }, "go": { - "moduleName": "github.com/aws-cdk/jsii/jsii-calc/golang" + "moduleName": "github.com/aws/jsii/jsii-calc/go" }, "java": { "maven": { @@ -71,7 +73,7 @@ "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId" }, "go": { - "moduleName": "github.com/aws-cdk/jsii/jsii-calc/golang" + "moduleName": "github.com/aws/jsii/jsii-calc/go" }, "java": { "maven": { @@ -116,7 +118,7 @@ "versionSuffix": "-devpreview" }, "go": { - "moduleName": "github.com/aws-cdk/jsii/jsii-calc/golang" + "moduleName": "github.com/aws/jsii/jsii-calc/go" }, "java": { "maven": { @@ -149,6 +151,14 @@ ], "license": "Apache-2.0", "metadata": { + "jsii": { + "pacmak": { + "hasDefaultInterfaces": true + }, + "rosetta": { + "strict": true + } + }, "jsii:boolean": true, "jsii:number": 1337, "jsii:object": { @@ -166,34 +176,28 @@ }, "schema": "jsii/0.10.0", "submodules": { - "@scope/jsii-calc-lib.submodule": { - "locationInModule": { - "filename": "../@scope/jsii-calc-lib/build/index.d.ts", - "line": 157 - } - }, "jsii-calc.DerivedClassHasNoProperties": { "locationInModule": { "filename": "lib/compliance.ts", - "line": 324 + "line": 325 } }, "jsii-calc.InterfaceInNamespaceIncludesClasses": { "locationInModule": { "filename": "lib/compliance.ts", - "line": 1205 + "line": 1206 } }, "jsii-calc.InterfaceInNamespaceOnlyInterface": { "locationInModule": { "filename": "lib/compliance.ts", - "line": 1198 + "line": 1199 } }, "jsii-calc.PythonSelf": { "locationInModule": { "filename": "lib/compliance.ts", - "line": 1089 + "line": 1090 } }, "jsii-calc.composition": { @@ -206,12 +210,15 @@ "locationInModule": { "filename": "lib/index.ts", "line": 10 + }, + "readme": { + "markdown": "Read you, read me\n=================\n\nThis is the readme of the `jsii-calc.submodule` module.\n" } }, "jsii-calc.submodule.back_references": { "locationInModule": { "filename": "lib/submodule/index.ts", - "line": 5 + "line": 7 } }, "jsii-calc.submodule.child": { @@ -224,6 +231,9 @@ "locationInModule": { "filename": "lib/submodule/index.ts", "line": 2 + }, + "readme": { + "markdown": "Read you, read me\n=================\n\nThis is the readme of the `jsii-calc.submodule.isolated` module.\n" } }, "jsii-calc.submodule.nested_submodule": { @@ -237,6 +247,18 @@ "filename": "lib/submodule/nested_submodule.ts", "line": 6 } + }, + "jsii-calc.submodule.param": { + "locationInModule": { + "filename": "lib/submodule/index.ts", + "line": 3 + } + }, + "jsii-calc.submodule.returnsparam": { + "locationInModule": { + "filename": "lib/submodule/index.ts", + "line": 4 + } } }, "targets": { @@ -246,7 +268,7 @@ "packageId": "Amazon.JSII.Tests.CalculatorPackageId" }, "go": { - "moduleName": "github.com/aws-cdk/jsii/jsii-calc/golang" + "moduleName": "github.com/aws/jsii/jsii-calc/go" }, "java": { "maven": { @@ -286,7 +308,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1249 + "line": 1250 }, "methods": [ { @@ -296,7 +318,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1256 + "line": 1257 }, "name": "abstractMethod", "parameters": [ @@ -319,7 +341,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1252 + "line": 1253 }, "name": "nonAbstractMethod", "returns": { @@ -338,7 +360,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1258 + "line": 1259 }, "name": "propFromInterface", "overrides": "jsii-calc.IInterfaceImplementedByAbstractClass", @@ -363,7 +385,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1245 + "line": 1246 }, "name": "AbstractClassBase", "properties": [ @@ -375,7 +397,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1246 + "line": 1247 }, "name": "abstractProperty", "type": { @@ -398,7 +420,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1273 + "line": 1274 }, "methods": [ { @@ -407,7 +429,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1274 + "line": 1275 }, "name": "giveMeAbstract", "returns": { @@ -422,7 +444,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1278 + "line": 1279 }, "name": "giveMeInterface", "returns": { @@ -441,7 +463,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1282 + "line": 1283 }, "name": "returnAbstractFromProperty", "type": { @@ -639,7 +661,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 62 + "line": 63 }, "methods": [ { @@ -648,7 +670,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 231 + "line": 232 }, "name": "anyIn", "parameters": [ @@ -666,7 +688,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 223 + "line": 224 }, "name": "anyOut", "returns": { @@ -681,7 +703,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 219 + "line": 220 }, "name": "enumMethod", "parameters": [ @@ -708,7 +730,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 215 + "line": 216 }, "name": "enumPropertyValue", "type": { @@ -721,7 +743,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 179 + "line": 180 }, "name": "anyArrayProperty", "type": { @@ -739,7 +761,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 180 + "line": 181 }, "name": "anyMapProperty", "type": { @@ -757,7 +779,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 178 + "line": 179 }, "name": "anyProperty", "type": { @@ -770,7 +792,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 164 + "line": 165 }, "name": "arrayProperty", "type": { @@ -788,7 +810,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 67 + "line": 68 }, "name": "booleanProperty", "type": { @@ -801,7 +823,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 113 + "line": 114 }, "name": "dateProperty", "type": { @@ -814,7 +836,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 199 + "line": 200 }, "name": "enumProperty", "type": { @@ -827,7 +849,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 132 + "line": 133 }, "name": "jsonProperty", "type": { @@ -840,7 +862,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 149 + "line": 150 }, "name": "mapProperty", "type": { @@ -858,7 +880,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 98 + "line": 99 }, "name": "numberProperty", "type": { @@ -871,7 +893,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 82 + "line": 83 }, "name": "stringProperty", "type": { @@ -884,7 +906,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 191 + "line": 192 }, "name": "unionArrayProperty", "type": { @@ -911,7 +933,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 192 + "line": 193 }, "name": "unionMapProperty", "type": { @@ -941,7 +963,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 190 + "line": 191 }, "name": "unionProperty", "type": { @@ -969,7 +991,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 185 + "line": 186 }, "name": "unknownArrayProperty", "type": { @@ -987,7 +1009,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 186 + "line": 187 }, "name": "unknownMapProperty", "type": { @@ -1005,7 +1027,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 184 + "line": 185 }, "name": "unknownProperty", "type": { @@ -1018,7 +1040,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 196 + "line": 197 }, "name": "optionalEnumValue", "optional": true, @@ -1037,7 +1059,7 @@ "kind": "enum", "locationInModule": { "filename": "lib/compliance.ts", - "line": 32 + "line": 33 }, "members": [ { @@ -1075,7 +1097,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 614 + "line": 615 }, "methods": [ { @@ -1084,7 +1106,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 622 + "line": 623 }, "name": "getBar", "parameters": [ @@ -1109,7 +1131,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 618 + "line": 619 }, "name": "getFoo", "parameters": [ @@ -1132,7 +1154,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 633 + "line": 634 }, "name": "setBar", "parameters": [ @@ -1163,7 +1185,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 629 + "line": 630 }, "name": "setFoo", "parameters": [ @@ -1196,7 +1218,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2684 + "line": 2685 }, "parameters": [ { @@ -1216,7 +1238,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2683 + "line": 2684 }, "name": "AmbiguousParameters", "properties": [ @@ -1227,7 +1249,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2686 + "line": 2687 }, "name": "props", "type": { @@ -1241,7 +1263,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2685 + "line": 2686 }, "name": "scope", "type": { @@ -1267,7 +1289,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2213 + "line": 2214 }, "methods": [ { @@ -1276,7 +1298,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2217 + "line": 2218 }, "name": "provideAsClass", "overrides": "jsii-calc.IAnonymousImplementationProvider", @@ -1292,7 +1314,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2221 + "line": 2222 }, "name": "provideAsInterface", "overrides": "jsii-calc.IAnonymousImplementationProvider", @@ -1319,7 +1341,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 332 + "line": 333 }, "methods": [ { @@ -1329,7 +1351,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 333 + "line": 334 }, "name": "callMe", "returns": { @@ -1346,7 +1368,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 352 + "line": 353 }, "name": "callMe2", "returns": { @@ -1364,7 +1386,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 362 + "line": 363 }, "name": "callMeDoublePromise", "returns": { @@ -1379,7 +1401,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 370 + "line": 371 }, "name": "dontOverrideMe", "returns": { @@ -1395,7 +1417,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 341 + "line": 342 }, "name": "overrideMe", "parameters": [ @@ -1419,7 +1441,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 345 + "line": 346 }, "name": "overrideMeToo", "returns": { @@ -1445,7 +1467,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1540 + "line": 1541 }, "methods": [ { @@ -1454,7 +1476,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1541 + "line": 1542 }, "name": "methodOne" }, @@ -1464,7 +1486,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1547 + "line": 1548 }, "name": "methodTwo" } @@ -1485,7 +1507,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2478 + "line": 2479 }, "name": "BaseJsii976" }, @@ -1506,7 +1528,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2422 + "line": 2423 }, "methods": [ { @@ -1515,7 +1537,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2425 + "line": 2426 }, "name": "ring", "overrides": "jsii-calc.IBell" @@ -1529,7 +1551,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2423 + "line": 2424 }, "name": "rung", "type": { @@ -1654,7 +1676,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2768 + "line": 2769 }, "methods": [ { @@ -1663,7 +1685,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2769 + "line": 2770 }, "name": "check", "returns": { @@ -1681,7 +1703,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2786 + "line": 2787 }, "name": "giveItBack", "parameters": [ @@ -2015,7 +2037,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2502 + "line": 2503 }, "name": "ChildStruct982", "properties": [ @@ -2027,7 +2049,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2503 + "line": 2504 }, "name": "bar", "type": { @@ -2053,7 +2075,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1803 + "line": 1804 }, "name": "ClassThatImplementsTheInternalInterface", "properties": [ @@ -2063,7 +2085,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1807 + "line": 1808 }, "name": "a", "overrides": "jsii-calc.IAnotherPublicInterface", @@ -2077,7 +2099,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1808 + "line": 1809 }, "name": "b", "overrides": "jsii-calc.INonInternalInterface", @@ -2091,7 +2113,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1809 + "line": 1810 }, "name": "c", "overrides": "jsii-calc.INonInternalInterface", @@ -2105,7 +2127,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1810 + "line": 1811 }, "name": "d", "type": { @@ -2131,7 +2153,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1813 + "line": 1814 }, "name": "ClassThatImplementsThePrivateInterface", "properties": [ @@ -2141,7 +2163,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1815 + "line": 1816 }, "name": "a", "overrides": "jsii-calc.IAnotherPublicInterface", @@ -2155,7 +2177,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1816 + "line": 1817 }, "name": "b", "overrides": "jsii-calc.INonInternalInterface", @@ -2169,7 +2191,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1817 + "line": 1818 }, "name": "c", "overrides": "jsii-calc.INonInternalInterface", @@ -2183,7 +2205,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1818 + "line": 1819 }, "name": "e", "type": { @@ -2204,7 +2226,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2119 + "line": 2120 }, "parameters": [ { @@ -2234,7 +2256,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2109 + "line": 2110 }, "methods": [ { @@ -2243,7 +2265,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2124 + "line": 2125 }, "name": "createAList", "returns": { @@ -2264,7 +2286,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2128 + "line": 2129 }, "name": "createAMap", "returns": { @@ -2288,7 +2310,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2117 + "line": 2118 }, "name": "staticArray", "static": true, @@ -2307,7 +2329,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2113 + "line": 2114 }, "name": "staticMap", "static": true, @@ -2326,7 +2348,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2111 + "line": 2112 }, "name": "array", "type": { @@ -2344,7 +2366,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2110 + "line": 2111 }, "name": "map", "type": { @@ -2379,7 +2401,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1886 + "line": 1887 }, "name": "ClassWithDocs" }, @@ -2395,7 +2417,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2059 + "line": 2060 }, "parameters": [ { @@ -2409,7 +2431,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2056 + "line": 2057 }, "methods": [ { @@ -2418,7 +2440,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2063 + "line": 2064 }, "name": "import", "parameters": [ @@ -2445,7 +2467,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2057 + "line": 2058 }, "name": "int", "type": { @@ -2468,7 +2490,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1293 + "line": 1294 }, "name": "ClassWithMutableObjectLiteralProperty", "properties": [ @@ -2478,7 +2500,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1294 + "line": 1295 }, "name": "mutableObject", "type": { @@ -2500,7 +2522,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1320 + "line": 1321 }, "methods": [ { @@ -2509,7 +2531,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1322 + "line": 1323 }, "name": "create", "parameters": [ @@ -2543,7 +2565,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1330 + "line": 1331 }, "name": "readOnlyString", "overrides": "jsii-calc.IInterfaceWithProperties", @@ -2557,7 +2579,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1331 + "line": 1332 }, "name": "readWriteString", "overrides": "jsii-calc.IInterfaceWithProperties", @@ -2578,7 +2600,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2641 + "line": 2642 }, "methods": [ { @@ -2587,7 +2609,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2642 + "line": 2643 }, "name": "makeInstance", "returns": { @@ -2603,7 +2625,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2646 + "line": 2647 }, "name": "makeStructInstance", "returns": { @@ -2622,7 +2644,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2650 + "line": 2651 }, "name": "unionProperty", "optional": true, @@ -2665,7 +2687,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2654 + "line": 2655 }, "name": "ConfusingToJacksonStruct", "properties": [ @@ -2677,7 +2699,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2655 + "line": 2656 }, "name": "unionProperty", "optional": true, @@ -2722,7 +2744,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1843 + "line": 1844 }, "parameters": [ { @@ -2736,7 +2758,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1842 + "line": 1843 }, "name": "ConstructorPassesThisOut" }, @@ -2754,7 +2776,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1588 + "line": 1589 }, "methods": [ { @@ -2763,7 +2785,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1605 + "line": 1606 }, "name": "hiddenInterface", "returns": { @@ -2779,7 +2801,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1609 + "line": 1610 }, "name": "hiddenInterfaces", "returns": { @@ -2800,7 +2822,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1613 + "line": 1614 }, "name": "hiddenSubInterfaces", "returns": { @@ -2821,7 +2843,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1589 + "line": 1590 }, "name": "makeClass", "returns": { @@ -2837,7 +2859,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1593 + "line": 1594 }, "name": "makeInterface", "returns": { @@ -2853,7 +2875,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1597 + "line": 1598 }, "name": "makeInterface2", "returns": { @@ -2869,7 +2891,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1601 + "line": 1602 }, "name": "makeInterfaces", "returns": { @@ -2899,7 +2921,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2665 + "line": 2666 }, "parameters": [ { @@ -2913,7 +2935,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2664 + "line": 2665 }, "methods": [ { @@ -2922,7 +2944,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2667 + "line": 2668 }, "name": "workItBaby", "returns": { @@ -2950,7 +2972,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2307 + "line": 2308 }, "methods": [ { @@ -2961,7 +2983,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2313 + "line": 2314 }, "name": "staticImplementedByObjectLiteral", "parameters": [ @@ -2987,7 +3009,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2339 + "line": 2340 }, "name": "staticImplementedByPrivateClass", "parameters": [ @@ -3013,7 +3035,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2328 + "line": 2329 }, "name": "staticImplementedByPublicClass", "parameters": [ @@ -3039,7 +3061,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2350 + "line": 2351 }, "name": "staticWhenTypedAsClass", "parameters": [ @@ -3065,7 +3087,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2360 + "line": 2361 }, "name": "implementedByObjectLiteral", "parameters": [ @@ -3090,7 +3112,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2386 + "line": 2387 }, "name": "implementedByPrivateClass", "parameters": [ @@ -3115,7 +3137,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2375 + "line": 2376 }, "name": "implementedByPublicClass", "parameters": [ @@ -3140,7 +3162,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2397 + "line": 2398 }, "name": "whenTypedAsClass", "parameters": [ @@ -3174,7 +3196,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1821 + "line": 1822 }, "methods": [ { @@ -3183,7 +3205,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1822 + "line": 1823 }, "name": "consumeAnotherPublicInterface", "parameters": [ @@ -3206,7 +3228,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1826 + "line": 1827 }, "name": "consumeNonInternalInterface", "parameters": [ @@ -3241,7 +3263,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1982 + "line": 1983 }, "methods": [ { @@ -3250,7 +3272,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1983 + "line": 1984 }, "name": "render", "parameters": [ @@ -3274,7 +3296,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1989 + "line": 1990 }, "name": "renderArbitrary", "parameters": [ @@ -3302,7 +3324,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1993 + "line": 1994 }, "name": "renderMap", "parameters": [ @@ -3339,7 +3361,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 317 + "line": 318 }, "parameters": [ { @@ -3368,7 +3390,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 316 + "line": 317 }, "name": "DefaultedConstructorArgument", "properties": [ @@ -3379,7 +3401,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 318 + "line": 319 }, "name": "arg1", "type": { @@ -3393,7 +3415,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 320 + "line": 321 }, "name": "arg3", "type": { @@ -3407,7 +3429,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 319 + "line": 320 }, "name": "arg2", "optional": true, @@ -3433,7 +3455,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2509 + "line": 2510 }, "methods": [ { @@ -3443,7 +3465,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2516 + "line": 2517 }, "name": "takeThis", "returns": { @@ -3460,7 +3482,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2521 + "line": 2522 }, "name": "takeThisToo", "returns": { @@ -3634,7 +3656,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 325 + "line": 326 }, "name": "Base", "namespace": "DerivedClassHasNoProperties", @@ -3645,7 +3667,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 326 + "line": 327 }, "name": "prop", "type": { @@ -3669,7 +3691,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 329 + "line": 330 }, "name": "Derived", "namespace": "DerivedClassHasNoProperties" @@ -3688,7 +3710,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 540 + "line": 541 }, "name": "DerivedStruct", "properties": [ @@ -3700,7 +3722,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 546 + "line": 547 }, "name": "anotherRequired", "type": { @@ -3715,7 +3737,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 545 + "line": 546 }, "name": "bool", "type": { @@ -3731,7 +3753,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 544 + "line": 545 }, "name": "nonPrimitive", "type": { @@ -3747,7 +3769,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 552 + "line": 553 }, "name": "anotherOptional", "optional": true, @@ -3768,7 +3790,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 548 + "line": 549 }, "name": "optionalAny", "optional": true, @@ -3784,7 +3806,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 547 + "line": 548 }, "name": "optionalArray", "optional": true, @@ -3809,7 +3831,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2027 + "line": 2028 }, "name": "DiamondInheritanceBaseLevelStruct", "properties": [ @@ -3821,7 +3843,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2028 + "line": 2029 }, "name": "baseLevelProperty", "type": { @@ -3843,7 +3865,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2031 + "line": 2032 }, "name": "DiamondInheritanceFirstMidLevelStruct", "properties": [ @@ -3855,7 +3877,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2033 + "line": 2034 }, "name": "firstMidLevelProperty", "type": { @@ -3877,7 +3899,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2036 + "line": 2037 }, "name": "DiamondInheritanceSecondMidLevelStruct", "properties": [ @@ -3889,7 +3911,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2038 + "line": 2039 }, "name": "secondMidLevelProperty", "type": { @@ -3912,7 +3934,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2041 + "line": 2042 }, "name": "DiamondInheritanceTopLevelStruct", "properties": [ @@ -3924,7 +3946,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2044 + "line": 2045 }, "name": "topLevelProperty", "type": { @@ -3944,7 +3966,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2531 + "line": 2532 }, "name": "DisappointingCollectionSource", "properties": [ @@ -3958,7 +3980,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2533 + "line": 2534 }, "name": "maybeList", "optional": true, @@ -3982,7 +4004,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2535 + "line": 2536 }, "name": "maybeMap", "optional": true, @@ -4012,7 +4034,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1297 + "line": 1298 }, "methods": [ { @@ -4021,7 +4043,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1312 + "line": 1313 }, "name": "changePrivatePropertyValue", "parameters": [ @@ -4039,7 +4061,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1304 + "line": 1305 }, "name": "privateMethodValue", "returns": { @@ -4054,7 +4076,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1308 + "line": 1309 }, "name": "privatePropertyValue", "returns": { @@ -4081,7 +4103,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1353 + "line": 1354 }, "methods": [ { @@ -4090,7 +4112,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1354 + "line": 1355 }, "name": "method", "parameters": [ @@ -4122,6 +4144,7 @@ "jsii-calc.DocumentedClass": { "assembly": "jsii-calc", "docs": { + "example": "const x = 12 + 44;\nconst s1 = \"string\";\nconst s2 = \"string \\nwith new newlines\"; // see https://github.com/aws/jsii/issues/2569\nconst s3 = `string\n with\n new lines`;", "remarks": "This is the meat of the TSDoc comment. It may contain\nmultiple lines and multiple paragraphs.\n\nMultiple paragraphs are separated by an empty line.", "stability": "stable", "summary": "Here's the first line of the TSDoc comment." @@ -4135,19 +4158,19 @@ "kind": "class", "locationInModule": { "filename": "lib/documented.ts", - "line": 11 + "line": 18 }, "methods": [ { "docs": { - "remarks": "This will print out a friendly greeting intended for\nthe indicated person.", - "returns": "A number that everyone knows very well", + "remarks": "This will print out a friendly greeting intended for the indicated person.", + "returns": "A number that everyone knows very well and represents the answer\nto the ultimate question", "stability": "stable", "summary": "Greet the indicated person." }, "locationInModule": { "filename": "lib/documented.ts", - "line": 21 + "line": 28 }, "name": "greet", "parameters": [ @@ -4175,7 +4198,7 @@ }, "locationInModule": { "filename": "lib/documented.ts", - "line": 31 + "line": 38 }, "name": "hola" } @@ -4196,7 +4219,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1430 + "line": 1431 }, "methods": [ { @@ -4205,7 +4228,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1431 + "line": 1432 }, "name": "optionalAndVariadic", "parameters": [ @@ -4251,7 +4274,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 484 + "line": 485 }, "methods": [ { @@ -4261,7 +4284,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 489 + "line": 490 }, "name": "hello", "overrides": "@scope/jsii-calc-lib.IFriendly", @@ -4278,7 +4301,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 485 + "line": 486 }, "name": "next", "overrides": "jsii-calc.IRandomNumberGenerator", @@ -4304,7 +4327,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2795 + "line": 2794 }, "parameters": [ { @@ -4318,7 +4341,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2794 + "line": 2793 }, "name": "DynamicPropertyBearer", "properties": [ @@ -4328,7 +4351,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2797 + "line": 2796 }, "name": "dynamicProperty", "type": { @@ -4341,7 +4364,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2795 + "line": 2794 }, "name": "valueStore", "type": { @@ -4363,7 +4386,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2806 + "line": 2805 }, "parameters": [ { @@ -4377,7 +4400,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2805 + "line": 2804 }, "methods": [ { @@ -4388,7 +4411,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2817 + "line": 2816 }, "name": "overrideValue", "parameters": [ @@ -4418,7 +4441,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2806 + "line": 2805 }, "name": "originalValue", "type": { @@ -4520,7 +4543,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 44 + "line": 45 }, "methods": [ { @@ -4529,7 +4552,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 50 + "line": 51 }, "name": "randomIntegerLikeEnum", "returns": { @@ -4545,7 +4568,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 45 + "line": 46 }, "name": "randomStringLikeEnum", "returns": { @@ -4572,7 +4595,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1644 + "line": 1645 }, "methods": [ { @@ -4583,7 +4606,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1649 + "line": 1650 }, "name": "doesKeyExist", "parameters": [ @@ -4614,7 +4637,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1669 + "line": 1670 }, "name": "prop1IsNull", "returns": { @@ -4636,7 +4659,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1659 + "line": 1660 }, "name": "prop2IsUndefined", "returns": { @@ -4664,7 +4687,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1639 + "line": 1640 }, "name": "EraseUndefinedHashValuesOptions", "properties": [ @@ -4676,7 +4699,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1640 + "line": 1641 }, "name": "option1", "optional": true, @@ -4692,7 +4715,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1641 + "line": 1642 }, "name": "option2", "optional": true, @@ -4851,7 +4874,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1516 + "line": 1517 }, "parameters": [ { @@ -4865,7 +4888,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1515 + "line": 1516 }, "name": "ExportedBaseClass", "properties": [ @@ -4876,7 +4899,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1516 + "line": 1517 }, "name": "success", "type": { @@ -4895,7 +4918,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1758 + "line": 1759 }, "name": "ExtendsInternalInterface", "properties": [ @@ -4907,7 +4930,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1759 + "line": 1760 }, "name": "boom", "type": { @@ -4922,7 +4945,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1699 + "line": 1700 }, "name": "prop", "type": { @@ -5112,7 +5135,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 555 + "line": 556 }, "methods": [ { @@ -5122,7 +5145,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 573 + "line": 574 }, "name": "derivedToFirst", "parameters": [ @@ -5146,7 +5169,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 566 + "line": 567 }, "name": "readDerivedNonPrimitive", "parameters": [ @@ -5170,7 +5193,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 559 + "line": 560 }, "name": "readFirstNumber", "parameters": [ @@ -5197,7 +5220,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 577 + "line": 578 }, "name": "structLiteral", "type": { @@ -5217,7 +5240,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/documented.ts", - "line": 39 + "line": 46 }, "name": "Greetee", "properties": [ @@ -5231,7 +5254,7 @@ "immutable": true, "locationInModule": { "filename": "lib/documented.ts", - "line": 45 + "line": 52 }, "name": "name", "optional": true, @@ -5255,7 +5278,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 531 + "line": 532 }, "methods": [ { @@ -5264,7 +5287,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 532 + "line": 533 }, "name": "betterGreeting", "parameters": [ @@ -5294,7 +5317,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2209 + "line": 2210 }, "methods": [ { @@ -5304,7 +5327,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2211 + "line": 2212 }, "name": "provideAsClass", "returns": { @@ -5320,7 +5343,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2210 + "line": 2211 }, "name": "provideAsInterface", "returns": { @@ -5341,7 +5364,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2228 + "line": 2229 }, "methods": [ { @@ -5351,7 +5374,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2230 + "line": 2231 }, "name": "verb", "returns": { @@ -5371,7 +5394,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2229 + "line": 2230 }, "name": "value", "type": { @@ -5389,7 +5412,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1779 + "line": 1780 }, "name": "IAnotherPublicInterface", "properties": [ @@ -5400,7 +5423,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1780 + "line": 1781 }, "name": "a", "type": { @@ -5418,7 +5441,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2418 + "line": 2419 }, "methods": [ { @@ -5428,7 +5451,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2419 + "line": 2420 }, "name": "ring" } @@ -5445,7 +5468,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2407 + "line": 2408 }, "methods": [ { @@ -5455,7 +5478,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2408 + "line": 2409 }, "name": "yourTurn", "parameters": [ @@ -5480,7 +5503,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2414 + "line": 2415 }, "methods": [ { @@ -5490,7 +5513,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2415 + "line": 2416 }, "name": "yourTurn", "parameters": [ @@ -5603,7 +5626,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1770 + "line": 1771 }, "name": "IExtendsPrivateInterface", "properties": [ @@ -5615,7 +5638,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1771 + "line": 1772 }, "name": "moreThings", "type": { @@ -5634,7 +5657,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1755 + "line": 1756 }, "name": "private", "type": { @@ -5776,7 +5799,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1241 + "line": 1242 }, "name": "IInterfaceImplementedByAbstractClass", "properties": [ @@ -5788,7 +5811,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1242 + "line": 1243 }, "name": "propFromInterface", "type": { @@ -5810,7 +5833,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1345 + "line": 1346 }, "name": "IInterfaceThatShouldNotBeADataType", "properties": [ @@ -5822,7 +5845,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1347 + "line": 1348 }, "name": "otherValue", "type": { @@ -5840,7 +5863,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1710 + "line": 1711 }, "methods": [ { @@ -5850,7 +5873,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1711 + "line": 1712 }, "name": "visible" } @@ -5866,7 +5889,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1335 + "line": 1336 }, "methods": [ { @@ -5876,7 +5899,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1338 + "line": 1339 }, "name": "doThings" } @@ -5891,7 +5914,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1336 + "line": 1337 }, "name": "value", "type": { @@ -5910,7 +5933,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1219 + "line": 1220 }, "methods": [ { @@ -5920,7 +5943,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1220 + "line": 1221 }, "name": "hello", "parameters": [ @@ -5951,7 +5974,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 585 + "line": 586 }, "name": "IInterfaceWithProperties", "properties": [ @@ -5963,7 +5986,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 586 + "line": 587 }, "name": "readOnlyString", "type": { @@ -5977,7 +6000,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 587 + "line": 588 }, "name": "readWriteString", "type": { @@ -5998,7 +6021,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 590 + "line": 591 }, "name": "IInterfaceWithPropertiesExtension", "properties": [ @@ -6009,7 +6032,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 592 + "line": 593 }, "name": "foo", "type": { @@ -6166,7 +6189,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1289 + "line": 1290 }, "name": "IMutableObjectLiteral", "properties": [ @@ -6177,7 +6200,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1290 + "line": 1291 }, "name": "value", "type": { @@ -6198,7 +6221,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1788 + "line": 1789 }, "name": "INonInternalInterface", "properties": [ @@ -6209,7 +6232,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1785 + "line": 1786 }, "name": "b", "type": { @@ -6223,7 +6246,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1789 + "line": 1790 }, "name": "c", "type": { @@ -6242,7 +6265,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2543 + "line": 2544 }, "methods": [ { @@ -6252,7 +6275,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2545 + "line": 2546 }, "name": "wasSet", "returns": { @@ -6271,7 +6294,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2544 + "line": 2545 }, "name": "property", "type": { @@ -6290,7 +6313,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2732 + "line": 2733 }, "methods": [ { @@ -6300,7 +6323,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2733 + "line": 2734 }, "name": "optional", "returns": { @@ -6322,7 +6345,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1512 + "line": 1513 }, "name": "IPrivatelyImplemented", "properties": [ @@ -6334,7 +6357,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1513 + "line": 1514 }, "name": "success", "type": { @@ -6352,7 +6375,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1559 + "line": 1560 }, "methods": [ { @@ -6362,7 +6385,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1560 + "line": 1561 }, "name": "bye", "returns": { @@ -6383,7 +6406,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1563 + "line": 1564 }, "methods": [ { @@ -6393,7 +6416,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1564 + "line": 1565 }, "name": "ciao", "returns": { @@ -6449,7 +6472,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2474 + "line": 2475 }, "name": "IReturnJsii976", "properties": [ @@ -6461,7 +6484,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2475 + "line": 2476 }, "name": "foo", "type": { @@ -6479,7 +6502,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 638 + "line": 639 }, "methods": [ { @@ -6489,7 +6512,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 639 + "line": 640 }, "name": "obtainNumber", "returns": { @@ -6509,7 +6532,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 641 + "line": 642 }, "name": "numberProp", "type": { @@ -6571,7 +6594,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2661 + "line": 2662 }, "methods": [ { @@ -6581,7 +6604,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2662 + "line": 2663 }, "name": "returnStruct", "returns": { @@ -6640,7 +6663,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1762 + "line": 1763 }, "name": "ImplementInternalInterface", "properties": [ @@ -6650,7 +6673,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1763 + "line": 1764 }, "name": "prop", "type": { @@ -6673,7 +6696,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2225 + "line": 2226 }, "name": "Implementation", "properties": [ @@ -6684,7 +6707,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2226 + "line": 2227 }, "name": "value", "type": { @@ -6710,7 +6733,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1717 + "line": 1718 }, "methods": [ { @@ -6719,7 +6742,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1718 + "line": 1719 }, "name": "visible", "overrides": "jsii-calc.IInterfaceWithInternal" @@ -6742,7 +6765,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1736 + "line": 1737 }, "name": "ImplementsInterfaceWithInternalSubclass" }, @@ -6760,7 +6783,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1766 + "line": 1767 }, "name": "ImplementsPrivateInterface", "properties": [ @@ -6770,7 +6793,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1767 + "line": 1768 }, "name": "private", "type": { @@ -6792,7 +6815,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1175 + "line": 1176 }, "name": "ImplictBaseOfBase", "properties": [ @@ -6804,7 +6827,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1176 + "line": 1177 }, "name": "goo", "type": { @@ -6831,7 +6854,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1566 + "line": 1567 }, "methods": [ { @@ -6840,7 +6863,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1567 + "line": 1568 }, "name": "ciao", "overrides": "jsii-calc.IPublicInterface2", @@ -6864,7 +6887,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2695 + "line": 2696 }, "methods": [ { @@ -6873,7 +6896,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2706 + "line": 2707 }, "name": "listOfInterfaces", "returns": { @@ -6894,7 +6917,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2696 + "line": 2697 }, "name": "listOfStructs", "returns": { @@ -6915,7 +6938,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2716 + "line": 2717 }, "name": "mapOfInterfaces", "returns": { @@ -6936,7 +6959,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2700 + "line": 2701 }, "name": "mapOfStructs", "returns": { @@ -6968,7 +6991,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1206 + "line": 1207 }, "name": "Foo", "namespace": "InterfaceInNamespaceIncludesClasses", @@ -6979,7 +7002,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1207 + "line": 1208 }, "name": "bar", "optional": true, @@ -6999,7 +7022,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1210 + "line": 1211 }, "name": "Hello", "namespace": "InterfaceInNamespaceIncludesClasses", @@ -7012,7 +7035,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1211 + "line": 1212 }, "name": "foo", "type": { @@ -7031,7 +7054,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1200 + "line": 1201 }, "name": "Hello", "namespace": "InterfaceInNamespaceOnlyInterface", @@ -7044,7 +7067,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1201 + "line": 1202 }, "name": "foo", "type": { @@ -7063,7 +7086,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2097 + "line": 2098 }, "methods": [ { @@ -7072,7 +7095,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2098 + "line": 2099 }, "name": "makeInterfaces", "parameters": [ @@ -7115,7 +7138,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2742 + "line": 2743 }, "methods": [ { @@ -7124,7 +7147,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2743 + "line": 2744 }, "name": "myself", "returns": { @@ -7282,7 +7305,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 516 + "line": 517 }, "methods": [ { @@ -7291,7 +7314,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 517 + "line": 518 }, "name": "giveMeFriendly", "returns": { @@ -7306,7 +7329,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 523 + "line": 524 }, "name": "giveMeFriendlyGenerator", "returns": { @@ -7332,7 +7355,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 246 + "line": 247 }, "methods": [ { @@ -7341,7 +7364,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 247 + "line": 248 }, "name": "returnLiteral", "returns": { @@ -7367,7 +7390,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 255 + "line": 256 }, "name": "JSObjectLiteralToNativeClass", "properties": [ @@ -7377,7 +7400,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 256 + "line": 257 }, "name": "propA", "type": { @@ -7390,7 +7413,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 257 + "line": 258 }, "name": "propB", "type": { @@ -7413,7 +7436,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 744 + "line": 745 }, "methods": [ { @@ -7422,7 +7445,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 745 + "line": 746 }, "name": "abstract" }, @@ -7432,7 +7455,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 749 + "line": 750 }, "name": "assert" }, @@ -7442,7 +7465,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 753 + "line": 754 }, "name": "boolean" }, @@ -7452,7 +7475,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 757 + "line": 758 }, "name": "break" }, @@ -7462,7 +7485,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 761 + "line": 762 }, "name": "byte" }, @@ -7472,7 +7495,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 765 + "line": 766 }, "name": "case" }, @@ -7482,7 +7505,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 769 + "line": 770 }, "name": "catch" }, @@ -7492,7 +7515,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 773 + "line": 774 }, "name": "char" }, @@ -7502,7 +7525,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 777 + "line": 778 }, "name": "class" }, @@ -7512,7 +7535,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 781 + "line": 782 }, "name": "const" }, @@ -7522,7 +7545,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 785 + "line": 786 }, "name": "continue" }, @@ -7532,7 +7555,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 789 + "line": 790 }, "name": "default" }, @@ -7542,7 +7565,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 797 + "line": 798 }, "name": "do" }, @@ -7552,7 +7575,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 793 + "line": 794 }, "name": "double" }, @@ -7562,7 +7585,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 801 + "line": 802 }, "name": "else" }, @@ -7572,7 +7595,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 805 + "line": 806 }, "name": "enum" }, @@ -7582,7 +7605,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 809 + "line": 810 }, "name": "extends" }, @@ -7592,7 +7615,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 813 + "line": 814 }, "name": "false" }, @@ -7602,7 +7625,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 817 + "line": 818 }, "name": "final" }, @@ -7612,7 +7635,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 821 + "line": 822 }, "name": "finally" }, @@ -7622,7 +7645,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 825 + "line": 826 }, "name": "float" }, @@ -7632,7 +7655,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 829 + "line": 830 }, "name": "for" }, @@ -7642,7 +7665,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 833 + "line": 834 }, "name": "goto" }, @@ -7652,7 +7675,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 837 + "line": 838 }, "name": "if" }, @@ -7662,7 +7685,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 841 + "line": 842 }, "name": "implements" }, @@ -7672,7 +7695,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 845 + "line": 846 }, "name": "import" }, @@ -7682,7 +7705,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 849 + "line": 850 }, "name": "instanceof" }, @@ -7692,7 +7715,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 853 + "line": 854 }, "name": "int" }, @@ -7702,7 +7725,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 857 + "line": 858 }, "name": "interface" }, @@ -7712,7 +7735,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 861 + "line": 862 }, "name": "long" }, @@ -7722,7 +7745,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 865 + "line": 866 }, "name": "native" }, @@ -7732,7 +7755,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 869 + "line": 870 }, "name": "new" }, @@ -7742,7 +7765,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 873 + "line": 874 }, "name": "null" }, @@ -7752,7 +7775,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 877 + "line": 878 }, "name": "package" }, @@ -7762,7 +7785,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 881 + "line": 882 }, "name": "private" }, @@ -7772,7 +7795,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 885 + "line": 886 }, "name": "protected" }, @@ -7782,7 +7805,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 889 + "line": 890 }, "name": "public" }, @@ -7792,7 +7815,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 893 + "line": 894 }, "name": "return" }, @@ -7802,7 +7825,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 897 + "line": 898 }, "name": "short" }, @@ -7812,7 +7835,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 901 + "line": 902 }, "name": "static" }, @@ -7822,7 +7845,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 905 + "line": 906 }, "name": "strictfp" }, @@ -7832,7 +7855,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 909 + "line": 910 }, "name": "super" }, @@ -7842,7 +7865,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 913 + "line": 914 }, "name": "switch" }, @@ -7852,7 +7875,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 917 + "line": 918 }, "name": "synchronized" }, @@ -7862,7 +7885,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 921 + "line": 922 }, "name": "this" }, @@ -7872,7 +7895,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 925 + "line": 926 }, "name": "throw" }, @@ -7882,7 +7905,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 929 + "line": 930 }, "name": "throws" }, @@ -7892,7 +7915,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 933 + "line": 934 }, "name": "transient" }, @@ -7902,7 +7925,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 937 + "line": 938 }, "name": "true" }, @@ -7912,7 +7935,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 941 + "line": 942 }, "name": "try" }, @@ -7922,7 +7945,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 945 + "line": 946 }, "name": "void" }, @@ -7932,7 +7955,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 949 + "line": 950 }, "name": "volatile" } @@ -7945,7 +7968,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 953 + "line": 954 }, "name": "while", "type": { @@ -8012,7 +8035,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1529 + "line": 1530 }, "name": "JsiiAgent", "properties": [ @@ -8024,7 +8047,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1533 + "line": 1534 }, "name": "value", "optional": true, @@ -8046,7 +8069,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2576 + "line": 2577 }, "methods": [ { @@ -8055,7 +8078,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2621 + "line": 2622 }, "name": "anyArray", "returns": { @@ -8071,7 +8094,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2617 + "line": 2618 }, "name": "anyBooleanFalse", "returns": { @@ -8087,7 +8110,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2613 + "line": 2614 }, "name": "anyBooleanTrue", "returns": { @@ -8103,7 +8126,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2593 + "line": 2594 }, "name": "anyDate", "returns": { @@ -8119,7 +8142,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2609 + "line": 2610 }, "name": "anyEmptyString", "returns": { @@ -8135,7 +8158,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2589 + "line": 2590 }, "name": "anyFunction", "returns": { @@ -8151,7 +8174,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2625 + "line": 2626 }, "name": "anyHash", "returns": { @@ -8167,7 +8190,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2581 + "line": 2582 }, "name": "anyNull", "returns": { @@ -8183,7 +8206,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2597 + "line": 2598 }, "name": "anyNumber", "returns": { @@ -8199,7 +8222,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2629 + "line": 2630 }, "name": "anyRef", "returns": { @@ -8215,7 +8238,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2605 + "line": 2606 }, "name": "anyString", "returns": { @@ -8231,7 +8254,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2585 + "line": 2586 }, "name": "anyUndefined", "returns": { @@ -8247,7 +8270,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2601 + "line": 2602 }, "name": "anyZero", "returns": { @@ -8263,7 +8286,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2577 + "line": 2578 }, "name": "stringify", "parameters": [ @@ -8299,7 +8322,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2829 + "line": 2828 }, "parameters": [ { @@ -8313,7 +8336,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2828 + "line": 2827 }, "name": "LevelOne", "properties": [ @@ -8324,7 +8347,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2829 + "line": 2828 }, "name": "props", "type": { @@ -8343,7 +8366,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2839 + "line": 2838 }, "name": "PropBooleanValue", "namespace": "LevelOne", @@ -8356,7 +8379,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2840 + "line": 2839 }, "name": "value", "type": { @@ -8375,7 +8398,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2835 + "line": 2834 }, "name": "PropProperty", "namespace": "LevelOne", @@ -8388,7 +8411,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2836 + "line": 2835 }, "name": "prop", "type": { @@ -8407,7 +8430,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2831 + "line": 2830 }, "name": "LevelOneProps", "properties": [ @@ -8419,7 +8442,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2832 + "line": 2831 }, "name": "prop", "type": { @@ -8439,7 +8462,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1439 + "line": 1440 }, "name": "LoadBalancedFargateServiceProps", "properties": [ @@ -8454,7 +8477,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1482 + "line": 1483 }, "name": "containerPort", "optional": true, @@ -8473,7 +8496,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1453 + "line": 1454 }, "name": "cpu", "optional": true, @@ -8492,7 +8515,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1475 + "line": 1476 }, "name": "memoryMiB", "optional": true, @@ -8510,7 +8533,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1489 + "line": 1490 }, "name": "publicLoadBalancer", "optional": true, @@ -8528,7 +8551,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1496 + "line": 1497 }, "name": "publicTasks", "optional": true, @@ -8890,7 +8913,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2450 + "line": 2451 }, "name": "NestedStruct", "properties": [ @@ -8903,7 +8926,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2454 + "line": 2455 }, "name": "numberProp", "type": { @@ -8927,7 +8950,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1125 + "line": 1126 }, "methods": [ { @@ -8938,7 +8961,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1156 + "line": 1157 }, "name": "cryptoSha256", "returns": { @@ -8956,7 +8979,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1130 + "line": 1131 }, "name": "fsReadFile", "returns": { @@ -8973,7 +8996,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1139 + "line": 1140 }, "name": "fsReadFileSync", "returns": { @@ -8993,7 +9016,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1148 + "line": 1149 }, "name": "osPlatform", "type": { @@ -9015,7 +9038,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1369 + "line": 1370 }, "parameters": [ { @@ -9036,7 +9059,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1366 + "line": 1367 }, "methods": [ { @@ -9045,7 +9068,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1377 + "line": 1378 }, "name": "giveMeUndefined", "parameters": [ @@ -9064,7 +9087,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1387 + "line": 1388 }, "name": "giveMeUndefinedInsideAnObject", "parameters": [ @@ -9082,7 +9105,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1416 + "line": 1417 }, "name": "verifyPropertyIsUndefined" } @@ -9095,7 +9118,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1367 + "line": 1368 }, "name": "changeMeToUndefined", "optional": true, @@ -9115,7 +9138,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1425 + "line": 1426 }, "name": "NullShouldBeTreatedAsUndefinedData", "properties": [ @@ -9127,7 +9150,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1427 + "line": 1428 }, "name": "arrayWithThreeElementsAndUndefinedAsSecondArgument", "type": { @@ -9147,7 +9170,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1426 + "line": 1427 }, "name": "thisShouldBeUndefined", "optional": true, @@ -9170,7 +9193,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 505 + "line": 506 }, "parameters": [ { @@ -9184,7 +9207,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 504 + "line": 505 }, "methods": [ { @@ -9193,7 +9216,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 511 + "line": 512 }, "name": "isSameGenerator", "parameters": [ @@ -9216,7 +9239,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 507 + "line": 508 }, "name": "nextTimes100", "returns": { @@ -9234,7 +9257,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 505 + "line": 506 }, "name": "generator", "type": { @@ -9258,7 +9281,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 263 + "line": 264 }, "methods": [ { @@ -9268,7 +9291,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 267 + "line": 268 }, "name": "sumFromArray", "parameters": [ @@ -9297,7 +9320,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 278 + "line": 279 }, "name": "sumFromMap", "parameters": [ @@ -9331,7 +9354,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2547 + "line": 2548 }, "methods": [ { @@ -9340,7 +9363,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2548 + "line": 2549 }, "name": "provide", "returns": { @@ -9356,7 +9379,7 @@ "jsii-calc.Old": { "assembly": "jsii-calc", "docs": { - "deprecated": "Use the new class", + "deprecated": "Use the new class or the old class whatever you want because\nwhatever you like is always the best", "stability": "deprecated", "summary": "Old class." }, @@ -9369,7 +9392,7 @@ "kind": "class", "locationInModule": { "filename": "lib/documented.ts", - "line": 53 + "line": 61 }, "methods": [ { @@ -9379,7 +9402,7 @@ }, "locationInModule": { "filename": "lib/documented.ts", - "line": 57 + "line": 65 }, "name": "doAThing" } @@ -9398,7 +9421,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1223 + "line": 1224 }, "parameters": [ { @@ -9412,7 +9435,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1222 + "line": 1223 }, "methods": [ { @@ -9421,7 +9444,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1231 + "line": 1232 }, "name": "invokeWithOptional" }, @@ -9431,7 +9454,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1227 + "line": 1228 }, "name": "invokeWithoutOptional" } @@ -9450,7 +9473,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 309 + "line": 310 }, "parameters": [ { @@ -9477,7 +9500,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 308 + "line": 309 }, "name": "OptionalConstructorArgument", "properties": [ @@ -9488,7 +9511,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 310 + "line": 311 }, "name": "arg1", "type": { @@ -9502,7 +9525,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 311 + "line": 312 }, "name": "arg2", "type": { @@ -9516,7 +9539,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 312 + "line": 313 }, "name": "arg3", "optional": true, @@ -9536,7 +9559,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1868 + "line": 1869 }, "name": "OptionalStruct", "properties": [ @@ -9548,7 +9571,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1869 + "line": 1870 }, "name": "field", "optional": true, @@ -9570,7 +9593,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1863 + "line": 1864 }, "parameters": [ { @@ -9585,7 +9608,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1859 + "line": 1860 }, "name": "OptionalStructConsumer", "properties": [ @@ -9596,7 +9619,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1860 + "line": 1861 }, "name": "parameterWasUndefined", "type": { @@ -9610,7 +9633,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1861 + "line": 1862 }, "name": "fieldValue", "optional": true, @@ -9635,7 +9658,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2136 + "line": 2137 }, "methods": [ { @@ -9644,7 +9667,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2148 + "line": 2149 }, "name": "overrideMe", "protected": true, @@ -9660,7 +9683,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2144 + "line": 2145 }, "name": "switchModes" }, @@ -9670,7 +9693,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2140 + "line": 2141 }, "name": "valueFromProtected", "returns": { @@ -9689,7 +9712,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2137 + "line": 2138 }, "name": "overrideReadOnly", "protected": true, @@ -9703,7 +9726,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2138 + "line": 2139 }, "name": "overrideReadWrite", "protected": true, @@ -9727,7 +9750,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 644 + "line": 645 }, "methods": [ { @@ -9736,7 +9759,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 645 + "line": 646 }, "name": "test", "parameters": [ @@ -9767,7 +9790,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2499 + "line": 2500 }, "name": "ParentStruct982", "properties": [ @@ -9779,7 +9802,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2500 + "line": 2501 }, "name": "foo", "type": { @@ -9803,7 +9826,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1834 + "line": 1835 }, "methods": [ { @@ -9813,7 +9836,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1835 + "line": 1836 }, "name": "consumePartiallyInitializedThis", "parameters": [ @@ -9859,7 +9882,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 494 + "line": 495 }, "methods": [ { @@ -9868,7 +9891,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 495 + "line": 496 }, "name": "sayHello", "parameters": [ @@ -10045,7 +10068,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1554 + "line": 1555 }, "methods": [ { @@ -10054,7 +10077,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1555 + "line": 1556 }, "name": "hello" } @@ -10075,7 +10098,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 956 + "line": 957 }, "methods": [ { @@ -10084,7 +10107,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 957 + "line": 958 }, "name": "and" }, @@ -10094,7 +10117,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 961 + "line": 962 }, "name": "as" }, @@ -10104,7 +10127,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 965 + "line": 966 }, "name": "assert" }, @@ -10114,7 +10137,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 969 + "line": 970 }, "name": "async" }, @@ -10124,7 +10147,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 973 + "line": 974 }, "name": "await" }, @@ -10134,7 +10157,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 977 + "line": 978 }, "name": "break" }, @@ -10144,7 +10167,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 981 + "line": 982 }, "name": "class" }, @@ -10154,7 +10177,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 985 + "line": 986 }, "name": "continue" }, @@ -10164,7 +10187,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 989 + "line": 990 }, "name": "def" }, @@ -10174,7 +10197,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 993 + "line": 994 }, "name": "del" }, @@ -10184,7 +10207,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 997 + "line": 998 }, "name": "elif" }, @@ -10194,7 +10217,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1001 + "line": 1002 }, "name": "else" }, @@ -10204,7 +10227,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1005 + "line": 1006 }, "name": "except" }, @@ -10214,7 +10237,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1009 + "line": 1010 }, "name": "finally" }, @@ -10224,7 +10247,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1013 + "line": 1014 }, "name": "for" }, @@ -10234,7 +10257,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1017 + "line": 1018 }, "name": "from" }, @@ -10244,7 +10267,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1021 + "line": 1022 }, "name": "global" }, @@ -10254,7 +10277,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1025 + "line": 1026 }, "name": "if" }, @@ -10264,7 +10287,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1029 + "line": 1030 }, "name": "import" }, @@ -10274,7 +10297,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1033 + "line": 1034 }, "name": "in" }, @@ -10284,7 +10307,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1037 + "line": 1038 }, "name": "is" }, @@ -10294,7 +10317,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1041 + "line": 1042 }, "name": "lambda" }, @@ -10304,7 +10327,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1045 + "line": 1046 }, "name": "nonlocal" }, @@ -10314,7 +10337,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1049 + "line": 1050 }, "name": "not" }, @@ -10324,7 +10347,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1053 + "line": 1054 }, "name": "or" }, @@ -10334,7 +10357,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1057 + "line": 1058 }, "name": "pass" }, @@ -10344,7 +10367,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1061 + "line": 1062 }, "name": "raise" }, @@ -10354,7 +10377,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1065 + "line": 1066 }, "name": "return" }, @@ -10364,7 +10387,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1069 + "line": 1070 }, "name": "try" }, @@ -10374,7 +10397,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1073 + "line": 1074 }, "name": "while" }, @@ -10384,7 +10407,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1077 + "line": 1078 }, "name": "with" }, @@ -10394,7 +10417,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1081 + "line": 1082 }, "name": "yield" } @@ -10413,7 +10436,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1091 + "line": 1092 }, "parameters": [ { @@ -10427,7 +10450,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1090 + "line": 1091 }, "methods": [ { @@ -10436,7 +10459,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1093 + "line": 1094 }, "name": "method", "parameters": [ @@ -10464,7 +10487,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1091 + "line": 1092 }, "name": "self", "type": { @@ -10485,7 +10508,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1099 + "line": 1100 }, "parameters": [ { @@ -10499,7 +10522,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1098 + "line": 1099 }, "name": "ClassWithSelfKwarg", "namespace": "PythonSelf", @@ -10511,7 +10534,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1099 + "line": 1100 }, "name": "props", "type": { @@ -10529,7 +10552,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1106 + "line": 1107 }, "methods": [ { @@ -10539,7 +10562,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1107 + "line": 1108 }, "name": "method", "parameters": [ @@ -10570,7 +10593,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1102 + "line": 1103 }, "name": "StructWithSelf", "namespace": "PythonSelf", @@ -10583,7 +10606,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1103 + "line": 1104 }, "name": "self", "type": { @@ -10607,7 +10630,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1182 + "line": 1183 }, "methods": [ { @@ -10616,7 +10639,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1185 + "line": 1186 }, "name": "loadFoo", "returns": { @@ -10632,7 +10655,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1189 + "line": 1190 }, "name": "saveFoo", "parameters": [ @@ -10653,7 +10676,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1183 + "line": 1184 }, "name": "foo", "optional": true, @@ -10680,7 +10703,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1507 + "line": 1508 }, "name": "ReturnsPrivateImplementationOfInterface", "properties": [ @@ -10691,7 +10714,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1508 + "line": 1509 }, "name": "privateImplementation", "type": { @@ -10712,7 +10735,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2443 + "line": 2444 }, "name": "RootStruct", "properties": [ @@ -10725,7 +10748,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2447 + "line": 2448 }, "name": "stringProp", "type": { @@ -10740,7 +10763,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2448 + "line": 2449 }, "name": "nestedStruct", "optional": true, @@ -10759,7 +10782,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2456 + "line": 2457 }, "methods": [ { @@ -10768,7 +10791,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2457 + "line": 2458 }, "name": "validate", "parameters": [ @@ -10798,7 +10821,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 287 + "line": 288 }, "methods": [ { @@ -10807,7 +10830,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 295 + "line": 296 }, "name": "methodWithDefaultedArguments", "parameters": [ @@ -10840,7 +10863,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 303 + "line": 304 }, "name": "methodWithOptionalAnyArgument", "parameters": [ @@ -10860,7 +10883,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 291 + "line": 292 }, "name": "methodWithOptionalArguments", "parameters": [ @@ -10898,7 +10921,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2015 + "line": 2016 }, "name": "SecondLevelStruct", "properties": [ @@ -10911,7 +10934,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2019 + "line": 2020 }, "name": "deeperRequiredProp", "type": { @@ -10927,7 +10950,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2024 + "line": 2025 }, "name": "deeperOptionalProp", "optional": true, @@ -10953,7 +10976,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1625 + "line": 1626 }, "methods": [ { @@ -10962,7 +10985,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1628 + "line": 1629 }, "name": "interface1", "returns": { @@ -10977,7 +11000,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1632 + "line": 1633 }, "name": "interface2", "returns": { @@ -11000,7 +11023,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1967 + "line": 1968 }, "methods": [ { @@ -11009,7 +11032,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1969 + "line": 1970 }, "name": "isSingletonInt", "parameters": [ @@ -11039,7 +11062,7 @@ "kind": "enum", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1974 + "line": 1975 }, "members": [ { @@ -11063,7 +11086,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1950 + "line": 1951 }, "methods": [ { @@ -11072,7 +11095,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1953 + "line": 1954 }, "name": "isSingletonString", "parameters": [ @@ -11102,7 +11125,7 @@ "kind": "enum", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1958 + "line": 1959 }, "members": [ { @@ -11175,7 +11198,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2480 + "line": 2481 }, "methods": [ { @@ -11184,7 +11207,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2489 + "line": 2490 }, "name": "returnAnonymous", "returns": { @@ -11200,7 +11223,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2481 + "line": 2482 }, "name": "returnReturn", "returns": { @@ -11361,7 +11384,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1893 + "line": 1894 }, "methods": [ { @@ -11370,7 +11393,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1896 + "line": 1897 }, "name": "canAccessStaticContext", "returns": { @@ -11389,7 +11412,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1904 + "line": 1905 }, "name": "staticVariable", "static": true, @@ -11399,6 +11422,102 @@ } ] }, + "jsii-calc.StaticHelloChild": { + "assembly": "jsii-calc", + "base": "jsii-calc.StaticHelloParent", + "docs": { + "stability": "stable" + }, + "fqn": "jsii-calc.StaticHelloChild", + "kind": "class", + "locationInModule": { + "filename": "lib/compliance.ts", + "line": 2862 + }, + "methods": [ + { + "docs": { + "stability": "stable" + }, + "locationInModule": { + "filename": "lib/compliance.ts", + "line": 2867 + }, + "name": "method", + "overrides": "jsii-calc.StaticHelloParent", + "static": true + } + ], + "name": "StaticHelloChild", + "properties": [ + { + "docs": { + "stability": "stable" + }, + "immutable": true, + "locationInModule": { + "filename": "lib/compliance.ts", + "line": 2863 + }, + "name": "property", + "overrides": "jsii-calc.StaticHelloParent", + "static": true, + "type": { + "primitive": "number" + } + } + ] + }, + "jsii-calc.StaticHelloParent": { + "assembly": "jsii-calc", + "docs": { + "remarks": "The difference is fairly minor (for typical use-cases, the end result is the\nsame), however this has implications on what the generated code should look\nlike.", + "stability": "stable", + "summary": "Static methods that override parent class are technically overrides (the inheritance of statics is part of the ES6 specification), but certain other languages such as Java do not carry statics in the inheritance chain at all, so they cannot be overridden, only hidden." + }, + "fqn": "jsii-calc.StaticHelloParent", + "initializer": { + "docs": { + "stability": "stable" + } + }, + "kind": "class", + "locationInModule": { + "filename": "lib/compliance.ts", + "line": 2853 + }, + "methods": [ + { + "docs": { + "stability": "stable" + }, + "locationInModule": { + "filename": "lib/compliance.ts", + "line": 2858 + }, + "name": "method", + "static": true + } + ], + "name": "StaticHelloParent", + "properties": [ + { + "docs": { + "stability": "stable" + }, + "immutable": true, + "locationInModule": { + "filename": "lib/compliance.ts", + "line": 2854 + }, + "name": "property", + "static": true, + "type": { + "primitive": "number" + } + } + ] + }, "jsii-calc.Statics": { "assembly": "jsii-calc", "docs": { @@ -11411,7 +11530,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 689 + "line": 690 }, "parameters": [ { @@ -11425,7 +11544,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 688 + "line": 689 }, "methods": [ { @@ -11435,7 +11554,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 695 + "line": 696 }, "name": "staticMethod", "parameters": [ @@ -11462,7 +11581,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 699 + "line": 700 }, "name": "justMethod", "returns": { @@ -11483,7 +11602,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 711 + "line": 712 }, "name": "BAR", "static": true, @@ -11499,7 +11618,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 740 + "line": 741 }, "name": "ConstObj", "static": true, @@ -11516,7 +11635,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 706 + "line": 707 }, "name": "Foo", "static": true, @@ -11533,7 +11652,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 716 + "line": 717 }, "name": "zooBar", "static": true, @@ -11554,7 +11673,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 725 + "line": 726 }, "name": "instance", "static": true, @@ -11568,7 +11687,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 739 + "line": 740 }, "name": "nonConstStatic", "static": true, @@ -11583,7 +11702,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 689 + "line": 690 }, "name": "value", "type": { @@ -11601,7 +11720,7 @@ "kind": "enum", "locationInModule": { "filename": "lib/compliance.ts", - "line": 38 + "line": 39 }, "members": [ { @@ -11639,7 +11758,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1678 + "line": 1679 }, "name": "StripInternal", "properties": [ @@ -11649,7 +11768,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1679 + "line": 1680 }, "name": "youSeeMe", "type": { @@ -11669,7 +11788,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2241 + "line": 2242 }, "name": "StructA", "properties": [ @@ -11681,7 +11800,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2242 + "line": 2243 }, "name": "requiredString", "type": { @@ -11696,7 +11815,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2244 + "line": 2245 }, "name": "optionalNumber", "optional": true, @@ -11712,7 +11831,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2243 + "line": 2244 }, "name": "optionalString", "optional": true, @@ -11733,7 +11852,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2250 + "line": 2251 }, "name": "StructB", "properties": [ @@ -11745,7 +11864,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2251 + "line": 2252 }, "name": "requiredString", "type": { @@ -11760,7 +11879,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2252 + "line": 2253 }, "name": "optionalBoolean", "optional": true, @@ -11776,7 +11895,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2253 + "line": 2254 }, "name": "optionalStructA", "optional": true, @@ -11798,7 +11917,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2679 + "line": 2680 }, "name": "StructParameterType", "properties": [ @@ -11810,7 +11929,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2680 + "line": 2681 }, "name": "scope", "type": { @@ -11825,7 +11944,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2681 + "line": 2682 }, "name": "props", "optional": true, @@ -11850,7 +11969,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2073 + "line": 2074 }, "methods": [ { @@ -11859,7 +11978,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2085 + "line": 2086 }, "name": "howManyVarArgsDidIPass", "parameters": [ @@ -11891,7 +12010,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2074 + "line": 2075 }, "name": "roundTrip", "parameters": [ @@ -11927,7 +12046,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2255 + "line": 2256 }, "methods": [ { @@ -11936,7 +12055,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2256 + "line": 2257 }, "name": "isStructA", "parameters": [ @@ -11969,7 +12088,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2277 + "line": 2278 }, "name": "isStructB", "parameters": [ @@ -12009,7 +12128,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2047 + "line": 2048 }, "name": "StructWithJavaReservedWords", "properties": [ @@ -12021,7 +12140,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2048 + "line": 2049 }, "name": "default", "type": { @@ -12036,7 +12155,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2049 + "line": 2050 }, "name": "assert", "optional": true, @@ -12052,7 +12171,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2052 + "line": 2053 }, "name": "result", "optional": true, @@ -12068,7 +12187,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2053 + "line": 2054 }, "name": "that", "optional": true, @@ -12153,7 +12272,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2182 + "line": 2183 }, "parameters": [ { @@ -12201,7 +12320,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2172 + "line": 2173 }, "name": "SupportsNiceJavaBuilder", "properties": [ @@ -12213,7 +12332,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2183 + "line": 2184 }, "name": "id", "overrides": "jsii-calc.SupportsNiceJavaBuilderWithRequiredProps", @@ -12228,7 +12347,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2173 + "line": 2174 }, "name": "rest", "type": { @@ -12252,7 +12371,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2192 + "line": 2193 }, "name": "SupportsNiceJavaBuilderProps", "properties": [ @@ -12265,7 +12384,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2202 + "line": 2203 }, "name": "bar", "type": { @@ -12282,7 +12401,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2197 + "line": 2198 }, "name": "id", "optional": true, @@ -12305,7 +12424,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2164 + "line": 2165 }, "parameters": [ { @@ -12331,7 +12450,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2156 + "line": 2157 }, "name": "SupportsNiceJavaBuilderWithRequiredProps", "properties": [ @@ -12342,7 +12461,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2158 + "line": 2159 }, "name": "bar", "type": { @@ -12357,7 +12476,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2165 + "line": 2166 }, "name": "id", "type": { @@ -12371,7 +12490,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2157 + "line": 2158 }, "name": "propId", "optional": true, @@ -12395,7 +12514,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 375 + "line": 376 }, "methods": [ { @@ -12405,7 +12524,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 388 + "line": 389 }, "name": "callerIsAsync", "returns": { @@ -12420,7 +12539,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 376 + "line": 377 }, "name": "callerIsMethod", "returns": { @@ -12435,7 +12554,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 428 + "line": 429 }, "name": "modifyOtherProperty", "parameters": [ @@ -12453,7 +12572,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 400 + "line": 401 }, "name": "modifyValueOfTheProperty", "parameters": [ @@ -12471,7 +12590,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 441 + "line": 442 }, "name": "readA", "returns": { @@ -12486,7 +12605,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 432 + "line": 433 }, "name": "retrieveOtherProperty", "returns": { @@ -12501,7 +12620,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 412 + "line": 413 }, "name": "retrieveReadOnlyProperty", "returns": { @@ -12516,7 +12635,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 404 + "line": 405 }, "name": "retrieveValueOfTheProperty", "returns": { @@ -12531,7 +12650,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 392 + "line": 393 }, "name": "virtualMethod", "parameters": [ @@ -12554,7 +12673,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 445 + "line": 446 }, "name": "writeA", "parameters": [ @@ -12576,7 +12695,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 410 + "line": 411 }, "name": "readonlyProperty", "type": { @@ -12589,7 +12708,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 439 + "line": 440 }, "name": "a", "type": { @@ -12602,7 +12721,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 380 + "line": 381 }, "name": "callerIsProperty", "type": { @@ -12615,7 +12734,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 418 + "line": 419 }, "name": "otherProperty", "type": { @@ -12628,7 +12747,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 398 + "line": 399 }, "name": "theProperty", "type": { @@ -12641,7 +12760,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 426 + "line": 427 }, "name": "valueOfOtherProperty", "type": { @@ -12664,7 +12783,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 650 + "line": 651 }, "methods": [ { @@ -12673,7 +12792,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 651 + "line": 652 }, "name": "throwError" } @@ -12690,7 +12809,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1998 + "line": 1999 }, "name": "TopLevelStruct", "properties": [ @@ -12703,7 +12822,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2002 + "line": 2003 }, "name": "required", "type": { @@ -12719,7 +12838,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2012 + "line": 2013 }, "name": "secondLevel", "type": { @@ -12744,7 +12863,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2007 + "line": 2008 }, "name": "optional", "optional": true, @@ -12765,7 +12884,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 2753 + "line": 2754 }, "methods": [ { @@ -12775,7 +12894,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 2757 + "line": 2758 }, "name": "mode", "returns": { @@ -12847,7 +12966,7 @@ "kind": "interface", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1111 + "line": 1112 }, "name": "UnionProperties", "properties": [ @@ -12859,7 +12978,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1113 + "line": 1114 }, "name": "bar", "type": { @@ -12886,7 +13005,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1112 + "line": 1113 }, "name": "foo", "optional": true, @@ -12996,7 +13115,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1116 + "line": 1117 }, "methods": [ { @@ -13005,7 +13124,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1117 + "line": 1118 }, "name": "value", "returns": { @@ -13032,7 +13151,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1167 + "line": 1168 }, "methods": [ { @@ -13041,7 +13160,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1168 + "line": 1169 }, "name": "hello", "returns": { @@ -13065,7 +13184,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 596 + "line": 597 }, "parameters": [ { @@ -13079,7 +13198,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 595 + "line": 596 }, "methods": [ { @@ -13088,7 +13207,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 598 + "line": 599 }, "name": "justRead", "returns": { @@ -13103,7 +13222,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 607 + "line": 608 }, "name": "readStringAndNumber", "parameters": [ @@ -13126,7 +13245,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 602 + "line": 603 }, "name": "writeAndRead", "parameters": [ @@ -13153,7 +13272,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 596 + "line": 597 }, "name": "obj", "type": { @@ -13174,7 +13293,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 680 + "line": 681 }, "parameters": [ { @@ -13188,7 +13307,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 679 + "line": 680 }, "methods": [ { @@ -13197,7 +13316,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 682 + "line": 683 }, "name": "asArray", "parameters": [ @@ -13236,7 +13355,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 666 + "line": 667 }, "parameters": [ { @@ -13255,7 +13374,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 660 + "line": 661 }, "methods": [ { @@ -13264,7 +13383,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 674 + "line": 675 }, "name": "asArray", "parameters": [ @@ -13317,7 +13436,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 450 + "line": 451 }, "methods": [ { @@ -13327,7 +13446,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 475 + "line": 476 }, "name": "overrideMeAsync", "parameters": [ @@ -13350,7 +13469,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 479 + "line": 480 }, "name": "overrideMeSync", "parameters": [ @@ -13374,7 +13493,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 457 + "line": 458 }, "name": "parallelSumAsync", "parameters": [ @@ -13398,7 +13517,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 451 + "line": 452 }, "name": "serialSumAsync", "parameters": [ @@ -13421,7 +13540,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 467 + "line": 468 }, "name": "sumSync", "parameters": [ @@ -13458,7 +13577,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1922 + "line": 1923 }, "methods": [ { @@ -13467,7 +13586,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1927 + "line": 1928 }, "name": "callMe" }, @@ -13478,7 +13597,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1931 + "line": 1932 }, "name": "overrideMe", "protected": true @@ -13493,7 +13612,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1924 + "line": 1925 }, "name": "methodWasCalled", "type": { @@ -13515,7 +13634,7 @@ }, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1938 + "line": 1939 }, "parameters": [ { @@ -13530,7 +13649,7 @@ "kind": "class", "locationInModule": { "filename": "lib/compliance.ts", - "line": 1937 + "line": 1938 }, "name": "WithPrivatePropertyInConstructor", "properties": [ @@ -13541,7 +13660,7 @@ "immutable": true, "locationInModule": { "filename": "lib/compliance.ts", - "line": 1940 + "line": 1941 }, "name": "success", "type": { @@ -13717,7 +13836,7 @@ }, "locationInModule": { "filename": "lib/submodule/my-class.ts", - "line": 11 + "line": 12 }, "parameters": [ { @@ -13734,8 +13853,33 @@ "kind": "class", "locationInModule": { "filename": "lib/submodule/my-class.ts", - "line": 5 + "line": 6 }, + "methods": [ + { + "docs": { + "stability": "stable" + }, + "locationInModule": { + "filename": "lib/submodule/my-class.ts", + "line": 14 + }, + "name": "methodWithSpecialParam", + "parameters": [ + { + "name": "param", + "type": { + "fqn": "jsii-calc.submodule.param.SpecialParameter" + } + } + ], + "returns": { + "type": { + "primitive": "string" + } + } + } + ], "name": "MyClass", "namespace": "submodule", "properties": [ @@ -13746,7 +13890,7 @@ "immutable": true, "locationInModule": { "filename": "lib/submodule/my-class.ts", - "line": 8 + "line": 9 }, "name": "awesomeness", "type": { @@ -13760,7 +13904,7 @@ "immutable": true, "locationInModule": { "filename": "lib/submodule/my-class.ts", - "line": 6 + "line": 7 }, "name": "definedAt", "overrides": "jsii-calc.submodule.nested_submodule.deeplyNested.INamespaced", @@ -13775,7 +13919,7 @@ "immutable": true, "locationInModule": { "filename": "lib/submodule/my-class.ts", - "line": 7 + "line": 8 }, "name": "goodness", "type": { @@ -13789,7 +13933,7 @@ "immutable": true, "locationInModule": { "filename": "lib/submodule/my-class.ts", - "line": 11 + "line": 12 }, "name": "props", "type": { @@ -13802,7 +13946,7 @@ }, "locationInModule": { "filename": "lib/submodule/my-class.ts", - "line": 9 + "line": 10 }, "name": "allTypes", "optional": true, @@ -14226,8 +14370,76 @@ } } ] + }, + "jsii-calc.submodule.param.SpecialParameter": { + "assembly": "jsii-calc", + "datatype": true, + "docs": { + "stability": "stable" + }, + "fqn": "jsii-calc.submodule.param.SpecialParameter", + "kind": "interface", + "locationInModule": { + "filename": "lib/submodule/param/index.ts", + "line": 1 + }, + "name": "SpecialParameter", + "namespace": "submodule.param", + "properties": [ + { + "abstract": true, + "docs": { + "stability": "stable" + }, + "immutable": true, + "locationInModule": { + "filename": "lib/submodule/param/index.ts", + "line": 2 + }, + "name": "value", + "type": { + "primitive": "string" + } + } + ] + }, + "jsii-calc.submodule.returnsparam.ReturnsSpecialParameter": { + "assembly": "jsii-calc", + "docs": { + "stability": "stable" + }, + "fqn": "jsii-calc.submodule.returnsparam.ReturnsSpecialParameter", + "initializer": { + "docs": { + "stability": "stable" + } + }, + "kind": "class", + "locationInModule": { + "filename": "lib/submodule/returns-param/index.ts", + "line": 3 + }, + "methods": [ + { + "docs": { + "stability": "stable" + }, + "locationInModule": { + "filename": "lib/submodule/returns-param/index.ts", + "line": 4 + }, + "name": "returnsSpecialParam", + "returns": { + "type": { + "fqn": "jsii-calc.submodule.param.SpecialParameter" + } + } + } + ], + "name": "ReturnsSpecialParameter", + "namespace": "submodule.returnsparam" } }, - "version": "0.0.0", - "fingerprint": "azqNkkl+/4FLzTVBLkOyHcokS4xLoYtHsri0z9kIehQ=" + "version": "3.20.120", + "fingerprint": "DELAKIDgUwCEVXhZflQBdllcDRnscledlYW0UXrjzbM=" } diff --git a/packages/jsii-calc/test/test.calc.ts b/packages/jsii-calc/test/test.calc.ts index 887c10f2e3..0558997897 100644 --- a/packages/jsii-calc/test/test.calc.ts +++ b/packages/jsii-calc/test/test.calc.ts @@ -1,7 +1,15 @@ import * as calcLib from '@scope/jsii-calc-lib'; import * as assert from 'assert'; -import { Add, Calculator, Multiply, Negate, Power, Sum } from '../lib'; -import { composition } from '../lib'; + +import { + Add, + Calculator, + Multiply, + Negate, + Power, + Sum, + composition, +} from '../lib'; // // * Constructors @@ -116,4 +124,4 @@ assert.equal(calc3.readUnionValue(), 9 * 3); // All primitive types // -console.log('ok'); +console.log('ok', __filename); diff --git a/packages/jsii-calc/test/test.transitive.ts b/packages/jsii-calc/test/test.transitive.ts new file mode 100644 index 0000000000..5718bbe327 --- /dev/null +++ b/packages/jsii-calc/test/test.transitive.ts @@ -0,0 +1,34 @@ +// this wee little test is intended to ensure that jsii-calc doesn't accidentally +// take a direct dependency on @scope/jsii-calc-base-of-base, which is intended +// to only be used as a transitive dependency through @scope/jsii-calc-base. + +import * as assert from 'assert'; +import { readFileSync } from 'fs'; +import { join } from 'path'; + +const pkgjsonPath = join(__dirname, '..', 'package.json'); +const pkgjson = JSON.parse(readFileSync(pkgjsonPath, 'utf-8')); + +// read the name of the transitive dependency module +// (@scope/jsii-calc-base-of-base) from it's package.json file, in order to +// create strong-coupling (if someone decides to change the name this will +// fail). +const transitiveDepName = JSON.parse( + readFileSync( + join( + __dirname, + '..', + '..', + '@scope', + 'jsii-calc-base-of-base', + 'package.json', + ), + 'utf-8', + ), +).name; + +const message = `Do not directly take a dependency on "${transitiveDepName}". It is meant to only be declared as a transitive dependency through @scope/jsii-calc-base. Sorry!`; +assert.ok(!(transitiveDepName in pkgjson.dependencies), message); +assert.ok(!(transitiveDepName in pkgjson.peerDependencies), message); + +console.log('ok', __filename); diff --git a/packages/jsii-config/bin/jsii-config.ts b/packages/jsii-config/bin/jsii-config.ts index 3f878c3c63..d51b9293eb 100644 --- a/packages/jsii-config/bin/jsii-config.ts +++ b/packages/jsii-config/bin/jsii-config.ts @@ -1,6 +1,7 @@ -import * as yargs from 'yargs'; -import { promisify } from 'util'; import { writeFile } from 'fs'; +import { promisify } from 'util'; +import * as yargs from 'yargs'; + import jsiiConfig from '../lib'; const writeFilePromise = promisify(writeFile); diff --git a/packages/jsii-config/jest.config.ts b/packages/jsii-config/jest.config.ts new file mode 100644 index 0000000000..e37577d92f --- /dev/null +++ b/packages/jsii-config/jest.config.ts @@ -0,0 +1,3 @@ +import config from '../../jest.config'; + +export default config; diff --git a/packages/jsii-config/lib/index.ts b/packages/jsii-config/lib/index.ts index 1cc484ba77..8ce194ff54 100644 --- a/packages/jsii-config/lib/index.ts +++ b/packages/jsii-config/lib/index.ts @@ -1,5 +1,5 @@ -import { readFilePromise } from './util'; import prompt from './prompt'; +import { readFilePromise } from './util'; import validatePackageJson from './validate'; export default async function jsiiConfig(packageJsonLocation: string) { diff --git a/packages/jsii-config/lib/prompt.ts b/packages/jsii-config/lib/prompt.ts index aeba87cb6e..fc85bd2750 100644 --- a/packages/jsii-config/lib/prompt.ts +++ b/packages/jsii-config/lib/prompt.ts @@ -1,5 +1,6 @@ -import * as inquirer from 'inquirer'; import { PackageJson } from '@jsii/spec'; +import * as inquirer from 'inquirer'; + import getQuestions from './questions'; import { BasePackageJson } from './schema'; import { getNestedValue, removeEmptyValues } from './util'; diff --git a/packages/jsii-config/lib/questions.ts b/packages/jsii-config/lib/questions.ts index 6114f762ed..744e1ef0b3 100644 --- a/packages/jsii-config/lib/questions.ts +++ b/packages/jsii-config/lib/questions.ts @@ -1,4 +1,5 @@ import { QuestionCollection } from 'inquirer'; + import schema, { ConfigPromptsSchema, BasePackageJson } from './schema'; import { getNestedValue, flattenKeys } from './util'; diff --git a/packages/jsii-config/lib/schema.ts b/packages/jsii-config/lib/schema.ts index 09ef915e8c..24d2a7bb8c 100644 --- a/packages/jsii-config/lib/schema.ts +++ b/packages/jsii-config/lib/schema.ts @@ -1,5 +1,5 @@ -import { Question, Separator } from 'inquirer'; import { Config, PackageJson, Stability } from '@jsii/spec'; +import { Question, Separator } from 'inquirer'; /* * Structure of package.json accepted by jsii-config diff --git a/packages/jsii-config/package.json b/packages/jsii-config/package.json index c8ff1945f9..a8e6227a51 100644 --- a/packages/jsii-config/package.json +++ b/packages/jsii-config/package.json @@ -20,44 +20,19 @@ }, "devDependencies": { "@types/inquirer": "^7.3.1", - "@types/jest": "^26.0.14", - "@types/jest-expect-message": "^1.0.2", - "@types/node": "^10.17.39", - "@types/yargs": "^15.0.7", - "eslint": "^7.11.0", - "jest": "^26.5.2", + "@types/jest": "^26.0.20", + "@types/jest-expect-message": "^1.0.3", + "@types/node": "^10.17.51", + "@types/yargs": "^16.0.0", + "eslint": "^7.19.0", + "jest": "^26.6.3", "jest-expect-message": "^1.0.2", - "prettier": "^2.1.2", - "typescript": "~3.9.7" + "prettier": "^2.2.1", + "typescript": "~3.9.9" }, "dependencies": { "@jsii/spec": "^0.0.0", "inquirer": "^7.3.3", - "yargs": "^16.0.3" - }, - "jest": { - "collectCoverage": true, - "collectCoverageFrom": [ - "**/bin/**/*.js", - "**/lib/**/*.js" - ], - "coverageReporters": [ - "lcov", - "text" - ], - "coverageThreshold": { - "global": { - "branches": 60, - "statements": 60 - } - }, - "errorOnDeprecated": true, - "setupFilesAfterEnv": [ - "jest-expect-message" - ], - "testEnvironment": "node", - "testMatch": [ - "**/?(*.)+(spec|test).js" - ] + "yargs": "^16.2.0" } } diff --git a/packages/jsii-config/test/index.test.ts b/packages/jsii-config/test/index.test.ts index 1981d44e6d..b5960b06d0 100644 --- a/packages/jsii-config/test/index.test.ts +++ b/packages/jsii-config/test/index.test.ts @@ -1,5 +1,6 @@ import * as fs from 'fs'; import * as inquirer from 'inquirer'; + import jsiiConfig from '../lib'; import { packageJsonObject, findQuestions, findQuestion } from './util'; diff --git a/packages/jsii-config/tsconfig.json b/packages/jsii-config/tsconfig.json index 45e54898d2..ed86c8f524 100644 --- a/packages/jsii-config/tsconfig.json +++ b/packages/jsii-config/tsconfig.json @@ -3,10 +3,8 @@ "include": [ "**/*.ts" ], - "exclude": [ - "test/negatives/*" - ], + "exclude": ["jest.config.ts"], "references": [ - { "path": "../@jsii/spec" } - ] + { "path": "../@jsii/spec" }, + ], } diff --git a/packages/jsii-diff/bin/jsii-diff.ts b/packages/jsii-diff/bin/jsii-diff.ts index 21bd176ed1..ac9eeebcda 100644 --- a/packages/jsii-diff/bin/jsii-diff.ts +++ b/packages/jsii-diff/bin/jsii-diff.ts @@ -1,8 +1,9 @@ +import * as spec from '@jsii/spec'; import * as fs from 'fs-extra'; import * as reflect from 'jsii-reflect'; -import * as spec from '@jsii/spec'; import * as log4js from 'log4js'; import * as yargs from 'yargs'; + import { compareAssemblies } from '../lib'; import { classifyDiagnostics, diff --git a/packages/jsii-diff/generate.sh b/packages/jsii-diff/generate.sh index c2c4a5a8ad..28171cc273 100644 --- a/packages/jsii-diff/generate.sh +++ b/packages/jsii-diff/generate.sh @@ -8,9 +8,11 @@ if [ -z "${commit}" ]; then commit="$(git rev-parse --verify HEAD)" fi +VERSION=$(node -p "require('./package.json').version.replace(/\\+[0-9a-f]+\$/, '')") + cat > lib/version.ts < { +export class ComparableClassType extends ComparableReferenceType { /** * Perform the reference type comparison and include class-specific checks */ @@ -467,9 +466,7 @@ export class ComparableClassType extends ComparableReferenceType< * * (Actually just plain reference type comparison) */ -export class ComparableInterfaceType extends ComparableReferenceType< - reflect.InterfaceType -> {} +export class ComparableInterfaceType extends ComparableReferenceType {} /** * Struct type comparison @@ -477,9 +474,7 @@ export class ComparableInterfaceType extends ComparableReferenceType< * Most notably: does no-strengthening/no-weakening checks based on whether * structs appear in input/output positions. */ -export class ComparableStructType extends ComparableType< - reflect.InterfaceType -> { +export class ComparableStructType extends ComparableType { public compare() { validateStabilities(this.oldType, this.newType, this.mismatches); validateBaseTypeAssignability(this.oldType, this.newType, this.mismatches); diff --git a/packages/jsii-diff/lib/types.ts b/packages/jsii-diff/lib/types.ts index bff79c8831..c855ae14fa 100644 --- a/packages/jsii-diff/lib/types.ts +++ b/packages/jsii-diff/lib/types.ts @@ -1,5 +1,5 @@ -import * as reflect from 'jsii-reflect'; import { Stability } from '@jsii/spec'; +import * as reflect from 'jsii-reflect'; export interface ComparisonOptions { /** diff --git a/packages/jsii-diff/lib/util.ts b/packages/jsii-diff/lib/util.ts index b8b58541df..a69468ee24 100644 --- a/packages/jsii-diff/lib/util.ts +++ b/packages/jsii-diff/lib/util.ts @@ -56,9 +56,10 @@ export async function downloadNpmPackage( throw new Error(`NPM fetch failed: ${e}. Please try again.`); } LOG.warn(`NPM package ${pkg} does not exist.`); - return { success: false, reason: 'no_such_package' } as NpmDownloadResult< - T - >; + return { + success: false, + reason: 'no_such_package', + } as NpmDownloadResult; } const pkgDir = trimVersionString(pkg); diff --git a/packages/jsii-diff/lib/validations.ts b/packages/jsii-diff/lib/validations.ts index af5526b7a5..5dcb6d6e64 100644 --- a/packages/jsii-diff/lib/validations.ts +++ b/packages/jsii-diff/lib/validations.ts @@ -1,5 +1,6 @@ import * as reflect from 'jsii-reflect'; import * as log4js from 'log4js'; + import { validateStabilities } from './stability'; import { Analysis, diff --git a/packages/jsii-diff/package.json b/packages/jsii-diff/package.json index 5cb7eb5fd1..bc103909ea 100644 --- a/packages/jsii-diff/package.json +++ b/packages/jsii-diff/package.json @@ -34,49 +34,24 @@ }, "dependencies": { "@jsii/spec": "^0.0.0", - "fs-extra": "^9.0.1", + "fs-extra": "^9.1.0", "jsii-reflect": "^0.0.0", "log4js": "^6.3.0", - "typescript": "~3.9.7", - "yargs": "^16.0.3" + "typescript": "~3.9.9", + "yargs": "^16.2.0" }, "devDependencies": { "@types/fs-extra": "^8.1.1", - "@types/jest": "^26.0.14", - "@types/jest-expect-message": "^1.0.2", - "@types/node": "^10.17.39", + "@types/jest": "^26.0.20", + "@types/jest-expect-message": "^1.0.3", + "@types/node": "^10.17.51", "@types/tar-fs": "^2.0.0", - "@types/yargs": "^15.0.7", - "eslint": "^7.11.0", - "jest": "^26.5.2", + "@types/yargs": "^16.0.0", + "eslint": "^7.19.0", + "jest": "^26.6.3", "jest-expect-message": "^1.0.2", "jsii": "^0.0.0", "jsii-build-tools": "^0.0.0", - "prettier": "^2.1.2" - }, - "jest": { - "collectCoverage": true, - "collectCoverageFrom": [ - "**/bin/**/*.js", - "**/lib/**/*.js" - ], - "coverageReporters": [ - "lcov", - "text" - ], - "coverageThreshold": { - "global": { - "branches": 60, - "statements": 60 - } - }, - "errorOnDeprecated": true, - "setupFilesAfterEnv": [ - "jest-expect-message" - ], - "testEnvironment": "node", - "testMatch": [ - "**/?(*.)+(spec|test).js" - ] + "prettier": "^2.2.1" } } diff --git a/packages/jsii-diff/test/util.ts b/packages/jsii-diff/test/util.ts index df979d627b..4391a5e8ea 100644 --- a/packages/jsii-diff/test/util.ts +++ b/packages/jsii-diff/test/util.ts @@ -1,5 +1,6 @@ import { sourceToAssemblyHelper } from 'jsii'; import * as reflect from 'jsii-reflect'; + import { compareAssemblies } from '../lib'; import { Mismatches } from '../lib/types'; diff --git a/packages/jsii-diff/tsconfig.json b/packages/jsii-diff/tsconfig.json index a567b2f477..b05b3faab3 100644 --- a/packages/jsii-diff/tsconfig.json +++ b/packages/jsii-diff/tsconfig.json @@ -3,7 +3,8 @@ "include": [ "**/*.ts" ], + "exclude": ["jest.config.ts"], "references": [ - { "path": "../jsii-reflect" } - ] + { "path": "../jsii-reflect" }, + ], } diff --git a/packages/jsii-pacmak/.npmignore b/packages/jsii-pacmak/.npmignore index 52d2cee2f7..10f283b14f 100644 --- a/packages/jsii-pacmak/.npmignore +++ b/packages/jsii-pacmak/.npmignore @@ -8,3 +8,4 @@ coverage .eslintrc.* tsconfig.json *.tsbuildinfo +test diff --git a/packages/jsii-pacmak/README.md b/packages/jsii-pacmak/README.md index 42c841c2d5..dd6c7996ed 100644 --- a/packages/jsii-pacmak/README.md +++ b/packages/jsii-pacmak/README.md @@ -10,12 +10,12 @@ the [jsii] project. In general, running `jsii-pacmak` from a well-configured jsii module would generate and build a ready-to-publish package in each of the target languages defined in `package.json`. -* See [Getting Started](https://github.com/aws/jsii/blob/master/README.md#getting-started) for more details. +* See [Getting Started](https://github.com/aws/jsii/blob/main/README.md#getting-started) for more details. * Run `jsii-pacmak --help` for full usage. ## Contributing -See [CONTRIBUTING](https://github.com/aws/jsii/blob/master/CONTRIBUTING.md) +See [CONTRIBUTING](https://github.com/aws/jsii/blob/main/CONTRIBUTING.md) for details. ## License diff --git a/packages/jsii-pacmak/bin/jsii-pacmak.ts b/packages/jsii-pacmak/bin/jsii-pacmak.ts index ed6fb9744b..04dfb592f4 100644 --- a/packages/jsii-pacmak/bin/jsii-pacmak.ts +++ b/packages/jsii-pacmak/bin/jsii-pacmak.ts @@ -1,26 +1,31 @@ #!/usr/bin/env node -import * as path from 'path'; -import * as process from 'process'; import * as yargs from 'yargs'; -import { Rosetta } from 'jsii-rosetta'; -import * as logging from '../lib/logging'; -import { Timers } from '../lib/timer'; + +import { pacmak, configureLogging, TargetName } from '../lib'; +import { debug } from '../lib/logging'; import { VERSION_DESC } from '../lib/version'; -import { findJsiiModules, updateAllNpmIgnores } from '../lib/npm-modules'; -import { JsiiModule } from '../lib/packaging'; -import { ALL_BUILDERS, TargetName } from '../lib/targets'; (async function main() { const argv = yargs - .usage('Usage: jsii-pacmak [-t target,...] [-o outdir] [package-dir]') .env('JSII_PACMAK') + .command( + ['$0 [PROJECTS...]', 'generate [PROJECTS...]'], + 'Generates jsii bindings for the selected project(s)', + (argv) => + argv.positional('PROJECTS', { + type: 'string', + desc: 'Project(s) to generate', + normalize: true, + default: ['.'], + }), + ) .option('targets', { alias: ['target', 't'], type: 'array', desc: 'target languages for which to generate bindings', defaultDescription: 'all targets defined in `package.json` will be generated', - choices: Object.keys(ALL_BUILDERS), + choices: Object.values(TargetName), required: false, }) .option('outdir', { @@ -113,198 +118,29 @@ import { ALL_BUILDERS, TargetName } from '../lib/targets'; .version(VERSION_DESC) .strict().argv; - logging.configure({ level: argv.verbose !== undefined ? argv.verbose : 0 }); + configureLogging({ level: argv.verbose !== undefined ? argv.verbose : 0 }); // Default to 4 threads in case of concurrency, good enough for most situations - logging.debug('command line arguments:', argv); - - const timers = new Timers(); - - const rosetta = new Rosetta({ - liveConversion: argv['rosetta-translate-live'], - }); - if (argv['rosetta-tablet']) { - await rosetta.loadTabletFromFile(argv['rosetta-tablet']); - } - - const modulesToPackage = await findJsiiModules(argv._, argv.recurse); - logging.info(`Found ${modulesToPackage.length} modules to package`); - if (modulesToPackage.length === 0) { - logging.warn('Nothing to do'); - return; - } - - if (argv.outdir) { - for (const module of modulesToPackage) { - module.outputDirectory = path.resolve(argv.outdir); - } - } else if (argv.npmignore) { - // if outdir is coming from package.json, verify it is excluded by .npmignore. if it is explicitly - // defined via --out, don't perform this verification. - await updateAllNpmIgnores(modulesToPackage); - } - - await timers.recordAsync('npm pack', () => { - logging.info('Packaging NPM bundles'); - return Promise.all(modulesToPackage.map((m) => m.npmPack())); - }); - - await timers.recordAsync('load jsii', () => { - logging.info('Loading jsii assemblies and translations'); - return Promise.all( - modulesToPackage.map(async (m) => { - await m.load(); - await rosetta.addAssembly(m.assembly.spec, m.moduleDirectory); - }), - ); + debug('command line arguments:', argv); + + return pacmak({ + argv, + clean: argv.clean, + codeOnly: argv['code-only'], + fingerprint: argv.fingerprint, + force: argv.force, + forceSubdirectory: argv['force-subdirectory'], + forceTarget: argv['force-target'], + inputDirectories: argv.PROJECTS, + outputDirectory: argv.outdir, + parallel: argv.parallel, + recurse: argv.recurse, + rosettaLiveConversion: argv['rosetta-translate-live'], + rosettaTablet: argv['rosetta-tablet'], + targets: argv.targets?.map((target) => target as TargetName), + updateNpmIgnoreFiles: argv.npmignore, }); - - try { - const requestedTargets = argv.targets?.map((t) => `${t}`); - const targetSets = sliceTargets( - modulesToPackage, - requestedTargets, - argv['force-target'], - ); - - if (targetSets.every((s) => s.modules.length === 0)) { - throw new Error( - `None of the requested packages had any targets to build for '${requestedTargets?.join( - ', ', - )}' (use --force-target to force)`, - ); - } - - const perLanguageDirectory = - targetSets.length > 1 || argv['force-subdirectory']; - - // We run all target sets in parallel for minimal wall clock time - await Promise.all( - mapParallelOrSerial( - targetSets, - async (targetSet) => { - logging.info( - `Packaging '${targetSet.targetType}' for ${describePackages( - targetSet, - )}`, - ); - await timers.recordAsync(targetSet.targetType, () => - buildTargetsForLanguage( - targetSet.targetType, - targetSet.modules, - perLanguageDirectory, - ), - ); - logging.info(`${targetSet.targetType} finished`); - }, - { parallel: argv.parallel }, - ), - ); - } finally { - if (argv.clean) { - logging.debug('Cleaning up'); - await timers.recordAsync('cleanup', () => - Promise.all(modulesToPackage.map((m) => m.cleanup())), - ); - } else { - logging.debug('Temporary directories retained (--no-clean)'); - } - } - - logging.info(`Packaged. ${timers.display()}`); - - async function buildTargetsForLanguage( - targetLanguage: string, - modules: JsiiModule[], - perLanguageDirectory: boolean, - ) { - // ``argv.target`` is guaranteed valid by ``yargs`` through the ``choices`` directive. - const factory = ALL_BUILDERS[targetLanguage as TargetName]; - if (!factory) { - throw new Error(`Unsupported target: '${targetLanguage}'`); - } - - await factory(modules, { - clean: argv.clean, - codeOnly: argv['code-only'], - rosetta, - force: argv.force, - fingerprint: argv.fingerprint, - arguments: argv, - languageSubdirectory: perLanguageDirectory, - }).buildModules(); - } })().catch((err) => { process.stderr.write(`${err.stack}\n`); process.exit(1); }); - -/** - * A set of packages (targets) translated into the same language - */ -interface TargetSet { - targetType: string; - modules: JsiiModule[]; -} - -function sliceTargets( - modules: JsiiModule[], - requestedTargets: string[] | undefined, - force: boolean, -) { - if (requestedTargets === undefined) { - requestedTargets = allAvailableTargets(modules); - } - - const ret = new Array(); - for (const target of requestedTargets) { - ret.push({ - targetType: target, - modules: modules.filter( - (m) => force || m.availableTargets.includes(target), - ), - }); - } - - return ret; -} - -function allAvailableTargets(modules: JsiiModule[]) { - const ret = new Set(); - for (const module of modules) { - for (const target of module.availableTargets) { - ret.add(target); - } - } - return Array.from(ret); -} - -function describePackages(target: TargetSet) { - if (target.modules.length > 0 && target.modules.length < 5) { - return target.modules.map((m) => m.name).join(', '); - } - return `${target.modules.length} modules`; -} - -function mapParallelOrSerial( - collection: readonly T[], - mapper: (item: T) => Promise, - { parallel }: { parallel: boolean }, -): Array> { - const result = new Array>(); - for (const item of collection) { - result.push( - result.length === 0 || parallel - ? // Running parallel, or first element - mapper(item) - : // Wait for the previous promise, then make the next one - result[result.length - 1].then( - () => mapper(item), - (error) => { - throw error; - }, - ), - ); - } - return result; -} diff --git a/packages/jsii-pacmak/generate.sh b/packages/jsii-pacmak/generate.sh index 875953b5d1..2308b82b1b 100644 --- a/packages/jsii-pacmak/generate.sh +++ b/packages/jsii-pacmak/generate.sh @@ -6,12 +6,17 @@ commit=${CODEBUILD_RESOLVED_SOURCE_VERSION:-} # use the HEAD commit hash if [ -z "${commit}" ]; then commit="$(git rev-parse --verify HEAD)" + suffix="@dev" fi +VERSION=$(node -p "require('./package.json').version.replace(/\\+[0-9a-f]+\$/, '')") + cat > lib/version.ts </test'], +}); diff --git a/packages/jsii-pacmak/lib/builder.ts b/packages/jsii-pacmak/lib/builder.ts index 7c6f353286..d362451d1b 100644 --- a/packages/jsii-pacmak/lib/builder.ts +++ b/packages/jsii-pacmak/lib/builder.ts @@ -1,9 +1,11 @@ +import { Rosetta } from 'jsii-rosetta'; import * as path from 'path'; + import * as logging from './logging'; import { JsiiModule } from './packaging'; import { TargetConstructor, Target } from './target'; +import { TargetName } from './targets'; import { Scratch } from './util'; -import { Rosetta } from 'jsii-rosetta'; export interface BuildOptions { /** @@ -21,7 +23,7 @@ export interface BuildOptions { /** * Arguments provided by the user (how they are used is target-dependent) */ - arguments: { [name: string]: any }; + arguments: { readonly [name: string]: any }; /** * Only generate code, don't build @@ -58,9 +60,9 @@ export interface TargetBuilder { */ export class OneByOneBuilder implements TargetBuilder { public constructor( - private readonly targetName: string, + private readonly targetName: TargetName, private readonly targetConstructor: TargetConstructor, - private readonly modules: JsiiModule[], + private readonly modules: readonly JsiiModule[], private readonly options: BuildOptions, ) {} diff --git a/packages/jsii-pacmak/lib/generator.ts b/packages/jsii-pacmak/lib/generator.ts index 55cbf1c304..1f29d7e384 100644 --- a/packages/jsii-pacmak/lib/generator.ts +++ b/packages/jsii-pacmak/lib/generator.ts @@ -1,10 +1,11 @@ +import * as spec from '@jsii/spec'; import * as clone from 'clone'; import { CodeMaker } from 'codemaker'; import * as crypto from 'crypto'; import * as fs from 'fs-extra'; import * as reflect from 'jsii-reflect'; -import * as spec from '@jsii/spec'; import * as path from 'path'; + import { VERSION_DESC } from './version'; /** diff --git a/packages/jsii-pacmak/lib/index.ts b/packages/jsii-pacmak/lib/index.ts index c86af746eb..49a1eaa485 100644 --- a/packages/jsii-pacmak/lib/index.ts +++ b/packages/jsii-pacmak/lib/index.ts @@ -1 +1,355 @@ -export { Target } from './target'; +import { TypeSystem } from 'jsii-reflect'; +import { Rosetta } from 'jsii-rosetta'; + +import * as logging from './logging'; +import { findJsiiModules, updateAllNpmIgnores } from './npm-modules'; +import { JsiiModule } from './packaging'; +import { ALL_BUILDERS, TargetName } from './targets'; +import { Timers } from './timer'; + +//#region Exported APIs + +export { TargetName }; +export { configure as configureLogging } from './logging'; + +/** + * Generates code in the desired targets. + */ +export async function pacmak({ + argv = {}, + clean = true, + codeOnly = false, + fingerprint = true, + force = false, + forceSubdirectory = true, + forceTarget = false, + inputDirectories, + outputDirectory, + parallel = true, + recurse = false, + rosettaLiveConversion, + rosettaTablet, + targets = Object.values(TargetName), + timers = new Timers(), + updateNpmIgnoreFiles = false, +}: PacmakOptions): Promise { + const rosetta = new Rosetta({ liveConversion: rosettaLiveConversion }); + if (rosettaTablet) { + await rosetta.loadTabletFromFile(rosettaTablet); + } + + const modulesToPackage = await findJsiiModules(inputDirectories, recurse); + logging.info(`Found ${modulesToPackage.length} modules to package`); + if (modulesToPackage.length === 0) { + logging.warn('Nothing to do'); + return; + } + + if (outputDirectory) { + for (const mod of modulesToPackage) { + mod.outputDirectory = outputDirectory; + } + } else if (updateNpmIgnoreFiles) { + // if outdir is coming from package.json, verify it is excluded by .npmignore. if it is explicitly + // defined via --out, don't perform this verification. + await updateAllNpmIgnores(modulesToPackage); + } + + await timers.recordAsync('npm pack', () => { + logging.info('Packaging NPM bundles'); + return Promise.all(modulesToPackage.map((m) => m.npmPack())); + }); + + await timers.recordAsync('load jsii', () => { + logging.info('Loading jsii assemblies and translations'); + const system = new TypeSystem(); + return Promise.all( + modulesToPackage.map(async (m) => { + await m.load(system); + return rosetta.addAssembly(m.assembly.spec, m.moduleDirectory); + }), + ); + }); + + try { + const targetSets = sliceTargets(modulesToPackage, targets, forceTarget); + if (targetSets.every((s) => s.modules.length === 0)) { + throw new Error( + `None of the requested packages had any targets to build for '${targets.join( + ', ', + )}' (use --force-target to force)`, + ); + } + + const perLanguageDirectory = targetSets.length > 1 || forceSubdirectory; + + // We run all target sets in parallel for minimal wall clock time + await Promise.all( + mapParallelOrSerial( + targetSets, + async (targetSet) => { + logging.info( + `Packaging '${targetSet.targetType}' for ${describePackages( + targetSet, + )}`, + ); + return timers + .recordAsync(targetSet.targetType, () => + buildTargetsForLanguage(targetSet.targetType, targetSet.modules, { + argv, + clean, + codeOnly, + fingerprint, + force, + perLanguageDirectory, + rosetta, + }), + ) + .then(() => logging.info(`${targetSet.targetType} finished`)); + }, + { parallel }, + ), + ); + } finally { + if (clean) { + logging.debug('Cleaning up'); + await timers.recordAsync('cleanup', () => + Promise.all(modulesToPackage.map((m) => m.cleanup())), + ); + } else { + logging.debug('Temporary directories retained (--no-clean)'); + } + } + + logging.info(`Packaged. ${timers.display()}`); +} + +/** + * Options provided to the `pacmak` function. + */ +export interface PacmakOptions { + /** + * All command-line arguments that were provided. This includes target-specific parameters, the + * handling of which is up to the code generators. + * + * @default {} + */ + readonly argv?: { readonly [name: string]: any }; + + /** + * Whether to clean up temporary directories upon completion. + * + * @default true + */ + readonly clean?: boolean; + + /** + * Whether to generate source code only (as opposed to built packages). + * + * @default false + */ + readonly codeOnly?: boolean; + + /** + * Whether to opportunistically include a fingerprint in generated code, to avoid re-generating + * code if the source assembly has not changed. + * + * @default true + */ + readonly fingerprint?: boolean; + + /** + * Whether to always re-generate code, even if the fingerprint has not changed. + * + * @default false + */ + readonly force?: boolean; + + /** + * Always emit code in a per-language subdirectory, even if there is only one target language. + * + * @default true + */ + readonly forceSubdirectory?: boolean; + + /** + * Always try to generate code for the selected targets, even if those are not configured. Use this option at your own + * risk, as there are significant chances code generators cannot operate without any configuration. + * + * @default false + */ + readonly forceTarget?: boolean; + + /** + * The list of directories to be considered for input assemblies. + */ + readonly inputDirectories: readonly string[]; + + /** + * The directory in which to output generated packages or code (if `codeOnly` is `true`). + * + * @default - Configured in `package.json` + */ + readonly outputDirectory?: string; + + /** + * Whether to parallelize code generation. Turning this to `false` can be beneficial in certain resource-constrained + * environments, such as free CI/CD offerings, as it reduces the pressure on IO. + * + * @default true + */ + readonly parallel?: boolean; + + /** + * Whether to recursively generate for the selected packages' dependencies. + * + * @default false + */ + readonly recurse?: boolean; + + /** + * Whether `jsii-rosetta` conversion should be performed in-band for examples found in documentation which are not + * already translated in the `rosettaTablet` file. + * + * @default false + */ + readonly rosettaLiveConversion?: boolean; + + /** + * A Rosetta tablet file where translations for code examples can be found. + * + * @default undefined + */ + readonly rosettaTablet?: string; + + /** + * The list of targets for which code should be generated. Unless `forceTarget` is `true`, a given target will only + * be generated for assemblies that have configured it. + * + * @default Object.values(TargetName) + */ + readonly targets?: readonly TargetName[]; + + /** + * A `Timers` object, if you are interested in including the rosetta run in a larger set of timed operations. + */ + readonly timers?: Timers; + + /** + * Whether to update .npmignore files if `outputDirectory` comes from the `package.json` files. + * + * @default false + */ + readonly updateNpmIgnoreFiles?: boolean; +} + +//#endregion + +//#region Building + +async function buildTargetsForLanguage( + targetLanguage: string, + modules: readonly JsiiModule[], + { + argv, + clean, + codeOnly, + fingerprint, + force, + perLanguageDirectory, + rosetta, + }: { + argv: { readonly [name: string]: any }; + clean: boolean; + codeOnly: boolean; + fingerprint: boolean; + force: boolean; + perLanguageDirectory: boolean; + rosetta: Rosetta; + }, +): Promise { + // ``argv.target`` is guaranteed valid by ``yargs`` through the ``choices`` directive. + const factory = ALL_BUILDERS[targetLanguage as TargetName]; + if (!factory) { + throw new Error(`Unsupported target: '${targetLanguage}'`); + } + + return factory(modules, { + clean: clean, + codeOnly: codeOnly, + rosetta, + force: force, + fingerprint: fingerprint, + arguments: argv, + languageSubdirectory: perLanguageDirectory, + }).buildModules(); +} + +//#endregion + +//#region Target Slicing + +/** + * A set of packages (targets) translated into the same language + */ +interface TargetSet { + targetType: string; + modules: readonly JsiiModule[]; +} + +function sliceTargets( + modules: readonly JsiiModule[], + requestedTargets: readonly TargetName[], + force: boolean, +): readonly TargetSet[] { + const ret = new Array(); + for (const target of requestedTargets) { + ret.push({ + targetType: target, + modules: modules.filter( + (m) => force || m.availableTargets.includes(target), + ), + }); + } + return ret; +} + +//#endregion + +//#region Parallelization + +function mapParallelOrSerial( + collection: readonly T[], + mapper: (item: T) => Promise, + { parallel }: { parallel: boolean }, +): Array> { + const result = new Array>(); + for (const item of collection) { + result.push( + result.length === 0 || parallel + ? // Running parallel, or first element + mapper(item) + : // Wait for the previous promise, then make the next one + result[result.length - 1].then( + () => mapper(item), + (error) => { + throw error; + }, + ), + ); + } + return result; +} + +//#endregion + +//#region Misc. Utilities + +function describePackages(target: TargetSet) { + if (target.modules.length > 0 && target.modules.length < 5) { + return target.modules.map((m) => m.name).join(', '); + } + return `${target.modules.length} modules`; +} + +//#endregion diff --git a/packages/jsii-pacmak/lib/markdown.ts b/packages/jsii-pacmak/lib/markdown.ts index b01f5f1b14..0d045807da 100644 --- a/packages/jsii-pacmak/lib/markdown.ts +++ b/packages/jsii-pacmak/lib/markdown.ts @@ -20,7 +20,7 @@ export function md2rst(text: string) { } function textOf(node: commonmark.Node) { - return node.literal ?? ''; + return node.literal?.replace(/\\/g, '\\\\') ?? ''; } pump(ast, { diff --git a/packages/jsii-pacmak/lib/npm-modules.ts b/packages/jsii-pacmak/lib/npm-modules.ts index cb86926ade..3de202190d 100644 --- a/packages/jsii-pacmak/lib/npm-modules.ts +++ b/packages/jsii-pacmak/lib/npm-modules.ts @@ -1,11 +1,11 @@ +import * as spec from '@jsii/spec'; import * as fs from 'fs-extra'; import * as path from 'path'; -import * as spec from '@jsii/spec'; -import { resolveDependencyDirectory } from './util'; import * as logging from '../lib/logging'; import { JsiiModule } from './packaging'; import { topologicalSort } from './toposort'; +import { resolveDependencyDirectory } from './util'; /** * Find all modules that need to be packagerd @@ -15,7 +15,7 @@ import { topologicalSort } from './toposort'; * The result is topologically sorted. */ export async function findJsiiModules( - directories: string[], + directories: readonly string[], recurse: boolean, ): Promise { const ret: JsiiModule[] = []; diff --git a/packages/jsii-pacmak/lib/packaging.ts b/packages/jsii-pacmak/lib/packaging.ts index 1697049177..162ba2c03c 100644 --- a/packages/jsii-pacmak/lib/packaging.ts +++ b/packages/jsii-pacmak/lib/packaging.ts @@ -1,10 +1,9 @@ -import { Scratch, shell } from './util'; -import * as logging from '../lib/logging'; -import * as reflect from 'jsii-reflect'; +import type { Assembly, TypeSystem } from 'jsii-reflect'; import * as os from 'os'; import * as path from 'path'; -const SHARED_TS = new reflect.TypeSystem(); +import * as logging from '../lib/logging'; +import { Scratch, shell } from './util'; export interface JsiiModuleOptions { /** @@ -40,7 +39,7 @@ export class JsiiModule { public outputDirectory: string; private _tarball?: Scratch; - public _assembly?: reflect.Assembly; + public _assembly?: Assembly; public constructor(options: JsiiModuleOptions) { this.name = options.name; @@ -86,11 +85,13 @@ export class JsiiModule { return this._tarball.object; } - public async load() { - this._assembly = await SHARED_TS.loadModule(this.moduleDirectory); + public async load(system: TypeSystem) { + return system + .loadModule(this.moduleDirectory) + .then((assembly) => (this._assembly = assembly)); } - public get assembly(): reflect.Assembly { + public get assembly(): Assembly { if (!this._assembly) { throw new Error('Assembly not available yet, call load() first'); } diff --git a/packages/jsii-pacmak/lib/target.ts b/packages/jsii-pacmak/lib/target.ts index 8130b91bc0..c9b225a09c 100644 --- a/packages/jsii-pacmak/lib/target.ts +++ b/packages/jsii-pacmak/lib/target.ts @@ -1,12 +1,12 @@ +import * as spec from '@jsii/spec'; import * as fs from 'fs-extra'; import * as reflect from 'jsii-reflect'; -import * as spec from '@jsii/spec'; +import { Rosetta } from 'jsii-rosetta'; import * as path from 'path'; import { traverseDependencyGraph } from './dependency-graph'; import { IGenerator } from './generator'; import * as logging from './logging'; -import { Rosetta } from 'jsii-rosetta'; export abstract class Target { protected readonly packageDir: string; diff --git a/packages/jsii-pacmak/lib/targets/dotnet.ts b/packages/jsii-pacmak/lib/targets/dotnet.ts index 45b022fbc9..86155707f2 100644 --- a/packages/jsii-pacmak/lib/targets/dotnet.ts +++ b/packages/jsii-pacmak/lib/targets/dotnet.ts @@ -1,8 +1,11 @@ -import * as fs from 'fs-extra'; import * as spec from '@jsii/spec'; +import * as fs from 'fs-extra'; import * as path from 'path'; -import * as logging from '../logging'; import * as xmlbuilder from 'xmlbuilder'; + +import { TargetBuilder, BuildOptions } from '../builder'; +import * as logging from '../logging'; +import { JsiiModule } from '../packaging'; import { PackageInfo, Target, @@ -11,8 +14,9 @@ import { } from '../target'; import { shell, Scratch, setExtend, filterAsync } from '../util'; import { DotNetGenerator } from './dotnet/dotnetgenerator'; -import { TargetBuilder, BuildOptions } from '../builder'; -import { JsiiModule } from '../packaging'; +import { toReleaseVersion } from './version-utils'; + +import { TargetName } from '.'; export const TARGET_FRAMEWORK = 'netcoreapp3.1'; @@ -23,7 +27,7 @@ export class DotnetBuilder implements TargetBuilder { private readonly targetName = 'dotnet'; public constructor( - private readonly modules: JsiiModule[], + private readonly modules: readonly JsiiModule[], private readonly options: BuildOptions, ) {} @@ -77,7 +81,7 @@ export class DotnetBuilder implements TargetBuilder { } private async generateAggregateSourceDir( - modules: JsiiModule[], + modules: readonly JsiiModule[], ): Promise> { return Scratch.make(async (tmpDir: string) => { logging.debug(`Generating aggregate .NET source dir at ${tmpDir}`); @@ -274,7 +278,7 @@ export default class Dotnet extends Target { assm: spec.Assembly, ): { [language: string]: PackageInfo } { const packageId = assm.targets!.dotnet!.packageId; - const version = assm.version; + const version = toReleaseVersion(assm.version, TargetName.DOTNET); const packageInfo: PackageInfo = { repository: 'Nuget', url: `https://www.nuget.org/packages/${packageId}/${version}`, diff --git a/packages/jsii-pacmak/lib/targets/dotnet/dotnetdocgenerator.ts b/packages/jsii-pacmak/lib/targets/dotnet/dotnetdocgenerator.ts index 5955a95551..8b7f7b9269 100644 --- a/packages/jsii-pacmak/lib/targets/dotnet/dotnetdocgenerator.ts +++ b/packages/jsii-pacmak/lib/targets/dotnet/dotnetdocgenerator.ts @@ -1,18 +1,20 @@ -import { CodeMaker } from 'codemaker'; import * as spec from '@jsii/spec'; -import * as xmlbuilder from 'xmlbuilder'; -import { DotNetNameUtils } from './nameutils'; +import { CodeMaker } from 'codemaker'; import { Rosetta, Translation, + enforcesStrictMode, typeScriptSnippetFromSource, markDownToXmlDoc, } from 'jsii-rosetta'; +import * as xmlbuilder from 'xmlbuilder'; + import { INCOMPLETE_DISCLAIMER_COMPILING, INCOMPLETE_DISCLAIMER_NONCOMPILING, } from '..'; import { renderSummary } from '../_utils'; +import { DotNetNameUtils } from './nameutils'; /** * Generates the Jsii attributes and calls for the .NET runtime @@ -23,7 +25,11 @@ export class DotNetDocGenerator { private readonly code: CodeMaker; private readonly nameutils: DotNetNameUtils = new DotNetNameUtils(); - public constructor(code: CodeMaker, private readonly rosetta: Rosetta) { + public constructor( + code: CodeMaker, + private readonly rosetta: Rosetta, + private readonly assembly: spec.Assembly, + ) { this.code = code; } @@ -51,7 +57,7 @@ export class DotNetDocGenerator { const paramName = this.nameutils .convertParameterName(param.name) .replace(/^@/, ''); - this.emitXmlDoc('param', param.docs?.summary || '', { + this.emitXmlDoc('param', param.docs?.summary ?? '', { attributes: { name: paramName }, }); }); @@ -131,7 +137,7 @@ export class DotNetDocGenerator { if (docs.subclassable) { emitDocAttribute('subclassable', ''); } - for (const [k, v] of Object.entries(docs.custom || {})) { + for (const [k, v] of Object.entries(docs.custom ?? {})) { const extraSpace = k === 'link' ? ' ' : ''; // Extra space for '@link' to keep unit tests happy emitDocAttribute(k, v + extraSpace); } @@ -155,7 +161,11 @@ export class DotNetDocGenerator { } private convertExample(example: string): string { - const snippet = typeScriptSnippetFromSource(example, 'example'); + const snippet = typeScriptSnippetFromSource( + example, + 'example', + enforcesStrictMode(this.assembly), + ); const translated = this.rosetta.translateSnippet(snippet, 'csharp'); if (!translated) { return example; @@ -167,6 +177,7 @@ export class DotNetDocGenerator { return this.rosetta.translateSnippetsInMarkdown( markdown, 'csharp', + enforcesStrictMode(this.assembly), (trans) => ({ language: trans.language, source: this.prefixDisclaimer(trans), diff --git a/packages/jsii-pacmak/lib/targets/dotnet/dotnetgenerator.ts b/packages/jsii-pacmak/lib/targets/dotnet/dotnetgenerator.ts index 4e3dd213d1..9524d5ec03 100644 --- a/packages/jsii-pacmak/lib/targets/dotnet/dotnetgenerator.ts +++ b/packages/jsii-pacmak/lib/targets/dotnet/dotnetgenerator.ts @@ -1,9 +1,10 @@ +import * as spec from '@jsii/spec'; import * as clone from 'clone'; import * as fs from 'fs-extra'; import * as reflect from 'jsii-reflect'; -import * as spec from '@jsii/spec'; import { Rosetta } from 'jsii-rosetta'; import * as path from 'path'; + import { Generator } from '../../generator'; import { DotNetDocGenerator } from './dotnetdocgenerator'; import { DotNetRuntimeGenerator } from './dotnetruntimegenerator'; @@ -15,9 +16,6 @@ import { DotNetNameUtils } from './nameutils'; * CODE GENERATOR V2 */ export class DotNetGenerator extends Generator { - // The path of the original jsii input model. - private jsiiFilePath!: string; - // Flags that tracks if we have already wrote the first member of the class private firstMemberWritten = false; @@ -47,7 +45,6 @@ export class DotNetGenerator extends Generator { assembly: reflect.Assembly, ): Promise { await super.load(packageRoot, assembly); - this.jsiiFilePath = path.join(packageRoot, spec.SPEC_FILE_NAME); } /** @@ -65,7 +62,11 @@ export class DotNetGenerator extends Generator { this.code, this.typeresolver, ); - this.dotnetDocGenerator = new DotNetDocGenerator(this.code, this.rosetta); + this.dotnetDocGenerator = new DotNetDocGenerator( + this.code, + this.rosetta, + this.assembly, + ); this.emitNamespaceDocs(); @@ -100,12 +101,6 @@ export class DotNetGenerator extends Generator { // Create an anchor file for the current model this.generateDependencyAnchorFile(); - // Copying the .jsii file - await fs.copyFile( - this.jsiiFilePath, - path.join(outdir, packageId, spec.SPEC_FILE_NAME), - ); - // Saving the generated code. return this.code.save(outdir); } @@ -168,14 +163,14 @@ export class DotNetGenerator extends Generator { } protected onEndInterface(ifc: spec.InterfaceType) { + // emit interface proxy class + this.emitInterfaceProxy(ifc); + const interfaceName = this.nameutils.convertInterfaceName(ifc); this.code.closeBlock(); const namespace = this.namespaceFor(this.assembly, ifc); this.closeFileIfNeeded(interfaceName, namespace, this.isNested(ifc)); - // emit interface proxy class - this.emitInterfaceProxy(ifc); - // emit implementation class // TODO: If datatype then we may not need the interface proxy to be created, We could do with just the interface impl? if (ifc.datatype) { @@ -366,14 +361,14 @@ export class DotNetGenerator extends Generator { } protected onEndClass(cls: spec.ClassType) { + if (cls.abstract) { + this.emitInterfaceProxy(cls); + } + this.code.closeBlock(); const className = this.nameutils.convertClassName(cls); const namespace = this.namespaceFor(this.assembly, cls); this.closeFileIfNeeded(className, namespace, this.isNested(cls)); - - if (cls.abstract) { - this.emitInterfaceProxy(cls); - } } protected onField( @@ -481,33 +476,34 @@ export class DotNetGenerator extends Generator { const returnType = method.returns ? this.typeresolver.toDotNetType(method.returns.type) : 'void'; - let staticKeyWord = ''; + const staticKeyWord = method.static ? 'static ' : ''; let overrideKeyWord = ''; let virtualKeyWord = ''; let definedOnAncestor = false; // In the case of the source being a class, we check if it is already defined on an ancestor - if (cls.kind === spec.TypeKind.Class) { + if (spec.isClassType(cls)) { definedOnAncestor = this.isMemberDefinedOnAncestor(cls, method); } // The method is an override if it's defined on the ancestor, or if the parent is a class and we are generating a proxy or datatype class let overrides = - definedOnAncestor || - (cls.kind === spec.TypeKind.Class && emitForProxyOrDatatype); + definedOnAncestor || (spec.isClassType(cls) && emitForProxyOrDatatype); // We also inspect the jsii model to see if it overrides a class member. if (method.overrides) { const overrideType = this.findType(method.overrides); - if (overrideType.kind === spec.TypeKind.Class) { + if (spec.isClassType(overrideType)) { // Overrides a class, needs overrides keyword overrides = true; } } - if (method.static) { - staticKeyWord = 'static '; - } else if (overrides) { - // Add the override key word if the method is emitted for a proxy or data type or is defined on an ancestor - overrideKeyWord = 'override '; + if (overrides) { + // Add the override key word if the method is emitted for a proxy or data type or is defined on an ancestor. If + // the member is static, use the "new" keyword instead, to indicate we are intentionally hiding the ancestor + // declaration (as C# does not inherit statics, they can be hidden but not overridden). The "new" keyword is + // optional in this context, but helps clarify intention. + overrideKeyWord = method.static ? 'new ' : 'override '; } else if ( + !method.static && (method.abstract || !definedOnAncestor) && !emitForProxyOrDatatype ) { @@ -515,8 +511,10 @@ export class DotNetGenerator extends Generator { // Methods should always be virtual when possible virtualKeyWord = 'virtual '; } + const access = this.renderAccessLevel(method); const methodName = this.nameutils.convertMethodName(method.name); + const isOptional = method.returns && method.returns.optional ? '?' : ''; const signature = `${returnType}${isOptional} ${methodName}(${this.renderMethodParameters( method, @@ -641,20 +639,24 @@ export class DotNetGenerator extends Generator { * Emits an interface proxy for an interface or an abstract class. */ private emitInterfaceProxy(ifc: spec.InterfaceType | spec.ClassType): void { - // No need to slugify for a proxy - const name = `${this.nameutils.convertTypeName(ifc.name)}Proxy`; + const name = '_Proxy'; const namespace = this.namespaceFor(this.assembly, ifc); - const isNested = this.isNested(ifc); + const isNested = true; this.openFileIfNeeded(name, namespace, isNested); + this.code.line(); this.dotnetDocGenerator.emitDocs(ifc); this.dotnetRuntimeGenerator.emitAttributesForInterfaceProxy(ifc); + const interfaceFqn = this.typeresolver.toNativeFqn(ifc.fqn); - const suffix = - ifc.kind === spec.TypeKind.Interface - ? `: DeputyBase, ${interfaceFqn}` - : `: ${interfaceFqn}`; - this.code.openBlock(`internal sealed class ${name} ${suffix}`); + const suffix = spec.isInterfaceType(ifc) + ? `: DeputyBase, ${interfaceFqn}` + : `: ${interfaceFqn}`; + const newModifier = this.proxyMustUseNewModifier(ifc) ? 'new ' : ''; + + this.code.openBlock( + `${newModifier}internal sealed class ${name} ${suffix}`, + ); // Create the private constructor this.code.openBlock( @@ -673,6 +675,46 @@ export class DotNetGenerator extends Generator { this.closeFileIfNeeded(name, namespace, isNested); } + /** + * Determines whether any ancestor of the given type must use the `new` + * modifier when introducing it's own proxy. + * + * If the type is a `class`, then it must use `new` if it extends another + * abstract class defined in the same assembly (since proxies are internal, + * external types' proxies are not visible in that context). + * + * If the type is an `interface`, then it must use `new` if it extends another + * interface from the same assembly. + * + * @param type the tested proxy-able type (an abstract class or an interface). + * + * @returns true if any ancestor of this type has a visible proxy. + */ + private proxyMustUseNewModifier( + type: spec.ClassType | spec.InterfaceType, + ): boolean { + if (spec.isClassType(type)) { + if (type.base == null) { + return false; + } + + const base = this.findType(type.base) as spec.ClassType; + return ( + base.assembly === type.assembly && + (base.abstract + ? true + : // An abstract class could extend a concrete class... We must walk up the inheritance tree in this case... + this.proxyMustUseNewModifier(base)) + ); + } + + return ( + type.interfaces?.find( + (fqn) => this.findType(fqn).assembly === type.assembly, + ) != null + ); + } + /** * Emits an Interface Datatype class * @@ -760,7 +802,7 @@ export class DotNetGenerator extends Generator { bases.push( ...(currentType.interfaces ?? []).map((iface) => this.findType(iface)), ); - if (currentType.kind === spec.TypeKind.Class && currentType.base) { + if (spec.isClassType(currentType) && currentType.base) { bases.push(this.findType(currentType.base)); } for (const base of bases) { @@ -833,14 +875,17 @@ export class DotNetGenerator extends Generator { let isAbstractKeyword = ''; // If the prop parent is a class - if (cls.kind === spec.TypeKind.Class) { + if (spec.isClassType(cls)) { const implementedInBase = this.isMemberDefinedOnAncestor( cls as spec.ClassType, prop, ); if (implementedInBase || datatype || proxy) { - // Override if the property is in a datatype or proxy class or declared in a parent class - isOverrideKeyWord = 'override '; + // Override if the property is in a datatype or proxy class or declared in a parent class. If the member is + // static, use the "new" keyword instead, to indicate we are intentionally hiding the ancestor declaration (as + // C# does not inherit statics, they can be hidden but not overridden).The "new" keyword is optional in this + // context, but helps clarify intention. + isOverrideKeyWord = prop.static ? 'new ' : 'override '; } else if (prop.abstract) { // Abstract members get decorated as such isAbstractKeyword = 'abstract '; @@ -852,7 +897,7 @@ export class DotNetGenerator extends Generator { const propTypeFQN = this.typeresolver.toDotNetType(prop.type); const isOptional = prop.optional ? '?' : ''; - const statement = `${access} ${isAbstractKeyword}${isVirtualKeyWord}${isOverrideKeyWord}${staticKeyWord}${propTypeFQN}${isOptional} ${propName}`; + const statement = `${access} ${isAbstractKeyword}${isVirtualKeyWord}${staticKeyWord}${isOverrideKeyWord}${propTypeFQN}${isOptional} ${propName}`; this.code.openBlock(statement); // Emit getters diff --git a/packages/jsii-pacmak/lib/targets/dotnet/dotnetruntimegenerator.ts b/packages/jsii-pacmak/lib/targets/dotnet/dotnetruntimegenerator.ts index 741dc8befa..df0e5244c1 100644 --- a/packages/jsii-pacmak/lib/targets/dotnet/dotnetruntimegenerator.ts +++ b/packages/jsii-pacmak/lib/targets/dotnet/dotnetruntimegenerator.ts @@ -1,5 +1,6 @@ -import { CodeMaker } from 'codemaker'; import * as spec from '@jsii/spec'; +import { CodeMaker } from 'codemaker'; + import { DotNetTypeResolver } from './dotnettyperesolver'; import { DotNetNameUtils } from './nameutils'; @@ -78,11 +79,9 @@ export class DotNetRuntimeGenerator { method: spec.Method /*, emitForProxyOrDatatype: boolean = false*/, ): void { const isOverride = - cls.kind === spec.TypeKind.Class && method.overrides - ? ', isOverride: true' - : ''; + spec.isClassType(cls) && method.overrides ? ', isOverride: true' : ''; const isAsync = - cls.kind === spec.TypeKind.Class && method.async ? ', isAsync: true' : ''; + spec.isClassType(cls) && method.async ? ', isAsync: true' : ''; const parametersJson = method.parameters ? `, parametersJson: "${JSON.stringify(method.parameters) .replace(/"/g, '\\"') @@ -127,10 +126,9 @@ export class DotNetRuntimeGenerator { public emitAttributesForInterfaceProxy( ifc: spec.ClassType | spec.InterfaceType, ): void { - const name = - ifc.kind === spec.TypeKind.Interface - ? this.nameutils.convertInterfaceName(ifc) - : this.typeresolver.toNativeFqn(ifc.fqn); + const name = spec.isInterfaceType(ifc) + ? this.nameutils.convertInterfaceName(ifc) + : this.typeresolver.toNativeFqn(ifc.fqn); this.code.line( `[JsiiTypeProxy(nativeType: typeof(${name}), fullyQualifiedName: "${ifc.fqn}")]`, ); diff --git a/packages/jsii-pacmak/lib/targets/dotnet/dotnettyperesolver.ts b/packages/jsii-pacmak/lib/targets/dotnet/dotnettyperesolver.ts index 086314140c..5972fd5414 100644 --- a/packages/jsii-pacmak/lib/targets/dotnet/dotnettyperesolver.ts +++ b/packages/jsii-pacmak/lib/targets/dotnet/dotnettyperesolver.ts @@ -1,5 +1,6 @@ import * as spec from '@jsii/spec'; import { toPascalCase } from 'codemaker'; + import { DotNetDependency } from './filegenerator'; import { DotNetNameUtils } from './nameutils'; diff --git a/packages/jsii-pacmak/lib/targets/dotnet/filegenerator.ts b/packages/jsii-pacmak/lib/targets/dotnet/filegenerator.ts index 14e68a680a..929cc808f7 100644 --- a/packages/jsii-pacmak/lib/targets/dotnet/filegenerator.ts +++ b/packages/jsii-pacmak/lib/targets/dotnet/filegenerator.ts @@ -1,11 +1,13 @@ -import { CodeMaker } from 'codemaker'; import { Assembly } from '@jsii/spec'; +import { CodeMaker } from 'codemaker'; import * as path from 'path'; import * as xmlbuilder from 'xmlbuilder'; -import { DotNetNameUtils } from './nameutils'; + +import { TargetName } from '..'; import * as logging from '../../logging'; import { TARGET_FRAMEWORK } from '../dotnet'; -import { toNuGetVersionRange } from '../version-utils'; +import { toNuGetVersionRange, toReleaseVersion } from '../version-utils'; +import { DotNetNameUtils } from './nameutils'; // Represents a dependency in the dependency tree. export class DotNetDependency { @@ -133,9 +135,21 @@ export class FileGenerator { } }); + const warnings = rootNode.ele('PropertyGroup'); // Suppress warnings about [Obsolete] members, this is the author's choice! - rootNode.ele('PropertyGroup').ele('NoWarn').text('0612,0618'); - + warnings.comment('Silence [Obsolete] warnings'); + warnings.ele('NoWarn').text('0612,0618'); + // Treat select warnings as errors, as these are likely codegen bugs: + warnings.comment( + 'Treat warnings symptomatic of code generation bugs as errors', + ); + warnings.ele( + 'WarningsAsErrors', + [ + '0108', // 'member1' hides inherited member 'member2'. Use the new keyword if hiding was intended. + '0109', // The member 'member' does not hide an inherited member. The new keyword is not required. + ].join(','), + ); const xml = rootNode.end({ pretty: true, spaceBeforeSlash: true }); // Sending the xml content to the codemaker to ensure the file is written @@ -182,6 +196,6 @@ export class FileGenerator { // suffix is guaranteed to start with a leading `-` return `${assembly.version}${suffix}`; } - return assembly.version; + return toReleaseVersion(assembly.version, TargetName.DOTNET); } } diff --git a/packages/jsii-pacmak/lib/targets/go.ts b/packages/jsii-pacmak/lib/targets/go.ts index c6f28fe0a2..55eb3a812c 100644 --- a/packages/jsii-pacmak/lib/targets/go.ts +++ b/packages/jsii-pacmak/lib/targets/go.ts @@ -1,21 +1,29 @@ import { CodeMaker } from 'codemaker'; import * as fs from 'fs-extra'; -import * as path from 'path'; -import { Documentation } from './go/documentation'; import { Assembly } from 'jsii-reflect'; import { Rosetta } from 'jsii-rosetta'; -import { JSII_INIT_PACKAGE, RootPackage } from './go/package'; +import * as path from 'path'; + import { IGenerator } from '../generator'; -import { Target, TargetOptions } from '../target'; +import * as logging from '../logging'; +import { findLocalBuildDirs, Target, TargetOptions } from '../target'; +import { shell } from '../util'; +import { Documentation } from './go/documentation'; +import { GOMOD_FILENAME, RootPackage } from './go/package'; +import { JSII_INIT_PACKAGE } from './go/runtime'; +import { JSII_RT_MODULE_NAME } from './go/runtime/constants'; import { goPackageName } from './go/util'; export class Golang extends Target { - public readonly generator: IGenerator; + private readonly goGenerator: GoGenerator; public constructor(options: TargetOptions) { super(options); + this.goGenerator = new GoGenerator(options.rosetta); + } - this.generator = new GoGenerator(options.rosetta); + public get generator() { + return this.goGenerator; } /** @@ -25,12 +33,88 @@ export class Golang extends Target { * @param outDir the directory where the publishable artifact should be placed. */ public async build(sourceDir: string, outDir: string): Promise { - return this.copyFiles(sourceDir, outDir); + // copy generated sources to the output directory + await this.copyFiles(sourceDir, outDir); + + const pkgDir = path.join(outDir, goPackageName(this.assembly.name)); + + // write `local.go.mod` with "replace" directives for local modules + const localGoMod = await this.writeLocalGoMod(pkgDir); + + // run `go build` with local.go.mod + await go('build', ['-modfile', localGoMod], { cwd: pkgDir }); + + // delete local.go.mod and local.go.sum from the output directory so it doesn't get published + const localGoSum = `${path.basename(localGoMod, '.mod')}.sum`; + await fs.remove(path.join(pkgDir, localGoMod)); + await fs.remove(path.join(pkgDir, localGoSum)); + } + + /** + * Creates a copy of the `go.mod` file called `local.go.mod` with added + * `replace` directives for local mono-repo dependencies. This is required in + * order to run `go fmt` and `go build`. + * + * @param pkgDir The directory which contains the generated go code + */ + private async writeLocalGoMod(pkgDir: string) { + const replace: Record = {}; + + // find local deps by check if `/go` exists for dependencies + // and also consider `outDir` in case pacmak is executed using `--outdir + // --recurse` (in which case all go code will be generated there). + const dirs = [ + path.dirname(pkgDir), + ...(await findLocalBuildDirs(this.packageDir, 'go')), + ]; + + // try to resolve @jsii/go-runtime (only exists as a devDependency) + const jsiiRuntimeDir = tryFindLocalRuntime(); + if (jsiiRuntimeDir) { + replace[JSII_RT_MODULE_NAME] = jsiiRuntimeDir; + } + + // iterate (recursively) on all package dependencies and check if we have a + // local build directory for this module. if + // we do, add a "replace" directive to point to it instead of download from + // the network. + const visit = (pkg: RootPackage) => { + for (const dep of pkg.packageDependencies) { + for (const baseDir of dirs) { + const moduleDir = tryFindLocalModule(baseDir, dep); + if (moduleDir) { + replace[dep.goModuleName] = moduleDir; + } + } + + // recurse to transitive deps ("replace" is only considered at the top level go.mod) + visit(dep); + } + }; + + visit(this.goGenerator.rootPackage); + + // write `local.go.mod` + + // read existing content + const goMod = path.join(pkgDir, GOMOD_FILENAME); + const lines = (await fs.readFile(goMod, 'utf-8')).split('\n'); + + for (const [from, to] of Object.entries(replace)) { + logging.info(`Local replace: ${from} => ${to}`); + lines.push(`replace ${from} => ${to}`); + } + + const localGoMod = `local.${GOMOD_FILENAME}`; + await fs.writeFile(path.join(pkgDir, localGoMod), lines.join('\n')); + return localGoMod; } } class GoGenerator implements IGenerator { private assembly!: Assembly; + public rootPackage!: RootPackage; + private readonly code = new CodeMaker({ indentCharacter: '\t', indentationLevel: 1, @@ -51,7 +135,9 @@ class GoGenerator implements IGenerator { } public generate(): void { - new RootPackage(this.assembly).emit({ + this.rootPackage = new RootPackage(this.assembly); + + return this.rootPackage.emit({ code: this.code, documenter: this.documenter, }); @@ -92,3 +178,56 @@ class GoGenerator implements IGenerator { this.code.closeFile(file); } } + +/** + * Checks if `buildDir` includes a local go build version (with "replace" + * directives). + * @param baseDir the `dist/go` directory + * @returns `undefined` if not or the module directory otherwise. + */ +function tryFindLocalModule(baseDir: string, pkg: RootPackage) { + const gomodPath = path.join(baseDir, pkg.packageName, GOMOD_FILENAME); + if (!fs.pathExistsSync(gomodPath)) { + return undefined; + } + + // read `go.mod` and check that it is for the correct module + const gomod = fs.readFileSync(gomodPath, 'utf-8').split('\n'); + const isExpectedModule = gomod.find( + (line) => line.trim() === `module ${pkg.goModuleName}`, + ); + + if (!isExpectedModule) { + return undefined; + } + + return path.resolve(path.dirname(gomodPath)); +} + +/** + * Check if we are running from inside the jsii repository, and then we want to + * use the local runtime instead of download from a released version. + */ +function tryFindLocalRuntime() { + try { + // eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports, import/no-extraneous-dependencies + const dir = require('@jsii/go-runtime').runtimePath; + logging.debug(`Using @jsii/go-runtime from ${dir}`); + return dir; + } catch { + return undefined; + } +} + +/** + * Executes a go CLI command. + * + * + * @param command The `go` command to execute (e.g. `build`) + * @param args Additional args + * @param options Options + */ +async function go(command: string, args: string[], options: { cwd: string }) { + const { cwd } = options; + return shell('go', [command, ...args], { cwd }); +} diff --git a/packages/jsii-pacmak/lib/targets/go/documentation.ts b/packages/jsii-pacmak/lib/targets/go/documentation.ts index 8337bace7f..2cecd95f64 100644 --- a/packages/jsii-pacmak/lib/targets/go/documentation.ts +++ b/packages/jsii-pacmak/lib/targets/go/documentation.ts @@ -1,7 +1,7 @@ -import { Docs } from 'jsii-reflect'; import { Stability } from '@jsii/spec'; -import { Rosetta } from 'jsii-rosetta'; import { CodeMaker } from 'codemaker'; +import { Docs } from 'jsii-reflect'; +import { Rosetta } from 'jsii-rosetta'; export class Documentation { public constructor(private readonly code: CodeMaker, _rosetta: Rosetta) {} @@ -19,27 +19,24 @@ export class Documentation { */ public emit(docs: Docs): void { if (docs.toString() !== '') { - const lines = docs.toString().split('\n'); - for (const line of lines) { - this.code.line(`// ${line}`); - } + this.emitComment(docs.toString()); } if (docs.returns !== '') { - this.code.line(`//`); - this.code.line(`// Returns: ${docs.returns}`); + this.emitComment(); + this.emitComment(`Returns: ${docs.returns}`); } if (docs.example !== '') { - this.code.line(`//`); + this.emitComment(); // TODO: Translate code examples to Go with Rosetta (not implemented there yet) - this.code.line('// TODO: EXAMPLE'); - this.code.line(`//`); + this.emitComment('TODO: EXAMPLE'); + this.emitComment(); } if (docs.link !== '') { - this.code.line(`// See: ${docs.link}`); - this.code.line(`//`); + this.emitComment(`See: ${docs.link}`); + this.emitComment(); } this.emitStability(docs); @@ -49,13 +46,19 @@ export class Documentation { const stability = docs.stability; if (stability && this.shouldMentionStability(docs)) { if (docs.deprecated) { - this.code.line(`// Deprecated: ${docs.deprecationReason}`); + this.emitComment(`Deprecated: ${docs.deprecationReason}`); } else { - this.code.line(`// ${this.code.toPascalCase(stability)}.`); + this.emitComment(`${this.code.toPascalCase(stability)}.`); } } } + private emitComment(text = '') { + for (const line of text.split('\n')) { + this.code.line(`// ${line}`.trim()); + } + } + private shouldMentionStability(docs: Docs): boolean { const s = docs.stability; // Don't render "stable" or "external", those are both stable by implication diff --git a/packages/jsii-pacmak/lib/targets/go/emit-context.ts b/packages/jsii-pacmak/lib/targets/go/emit-context.ts index e2388fd997..50c6515145 100644 --- a/packages/jsii-pacmak/lib/targets/go/emit-context.ts +++ b/packages/jsii-pacmak/lib/targets/go/emit-context.ts @@ -1,4 +1,5 @@ import { CodeMaker } from 'codemaker'; + import { Documentation } from './documentation'; /** diff --git a/packages/jsii-pacmak/lib/targets/go/package.ts b/packages/jsii-pacmak/lib/targets/go/package.ts index f90392718d..1f3fb5b736 100644 --- a/packages/jsii-pacmak/lib/targets/go/package.ts +++ b/packages/jsii-pacmak/lib/targets/go/package.ts @@ -1,21 +1,23 @@ import { CodeMaker } from 'codemaker'; -import { Assembly } from 'jsii-reflect'; +import { Assembly, Type, Submodule as JsiiSubmodule } from 'jsii-reflect'; import { join } from 'path'; -import { ReadmeFile } from './readme-file'; -import { Type, Submodule as JsiiSubmodule } from 'jsii-reflect'; +import * as semver from 'semver'; + import { EmitContext } from './emit-context'; +import { ReadmeFile } from './readme-file'; +import { + JSII_RT_ALIAS, + JSII_RT_MODULE_NAME, + JSII_INIT_PACKAGE, + JSII_INIT_FUNC, + JSII_INIT_ALIAS, +} from './runtime'; import { GoClass, GoType, Enum, Interface, Struct } from './types'; import { findTypeInTree, goPackageName, flatMap } from './util'; +import { VersionFile } from './version-file'; -// JSII go runtime module name -const JSII_MODULE_NAME = 'github.com/aws-cdk/jsii/jsii-experimental'; - -// Jsii initializer package name -export const JSII_INIT_PACKAGE = 'jsii'; -// Function to initialize a jsii-generated module -export const JSII_INIT_FUNC = 'Initialize'; -// Alias used for the jsii init -export const JSII_INIT_ALIAS = '_init_'; +export const GOMOD_FILENAME = 'go.mod'; +export const GO_VERSION = '1.15'; /* * Package represents a single `.go` source file within a package. This can be the root package file or a submodule @@ -32,6 +34,7 @@ export abstract class Package { public readonly packageName: string, public readonly filePath: string, public readonly moduleName: string, + public readonly version: string, // If no root is provided, this module is the root root?: Package, ) { @@ -69,18 +72,23 @@ export abstract class Package { } /* - * The module names of this modules dependencies. Used for import statements + * goModuleName returns the full path to the module name. + * Used for import statements and go.mod generation + */ + public get goModuleName(): string { + const moduleName = this.root.moduleName; + const prefix = moduleName !== '' ? `${moduleName}/` : ''; + const rootPackageName = this.root.packageName; + const versionSuffix = determineMajorVersionSuffix(this.version); + const suffix = this.filePath !== '' ? `/${this.filePath}` : ``; + return `${prefix}${rootPackageName}${versionSuffix}${suffix}`; + } + + /* + * The module names of this module's dependencies. Used for import statements. */ public get dependencyImports(): Set { - return new Set( - this.dependencies.map((pack) => { - const moduleName = pack.root.moduleName; - const prefix = moduleName !== '' ? `${moduleName}/` : ''; - const rootPackageName = pack.root.packageName; - const suffix = pack.filePath !== '' ? `/${pack.filePath}` : ''; - return `${prefix}${rootPackageName}${suffix}`; - }), - ); + return new Set(this.dependencies.map((pkg) => pkg.goModuleName)); } /* @@ -92,6 +100,7 @@ export abstract class Package { public emit(context: EmitContext): void { const { code } = context; + code.openFile(this.file); this.emitHeader(code); this.emitImports(code); @@ -112,9 +121,42 @@ export abstract class Package { code.line(); } + protected get usesRuntimePackage(): boolean { + return ( + this.types.some((type) => type.usesRuntimePackage) || + this.submodules.some((sub) => sub.usesRuntimePackage) + ); + } + + protected get usesInitPackage(): boolean { + return ( + this.types.some((type) => type.usesInitPackage) || + this.submodules.some((sub) => sub.usesInitPackage) + ); + } + + protected get usesReflectionPackage(): boolean { + return ( + this.types.some((type) => type.usesReflectionPackage) || + this.submodules.some((sub) => sub.usesReflectionPackage) + ); + } + private emitImports(code: CodeMaker) { code.open('import ('); - code.line(`"${JSII_MODULE_NAME}"`); + if (this.usesRuntimePackage) { + code.line(`${JSII_RT_ALIAS} "${JSII_RT_MODULE_NAME}"`); + } + + if (this.usesInitPackage) { + code.line( + `${JSII_INIT_ALIAS} "${this.root.goModuleName}/${JSII_INIT_PACKAGE}"`, + ); + } + + if (this.usesReflectionPackage) { + code.line(`"reflect"`); + } for (const packageName of this.dependencyImports) { // If the module is the same as the current one being written, don't emit an import statement @@ -123,10 +165,6 @@ export abstract class Package { } } - code.line( - `${JSII_INIT_ALIAS} "${this.root.moduleName}/${this.root.packageName}/${JSII_INIT_PACKAGE}"`, - ); - code.close(')'); code.line(); } @@ -145,7 +183,9 @@ export abstract class Package { */ export class RootPackage extends Package { public readonly assembly: Assembly; + public readonly version: string; private readonly readme?: ReadmeFile; + private readonly versionFile: VersionFile; public constructor(assembly: Assembly) { const packageName = goPackageName(assembly.name); @@ -158,9 +198,12 @@ export class RootPackage extends Package { packageName, filePath, moduleName, + assembly.version, ); this.assembly = assembly; + this.version = assembly.version; + this.versionFile = new VersionFile(this.version); if (this.assembly.readme?.markdown) { this.readme = new ReadmeFile( @@ -174,6 +217,30 @@ export class RootPackage extends Package { super.emit(context); this.emitJsiiPackage(context); this.readme?.emit(context); + + this.emitGomod(context.code); + this.versionFile.emit(context.code); + } + + private emitGomod(code: CodeMaker) { + code.openFile(GOMOD_FILENAME); + code.line(`module ${this.goModuleName}`); + code.line(); + code.line(`go ${GO_VERSION}`); + code.line(); + code.open('require ('); + // Strip " (build abcdef)" from the jsii version + code.line( + `${JSII_RT_MODULE_NAME} v${this.assembly.jsiiVersion.replace( + / .*$/, + '', + )}`, + ); + for (const dep of this.packageDependencies) { + code.line(`${dep.goModuleName} v${dep.version}`); + } + code.close(')'); + code.closeFile(GOMOD_FILENAME); } /* @@ -220,20 +287,22 @@ export class RootPackage extends Package { code.line('package jsii'); code.line(); code.open('import ('); - code.line(`rt "${JSII_MODULE_NAME}"`); + code.line(`rt "${JSII_RT_MODULE_NAME}"`); code.line('"sync"'); if (dependencies.length > 0) { code.line('// Initialization endpoints of dependencies'); for (const pkg of dependencies) { code.line( - `${pkg.packageName} "${pkg.root.moduleName}/${pkg.root.packageName}/${JSII_INIT_PACKAGE}"`, + `${pkg.packageName} "${pkg.root.goModuleName}/${JSII_INIT_PACKAGE}"`, ); } } + code.close(')'); code.line(); code.line('var once sync.Once'); code.line(); + code.line( `// ${JSII_INIT_FUNC} performs the necessary work for the enclosing`, ); @@ -253,6 +322,7 @@ export class RootPackage extends Package { ); code.close('})'); code.close('}'); + code.closeFile(file); } } @@ -261,11 +331,12 @@ export class RootPackage extends Package { * InternalPackage refers to any go package within a given JSII module. */ export class InternalPackage extends Package { - public readonly pkg: Package; + public readonly parent: Package; - public constructor(root: Package, pkg: Package, assembly: JsiiSubmodule) { + public constructor(root: Package, parent: Package, assembly: JsiiSubmodule) { const packageName = goPackageName(assembly.name); - const filePath = pkg === root ? packageName : pkg.filePath; + const filePath = + parent === root ? packageName : `${parent.filePath}/${packageName}`; super( assembly.types, @@ -273,9 +344,40 @@ export class InternalPackage extends Package { packageName, filePath, root.moduleName, + root.version, root, ); - this.pkg = pkg; + this.parent = parent; + } +} + +/** + * Go requires that when a module major version is v2.0 and above, the module + * name will have a `/vNN` suffix (where `NN` is the major version). + * + * > Starting with major version 2, module paths must have a major version + * > suffix like /v2 that matches the major version. For example, if a module + * > has the path example.com/mod at v1.0.0, it must have the path + * > example.com/mod/v2 at version v2.0.0. + * + * @see https://golang.org/ref/mod#major-version-suffixes + * @param version The module version (e.g. `2.3.0`) + * @returns a suffix to append to the module name in the form (`/vNN`). If the + * module version is `0.x` or `1.x`, returns an empty string. + */ +function determineMajorVersionSuffix(version: string) { + const sv = semver.parse(version); + if (!sv) { + throw new Error( + `Unable to parse version "${version}" as a semantic version`, + ); + } + + // suffix is only needed for 2.0 and above + if (sv.major <= 1) { + return ''; } + + return `/v${sv.major}`; } diff --git a/packages/jsii-pacmak/lib/targets/go/readme-file.ts b/packages/jsii-pacmak/lib/targets/go/readme-file.ts index 8a06a139e7..2ad5b4c21c 100644 --- a/packages/jsii-pacmak/lib/targets/go/readme-file.ts +++ b/packages/jsii-pacmak/lib/targets/go/readme-file.ts @@ -1,4 +1,5 @@ import { join } from 'path'; + import { EmitContext } from './emit-context'; // import { Translation } from 'jsii-rosetta'; // import { INCOMPLETE_DISCLAIMER_COMPILING, INCOMPLETE_DISCLAIMER_NONCOMPILING } from '..'; diff --git a/packages/jsii-pacmak/lib/targets/go/runtime.ts b/packages/jsii-pacmak/lib/targets/go/runtime.ts deleted file mode 100644 index c34abc46ee..0000000000 --- a/packages/jsii-pacmak/lib/targets/go/runtime.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { CodeMaker } from 'codemaker'; -import { GoClassConstructor, ClassMethod, Struct } from './types'; -import { JSII_INIT_ALIAS, JSII_INIT_FUNC } from './package'; - -const NOOP_RETURN_MAP: { [type: string]: string } = { - float64: '0.0', - string: '"NOOP_RETURN_STRING"', - bool: 'true', -}; - -function paramsString(params: string[]): string { - return `[]string{${params.reduce((accum: string, p: string, i: number) => { - const prefix = i === 0 ? '' : ' '; - return `${accum}${prefix}"${p}",`; - }, '')}}`; -} - -export class MethodCall { - public constructor( - public readonly parent: ClassMethod, - private readonly inStatic: boolean, - ) {} - - public emit(code: CodeMaker) { - if (this.inStatic) { - emitInitialization(code); - } - - const name = code.toPascalCase(this.parent.name); - code.open(`jsii.NoOpRequest(jsii.NoOpApiRequest {`); - code.line(`Class: "${this.parent.parent.name}",`); - code.line(`Method: "${name}",`); - code.line( - `Args: ${paramsString( - this.parent.method.parameters.map((p) => p.type.toString()), - )},`, - ); - code.close(`})`); - - const ret = this.parent.reference; - if (ret?.void) { - // don't emit a return statement if function doesn't return a value - return; - } else if (ret?.type?.type.isClassType() || ret?.type instanceof Struct) { - code.line(`return ${this.parent.returnType}{}`); - } else if (ret?.type?.type.isEnumType()) { - code.line(`return "ENUM_DUMMY"`); - } else { - code.line(`return ${this.getDummyReturn(this.parent.returnType)}`); - } - } - - private getDummyReturn(type: string): string { - return NOOP_RETURN_MAP[type] || 'nil'; - } -} - -export class ClassConstructor { - public constructor(public readonly parent: GoClassConstructor) {} - - public emit(code: CodeMaker) { - emitInitialization(code); - code.open(`jsii.NoOpRequest(jsii.NoOpApiRequest {`); - code.line(`Class: "${this.parent.parent.name}",`); - code.line(`Method: "Constructor",`); - code.line( - `Args: ${paramsString( - this.parent.parent.type.initializer!.parameters.map((p) => - p.type.toString(), - ), - )},`, - ); - code.close(`})`); - - code.line(`return &${this.parent.parent.name}{}`); - } -} - -export function emitInitialization(code: CodeMaker) { - code.line(`${JSII_INIT_ALIAS}.${JSII_INIT_FUNC}()`); -} diff --git a/packages/jsii-pacmak/lib/targets/go/runtime/class-constructor.ts b/packages/jsii-pacmak/lib/targets/go/runtime/class-constructor.ts new file mode 100644 index 0000000000..d8aeff2c04 --- /dev/null +++ b/packages/jsii-pacmak/lib/targets/go/runtime/class-constructor.ts @@ -0,0 +1,45 @@ +import { CodeMaker } from 'codemaker'; + +import { GoClassConstructor } from '../types'; +import { JSII_CREATE_FUNC, JSII_OVERRIDE, JSII_FQN } from './constants'; +import { slugify, emitInitialization } from './util'; + +export class ClassConstructor { + public constructor(public readonly parent: GoClassConstructor) {} + + public emit(code: CodeMaker) { + emitInitialization(code); + + const resultVar = slugify( + 'self', + this.parent.parameters.map((p) => p.name), + ); + + code.line(`${resultVar} := ${this.parent.parent.name}{}`); + code.open(`${JSII_CREATE_FUNC}(`); + + code.line(`"${this.parent.parent.fqn}",`); + code.line(`${this.argsString},`); + code.line(`${this.interfacesString},`); + code.line(`[]${JSII_OVERRIDE}{},`); + code.line(`&${resultVar},`); + + code.close(`)`); + + code.line(`return &${resultVar}`); + } + + public get interfacesString(): string { + const iFaceList = this.parent.parent.interfaces + .map((iFace) => `"${iFace}"`) + .join(', '); + return `[]${JSII_FQN}{${iFaceList}}`; + } + + public get argsString(): string { + const argsList = this.parent.parameters + .map((param) => param.name) + .join(', '); + return `[]interface{}{${argsList}}`; + } +} diff --git a/packages/jsii-pacmak/lib/targets/go/runtime/constants.ts b/packages/jsii-pacmak/lib/targets/go/runtime/constants.ts new file mode 100644 index 0000000000..0285d73a3d --- /dev/null +++ b/packages/jsii-pacmak/lib/targets/go/runtime/constants.ts @@ -0,0 +1,39 @@ +// JSII go runtime module name +export const JSII_RT_MODULE_NAME = 'github.com/aws/jsii-runtime-go'; +export const JSII_RT_ALIAS = '_jsii_'; + +// Jsii initializer package name +export const JSII_INIT_PACKAGE = 'jsii'; +// Function to initialize a jsii-generated module +export const JSII_INIT_FUNC = 'Initialize'; +// Alias used for the jsii init +export const JSII_INIT_ALIAS = '_init_'; +// Type of global implementation map +export const JSII_IMPL_MAP_TYPE = `map[reflect.Type]reflect.Type`; + +// Function to make create request +export const JSII_CREATE_FUNC = `${JSII_RT_ALIAS}.Create`; +// JSII invoke request +export const JSII_INVOKE_FUNC = `${JSII_RT_ALIAS}.Invoke`; +// JSII static invoke +export const JSII_SINVOKE_FUNC = `${JSII_RT_ALIAS}.InvokeStatic`; + +// JSII get request +export const JSII_GET_FUNC = `${JSII_RT_ALIAS}.Get`; + +// JSII static get request +export const JSII_SGET_FUNC = `${JSII_RT_ALIAS}.StaticGet`; + +// JSII set request +export const JSII_SET_FUNC = `${JSII_RT_ALIAS}.Set`; + +// JSII static set request +export const JSII_SSET_FUNC = `${JSII_RT_ALIAS}.StaticSet`; + +// MISC types & functions +// Jsii override struct type +export const JSII_OVERRIDE = `${JSII_RT_ALIAS}.Override`; +// Jsii Any mock +export const JSII_ANY = `${JSII_RT_ALIAS}.Any`; +// Jsii FQN type +export const JSII_FQN = `${JSII_RT_ALIAS}.FQN`; diff --git a/packages/jsii-pacmak/lib/targets/go/runtime/function-call.ts b/packages/jsii-pacmak/lib/targets/go/runtime/function-call.ts new file mode 100644 index 0000000000..61f42b7efe --- /dev/null +++ b/packages/jsii-pacmak/lib/targets/go/runtime/function-call.ts @@ -0,0 +1,42 @@ +import { CodeMaker } from 'codemaker'; + +import { GoTypeMember, ImplementationMap } from '../types'; +import { JSII_IMPL_MAP_TYPE } from './constants'; + +export abstract class FunctionCall { + public constructor(public readonly parent: GoTypeMember) {} + + protected get implMap(): ImplementationMap | void { + return this.parent.reference?.scopedImplMap(this.parent.parent.pkg); + } + + /** + * Emits map of interface type to concrete struct type for use in runtime to + * cast data to expected return type. + */ + protected emitImplMapVal(code: CodeMaker) { + if (this.implMap) { + const { interfaceName, structName } = this.implMap; + code.open(`${JSII_IMPL_MAP_TYPE}{`); + + // `reflect.TypeOf((*SomeType)(nil)).Elem()` is a reliable way to create + // an instance of reflect.Type for any type. `(*SomeInterface)(nil)` + // creates a "zero value" with the type `SomeInterface` which otherwise + // has no way to instantiate. + code.line( + `reflect.TypeOf((*${interfaceName})(nil)).Elem(): reflect.TypeOf((*${structName})(nil)).Elem(),`, + ); + code.close('},'); + } else { + code.line(`${JSII_IMPL_MAP_TYPE}{},`); + } + } + + protected get returnsVal(): boolean { + return Boolean(this.parent.reference && !this.parent.reference.void); + } + + protected get returnType(): string { + return this.parent.returnType || 'interface{}'; + } +} diff --git a/packages/jsii-pacmak/lib/targets/go/runtime/index.ts b/packages/jsii-pacmak/lib/targets/go/runtime/index.ts new file mode 100644 index 0000000000..803421f681 --- /dev/null +++ b/packages/jsii-pacmak/lib/targets/go/runtime/index.ts @@ -0,0 +1,5 @@ +export * from './constants'; +export * from './class-constructor'; +export * from './method-call'; +export * from './property-access'; +export * from './util'; diff --git a/packages/jsii-pacmak/lib/targets/go/runtime/method-call.ts b/packages/jsii-pacmak/lib/targets/go/runtime/method-call.ts new file mode 100644 index 0000000000..08f269c50e --- /dev/null +++ b/packages/jsii-pacmak/lib/targets/go/runtime/method-call.ts @@ -0,0 +1,80 @@ +import { CodeMaker } from 'codemaker'; + +import { GoMethod } from '../types'; +import { JSII_INVOKE_FUNC, JSII_SINVOKE_FUNC } from './constants'; +import { FunctionCall } from './function-call'; +import { slugify, emitInitialization } from './util'; + +export class MethodCall extends FunctionCall { + private _returnVarName = ''; + public constructor(public readonly parent: GoMethod) { + super(parent); + } + + public emit(code: CodeMaker) { + if (this.inStatic) { + this.emitStatic(code); + } else { + this.emitDynamic(code); + } + } + + private emitDynamic(code: CodeMaker) { + code.line(`var ${this.returnVarName} ${this.returnType}`); + code.open(`${JSII_INVOKE_FUNC}(`); + + code.line(`${this.parent.instanceArg},`); + code.line(`"${this.parent.method.name}",`); + code.line(`${this.argsString},`); + code.line(`${this.returnsVal ? 'true' : 'false'},`); + code.line(`&${this.returnVarName},`); + this.emitImplMapVal(code); + + code.close(`)`); + + if (this.returnsVal) { + code.line(`return ${this.returnVarName}`); + } + } + + private emitStatic(code: CodeMaker) { + emitInitialization(code); + code.line(`var ${this.returnVarName} ${this.returnType}`); + + code.open(`${JSII_SINVOKE_FUNC}(`); + + code.line(`"${this.parent.parent.fqn}",`); + code.line(`"${this.parent.method.name}",`); + code.line(`${this.argsString},`); + code.line(`${this.returnsVal ? 'true' : 'false'},`); + code.line(`&${this.returnVarName},`); + this.emitImplMapVal(code); + + code.close(`)`); + + if (this.returnsVal) { + code.line(`return ${this.returnVarName}`); + } + } + + private get returnVarName(): string { + if (this._returnVarName === '') { + this._returnVarName = slugify( + 'returns', + this.parent.parameters.map((p) => p.name), + ); + } + return this._returnVarName; + } + + private get inStatic(): boolean { + return this.parent.method.static; + } + + private get argsString(): string { + const argsList = this.parent.parameters + .map((param) => param.name) + .join(', '); + return `[]interface{}{${argsList}}`; + } +} diff --git a/packages/jsii-pacmak/lib/targets/go/runtime/property-access.ts b/packages/jsii-pacmak/lib/targets/go/runtime/property-access.ts new file mode 100644 index 0000000000..5f12203032 --- /dev/null +++ b/packages/jsii-pacmak/lib/targets/go/runtime/property-access.ts @@ -0,0 +1,78 @@ +import { CodeMaker } from 'codemaker'; + +import { GoProperty } from '../types'; +import { + JSII_GET_FUNC, + JSII_SET_FUNC, + JSII_SGET_FUNC, + JSII_SSET_FUNC, +} from './constants'; +import { FunctionCall } from './function-call'; +import { slugify, emitInitialization } from './util'; + +export class GetProperty extends FunctionCall { + public constructor(public readonly parent: GoProperty) { + super(parent); + } + + public emit(code: CodeMaker) { + const resultVar = slugify('returns', [this.parent.instanceArg]); + code.line(`var ${resultVar} ${this.returnType}`); + + code.open(`${JSII_GET_FUNC}(`); + code.line(`${this.parent.instanceArg},`); + code.line(`"${this.parent.property.name}",`); + code.line(`&${resultVar},`); + this.emitImplMapVal(code); + code.close(`)`); + + code.line(`return ${resultVar}`); + } +} + +export class SetProperty { + public constructor(public readonly parent: GoProperty) {} + + public emit(code: CodeMaker) { + code.open(`${JSII_SET_FUNC}(`); + code.line(`${this.parent.instanceArg},`); + code.line(`"${this.parent.property.name}",`); + code.line(`val,`); + code.close(`)`); + } +} + +export class StaticGetProperty extends FunctionCall { + public constructor(public readonly parent: GoProperty) { + super(parent); + } + + public emit(code: CodeMaker) { + emitInitialization(code); + const resultVar = slugify('returns', []); + code.line(`var ${resultVar} ${this.returnType}`); + + code.open(`${JSII_SGET_FUNC}(`); + code.line(`"${this.parent.parent.fqn}",`); + code.line(`"${this.parent.property.name}",`); + code.line(`&${resultVar},`); + this.emitImplMapVal(code); + code.close(`)`); + + code.line(`return ${resultVar}`); + } +} + +export class StaticSetProperty { + public constructor(public readonly parent: GoProperty) {} + + public emit(code: CodeMaker) { + emitInitialization(code); + + code.open(`${JSII_SSET_FUNC}(`); + code.line(`"${this.parent.parent.fqn}",`); + code.line(`"${this.parent.property.name}",`); + code.line(`val,`); + code.close(`)`); + } +} diff --git a/packages/jsii-pacmak/lib/targets/go/runtime/util.ts b/packages/jsii-pacmak/lib/targets/go/runtime/util.ts new file mode 100644 index 0000000000..07203c853e --- /dev/null +++ b/packages/jsii-pacmak/lib/targets/go/runtime/util.ts @@ -0,0 +1,25 @@ +import { CodeMaker } from 'codemaker'; + +import { JSII_INIT_ALIAS, JSII_INIT_FUNC } from './constants'; + +// Emits call to initialize runtime client if not already +export function emitInitialization(code: CodeMaker) { + code.line(`${JSII_INIT_ALIAS}.${JSII_INIT_FUNC}()`); +} + +/** + * Slugify a name by appending '_' at the end until the resulting name is not + * present in the list of reserved names. + * + * @param name the name to be slugified + * @param reserved the list of names that are already sued in-scope + * + * @returns the slugified name + */ +export function slugify(name: string, reserved: Iterable): string { + const used = new Set(reserved); + while (used.has(name)) { + name += '_'; + } + return name; +} diff --git a/packages/jsii-pacmak/lib/targets/go/types/class.ts b/packages/jsii-pacmak/lib/targets/go/types/class.ts index 699f2d6b1f..66acad6c21 100644 --- a/packages/jsii-pacmak/lib/targets/go/types/class.ts +++ b/packages/jsii-pacmak/lib/targets/go/types/class.ts @@ -1,10 +1,17 @@ +import { toPascalCase } from 'codemaker'; import { Method, ClassType, Initializer } from 'jsii-reflect'; -import { GoStruct } from './go-type'; -import { GoParameter, GoMethod } from './type-member'; -import { getFieldDependencies } from '../util'; -import { Package } from '../package'; -import { ClassConstructor, MethodCall } from '../runtime'; + import { EmitContext } from '../emit-context'; +import { Package } from '../package'; +import { + ClassConstructor, + MethodCall, + StaticGetProperty, + StaticSetProperty, +} from '../runtime'; +import { getMemberDependencies, getParamDependencies } from '../util'; +import { GoStruct } from './go-type'; +import { GoParameter, GoMethod, GoProperty } from './type-member'; /* * GoClass wraps a Typescript class as a Go custom struct type @@ -12,6 +19,7 @@ import { EmitContext } from '../emit-context'; export class GoClass extends GoStruct { public readonly methods: ClassMethod[] = []; public readonly staticMethods: StaticMethod[] = []; + public readonly staticProperties: GoProperty[] = []; private readonly initializer?: GoClassConstructor; @@ -26,6 +34,12 @@ export class GoClass extends GoStruct { } } + for (const prop of Object.values(this.type.getProperties(true))) { + if (prop.static) { + this.staticProperties.push(new GoProperty(this, prop)); + } + } + if (this.type.initializer) { this.initializer = new GoClassConstructor(this, this.type.initializer); } @@ -45,11 +59,35 @@ export class GoClass extends GoStruct { method.emit(context); } + for (const prop of this.staticProperties) { + this.emitStaticProperty(context, prop); + } + for (const method of this.methods) { method.emit(context); } } + public get usesInitPackage() { + return ( + this.initializer != null || + this.methods.some((m) => m.usesInitPackage) || + this.properties.some((p) => p.usesInitPackage) + ); + } + + public get usesRuntimePackage() { + return ( + this.initializer != null || + this.methods.length > 0 || + this.properties.length > 0 + ); + } + + public get usesReflectionPackage(): boolean { + return this.properties.length > 0 || this.methods.length > 0; + } + protected emitInterface(context: EmitContext): void { const { code } = context; code.line('// Class interface'); // FIXME for debugging @@ -57,7 +95,7 @@ export class GoClass extends GoStruct { // embed extended interfaces for (const iface of this.extends) { - code.line(iface.scopedName(this.pkg)); + code.line(iface.scopedInterfaceName(this.pkg)); } for (const property of this.properties) { @@ -73,7 +111,30 @@ export class GoClass extends GoStruct { code.line(); } - // emits the implementation of the getters for the struct + private emitStaticProperty({ code }: EmitContext, prop: GoProperty): void { + const getCaller = new StaticGetProperty(prop); + + const propertyName = toPascalCase(prop.name); + const name = `${this.name}_${propertyName}`; + + code.openBlock(`func ${name}() ${prop.returnType}`); + getCaller.emit(code); + + code.closeBlock(); + code.line(); + + if (!prop.immutable) { + const setCaller = new StaticSetProperty(prop); + const name = `${this.name}_Set${propertyName}`; + code.openBlock(`func ${name}(val ${prop.returnType})`); + setCaller.emit(code); + + code.closeBlock(); + code.line(); + } + } + + // emits the implementation of the setters for the struct private emitSetters(context: EmitContext): void { if (this.properties.length !== 0) { for (const property of this.properties) { @@ -84,7 +145,18 @@ export class GoClass extends GoStruct { public get dependencies(): Package[] { // need to add dependencies of method arguments and constructor arguments - return [...super.dependencies, ...getFieldDependencies(this.methods)]; + return [ + ...super.dependencies, + ...getMemberDependencies(this.methods), + ...getParamDependencies(this.methods), + ]; + } + + /* + * Get fqns of interfaces the class implements + */ + public get interfaces(): string[] { + return this.type.interfaces.map((iFace) => iFace.fqn); } } @@ -128,23 +200,24 @@ export class GoClassConstructor { export class ClassMethod extends GoMethod { public readonly runtimeCall: MethodCall; + public readonly usesInitPackage: boolean = false; + public readonly usesRuntimePackage = true; public constructor( public readonly parent: GoClass, public readonly method: Method, ) { super(parent, method); - this.runtimeCall = new MethodCall(this, this.method.static); + this.runtimeCall = new MethodCall(this); } /* emit generates method implementation on the class */ public emit({ code }: EmitContext) { const name = this.name; - const instanceArg = this.parent.name.substring(0, 1).toLowerCase(); const returnTypeString = this.reference?.void ? '' : ` ${this.returnType}`; code.openBlock( - `func (${instanceArg} *${ + `func (${this.instanceArg} *${ this.parent.name }) ${name}(${this.paramString()})${returnTypeString}`, ); @@ -164,12 +237,19 @@ export class ClassMethod extends GoMethod { public get returnType(): string { return ( - this.reference?.scopedName(this.parent.pkg) ?? this.method.toString() + this.reference?.scopedInterfaceName(this.parent.pkg) ?? + this.method.toString() ); } + + public get instanceArg(): string { + return this.parent.name.substring(0, 1).toLowerCase(); + } } export class StaticMethod extends ClassMethod { + public readonly usesInitPackage = true; + public constructor( public readonly parent: GoClass, public readonly method: Method, diff --git a/packages/jsii-pacmak/lib/targets/go/types/enum.ts b/packages/jsii-pacmak/lib/targets/go/types/enum.ts index 840910a2fe..9ae4949156 100644 --- a/packages/jsii-pacmak/lib/targets/go/types/enum.ts +++ b/packages/jsii-pacmak/lib/targets/go/types/enum.ts @@ -1,9 +1,14 @@ import { EnumType } from 'jsii-reflect'; -import { GoType } from './go-type'; -import { Package } from '../package'; + import { EmitContext } from '../emit-context'; +import { Package } from '../package'; +import { GoType } from './go-type'; export class Enum extends GoType { + public readonly usesInitPackage = false; + public readonly usesRuntimePackage = false; + public readonly usesReflectionPackage = false; + public constructor(pkg: Package, public type: EnumType) { super(pkg, type); } diff --git a/packages/jsii-pacmak/lib/targets/go/types/go-type-reference.ts b/packages/jsii-pacmak/lib/targets/go/types/go-type-reference.ts index e1ee60333e..d09a864889 100644 --- a/packages/jsii-pacmak/lib/targets/go/types/go-type-reference.ts +++ b/packages/jsii-pacmak/lib/targets/go/types/go-type-reference.ts @@ -1,9 +1,8 @@ import { TypeReference } from 'jsii-reflect'; + +import * as log from '../../../logging'; 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 @@ -12,32 +11,55 @@ class PrimitiveMapper { private readonly MAP: { [key: string]: string } = { number: 'float64', boolean: 'bool', - any: GO_ANY, + any: 'interface{}', // TODO: Resolve "time" package dependency where needed and change to "time.Time" date: 'string', - json: `map[string]${GO_ANY}`, + string: 'string', + json: `map[string]interface{}`, }; public constructor(private readonly name: string) {} public get goPrimitive(): string { - return this.MAP[this.name] ?? this.name; + const val = this.MAP[this.name]; + if (!val) { + log.debug(`Unmapped primitive type: ${this.name}`); + } + + return val ?? this.name; } } +/** + * TypeMap used to recursively resolve interfaces in nested types for use in + * resolving scoped type names and implementation maps. + */ +type TypeMap = + | { readonly type: 'primitive'; readonly value: string } + | { readonly type: 'array'; readonly value: GoTypeRef } + | { readonly type: 'map'; readonly value: GoTypeRef } + | { readonly type: 'union'; readonly value: readonly GoTypeRef[] } + | { readonly type: 'interface'; readonly value: GoTypeRef } + | { readonly type: 'void' }; + +/** + * Maps interface to concrete struct for use in implementation maps + */ +export interface ImplementationMap { + interfaceName: string; + structName: string; +} + /* * Accepts a JSII TypeReference and Go Package and can resolve the GoType within the module tree. */ export class GoTypeRef { + private _typeMap?: TypeMap; 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); @@ -46,57 +68,137 @@ export class GoTypeRef { return undefined; } + public get primitiveType() { + if (this.reference.primitive) { + return new PrimitiveMapper(this.reference.primitive).goPrimitive; + } + + return undefined; + } + + public get interfaceName() { + return this.type?.interfaceName; + } + public get name() { return this.type?.name; } public get namespace() { - return this.type?.pkg.packageName; + return this.type?.namespace; } public get void() { return this.reference.void; } + public get typeMap(): TypeMap { + if (!this._typeMap) { + this._typeMap = this.buildTypeMap(this); + } + return this._typeMap; + } + /* * Return the name of a type for reference from the `Package` passed in */ public scopedName(scope: Package): string { - if (this.reference.primitive) { - return new PrimitiveMapper(this.reference.primitive).goPrimitive; - } + return this.scopedTypeName(this.typeMap, scope, false); + } - // type is an array - if (this.reference.arrayOfType) { - const innerName = - new GoTypeRef(this.root, this.reference.arrayOfType).scopedName( - scope, - ) ?? GO_ANY; + public scopedInterfaceName(scope: Package): string { + return this.scopedTypeName(this.typeMap, scope, true); + } - return `[]${innerName}`; - } + public scopedReferenceName(scope: Package): string { + return this.scopedTypeName(this.typeMap, scope, false, true); + } - // 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}`; + private buildTypeMap(ref: GoTypeRef): TypeMap { + if (ref.primitiveType) { + return { type: 'primitive', value: ref.primitiveType }; + } else if (ref.reference.arrayOfType) { + return { + type: 'array', + value: new GoTypeRef(this.root, ref.reference.arrayOfType), + }; + } else if (ref.reference.mapOfType) { + return { + type: 'map', + value: new GoTypeRef(this.root, ref.reference.mapOfType), + }; + } else if (ref.reference.unionOfTypes) { + return { + type: 'union', + value: ref.reference.unionOfTypes.map( + (typeRef) => new GoTypeRef(this.root, typeRef), + ), + }; + } else if (ref.reference.void) { + return { type: 'void' }; } - // type is defined in the same scope as the current one, no namespace required - if (scope.packageName === this.namespace && this.name) { - // if the current scope is the same as the types scope, return without a namespace - return toPascalCase(this.name); + return { type: 'interface', value: ref }; + } + + /** + * Builds a map of interface to concrete types. This is passed to the runtime + * so that return types of interfaces can correctly be constructucted. + */ + public scopedImplMap(scope: Package): ImplementationMap | void { + if ( + this.typeMap.type === 'array' || + this.typeMap.type === 'map' || + this.typeMap.type === 'interface' + ) { + const { value } = this.typeMap; + return { + interfaceName: value.scopedInterfaceName(scope), + structName: value.scopedName(scope), + }; } - // type is defined in another module and requires a namespace and import - if (this.name) { - return `${this.namespace}.${toPascalCase(this.name)}`; + return undefined; + } + + private scopedTypeName( + typeMap: TypeMap, + scope: Package, + asInterface: boolean, + asRef = false, + ): string { + if (typeMap.type === 'primitive') { + return typeMap.value; + } else if (typeMap.type === 'array' || typeMap.type === 'map') { + const prefix = typeMap.type === 'array' ? '[]' : 'map[string]'; + const innerName = + this.scopedTypeName(typeMap.value.typeMap, scope, asInterface, asRef) ?? + 'interface{}'; + return `${prefix}${innerName}`; + } else if (typeMap.type === 'interface') { + const prefix = asRef ? '*' : ''; + const baseName = asInterface + ? typeMap.value.interfaceName + : typeMap.value.name; + // type is defined in the same scope as the current one, no namespace required + if (scope.packageName === typeMap.value.namespace && baseName) { + // if the current scope is the same as the types scope, return without a namespace + return `${prefix}${baseName}`; + } + + // type is defined in another module and requires a namespace and import + if (baseName) { + return `${prefix}${typeMap.value.namespace}.${baseName}`; + } + } else if (typeMap.type === 'union') { + return 'interface{}'; + } else if (typeMap.type === 'void') { + return ''; } // type isn't handled - // TODO: Are there other cases to handle? if not throw an error. - return GO_ANY; + throw new Error( + `Type ${typeMap.value?.name} does not resolve to a known Go type. It is being mapped to "interface{}".`, + ); } } diff --git a/packages/jsii-pacmak/lib/targets/go/types/go-type.ts b/packages/jsii-pacmak/lib/targets/go/types/go-type.ts index 5e59cb827d..f037eab811 100644 --- a/packages/jsii-pacmak/lib/targets/go/types/go-type.ts +++ b/packages/jsii-pacmak/lib/targets/go/types/go-type.ts @@ -1,23 +1,31 @@ import { toPascalCase } from 'codemaker'; -import { EmitContext } from '../emit-context'; import { ClassType, InterfaceType, Type } from 'jsii-reflect'; + +import { EmitContext } from '../emit-context'; import { Package } from '../package'; +import { getMemberDependencies } from '../util'; import { GoTypeRef } from './go-type-reference'; import { GoProperty } from './type-member'; -import { getFieldDependencies } from '../util'; // String appended to all go GoStruct Interfaces -const STRUCT_INTERFACE_SUFFIX = 'Iface'; +export const INTERFACE_TYPE_SUFFIX = 'Iface'; export abstract class GoType { public readonly name: string; + public readonly fqn: string; + public readonly interfaceName: string; public constructor(public pkg: Package, public type: Type) { this.name = toPascalCase(type.name); + this.interfaceName = this.name; + this.fqn = type.fqn; } public abstract emit(context: EmitContext): void; public abstract get dependencies(): Package[]; + public abstract get usesInitPackage(): boolean; + public abstract get usesRuntimePackage(): boolean; + public abstract get usesReflectionPackage(): boolean; public get namespace() { return this.pkg.packageName; @@ -40,11 +48,11 @@ export abstract class GoStruct extends GoType { super(pkg, type); // Flatten any inherited properties on the struct - this.properties = Object.values(this.type.getProperties(true)).map( - (prop) => new GoProperty(this, prop), - ); + this.properties = Object.values(this.type.getProperties(true)) + .filter((prop) => !prop.static) + .map((prop) => new GoProperty(this, prop)); - this.interfaceName = `${this.name}${STRUCT_INTERFACE_SUFFIX}`; + this.interfaceName = `${this.name}${INTERFACE_TYPE_SUFFIX}`; } // `emit` needs to generate both a Go interface and a struct, as well as the Getter methods on the struct @@ -54,6 +62,18 @@ export abstract class GoStruct extends GoType { this.emitGetters(context); } + public get usesInitPackage() { + return this.properties.some((p) => p.usesInitPackage); + } + + public get usesRuntimePackage() { + return this.properties.some((p) => p.usesRuntimePackage); + } + + public get usesReflectionPackage(): boolean { + return this.properties.length > 0; + } + protected emitInterface(context: EmitContext): void { const { code } = context; code.line( @@ -118,7 +138,7 @@ export abstract class GoStruct extends GoType { public get dependencies(): Package[] { return [ ...this.extendsDependencies, - ...getFieldDependencies(this.properties), + ...getMemberDependencies(this.properties), ]; } } diff --git a/packages/jsii-pacmak/lib/targets/go/types/interface.ts b/packages/jsii-pacmak/lib/targets/go/types/interface.ts index 1f9d37fc64..0d854876f1 100644 --- a/packages/jsii-pacmak/lib/targets/go/types/interface.ts +++ b/packages/jsii-pacmak/lib/targets/go/types/interface.ts @@ -1,39 +1,54 @@ -import { toPascalCase } from 'codemaker'; -import { EmitContext } from '../emit-context'; import { InterfaceType, Method, Property } from 'jsii-reflect'; -import { GoType } from './go-type'; -import { GoTypeRef } from './go-type-reference'; + +import { EmitContext } from '../emit-context'; import { Package } from '../package'; -import { GoMethod, GoTypeMember } from './type-member'; -import { getFieldDependencies } from '../util'; +import { MethodCall } from '../runtime'; +import { getMemberDependencies, getParamDependencies } from '../util'; +import { GoType, INTERFACE_TYPE_SUFFIX } from './go-type'; +import { GoTypeRef } from './go-type-reference'; +import { GoMethod, GoProperty } from './type-member'; export class Interface extends GoType { public readonly methods: InterfaceMethod[]; + public readonly inheritedMethods: InterfaceMethod[]; public readonly properties: InterfaceProperty[]; + public readonly inheritedProperties: InterfaceProperty[]; + public readonly interfaceName: string; public constructor(pkg: Package, public type: InterfaceType) { super(pkg, type); this.methods = Object.values(type.getMethods()).map( (method) => new InterfaceMethod(this, method), ); + + this.inheritedMethods = Object.values(type.getMethods(true)).map( + (method) => new InterfaceMethod(this, method), + ); + this.properties = Object.values(type.getProperties()).map( (prop) => new InterfaceProperty(this, prop), ); + + this.inheritedProperties = Object.values(type.getProperties(true)).map( + (prop) => new InterfaceProperty(this, prop), + ); + + this.interfaceName = `${this.name}${INTERFACE_TYPE_SUFFIX}`; } public emit(context: EmitContext) { this.emitDocs(context); const { code } = context; - code.openBlock(`type ${code.toPascalCase(this.name)} interface`); + code.openBlock(`type ${this.interfaceName} interface`); // embed extended interfaces for (const iface of this.extends) { - code.line(iface.scopedName(this.pkg)); + code.line(iface.scopedInterfaceName(this.pkg)); } for (const method of this.methods) { - method.emit(context); + method.emitDecl(context); } for (const prop of this.properties) { @@ -42,6 +57,39 @@ export class Interface extends GoType { code.closeBlock(); code.line(); + + code.line(`type ${this.name} struct {}`); + code.line(); + + for (const method of this.inheritedMethods) { + method.emit(context); + } + + for (const prop of this.inheritedProperties) { + prop.emitGetterImpl(context); + + if (!prop.immutable) { + prop.emitSetterImpl(context); + } + } + } + + public get usesInitPackage() { + return ( + this.properties.some((p) => p.usesInitPackage) || + this.methods.some((m) => m.usesInitPackage) + ); + } + + public get usesRuntimePackage() { + return ( + this.properties.some((p) => p.usesRuntimePackage) || + this.methods.some((m) => m.usesRuntimePackage) + ); + } + + public get usesReflectionPackage(): boolean { + return this.properties.length > 0 || this.methods.length > 0; } public get extends(): GoTypeRef[] { @@ -65,32 +113,26 @@ export class Interface extends GoType { public get dependencies(): Package[] { return [ ...this.extendsDependencies, - ...getFieldDependencies(this.methods), - ...getFieldDependencies(this.properties), + ...getMemberDependencies(this.methods), + ...getParamDependencies(this.methods), + ...getMemberDependencies(this.properties), ]; } } -class InterfaceProperty implements GoTypeMember { - public readonly name: string; - public readonly getter: string; +class InterfaceProperty extends GoProperty { public readonly reference?: GoTypeRef; public constructor( public readonly parent: Interface, - private readonly property: Property, + public readonly property: Property, ) { - this.name = toPascalCase(property.name); - this.getter = `Get${this.name}`; - - if (property.type) { - this.reference = new GoTypeRef(parent.pkg.root, property.type); - } + super(parent, property); } public get returnType(): string { return ( - this.reference?.scopedName(this.parent.pkg) ?? + this.reference?.scopedInterfaceName(this.parent.pkg) ?? this.property.type.toString() ); } @@ -107,19 +149,42 @@ class InterfaceProperty implements GoTypeMember { } class InterfaceMethod extends GoMethod { + public readonly runtimeCall: MethodCall; + public readonly usesInitPackage = false; + public readonly usesRuntimePackage = true; + public constructor( public readonly parent: Interface, public readonly method: Method, ) { super(parent, method); + this.runtimeCall = new MethodCall(this); } - public emit(context: EmitContext) { + public emitDecl(context: EmitContext) { const docs = this.method.docs; if (docs) { context.documenter.emit(docs); } const { code } = context; - code.line(`${this.name}(${this.paramString()})${this.returnType}`); + code.line(`${this.name}(${this.paramString()})${this.returnTypeString}`); + } + + public emit({ code }: EmitContext) { + const name = this.name; + code.openBlock( + `func (${this.instanceArg} *${ + this.parent.name + }) ${name}(${this.paramString()})${this.returnTypeString}`, + ); + + this.runtimeCall.emit(code); + + code.closeBlock(); + code.line(); + } + + private get returnTypeString(): string { + return this.reference?.void ? '' : ` ${this.returnType}`; } } diff --git a/packages/jsii-pacmak/lib/targets/go/types/struct.ts b/packages/jsii-pacmak/lib/targets/go/types/struct.ts index fb6b92ca98..7928ee6542 100644 --- a/packages/jsii-pacmak/lib/targets/go/types/struct.ts +++ b/packages/jsii-pacmak/lib/targets/go/types/struct.ts @@ -1,7 +1,8 @@ -import { GoStruct } from './go-type'; -import { Package } from '../package'; import { InterfaceType } from 'jsii-reflect'; +import { Package } from '../package'; +import { GoStruct } from './go-type'; + /* * Struct wraps a JSII datatype interface aka, structs */ @@ -10,4 +11,12 @@ export class Struct extends GoStruct { super(parent, type); // TODO check if datatype? (isDataType() on jsii-reflect seems wrong) } + + public get usesRuntimePackage(): boolean { + return this.properties.some((p) => p.usesRuntimePackage); + } + + public get usesReflectionPackage() { + return this.properties.length > 0; + } } diff --git a/packages/jsii-pacmak/lib/targets/go/types/type-member.ts b/packages/jsii-pacmak/lib/targets/go/types/type-member.ts index aa11ff3eb1..853b939f5e 100644 --- a/packages/jsii-pacmak/lib/targets/go/types/type-member.ts +++ b/packages/jsii-pacmak/lib/targets/go/types/type-member.ts @@ -1,18 +1,23 @@ import { toPascalCase } from 'codemaker'; import { Method, Parameter, Property } from 'jsii-reflect'; + import { EmitContext } from '../emit-context'; -import { GoClass, GoStruct, Interface, Struct, GoTypeRef } from './index'; -import { emitInitialization } from '../runtime'; +import { GetProperty, SetProperty } from '../runtime'; import { substituteReservedWords } from '../util'; +import { GoClass, GoType, Interface, GoTypeRef } from './index'; + /* * Structure for Class and Interface methods. Useful for sharing logic for dependency resolution */ export interface GoTypeMember { name: string; - parent: GoClass | Interface | Struct; + parent: GoType; reference?: GoTypeRef; returnType: string; + + usesInitPackage: boolean; + usesRuntimePackage: boolean; } /* @@ -23,38 +28,57 @@ export class GoProperty implements GoTypeMember { public readonly name: string; public readonly getter: string; public readonly reference?: GoTypeRef; + public readonly immutable: boolean; public constructor( - public parent: GoStruct, + public parent: GoType, public readonly property: Property, ) { this.name = toPascalCase(this.property.name); this.getter = `Get${this.name}`; + this.immutable = property.immutable; if (property.type) { this.reference = new GoTypeRef(parent.pkg.root, property.type); } } + public get usesInitPackage() { + return this.static; + } + + public get usesRuntimePackage() { + return true; + } + + public get static(): boolean { + return !!this.property.static; + } + public get returnType(): string { return ( - this.reference?.scopedName(this.parent.pkg) ?? + this.reference?.scopedInterfaceName(this.parent.pkg) ?? this.property.type.toString() ); } + public get instanceArg(): string { + return this.parent.name.substring(0, 1).toLowerCase(); + } + public emitStructMember(context: EmitContext) { const docs = this.property.docs; if (docs) { context.documenter.emit(docs); } const { code } = context; - // If struct property is type of parent struct, use a pointer as type to avoid recursive struct type error - if (this.reference?.type?.name === this.parent.name) { - code.line(`${this.name} *${this.returnType}`); - } else { - code.line(`${this.name} ${this.returnType}`); - } + const memberType = + this.reference?.type?.name === this.parent.name + ? `*${this.returnType}` + : this.returnType; + + // Adds json tags for easy deserialization + code.line(`${this.name} ${memberType} \`json:"${this.property.name}"\``); // TODO add newline if not the last member } @@ -65,7 +89,7 @@ export class GoProperty implements GoTypeMember { public emitSetterDecl(context: EmitContext) { const { code } = context; - if (!this.property.protected) { + if (!this.property.protected && !this.immutable) { code.line(`Set${this.name}(val ${this.returnType})`); } } @@ -82,39 +106,27 @@ export class GoProperty implements GoTypeMember { }()${` ${this.returnType}`}`, ); - if (this.property.static) { - emitInitialization(code); - } + new GetProperty(this).emit(code); - if (this.parent.name === this.returnType) { - code.line(`return *${instanceArg}.${this.name}`); - } else { - code.line(`return ${instanceArg}.${this.name}`); - } code.closeBlock(); code.line(); } public emitSetterImpl(context: EmitContext) { - const { code } = context; - const receiver = this.parent.name; - const instanceArg = receiver.substring(0, 1).toLowerCase(); + if (!this.immutable) { + const { code } = context; + const receiver = this.parent.name; + const instanceArg = receiver.substring(0, 1).toLowerCase(); - code.openBlock( - `func (${instanceArg} *${receiver}) Set${this.name}(val ${this.returnType})`, - ); + code.openBlock( + `func (${instanceArg} *${receiver}) Set${this.name}(val ${this.returnType})`, + ); - if (this.property.static) { - emitInitialization(code); - } + new SetProperty(this).emit(code); - if (this.parent.name === this.returnType) { - code.line(`${instanceArg}.${this.name} = &val`); - } else { - code.line(`${instanceArg}.${this.name} = val`); + code.closeBlock(); + code.line(); } - code.closeBlock(); - code.line(); } } @@ -138,15 +150,43 @@ export abstract class GoMethod implements GoTypeMember { } public abstract emit(context: EmitContext): void; + public abstract get usesInitPackage(): boolean; + public abstract get usesRuntimePackage(): boolean; + + public get returnsRef(): boolean { + if ( + this.reference?.type?.type.isClassType() || + this.reference?.type?.type.isInterfaceType() + ) { + return true; + } + + return false; + } public get returnType(): string { - const ret = this.method.returns.type.void - ? '' - : this.reference?.scopedName(this.parent.pkg) ?? this.method.toString(); - if (ret !== '') { - return ` ${ret}`; + return ( + this.reference?.scopedInterfaceName(this.parent.pkg) ?? + this.method.toString() + ); + } + + public get concreteReturnType(): string { + if (this.returnsRef) { + return ( + this.reference?.scopedReferenceName(this.parent.pkg) ?? + this.method.toString() + ); } - return ret; + + return ( + this.reference?.scopedInterfaceName(this.parent.pkg) ?? + this.method.toString() + ); + } + + public get instanceArg(): string { + return this.parent.name.substring(0, 1).toLowerCase(); } public paramString(): string { @@ -159,6 +199,7 @@ export abstract class GoMethod implements GoTypeMember { export class GoParameter { public readonly name: string; public readonly reference: GoTypeRef; + public constructor( public parent: GoClass | Interface, public readonly parameter: Parameter, @@ -166,10 +207,9 @@ export class GoParameter { this.name = substituteReservedWords(parameter.name); this.reference = new GoTypeRef(parent.pkg.root, parameter.type); } + public toString(): string { - const paramType = this.reference.scopedName(this.parent.pkg); + const paramType = this.reference.scopedInterfaceName(this.parent.pkg); return `${this.name} ${paramType}`; } - - // return parameters.length === 0 ? '' : parameters.join(', '); } diff --git a/packages/jsii-pacmak/lib/targets/go/util.ts b/packages/jsii-pacmak/lib/targets/go/util.ts index cd484d4fa1..56bc2e6e54 100644 --- a/packages/jsii-pacmak/lib/targets/go/util.ts +++ b/packages/jsii-pacmak/lib/targets/go/util.ts @@ -1,5 +1,5 @@ import { Package } from './package'; -import { GoTypeMember, GoType } from './types'; +import { GoMethod, GoTypeMember, GoType } from './types'; /* * Recursively search module for type with fqn @@ -15,7 +15,7 @@ export function findTypeInTree( } return module.submodules.reduce((accum: GoType | undefined, sm) => { - return accum || findTypeInTree(sm, fqn); + return accum ?? findTypeInTree(sm, fqn); }, undefined); } @@ -38,15 +38,26 @@ export function flatMap( /* * Return module dependencies of a class or interface members */ -export function getFieldDependencies(fields: GoTypeMember[]): Package[] { - return fields.reduce((accum: Package[], field) => { - return field.reference?.type?.pkg - ? [...accum, field.reference?.type.pkg] +export function getMemberDependencies(members: GoTypeMember[]): Package[] { + return members.reduce((accum: Package[], member) => { + return member.reference?.type?.pkg + ? [...accum, member.reference?.type.pkg] : accum; }, []); } -// TODO: add getParameterDependency utility function +export function getParamDependencies(methods: GoMethod[]): Package[] { + const dependencies: Package[] = []; + for (const method of methods) { + for (const param of method.parameters) { + const pkg = param.reference?.type?.pkg; + if (pkg) { + dependencies.push(pkg); + } + } + } + return dependencies; +} const RESERVED_WORDS: { [word: string]: string } = { break: 'break_', diff --git a/packages/jsii-pacmak/lib/targets/go/version-file.ts b/packages/jsii-pacmak/lib/targets/go/version-file.ts new file mode 100644 index 0000000000..223126f8d9 --- /dev/null +++ b/packages/jsii-pacmak/lib/targets/go/version-file.ts @@ -0,0 +1,17 @@ +import { CodeMaker } from 'codemaker'; + +/** + * Represents the version of the go module. This is needed because the version is not + * available in standard go module files. + */ +export class VersionFile { + private static readonly NAME = 'version'; + + public constructor(private readonly version: string) {} + + public emit(code: CodeMaker) { + code.openFile(VersionFile.NAME); + code.line(this.version); + code.closeFile(VersionFile.NAME); + } +} diff --git a/packages/jsii-pacmak/lib/targets/index.ts b/packages/jsii-pacmak/lib/targets/index.ts index 47720bde91..bfe42fd116 100644 --- a/packages/jsii-pacmak/lib/targets/index.ts +++ b/packages/jsii-pacmak/lib/targets/index.ts @@ -1,24 +1,30 @@ import { OneByOneBuilder, TargetBuilder, BuildOptions } from '../builder'; - +import { JsiiModule } from '../packaging'; import { DotnetBuilder } from './dotnet'; import { Golang } from './go'; import { JavaBuilder } from './java'; import JavaScript from './js'; import Python from './python'; -import { JsiiModule } from '../packaging'; -export type TargetName = 'dotnet' | 'go' | 'java' | 'js' | 'python'; +export enum TargetName { + DOTNET = 'dotnet', + GO = 'go', + JAVA = 'java', + JAVASCRIPT = 'js', + PYTHON = 'python', +} + export type BuilderFactory = ( - modules: JsiiModule[], + modules: readonly JsiiModule[], options: BuildOptions, ) => TargetBuilder; export const ALL_BUILDERS: { [key in TargetName]: BuilderFactory } = { dotnet: (ms, o) => new DotnetBuilder(ms, o), - go: (ms, o) => new OneByOneBuilder('golang', Golang, ms, o), + go: (ms, o) => new OneByOneBuilder(TargetName.GO, 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), + js: (ms, o) => new OneByOneBuilder(TargetName.JAVASCRIPT, JavaScript, ms, o), + python: (ms, o) => new OneByOneBuilder(TargetName.PYTHON, Python, ms, o), }; export const INCOMPLETE_DISCLAIMER_COMPILING = diff --git a/packages/jsii-pacmak/lib/targets/java.ts b/packages/jsii-pacmak/lib/targets/java.ts index fd96e469ea..78185e5de3 100644 --- a/packages/jsii-pacmak/lib/targets/java.ts +++ b/packages/jsii-pacmak/lib/targets/java.ts @@ -1,3 +1,4 @@ +import * as spec from '@jsii/spec'; import * as clone from 'clone'; import { toPascalCase, toSnakeCase } from 'codemaker/lib/case-utils'; import * as fs from 'fs-extra'; @@ -6,29 +7,32 @@ import { Rosetta, typeScriptSnippetFromSource, Translation, + enforcesStrictMode, markDownToJavaDoc, } from 'jsii-rosetta'; -import * as spec from '@jsii/spec'; import * as path from 'path'; import * as xmlbuilder from 'xmlbuilder'; + +import { TargetBuilder, BuildOptions } from '../builder'; import { Generator } from '../generator'; +import * as logging from '../logging'; +import { JsiiModule } from '../packaging'; import { PackageInfo, Target, findLocalBuildDirs, TargetOptions, } from '../target'; -import * as logging from '../logging'; import { shell, Scratch, slugify, setExtend } from '../util'; -import { TargetBuilder, BuildOptions } from '../builder'; -import { JsiiModule } from '../packaging'; import { VERSION, VERSION_DESC } from '../version'; -import { toMavenVersionRange } from './version-utils'; +import { stabilityPrefixFor, renderSummary } from './_utils'; +import { toMavenVersionRange, toReleaseVersion } from './version-utils'; + import { INCOMPLETE_DISCLAIMER_COMPILING, INCOMPLETE_DISCLAIMER_NONCOMPILING, + TargetName, } from '.'; -import { stabilityPrefixFor, renderSummary } from './_utils'; // eslint-disable-next-line @typescript-eslint/no-var-requires,@typescript-eslint/no-require-imports const spdxLicenseList = require('spdx-license-list'); @@ -37,6 +41,7 @@ const BUILDER_CLASS_NAME = 'Builder'; const ANN_NOT_NULL = '@org.jetbrains.annotations.NotNull'; const ANN_NULLABLE = '@org.jetbrains.annotations.Nullable'; +const ANN_INTERNAL = '@software.amazon.jsii.Internal'; /** * Build Java packages all together, by generating an aggregate POM @@ -51,7 +56,7 @@ export class JavaBuilder implements TargetBuilder { private readonly targetName = 'java'; public constructor( - private readonly modules: JsiiModule[], + private readonly modules: readonly JsiiModule[], private readonly options: BuildOptions, ) {} @@ -121,7 +126,7 @@ export class JavaBuilder implements TargetBuilder { } private async generateAggregateSourceDir( - modules: JsiiModule[], + modules: readonly JsiiModule[], options: BuildOptions, ): Promise> { return Scratch.make(async (tmpDir: string) => { @@ -366,6 +371,7 @@ export default class Java extends Target { ): { [language: string]: PackageInfo } { const groupId = assm.targets!.java!.maven.groupId; const artifactId = assm.targets!.java!.maven.artifactId; + const releaseVersion = toReleaseVersion(assm.version, TargetName.JAVA); const url = `https://repo1.maven.org/maven2/${groupId.replace( /\./g, '/', @@ -379,12 +385,12 @@ export default class Java extends Target { language: 'xml', code: xmlbuilder .create({ - dependency: { groupId, artifactId, version: assm.version }, + dependency: { groupId, artifactId, version: releaseVersion }, }) .end({ pretty: true }) .replace(/<\?\s*xml(\s[^>]+)?>\s*/m, ''), }, - 'Apache Buildr': `'${groupId}:${artifactId}:jar:${assm.version}'`, + 'Apache Buildr': `'${groupId}:${artifactId}:jar:${releaseVersion}'`, 'Apache Ivy': { language: 'xml', code: xmlbuilder @@ -392,14 +398,14 @@ export default class Java extends Target { dependency: { '@groupId': groupId, '@name': artifactId, - '@rev': assm.version, + '@rev': releaseVersion, }, }) .end({ pretty: true }) .replace(/<\?\s*xml(\s[^>]+)?>\s*/m, ''), }, - 'Groovy Grape': `@Grapes(\n@Grab(group='${groupId}', module='${artifactId}', version='${assm.version}')\n)`, - 'Gradle / Grails': `compile '${groupId}:${artifactId}:${assm.version}'`, + 'Groovy Grape': `@Grapes(\n@Grab(group='${groupId}', module='${artifactId}', version='${releaseVersion}')\n)`, + 'Gradle / Grails': `compile '${groupId}:${artifactId}:${releaseVersion}'`, }, }, }; @@ -461,6 +467,7 @@ export default class Java extends Target { const MODULE_CLASS_NAME = '$Module'; const INTERFACE_PROXY_CLASS_NAME = 'Jsii$Proxy'; +const INTERFACE_DEFAULT_CLASS_NAME = 'Jsii$Default'; // Struct that stores metadata about a property that can be used in Java code generation. interface JavaProp { @@ -665,7 +672,8 @@ class JavaGenerator extends Generator { protected onEndClass(cls: spec.ClassType) { if (cls.abstract) { - this.emitProxy(cls); + const type = this.reflectAssembly.findType(cls.fqn) as reflect.ClassType; + this.emitProxy(type); } else { this.emitClassBuilder(cls); } @@ -828,7 +836,16 @@ class JavaGenerator extends Generator { if (ifc.datatype) { this.emitDataType(ifc); } else { - this.emitProxy(ifc); + const type = this.reflectAssembly.findType( + ifc.fqn, + ) as reflect.InterfaceType; + + this.emitProxy(type); + // We don't emit Jsii$Default if the assembly opted out of it explicitly. + // This is mostly to facilitate compatibility testing... + if (hasDefaultInterfaces(this.reflectAssembly)) { + this.emitDefaultImplementation(type); + } } this.code.closeBlock(); @@ -1020,7 +1037,7 @@ class JavaGenerator extends Generator { { groupId: 'org.apache.maven.plugins', artifactId: 'maven-javadoc-plugin', - version: '3.1.1', + version: '3.2.0', executions: { execution: { id: 'attach-javadocs', @@ -1063,7 +1080,7 @@ class JavaGenerator extends Generator { { groupId: 'org.codehaus.mojo', artifactId: 'versions-maven-plugin', - version: '2.7', + version: '2.8.1', configuration: { generateBackupPoms: false, }, @@ -1088,7 +1105,7 @@ class JavaGenerator extends Generator { */ function makeVersion(version: string, suffix?: string): string { if (!suffix) { - return version; + return toReleaseVersion(version, TargetName.JAVA); } if (!suffix.startsWith('-') && !suffix.startsWith('.')) { throw new Error( @@ -1226,8 +1243,17 @@ class JavaGenerator extends Generator { private emitProperty( cls: spec.Type, prop: spec.Property, - includeGetter = true, - overrides = !!prop.overrides, + { + defaultImpl = false, + final = false, + includeGetter = true, + overrides = !!prop.overrides, + }: { + defaultImpl?: boolean; + final?: boolean; + includeGetter?: boolean; + overrides?: boolean; + } = {}, ) { const getterType = this.toDecoratedJavaType(prop); const setterTypes = this.toDecoratedJavaTypes(prop, { @@ -1236,29 +1262,34 @@ class JavaGenerator extends Generator { const propName = this.code.toPascalCase( JavaGenerator.safeJavaPropertyName(prop.name), ); - const access = this.renderAccessLevel(prop); - const statc = prop.static ? 'static ' : ''; - const abstract = prop.abstract ? 'abstract ' : ''; + + const modifiers = [defaultImpl ? 'default' : this.renderAccessLevel(prop)]; + if (prop.static) modifiers.push('static'); + if (prop.abstract && !defaultImpl) modifiers.push('abstract'); + if (final && !prop.abstract && !defaultImpl) modifiers.push('final'); + const javaClass = this.toJavaType(cls); // for unions we only generate overloads for setters, not getters. if (includeGetter) { this.code.line(); this.addJavaDocs(prop); - if (overrides) { + if (overrides && !prop.static) { this.code.line('@Override'); } this.emitStabilityAnnotations(prop); - const signature = `${access} ${abstract}${statc}${getterType} get${propName}()`; - if (prop.abstract) { + const signature = `${modifiers.join(' ')} ${getterType} get${propName}()`; + if (prop.abstract && !defaultImpl) { this.code.line(`${signature};`); } else { this.code.openBlock(signature); let statement; if (prop.static) { - statement = `software.amazon.jsii.JsiiObject.jsiiStaticGet(${javaClass}.class, `; + statement = `software.amazon.jsii.JsiiObject.jsiiStaticGet(${this.toJavaType( + cls, + )}.class, `; } else { - statement = 'this.jsiiGet('; + statement = 'software.amazon.jsii.Kernel.get(this, '; } statement += `"${prop.name}", ${this.toNativeType(prop.type, { @@ -1276,12 +1307,14 @@ class JavaGenerator extends Generator { for (const type of setterTypes) { this.code.line(); this.addJavaDocs(prop); - if (overrides) { + if (overrides && !prop.static) { this.code.line('@Override'); } this.emitStabilityAnnotations(prop); - const signature = `${access} ${abstract}${statc}void set${propName}(final ${type} value)`; - if (prop.abstract) { + const signature = `${modifiers.join( + ' ', + )} void set${propName}(final ${type} value)`; + if (prop.abstract && !defaultImpl) { this.code.line(`${signature};`); } else { this.code.openBlock(signature); @@ -1290,7 +1323,7 @@ class JavaGenerator extends Generator { if (prop.static) { statement += `software.amazon.jsii.JsiiObject.jsiiStaticSet(${javaClass}.class, `; } else { - statement += 'this.jsiiSet('; + statement += 'software.amazon.jsii.Kernel.set(this, '; } const value = prop.optional ? 'value' @@ -1306,13 +1339,23 @@ class JavaGenerator extends Generator { private emitMethod( cls: spec.Type, method: spec.Method, - overrides = !!method.overrides, + { + defaultImpl = false, + final = false, + overrides = !!method.overrides, + }: { defaultImpl?: boolean; final?: boolean; overrides?: boolean } = {}, ) { const returnType = method.returns ? this.toDecoratedJavaType(method.returns) : 'void'; - const statc = method.static ? 'static ' : ''; - const access = this.renderAccessLevel(method); + + const modifiers = [ + defaultImpl ? 'default' : this.renderAccessLevel(method), + ]; + if (method.static) modifiers.push('static'); + if (method.abstract && !defaultImpl) modifiers.push('abstract'); + if (final && !method.abstract && !defaultImpl) modifiers.push('final'); + const async = !!method.async; const methodName = JavaGenerator.safeJavaMethodName(method.name); const signature = `${returnType} ${methodName}(${this.renderMethodParameters( @@ -1321,13 +1364,13 @@ class JavaGenerator extends Generator { this.code.line(); this.addJavaDocs(method); this.emitStabilityAnnotations(method); - if (overrides) { + if (overrides && !method.static) { this.code.line('@Override'); } - if (method.abstract) { - this.code.line(`${access} abstract ${signature};`); + if (method.abstract && !defaultImpl) { + this.code.line(`${modifiers.join(' ')} ${signature};`); } else { - this.code.openBlock(`${access} ${statc}${signature}`); + this.code.openBlock(`${modifiers.join(' ')} ${signature}`); this.code.line(this.renderMethodCall(cls, method, async)); this.code.closeBlock(); } @@ -1342,7 +1385,7 @@ class JavaGenerator extends Generator { * These proxies are also used to extend abstract classes to allow the JSII * engine to instantiate an abstract class in Java. */ - private emitProxy(ifc: spec.InterfaceType | spec.ClassType) { + private emitProxy(type: reflect.InterfaceType | reflect.ClassType) { const name = INTERFACE_PROXY_CLASS_NAME; this.code.line(); @@ -1352,87 +1395,118 @@ class JavaGenerator extends Generator { ); this.code.line(' */'); - const suffix = - ifc.kind === spec.TypeKind.Interface - ? `extends software.amazon.jsii.JsiiObject implements ${this.toNativeFqn( - ifc.fqn, - )}` - : `extends ${this.toNativeFqn(ifc.fqn)}`; + const baseInterfaces = this.defaultInterfacesFor(type, { + includeThisType: true, + }); + + if (type.isInterfaceType() && !hasDefaultInterfaces(type.assembly)) { + // Extend this interface directly since this module does not have the Jsii$Default + baseInterfaces.push(this.toNativeFqn(type.fqn)); + } + + const suffix = type.isInterfaceType() + ? `extends software.amazon.jsii.JsiiObject implements ${baseInterfaces.join( + ', ', + )}` + : `extends ${this.toNativeFqn(type.fqn)}${ + baseInterfaces.length > 0 + ? ` implements ${baseInterfaces.join(', ')}` + : '' + }`; - this.code.openBlock(`final static class ${name} ${suffix}`); + const modifiers = type.isInterfaceType() ? 'final' : 'private static final'; + + this.code.line(ANN_INTERNAL); + this.code.openBlock(`${modifiers} class ${name} ${suffix}`); this.code.openBlock( `protected ${name}(final software.amazon.jsii.JsiiObjectRef objRef)`, ); this.code.line('super(objRef);'); this.code.closeBlock(); - // compile a list of all unique methods from the current interface and all - // base interfaces (and their bases). - const methods: { [name: string]: spec.Method } = {}; - const properties: { [name: string]: spec.Property } = {}; - const collectAbstractMembers = ( - currentType: spec.InterfaceType | spec.ClassType, - ) => { - for (const prop of currentType.properties ?? []) { - if (prop.abstract) { - properties[prop.name] = prop; - } - } - for (const method of currentType.methods ?? []) { - if (method.abstract) { - methods[method.name] = method; - } - } - - const bases = new Array(); - bases.push( - ...(currentType.interfaces ?? []).map((iface) => this.findType(iface)), - ); - if (currentType.kind === spec.TypeKind.Class && currentType.base) { - bases.push(this.findType(currentType.base)); - } - for (const base of bases) { - const type = this.findType(base.fqn); - if ( - type.kind !== spec.TypeKind.Interface && - type.kind !== spec.TypeKind.Class - ) { - throw new Error( - `Base interfaces of an interface must be an interface or a class (${base.fqn} is of type ${type.kind})`, - ); - } - collectAbstractMembers(type); - } - }; - collectAbstractMembers(ifc); - // emit all properties - for (const propName of Object.keys(properties)) { - const prop = clone(properties[propName]); + for (const reflectProp of type.allProperties.filter( + (prop) => + prop.abstract && + (prop.parentType.fqn === type.fqn || + prop.parentType.isClassType() || + !hasDefaultInterfaces(prop.assembly)), + )) { + const prop = clone(reflectProp.spec); prop.abstract = false; - this.emitProperty( - ifc, - prop, - /* includeGetter: */ undefined, - /* overrides: */ true, - ); + // Emitting "final" since this is a proxy and nothing will/should override this + this.emitProperty(type.spec, prop, { final: true, overrides: true }); } // emit all the methods - for (const methodName of Object.keys(methods)) { - const method = clone(methods[methodName]); + for (const reflectMethod of type.allMethods.filter( + (method) => + method.abstract && + (method.parentType.fqn === type.fqn || + method.parentType.isClassType() || + !hasDefaultInterfaces(method.assembly)), + )) { + const method = clone(reflectMethod.spec); method.abstract = false; - this.emitMethod(ifc, method, /* overrides: */ true); + // Emitting "final" since this is a proxy and nothing will/should override this + this.emitMethod(type.spec, method, { final: true, overrides: true }); for (const overloadedMethod of this.createOverloadsForOptionals(method)) { overloadedMethod.abstract = false; - this.emitMethod(ifc, overloadedMethod, /* overrides: */ true); + this.emitMethod(type.spec, overloadedMethod, { + final: true, + overrides: true, + }); } } this.code.closeBlock(); } + private emitDefaultImplementation(type: reflect.InterfaceType) { + const baseInterfaces = [type.name, ...this.defaultInterfacesFor(type)]; + + this.code.line(); + this.code.line('/**'); + this.code.line( + ` * Internal default implementation for {@link ${type.name}}.`, + ); + this.code.line(' */'); + this.code.line(ANN_INTERNAL); + this.code.openBlock( + `interface ${INTERFACE_DEFAULT_CLASS_NAME} extends ${baseInterfaces + .sort() + .join(', ')}`, + ); + + for (const property of type.allProperties.filter( + (prop) => + prop.abstract && + // Only checking the getter - java.lang.Object has no setters. + !isJavaLangObjectMethodName(`get${toPascalCase(prop.name)}`) && + (prop.parentType.fqn === type.fqn || + !hasDefaultInterfaces(prop.assembly)), + )) { + this.emitProperty(type.spec, property.spec, { + defaultImpl: true, + overrides: type.isInterfaceType(), + }); + } + for (const method of type.allMethods.filter( + (method) => + method.abstract && + !isJavaLangObjectMethodName(method.name) && + (method.parentType.fqn === type.fqn || + !hasDefaultInterfaces(method.assembly)), + )) { + this.emitMethod(type.spec, method.spec, { + defaultImpl: true, + overrides: type.isInterfaceType(), + }); + } + this.code.closeBlock(); + } + private emitStabilityAnnotations(entity: spec.Documentable) { if (!entity.docs) { return; @@ -1487,7 +1561,7 @@ class JavaGenerator extends Generator { forMarshalling: true, })}.class`, javaTypes: this.toJavaTypes(property.type, { covariant: true }), - immutable: property.immutable || false, + immutable: property.immutable ?? false, inherited, }; } @@ -1855,6 +1929,7 @@ class JavaGenerator extends Generator { this.code.line(` * An implementation for {@link ${ifc.name}}`); this.code.line(' */'); this.emitStabilityAnnotations(ifc); + this.code.line(ANN_INTERNAL); this.code.openBlock( `final class ${INTERFACE_PROXY_CLASS_NAME} extends software.amazon.jsii.JsiiObject implements ${ifc.name}`, ); @@ -1878,7 +1953,7 @@ class JavaGenerator extends Generator { this.code.line('super(objRef);'); props.forEach((prop) => this.code.line( - `this.${prop.fieldName} = this.jsiiGet("${prop.jsiiName}", ${prop.fieldNativeType});`, + `this.${prop.fieldName} = software.amazon.jsii.Kernel.get(this, "${prop.jsiiName}", ${prop.fieldNativeType});`, ), ); this.code.closeBlock(); @@ -1898,7 +1973,7 @@ class JavaGenerator extends Generator { .map((prop) => `final ${prop.paramJavaType} ${prop.fieldName}`) .join(', '); this.code.openBlock( - `private ${INTERFACE_PROXY_CLASS_NAME}(${constructorArgs})`, + `protected ${INTERFACE_PROXY_CLASS_NAME}(${constructorArgs})`, ); this.code.line( 'super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);', @@ -1922,7 +1997,9 @@ class JavaGenerator extends Generator { props.forEach((prop) => { this.code.line(); this.code.line('@Override'); - this.code.openBlock(`public ${prop.fieldJavaType} get${prop.propName}()`); + this.code.openBlock( + `public final ${prop.fieldJavaType} get${prop.propName}()`, + ); this.code.line(`return this.${prop.fieldName};`); this.code.closeBlock(); }); @@ -1930,6 +2007,7 @@ class JavaGenerator extends Generator { // emit $jsii$toJson which will be called to serialize this object when sent to JS this.code.line(); this.code.line('@Override'); + this.code.line(ANN_INTERNAL); this.code.openBlock( 'public com.fasterxml.jackson.databind.JsonNode $jsii$toJson()', ); @@ -1937,7 +2015,7 @@ class JavaGenerator extends Generator { 'final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE;', ); this.code.line( - 'final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();', + `final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();`, ); this.code.line(); @@ -1996,12 +2074,14 @@ class JavaGenerator extends Generator { this.code.line(); this.code.line('@Override'); - this.code.openBlock('public boolean equals(Object o)'); + this.code.openBlock('public final boolean equals(final Object o)'); this.code.line('if (this == o) return true;'); + // This was already checked by `super.equals(o)`, so we skip it here... this.code.line( 'if (o == null || getClass() != o.getClass()) return false;', ); + this.code.line(); this.code.line( `${className}.${INTERFACE_PROXY_CLASS_NAME} that = (${className}.${INTERFACE_PROXY_CLASS_NAME}) o;`, @@ -2037,7 +2117,7 @@ class JavaGenerator extends Generator { this.code.line(); this.code.line('@Override'); - this.code.openBlock('public int hashCode()'); + this.code.openBlock('public final int hashCode()'); const firstProp = props[0]; const remainingProps = props.slice(1); @@ -2173,7 +2253,7 @@ class JavaGenerator extends Generator { const method = doc as spec.Method; if (method.parameters) { for (const param of method.parameters) { - const summary = param.docs?.summary || undefined; + const summary = param.docs?.summary; tagLines.push(paramJavadoc(param.name, param.optional, summary)); } } @@ -2242,13 +2322,12 @@ class JavaGenerator extends Generator { private toNativeType( type: spec.TypeReference, - { forMarshalling = false, covariant = false, recursing = false } = {}, + { forMarshalling = false, covariant = false } = {}, ): string { if (spec.isCollectionTypeReference(type)) { const nativeElementType = this.toNativeType(type.collection.elementtype, { forMarshalling, covariant, - recursing: true, }); switch (type.collection.kind) { case spec.CollectionKind.Array: @@ -2261,12 +2340,10 @@ class JavaGenerator extends Generator { ); } } - return recursing - ? `software.amazon.jsii.NativeType.forClass(${this.toJavaType(type, { - forMarshalling, - covariant, - })}.class)` - : `${this.toJavaType(type, { forMarshalling, covariant })}.class`; + return `software.amazon.jsii.NativeType.forClass(${this.toJavaType(type, { + forMarshalling, + covariant, + })}.class)`; } private toJavaTypes( @@ -2390,11 +2467,9 @@ class JavaGenerator extends Generator { const javaClass = this.toJavaType(cls); statement += `software.amazon.jsii.JsiiObject.jsiiStaticCall(${javaClass}.class, `; } else { - if (async) { - statement += 'this.jsiiAsyncCall('; - } else { - statement += 'this.jsiiCall('; - } + statement += `software.amazon.jsii.Kernel.${ + async ? 'asyncCall' : 'call' + }(this, `; } statement += `"${method.name}"`; @@ -2530,6 +2605,7 @@ class JavaGenerator extends Generator { this.code.line('import software.amazon.jsii.JsiiModule;'); this.code.line(); + this.code.line(ANN_INTERNAL); this.code.openBlock( `public final class ${MODULE_CLASS_NAME} extends JsiiModule`, ); @@ -2673,10 +2749,10 @@ class JavaGenerator extends Generator { return this.getNativeName(depMod, name.join('.'), mod); } - const { packageName, typeName } = this.toNativeName( - this.assembly, - this.assembly.types![fqn], - ); + const { packageName, typeName } = + fqn === this.assembly.name + ? this.toNativeName(this.assembly) + : this.toNativeName(this.assembly, this.assembly.types![fqn]); const className = typeName && binaryName ? typeName.replace('.', '$') : typeName; return `${packageName}${className ? `.${className}` : ''}`; @@ -2697,7 +2773,9 @@ class JavaGenerator extends Generator { return `${javaPackage}${tail ? `.${tail}` : ''}`; } - private toNativeName(assm: spec.Assembly): { packageName: string }; + private toNativeName( + assm: spec.Assembly, + ): { packageName: string; typeName: undefined }; private toNativeName( assm: spec.Assembly, type: spec.Type, @@ -2746,7 +2824,11 @@ class JavaGenerator extends Generator { } private convertExample(example: string): string { - const snippet = typeScriptSnippetFromSource(example, 'example'); + const snippet = typeScriptSnippetFromSource( + example, + 'example', + enforcesStrictMode(this.assembly), + ); const translated = this.rosetta.translateSnippet(snippet, 'java'); if (!translated) { return example; @@ -2758,6 +2840,7 @@ class JavaGenerator extends Generator { return this.rosetta.translateSnippetsInMarkdown( markdown, 'java', + enforcesStrictMode(this.assembly), (trans) => ({ language: trans.language, source: this.prefixDisclaimer(trans), @@ -2774,6 +2857,51 @@ class JavaGenerator extends Generator { } return translated.source; } + + /** + * Fins the Java FQN of the default implementation interfaces that should be implemented when a new + * default interface or proxy class is being emitted. + * + * @param type the type for which a default interface or proxy is emitted. + * @param includeThisType whether this class's default interface should be included or not. + * + * @returns a list of Java fully qualified class names. + */ + private defaultInterfacesFor( + type: reflect.ClassType | reflect.InterfaceType, + { includeThisType = false }: { includeThisType?: boolean } = {}, + ): string[] { + const result = new Set(); + + if ( + includeThisType && + hasDefaultInterfaces(type.assembly) && + type.isInterfaceType() + ) { + result.add( + `${this.toNativeFqn(type.fqn)}.${INTERFACE_DEFAULT_CLASS_NAME}`, + ); + } else { + for (const iface of type.interfaces) { + if (hasDefaultInterfaces(iface.assembly)) { + result.add( + `${this.toNativeFqn(iface.fqn)}.${INTERFACE_DEFAULT_CLASS_NAME}`, + ); + } else { + for (const item of this.defaultInterfacesFor(iface)) { + result.add(item); + } + } + } + if (type.isClassType() && type.base != null) { + for (const item of this.defaultInterfacesFor(type.base)) { + result.add(item); + } + } + } + + return Array.from(result); + } } /** @@ -2902,3 +3030,39 @@ function resolvePackageName( } return { javaPackage }; } + +/** + * Determines whether the provided assembly exposes the "hasDefaultInterfaces" + * jsii-pacmak feature flag. + * + * @param assembly the assembly that is tested + * + * @returns true if the Jsii$Default interfaces can be used + */ +function hasDefaultInterfaces(assembly: reflect.Assembly): boolean { + return !!assembly.metadata?.jsii?.pacmak?.hasDefaultInterfaces; +} + +/** + * Whecks whether a name corresponds to a method on `java.lang.Object`. It is not + * possible to emit default interface implementation for those names because + * these would always be replaced by the implementations on `Object`. + * + * @param name the checked name + * + * @returns `true` if a default implementation cannot be generated for this name. + */ +function isJavaLangObjectMethodName(name: string): boolean { + return JAVA_LANG_OBJECT_METHOD_NAMES.has(name); +} +const JAVA_LANG_OBJECT_METHOD_NAMES = new Set([ + 'clone', + 'equals', + 'finalize', + 'getClass', + 'hashCode', + 'notify', + 'notifyAll', + 'toString', + 'wait', +]); diff --git a/packages/jsii-pacmak/lib/targets/js.ts b/packages/jsii-pacmak/lib/targets/js.ts index db5740dd6f..3de5d49d0c 100644 --- a/packages/jsii-pacmak/lib/targets/js.ts +++ b/packages/jsii-pacmak/lib/targets/js.ts @@ -1,26 +1,35 @@ import * as spec from '@jsii/spec'; + import { Generator } from '../generator'; import { PackageInfo, Target } from '../target'; +import { toReleaseVersion } from './version-utils'; + +import { TargetName } from '.'; export default class JavaScript extends Target { public static toPackageInfos( assm: spec.Assembly, ): { [language: string]: PackageInfo } { + const releaseVersion = toReleaseVersion( + assm.version, + TargetName.JAVASCRIPT, + ); + const packageInfo: PackageInfo = { repository: 'NPM', - url: `https://www.npmjs.com/package/${assm.name}/v/${assm.version}`, + url: `https://www.npmjs.com/package/${assm.name}/v/${releaseVersion}`, usage: { 'package.json': { language: 'js', - code: JSON.stringify({ [assm.name]: `^${assm.version}` }, null, 2), + code: JSON.stringify({ [assm.name]: `^${releaseVersion}` }, null, 2), }, npm: { language: 'console', - code: `$ npm i ${assm.name}@${assm.version}`, + code: `$ npm i ${assm.name}@${releaseVersion}`, }, yarn: { language: 'console', - code: `$ yarn add ${assm.name}@${assm.version}`, + code: `$ yarn add ${assm.name}@${releaseVersion}`, }, }, }; diff --git a/packages/jsii-pacmak/lib/targets/python.ts b/packages/jsii-pacmak/lib/targets/python.ts index d33588d760..dfdc4e4b88 100644 --- a/packages/jsii-pacmak/lib/targets/python.ts +++ b/packages/jsii-pacmak/lib/targets/python.ts @@ -1,24 +1,22 @@ -import * as fs from 'fs-extra'; -import * as path from 'path'; 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 { Generator, GeneratorOptions } from '../generator'; -import { warn } from '../logging'; -import { md2rst } from '../markdown'; -import { Target, TargetOptions } from '../target'; -import { shell } from '../util'; import { Translation, Rosetta, + enforcesStrictMode, typeScriptSnippetFromSource, } from 'jsii-rosetta'; -import { toPythonVersionRange } from './version-utils'; -import { - INCOMPLETE_DISCLAIMER_COMPILING, - INCOMPLETE_DISCLAIMER_NONCOMPILING, -} from '.'; +import * as path from 'path'; + +import { Generator, GeneratorOptions } from '../generator'; +import { warn } from '../logging'; +import { md2rst } from '../markdown'; +import { Target, TargetOptions } from '../target'; +import { shell } from '../util'; +import { renderSummary } from './_utils'; import { NamingContext, toTypeName, @@ -27,12 +25,26 @@ import { toPackageName, } from './python/type-name'; import { die, toPythonIdentifier } from './python/util'; -import { renderSummary } from './_utils'; +import { toPythonVersionRange, toReleaseVersion } from './version-utils'; + +import { + INCOMPLETE_DISCLAIMER_COMPILING, + INCOMPLETE_DISCLAIMER_NONCOMPILING, + TargetName, +} from '.'; // 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']; +const requirementsFile = path.resolve( + __dirname, + 'python', + 'requirements-dev.txt', +); + +// we use single-quotes for multi-line strings to allow examples within the +// docstrings themselves to include double-quotes (see https://github.com/aws/jsii/issues/2569) +const DOCSTRING_QUOTES = "'''"; export default class Python extends Target { protected readonly generator: PythonGenerator; @@ -70,7 +82,7 @@ export default class Python extends Target { // Install the necessary things await shell( python, - ['-m', 'pip', 'install', '--no-input', ...pythonBuildTools, 'twine~=3.2'], + ['-m', 'pip', 'install', '--no-input', '-r', requirementsFile], { cwd: sourceDir, env, @@ -520,16 +532,28 @@ abstract class BaseMethod implements PythonBase { pythonParams.push(`*${paramName}: ${paramType}`); } + const decorators = new Array(); + if (this.jsName !== undefined) { - code.line(`@jsii.member(jsii_name="${this.jsName}")`); + // "# type: ignore[misc]" needed because mypy does not know how to check decorated declarations + decorators.push(`@jsii.member(jsii_name="${this.jsName}")`); } if (this.decorator !== undefined) { - code.line(`@${this.decorator}`); + decorators.push(`@${this.decorator}`); } if (renderAbstract && this.abstract) { - code.line('@abc.abstractmethod'); + decorators.push('@abc.abstractmethod'); + } + + if (decorators.length > 0) { + // "# type: ignore[misc]" needed because mypy does not know how to check decorated declarations + for (const decorator of decorators + .join(' # type: ignore[misc]\n') + .split('\n')) { + code.line(decorator); + } } pythonParams.unshift( @@ -558,6 +582,7 @@ abstract class BaseMethod implements PythonBase { forceEmitBody, liftedPropNames, pythonParams[0], + returnType, ); code.closeBlock(); } @@ -569,6 +594,7 @@ abstract class BaseMethod implements PythonBase { forceEmitBody: boolean, liftedPropNames: Set, implicitParameter: string, + returnType: string, ) { if ( (!this.shouldEmitBody && !forceEmitBody) || @@ -585,6 +611,7 @@ abstract class BaseMethod implements PythonBase { context, liftedPropNames, implicitParameter, + returnType, ); } } @@ -619,6 +646,7 @@ abstract class BaseMethod implements PythonBase { context: EmitContext, liftedPropNames: Set, implicitParameter: string, + returnType: string, ) { const methodPrefix: string = this.returnFromJSIIMethod ? 'return ' : ''; @@ -649,10 +677,15 @@ abstract class BaseMethod implements PythonBase { params.push(expr); } + const value = `jsii.${this.jsiiMethod}(${jsiiMethodParams.join( + ', ', + )}, [${params.join(', ')}])`; code.line( - `${methodPrefix}jsii.${this.jsiiMethod}(${jsiiMethodParams.join( - ', ', - )}, [${params.join(', ')}])`, + `${methodPrefix}${ + this.returnFromJSIIMethod && returnType + ? `typing.cast(${returnType}, ${value})` + : value + }`, ); } @@ -687,6 +720,7 @@ abstract class BaseMethod implements PythonBase { interface BasePropertyOpts { abstract?: boolean; immutable?: boolean; + isStatic?: boolean; parent: spec.NamedTypeReference; } @@ -697,6 +731,7 @@ interface BasePropertyEmitOpts { abstract class BaseProperty implements PythonBase { public readonly abstract: boolean; + public readonly isStatic: boolean; protected abstract readonly decorator: string; protected abstract readonly implicitParameter: string; @@ -714,10 +749,11 @@ abstract class BaseProperty implements PythonBase { private readonly docs: spec.Docs | undefined, opts: BasePropertyOpts, ) { - const { abstract = false, immutable = false } = opts; + const { abstract = false, immutable = false, isStatic = false } = opts; this.abstract = abstract; this.immutable = immutable; + this.isStatic = isStatic; } public requiredImports(context: EmitContext): PythonImports { @@ -732,8 +768,8 @@ abstract class BaseProperty implements PythonBase { const { renderAbstract = true, forceEmitBody = false } = opts ?? {}; const pythonType = toTypeName(this.type).pythonType(context); - // # type: ignore is needed because mypy cannot check decorated things - code.line(`@${this.decorator} # type: ignore`); + // "# type: ignore[misc]" is needed because mypy cannot check decorated things + code.line(`@${this.decorator} # type: ignore[misc]`); code.line(`@jsii.member(jsii_name="${this.jsName}")`); if (renderAbstract && this.abstract) { code.line('@abc.abstractmethod'); @@ -754,7 +790,7 @@ abstract class BaseProperty implements PythonBase { (!renderAbstract || !this.abstract) ) { code.line( - `return jsii.${this.jsiiGetMethod}(${this.implicitParameter}, "${this.jsName}")`, + `return typing.cast(${pythonType}, jsii.${this.jsiiGetMethod}(${this.implicitParameter}, "${this.jsName}"))`, ); } else { code.line('...'); @@ -763,8 +799,11 @@ abstract class BaseProperty implements PythonBase { if (!this.immutable) { code.line(); - // # type: ignore is required because mypy cannot check decorated things - code.line(`@${this.pythonName}.setter # type: ignore`); + code.line( + `@${this.pythonName}.setter${ + this.isStatic ? ' # type: ignore[no-redef]' : '' + }`, + ); if (renderAbstract && this.abstract) { code.line('@abc.abstractmethod'); } @@ -805,11 +844,11 @@ 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) + // "# type: ignore[misc]" because MyPy cannot check dynamic base classes (naturally) `jsii.proxy_for(${toTypeName(b).pythonType({ ...context, typeAnnotation: false, - })}) # type: ignore`, + })}) # type: ignore[misc]`, ); openSignature(code, 'class', this.getProxyClassName(), proxyBases); this.generator.emitDocString(code, this.docs, { @@ -851,7 +890,9 @@ class Interface extends BasePythonClassType { _context: EmitContext, ) => { code.line('@builtins.staticmethod'); - code.openBlock('def __jsii_proxy_class__()'); + code.openBlock( + `def __jsii_proxy_class__() -> typing.Type["${this.getProxyClassName()}"]`, + ); code.line(`return ${this.getProxyClassName()}`); code.closeBlock(); }; @@ -1010,15 +1051,10 @@ class Struct extends BasePythonClassType { code: CodeMaker, context: EmitContext, ) { + const pythonType = member.typeAnnotation(context); + code.line('@builtins.property'); - openSignature( - code, - 'def', - member.pythonName, - ['self'], - true, - member.typeAnnotation(context), - ); + openSignature(code, 'def', member.pythonName, ['self'], true, pythonType); member.emitDocString(code); code.line( `result = self._values.get(${JSON.stringify(member.pythonName)})`, @@ -1029,7 +1065,7 @@ class Struct extends BasePythonClassType { `assert result is not None, "Required property '${member.pythonName}' is missing"`, ); } - code.line('return result'); + code.line(`return typing.cast(${pythonType}, result)`); code.closeBlock(); } @@ -1207,12 +1243,12 @@ class Class extends BasePythonClassType implements ISortableType { const proxyBases = [this.pythonName]; for (const base of this.abstractBases) { - // MyPy cannot check dynamic base types (naturally) + // "# type: ignore[misc]" because MyPy cannot check dynamic base classes (naturally) proxyBases.push( `jsii.proxy_for(${toTypeName(base).pythonType({ ...context, typeAnnotation: false, - })}) # type: ignore`, + })}) # type: ignore[misc]`, ); } @@ -1250,7 +1286,9 @@ class Class extends BasePythonClassType implements ISortableType { if (!this.abstract) return undefined; return (code: CodeMaker, _context: EmitContext) => { code.line('@builtins.staticmethod'); - code.openBlock('def __jsii_proxy_class__()'); + code.openBlock( + `def __jsii_proxy_class__() -> typing.Type["${this.getProxyClassName()}"]`, + ); code.line(`return ${this.getProxyClassName()}`); code.closeBlock(); }; @@ -1478,6 +1516,56 @@ class PythonModule implements PythonType { code.line('publication.publish()'); } + /** + * Emit the bin scripts if bin section defined. + */ + public emitBinScripts(code: CodeMaker): string[] { + const scripts = new Array(); + if (this.loadAssembly) { + if (this.assembly.bin != null) { + for (const name of Object.keys(this.assembly.bin)) { + const script_file = path.join( + 'src', + pythonModuleNameToFilename(this.pythonName), + 'bin', + name, + ); + code.openFile(script_file); + code.line('#!/usr/bin/env python'); + code.line(); + code.line('import jsii'); + code.line('import sys'); + code.line(); + emitList( + code, + '__jsii_assembly__ = jsii.JSIIAssembly.load(', + [ + JSON.stringify(this.assembly.name), + JSON.stringify(this.assembly.version), + JSON.stringify(this.pythonName.replace('._jsii', '')), + `${JSON.stringify(this.assemblyFilename)}`, + ], + ')', + ); + code.line(); + emitList( + code, + '__jsii_assembly__.invokeBinScript(', + [ + JSON.stringify(this.assembly.name), + JSON.stringify(name), + 'sys.argv[1:]', + ], + ')', + ); + code.closeFile(script_file); + scripts.push(script_file.replace(/\\/g, '/')); + } + } + } + return scripts; + } + /** * Emit the README as module docstring if this is the entry point module (it loads the assembly) */ @@ -1487,9 +1575,9 @@ class PythonModule implements PythonType { this.fqn === this.assembly.name && this.package.convertedReadme.trim().length > 0 ) { - code.line('"""'); + code.line(DOCSTRING_QUOTES); code.line(this.package.convertedReadme); - code.line('"""'); + code.line(DOCSTRING_QUOTES); } } @@ -1631,6 +1719,8 @@ class Package { a.pythonName.localeCompare(b.pythonName), ); + const scripts = new Array(); + // Iterate over all of our modules, and write them out to disk. for (const mod of modules) { const filename = path.join( @@ -1642,6 +1732,8 @@ class Package { code.openFile(filename); mod.emit(code, context); code.closeFile(filename); + + scripts.push(...mod.emitBinScripts(code)); } // Handle our package data. @@ -1718,8 +1810,10 @@ class Package { 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', 'Typing :: Typed', ], + scripts, }; switch (this.metadata.docs?.stability) { @@ -1813,9 +1907,15 @@ 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 = [${pythonBuildTools.map((x) => `"${x}"`).join(', ')}]`, - ); + const buildTools = fs + .readFileSync(requirementsFile, { encoding: 'utf-8' }) + .split('\n') + .map((line) => /^\s*(.+)\s*#\s*build-system\s*$/.exec(line)?.[1]?.trim()) + .reduce( + (buildTools, entry) => (entry ? [...buildTools, entry] : buildTools), + new Array(), + ); + code.line(`requires = [${buildTools.map((x) => `"${x}"`).join(', ')}]`); code.line('build-backend = "setuptools.build_meta"'); code.closeFile('pyproject.toml'); @@ -2093,16 +2193,16 @@ class PythonGenerator extends Generator { } if (lines.length === 1) { - code.line(`"""${lines[0]}"""`); + code.line(`${DOCSTRING_QUOTES}${lines[0]}${DOCSTRING_QUOTES}`); } else { - code.line(`"""${lines[0]}`); + code.line(`${DOCSTRING_QUOTES}${lines[0]}`); lines.splice(0, 1); for (const line of lines) { code.line(line); } - code.line('"""'); + code.line(DOCSTRING_QUOTES); } if (options.trailingNewLine) { code.line(); @@ -2110,7 +2210,11 @@ class PythonGenerator extends Generator { } public convertExample(example: string): string { - const snippet = typeScriptSnippetFromSource(example, 'example'); + const snippet = typeScriptSnippetFromSource( + example, + 'example', + enforcesStrictMode(this.assembly), + ); const translated = this.rosetta.translateSnippet(snippet, 'python'); if (!translated) { return example; @@ -2122,6 +2226,7 @@ class PythonGenerator extends Generator { return this.rosetta.translateSnippetsInMarkdown( markdown, 'python', + enforcesStrictMode(this.assembly), (trans) => ({ language: trans.language, source: this.prefixDisclaimer(trans), @@ -2160,7 +2265,7 @@ class PythonGenerator extends Generator { this.package = new Package( this, assm.targets!.python!.distName, - assm.version, + toReleaseVersion(assm.version, TargetName.PYTHON), assm, ); @@ -2270,7 +2375,12 @@ class PythonGenerator extends Generator { prop.name, prop, prop.docs, - { abstract: prop.abstract, immutable: prop.immutable, parent: cls }, + { + abstract: prop.abstract, + immutable: prop.immutable, + isStatic: prop.static, + parent: cls, + }, ), ); } @@ -2321,7 +2431,12 @@ class PythonGenerator extends Generator { prop.name, prop, prop.docs, - { abstract: prop.abstract, immutable: prop.immutable, parent: cls }, + { + abstract: prop.abstract, + immutable: prop.immutable, + isStatic: prop.static, + parent: cls, + }, ), ); } @@ -2390,7 +2505,7 @@ class PythonGenerator extends Generator { prop.name, prop, prop.docs, - { immutable: prop.immutable, parent: ifc }, + { immutable: prop.immutable, isStatic: prop.static, parent: ifc }, ); } diff --git a/packages/jsii-pacmak/lib/targets/python/requirements-dev.txt b/packages/jsii-pacmak/lib/targets/python/requirements-dev.txt new file mode 100644 index 0000000000..a12621eadd --- /dev/null +++ b/packages/jsii-pacmak/lib/targets/python/requirements-dev.txt @@ -0,0 +1,9 @@ +# All entries with "# build-system" at the end of the line will be hoisted as +# part of the build-system declaration of generated packages. Others will only +# be installed in the virtual environment used for building the distribution +# package (wheel, sdist), but not declared as build-system dependencies. + +setuptools~=53.0.0 # build-system +wheel~=0.36.2 # build-system + +twine~=3.3.0 diff --git a/packages/jsii-pacmak/lib/targets/python/type-name.ts b/packages/jsii-pacmak/lib/targets/python/type-name.ts index 3ef295d500..ed1b164274 100644 --- a/packages/jsii-pacmak/lib/targets/python/type-name.ts +++ b/packages/jsii-pacmak/lib/targets/python/type-name.ts @@ -11,9 +11,10 @@ import { isUnionTypeReference, Type, } from '@jsii/spec'; +import { toSnakeCase } from 'codemaker'; import { createHash } from 'crypto'; + import { die, toPythonIdentifier } from './util'; -import { toSnakeCase } from 'codemaker'; export interface TypeName { pythonType(context: NamingContext): string; diff --git a/packages/jsii-pacmak/lib/targets/version-utils.ts b/packages/jsii-pacmak/lib/targets/version-utils.ts index 61a527487c..1cc5568e7b 100644 --- a/packages/jsii-pacmak/lib/targets/version-utils.ts +++ b/packages/jsii-pacmak/lib/targets/version-utils.ts @@ -1,4 +1,7 @@ -import { Comparator, Range } from 'semver'; +import { Comparator, Range, parse } from 'semver'; +import { inspect } from 'util'; + +import { TargetName } from '.'; /** * Converts a SemVer range expression to a Maven version range expression. @@ -12,7 +15,10 @@ export function toMavenVersionRange( semverRange: string, suffix?: string, ): string { - return toBracketNotation(semverRange, suffix, { semver: false }); + return toBracketNotation(semverRange, suffix, { + semver: false, + target: TargetName.JAVA, + }); } /** @@ -23,7 +29,10 @@ export function toMavenVersionRange( * @see https://docs.microsoft.com/en-us/nuget/concepts/package-versioning#version-ranges-and-wildcards */ export function toNuGetVersionRange(semverRange: string): string { - return toBracketNotation(semverRange, undefined, { semver: false }); + return toBracketNotation(semverRange, undefined, { + semver: false, + target: TargetName.DOTNET, + }); } /** @@ -38,7 +47,10 @@ export function toPythonVersionRange(semverRange: string): string { .map((set) => set .map((comp) => { - const versionId = comp.semver.raw?.replace(/-0$/, '') ?? '0.0.0'; + const versionId = toReleaseVersion( + comp.semver.raw?.replace(/-0$/, '') ?? '0.0.0', + TargetName.PYTHON, + ); switch (comp.operator) { case '': // With ^0.0.0, somehow we get a left entry with an empty operator and value, we'll fix this up @@ -55,10 +67,96 @@ export function toPythonVersionRange(semverRange: string): string { .join(', '); } +/** + * Converts an original version number from the NPM convention to the target + * language's convention for expressing the same. For versions that do not + * include a prerelease identifier, this always returns the assembly version + * unmodified. + * + * @param assemblyVersion the assembly version being released + * @param target the target language for which the version is destined + * + * @returns the version that should be serialized + */ +export function toReleaseVersion( + assemblyVersion: string, + target: TargetName, +): string { + const version = parse(assemblyVersion, { includePrerelease: true }); + if (version == null) { + throw new Error( + `Unable to parse the provided assembly version: "${assemblyVersion}"`, + ); + } + if (version.prerelease.length === 0) { + return assemblyVersion; + } + switch (target) { + case TargetName.PYTHON: + // Python supports a limited set of identifiers... And we have a mapping table... + // https://packaging.python.org/guides/distributing-packages-using-setuptools/#pre-release-versioning + const [label, sequence, ...rest] = version.prerelease; + if (rest.filter((elt) => elt !== 0).length > 0 || sequence == null) { + throw new Error( + `Unable to map prerelease identifier (in: ${assemblyVersion}) components to python: ${inspect( + version.prerelease, + )}. The format should be 'X.Y.Z-label.sequence', where sequence is a positive integer, and label is "dev", "pre", "alpha", beta", or "rc"`, + ); + } + if (!Number.isInteger(sequence)) { + throw new Error( + `Unable to map prerelease identifier (in: ${assemblyVersion}) to python, as sequence ${inspect( + sequence, + )} is not an integer`, + ); + } + const baseVersion = `${version.major}.${version.minor}.${version.patch}`; + // See PEP 440: https://www.python.org/dev/peps/pep-0440/#pre-releases + switch (label) { + case 'dev': + case 'pre': + return `${baseVersion}.dev${sequence}`; + case 'alpha': + return `${baseVersion}.a${sequence}`; + case 'beta': + return `${baseVersion}.b${sequence}`; + case 'rc': + return `${baseVersion}.rc${sequence}`; + default: + throw new Error( + `Unable to map prerelease identifier (in: ${assemblyVersion}) to python, as label ${inspect( + label, + )} is not mapped (only "dev", "pre", "alpha", "beta" and "rc" are)`, + ); + } + case TargetName.DOTNET: + case TargetName.GO: + case TargetName.JAVA: + case TargetName.JAVASCRIPT: + // Not touching - the NPM version number should be usable as-is + break; + } + return assemblyVersion; +} + +/** + * Converts a semantic version range to the kind of bracket notation used by + * Maven and NuGet. For example, this turns `^1.2.3` into `[1.2.3,2.0.0)`. + * + * @param semverRange The semantic version range to be converted. + * @param suffix A version suffix to apply to versions in the resulting expression. + * @param semver Whether the target supports full semantic versioning (including + * `-0` as the lowest possible prerelease identifier) + * + * @returns a bracket-notation version range. + */ function toBracketNotation( semverRange: string, suffix?: string, - { semver = true }: { semver?: boolean } = {}, + { + semver = true, + target = TargetName.JAVASCRIPT, + }: { semver?: boolean; target?: TargetName } = {}, ): string { if (semverRange === '*') { semverRange = '>=0.0.0'; @@ -70,7 +168,7 @@ function toBracketNotation( const version = set[0].semver.raw; if (!version && range.raw === '>=0.0.0') { // Case where version is '*' - return `[0.0.0,]`; + return `[0.0.0,)`; } switch (set[0].operator || '=') { // "[version]" => means exactly version @@ -78,16 +176,16 @@ function toBracketNotation( return `[${addSuffix(version)}]`; // "(version,]" => means greater than version case '>': - return `(${addSuffix(version)},]`; + return `(${addSuffix(version)},)`; // "[version,]" => means greater than or equal to that version case '>=': - return `[${addSuffix(version)},]`; + return `[${addSuffix(version)},)`; // "[,version)" => means less than version case '<': - return `[,${addSuffix(version, !semver)})`; + return `(,${addSuffix(version, !semver)})`; // "[,version]" => means less than or equal to version case '<=': - return `[,${addSuffix(version)}]`; + return `(,${addSuffix(version)}]`; } } else if (set.length === 2) { const nugetRange = toBracketRange(set[0], set[1]); @@ -137,6 +235,6 @@ function toBracketNotation( if (trimDashZero) { str = str.replace(/-0$/, ''); } - return suffix ? `${str}${suffix}` : str; + return suffix ? `${str}${suffix}` : toReleaseVersion(str, target); } } diff --git a/packages/jsii-pacmak/lib/util.ts b/packages/jsii-pacmak/lib/util.ts index 1e5ffce6b6..707d944017 100644 --- a/packages/jsii-pacmak/lib/util.ts +++ b/packages/jsii-pacmak/lib/util.ts @@ -1,8 +1,9 @@ +import * as spec from '@jsii/spec'; import { spawn, SpawnOptions } from 'child_process'; import * as fs from 'fs-extra'; -import * as spec from '@jsii/spec'; import * as os from 'os'; import * as path from 'path'; + import * as logging from './logging'; /** diff --git a/packages/jsii-pacmak/package.json b/packages/jsii-pacmak/package.json index 0b35d8f8be..e9928f8fd5 100644 --- a/packages/jsii-pacmak/package.json +++ b/packages/jsii-pacmak/package.json @@ -30,7 +30,8 @@ "watch": "tsc --build -w", "lint": "eslint . --ext .js,.ts --ignore-path=.gitignore", "lint:fix": "yarn lint --fix", - "test": "jest && npm run test:build", + "test": "npm run test:unit && npm run test:build", + "test:unit": "jest", "test:build": "bash test/build-test.sh", "test:update": "jest -u && npm run test:build", "package": "package-js" @@ -39,58 +40,38 @@ "@jsii/spec": "^0.0.0", "clone": "^2.1.2", "codemaker": "^0.0.0", - "commonmark": "^0.29.2", + "commonmark": "^0.29.3", "escape-string-regexp": "^4.0.0", - "fs-extra": "^9.0.1", + "fs-extra": "^9.1.0", "jsii-reflect": "^0.0.0", "jsii-rosetta": "^0.0.0", - "semver": "^7.3.2", - "spdx-license-list": "^6.3.0", + "semver": "^7.3.4", + "spdx-license-list": "^6.4.0", "xmlbuilder": "^15.1.1", - "yargs": "^16.0.3" + "yargs": "^16.2.0" }, "devDependencies": { "@jsii/dotnet-runtime": "^0.0.0", "@jsii/java-runtime": "^0.0.0", + "@jsii/go-runtime": "^0.0.0", "@scope/jsii-calc-lib": "^0.0.0", "@types/clone": "^2.1.0", "@types/commonmark": "^0.27.4", "@types/fs-extra": "^8.1.1", - "@types/jest": "^26.0.14", - "@types/mock-fs": "^4.13.0", - "@types/node": "^10.17.39", + "@types/jest": "^26.0.20", + "@types/node": "^10.17.51", "@types/semver": "^7.3.4", - "@types/yargs": "^15.0.7", - "eslint": "^7.11.0", - "jest": "^26.5.2", + "@types/yargs": "^16.0.0", + "eslint": "^7.19.0", + "jest": "^26.6.3", "jsii-build-tools": "^0.0.0", - "jsii-calc": "^0.0.0", - "mock-fs": "^4.13.0", - "prettier": "^2.1.2", - "ts-jest": "^26.4.1", - "typescript": "~3.9.7" + "jsii-calc": "^3.20.120", + "prettier": "^2.2.1", + "ts-jest": "^26.5.1", + "typescript": "~3.9.9" }, "keywords": [ "jsii", "aws" - ], - "jest": { - "collectCoverage": true, - "collectCoverageFrom": [ - "**/bin/**/*.js", - "**/lib/**/*.js" - ], - "coverageReporters": [ - "lcov", - "text" - ], - "errorOnDeprecated": true, - "testEnvironment": "node", - "testMatch": [ - "**/?(*.)+(spec|test).ts" - ], - "transform": { - "\\.tsx?$": "ts-jest" - } - } + ] } diff --git a/packages/jsii-pacmak/test/dependency-graph.test.ts b/packages/jsii-pacmak/test/dependency-graph.test.ts index 1a18618666..dfbe0c56c0 100644 --- a/packages/jsii-pacmak/test/dependency-graph.test.ts +++ b/packages/jsii-pacmak/test/dependency-graph.test.ts @@ -1,5 +1,6 @@ import { tmpdir } from 'os'; import { join } from 'path'; + import { Callback, traverseDependencyGraph } from '../lib/dependency-graph'; const mockHost = { diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/prerelease-identifiers.test.ts.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/prerelease-identifiers.test.ts.snap new file mode 100644 index 0000000000..d4c8f402be --- /dev/null +++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/prerelease-identifiers.test.ts.snap @@ -0,0 +1,1981 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: / 1`] = ` + + โ”ฃโ” ๐Ÿ“ dotnet + โ”ƒ โ”—โ” ๐Ÿ“ Com.Acme.Foo + โ”ƒ โ”ฃโ” ๐Ÿ“„ AssemblyInfo.cs + โ”ƒ โ”ฃโ” ๐Ÿ“ Com + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ Acme + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ Foo + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ Internal + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ DependencyResolution + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ Anchor.cs + โ”ƒ โ”ฃโ” ๐Ÿ“„ Com.Acme.Foo.csproj + โ”ƒ โ”—โ” ๐Ÿ“„ foo-1.2.3.tgz + โ”ฃโ” ๐Ÿ“ go + โ”ƒ โ”—โ” ๐Ÿ“ foo + โ”ƒ โ”ฃโ” ๐Ÿ“„ foo.go + โ”ƒ โ”ฃโ” ๐Ÿ“„ go.mod + โ”ƒ โ”ฃโ” ๐Ÿ“ jsii + โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ jsii.go + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ tarball.embedded.go + โ”ƒ โ”—โ” ๐Ÿ“„ version + โ”ฃโ” ๐Ÿ“ java + โ”ƒ โ”ฃโ” ๐Ÿ“„ pom.xml + โ”ƒ โ”—โ” ๐Ÿ“ src + โ”ƒ โ”—โ” ๐Ÿ“ main + โ”ƒ โ”ฃโ” ๐Ÿ“ java + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ com + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ acme + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ foo + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ $Module.java + โ”ƒ โ”—โ” ๐Ÿ“ resources + โ”ƒ โ”—โ” ๐Ÿ“ com + โ”ƒ โ”—โ” ๐Ÿ“ acme + โ”ƒ โ”—โ” ๐Ÿ“ foo + โ”ƒ โ”ฃโ” ๐Ÿ“„ $Module.txt + โ”ƒ โ”—โ” ๐Ÿ“„ foo@1.2.3.jsii.tgz + โ”ฃโ” ๐Ÿ“ js + โ”ƒ โ”—โ” ๐Ÿ“„ foo@1.2.3.jsii.tgz + โ”—โ” ๐Ÿ“ python + โ”ฃโ” ๐Ÿ“„ MANIFEST.in + โ”ฃโ” ๐Ÿ“„ pyproject.toml + โ”ฃโ” ๐Ÿ“„ README.md + โ”ฃโ” ๐Ÿ“„ setup.py + โ”—โ” ๐Ÿ“ src + โ”—โ” ๐Ÿ“ foo + โ”—โ” ๐Ÿ“ _jsii + โ”ฃโ” ๐Ÿ“„ __init__.py + โ”—โ” ๐Ÿ“„ foo@1.2.3.jsii.tgz +`; + +exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /dotnet/Com.Acme.Foo/AssemblyInfo.cs 1`] = ` +using Amazon.JSII.Runtime.Deputy; + +[assembly: JsiiAssembly("foo", "1.2.3", "foo-1.2.3.tgz")] + +`; + +exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /dotnet/Com.Acme.Foo/Com.Acme.Foo.csproj 1`] = ` + + + + Test assembly: foo + Com.Acme.Foo + UNLICENSED + 1.2.3 + + Test + en-US + https://test.nope/foo + foo.nope.git + git + + true + true + true + true + enable + snupkg + netcoreapp3.1 + + + + + + + + + + + 0612,0618 + + 0108,0109 + + + + +`; + +exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /dotnet/Com.Acme.Foo/Com/Acme/Foo/Internal/DependencyResolution/Anchor.cs 1`] = ` +#pragma warning disable CS0672,CS0809,CS1591 + +namespace Com.Acme.Foo.Internal.DependencyResolution +{ + public sealed class Anchor + { + public Anchor() + { + new Com.Acme.Bar.Internal.DependencyResolution.Anchor(); + } + } +} + +`; + +exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /dotnet/Com.Acme.Foo/foo-1.2.3.tgz 1`] = `dotnet/Com.Acme.Foo/foo-1.2.3.tgz is a tarball`; + +exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /go/foo/foo.go 1`] = ` +// Test assembly: foo +package foo + +import ( +) + + +`; + +exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /go/foo/go.mod 1`] = ` +module foo + +go 1.15 + +require ( + github.com/aws/jsii-runtime-go v1337.42.1337 + bar/v2 v2.0.0-rc.42 +) + +`; + +exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /go/foo/jsii/jsii.go 1`] = ` +package jsii + +import ( + rt "github.com/aws/jsii-runtime-go" + "sync" + // Initialization endpoints of dependencies + bar "bar/v2/jsii" +) + +var once sync.Once + +// Initialize performs the necessary work for the enclosing +// module to be loaded in the jsii kernel. +func Initialize() { + once.Do(func(){ + // Ensure all dependencies are initialized + bar.Initialize() + + // Load this library into the kernel + rt.Load("foo", "1.2.3", tarball) + }) +} + +`; + +exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /go/foo/jsii/tarball.embedded.go 1`] = `go/foo/jsii/tarball.embedded.go embeds a tarball`; + +exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /go/foo/version 1`] = ` +1.2.3 + +`; + +exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /java/pom.xml 1`] = ` + + + 4.0.0 + \${project.groupId}:\${project.artifactId} + Test assembly: foo + https://test.nope/foo + + + + Test + + test + + + + + scm:git:foo.nope.git + foo.nope.git + + com.acme + foo + 1.2.3 + jar + + UTF-8 + + + + com.acme + bar + [2.0.0-rc.42,3.0.0) + + + software.amazon.jsii + jsii-runtime + (,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.2.0 + + + 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.8.1 + + false + + + + + + +`; + +exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /java/src/main/java/com/acme/foo/$Module.java 1`] = ` +package com.acme.foo; + +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; + +@software.amazon.jsii.Internal +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("com/acme/foo/$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("foo", "1.2.3", $Module.class, "foo@1.2.3.jsii.tgz"); + } + + @Override + public List> getDependencies() { + return asList(com.acme.bar.$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[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /java/src/main/resources/com/acme/foo/$Module.txt 1`] = ``; + +exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /java/src/main/resources/com/acme/foo/foo@1.2.3.jsii.tgz 1`] = `java/src/main/resources/com/acme/foo/foo@1.2.3.jsii.tgz is a tarball`; + +exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /js/foo@1.2.3.jsii.tgz 1`] = `js/foo@1.2.3.jsii.tgz is a tarball`; + +exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /python/MANIFEST.in 1`] = ` +include pyproject.toml + +`; + +exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /python/README.md 1`] = ` + + +`; + +exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /python/pyproject.toml 1`] = ` +[build-system] +requires = ["setuptools~=53.0.0", "wheel~=0.36.2"] +build-backend = "setuptools.build_meta" + +`; + +exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /python/setup.py 1`] = ` +import json +import setuptools + +kwargs = json.loads( + """ +{ + "name": "foo", + "version": "1.2.3", + "description": "Test assembly: foo", + "license": "UNLICENSED", + "url": "https://test.nope/foo", + "long_description_content_type": "text/markdown", + "author": "Test", + "bdist_wheel": { + "universal": true + }, + "project_urls": { + "Source": "foo.nope.git" + }, + "package_dir": { + "": "src" + }, + "packages": [ + "foo._jsii" + ], + "package_data": { + "foo._jsii": [ + "foo@1.2.3.jsii.tgz" + ] + }, + "python_requires": ">=3.6", + "install_requires": [ + "bar>=2.0.0.rc42, <3.0.0", + "jsii>=1337.42.1337, <1338.0.0", + "publication>=0.0.3" + ], + "classifiers": [ + "Intended Audience :: Developers", + "Operating System :: OS Independent", + "Programming Language :: JavaScript", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Typing :: Typed" + ], + "scripts": [] +} +""" +) + +with open("README.md", encoding="utf8") as fp: + kwargs["long_description"] = fp.read() + + +setuptools.setup(**kwargs) + +`; + +exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /python/src/foo/_jsii/__init__.py 1`] = ` +import abc +import builtins +import datetime +import enum +import typing + +import jsii +import publication +import typing_extensions + +import bar._jsii + +__jsii_assembly__ = jsii.JSIIAssembly.load( + "foo", "1.2.3", __name__[0:-6], "foo@1.2.3.jsii.tgz" +) + +__all__ = [ + "__jsii_assembly__", +] + +publication.publish() + +`; + +exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /python/src/foo/_jsii/foo@1.2.3.jsii.tgz 1`] = `python/src/foo/_jsii/foo@1.2.3.jsii.tgz is a tarball`; + +exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: / 1`] = ` + + โ”ฃโ” ๐Ÿ“ dotnet + โ”ƒ โ”—โ” ๐Ÿ“ Com.Acme.Foo + โ”ƒ โ”ฃโ” ๐Ÿ“„ AssemblyInfo.cs + โ”ƒ โ”ฃโ” ๐Ÿ“ Com + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ Acme + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ Foo + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ Internal + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ DependencyResolution + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ Anchor.cs + โ”ƒ โ”ฃโ” ๐Ÿ“„ Com.Acme.Foo.csproj + โ”ƒ โ”—โ” ๐Ÿ“„ foo-1.2.3.tgz + โ”ฃโ” ๐Ÿ“ go + โ”ƒ โ”—โ” ๐Ÿ“ foo + โ”ƒ โ”ฃโ” ๐Ÿ“„ foo.go + โ”ƒ โ”ฃโ” ๐Ÿ“„ go.mod + โ”ƒ โ”ฃโ” ๐Ÿ“ jsii + โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ jsii.go + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ tarball.embedded.go + โ”ƒ โ”—โ” ๐Ÿ“„ version + โ”ฃโ” ๐Ÿ“ java + โ”ƒ โ”ฃโ” ๐Ÿ“„ pom.xml + โ”ƒ โ”—โ” ๐Ÿ“ src + โ”ƒ โ”—โ” ๐Ÿ“ main + โ”ƒ โ”ฃโ” ๐Ÿ“ java + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ com + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ acme + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ foo + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ $Module.java + โ”ƒ โ”—โ” ๐Ÿ“ resources + โ”ƒ โ”—โ” ๐Ÿ“ com + โ”ƒ โ”—โ” ๐Ÿ“ acme + โ”ƒ โ”—โ” ๐Ÿ“ foo + โ”ƒ โ”ฃโ” ๐Ÿ“„ $Module.txt + โ”ƒ โ”—โ” ๐Ÿ“„ foo@1.2.3.jsii.tgz + โ”ฃโ” ๐Ÿ“ js + โ”ƒ โ”—โ” ๐Ÿ“„ foo@1.2.3.jsii.tgz + โ”—โ” ๐Ÿ“ python + โ”ฃโ” ๐Ÿ“„ MANIFEST.in + โ”ฃโ” ๐Ÿ“„ pyproject.toml + โ”ฃโ” ๐Ÿ“„ README.md + โ”ฃโ” ๐Ÿ“„ setup.py + โ”—โ” ๐Ÿ“ src + โ”—โ” ๐Ÿ“ foo + โ”—โ” ๐Ÿ“ _jsii + โ”ฃโ” ๐Ÿ“„ __init__.py + โ”—โ” ๐Ÿ“„ foo@1.2.3.jsii.tgz +`; + +exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /dotnet/Com.Acme.Foo/AssemblyInfo.cs 1`] = ` +using Amazon.JSII.Runtime.Deputy; + +[assembly: JsiiAssembly("foo", "1.2.3", "foo-1.2.3.tgz")] + +`; + +exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /dotnet/Com.Acme.Foo/Com.Acme.Foo.csproj 1`] = ` + + + + Test assembly: foo + Com.Acme.Foo + UNLICENSED + 1.2.3 + + Test + en-US + https://test.nope/foo + foo.nope.git + git + + true + true + true + true + enable + snupkg + netcoreapp3.1 + + + + + + + + + + + 0612,0618 + + 0108,0109 + + + + +`; + +exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /dotnet/Com.Acme.Foo/Com/Acme/Foo/Internal/DependencyResolution/Anchor.cs 1`] = ` +#pragma warning disable CS0672,CS0809,CS1591 + +namespace Com.Acme.Foo.Internal.DependencyResolution +{ + public sealed class Anchor + { + public Anchor() + { + new Com.Acme.Bar.Internal.DependencyResolution.Anchor(); + } + } +} + +`; + +exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /dotnet/Com.Acme.Foo/foo-1.2.3.tgz 1`] = `dotnet/Com.Acme.Foo/foo-1.2.3.tgz is a tarball`; + +exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /go/foo/foo.go 1`] = ` +// Test assembly: foo +package foo + +import ( +) + + +`; + +exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /go/foo/go.mod 1`] = ` +module foo + +go 1.15 + +require ( + github.com/aws/jsii-runtime-go v1337.42.1337 + bar/v4 v4.5.6-pre.1337 +) + +`; + +exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /go/foo/jsii/jsii.go 1`] = ` +package jsii + +import ( + rt "github.com/aws/jsii-runtime-go" + "sync" + // Initialization endpoints of dependencies + bar "bar/v4/jsii" +) + +var once sync.Once + +// Initialize performs the necessary work for the enclosing +// module to be loaded in the jsii kernel. +func Initialize() { + once.Do(func(){ + // Ensure all dependencies are initialized + bar.Initialize() + + // Load this library into the kernel + rt.Load("foo", "1.2.3", tarball) + }) +} + +`; + +exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /go/foo/jsii/tarball.embedded.go 1`] = `go/foo/jsii/tarball.embedded.go embeds a tarball`; + +exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /go/foo/version 1`] = ` +1.2.3 + +`; + +exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /java/pom.xml 1`] = ` + + + 4.0.0 + \${project.groupId}:\${project.artifactId} + Test assembly: foo + https://test.nope/foo + + + + Test + + test + + + + + scm:git:foo.nope.git + foo.nope.git + + com.acme + foo + 1.2.3 + jar + + UTF-8 + + + + com.acme + bar + [4.5.6-pre.1337,5.0.0) + + + software.amazon.jsii + jsii-runtime + (,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.2.0 + + + 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.8.1 + + false + + + + + + +`; + +exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /java/src/main/java/com/acme/foo/$Module.java 1`] = ` +package com.acme.foo; + +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; + +@software.amazon.jsii.Internal +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("com/acme/foo/$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("foo", "1.2.3", $Module.class, "foo@1.2.3.jsii.tgz"); + } + + @Override + public List> getDependencies() { + return asList(com.acme.bar.$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[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /java/src/main/resources/com/acme/foo/$Module.txt 1`] = ``; + +exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /java/src/main/resources/com/acme/foo/foo@1.2.3.jsii.tgz 1`] = `java/src/main/resources/com/acme/foo/foo@1.2.3.jsii.tgz is a tarball`; + +exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /js/foo@1.2.3.jsii.tgz 1`] = `js/foo@1.2.3.jsii.tgz is a tarball`; + +exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /python/MANIFEST.in 1`] = ` +include pyproject.toml + +`; + +exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /python/README.md 1`] = ` + + +`; + +exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /python/pyproject.toml 1`] = ` +[build-system] +requires = ["setuptools~=53.0.0", "wheel~=0.36.2"] +build-backend = "setuptools.build_meta" + +`; + +exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /python/setup.py 1`] = ` +import json +import setuptools + +kwargs = json.loads( + """ +{ + "name": "foo", + "version": "1.2.3", + "description": "Test assembly: foo", + "license": "UNLICENSED", + "url": "https://test.nope/foo", + "long_description_content_type": "text/markdown", + "author": "Test", + "bdist_wheel": { + "universal": true + }, + "project_urls": { + "Source": "foo.nope.git" + }, + "package_dir": { + "": "src" + }, + "packages": [ + "foo._jsii" + ], + "package_data": { + "foo._jsii": [ + "foo@1.2.3.jsii.tgz" + ] + }, + "python_requires": ">=3.6", + "install_requires": [ + "bar>=4.5.6.dev1337, <5.0.0", + "jsii>=1337.42.1337, <1338.0.0", + "publication>=0.0.3" + ], + "classifiers": [ + "Intended Audience :: Developers", + "Operating System :: OS Independent", + "Programming Language :: JavaScript", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Typing :: Typed" + ], + "scripts": [] +} +""" +) + +with open("README.md", encoding="utf8") as fp: + kwargs["long_description"] = fp.read() + + +setuptools.setup(**kwargs) + +`; + +exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /python/src/foo/_jsii/__init__.py 1`] = ` +import abc +import builtins +import datetime +import enum +import typing + +import jsii +import publication +import typing_extensions + +import bar._jsii + +__jsii_assembly__ = jsii.JSIIAssembly.load( + "foo", "1.2.3", __name__[0:-6], "foo@1.2.3.jsii.tgz" +) + +__all__ = [ + "__jsii_assembly__", +] + +publication.publish() + +`; + +exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /python/src/foo/_jsii/foo@1.2.3.jsii.tgz 1`] = `python/src/foo/_jsii/foo@1.2.3.jsii.tgz is a tarball`; + +exports[`foo@2.0.0-rc.42: / 1`] = ` + + โ”ฃโ” ๐Ÿ“ dotnet + โ”ƒ โ”—โ” ๐Ÿ“ Com.Acme.Foo + โ”ƒ โ”ฃโ” ๐Ÿ“„ AssemblyInfo.cs + โ”ƒ โ”ฃโ” ๐Ÿ“ Com + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ Acme + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ Foo + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ Internal + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ DependencyResolution + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ Anchor.cs + โ”ƒ โ”ฃโ” ๐Ÿ“„ Com.Acme.Foo.csproj + โ”ƒ โ”—โ” ๐Ÿ“„ foo-2.0.0-rc.42.tgz + โ”ฃโ” ๐Ÿ“ go + โ”ƒ โ”—โ” ๐Ÿ“ foo + โ”ƒ โ”ฃโ” ๐Ÿ“„ foo.go + โ”ƒ โ”ฃโ” ๐Ÿ“„ go.mod + โ”ƒ โ”ฃโ” ๐Ÿ“ jsii + โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ jsii.go + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ tarball.embedded.go + โ”ƒ โ”—โ” ๐Ÿ“„ version + โ”ฃโ” ๐Ÿ“ java + โ”ƒ โ”ฃโ” ๐Ÿ“„ pom.xml + โ”ƒ โ”—โ” ๐Ÿ“ src + โ”ƒ โ”—โ” ๐Ÿ“ main + โ”ƒ โ”ฃโ” ๐Ÿ“ java + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ com + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ acme + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ foo + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ $Module.java + โ”ƒ โ”—โ” ๐Ÿ“ resources + โ”ƒ โ”—โ” ๐Ÿ“ com + โ”ƒ โ”—โ” ๐Ÿ“ acme + โ”ƒ โ”—โ” ๐Ÿ“ foo + โ”ƒ โ”ฃโ” ๐Ÿ“„ $Module.txt + โ”ƒ โ”—โ” ๐Ÿ“„ foo@2.0.0-rc.42.jsii.tgz + โ”ฃโ” ๐Ÿ“ js + โ”ƒ โ”—โ” ๐Ÿ“„ foo@2.0.0-rc.42.jsii.tgz + โ”—โ” ๐Ÿ“ python + โ”ฃโ” ๐Ÿ“„ MANIFEST.in + โ”ฃโ” ๐Ÿ“„ pyproject.toml + โ”ฃโ” ๐Ÿ“„ README.md + โ”ฃโ” ๐Ÿ“„ setup.py + โ”—โ” ๐Ÿ“ src + โ”—โ” ๐Ÿ“ foo + โ”—โ” ๐Ÿ“ _jsii + โ”ฃโ” ๐Ÿ“„ __init__.py + โ”—โ” ๐Ÿ“„ foo@2.0.0-rc.42.jsii.tgz +`; + +exports[`foo@2.0.0-rc.42: /dotnet/Com.Acme.Foo/AssemblyInfo.cs 1`] = ` +using Amazon.JSII.Runtime.Deputy; + +[assembly: JsiiAssembly("foo", "2.0.0-rc.42", "foo-2.0.0-rc.42.tgz")] + +`; + +exports[`foo@2.0.0-rc.42: /dotnet/Com.Acme.Foo/Com.Acme.Foo.csproj 1`] = ` + + + + Test assembly: foo + Com.Acme.Foo + UNLICENSED + 2.0.0-rc.42 + + Test + en-US + https://test.nope/foo + foo.nope.git + git + + true + true + true + true + enable + snupkg + netcoreapp3.1 + + + + + + + + + + 0612,0618 + + 0108,0109 + + + + +`; + +exports[`foo@2.0.0-rc.42: /dotnet/Com.Acme.Foo/Com/Acme/Foo/Internal/DependencyResolution/Anchor.cs 1`] = ` +#pragma warning disable CS0672,CS0809,CS1591 + +namespace Com.Acme.Foo.Internal.DependencyResolution +{ + public sealed class Anchor + { + public Anchor() + { + } + } +} + +`; + +exports[`foo@2.0.0-rc.42: /dotnet/Com.Acme.Foo/foo-2.0.0-rc.42.tgz 1`] = `dotnet/Com.Acme.Foo/foo-2.0.0-rc.42.tgz is a tarball`; + +exports[`foo@2.0.0-rc.42: /go/foo/foo.go 1`] = ` +// Test assembly: foo +package foo + +import ( +) + + +`; + +exports[`foo@2.0.0-rc.42: /go/foo/go.mod 1`] = ` +module foo/v2 + +go 1.15 + +require ( + github.com/aws/jsii-runtime-go v1337.42.1337 +) + +`; + +exports[`foo@2.0.0-rc.42: /go/foo/jsii/jsii.go 1`] = ` +package jsii + +import ( + rt "github.com/aws/jsii-runtime-go" + "sync" +) + +var once sync.Once + +// Initialize performs the necessary work for the enclosing +// module to be loaded in the jsii kernel. +func Initialize() { + once.Do(func(){ + // Load this library into the kernel + rt.Load("foo", "2.0.0-rc.42", tarball) + }) +} + +`; + +exports[`foo@2.0.0-rc.42: /go/foo/jsii/tarball.embedded.go 1`] = `go/foo/jsii/tarball.embedded.go embeds a tarball`; + +exports[`foo@2.0.0-rc.42: /go/foo/version 1`] = ` +2.0.0-rc.42 + +`; + +exports[`foo@2.0.0-rc.42: /java/pom.xml 1`] = ` + + + 4.0.0 + \${project.groupId}:\${project.artifactId} + Test assembly: foo + https://test.nope/foo + + + + Test + + test + + + + + scm:git:foo.nope.git + foo.nope.git + + com.acme + foo + 2.0.0-rc.42 + jar + + UTF-8 + + + + software.amazon.jsii + jsii-runtime + (,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.2.0 + + + 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.8.1 + + false + + + + + + +`; + +exports[`foo@2.0.0-rc.42: /java/src/main/java/com/acme/foo/$Module.java 1`] = ` +package com.acme.foo; + +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.Map; + +import software.amazon.jsii.JsiiModule; + +@software.amazon.jsii.Internal +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("com/acme/foo/$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("foo", "2.0.0-rc.42", $Module.class, "foo@2.0.0-rc.42.jsii.tgz"); + } + + @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[`foo@2.0.0-rc.42: /java/src/main/resources/com/acme/foo/$Module.txt 1`] = ``; + +exports[`foo@2.0.0-rc.42: /java/src/main/resources/com/acme/foo/foo@2.0.0-rc.42.jsii.tgz 1`] = `java/src/main/resources/com/acme/foo/foo@2.0.0-rc.42.jsii.tgz is a tarball`; + +exports[`foo@2.0.0-rc.42: /js/foo@2.0.0-rc.42.jsii.tgz 1`] = `js/foo@2.0.0-rc.42.jsii.tgz is a tarball`; + +exports[`foo@2.0.0-rc.42: /python/MANIFEST.in 1`] = ` +include pyproject.toml + +`; + +exports[`foo@2.0.0-rc.42: /python/README.md 1`] = ` + + +`; + +exports[`foo@2.0.0-rc.42: /python/pyproject.toml 1`] = ` +[build-system] +requires = ["setuptools~=53.0.0", "wheel~=0.36.2"] +build-backend = "setuptools.build_meta" + +`; + +exports[`foo@2.0.0-rc.42: /python/setup.py 1`] = ` +import json +import setuptools + +kwargs = json.loads( + """ +{ + "name": "foo", + "version": "2.0.0.rc42", + "description": "Test assembly: foo", + "license": "UNLICENSED", + "url": "https://test.nope/foo", + "long_description_content_type": "text/markdown", + "author": "Test", + "bdist_wheel": { + "universal": true + }, + "project_urls": { + "Source": "foo.nope.git" + }, + "package_dir": { + "": "src" + }, + "packages": [ + "foo._jsii" + ], + "package_data": { + "foo._jsii": [ + "foo@2.0.0-rc.42.jsii.tgz" + ] + }, + "python_requires": ">=3.6", + "install_requires": [ + "jsii>=1337.42.1337, <1338.0.0", + "publication>=0.0.3" + ], + "classifiers": [ + "Intended Audience :: Developers", + "Operating System :: OS Independent", + "Programming Language :: JavaScript", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Typing :: Typed" + ], + "scripts": [] +} +""" +) + +with open("README.md", encoding="utf8") as fp: + kwargs["long_description"] = fp.read() + + +setuptools.setup(**kwargs) + +`; + +exports[`foo@2.0.0-rc.42: /python/src/foo/_jsii/__init__.py 1`] = ` +import abc +import builtins +import datetime +import enum +import typing + +import jsii +import publication +import typing_extensions + +__jsii_assembly__ = jsii.JSIIAssembly.load( + "foo", "2.0.0-rc.42", __name__[0:-6], "foo@2.0.0-rc.42.jsii.tgz" +) + +__all__ = [ + "__jsii_assembly__", +] + +publication.publish() + +`; + +exports[`foo@2.0.0-rc.42: /python/src/foo/_jsii/foo@2.0.0-rc.42.jsii.tgz 1`] = `python/src/foo/_jsii/foo@2.0.0-rc.42.jsii.tgz is a tarball`; + +exports[`foo@4.5.6-pre.1337: / 1`] = ` + + โ”ฃโ” ๐Ÿ“ dotnet + โ”ƒ โ”—โ” ๐Ÿ“ Com.Acme.Foo + โ”ƒ โ”ฃโ” ๐Ÿ“„ AssemblyInfo.cs + โ”ƒ โ”ฃโ” ๐Ÿ“ Com + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ Acme + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ Foo + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ Internal + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ DependencyResolution + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ Anchor.cs + โ”ƒ โ”ฃโ” ๐Ÿ“„ Com.Acme.Foo.csproj + โ”ƒ โ”—โ” ๐Ÿ“„ foo-4.5.6-pre.1337.tgz + โ”ฃโ” ๐Ÿ“ go + โ”ƒ โ”—โ” ๐Ÿ“ foo + โ”ƒ โ”ฃโ” ๐Ÿ“„ foo.go + โ”ƒ โ”ฃโ” ๐Ÿ“„ go.mod + โ”ƒ โ”ฃโ” ๐Ÿ“ jsii + โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ jsii.go + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ tarball.embedded.go + โ”ƒ โ”—โ” ๐Ÿ“„ version + โ”ฃโ” ๐Ÿ“ java + โ”ƒ โ”ฃโ” ๐Ÿ“„ pom.xml + โ”ƒ โ”—โ” ๐Ÿ“ src + โ”ƒ โ”—โ” ๐Ÿ“ main + โ”ƒ โ”ฃโ” ๐Ÿ“ java + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ com + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ acme + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ foo + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ $Module.java + โ”ƒ โ”—โ” ๐Ÿ“ resources + โ”ƒ โ”—โ” ๐Ÿ“ com + โ”ƒ โ”—โ” ๐Ÿ“ acme + โ”ƒ โ”—โ” ๐Ÿ“ foo + โ”ƒ โ”ฃโ” ๐Ÿ“„ $Module.txt + โ”ƒ โ”—โ” ๐Ÿ“„ foo@4.5.6-pre.1337.jsii.tgz + โ”ฃโ” ๐Ÿ“ js + โ”ƒ โ”—โ” ๐Ÿ“„ foo@4.5.6-pre.1337.jsii.tgz + โ”—โ” ๐Ÿ“ python + โ”ฃโ” ๐Ÿ“„ MANIFEST.in + โ”ฃโ” ๐Ÿ“„ pyproject.toml + โ”ฃโ” ๐Ÿ“„ README.md + โ”ฃโ” ๐Ÿ“„ setup.py + โ”—โ” ๐Ÿ“ src + โ”—โ” ๐Ÿ“ foo + โ”—โ” ๐Ÿ“ _jsii + โ”ฃโ” ๐Ÿ“„ __init__.py + โ”—โ” ๐Ÿ“„ foo@4.5.6-pre.1337.jsii.tgz +`; + +exports[`foo@4.5.6-pre.1337: /dotnet/Com.Acme.Foo/AssemblyInfo.cs 1`] = ` +using Amazon.JSII.Runtime.Deputy; + +[assembly: JsiiAssembly("foo", "4.5.6-pre.1337", "foo-4.5.6-pre.1337.tgz")] + +`; + +exports[`foo@4.5.6-pre.1337: /dotnet/Com.Acme.Foo/Com.Acme.Foo.csproj 1`] = ` + + + + Test assembly: foo + Com.Acme.Foo + UNLICENSED + 4.5.6-pre.1337 + + Test + en-US + https://test.nope/foo + foo.nope.git + git + + true + true + true + true + enable + snupkg + netcoreapp3.1 + + + + + + + + + + 0612,0618 + + 0108,0109 + + + + +`; + +exports[`foo@4.5.6-pre.1337: /dotnet/Com.Acme.Foo/Com/Acme/Foo/Internal/DependencyResolution/Anchor.cs 1`] = ` +#pragma warning disable CS0672,CS0809,CS1591 + +namespace Com.Acme.Foo.Internal.DependencyResolution +{ + public sealed class Anchor + { + public Anchor() + { + } + } +} + +`; + +exports[`foo@4.5.6-pre.1337: /dotnet/Com.Acme.Foo/foo-4.5.6-pre.1337.tgz 1`] = `dotnet/Com.Acme.Foo/foo-4.5.6-pre.1337.tgz is a tarball`; + +exports[`foo@4.5.6-pre.1337: /go/foo/foo.go 1`] = ` +// Test assembly: foo +package foo + +import ( +) + + +`; + +exports[`foo@4.5.6-pre.1337: /go/foo/go.mod 1`] = ` +module foo/v4 + +go 1.15 + +require ( + github.com/aws/jsii-runtime-go v1337.42.1337 +) + +`; + +exports[`foo@4.5.6-pre.1337: /go/foo/jsii/jsii.go 1`] = ` +package jsii + +import ( + rt "github.com/aws/jsii-runtime-go" + "sync" +) + +var once sync.Once + +// Initialize performs the necessary work for the enclosing +// module to be loaded in the jsii kernel. +func Initialize() { + once.Do(func(){ + // Load this library into the kernel + rt.Load("foo", "4.5.6-pre.1337", tarball) + }) +} + +`; + +exports[`foo@4.5.6-pre.1337: /go/foo/jsii/tarball.embedded.go 1`] = `go/foo/jsii/tarball.embedded.go embeds a tarball`; + +exports[`foo@4.5.6-pre.1337: /go/foo/version 1`] = ` +4.5.6-pre.1337 + +`; + +exports[`foo@4.5.6-pre.1337: /java/pom.xml 1`] = ` + + + 4.0.0 + \${project.groupId}:\${project.artifactId} + Test assembly: foo + https://test.nope/foo + + + + Test + + test + + + + + scm:git:foo.nope.git + foo.nope.git + + com.acme + foo + 4.5.6-pre.1337 + jar + + UTF-8 + + + + software.amazon.jsii + jsii-runtime + (,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.2.0 + + + 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.8.1 + + false + + + + + + +`; + +exports[`foo@4.5.6-pre.1337: /java/src/main/java/com/acme/foo/$Module.java 1`] = ` +package com.acme.foo; + +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.Map; + +import software.amazon.jsii.JsiiModule; + +@software.amazon.jsii.Internal +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("com/acme/foo/$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("foo", "4.5.6-pre.1337", $Module.class, "foo@4.5.6-pre.1337.jsii.tgz"); + } + + @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[`foo@4.5.6-pre.1337: /java/src/main/resources/com/acme/foo/$Module.txt 1`] = ``; + +exports[`foo@4.5.6-pre.1337: /java/src/main/resources/com/acme/foo/foo@4.5.6-pre.1337.jsii.tgz 1`] = `java/src/main/resources/com/acme/foo/foo@4.5.6-pre.1337.jsii.tgz is a tarball`; + +exports[`foo@4.5.6-pre.1337: /js/foo@4.5.6-pre.1337.jsii.tgz 1`] = `js/foo@4.5.6-pre.1337.jsii.tgz is a tarball`; + +exports[`foo@4.5.6-pre.1337: /python/MANIFEST.in 1`] = ` +include pyproject.toml + +`; + +exports[`foo@4.5.6-pre.1337: /python/README.md 1`] = ` + + +`; + +exports[`foo@4.5.6-pre.1337: /python/pyproject.toml 1`] = ` +[build-system] +requires = ["setuptools~=53.0.0", "wheel~=0.36.2"] +build-backend = "setuptools.build_meta" + +`; + +exports[`foo@4.5.6-pre.1337: /python/setup.py 1`] = ` +import json +import setuptools + +kwargs = json.loads( + """ +{ + "name": "foo", + "version": "4.5.6.dev1337", + "description": "Test assembly: foo", + "license": "UNLICENSED", + "url": "https://test.nope/foo", + "long_description_content_type": "text/markdown", + "author": "Test", + "bdist_wheel": { + "universal": true + }, + "project_urls": { + "Source": "foo.nope.git" + }, + "package_dir": { + "": "src" + }, + "packages": [ + "foo._jsii" + ], + "package_data": { + "foo._jsii": [ + "foo@4.5.6-pre.1337.jsii.tgz" + ] + }, + "python_requires": ">=3.6", + "install_requires": [ + "jsii>=1337.42.1337, <1338.0.0", + "publication>=0.0.3" + ], + "classifiers": [ + "Intended Audience :: Developers", + "Operating System :: OS Independent", + "Programming Language :: JavaScript", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Typing :: Typed" + ], + "scripts": [] +} +""" +) + +with open("README.md", encoding="utf8") as fp: + kwargs["long_description"] = fp.read() + + +setuptools.setup(**kwargs) + +`; + +exports[`foo@4.5.6-pre.1337: /python/src/foo/_jsii/__init__.py 1`] = ` +import abc +import builtins +import datetime +import enum +import typing + +import jsii +import publication +import typing_extensions + +__jsii_assembly__ = jsii.JSIIAssembly.load( + "foo", "4.5.6-pre.1337", __name__[0:-6], "foo@4.5.6-pre.1337.jsii.tgz" +) + +__all__ = [ + "__jsii_assembly__", +] + +publication.publish() + +`; + +exports[`foo@4.5.6-pre.1337: /python/src/foo/_jsii/foo@4.5.6-pre.1337.jsii.tgz 1`] = `python/src/foo/_jsii/foo@4.5.6-pre.1337.jsii.tgz is a tarball`; diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-dotnet.test.ts.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-dotnet.test.ts.snap index c2bd653980..3a20c9ef13 100644 --- a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-dotnet.test.ts.snap +++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-dotnet.test.ts.snap @@ -4,7 +4,6 @@ exports[`Generated code for "@scope/jsii-calc-base": / 1`] = ` โ”—โ” ๐Ÿ“ dotnet โ”—โ” ๐Ÿ“ Amazon.JSII.Tests.CalculatorPackageId.BasePackageId - โ”ฃโ” ๐Ÿ“„ .jsii โ”ฃโ” ๐Ÿ“ Amazon โ”ƒ โ”—โ” ๐Ÿ“ JSII โ”ƒ โ”—โ” ๐Ÿ“ Tests @@ -12,184 +11,17 @@ exports[`Generated code for "@scope/jsii-calc-base": / 1`] = ` โ”ƒ โ”—โ” ๐Ÿ“ BaseNamespace โ”ƒ โ”ฃโ” ๐Ÿ“„ Base.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ BaseProps.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ BasePropsProxy.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ BaseProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IBaseInterface.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IBaseInterfaceProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IBaseProps.cs - โ”ƒ โ”—โ” ๐Ÿ“ Internal - โ”ƒ โ”—โ” ๐Ÿ“ DependencyResolution - โ”ƒ โ”—โ” ๐Ÿ“„ Anchor.cs + โ”ƒ โ”ฃโ” ๐Ÿ“ Internal + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ DependencyResolution + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ Anchor.cs + โ”ƒ โ”—โ” ๐Ÿ“„ StaticConsumer.cs โ”ฃโ” ๐Ÿ“„ Amazon.JSII.Tests.CalculatorPackageId.BasePackageId.csproj โ”ฃโ” ๐Ÿ“„ AssemblyInfo.cs โ”—โ” ๐Ÿ“„ scope-jsii-calc-base-0.0.0.tgz `; -exports[`Generated code for "@scope/jsii-calc-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/.jsii 1`] = ` -{ - "author": { - "name": "Amazon Web Services", - "organization": true, - "roles": [ - "author" - ], - "url": "https://aws.amazon.com" - }, - "dependencies": { - "@scope/jsii-calc-base-of-base": "^0.0.0" - }, - "dependencyClosure": { - "@scope/jsii-calc-base-of-base": { - "targets": { - "dotnet": { - "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace", - "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId" - }, - "go": { - "moduleName": "github.com/aws-cdk/jsii/jsii-calc/golang" - }, - "java": { - "maven": { - "artifactId": "calculator-base-of-base", - "groupId": "software.amazon.jsii.tests" - }, - "package": "software.amazon.jsii.tests.calculator.baseofbase" - }, - "js": { - "npm": "@scope/jsii-calc-base-of-base" - }, - "python": { - "distName": "scope.jsii-calc-base-of-base", - "module": "scope.jsii_calc_base_of_base" - } - } - } - }, - "description": "An example direct dependency for jsii-calc.", - "homepage": "https://github.com/aws/jsii", - "jsiiVersion": "0.0.0", - "license": "Apache-2.0", - "name": "@scope/jsii-calc-base", - "repository": { - "directory": "packages/@scope/jsii-calc-base", - "type": "git", - "url": "https://github.com/aws/jsii.git" - }, - "schema": "jsii/0.10.0", - "targets": { - "dotnet": { - "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace", - "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BasePackageId" - }, - "go": { - "moduleName": "github.com/aws-cdk/jsii/jsii-calc/golang" - }, - "java": { - "maven": { - "artifactId": "calculator-base", - "groupId": "software.amazon.jsii.tests" - }, - "package": "software.amazon.jsii.tests.calculator.base" - }, - "js": { - "npm": "@scope/jsii-calc-base" - }, - "python": { - "distName": "scope.jsii-calc-base", - "module": "scope.jsii_calc_base" - } - }, - "types": { - "@scope/jsii-calc-base.Base": { - "abstract": true, - "assembly": "@scope/jsii-calc-base", - "docs": { - "summary": "A base class." - }, - "fqn": "@scope/jsii-calc-base.Base", - "initializer": {}, - "kind": "class", - "locationInModule": { - "filename": "lib/index.ts", - "line": 6 - }, - "methods": [ - { - "docs": { - "returns": "the name of the class (to verify native type names are created for derived classes)." - }, - "locationInModule": { - "filename": "lib/index.ts", - "line": 10 - }, - "name": "typeName", - "returns": { - "type": { - "primitive": "any" - } - } - } - ], - "name": "Base" - }, - "@scope/jsii-calc-base.BaseProps": { - "assembly": "@scope/jsii-calc-base", - "datatype": true, - "fqn": "@scope/jsii-calc-base.BaseProps", - "interfaces": [ - "@scope/jsii-calc-base-of-base.VeryBaseProps" - ], - "kind": "interface", - "locationInModule": { - "filename": "lib/index.ts", - "line": 15 - }, - "name": "BaseProps", - "properties": [ - { - "abstract": true, - "immutable": true, - "locationInModule": { - "filename": "lib/index.ts", - "line": 16 - }, - "name": "bar", - "type": { - "primitive": "string" - } - } - ] - }, - "@scope/jsii-calc-base.IBaseInterface": { - "assembly": "@scope/jsii-calc-base", - "fqn": "@scope/jsii-calc-base.IBaseInterface", - "interfaces": [ - "@scope/jsii-calc-base-of-base.IVeryBaseInterface" - ], - "kind": "interface", - "locationInModule": { - "filename": "lib/index.ts", - "line": 19 - }, - "methods": [ - { - "abstract": true, - "locationInModule": { - "filename": "lib/index.ts", - "line": 20 - }, - "name": "bar" - } - ], - "name": "IBaseInterface" - } - }, - "version": "0.0.0", - "fingerprint": "wIp2/3p7NHxnOxUbXktrzg6Y+CqdjDLxChiFLMaYQXc=" -} - -`; - exports[`Generated code for "@scope/jsii-calc-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId.csproj 1`] = ` @@ -218,11 +50,14 @@ exports[`Generated code for "@scope/jsii-calc-base": /dotnet/Amazon.JSII - - + + + 0612,0618 + + 0108,0109 @@ -264,6 +99,15 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } + + /// A base class. + [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.Base), fullyQualifiedName: "@scope/jsii-calc-base.Base")] + internal sealed class _Proxy : Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.Base + { + private _Proxy(ByRefValue reference): base(reference) + { + } + } } } @@ -299,132 +143,132 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace `; -exports[`Generated code for "@scope/jsii-calc-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/BasePropsProxy.cs 1`] = ` +exports[`Generated code for "@scope/jsii-calc-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/IBaseInterface.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace { - [JsiiTypeProxy(nativeType: typeof(IBaseProps), fullyQualifiedName: "@scope/jsii-calc-base.BaseProps")] - internal sealed class BasePropsProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.IBaseProps + [JsiiInterface(nativeType: typeof(IBaseInterface), fullyQualifiedName: "@scope/jsii-calc-base.IBaseInterface")] + public interface IBaseInterface : Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.IVeryBaseInterface { - private BasePropsProxy(ByRefValue reference): base(reference) - { - } + [JsiiMethod(name: "bar")] + void Bar(); - [JsiiProperty(name: "bar", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string Bar + [JsiiTypeProxy(nativeType: typeof(IBaseInterface), fullyQualifiedName: "@scope/jsii-calc-base.IBaseInterface")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.IBaseInterface { - get => GetInstanceProperty()!; - } + private _Proxy(ByRefValue reference): base(reference) + { + } - [JsiiProperty(name: "foo", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-base-of-base.Very\\"}")] - public Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.Very Foo - { - get => GetInstanceProperty()!; + [JsiiMethod(name: "bar")] + public void Bar() + { + InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); + } + + [JsiiMethod(name: "foo")] + public void Foo() + { + InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); + } } } } `; -exports[`Generated code for "@scope/jsii-calc-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/BaseProxy.cs 1`] = ` +exports[`Generated code for "@scope/jsii-calc-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/IBaseProps.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace { - /// A base class. - [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.Base), fullyQualifiedName: "@scope/jsii-calc-base.Base")] - internal sealed class BaseProxy : Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.Base + [JsiiInterface(nativeType: typeof(IBaseProps), fullyQualifiedName: "@scope/jsii-calc-base.BaseProps")] + public interface IBaseProps : Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.IVeryBaseProps { - private BaseProxy(ByRefValue reference): base(reference) + [JsiiProperty(name: "bar", typeJson: "{\\"primitive\\":\\"string\\"}")] + string Bar { + get; } - } -} - -`; -exports[`Generated code for "@scope/jsii-calc-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/IBaseInterface.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; + [JsiiTypeProxy(nativeType: typeof(IBaseProps), fullyQualifiedName: "@scope/jsii-calc-base.BaseProps")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.IBaseProps + { + private _Proxy(ByRefValue reference): base(reference) + { + } -#pragma warning disable CS0672,CS0809,CS1591 + [JsiiProperty(name: "bar", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string Bar + { + get => GetInstanceProperty()!; + } -namespace Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace -{ - [JsiiInterface(nativeType: typeof(IBaseInterface), fullyQualifiedName: "@scope/jsii-calc-base.IBaseInterface")] - public interface IBaseInterface : Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.IVeryBaseInterface - { - [JsiiMethod(name: "bar")] - void Bar(); + [JsiiProperty(name: "foo", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-base-of-base.Very\\"}")] + public Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.Very Foo + { + get => GetInstanceProperty()!; + } + } } } `; -exports[`Generated code for "@scope/jsii-calc-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/IBaseInterfaceProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - +exports[`Generated code for "@scope/jsii-calc-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/Internal/DependencyResolution/Anchor.cs 1`] = ` #pragma warning disable CS0672,CS0809,CS1591 -namespace Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace +namespace Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.Internal.DependencyResolution { - [JsiiTypeProxy(nativeType: typeof(IBaseInterface), fullyQualifiedName: "@scope/jsii-calc-base.IBaseInterface")] - internal sealed class IBaseInterfaceProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.IBaseInterface + public sealed class Anchor { - private IBaseInterfaceProxy(ByRefValue reference): base(reference) - { - } - - [JsiiMethod(name: "bar")] - public void Bar() - { - InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); - } - - [JsiiMethod(name: "foo")] - public void Foo() + public Anchor() { - InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); + new Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.Internal.DependencyResolution.Anchor(); } } } `; -exports[`Generated code for "@scope/jsii-calc-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/IBaseProps.cs 1`] = ` +exports[`Generated code for "@scope/jsii-calc-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/StaticConsumer.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace { - [JsiiInterface(nativeType: typeof(IBaseProps), fullyQualifiedName: "@scope/jsii-calc-base.BaseProps")] - public interface IBaseProps : Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.IVeryBaseProps + /// Hides the transitive dependency of base-of-base. + [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.StaticConsumer), fullyQualifiedName: "@scope/jsii-calc-base.StaticConsumer")] + public class StaticConsumer : DeputyBase { - [JsiiProperty(name: "bar", typeJson: "{\\"primitive\\":\\"string\\"}")] - string Bar + public StaticConsumer(): base(new DeputyProps(System.Array.Empty())) { - get; } - } -} -`; + /// 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) + { + } -exports[`Generated code for "@scope/jsii-calc-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/Internal/DependencyResolution/Anchor.cs 1`] = ` -#pragma warning disable CS0672,CS0809,CS1591 + /// 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) + { + } -namespace Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.Internal.DependencyResolution -{ - public sealed class Anchor - { - public Anchor() + [JsiiMethod(name: "consume", parametersJson: "[{\\"name\\":\\"args\\",\\"type\\":{\\"primitive\\":\\"any\\"},\\"variadic\\":true}]")] + public static void Consume(params object[] args) { - new Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.Internal.DependencyResolution.Anchor(); + InvokeStaticVoidMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.StaticConsumer), new System.Type[]{typeof(object[])}, new object[]{args}); } } } @@ -444,7 +288,6 @@ exports[`Generated code for "@scope/jsii-calc-base-of-base": / 1`] = ` โ”—โ” ๐Ÿ“ dotnet โ”—โ” ๐Ÿ“ Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId - โ”ฃโ” ๐Ÿ“„ .jsii โ”ฃโ” ๐Ÿ“ Amazon โ”ƒ โ”—โ” ๐Ÿ“ JSII โ”ƒ โ”—โ” ๐Ÿ“ Tests @@ -454,174 +297,13 @@ exports[`Generated code for "@scope/jsii-calc-base-of-base": / 1`] = ` โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ DependencyResolution โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ Anchor.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IVeryBaseInterface.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IVeryBaseInterfaceProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IVeryBaseProps.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ StaticConsumer.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ Very.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ VeryBaseProps.cs - โ”ƒ โ”—โ” ๐Ÿ“„ VeryBasePropsProxy.cs + โ”ƒ โ”—โ” ๐Ÿ“„ VeryBaseProps.cs โ”ฃโ” ๐Ÿ“„ Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId.csproj โ”ฃโ” ๐Ÿ“„ AssemblyInfo.cs - โ”—โ” ๐Ÿ“„ scope-jsii-calc-base-of-base-0.0.0.tgz -`; - -exports[`Generated code for "@scope/jsii-calc-base-of-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/.jsii 1`] = ` -{ - "author": { - "name": "Amazon Web Services", - "organization": true, - "roles": [ - "author" - ], - "url": "https://aws.amazon.com" - }, - "description": "An example transitive dependency for jsii-calc.", - "homepage": "https://github.com/aws/jsii", - "jsiiVersion": "0.0.0", - "license": "Apache-2.0", - "name": "@scope/jsii-calc-base-of-base", - "repository": { - "directory": "packages/@scope/jsii-calc-base-of-base", - "type": "git", - "url": "https://github.com/aws/jsii.git" - }, - "schema": "jsii/0.10.0", - "targets": { - "dotnet": { - "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace", - "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId" - }, - "go": { - "moduleName": "github.com/aws-cdk/jsii/jsii-calc/golang" - }, - "java": { - "maven": { - "artifactId": "calculator-base-of-base", - "groupId": "software.amazon.jsii.tests" - }, - "package": "software.amazon.jsii.tests.calculator.baseofbase" - }, - "js": { - "npm": "@scope/jsii-calc-base-of-base" - }, - "python": { - "distName": "scope.jsii-calc-base-of-base", - "module": "scope.jsii_calc_base_of_base" - } - }, - "types": { - "@scope/jsii-calc-base-of-base.IVeryBaseInterface": { - "assembly": "@scope/jsii-calc-base-of-base", - "fqn": "@scope/jsii-calc-base-of-base.IVeryBaseInterface", - "kind": "interface", - "locationInModule": { - "filename": "lib/index.ts", - "line": 1 - }, - "methods": [ - { - "abstract": true, - "locationInModule": { - "filename": "lib/index.ts", - "line": 2 - }, - "name": "foo" - } - ], - "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": 19 - }, - "methods": [ - { - "locationInModule": { - "filename": "lib/index.ts", - "line": 22 - }, - "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", - "docs": { - "stability": "experimental", - "summary": "Something here." - }, - "fqn": "@scope/jsii-calc-base-of-base.Very", - "initializer": {}, - "kind": "class", - "locationInModule": { - "filename": "lib/index.ts", - "line": 13 - }, - "methods": [ - { - "docs": { - "stability": "experimental" - }, - "locationInModule": { - "filename": "lib/index.ts", - "line": 14 - }, - "name": "hey", - "returns": { - "type": { - "primitive": "number" - } - } - } - ], - "name": "Very" - }, - "@scope/jsii-calc-base-of-base.VeryBaseProps": { - "assembly": "@scope/jsii-calc-base-of-base", - "datatype": true, - "fqn": "@scope/jsii-calc-base-of-base.VeryBaseProps", - "kind": "interface", - "locationInModule": { - "filename": "lib/index.ts", - "line": 5 - }, - "name": "VeryBaseProps", - "properties": [ - { - "abstract": true, - "immutable": true, - "locationInModule": { - "filename": "lib/index.ts", - "line": 6 - }, - "name": "foo", - "type": { - "fqn": "@scope/jsii-calc-base-of-base.Very" - } - } - ] - } - }, - "version": "0.0.0", - "fingerprint": "XzppfL+BknRpBHYygvGjf8OOXrTyNAx6cllN3vONLoU=" -} - + โ”—โ” ๐Ÿ“„ scope-jsii-calc-base-of-base-2.1.1.tgz `; exports[`Generated code for "@scope/jsii-calc-base-of-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId.csproj 1`] = ` @@ -631,7 +313,7 @@ exports[`Generated code for "@scope/jsii-calc-base-of-base": /dotnet/Ama An example transitive dependency for jsii-calc. Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId Apache-2.0 - 0.0.0 + 2.1.1 Amazon Web Services Amazon Web Services @@ -649,13 +331,16 @@ exports[`Generated code for "@scope/jsii-calc-base-of-base": /dotnet/Ama netcoreapp3.1 - + - + + 0612,0618 + + 0108,0109 @@ -674,29 +359,19 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace { [JsiiMethod(name: "foo")] void Foo(); - } -} - -`; - -exports[`Generated code for "@scope/jsii-calc-base-of-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/IVeryBaseInterfaceProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 -namespace Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace -{ - [JsiiTypeProxy(nativeType: typeof(IVeryBaseInterface), fullyQualifiedName: "@scope/jsii-calc-base-of-base.IVeryBaseInterface")] - internal sealed class IVeryBaseInterfaceProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.IVeryBaseInterface - { - private IVeryBaseInterfaceProxy(ByRefValue reference): base(reference) + [JsiiTypeProxy(nativeType: typeof(IVeryBaseInterface), fullyQualifiedName: "@scope/jsii-calc-base-of-base.IVeryBaseInterface")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.IVeryBaseInterface { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - [JsiiMethod(name: "foo")] - public void Foo() - { - InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); + [JsiiMethod(name: "foo")] + public void Foo() + { + InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); + } } } } @@ -718,6 +393,20 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace { get; } + + [JsiiTypeProxy(nativeType: typeof(IVeryBaseProps), fullyQualifiedName: "@scope/jsii-calc-base-of-base.VeryBaseProps")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.IVeryBaseProps + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiProperty(name: "foo", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-base-of-base.Very\\"}")] + public Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.Very Foo + { + get => GetInstanceProperty()!; + } + } } } @@ -840,44 +529,19 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace `; -exports[`Generated code for "@scope/jsii-calc-base-of-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/VeryBasePropsProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace -{ - [JsiiTypeProxy(nativeType: typeof(IVeryBaseProps), fullyQualifiedName: "@scope/jsii-calc-base-of-base.VeryBaseProps")] - internal sealed class VeryBasePropsProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.IVeryBaseProps - { - private VeryBasePropsProxy(ByRefValue reference): base(reference) - { - } - - [JsiiProperty(name: "foo", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-base-of-base.Very\\"}")] - public Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.Very Foo - { - get => GetInstanceProperty()!; - } - } -} - -`; - exports[`Generated code for "@scope/jsii-calc-base-of-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/AssemblyInfo.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; -[assembly: JsiiAssembly("@scope/jsii-calc-base-of-base", "0.0.0", "scope-jsii-calc-base-of-base-0.0.0.tgz")] +[assembly: JsiiAssembly("@scope/jsii-calc-base-of-base", "2.1.1", "scope-jsii-calc-base-of-base-2.1.1.tgz")] `; -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": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/scope-jsii-calc-base-of-base-2.1.1.tgz 1`] = `dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/scope-jsii-calc-base-of-base-2.1.1.tgz is a tarball`; exports[`Generated code for "@scope/jsii-calc-lib": / 1`] = ` โ”—โ” ๐Ÿ“ dotnet โ”—โ” ๐Ÿ“ Amazon.JSII.Tests.CalculatorPackageId.LibPackageId - โ”ฃโ” ๐Ÿ“„ .jsii โ”ฃโ” ๐Ÿ“ Amazon โ”ƒ โ”—โ” ๐Ÿ“ JSII โ”ƒ โ”—โ” ๐Ÿ“ Tests @@ -885,812 +549,29 @@ exports[`Generated code for "@scope/jsii-calc-lib": / 1`] = ` โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ LibNamespace โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ EnumFromScopedModule.cs โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ IDoublable.cs - โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ IDoublableProxy.cs โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ IFriendly.cs - โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ IFriendlyProxy.cs โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ IMyFirstStruct.cs โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“ Internal โ”ƒ โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ DependencyResolution โ”ƒ โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ Anchor.cs โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ IStructWithOnlyOptionals.cs โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ IThreeLevelsInterface.cs - โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ IThreeLevelsInterfaceProxy.cs โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ MyFirstStruct.cs - โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ MyFirstStructProxy.cs โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ Number.cs โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ NumericValue.cs - โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ NumericValueProxy.cs โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ Operation.cs - โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ OperationProxy.cs - โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ StructWithOnlyOptionals.cs - โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ StructWithOnlyOptionalsProxy.cs + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ StructWithOnlyOptionals.cs โ”ƒ โ”—โ” ๐Ÿ“ CustomSubmoduleName โ”ƒ โ”ฃโ” ๐Ÿ“„ IReflectable.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IReflectableEntry.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IReflectableProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ NestingClass.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ ReflectableEntry.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ ReflectableEntryProxy.cs โ”ƒ โ”—โ” ๐Ÿ“„ Reflector.cs โ”ฃโ” ๐Ÿ“„ Amazon.JSII.Tests.CalculatorPackageId.LibPackageId.csproj โ”ฃโ” ๐Ÿ“„ AssemblyInfo.cs โ”—โ” ๐Ÿ“„ scope-jsii-calc-lib-0.0.0.tgz `; -exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/.jsii 1`] = ` -{ - "author": { - "name": "Amazon Web Services", - "organization": true, - "roles": [ - "author" - ], - "url": "https://aws.amazon.com" - }, - "dependencies": { - "@scope/jsii-calc-base": "^0.0.0", - "@scope/jsii-calc-base-of-base": "^0.0.0" - }, - "dependencyClosure": { - "@scope/jsii-calc-base": { - "targets": { - "dotnet": { - "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace", - "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BasePackageId" - }, - "go": { - "moduleName": "github.com/aws-cdk/jsii/jsii-calc/golang" - }, - "java": { - "maven": { - "artifactId": "calculator-base", - "groupId": "software.amazon.jsii.tests" - }, - "package": "software.amazon.jsii.tests.calculator.base" - }, - "js": { - "npm": "@scope/jsii-calc-base" - }, - "python": { - "distName": "scope.jsii-calc-base", - "module": "scope.jsii_calc_base" - } - } - }, - "@scope/jsii-calc-base-of-base": { - "targets": { - "dotnet": { - "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace", - "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId" - }, - "go": { - "moduleName": "github.com/aws-cdk/jsii/jsii-calc/golang" - }, - "java": { - "maven": { - "artifactId": "calculator-base-of-base", - "groupId": "software.amazon.jsii.tests" - }, - "package": "software.amazon.jsii.tests.calculator.baseofbase" - }, - "js": { - "npm": "@scope/jsii-calc-base-of-base" - }, - "python": { - "distName": "scope.jsii-calc-base-of-base", - "module": "scope.jsii_calc_base_of_base" - } - } - } - }, - "description": "A simple calcuator library built on JSII.", - "docs": { - "deprecated": "Really just deprecated for shows...", - "stability": "deprecated" - }, - "homepage": "https://github.com/aws/jsii", - "jsiiVersion": "0.0.0", - "license": "Apache-2.0", - "name": "@scope/jsii-calc-lib", - "repository": { - "directory": "packages/@scope/jsii-calc-lib", - "type": "git", - "url": "https://github.com/aws/jsii.git" - }, - "schema": "jsii/0.10.0", - "submodules": { - "@scope/jsii-calc-lib.submodule": { - "locationInModule": { - "filename": "lib/index.ts", - "line": 112 - }, - "targets": { - "dotnet": { - "namespace": "Amazon.JSII.Tests.CustomSubmoduleName" - }, - "java": { - "package": "software.amazon.jsii.tests.calculator.custom_submodule_name" - }, - "python": { - "module": "scope.jsii_calc_lib.custom_submodule_name" - } - } - } - }, - "targets": { - "dotnet": { - "namespace": "Amazon.JSII.Tests.CalculatorNamespace.LibNamespace", - "packageId": "Amazon.JSII.Tests.CalculatorPackageId.LibPackageId", - "versionSuffix": "-devpreview" - }, - "go": { - "moduleName": "github.com/aws-cdk/jsii/jsii-calc/golang" - }, - "java": { - "maven": { - "artifactId": "calculator-lib", - "groupId": "software.amazon.jsii.tests", - "versionSuffix": ".DEVPREVIEW" - }, - "package": "software.amazon.jsii.tests.calculator.lib" - }, - "js": { - "npm": "@scope/jsii-calc-lib" - }, - "python": { - "distName": "scope.jsii-calc-lib", - "module": "scope.jsii_calc_lib" - } - }, - "types": { - "@scope/jsii-calc-lib.EnumFromScopedModule": { - "assembly": "@scope/jsii-calc-lib", - "docs": { - "remarks": "See awslabs/jsii#138", - "stability": "deprecated", - "summary": "Check that enums from \\\\@scoped packages can be references." - }, - "fqn": "@scope/jsii-calc-lib.EnumFromScopedModule", - "kind": "enum", - "locationInModule": { - "filename": "lib/index.ts", - "line": 97 - }, - "members": [ - { - "docs": { - "stability": "deprecated" - }, - "name": "VALUE1" - }, - { - "docs": { - "stability": "deprecated" - }, - "name": "VALUE2" - } - ], - "name": "EnumFromScopedModule" - }, - "@scope/jsii-calc-lib.IDoublable": { - "assembly": "@scope/jsii-calc-lib", - "docs": { - "stability": "deprecated", - "summary": "The general contract for a concrete number." - }, - "fqn": "@scope/jsii-calc-lib.IDoublable", - "kind": "interface", - "locationInModule": { - "filename": "lib/index.ts", - "line": 23 - }, - "name": "IDoublable", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "deprecated" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/index.ts", - "line": 24 - }, - "name": "doubleValue", - "type": { - "primitive": "number" - } - } - ] - }, - "@scope/jsii-calc-lib.IFriendly": { - "assembly": "@scope/jsii-calc-lib", - "docs": { - "remarks": "These classes can be greeted with\\na \\"hello\\" or \\"goodbye\\" blessing and they will respond back in a fun and friendly manner.", - "stability": "deprecated", - "summary": "Applies to classes that are considered friendly." - }, - "fqn": "@scope/jsii-calc-lib.IFriendly", - "kind": "interface", - "locationInModule": { - "filename": "lib/index.ts", - "line": 58 - }, - "methods": [ - { - "abstract": true, - "docs": { - "stability": "deprecated", - "summary": "Say hello!" - }, - "locationInModule": { - "filename": "lib/index.ts", - "line": 62 - }, - "name": "hello", - "returns": { - "type": { - "primitive": "string" - } - } - } - ], - "name": "IFriendly" - }, - "@scope/jsii-calc-lib.IThreeLevelsInterface": { - "assembly": "@scope/jsii-calc-lib", - "docs": { - "remarks": "Their presence validates that .NET/Java/jsii-reflect can track all fields\\nfar enough up the tree.", - "stability": "deprecated", - "summary": "Interface that inherits from packages 2 levels up the tree." - }, - "fqn": "@scope/jsii-calc-lib.IThreeLevelsInterface", - "interfaces": [ - "@scope/jsii-calc-base.IBaseInterface" - ], - "kind": "interface", - "locationInModule": { - "filename": "lib/index.ts", - "line": 108 - }, - "methods": [ - { - "abstract": true, - "docs": { - "stability": "deprecated" - }, - "locationInModule": { - "filename": "lib/index.ts", - "line": 109 - }, - "name": "baz" - } - ], - "name": "IThreeLevelsInterface" - }, - "@scope/jsii-calc-lib.MyFirstStruct": { - "assembly": "@scope/jsii-calc-lib", - "datatype": true, - "docs": { - "stability": "deprecated", - "summary": "This is the first struct we have created in jsii." - }, - "fqn": "@scope/jsii-calc-lib.MyFirstStruct", - "kind": "interface", - "locationInModule": { - "filename": "lib/index.ts", - "line": 68 - }, - "name": "MyFirstStruct", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "deprecated", - "summary": "An awesome number value." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/index.ts", - "line": 77 - }, - "name": "anumber", - "type": { - "primitive": "number" - } - }, - { - "abstract": true, - "docs": { - "stability": "deprecated", - "summary": "A string value." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/index.ts", - "line": 72 - }, - "name": "astring", - "type": { - "primitive": "string" - } - }, - { - "abstract": true, - "docs": { - "stability": "deprecated" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/index.ts", - "line": 78 - }, - "name": "firstOptional", - "optional": true, - "type": { - "collection": { - "elementtype": { - "primitive": "string" - }, - "kind": "array" - } - } - } - ] - }, - "@scope/jsii-calc-lib.Number": { - "assembly": "@scope/jsii-calc-lib", - "base": "@scope/jsii-calc-lib.NumericValue", - "docs": { - "stability": "deprecated", - "summary": "Represents a concrete number." - }, - "fqn": "@scope/jsii-calc-lib.Number", - "initializer": { - "docs": { - "stability": "deprecated", - "summary": "Creates a Number object." - }, - "locationInModule": { - "filename": "lib/index.ts", - "line": 35 - }, - "parameters": [ - { - "docs": { - "summary": "The number." - }, - "name": "value", - "type": { - "primitive": "number" - } - } - ] - }, - "interfaces": [ - "@scope/jsii-calc-lib.IDoublable" - ], - "kind": "class", - "locationInModule": { - "filename": "lib/index.ts", - "line": 30 - }, - "name": "Number", - "properties": [ - { - "docs": { - "stability": "deprecated", - "summary": "The number multiplied by 2." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/index.ts", - "line": 42 - }, - "name": "doubleValue", - "overrides": "@scope/jsii-calc-lib.IDoublable", - "type": { - "primitive": "number" - } - }, - { - "docs": { - "stability": "deprecated", - "summary": "The number." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/index.ts", - "line": 35 - }, - "name": "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" - } - } - ] - }, - "@scope/jsii-calc-lib.Operation": { - "abstract": true, - "assembly": "@scope/jsii-calc-lib", - "base": "@scope/jsii-calc-lib.NumericValue", - "docs": { - "stability": "deprecated", - "summary": "Represents an operation on values." - }, - "fqn": "@scope/jsii-calc-lib.Operation", - "initializer": {}, - "kind": "class", - "locationInModule": { - "filename": "lib/index.ts", - "line": 50 - }, - "methods": [ - { - "abstract": true, - "docs": { - "stability": "deprecated", - "summary": "String representation of the value." - }, - "locationInModule": { - "filename": "lib/index.ts", - "line": 51 - }, - "name": "toString", - "overrides": "@scope/jsii-calc-lib.NumericValue", - "returns": { - "type": { - "primitive": "string" - } - } - } - ], - "name": "Operation" - }, - "@scope/jsii-calc-lib.StructWithOnlyOptionals": { - "assembly": "@scope/jsii-calc-lib", - "datatype": true, - "docs": { - "stability": "deprecated", - "summary": "This is a struct with only optional properties." - }, - "fqn": "@scope/jsii-calc-lib.StructWithOnlyOptionals", - "kind": "interface", - "locationInModule": { - "filename": "lib/index.ts", - "line": 84 - }, - "name": "StructWithOnlyOptionals", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "deprecated", - "summary": "The first optional!" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/index.ts", - "line": 88 - }, - "name": "optional1", - "optional": true, - "type": { - "primitive": "string" - } - }, - { - "abstract": true, - "docs": { - "stability": "deprecated" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/index.ts", - "line": 89 - }, - "name": "optional2", - "optional": true, - "type": { - "primitive": "number" - } - }, - { - "abstract": true, - "docs": { - "stability": "deprecated" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/index.ts", - "line": 90 - }, - "name": "optional3", - "optional": true, - "type": { - "primitive": "boolean" - } - } - ] - }, - "@scope/jsii-calc-lib.submodule.IReflectable": { - "assembly": "@scope/jsii-calc-lib", - "docs": { - "stability": "deprecated" - }, - "fqn": "@scope/jsii-calc-lib.submodule.IReflectable", - "kind": "interface", - "locationInModule": { - "filename": "lib/submodule/index.ts", - "line": 1 - }, - "name": "IReflectable", - "namespace": "submodule", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "deprecated" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/submodule/index.ts", - "line": 2 - }, - "name": "entries", - "type": { - "collection": { - "elementtype": { - "fqn": "@scope/jsii-calc-lib.submodule.ReflectableEntry" - }, - "kind": "array" - } - } - } - ] - }, - "@scope/jsii-calc-lib.submodule.NestingClass": { - "assembly": "@scope/jsii-calc-lib", - "docs": { - "stability": "deprecated", - "summary": "This class is here to show we can use nested classes across module boundaries." - }, - "fqn": "@scope/jsii-calc-lib.submodule.NestingClass", - "kind": "class", - "locationInModule": { - "filename": "lib/submodule/index.ts", - "line": 22 - }, - "name": "NestingClass", - "namespace": "submodule" - }, - "@scope/jsii-calc-lib.submodule.NestingClass.NestedClass": { - "assembly": "@scope/jsii-calc-lib", - "docs": { - "stability": "deprecated", - "summary": "This class is here to show we can use nested classes across module boundaries." - }, - "fqn": "@scope/jsii-calc-lib.submodule.NestingClass.NestedClass", - "initializer": { - "docs": { - "stability": "deprecated" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/submodule/index.ts", - "line": 30 - }, - "name": "NestedClass", - "namespace": "submodule.NestingClass", - "properties": [ - { - "docs": { - "stability": "deprecated" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/submodule/index.ts", - "line": 31 - }, - "name": "property", - "type": { - "primitive": "string" - } - } - ] - }, - "@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, - "docs": { - "stability": "deprecated" - }, - "fqn": "@scope/jsii-calc-lib.submodule.ReflectableEntry", - "kind": "interface", - "locationInModule": { - "filename": "lib/submodule/index.ts", - "line": 5 - }, - "name": "ReflectableEntry", - "namespace": "submodule", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "deprecated" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/submodule/index.ts", - "line": 6 - }, - "name": "key", - "type": { - "primitive": "string" - } - }, - { - "abstract": true, - "docs": { - "stability": "deprecated" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/submodule/index.ts", - "line": 7 - }, - "name": "value", - "type": { - "primitive": "any" - } - } - ] - }, - "@scope/jsii-calc-lib.submodule.Reflector": { - "assembly": "@scope/jsii-calc-lib", - "docs": { - "stability": "deprecated" - }, - "fqn": "@scope/jsii-calc-lib.submodule.Reflector", - "initializer": { - "docs": { - "stability": "deprecated" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/submodule/index.ts", - "line": 10 - }, - "methods": [ - { - "docs": { - "stability": "deprecated" - }, - "locationInModule": { - "filename": "lib/submodule/index.ts", - "line": 11 - }, - "name": "asMap", - "parameters": [ - { - "name": "reflectable", - "type": { - "fqn": "@scope/jsii-calc-lib.submodule.IReflectable" - } - } - ], - "returns": { - "type": { - "collection": { - "elementtype": { - "primitive": "any" - }, - "kind": "map" - } - } - } - } - ], - "name": "Reflector", - "namespace": "submodule" - } - }, - "version": "0.0.0", - "fingerprint": "/PrQbD8BlAtg3N9iuntBks7Q/oIyS45A/S7RvNATePA=" -} - -`; - exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId.csproj 1`] = ` @@ -1719,12 +600,15 @@ exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII. - - - + + + + 0612,0618 + + 0108,0109 @@ -1789,38 +673,28 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { get; } - } -} - -`; - -exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IDoublableProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace -{ - /// (deprecated) The general contract for a concrete number. - /// - /// Stability: Deprecated - /// - [JsiiTypeProxy(nativeType: typeof(IDoublable), fullyQualifiedName: "@scope/jsii-calc-lib.IDoublable")] - [System.Obsolete()] - internal sealed class IDoublableProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IDoublable - { - private IDoublableProxy(ByRefValue reference): base(reference) - { - } + /// (deprecated) The general contract for a concrete number. /// /// Stability: Deprecated /// - [JsiiProperty(name: "doubleValue", typeJson: "{\\"primitive\\":\\"number\\"}")] + [JsiiTypeProxy(nativeType: typeof(IDoublable), fullyQualifiedName: "@scope/jsii-calc-lib.IDoublable")] [System.Obsolete()] - public double DoubleValue + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IDoublable { - get => GetInstanceProperty()!; + private _Proxy(ByRefValue reference): base(reference) + { + } + + /// + /// Stability: Deprecated + /// + [JsiiProperty(name: "doubleValue", typeJson: "{\\"primitive\\":\\"number\\"}")] + [System.Obsolete()] + public double DoubleValue + { + get => GetInstanceProperty()!; + } } } } @@ -1852,42 +726,32 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace [JsiiMethod(name: "hello", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] [System.Obsolete()] string Hello(); - } -} - -`; - -exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IFriendlyProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace -{ - /// (deprecated) Applies to classes that are considered friendly. - /// - /// These classes can be greeted with - /// a "hello" or "goodbye" blessing and they will respond back in a fun and friendly manner. - /// - /// Stability: Deprecated - /// - [JsiiTypeProxy(nativeType: typeof(IFriendly), fullyQualifiedName: "@scope/jsii-calc-lib.IFriendly")] - [System.Obsolete()] - internal sealed class IFriendlyProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IFriendly - { - private IFriendlyProxy(ByRefValue reference): base(reference) - { - } - /// (deprecated) Say hello! + /// (deprecated) Applies to classes that are considered friendly. /// + /// These classes can be greeted with + /// a "hello" or "goodbye" blessing and they will respond back in a fun and friendly manner. + /// /// Stability: Deprecated /// - [JsiiMethod(name: "hello", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] + [JsiiTypeProxy(nativeType: typeof(IFriendly), fullyQualifiedName: "@scope/jsii-calc-lib.IFriendly")] [System.Obsolete()] - public string Hello() + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IFriendly { - return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; + private _Proxy(ByRefValue reference): base(reference) + { + } + + /// (deprecated) Say hello! + /// + /// Stability: Deprecated + /// + [JsiiMethod(name: "hello", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] + [System.Obsolete()] + public string Hello() + { + return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; + } } } } @@ -1944,40 +808,86 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace return null; } } - } -} -`; - -exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IStructWithOnlyOptionals.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace -{ - /// (deprecated) This is a struct with only optional properties. - /// - /// Stability: Deprecated - /// - [JsiiInterface(nativeType: typeof(IStructWithOnlyOptionals), fullyQualifiedName: "@scope/jsii-calc-lib.StructWithOnlyOptionals")] - [System.Obsolete()] - public interface IStructWithOnlyOptionals - { - /// (deprecated) The first optional! + /// (deprecated) This is the first struct we have created in jsii. /// /// Stability: Deprecated /// - [JsiiProperty(name: "optional1", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] + [JsiiTypeProxy(nativeType: typeof(IMyFirstStruct), fullyQualifiedName: "@scope/jsii-calc-lib.MyFirstStruct")] [System.Obsolete()] - [Amazon.JSII.Runtime.Deputy.JsiiOptional] - string? Optional1 + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IMyFirstStruct { - get + private _Proxy(ByRefValue reference): base(reference) { - return null; } - } + + /// (deprecated) An awesome number value. + /// + /// Stability: Deprecated + /// + [JsiiProperty(name: "anumber", typeJson: "{\\"primitive\\":\\"number\\"}")] + [System.Obsolete()] + public double Anumber + { + get => GetInstanceProperty()!; + } + + /// (deprecated) A string value. + /// + /// Stability: Deprecated + /// + [JsiiProperty(name: "astring", typeJson: "{\\"primitive\\":\\"string\\"}")] + [System.Obsolete()] + public string Astring + { + get => GetInstanceProperty()!; + } + + /// + /// Stability: Deprecated + /// + [JsiiOptional] + [JsiiProperty(name: "firstOptional", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"string\\"},\\"kind\\":\\"array\\"}}", isOptional: true)] + [System.Obsolete()] + public string[]? FirstOptional + { + get => GetInstanceProperty(); + } + } + } +} + +`; + +exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IStructWithOnlyOptionals.cs 1`] = ` +using Amazon.JSII.Runtime.Deputy; + +#pragma warning disable CS0672,CS0809,CS1591 + +namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace +{ + /// (deprecated) This is a struct with only optional properties. + /// + /// Stability: Deprecated + /// + [JsiiInterface(nativeType: typeof(IStructWithOnlyOptionals), fullyQualifiedName: "@scope/jsii-calc-lib.StructWithOnlyOptionals")] + [System.Obsolete()] + public interface IStructWithOnlyOptionals + { + /// (deprecated) The first optional! + /// + /// Stability: Deprecated + /// + [JsiiProperty(name: "optional1", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] + [System.Obsolete()] + [Amazon.JSII.Runtime.Deputy.JsiiOptional] + string? Optional1 + { + get + { + return null; + } + } /// /// Stability: Deprecated @@ -2006,6 +916,53 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace return null; } } + + /// (deprecated) This is a struct with only optional properties. + /// + /// Stability: Deprecated + /// + [JsiiTypeProxy(nativeType: typeof(IStructWithOnlyOptionals), fullyQualifiedName: "@scope/jsii-calc-lib.StructWithOnlyOptionals")] + [System.Obsolete()] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IStructWithOnlyOptionals + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + /// (deprecated) The first optional! + /// + /// Stability: Deprecated + /// + [JsiiOptional] + [JsiiProperty(name: "optional1", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] + [System.Obsolete()] + public string? Optional1 + { + get => GetInstanceProperty(); + } + + /// + /// Stability: Deprecated + /// + [JsiiOptional] + [JsiiProperty(name: "optional2", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] + [System.Obsolete()] + public double? Optional2 + { + get => GetInstanceProperty(); + } + + /// + /// Stability: Deprecated + /// + [JsiiOptional] + [JsiiProperty(name: "optional3", typeJson: "{\\"primitive\\":\\"boolean\\"}", isOptional: true)] + [System.Obsolete()] + public bool? Optional3 + { + get => GetInstanceProperty(); + } + } } } @@ -2035,53 +992,43 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace [JsiiMethod(name: "baz")] [System.Obsolete()] void Baz(); - } -} - -`; - -exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IThreeLevelsInterfaceProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace -{ - /// (deprecated) Interface that inherits from packages 2 levels up the tree. - /// - /// Their presence validates that .NET/Java/jsii-reflect can track all fields - /// far enough up the tree. - /// - /// Stability: Deprecated - /// - [JsiiTypeProxy(nativeType: typeof(IThreeLevelsInterface), fullyQualifiedName: "@scope/jsii-calc-lib.IThreeLevelsInterface")] - [System.Obsolete()] - internal sealed class IThreeLevelsInterfaceProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IThreeLevelsInterface - { - private IThreeLevelsInterfaceProxy(ByRefValue reference): base(reference) - { - } + /// (deprecated) Interface that inherits from packages 2 levels up the tree. /// + /// Their presence validates that .NET/Java/jsii-reflect can track all fields + /// far enough up the tree. + /// /// Stability: Deprecated /// - [JsiiMethod(name: "baz")] + [JsiiTypeProxy(nativeType: typeof(IThreeLevelsInterface), fullyQualifiedName: "@scope/jsii-calc-lib.IThreeLevelsInterface")] [System.Obsolete()] - public void Baz() + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IThreeLevelsInterface { - InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); - } + private _Proxy(ByRefValue reference): base(reference) + { + } - [JsiiMethod(name: "bar")] - public void Bar() - { - InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); - } + /// + /// Stability: Deprecated + /// + [JsiiMethod(name: "baz")] + [System.Obsolete()] + public void Baz() + { + InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); + } - [JsiiMethod(name: "foo")] - public void Foo() - { - InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); + [JsiiMethod(name: "bar")] + public void Bar() + { + InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); + } + + [JsiiMethod(name: "foo")] + public void Foo() + { + InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); + } } } } @@ -2161,62 +1108,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/MyFirstStructProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace -{ - /// (deprecated) This is the first struct we have created in jsii. - /// - /// Stability: Deprecated - /// - [JsiiTypeProxy(nativeType: typeof(IMyFirstStruct), fullyQualifiedName: "@scope/jsii-calc-lib.MyFirstStruct")] - [System.Obsolete()] - internal sealed class MyFirstStructProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IMyFirstStruct - { - private MyFirstStructProxy(ByRefValue reference): base(reference) - { - } - - /// (deprecated) An awesome number value. - /// - /// Stability: Deprecated - /// - [JsiiProperty(name: "anumber", typeJson: "{\\"primitive\\":\\"number\\"}")] - [System.Obsolete()] - public double Anumber - { - get => GetInstanceProperty()!; - } - - /// (deprecated) A string value. - /// - /// Stability: Deprecated - /// - [JsiiProperty(name: "astring", typeJson: "{\\"primitive\\":\\"string\\"}")] - [System.Obsolete()] - public string Astring - { - get => GetInstanceProperty()!; - } - - /// - /// Stability: Deprecated - /// - [JsiiOptional] - [JsiiProperty(name: "firstOptional", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"string\\"},\\"kind\\":\\"array\\"}}", isOptional: true)] - [System.Obsolete()] - public string[]? FirstOptional - { - get => GetInstanceProperty(); - } - } -} - -`; - exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/Number.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -2338,39 +1229,29 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { 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 -{ - /// (deprecated) 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) - { - } - /// (deprecated) The value. + /// (deprecated) Abstract class which represents a numeric value. /// /// Stability: Deprecated /// - [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"number\\"}")] + [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue), fullyQualifiedName: "@scope/jsii-calc-lib.NumericValue")] [System.Obsolete()] - public override double Value + internal sealed class _Proxy : Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue { - get => GetInstanceProperty()!; + private _Proxy(ByRefValue reference): base(reference) + { + } + + /// (deprecated) The value. + /// + /// Stability: Deprecated + /// + [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"number\\"}")] + [System.Obsolete()] + public override double Value + { + get => GetInstanceProperty()!; + } } } } @@ -2418,81 +1299,71 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace [System.Obsolete()] public override abstract string ToString(); + + /// (deprecated) Represents an operation on values. + /// + /// Stability: Deprecated + /// + [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Operation), fullyQualifiedName: "@scope/jsii-calc-lib.Operation")] + [System.Obsolete()] + new internal sealed class _Proxy : Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Operation + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + /// (deprecated) The value. + /// + /// Stability: Deprecated + /// + [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"number\\"}")] + [System.Obsolete()] + public override double Value + { + get => GetInstanceProperty()!; + } + + /// (deprecated) String representation of the value. + /// + /// Stability: Deprecated + /// + [JsiiMethod(name: "toString", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", isOverride: true)] + [System.Obsolete()] + public override string ToString() + { + return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; + } + } } } `; -exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/OperationProxy.cs 1`] = ` +exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/StructWithOnlyOptionals.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { - /// (deprecated) Represents an operation on values. + /// (deprecated) This is a struct with only optional properties. /// /// Stability: Deprecated /// - [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Operation), fullyQualifiedName: "@scope/jsii-calc-lib.Operation")] - [System.Obsolete()] - internal sealed class OperationProxy : Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Operation + [JsiiByValue(fqn: "@scope/jsii-calc-lib.StructWithOnlyOptionals")] + public class StructWithOnlyOptionals : Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IStructWithOnlyOptionals { - private OperationProxy(ByRefValue reference): base(reference) + /// (deprecated) The first optional! + /// + /// Stability: Deprecated + /// + [JsiiOptional] + [JsiiProperty(name: "optional1", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true, isOverride: true)] + [System.Obsolete()] + public string? Optional1 { - } - - /// (deprecated) The value. - /// - /// Stability: Deprecated - /// - [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"number\\"}")] - [System.Obsolete()] - public override double Value - { - get => GetInstanceProperty()!; - } - - /// (deprecated) String representation of the value. - /// - /// Stability: Deprecated - /// - [JsiiMethod(name: "toString", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", isOverride: true)] - [System.Obsolete()] - public override string ToString() - { - return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; - } - } -} - -`; - -exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/StructWithOnlyOptionals.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace -{ - /// (deprecated) This is a struct with only optional properties. - /// - /// Stability: Deprecated - /// - [JsiiByValue(fqn: "@scope/jsii-calc-lib.StructWithOnlyOptionals")] - public class StructWithOnlyOptionals : Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IStructWithOnlyOptionals - { - /// (deprecated) The first optional! - /// - /// Stability: Deprecated - /// - [JsiiOptional] - [JsiiProperty(name: "optional1", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true, isOverride: true)] - [System.Obsolete()] - public string? Optional1 - { - get; - set; + get; + set; } /// @@ -2523,85 +1394,50 @@ 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/StructWithOnlyOptionalsProxy.cs 1`] = ` +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; #pragma warning disable CS0672,CS0809,CS1591 -namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace +namespace Amazon.JSII.Tests.CustomSubmoduleName { - /// (deprecated) This is a struct with only optional properties. /// /// Stability: Deprecated /// - [JsiiTypeProxy(nativeType: typeof(IStructWithOnlyOptionals), fullyQualifiedName: "@scope/jsii-calc-lib.StructWithOnlyOptionals")] + [JsiiInterface(nativeType: typeof(IReflectable), fullyQualifiedName: "@scope/jsii-calc-lib.submodule.IReflectable")] [System.Obsolete()] - internal sealed class StructWithOnlyOptionalsProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IStructWithOnlyOptionals + public interface IReflectable { - private StructWithOnlyOptionalsProxy(ByRefValue reference): base(reference) - { - } - - /// (deprecated) The first optional! - /// - /// Stability: Deprecated - /// - [JsiiOptional] - [JsiiProperty(name: "optional1", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] - [System.Obsolete()] - public string? Optional1 - { - get => GetInstanceProperty(); - } - /// /// Stability: Deprecated /// - [JsiiOptional] - [JsiiProperty(name: "optional2", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] + [JsiiProperty(name: "entries", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.submodule.ReflectableEntry\\"},\\"kind\\":\\"array\\"}}")] [System.Obsolete()] - public double? Optional2 + Amazon.JSII.Tests.CustomSubmoduleName.IReflectableEntry[] Entries { - get => GetInstanceProperty(); + get; } /// /// Stability: Deprecated /// - [JsiiOptional] - [JsiiProperty(name: "optional3", typeJson: "{\\"primitive\\":\\"boolean\\"}", isOptional: true)] + [JsiiTypeProxy(nativeType: typeof(IReflectable), fullyQualifiedName: "@scope/jsii-calc-lib.submodule.IReflectable")] [System.Obsolete()] - public bool? Optional3 + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CustomSubmoduleName.IReflectable { - 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; - -#pragma warning disable CS0672,CS0809,CS1591 + private _Proxy(ByRefValue reference): base(reference) + { + } -namespace Amazon.JSII.Tests.CustomSubmoduleName -{ - /// - /// Stability: Deprecated - /// - [JsiiInterface(nativeType: typeof(IReflectable), fullyQualifiedName: "@scope/jsii-calc-lib.submodule.IReflectable")] - [System.Obsolete()] - public interface IReflectable - { - /// - /// Stability: Deprecated - /// - [JsiiProperty(name: "entries", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.submodule.ReflectableEntry\\"},\\"kind\\":\\"array\\"}}")] - [System.Obsolete()] - Amazon.JSII.Tests.CustomSubmoduleName.IReflectableEntry[] Entries - { - get; + /// + /// Stability: Deprecated + /// + [JsiiProperty(name: "entries", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.submodule.ReflectableEntry\\"},\\"kind\\":\\"array\\"}}")] + [System.Obsolete()] + public Amazon.JSII.Tests.CustomSubmoduleName.IReflectableEntry[] Entries + { + get => GetInstanceProperty()!; + } } } } @@ -2641,37 +1477,37 @@ namespace Amazon.JSII.Tests.CustomSubmoduleName { get; } - } -} - -`; - -exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CustomSubmoduleName/IReflectableProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CustomSubmoduleName -{ - /// - /// Stability: Deprecated - /// - [JsiiTypeProxy(nativeType: typeof(IReflectable), fullyQualifiedName: "@scope/jsii-calc-lib.submodule.IReflectable")] - [System.Obsolete()] - internal sealed class IReflectableProxy : DeputyBase, Amazon.JSII.Tests.CustomSubmoduleName.IReflectable - { - private IReflectableProxy(ByRefValue reference): base(reference) - { - } /// /// Stability: Deprecated /// - [JsiiProperty(name: "entries", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.submodule.ReflectableEntry\\"},\\"kind\\":\\"array\\"}}")] + [JsiiTypeProxy(nativeType: typeof(IReflectableEntry), fullyQualifiedName: "@scope/jsii-calc-lib.submodule.ReflectableEntry")] [System.Obsolete()] - public Amazon.JSII.Tests.CustomSubmoduleName.IReflectableEntry[] Entries + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CustomSubmoduleName.IReflectableEntry { - get => GetInstanceProperty()!; + private _Proxy(ByRefValue reference): base(reference) + { + } + + /// + /// Stability: Deprecated + /// + [JsiiProperty(name: "key", typeJson: "{\\"primitive\\":\\"string\\"}")] + [System.Obsolete()] + public string Key + { + get => GetInstanceProperty()!; + } + + /// + /// Stability: Deprecated + /// + [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"any\\"}")] + [System.Obsolete()] + public object Value + { + get => GetInstanceProperty()!; + } } } } @@ -2767,29 +1603,30 @@ namespace Amazon.JSII.Tests.CustomSubmoduleName { get; } - } - /// (deprecated) 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) - { - } + /// (deprecated) This is a struct, nested within a class. /// + /// Normal. + /// /// Stability: Deprecated /// - [JsiiProperty(name: "name", typeJson: "{\\"primitive\\":\\"string\\"}")] + [JsiiTypeProxy(nativeType: typeof(INestedStruct), fullyQualifiedName: "@scope/jsii-calc-lib.submodule.NestingClass.NestedStruct")] [System.Obsolete()] - public string Name + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CustomSubmoduleName.NestingClass.INestedStruct { - get => GetInstanceProperty()!; + private _Proxy(ByRefValue reference): base(reference) + { + } + + /// + /// Stability: Deprecated + /// + [JsiiProperty(name: "name", typeJson: "{\\"primitive\\":\\"string\\"}")] + [System.Obsolete()] + public string Name + { + get => GetInstanceProperty()!; + } } } #pragma warning disable CS8618 @@ -2860,48 +1697,6 @@ namespace Amazon.JSII.Tests.CustomSubmoduleName `; -exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CustomSubmoduleName/ReflectableEntryProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CustomSubmoduleName -{ - /// - /// Stability: Deprecated - /// - [JsiiTypeProxy(nativeType: typeof(IReflectableEntry), fullyQualifiedName: "@scope/jsii-calc-lib.submodule.ReflectableEntry")] - [System.Obsolete()] - internal sealed class ReflectableEntryProxy : DeputyBase, Amazon.JSII.Tests.CustomSubmoduleName.IReflectableEntry - { - private ReflectableEntryProxy(ByRefValue reference): base(reference) - { - } - - /// - /// Stability: Deprecated - /// - [JsiiProperty(name: "key", typeJson: "{\\"primitive\\":\\"string\\"}")] - [System.Obsolete()] - public string Key - { - get => GetInstanceProperty()!; - } - - /// - /// Stability: Deprecated - /// - [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"any\\"}")] - [System.Obsolete()] - public object Value - { - get => GetInstanceProperty()!; - } - } -} - -`; - exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CustomSubmoduleName/Reflector.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -2967,18 +1762,14 @@ exports[`Generated code for "jsii-calc": / 1`] = ` โ”—โ” ๐Ÿ“ dotnet โ”—โ” ๐Ÿ“ Amazon.JSII.Tests.CalculatorPackageId - โ”ฃโ” ๐Ÿ“„ .jsii โ”ฃโ” ๐Ÿ“ Amazon โ”ƒ โ”—โ” ๐Ÿ“ JSII โ”ƒ โ”—โ” ๐Ÿ“ Tests โ”ƒ โ”—โ” ๐Ÿ“ CalculatorNamespace โ”ƒ โ”ฃโ” ๐Ÿ“„ AbstractClass.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ AbstractClassBase.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ AbstractClassBaseProxy.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ AbstractClassProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ AbstractClassReturner.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ AbstractSuite.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ AbstractSuiteProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ Add.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ AllowedMethodNames.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ AllTypes.cs @@ -2990,14 +1781,10 @@ exports[`Generated code for "jsii-calc": / 1`] = ` โ”ƒ โ”ฃโ” ๐Ÿ“„ BaseJsii976.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ Bell.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ BinaryOperation.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ BinaryOperationProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ BurriedAnonymousObject.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ BurriedAnonymousObjectProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ Calculator.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ CalculatorProps.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ CalculatorPropsProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ ChildStruct982.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ ChildStruct982Proxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ ClassThatImplementsTheInternalInterface.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ ClassThatImplementsThePrivateInterface.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ ClassWithCollections.cs @@ -3006,11 +1793,9 @@ exports[`Generated code for "jsii-calc": / 1`] = ` โ”ƒ โ”ฃโ” ๐Ÿ“„ ClassWithMutableObjectLiteralProperty.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ ClassWithPrivateConstructorAndAutomaticProperties.cs โ”ƒ โ”ฃโ” ๐Ÿ“ Composition - โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ CompositeOperation.cs - โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ CompositeOperationProxy.cs + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ CompositeOperation.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ ConfusingToJackson.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ ConfusingToJacksonStruct.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ ConfusingToJacksonStructProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ ConstructorPassesThisOut.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ Constructors.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ ConsumePureInterface.cs @@ -3022,20 +1807,14 @@ exports[`Generated code for "jsii-calc": / 1`] = ` โ”ƒ โ”ฃโ” ๐Ÿ“„ DeprecatedClass.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ DeprecatedEnum.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ DeprecatedStruct.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ DeprecatedStructProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“ DerivedClassHasNoProperties โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ Base.cs โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ Derived.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ DerivedStruct.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ DerivedStructProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ DiamondInheritanceBaseLevelStruct.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ DiamondInheritanceBaseLevelStructProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ DiamondInheritanceFirstMidLevelStruct.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ DiamondInheritanceFirstMidLevelStructProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ DiamondInheritanceSecondMidLevelStruct.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ DiamondInheritanceSecondMidLevelStructProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ DiamondInheritanceTopLevelStruct.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ DiamondInheritanceTopLevelStructProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ DisappointingCollectionSource.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ DocumentedClass.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ DoNotOverridePrivates.cs @@ -3045,43 +1824,30 @@ exports[`Generated code for "jsii-calc": / 1`] = ` โ”ƒ โ”ฃโ” ๐Ÿ“„ DynamicPropertyBearer.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ DynamicPropertyBearerChild.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ Entropy.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ EntropyProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ EnumDispenser.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ EraseUndefinedHashValues.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ EraseUndefinedHashValuesOptions.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ EraseUndefinedHashValuesOptionsProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ ExperimentalClass.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ ExperimentalEnum.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ ExperimentalStruct.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ ExperimentalStructProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ ExportedBaseClass.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ ExtendsInternalInterface.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ ExtendsInternalInterfaceProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ ExternalClass.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ ExternalEnum.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ ExternalStruct.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ ExternalStructProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ GiveMeStructs.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ Greetee.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ GreeteeProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ GreetingAugmenter.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IAnonymousImplementationProvider.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IAnonymousImplementationProviderProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IAnonymouslyImplementMe.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IAnonymouslyImplementMeProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IAnotherPublicInterface.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IAnotherPublicInterfaceProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IBell.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IBellProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IBellRinger.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IBellRingerProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ ICalculatorProps.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IChildStruct982.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IConcreteBellRinger.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IConcreteBellRingerProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IConfusingToJacksonStruct.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IDeprecatedInterface.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IDeprecatedInterfaceProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IDeprecatedStruct.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IDerivedStruct.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IDiamondInheritanceBaseLevelStruct.cs @@ -3090,44 +1856,27 @@ exports[`Generated code for "jsii-calc": / 1`] = ` โ”ƒ โ”ฃโ” ๐Ÿ“„ IDiamondInheritanceTopLevelStruct.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IEraseUndefinedHashValuesOptions.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IExperimentalInterface.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IExperimentalInterfaceProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IExperimentalStruct.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IExtendsInternalInterface.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IExtendsPrivateInterface.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IExtendsPrivateInterfaceProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IExternalInterface.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IExternalInterfaceProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IExternalStruct.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IFriendlier.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IFriendlierProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IFriendlyRandomGenerator.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IFriendlyRandomGeneratorProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IGreetee.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IImplictBaseOfBase.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IInterfaceImplementedByAbstractClass.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IInterfaceImplementedByAbstractClassProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IInterfaceThatShouldNotBeADataType.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IInterfaceThatShouldNotBeADataTypeProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IInterfaceWithInternal.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IInterfaceWithInternalProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IInterfaceWithMethods.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IInterfaceWithMethodsProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IInterfaceWithOptionalMethodArguments.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IInterfaceWithOptionalMethodArgumentsProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IInterfaceWithProperties.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IInterfaceWithPropertiesExtension.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IInterfaceWithPropertiesExtensionProxy.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IInterfaceWithPropertiesProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IJSII417Derived.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IJSII417DerivedProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IJSII417PublicBaseOfBase.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IJSII417PublicBaseOfBaseProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IJsii487External.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IJsii487External2.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IJsii487External2Proxy.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IJsii487ExternalProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IJsii496.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IJsii496Proxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ ILevelOneProps.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ ILoadBalancedFargateServiceProps.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ Implementation.cs @@ -3136,22 +1885,17 @@ exports[`Generated code for "jsii-calc": / 1`] = ` โ”ƒ โ”ฃโ” ๐Ÿ“„ ImplementsInterfaceWithInternalSubclass.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ ImplementsPrivateInterface.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ ImplictBaseOfBase.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ ImplictBaseOfBaseProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IMutableObjectLiteral.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IMutableObjectLiteralProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ InbetweenClass.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ INestedStruct.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ INonInternalInterface.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ INonInternalInterfaceProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ InterfaceCollections.cs โ”ƒ โ”ฃโ” ๐Ÿ“ InterfaceInNamespaceIncludesClasses โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ Foo.cs โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ Hello.cs - โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ HelloProxy.cs โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ IHello.cs โ”ƒ โ”ฃโ” ๐Ÿ“ InterfaceInNamespaceOnlyInterface โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ Hello.cs - โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ HelloProxy.cs โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ IHello.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ InterfacesMaker.cs โ”ƒ โ”ฃโ” ๐Ÿ“ Internal @@ -3159,42 +1903,30 @@ exports[`Generated code for "jsii-calc": / 1`] = ` โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ Anchor.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ INullShouldBeTreatedAsUndefinedData.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IObjectWithProperty.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IObjectWithPropertyProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IOptionalMethod.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IOptionalMethodProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IOptionalStruct.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IParentStruct982.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IPrivatelyImplemented.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IPrivatelyImplementedProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IPublicInterface.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IPublicInterface2.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IPublicInterface2Proxy.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IPublicInterfaceProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IRandomNumberGenerator.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IRandomNumberGeneratorProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IReturnJsii976.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IReturnJsii976Proxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IReturnsNumber.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IReturnsNumberProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IRootStruct.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ ISecondLevelStruct.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ ISmellyStruct.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ Isomorphism.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IsomorphismProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IStableInterface.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IStableInterfaceProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IStableStruct.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IStructA.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IStructB.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IStructParameterType.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IStructReturningDelegate.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IStructReturningDelegateProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IStructWithJavaReservedWords.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ ISupportsNiceJavaBuilderProps.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ ITopLevelStruct.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IUnionProperties.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ IWallClock.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ IWallClockProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ JavaReservedWords.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ JSII417Derived.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ JSII417PublicBaseOfBase.cs @@ -3207,20 +1939,16 @@ exports[`Generated code for "jsii-calc": / 1`] = ` โ”ƒ โ”ฃโ” ๐Ÿ“„ JsonFormatter.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ LevelOne.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ LevelOneProps.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ LevelOnePropsProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ LoadBalancedFargateServiceProps.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ LoadBalancedFargateServicePropsProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ MethodNamedProperty.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ Multiply.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ NamespaceDoc.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ Negate.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ NestedClassInstance.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ NestedStruct.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ NestedStructProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ NodeStandardLibrary.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ NullShouldBeTreatedAsUndefined.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ NullShouldBeTreatedAsUndefinedData.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ NullShouldBeTreatedAsUndefinedDataProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ NumberGenerator.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ ObjectRefsInCollections.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ ObjectWithPropertyProvider.cs @@ -3229,13 +1957,10 @@ exports[`Generated code for "jsii-calc": / 1`] = ` โ”ƒ โ”ฃโ” ๐Ÿ“„ OptionalConstructorArgument.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ OptionalStruct.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ OptionalStructConsumer.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ OptionalStructProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ OverridableProtectedMember.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ OverrideReturnsObject.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ ParentStruct982.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ ParentStruct982Proxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ PartiallyInitializedThisConsumer.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ PartiallyInitializedThisConsumerProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ Polymorphism.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ Power.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ PropertyNamedProperty.cs @@ -3245,49 +1970,40 @@ exports[`Generated code for "jsii-calc": / 1`] = ` โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ ClassWithSelf.cs โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ ClassWithSelfKwarg.cs โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ IInterfaceWithSelf.cs - โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ IInterfaceWithSelfProxy.cs โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ IStructWithSelf.cs - โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ StructWithSelf.cs - โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ StructWithSelfProxy.cs + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ StructWithSelf.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ ReferenceEnumFromScopedPackage.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ ReturnsPrivateImplementationOfInterface.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ RootStruct.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ RootStructProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ RootStructValidator.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ RuntimeTypeChecking.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ SecondLevelStruct.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ SecondLevelStructProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ SingleInstanceTwoTypes.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ SingletonInt.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ SingletonIntEnum.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ SingletonString.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ SingletonStringEnum.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ SmellyStruct.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ SmellyStructProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ SomeTypeJsii976.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ StableClass.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ StableEnum.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ StableStruct.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ StableStructProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ StaticContext.cs + โ”ƒ โ”ฃโ” ๐Ÿ“„ StaticHelloChild.cs + โ”ƒ โ”ฃโ” ๐Ÿ“„ StaticHelloParent.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ Statics.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ StringEnum.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ StripInternal.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ StructA.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ StructAProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ StructB.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ StructBProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ StructParameterType.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ StructParameterTypeProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ StructPassing.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ StructUnionConsumer.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ StructWithJavaReservedWords.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ StructWithJavaReservedWordsProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“ Submodule โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“ BackReferences โ”ƒ โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ IMyClassReference.cs - โ”ƒ โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ MyClassReference.cs - โ”ƒ โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ MyClassReferenceProxy.cs + โ”ƒ โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ MyClassReference.cs โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“ Child โ”ƒ โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ Awesomeness.cs โ”ƒ โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ Goodness.cs @@ -3296,36 +2012,32 @@ exports[`Generated code for "jsii-calc": / 1`] = ` โ”ƒ โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ ISomeStruct.cs โ”ƒ โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ IStructure.cs โ”ƒ โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ KwargsProps.cs - โ”ƒ โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ KwargsPropsProxy.cs โ”ƒ โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ OuterClass.cs โ”ƒ โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ SomeEnum.cs โ”ƒ โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ SomeStruct.cs - โ”ƒ โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ SomeStructProxy.cs - โ”ƒ โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ Structure.cs - โ”ƒ โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ StructureProxy.cs + โ”ƒ โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ Structure.cs โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“ Isolated โ”ƒ โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ Kwargs.cs โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ MyClass.cs - โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ NestedSubmodule - โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“ DeeplyNested - โ”ƒ โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ INamespaced.cs - โ”ƒ โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ INamespacedProxy.cs - โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ Namespaced.cs - โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ NamespacedProxy.cs + โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“ NestedSubmodule + โ”ƒ โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“ DeeplyNested + โ”ƒ โ”ƒ โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ INamespaced.cs + โ”ƒ โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ Namespaced.cs + โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“ Param + โ”ƒ โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ ISpecialParameter.cs + โ”ƒ โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ SpecialParameter.cs + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ Returnsparam + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ ReturnsSpecialParameter.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ Sum.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ SupportsNiceJavaBuilder.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ SupportsNiceJavaBuilderProps.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ SupportsNiceJavaBuilderPropsProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ SupportsNiceJavaBuilderWithRequiredProps.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ SyncVirtualMethods.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ Thrower.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ TopLevelStruct.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ TopLevelStructProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ UmaskCheck.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ UnaryOperation.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ UnaryOperationProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ UnionProperties.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ UnionPropertiesProxy.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ UpcasingReflectable.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ UseBundledDependency.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ UseCalcBase.cs @@ -3334,14248 +2046,10 @@ exports[`Generated code for "jsii-calc": / 1`] = ` โ”ƒ โ”ฃโ” ๐Ÿ“„ VariadicMethod.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ VirtualMethodPlayground.cs โ”ƒ โ”ฃโ” ๐Ÿ“„ VoidCallback.cs - โ”ƒ โ”ฃโ” ๐Ÿ“„ VoidCallbackProxy.cs โ”ƒ โ”—โ” ๐Ÿ“„ WithPrivatePropertyInConstructor.cs โ”ฃโ” ๐Ÿ“„ Amazon.JSII.Tests.CalculatorPackageId.csproj โ”ฃโ” ๐Ÿ“„ AssemblyInfo.cs - โ”—โ” ๐Ÿ“„ jsii-calc-0.0.0.tgz -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/.jsii 1`] = ` -{ - "author": { - "name": "Amazon Web Services", - "organization": true, - "roles": [ - "author" - ], - "url": "https://aws.amazon.com" - }, - "bundled": { - "@fixtures/jsii-calc-bundled": "^0.19.0" - }, - "contributors": [ - { - "name": "Elad Ben-Israel", - "roles": [ - "maintainer" - ], - "url": "https://github.com/eladb" - }, - { - "name": "Rico Huijbers", - "roles": [ - "maintainer" - ], - "url": "https://github.com/rix0rrr" - }, - { - "name": "Romain Marcadier-Muller", - "roles": [ - "maintainer" - ], - "url": "https://github.com/RomainMuller" - } - ], - "dependencies": { - "@scope/jsii-calc-base": "^0.0.0", - "@scope/jsii-calc-base-of-base": "^0.0.0", - "@scope/jsii-calc-lib": "^0.0.0" - }, - "dependencyClosure": { - "@scope/jsii-calc-base": { - "targets": { - "dotnet": { - "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace", - "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BasePackageId" - }, - "go": { - "moduleName": "github.com/aws-cdk/jsii/jsii-calc/golang" - }, - "java": { - "maven": { - "artifactId": "calculator-base", - "groupId": "software.amazon.jsii.tests" - }, - "package": "software.amazon.jsii.tests.calculator.base" - }, - "js": { - "npm": "@scope/jsii-calc-base" - }, - "python": { - "distName": "scope.jsii-calc-base", - "module": "scope.jsii_calc_base" - } - } - }, - "@scope/jsii-calc-base-of-base": { - "targets": { - "dotnet": { - "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace", - "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId" - }, - "go": { - "moduleName": "github.com/aws-cdk/jsii/jsii-calc/golang" - }, - "java": { - "maven": { - "artifactId": "calculator-base-of-base", - "groupId": "software.amazon.jsii.tests" - }, - "package": "software.amazon.jsii.tests.calculator.baseofbase" - }, - "js": { - "npm": "@scope/jsii-calc-base-of-base" - }, - "python": { - "distName": "scope.jsii-calc-base-of-base", - "module": "scope.jsii_calc_base_of_base" - } - } - }, - "@scope/jsii-calc-lib": { - "submodules": { - "@scope/jsii-calc-lib.submodule": { - "locationInModule": { - "filename": "lib/index.ts", - "line": 112 - }, - "targets": { - "dotnet": { - "namespace": "Amazon.JSII.Tests.CustomSubmoduleName" - }, - "java": { - "package": "software.amazon.jsii.tests.calculator.custom_submodule_name" - }, - "python": { - "module": "scope.jsii_calc_lib.custom_submodule_name" - } - } - } - }, - "targets": { - "dotnet": { - "namespace": "Amazon.JSII.Tests.CalculatorNamespace.LibNamespace", - "packageId": "Amazon.JSII.Tests.CalculatorPackageId.LibPackageId", - "versionSuffix": "-devpreview" - }, - "go": { - "moduleName": "github.com/aws-cdk/jsii/jsii-calc/golang" - }, - "java": { - "maven": { - "artifactId": "calculator-lib", - "groupId": "software.amazon.jsii.tests", - "versionSuffix": ".DEVPREVIEW" - }, - "package": "software.amazon.jsii.tests.calculator.lib" - }, - "js": { - "npm": "@scope/jsii-calc-lib" - }, - "python": { - "distName": "scope.jsii-calc-lib", - "module": "scope.jsii_calc_lib" - } - } - } - }, - "description": "A simple calcuator built on JSII.", - "docs": { - "stability": "stable" - }, - "homepage": "https://github.com/aws/jsii", - "jsiiVersion": "0.0.0", - "keywords": [ - "aws", - "jsii", - "test" - ], - "license": "Apache-2.0", - "metadata": { - "jsii:boolean": true, - "jsii:number": 1337, - "jsii:object": { - "string": "yes!" - } - }, - "name": "jsii-calc", - "readme": { - "markdown": "# jsii Calculator\\n\\nThis library is used to demonstrate and test the features of JSII\\n\\n## How to use running sum API:\\n\\nFirst, create a calculator:\\n\\n\`\`\`ts\\nconst calculator = new calc.Calculator();\\n\`\`\`\\n\\nThen call some operations:\\n\\n\\n\`\`\`ts fixture=with-calculator\\ncalculator.add(10);\\n\`\`\`\\n\\n## Code Samples\\n\\n\`\`\`ts\\n/* This is totes a magic comment in here, just you wait! */\\nconst foo = 'bar';\\n\`\`\`\\n" - }, - "repository": { - "directory": "packages/jsii-calc", - "type": "git", - "url": "https://github.com/aws/jsii.git" - }, - "schema": "jsii/0.10.0", - "submodules": { - "@scope/jsii-calc-lib.submodule": { - "locationInModule": { - "filename": "../@scope/jsii-calc-lib/build/index.d.ts", - "line": 157 - } - }, - "jsii-calc.DerivedClassHasNoProperties": { - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 324 - } - }, - "jsii-calc.InterfaceInNamespaceIncludesClasses": { - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1205 - } - }, - "jsii-calc.InterfaceInNamespaceOnlyInterface": { - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1198 - } - }, - "jsii-calc.PythonSelf": { - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1089 - } - }, - "jsii-calc.composition": { - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 142 - } - }, - "jsii-calc.submodule": { - "locationInModule": { - "filename": "lib/index.ts", - "line": 10 - } - }, - "jsii-calc.submodule.back_references": { - "locationInModule": { - "filename": "lib/submodule/index.ts", - "line": 5 - } - }, - "jsii-calc.submodule.child": { - "locationInModule": { - "filename": "lib/submodule/index.ts", - "line": 1 - } - }, - "jsii-calc.submodule.isolated": { - "locationInModule": { - "filename": "lib/submodule/index.ts", - "line": 2 - } - }, - "jsii-calc.submodule.nested_submodule": { - "locationInModule": { - "filename": "lib/submodule/nested_submodule.ts", - "line": 4 - } - }, - "jsii-calc.submodule.nested_submodule.deeplyNested": { - "locationInModule": { - "filename": "lib/submodule/nested_submodule.ts", - "line": 6 - } - } - }, - "targets": { - "dotnet": { - "iconUrl": "https://sdk-for-net.amazonwebservices.com/images/AWSLogo128x128.png", - "namespace": "Amazon.JSII.Tests.CalculatorNamespace", - "packageId": "Amazon.JSII.Tests.CalculatorPackageId" - }, - "go": { - "moduleName": "github.com/aws-cdk/jsii/jsii-calc/golang" - }, - "java": { - "maven": { - "artifactId": "calculator", - "groupId": "software.amazon.jsii.tests" - }, - "package": "software.amazon.jsii.tests.calculator" - }, - "js": { - "npm": "jsii-calc" - }, - "python": { - "classifiers": [ - "Test :: Classifier :: Is Dummy" - ], - "distName": "jsii-calc", - "module": "jsii_calc" - } - }, - "types": { - "jsii-calc.AbstractClass": { - "abstract": true, - "assembly": "jsii-calc", - "base": "jsii-calc.AbstractClassBase", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.AbstractClass", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "interfaces": [ - "jsii-calc.IInterfaceImplementedByAbstractClass" - ], - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1249 - }, - "methods": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1256 - }, - "name": "abstractMethod", - "parameters": [ - { - "name": "name", - "type": { - "primitive": "string" - } - } - ], - "returns": { - "type": { - "primitive": "string" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1252 - }, - "name": "nonAbstractMethod", - "returns": { - "type": { - "primitive": "number" - } - } - } - ], - "name": "AbstractClass", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1258 - }, - "name": "propFromInterface", - "overrides": "jsii-calc.IInterfaceImplementedByAbstractClass", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.AbstractClassBase": { - "abstract": true, - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.AbstractClassBase", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1245 - }, - "name": "AbstractClassBase", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1246 - }, - "name": "abstractProperty", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.AbstractClassReturner": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.AbstractClassReturner", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1273 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1274 - }, - "name": "giveMeAbstract", - "returns": { - "type": { - "fqn": "jsii-calc.AbstractClass" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1278 - }, - "name": "giveMeInterface", - "returns": { - "type": { - "fqn": "jsii-calc.IInterfaceImplementedByAbstractClass" - } - } - } - ], - "name": "AbstractClassReturner", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1282 - }, - "name": "returnAbstractFromProperty", - "type": { - "fqn": "jsii-calc.AbstractClassBase" - } - } - ] - }, - "jsii-calc.AbstractSuite": { - "abstract": true, - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "Ensures abstract members implementations correctly register overrides in various languages." - }, - "fqn": "jsii-calc.AbstractSuite", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 422 - }, - "methods": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 424 - }, - "name": "someMethod", - "parameters": [ - { - "name": "str", - "type": { - "primitive": "string" - } - } - ], - "protected": true, - "returns": { - "type": { - "primitive": "string" - } - } - }, - { - "docs": { - "stability": "stable", - "summary": "Sets \`seed\` to \`this.property\`, then calls \`someMethod\` with \`this.property\` and returns the result." - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 430 - }, - "name": "workItAll", - "parameters": [ - { - "docs": { - "summary": "a \`string\`." - }, - "name": "seed", - "type": { - "primitive": "string" - } - } - ], - "returns": { - "type": { - "primitive": "string" - } - } - } - ], - "name": "AbstractSuite", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 423 - }, - "name": "property", - "protected": true, - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.Add": { - "assembly": "jsii-calc", - "base": "jsii-calc.BinaryOperation", - "docs": { - "stability": "stable", - "summary": "The \\"+\\" binary operation." - }, - "fqn": "jsii-calc.Add", - "initializer": { - "docs": { - "stability": "stable", - "summary": "Creates a BinaryOperation." - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 53 - }, - "parameters": [ - { - "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" - } - } - ] - }, - "kind": "class", - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 68 - }, - "methods": [ - { - "docs": { - "stability": "stable", - "summary": "(deprecated) String representation of the value." - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 73 - }, - "name": "toString", - "overrides": "@scope/jsii-calc-lib.Operation", - "returns": { - "type": { - "primitive": "string" - } - } - } - ], - "name": "Add", - "properties": [ - { - "docs": { - "stability": "stable", - "summary": "(deprecated) The value." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 69 - }, - "name": "value", - "overrides": "@scope/jsii-calc-lib.NumericValue", - "type": { - "primitive": "number" - } - } - ] - }, - "jsii-calc.AllTypes": { - "assembly": "jsii-calc", - "docs": { - "remarks": "The setters will validate\\nthat the value set is of the expected type and throw otherwise.", - "stability": "stable", - "summary": "This class includes property for all types supported by jsii." - }, - "fqn": "jsii-calc.AllTypes", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 62 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 231 - }, - "name": "anyIn", - "parameters": [ - { - "name": "inp", - "type": { - "primitive": "any" - } - } - ] - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 223 - }, - "name": "anyOut", - "returns": { - "type": { - "primitive": "any" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 219 - }, - "name": "enumMethod", - "parameters": [ - { - "name": "value", - "type": { - "fqn": "jsii-calc.StringEnum" - } - } - ], - "returns": { - "type": { - "fqn": "jsii-calc.StringEnum" - } - } - } - ], - "name": "AllTypes", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 215 - }, - "name": "enumPropertyValue", - "type": { - "primitive": "number" - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 179 - }, - "name": "anyArrayProperty", - "type": { - "collection": { - "elementtype": { - "primitive": "any" - }, - "kind": "array" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 180 - }, - "name": "anyMapProperty", - "type": { - "collection": { - "elementtype": { - "primitive": "any" - }, - "kind": "map" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 178 - }, - "name": "anyProperty", - "type": { - "primitive": "any" - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 164 - }, - "name": "arrayProperty", - "type": { - "collection": { - "elementtype": { - "primitive": "string" - }, - "kind": "array" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 67 - }, - "name": "booleanProperty", - "type": { - "primitive": "boolean" - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 113 - }, - "name": "dateProperty", - "type": { - "primitive": "date" - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 199 - }, - "name": "enumProperty", - "type": { - "fqn": "jsii-calc.AllTypesEnum" - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 132 - }, - "name": "jsonProperty", - "type": { - "primitive": "json" - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 149 - }, - "name": "mapProperty", - "type": { - "collection": { - "elementtype": { - "fqn": "@scope/jsii-calc-lib.Number" - }, - "kind": "map" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 98 - }, - "name": "numberProperty", - "type": { - "primitive": "number" - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 82 - }, - "name": "stringProperty", - "type": { - "primitive": "string" - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 191 - }, - "name": "unionArrayProperty", - "type": { - "collection": { - "elementtype": { - "union": { - "types": [ - { - "primitive": "number" - }, - { - "fqn": "@scope/jsii-calc-lib.NumericValue" - } - ] - } - }, - "kind": "array" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 192 - }, - "name": "unionMapProperty", - "type": { - "collection": { - "elementtype": { - "union": { - "types": [ - { - "primitive": "string" - }, - { - "primitive": "number" - }, - { - "fqn": "@scope/jsii-calc-lib.Number" - } - ] - } - }, - "kind": "map" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 190 - }, - "name": "unionProperty", - "type": { - "union": { - "types": [ - { - "primitive": "string" - }, - { - "primitive": "number" - }, - { - "fqn": "jsii-calc.Multiply" - }, - { - "fqn": "@scope/jsii-calc-lib.Number" - } - ] - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 185 - }, - "name": "unknownArrayProperty", - "type": { - "collection": { - "elementtype": { - "primitive": "any" - }, - "kind": "array" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 186 - }, - "name": "unknownMapProperty", - "type": { - "collection": { - "elementtype": { - "primitive": "any" - }, - "kind": "map" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 184 - }, - "name": "unknownProperty", - "type": { - "primitive": "any" - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 196 - }, - "name": "optionalEnumValue", - "optional": true, - "type": { - "fqn": "jsii-calc.StringEnum" - } - } - ] - }, - "jsii-calc.AllTypesEnum": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.AllTypesEnum", - "kind": "enum", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 32 - }, - "members": [ - { - "docs": { - "stability": "stable" - }, - "name": "MY_ENUM_VALUE" - }, - { - "docs": { - "stability": "stable" - }, - "name": "YOUR_ENUM_VALUE" - }, - { - "docs": { - "stability": "stable" - }, - "name": "THIS_IS_GREAT" - } - ], - "name": "AllTypesEnum" - }, - "jsii-calc.AllowedMethodNames": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.AllowedMethodNames", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 614 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 622 - }, - "name": "getBar", - "parameters": [ - { - "name": "_p1", - "type": { - "primitive": "string" - } - }, - { - "name": "_p2", - "type": { - "primitive": "number" - } - } - ] - }, - { - "docs": { - "stability": "stable", - "summary": "getXxx() is not allowed (see negatives), but getXxx(a, ...) is okay." - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 618 - }, - "name": "getFoo", - "parameters": [ - { - "name": "withParam", - "type": { - "primitive": "string" - } - } - ], - "returns": { - "type": { - "primitive": "string" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 633 - }, - "name": "setBar", - "parameters": [ - { - "name": "_x", - "type": { - "primitive": "string" - } - }, - { - "name": "_y", - "type": { - "primitive": "number" - } - }, - { - "name": "_z", - "type": { - "primitive": "boolean" - } - } - ] - }, - { - "docs": { - "stability": "stable", - "summary": "setFoo(x) is not allowed (see negatives), but setXxx(a, b, ...) is okay." - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 629 - }, - "name": "setFoo", - "parameters": [ - { - "name": "_x", - "type": { - "primitive": "string" - } - }, - { - "name": "_y", - "type": { - "primitive": "number" - } - } - ] - } - ], - "name": "AllowedMethodNames" - }, - "jsii-calc.AmbiguousParameters": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.AmbiguousParameters", - "initializer": { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2684 - }, - "parameters": [ - { - "name": "scope", - "type": { - "fqn": "jsii-calc.Bell" - } - }, - { - "name": "props", - "type": { - "fqn": "jsii-calc.StructParameterType" - } - } - ] - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2683 - }, - "name": "AmbiguousParameters", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2686 - }, - "name": "props", - "type": { - "fqn": "jsii-calc.StructParameterType" - } - }, - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2685 - }, - "name": "scope", - "type": { - "fqn": "jsii-calc.Bell" - } - } - ] - }, - "jsii-calc.AnonymousImplementationProvider": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.AnonymousImplementationProvider", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "interfaces": [ - "jsii-calc.IAnonymousImplementationProvider" - ], - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2213 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2217 - }, - "name": "provideAsClass", - "overrides": "jsii-calc.IAnonymousImplementationProvider", - "returns": { - "type": { - "fqn": "jsii-calc.Implementation" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2221 - }, - "name": "provideAsInterface", - "overrides": "jsii-calc.IAnonymousImplementationProvider", - "returns": { - "type": { - "fqn": "jsii-calc.IAnonymouslyImplementMe" - } - } - } - ], - "name": "AnonymousImplementationProvider" - }, - "jsii-calc.AsyncVirtualMethods": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.AsyncVirtualMethods", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 332 - }, - "methods": [ - { - "async": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 333 - }, - "name": "callMe", - "returns": { - "type": { - "primitive": "number" - } - } - }, - { - "async": true, - "docs": { - "stability": "stable", - "summary": "Just calls \\"overrideMeToo\\"." - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 352 - }, - "name": "callMe2", - "returns": { - "type": { - "primitive": "number" - } - } - }, - { - "async": true, - "docs": { - "remarks": "This is a \\"double promise\\" situation, which\\nmeans that callbacks are not going to be available immediate, but only\\nafter an \\"immediates\\" cycle.", - "stability": "stable", - "summary": "This method calls the \\"callMe\\" async method indirectly, which will then invoke a virtual method." - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 362 - }, - "name": "callMeDoublePromise", - "returns": { - "type": { - "primitive": "number" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 370 - }, - "name": "dontOverrideMe", - "returns": { - "type": { - "primitive": "number" - } - } - }, - { - "async": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 341 - }, - "name": "overrideMe", - "parameters": [ - { - "name": "mult", - "type": { - "primitive": "number" - } - } - ], - "returns": { - "type": { - "primitive": "number" - } - } - }, - { - "async": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 345 - }, - "name": "overrideMeToo", - "returns": { - "type": { - "primitive": "number" - } - } - } - ], - "name": "AsyncVirtualMethods" - }, - "jsii-calc.AugmentableClass": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.AugmentableClass", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1540 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1541 - }, - "name": "methodOne" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1547 - }, - "name": "methodTwo" - } - ], - "name": "AugmentableClass" - }, - "jsii-calc.BaseJsii976": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.BaseJsii976", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2478 - }, - "name": "BaseJsii976" - }, - "jsii-calc.Bell": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.Bell", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "interfaces": [ - "jsii-calc.IBell" - ], - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2422 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2425 - }, - "name": "ring", - "overrides": "jsii-calc.IBell" - } - ], - "name": "Bell", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2423 - }, - "name": "rung", - "type": { - "primitive": "boolean" - } - } - ] - }, - "jsii-calc.BinaryOperation": { - "abstract": true, - "assembly": "jsii-calc", - "base": "@scope/jsii-calc-lib.Operation", - "docs": { - "stability": "stable", - "summary": "Represents an operation with two operands." - }, - "fqn": "jsii-calc.BinaryOperation", - "initializer": { - "docs": { - "stability": "stable", - "summary": "Creates a BinaryOperation." - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 53 - }, - "parameters": [ - { - "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" - } - } - ] - }, - "interfaces": [ - "@scope/jsii-calc-lib.IFriendly" - ], - "kind": "class", - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 47 - }, - "methods": [ - { - "docs": { - "stability": "stable", - "summary": "(deprecated) Say hello!" - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 60 - }, - "name": "hello", - "overrides": "@scope/jsii-calc-lib.IFriendly", - "returns": { - "type": { - "primitive": "string" - } - } - } - ], - "name": "BinaryOperation", - "properties": [ - { - "docs": { - "stability": "stable", - "summary": "Left-hand side operand." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 54 - }, - "name": "lhs", - "type": { - "fqn": "@scope/jsii-calc-lib.NumericValue" - } - }, - { - "docs": { - "stability": "stable", - "summary": "Right-hand side operand." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 55 - }, - "name": "rhs", - "type": { - "fqn": "@scope/jsii-calc-lib.NumericValue" - } - } - ] - }, - "jsii-calc.BurriedAnonymousObject": { - "abstract": true, - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "See https://github.com/aws/aws-cdk/issues/7977." - }, - "fqn": "jsii-calc.BurriedAnonymousObject", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2768 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2769 - }, - "name": "check", - "returns": { - "type": { - "primitive": "boolean" - } - } - }, - { - "abstract": true, - "docs": { - "returns": "\`value\`", - "stability": "stable", - "summary": "Implement this method and have it return it's parameter." - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2786 - }, - "name": "giveItBack", - "parameters": [ - { - "docs": { - "summary": "the value that should be returned." - }, - "name": "value", - "type": { - "primitive": "any" - } - } - ], - "returns": { - "type": { - "primitive": "any" - } - } - } - ], - "name": "BurriedAnonymousObject" - }, - "jsii-calc.Calculator": { - "assembly": "jsii-calc", - "base": "jsii-calc.composition.CompositeOperation", - "docs": { - "example": "const calculator = new calc.Calculator();\\ncalculator.add(5);\\ncalculator.mul(3);\\nconsole.log(calculator.expression.value);", - "remarks": "Here's how you use it:\\n\\n\`\`\`ts\\nconst calculator = new calc.Calculator();\\ncalculator.add(5);\\ncalculator.mul(3);\\nconsole.log(calculator.expression.value);\\n\`\`\`\\n\\nI will repeat this example again, but in an @example tag.", - "stability": "stable", - "summary": "A calculator which maintains a current value and allows adding operations." - }, - "fqn": "jsii-calc.Calculator", - "initializer": { - "docs": { - "stability": "stable", - "summary": "Creates a Calculator object." - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 298 - }, - "parameters": [ - { - "docs": { - "summary": "Initialization properties." - }, - "name": "props", - "optional": true, - "type": { - "fqn": "jsii-calc.CalculatorProps" - } - } - ] - }, - "kind": "class", - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 293 - }, - "methods": [ - { - "docs": { - "stability": "stable", - "summary": "Adds a number to the current value." - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 331 - }, - "name": "add", - "parameters": [ - { - "name": "value", - "type": { - "primitive": "number" - } - } - ] - }, - { - "docs": { - "stability": "stable", - "summary": "Multiplies the current value by a number." - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 338 - }, - "name": "mul", - "parameters": [ - { - "name": "value", - "type": { - "primitive": "number" - } - } - ] - }, - { - "docs": { - "stability": "stable", - "summary": "Negates the current value." - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 352 - }, - "name": "neg" - }, - { - "docs": { - "stability": "stable", - "summary": "Raises the current value by a power." - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 345 - }, - "name": "pow", - "parameters": [ - { - "name": "value", - "type": { - "primitive": "number" - } - } - ] - }, - { - "docs": { - "stability": "stable", - "summary": "Returns teh value of the union property (if defined)." - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 371 - }, - "name": "readUnionValue", - "returns": { - "type": { - "primitive": "number" - } - } - } - ], - "name": "Calculator", - "properties": [ - { - "docs": { - "stability": "stable", - "summary": "Returns the expression." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 359 - }, - "name": "expression", - "overrides": "jsii-calc.composition.CompositeOperation", - "type": { - "fqn": "@scope/jsii-calc-lib.NumericValue" - } - }, - { - "docs": { - "stability": "stable", - "summary": "A log of all operations." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 321 - }, - "name": "operationsLog", - "type": { - "collection": { - "elementtype": { - "fqn": "@scope/jsii-calc-lib.NumericValue" - }, - "kind": "array" - } - } - }, - { - "docs": { - "stability": "stable", - "summary": "A map of per operation name of all operations performed." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 316 - }, - "name": "operationsMap", - "type": { - "collection": { - "elementtype": { - "collection": { - "elementtype": { - "fqn": "@scope/jsii-calc-lib.NumericValue" - }, - "kind": "array" - } - }, - "kind": "map" - } - } - }, - { - "docs": { - "stability": "stable", - "summary": "The current value." - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 311 - }, - "name": "curr", - "type": { - "fqn": "@scope/jsii-calc-lib.NumericValue" - } - }, - { - "docs": { - "stability": "stable", - "summary": "The maximum value allows in this calculator." - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 326 - }, - "name": "maxValue", - "optional": true, - "type": { - "primitive": "number" - } - }, - { - "docs": { - "stability": "stable", - "summary": "Example of a property that accepts a union of types." - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 366 - }, - "name": "unionProperty", - "optional": true, - "type": { - "union": { - "types": [ - { - "fqn": "jsii-calc.Add" - }, - { - "fqn": "jsii-calc.Multiply" - }, - { - "fqn": "jsii-calc.Power" - } - ] - } - } - } - ] - }, - "jsii-calc.CalculatorProps": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable", - "summary": "Properties for Calculator." - }, - "fqn": "jsii-calc.CalculatorProps", - "kind": "interface", - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 254 - }, - "name": "CalculatorProps", - "properties": [ - { - "abstract": true, - "docs": { - "default": "0", - "remarks": "NOTE: Any number works here, it's fine.", - "stability": "stable", - "summary": "The initial value of the calculator." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 262 - }, - "name": "initialValue", - "optional": true, - "type": { - "primitive": "number" - } - }, - { - "abstract": true, - "docs": { - "default": "none", - "stability": "stable", - "summary": "The maximum value the calculator can store." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 269 - }, - "name": "maximumValue", - "optional": true, - "type": { - "primitive": "number" - } - } - ] - }, - "jsii-calc.ChildStruct982": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.ChildStruct982", - "interfaces": [ - "jsii-calc.ParentStruct982" - ], - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2502 - }, - "name": "ChildStruct982", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2503 - }, - "name": "bar", - "type": { - "primitive": "number" - } - } - ] - }, - "jsii-calc.ClassThatImplementsTheInternalInterface": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.ClassThatImplementsTheInternalInterface", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "interfaces": [ - "jsii-calc.INonInternalInterface" - ], - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1803 - }, - "name": "ClassThatImplementsTheInternalInterface", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1807 - }, - "name": "a", - "overrides": "jsii-calc.IAnotherPublicInterface", - "type": { - "primitive": "string" - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1808 - }, - "name": "b", - "overrides": "jsii-calc.INonInternalInterface", - "type": { - "primitive": "string" - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1809 - }, - "name": "c", - "overrides": "jsii-calc.INonInternalInterface", - "type": { - "primitive": "string" - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1810 - }, - "name": "d", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.ClassThatImplementsThePrivateInterface": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.ClassThatImplementsThePrivateInterface", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "interfaces": [ - "jsii-calc.INonInternalInterface" - ], - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1813 - }, - "name": "ClassThatImplementsThePrivateInterface", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1815 - }, - "name": "a", - "overrides": "jsii-calc.IAnotherPublicInterface", - "type": { - "primitive": "string" - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1816 - }, - "name": "b", - "overrides": "jsii-calc.INonInternalInterface", - "type": { - "primitive": "string" - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1817 - }, - "name": "c", - "overrides": "jsii-calc.INonInternalInterface", - "type": { - "primitive": "string" - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1818 - }, - "name": "e", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.ClassWithCollections": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.ClassWithCollections", - "initializer": { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2119 - }, - "parameters": [ - { - "name": "map", - "type": { - "collection": { - "elementtype": { - "primitive": "string" - }, - "kind": "map" - } - } - }, - { - "name": "array", - "type": { - "collection": { - "elementtype": { - "primitive": "string" - }, - "kind": "array" - } - } - } - ] - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2109 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2124 - }, - "name": "createAList", - "returns": { - "type": { - "collection": { - "elementtype": { - "primitive": "string" - }, - "kind": "array" - } - } - }, - "static": true - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2128 - }, - "name": "createAMap", - "returns": { - "type": { - "collection": { - "elementtype": { - "primitive": "string" - }, - "kind": "map" - } - } - }, - "static": true - } - ], - "name": "ClassWithCollections", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2117 - }, - "name": "staticArray", - "static": true, - "type": { - "collection": { - "elementtype": { - "primitive": "string" - }, - "kind": "array" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2113 - }, - "name": "staticMap", - "static": true, - "type": { - "collection": { - "elementtype": { - "primitive": "string" - }, - "kind": "map" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2111 - }, - "name": "array", - "type": { - "collection": { - "elementtype": { - "primitive": "string" - }, - "kind": "array" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2110 - }, - "name": "map", - "type": { - "collection": { - "elementtype": { - "primitive": "string" - }, - "kind": "map" - } - } - } - ] - }, - "jsii-calc.ClassWithDocs": { - "assembly": "jsii-calc", - "docs": { - "custom": { - "customAttribute": "hasAValue" - }, - "example": "function anExample() {\\n}", - "remarks": "The docs are great. They're a bunch of tags.", - "see": "https://aws.amazon.com/", - "stability": "stable", - "summary": "This class has docs." - }, - "fqn": "jsii-calc.ClassWithDocs", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1886 - }, - "name": "ClassWithDocs" - }, - "jsii-calc.ClassWithJavaReservedWords": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.ClassWithJavaReservedWords", - "initializer": { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2059 - }, - "parameters": [ - { - "name": "int", - "type": { - "primitive": "string" - } - } - ] - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2056 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2063 - }, - "name": "import", - "parameters": [ - { - "name": "assert", - "type": { - "primitive": "string" - } - } - ], - "returns": { - "type": { - "primitive": "string" - } - } - } - ], - "name": "ClassWithJavaReservedWords", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2057 - }, - "name": "int", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.ClassWithMutableObjectLiteralProperty": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.ClassWithMutableObjectLiteralProperty", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1293 - }, - "name": "ClassWithMutableObjectLiteralProperty", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1294 - }, - "name": "mutableObject", - "type": { - "fqn": "jsii-calc.IMutableObjectLiteral" - } - } - ] - }, - "jsii-calc.ClassWithPrivateConstructorAndAutomaticProperties": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "Class that implements interface properties automatically, but using a private constructor." - }, - "fqn": "jsii-calc.ClassWithPrivateConstructorAndAutomaticProperties", - "interfaces": [ - "jsii-calc.IInterfaceWithProperties" - ], - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1320 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1322 - }, - "name": "create", - "parameters": [ - { - "name": "readOnlyString", - "type": { - "primitive": "string" - } - }, - { - "name": "readWriteString", - "type": { - "primitive": "string" - } - } - ], - "returns": { - "type": { - "fqn": "jsii-calc.ClassWithPrivateConstructorAndAutomaticProperties" - } - }, - "static": true - } - ], - "name": "ClassWithPrivateConstructorAndAutomaticProperties", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1330 - }, - "name": "readOnlyString", - "overrides": "jsii-calc.IInterfaceWithProperties", - "type": { - "primitive": "string" - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1331 - }, - "name": "readWriteString", - "overrides": "jsii-calc.IInterfaceWithProperties", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.ConfusingToJackson": { - "assembly": "jsii-calc", - "docs": { - "see": "https://github.com/aws/aws-cdk/issues/4080", - "stability": "stable", - "summary": "This tries to confuse Jackson by having overloaded property setters." - }, - "fqn": "jsii-calc.ConfusingToJackson", - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2641 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2642 - }, - "name": "makeInstance", - "returns": { - "type": { - "fqn": "jsii-calc.ConfusingToJackson" - } - }, - "static": true - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2646 - }, - "name": "makeStructInstance", - "returns": { - "type": { - "fqn": "jsii-calc.ConfusingToJacksonStruct" - } - }, - "static": true - } - ], - "name": "ConfusingToJackson", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2650 - }, - "name": "unionProperty", - "optional": true, - "type": { - "union": { - "types": [ - { - "fqn": "@scope/jsii-calc-lib.IFriendly" - }, - { - "collection": { - "elementtype": { - "union": { - "types": [ - { - "fqn": "@scope/jsii-calc-lib.IFriendly" - }, - { - "fqn": "jsii-calc.AbstractClass" - } - ] - } - }, - "kind": "array" - } - } - ] - } - } - } - ] - }, - "jsii-calc.ConfusingToJacksonStruct": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.ConfusingToJacksonStruct", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2654 - }, - "name": "ConfusingToJacksonStruct", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2655 - }, - "name": "unionProperty", - "optional": true, - "type": { - "union": { - "types": [ - { - "fqn": "@scope/jsii-calc-lib.IFriendly" - }, - { - "collection": { - "elementtype": { - "union": { - "types": [ - { - "fqn": "@scope/jsii-calc-lib.IFriendly" - }, - { - "fqn": "jsii-calc.AbstractClass" - } - ] - } - }, - "kind": "array" - } - } - ] - } - } - } - ] - }, - "jsii-calc.ConstructorPassesThisOut": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.ConstructorPassesThisOut", - "initializer": { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1843 - }, - "parameters": [ - { - "name": "consumer", - "type": { - "fqn": "jsii-calc.PartiallyInitializedThisConsumer" - } - } - ] - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1842 - }, - "name": "ConstructorPassesThisOut" - }, - "jsii-calc.Constructors": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.Constructors", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1588 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1605 - }, - "name": "hiddenInterface", - "returns": { - "type": { - "fqn": "jsii-calc.IPublicInterface" - } - }, - "static": true - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1609 - }, - "name": "hiddenInterfaces", - "returns": { - "type": { - "collection": { - "elementtype": { - "fqn": "jsii-calc.IPublicInterface" - }, - "kind": "array" - } - } - }, - "static": true - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1613 - }, - "name": "hiddenSubInterfaces", - "returns": { - "type": { - "collection": { - "elementtype": { - "fqn": "jsii-calc.IPublicInterface" - }, - "kind": "array" - } - } - }, - "static": true - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1589 - }, - "name": "makeClass", - "returns": { - "type": { - "fqn": "jsii-calc.PublicClass" - } - }, - "static": true - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1593 - }, - "name": "makeInterface", - "returns": { - "type": { - "fqn": "jsii-calc.IPublicInterface" - } - }, - "static": true - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1597 - }, - "name": "makeInterface2", - "returns": { - "type": { - "fqn": "jsii-calc.IPublicInterface2" - } - }, - "static": true - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1601 - }, - "name": "makeInterfaces", - "returns": { - "type": { - "collection": { - "elementtype": { - "fqn": "jsii-calc.IPublicInterface" - }, - "kind": "array" - } - } - }, - "static": true - } - ], - "name": "Constructors" - }, - "jsii-calc.ConsumePureInterface": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.ConsumePureInterface", - "initializer": { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2665 - }, - "parameters": [ - { - "name": "delegate", - "type": { - "fqn": "jsii-calc.IStructReturningDelegate" - } - } - ] - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2664 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2667 - }, - "name": "workItBaby", - "returns": { - "type": { - "fqn": "jsii-calc.StructB" - } - } - } - ], - "name": "ConsumePureInterface" - }, - "jsii-calc.ConsumerCanRingBell": { - "assembly": "jsii-calc", - "docs": { - "remarks": "Check that if a JSII consumer implements IConsumerWithInterfaceParam, they can call\\nthe method on the argument that they're passed...", - "stability": "stable", - "summary": "Test calling back to consumers that implement interfaces." - }, - "fqn": "jsii-calc.ConsumerCanRingBell", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2307 - }, - "methods": [ - { - "docs": { - "remarks": "Returns whether the bell was rung.", - "stability": "stable", - "summary": "...if the interface is implemented using an object literal." - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2313 - }, - "name": "staticImplementedByObjectLiteral", - "parameters": [ - { - "name": "ringer", - "type": { - "fqn": "jsii-calc.IBellRinger" - } - } - ], - "returns": { - "type": { - "primitive": "boolean" - } - }, - "static": true - }, - { - "docs": { - "remarks": "Return whether the bell was rung.", - "stability": "stable", - "summary": "...if the interface is implemented using a private class." - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2339 - }, - "name": "staticImplementedByPrivateClass", - "parameters": [ - { - "name": "ringer", - "type": { - "fqn": "jsii-calc.IBellRinger" - } - } - ], - "returns": { - "type": { - "primitive": "boolean" - } - }, - "static": true - }, - { - "docs": { - "remarks": "Return whether the bell was rung.", - "stability": "stable", - "summary": "...if the interface is implemented using a public class." - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2328 - }, - "name": "staticImplementedByPublicClass", - "parameters": [ - { - "name": "ringer", - "type": { - "fqn": "jsii-calc.IBellRinger" - } - } - ], - "returns": { - "type": { - "primitive": "boolean" - } - }, - "static": true - }, - { - "docs": { - "remarks": "Return whether the bell was rung.", - "stability": "stable", - "summary": "If the parameter is a concrete class instead of an interface." - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2350 - }, - "name": "staticWhenTypedAsClass", - "parameters": [ - { - "name": "ringer", - "type": { - "fqn": "jsii-calc.IConcreteBellRinger" - } - } - ], - "returns": { - "type": { - "primitive": "boolean" - } - }, - "static": true - }, - { - "docs": { - "remarks": "Returns whether the bell was rung.", - "stability": "stable", - "summary": "...if the interface is implemented using an object literal." - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2360 - }, - "name": "implementedByObjectLiteral", - "parameters": [ - { - "name": "ringer", - "type": { - "fqn": "jsii-calc.IBellRinger" - } - } - ], - "returns": { - "type": { - "primitive": "boolean" - } - } - }, - { - "docs": { - "remarks": "Return whether the bell was rung.", - "stability": "stable", - "summary": "...if the interface is implemented using a private class." - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2386 - }, - "name": "implementedByPrivateClass", - "parameters": [ - { - "name": "ringer", - "type": { - "fqn": "jsii-calc.IBellRinger" - } - } - ], - "returns": { - "type": { - "primitive": "boolean" - } - } - }, - { - "docs": { - "remarks": "Return whether the bell was rung.", - "stability": "stable", - "summary": "...if the interface is implemented using a public class." - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2375 - }, - "name": "implementedByPublicClass", - "parameters": [ - { - "name": "ringer", - "type": { - "fqn": "jsii-calc.IBellRinger" - } - } - ], - "returns": { - "type": { - "primitive": "boolean" - } - } - }, - { - "docs": { - "remarks": "Return whether the bell was rung.", - "stability": "stable", - "summary": "If the parameter is a concrete class instead of an interface." - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2397 - }, - "name": "whenTypedAsClass", - "parameters": [ - { - "name": "ringer", - "type": { - "fqn": "jsii-calc.IConcreteBellRinger" - } - } - ], - "returns": { - "type": { - "primitive": "boolean" - } - } - } - ], - "name": "ConsumerCanRingBell" - }, - "jsii-calc.ConsumersOfThisCrazyTypeSystem": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.ConsumersOfThisCrazyTypeSystem", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1821 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1822 - }, - "name": "consumeAnotherPublicInterface", - "parameters": [ - { - "name": "obj", - "type": { - "fqn": "jsii-calc.IAnotherPublicInterface" - } - } - ], - "returns": { - "type": { - "primitive": "string" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1826 - }, - "name": "consumeNonInternalInterface", - "parameters": [ - { - "name": "obj", - "type": { - "fqn": "jsii-calc.INonInternalInterface" - } - } - ], - "returns": { - "type": { - "primitive": "any" - } - } - } - ], - "name": "ConsumersOfThisCrazyTypeSystem" - }, - "jsii-calc.DataRenderer": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "Verifies proper type handling through dynamic overrides." - }, - "fqn": "jsii-calc.DataRenderer", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1982 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1983 - }, - "name": "render", - "parameters": [ - { - "name": "data", - "optional": true, - "type": { - "fqn": "@scope/jsii-calc-lib.MyFirstStruct" - } - } - ], - "returns": { - "type": { - "primitive": "string" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1989 - }, - "name": "renderArbitrary", - "parameters": [ - { - "name": "data", - "type": { - "collection": { - "elementtype": { - "primitive": "any" - }, - "kind": "map" - } - } - } - ], - "returns": { - "type": { - "primitive": "string" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1993 - }, - "name": "renderMap", - "parameters": [ - { - "name": "map", - "type": { - "collection": { - "elementtype": { - "primitive": "any" - }, - "kind": "map" - } - } - } - ], - "returns": { - "type": { - "primitive": "string" - } - } - } - ], - "name": "DataRenderer" - }, - "jsii-calc.DefaultedConstructorArgument": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.DefaultedConstructorArgument", - "initializer": { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 317 - }, - "parameters": [ - { - "name": "arg1", - "optional": true, - "type": { - "primitive": "number" - } - }, - { - "name": "arg2", - "optional": true, - "type": { - "primitive": "string" - } - }, - { - "name": "arg3", - "optional": true, - "type": { - "primitive": "date" - } - } - ] - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 316 - }, - "name": "DefaultedConstructorArgument", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 318 - }, - "name": "arg1", - "type": { - "primitive": "number" - } - }, - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 320 - }, - "name": "arg3", - "type": { - "primitive": "date" - } - }, - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 319 - }, - "name": "arg2", - "optional": true, - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.Demonstrate982": { - "assembly": "jsii-calc", - "docs": { - "remarks": "call #takeThis() -> An ObjectRef will be provisioned for the value (it'll be re-used!)\\n2. call #takeThisToo() -> The ObjectRef from before will need to be down-cased to the ParentStruct982 type", - "stability": "stable", - "summary": "1." - }, - "fqn": "jsii-calc.Demonstrate982", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2509 - }, - "methods": [ - { - "docs": { - "stability": "stable", - "summary": "It's dangerous to go alone!" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2516 - }, - "name": "takeThis", - "returns": { - "type": { - "fqn": "jsii-calc.ChildStruct982" - } - }, - "static": true - }, - { - "docs": { - "stability": "stable", - "summary": "It's dangerous to go alone!" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2521 - }, - "name": "takeThisToo", - "returns": { - "type": { - "fqn": "jsii-calc.ParentStruct982" - } - }, - "static": true - } - ], - "name": "Demonstrate982" - }, - "jsii-calc.DeprecatedClass": { - "assembly": "jsii-calc", - "docs": { - "deprecated": "a pretty boring class", - "stability": "deprecated" - }, - "fqn": "jsii-calc.DeprecatedClass", - "initializer": { - "docs": { - "deprecated": "this constructor is \\"just\\" okay", - "stability": "deprecated" - }, - "locationInModule": { - "filename": "lib/stability.ts", - "line": 95 - }, - "parameters": [ - { - "name": "readonlyString", - "type": { - "primitive": "string" - } - }, - { - "name": "mutableNumber", - "optional": true, - "type": { - "primitive": "number" - } - } - ] - }, - "kind": "class", - "locationInModule": { - "filename": "lib/stability.ts", - "line": 89 - }, - "methods": [ - { - "docs": { - "deprecated": "it was a bad idea", - "stability": "deprecated" - }, - "locationInModule": { - "filename": "lib/stability.ts", - "line": 100 - }, - "name": "method" - } - ], - "name": "DeprecatedClass", - "properties": [ - { - "docs": { - "deprecated": "this is not always \\"wazoo\\", be ready to be disappointed", - "stability": "deprecated" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/stability.ts", - "line": 91 - }, - "name": "readonlyProperty", - "type": { - "primitive": "string" - } - }, - { - "docs": { - "deprecated": "shouldn't have been mutable", - "stability": "deprecated" - }, - "locationInModule": { - "filename": "lib/stability.ts", - "line": 93 - }, - "name": "mutableProperty", - "optional": true, - "type": { - "primitive": "number" - } - } - ] - }, - "jsii-calc.DeprecatedEnum": { - "assembly": "jsii-calc", - "docs": { - "deprecated": "your deprecated selection of bad options", - "stability": "deprecated" - }, - "fqn": "jsii-calc.DeprecatedEnum", - "kind": "enum", - "locationInModule": { - "filename": "lib/stability.ts", - "line": 105 - }, - "members": [ - { - "docs": { - "deprecated": "option A is not great", - "stability": "deprecated" - }, - "name": "OPTION_A" - }, - { - "docs": { - "deprecated": "option B is kinda bad, too", - "stability": "deprecated" - }, - "name": "OPTION_B" - } - ], - "name": "DeprecatedEnum" - }, - "jsii-calc.DeprecatedStruct": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "deprecated": "it just wraps a string", - "stability": "deprecated" - }, - "fqn": "jsii-calc.DeprecatedStruct", - "kind": "interface", - "locationInModule": { - "filename": "lib/stability.ts", - "line": 77 - }, - "name": "DeprecatedStruct", - "properties": [ - { - "abstract": true, - "docs": { - "deprecated": "well, yeah", - "stability": "deprecated" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/stability.ts", - "line": 79 - }, - "name": "readonlyProperty", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.DerivedClassHasNoProperties.Base": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.DerivedClassHasNoProperties.Base", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 325 - }, - "name": "Base", - "namespace": "DerivedClassHasNoProperties", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 326 - }, - "name": "prop", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.DerivedClassHasNoProperties.Derived": { - "assembly": "jsii-calc", - "base": "jsii-calc.DerivedClassHasNoProperties.Base", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.DerivedClassHasNoProperties.Derived", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 329 - }, - "name": "Derived", - "namespace": "DerivedClassHasNoProperties" - }, - "jsii-calc.DerivedStruct": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable", - "summary": "A struct which derives from another struct." - }, - "fqn": "jsii-calc.DerivedStruct", - "interfaces": [ - "@scope/jsii-calc-lib.MyFirstStruct" - ], - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 540 - }, - "name": "DerivedStruct", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 546 - }, - "name": "anotherRequired", - "type": { - "primitive": "date" - } - }, - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 545 - }, - "name": "bool", - "type": { - "primitive": "boolean" - } - }, - { - "abstract": true, - "docs": { - "stability": "stable", - "summary": "An example of a non primitive property." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 544 - }, - "name": "nonPrimitive", - "type": { - "fqn": "jsii-calc.DoubleTrouble" - } - }, - { - "abstract": true, - "docs": { - "stability": "stable", - "summary": "This is optional." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 552 - }, - "name": "anotherOptional", - "optional": true, - "type": { - "collection": { - "elementtype": { - "fqn": "@scope/jsii-calc-lib.NumericValue" - }, - "kind": "map" - } - } - }, - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 548 - }, - "name": "optionalAny", - "optional": true, - "type": { - "primitive": "any" - } - }, - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 547 - }, - "name": "optionalArray", - "optional": true, - "type": { - "collection": { - "elementtype": { - "primitive": "string" - }, - "kind": "array" - } - } - } - ] - }, - "jsii-calc.DiamondInheritanceBaseLevelStruct": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.DiamondInheritanceBaseLevelStruct", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2027 - }, - "name": "DiamondInheritanceBaseLevelStruct", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2028 - }, - "name": "baseLevelProperty", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.DiamondInheritanceFirstMidLevelStruct": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.DiamondInheritanceFirstMidLevelStruct", - "interfaces": [ - "jsii-calc.DiamondInheritanceBaseLevelStruct" - ], - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2031 - }, - "name": "DiamondInheritanceFirstMidLevelStruct", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2033 - }, - "name": "firstMidLevelProperty", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.DiamondInheritanceSecondMidLevelStruct": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.DiamondInheritanceSecondMidLevelStruct", - "interfaces": [ - "jsii-calc.DiamondInheritanceBaseLevelStruct" - ], - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2036 - }, - "name": "DiamondInheritanceSecondMidLevelStruct", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2038 - }, - "name": "secondMidLevelProperty", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.DiamondInheritanceTopLevelStruct": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.DiamondInheritanceTopLevelStruct", - "interfaces": [ - "jsii-calc.DiamondInheritanceFirstMidLevelStruct", - "jsii-calc.DiamondInheritanceSecondMidLevelStruct" - ], - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2041 - }, - "name": "DiamondInheritanceTopLevelStruct", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2044 - }, - "name": "topLevelProperty", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.DisappointingCollectionSource": { - "assembly": "jsii-calc", - "docs": { - "remarks": "This source of collections is disappointing - it'll always give you nothing :(", - "stability": "stable", - "summary": "Verifies that null/undefined can be returned for optional collections." - }, - "fqn": "jsii-calc.DisappointingCollectionSource", - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2531 - }, - "name": "DisappointingCollectionSource", - "properties": [ - { - "const": true, - "docs": { - "remarks": "(Nah, just a billion dollars mistake!)", - "stability": "stable", - "summary": "Some List of strings, maybe?" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2533 - }, - "name": "maybeList", - "optional": true, - "static": true, - "type": { - "collection": { - "elementtype": { - "primitive": "string" - }, - "kind": "array" - } - } - }, - { - "const": true, - "docs": { - "remarks": "(Nah, just a billion dollars mistake!)", - "stability": "stable", - "summary": "Some Map of strings to numbers, maybe?" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2535 - }, - "name": "maybeMap", - "optional": true, - "static": true, - "type": { - "collection": { - "elementtype": { - "primitive": "number" - }, - "kind": "map" - } - } - } - ] - }, - "jsii-calc.DoNotOverridePrivates": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.DoNotOverridePrivates", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1297 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1312 - }, - "name": "changePrivatePropertyValue", - "parameters": [ - { - "name": "newValue", - "type": { - "primitive": "string" - } - } - ] - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1304 - }, - "name": "privateMethodValue", - "returns": { - "type": { - "primitive": "string" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1308 - }, - "name": "privatePropertyValue", - "returns": { - "type": { - "primitive": "string" - } - } - } - ], - "name": "DoNotOverridePrivates" - }, - "jsii-calc.DoNotRecognizeAnyAsOptional": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "jsii#284: do not recognize \\"any\\" as an optional argument." - }, - "fqn": "jsii-calc.DoNotRecognizeAnyAsOptional", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1353 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1354 - }, - "name": "method", - "parameters": [ - { - "name": "_requiredAny", - "type": { - "primitive": "any" - } - }, - { - "name": "_optionalAny", - "optional": true, - "type": { - "primitive": "any" - } - }, - { - "name": "_optionalString", - "optional": true, - "type": { - "primitive": "string" - } - } - ] - } - ], - "name": "DoNotRecognizeAnyAsOptional" - }, - "jsii-calc.DocumentedClass": { - "assembly": "jsii-calc", - "docs": { - "remarks": "This is the meat of the TSDoc comment. It may contain\\nmultiple lines and multiple paragraphs.\\n\\nMultiple paragraphs are separated by an empty line.", - "stability": "stable", - "summary": "Here's the first line of the TSDoc comment." - }, - "fqn": "jsii-calc.DocumentedClass", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/documented.ts", - "line": 11 - }, - "methods": [ - { - "docs": { - "remarks": "This will print out a friendly greeting intended for\\nthe indicated person.", - "returns": "A number that everyone knows very well", - "stability": "stable", - "summary": "Greet the indicated person." - }, - "locationInModule": { - "filename": "lib/documented.ts", - "line": 21 - }, - "name": "greet", - "parameters": [ - { - "docs": { - "summary": "The person to be greeted." - }, - "name": "greetee", - "optional": true, - "type": { - "fqn": "jsii-calc.Greetee" - } - } - ], - "returns": { - "type": { - "primitive": "number" - } - } - }, - { - "docs": { - "stability": "experimental", - "summary": "Say ยกHola!" - }, - "locationInModule": { - "filename": "lib/documented.ts", - "line": 31 - }, - "name": "hola" - } - ], - "name": "DocumentedClass" - }, - "jsii-calc.DontComplainAboutVariadicAfterOptional": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.DontComplainAboutVariadicAfterOptional", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1430 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1431 - }, - "name": "optionalAndVariadic", - "parameters": [ - { - "name": "optional", - "optional": true, - "type": { - "primitive": "string" - } - }, - { - "name": "things", - "type": { - "primitive": "string" - }, - "variadic": true - } - ], - "returns": { - "type": { - "primitive": "string" - } - }, - "variadic": true - } - ], - "name": "DontComplainAboutVariadicAfterOptional" - }, - "jsii-calc.DoubleTrouble": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.DoubleTrouble", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "interfaces": [ - "jsii-calc.IFriendlyRandomGenerator" - ], - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 484 - }, - "methods": [ - { - "docs": { - "stability": "stable", - "summary": "(deprecated) Say hello!" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 489 - }, - "name": "hello", - "overrides": "@scope/jsii-calc-lib.IFriendly", - "returns": { - "type": { - "primitive": "string" - } - } - }, - { - "docs": { - "stability": "stable", - "summary": "Returns another random number." - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 485 - }, - "name": "next", - "overrides": "jsii-calc.IRandomNumberGenerator", - "returns": { - "type": { - "primitive": "number" - } - } - } - ], - "name": "DoubleTrouble" - }, - "jsii-calc.DynamicPropertyBearer": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "Ensures we can override a dynamic property that was inherited." - }, - "fqn": "jsii-calc.DynamicPropertyBearer", - "initializer": { - "docs": { - "stability": "stable" - }, - "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": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2797 - }, - "name": "dynamicProperty", - "type": { - "primitive": "string" - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2795 - }, - "name": "valueStore", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.DynamicPropertyBearerChild": { - "assembly": "jsii-calc", - "base": "jsii-calc.DynamicPropertyBearer", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.DynamicPropertyBearerChild", - "initializer": { - "docs": { - "stability": "stable" - }, - "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": "stable", - "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": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2806 - }, - "name": "originalValue", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.Entropy": { - "abstract": true, - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "This class is used to validate that serialization and deserialization does not interpret ISO-8601-formatted timestampts to the native date/time object, as the jsii protocol has a $jsii$date wrapper for this purpose (node's JSON parsing does *NOT* detect dates automatically in this way, so host libraries should not either)." - }, - "fqn": "jsii-calc.Entropy", - "initializer": { - "docs": { - "stability": "stable", - "summary": "Creates a new instance of Entropy." - }, - "locationInModule": { - "filename": "lib/date.ts", - "line": 14 - }, - "parameters": [ - { - "docs": { - "summary": "your implementation of \`WallClock\`." - }, - "name": "clock", - "type": { - "fqn": "jsii-calc.IWallClock" - } - } - ] - }, - "kind": "class", - "locationInModule": { - "filename": "lib/date.ts", - "line": 8 - }, - "methods": [ - { - "docs": { - "returns": "the time from the \`WallClock\`.", - "stability": "stable", - "summary": "Increases entropy by consuming time from the clock (yes, this is a long shot, please don't judge)." - }, - "locationInModule": { - "filename": "lib/date.ts", - "line": 22 - }, - "name": "increase", - "returns": { - "type": { - "primitive": "string" - } - } - }, - { - "abstract": true, - "docs": { - "returns": "\`word\`.", - "stability": "stable", - "summary": "Implement this method such that it returns \`word\`." - }, - "locationInModule": { - "filename": "lib/date.ts", - "line": 47 - }, - "name": "repeat", - "parameters": [ - { - "docs": { - "summary": "the value to return." - }, - "name": "word", - "type": { - "primitive": "string" - } - } - ], - "returns": { - "type": { - "primitive": "string" - } - } - } - ], - "name": "Entropy" - }, - "jsii-calc.EnumDispenser": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.EnumDispenser", - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 44 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 50 - }, - "name": "randomIntegerLikeEnum", - "returns": { - "type": { - "fqn": "jsii-calc.AllTypesEnum" - } - }, - "static": true - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 45 - }, - "name": "randomStringLikeEnum", - "returns": { - "type": { - "fqn": "jsii-calc.StringEnum" - } - }, - "static": true - } - ], - "name": "EnumDispenser" - }, - "jsii-calc.EraseUndefinedHashValues": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.EraseUndefinedHashValues", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1644 - }, - "methods": [ - { - "docs": { - "remarks": "Used to check that undefined/null hash values\\nare being erased when sending values from native code to JS.", - "stability": "stable", - "summary": "Returns \`true\` if \`key\` is defined in \`opts\`." - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1649 - }, - "name": "doesKeyExist", - "parameters": [ - { - "name": "opts", - "type": { - "fqn": "jsii-calc.EraseUndefinedHashValuesOptions" - } - }, - { - "name": "key", - "type": { - "primitive": "string" - } - } - ], - "returns": { - "type": { - "primitive": "boolean" - } - }, - "static": true - }, - { - "docs": { - "stability": "stable", - "summary": "We expect \\"prop1\\" to be erased." - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1669 - }, - "name": "prop1IsNull", - "returns": { - "type": { - "collection": { - "elementtype": { - "primitive": "any" - }, - "kind": "map" - } - } - }, - "static": true - }, - { - "docs": { - "stability": "stable", - "summary": "We expect \\"prop2\\" to be erased." - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1659 - }, - "name": "prop2IsUndefined", - "returns": { - "type": { - "collection": { - "elementtype": { - "primitive": "any" - }, - "kind": "map" - } - } - }, - "static": true - } - ], - "name": "EraseUndefinedHashValues" - }, - "jsii-calc.EraseUndefinedHashValuesOptions": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.EraseUndefinedHashValuesOptions", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1639 - }, - "name": "EraseUndefinedHashValuesOptions", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1640 - }, - "name": "option1", - "optional": true, - "type": { - "primitive": "string" - } - }, - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1641 - }, - "name": "option2", - "optional": true, - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.ExperimentalClass": { - "assembly": "jsii-calc", - "docs": { - "stability": "experimental" - }, - "fqn": "jsii-calc.ExperimentalClass", - "initializer": { - "docs": { - "stability": "experimental" - }, - "locationInModule": { - "filename": "lib/stability.ts", - "line": 22 - }, - "parameters": [ - { - "name": "readonlyString", - "type": { - "primitive": "string" - } - }, - { - "name": "mutableNumber", - "optional": true, - "type": { - "primitive": "number" - } - } - ] - }, - "kind": "class", - "locationInModule": { - "filename": "lib/stability.ts", - "line": 16 - }, - "methods": [ - { - "docs": { - "stability": "experimental" - }, - "locationInModule": { - "filename": "lib/stability.ts", - "line": 28 - }, - "name": "method" - } - ], - "name": "ExperimentalClass", - "properties": [ - { - "docs": { - "stability": "experimental" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/stability.ts", - "line": 18 - }, - "name": "readonlyProperty", - "type": { - "primitive": "string" - } - }, - { - "docs": { - "stability": "experimental" - }, - "locationInModule": { - "filename": "lib/stability.ts", - "line": 20 - }, - "name": "mutableProperty", - "optional": true, - "type": { - "primitive": "number" - } - } - ] - }, - "jsii-calc.ExperimentalEnum": { - "assembly": "jsii-calc", - "docs": { - "stability": "experimental" - }, - "fqn": "jsii-calc.ExperimentalEnum", - "kind": "enum", - "locationInModule": { - "filename": "lib/stability.ts", - "line": 33 - }, - "members": [ - { - "docs": { - "stability": "experimental" - }, - "name": "OPTION_A" - }, - { - "docs": { - "stability": "experimental" - }, - "name": "OPTION_B" - } - ], - "name": "ExperimentalEnum" - }, - "jsii-calc.ExperimentalStruct": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "experimental" - }, - "fqn": "jsii-calc.ExperimentalStruct", - "kind": "interface", - "locationInModule": { - "filename": "lib/stability.ts", - "line": 4 - }, - "name": "ExperimentalStruct", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "experimental" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/stability.ts", - "line": 6 - }, - "name": "readonlyProperty", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.ExportedBaseClass": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.ExportedBaseClass", - "initializer": { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1516 - }, - "parameters": [ - { - "name": "success", - "type": { - "primitive": "boolean" - } - } - ] - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1515 - }, - "name": "ExportedBaseClass", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1516 - }, - "name": "success", - "type": { - "primitive": "boolean" - } - } - ] - }, - "jsii-calc.ExtendsInternalInterface": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.ExtendsInternalInterface", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1758 - }, - "name": "ExtendsInternalInterface", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1759 - }, - "name": "boom", - "type": { - "primitive": "boolean" - } - }, - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1699 - }, - "name": "prop", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.ExternalClass": { - "assembly": "jsii-calc", - "docs": { - "custom": { - "external": "true" - }, - "stability": "stable" - }, - "fqn": "jsii-calc.ExternalClass", - "initializer": { - "docs": { - "custom": { - "external": "true" - }, - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/stability.ts", - "line": 131 - }, - "parameters": [ - { - "name": "readonlyString", - "type": { - "primitive": "string" - } - }, - { - "name": "mutableNumber", - "optional": true, - "type": { - "primitive": "number" - } - } - ] - }, - "kind": "class", - "locationInModule": { - "filename": "lib/stability.ts", - "line": 125 - }, - "methods": [ - { - "docs": { - "custom": { - "external": "true" - }, - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/stability.ts", - "line": 136 - }, - "name": "method" - } - ], - "name": "ExternalClass", - "properties": [ - { - "docs": { - "custom": { - "external": "true" - }, - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/stability.ts", - "line": 127 - }, - "name": "readonlyProperty", - "type": { - "primitive": "string" - } - }, - { - "docs": { - "custom": { - "external": "true" - }, - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/stability.ts", - "line": 129 - }, - "name": "mutableProperty", - "optional": true, - "type": { - "primitive": "number" - } - } - ] - }, - "jsii-calc.ExternalEnum": { - "assembly": "jsii-calc", - "docs": { - "custom": { - "external": "true" - }, - "stability": "stable" - }, - "fqn": "jsii-calc.ExternalEnum", - "kind": "enum", - "locationInModule": { - "filename": "lib/stability.ts", - "line": 141 - }, - "members": [ - { - "docs": { - "custom": { - "external": "true" - }, - "stability": "stable" - }, - "name": "OPTION_A" - }, - { - "docs": { - "custom": { - "external": "true" - }, - "stability": "stable" - }, - "name": "OPTION_B" - } - ], - "name": "ExternalEnum" - }, - "jsii-calc.ExternalStruct": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "custom": { - "external": "true" - }, - "stability": "stable" - }, - "fqn": "jsii-calc.ExternalStruct", - "kind": "interface", - "locationInModule": { - "filename": "lib/stability.ts", - "line": 113 - }, - "name": "ExternalStruct", - "properties": [ - { - "abstract": true, - "docs": { - "custom": { - "external": "true" - }, - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/stability.ts", - "line": 115 - }, - "name": "readonlyProperty", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.GiveMeStructs": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.GiveMeStructs", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 555 - }, - "methods": [ - { - "docs": { - "stability": "stable", - "summary": "Accepts a struct of type DerivedStruct and returns a struct of type FirstStruct." - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 573 - }, - "name": "derivedToFirst", - "parameters": [ - { - "name": "derived", - "type": { - "fqn": "jsii-calc.DerivedStruct" - } - } - ], - "returns": { - "type": { - "fqn": "@scope/jsii-calc-lib.MyFirstStruct" - } - } - }, - { - "docs": { - "stability": "stable", - "summary": "Returns the boolean from a DerivedStruct struct." - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 566 - }, - "name": "readDerivedNonPrimitive", - "parameters": [ - { - "name": "derived", - "type": { - "fqn": "jsii-calc.DerivedStruct" - } - } - ], - "returns": { - "type": { - "fqn": "jsii-calc.DoubleTrouble" - } - } - }, - { - "docs": { - "stability": "stable", - "summary": "Returns the \\"anumber\\" from a MyFirstStruct struct;" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 559 - }, - "name": "readFirstNumber", - "parameters": [ - { - "name": "first", - "type": { - "fqn": "@scope/jsii-calc-lib.MyFirstStruct" - } - } - ], - "returns": { - "type": { - "primitive": "number" - } - } - } - ], - "name": "GiveMeStructs", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 577 - }, - "name": "structLiteral", - "type": { - "fqn": "@scope/jsii-calc-lib.StructWithOnlyOptionals" - } - } - ] - }, - "jsii-calc.Greetee": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable", - "summary": "These are some arguments you can pass to a method." - }, - "fqn": "jsii-calc.Greetee", - "kind": "interface", - "locationInModule": { - "filename": "lib/documented.ts", - "line": 39 - }, - "name": "Greetee", - "properties": [ - { - "abstract": true, - "docs": { - "default": "world", - "stability": "stable", - "summary": "The name of the greetee." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/documented.ts", - "line": 45 - }, - "name": "name", - "optional": true, - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.GreetingAugmenter": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.GreetingAugmenter", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 531 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 532 - }, - "name": "betterGreeting", - "parameters": [ - { - "name": "friendly", - "type": { - "fqn": "@scope/jsii-calc-lib.IFriendly" - } - } - ], - "returns": { - "type": { - "primitive": "string" - } - } - } - ], - "name": "GreetingAugmenter" - }, - "jsii-calc.IAnonymousImplementationProvider": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "We can return an anonymous interface implementation from an override without losing the interface declarations." - }, - "fqn": "jsii-calc.IAnonymousImplementationProvider", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2209 - }, - "methods": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2211 - }, - "name": "provideAsClass", - "returns": { - "type": { - "fqn": "jsii-calc.Implementation" - } - } - }, - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2210 - }, - "name": "provideAsInterface", - "returns": { - "type": { - "fqn": "jsii-calc.IAnonymouslyImplementMe" - } - } - } - ], - "name": "IAnonymousImplementationProvider" - }, - "jsii-calc.IAnonymouslyImplementMe": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.IAnonymouslyImplementMe", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2228 - }, - "methods": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2230 - }, - "name": "verb", - "returns": { - "type": { - "primitive": "string" - } - } - } - ], - "name": "IAnonymouslyImplementMe", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2229 - }, - "name": "value", - "type": { - "primitive": "number" - } - } - ] - }, - "jsii-calc.IAnotherPublicInterface": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.IAnotherPublicInterface", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1779 - }, - "name": "IAnotherPublicInterface", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1780 - }, - "name": "a", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.IBell": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.IBell", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2418 - }, - "methods": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2419 - }, - "name": "ring" - } - ], - "name": "IBell" - }, - "jsii-calc.IBellRinger": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "Takes the object parameter as an interface." - }, - "fqn": "jsii-calc.IBellRinger", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2407 - }, - "methods": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2408 - }, - "name": "yourTurn", - "parameters": [ - { - "name": "bell", - "type": { - "fqn": "jsii-calc.IBell" - } - } - ] - } - ], - "name": "IBellRinger" - }, - "jsii-calc.IConcreteBellRinger": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "Takes the object parameter as a calss." - }, - "fqn": "jsii-calc.IConcreteBellRinger", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2414 - }, - "methods": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2415 - }, - "name": "yourTurn", - "parameters": [ - { - "name": "bell", - "type": { - "fqn": "jsii-calc.Bell" - } - } - ] - } - ], - "name": "IConcreteBellRinger" - }, - "jsii-calc.IDeprecatedInterface": { - "assembly": "jsii-calc", - "docs": { - "deprecated": "useless interface", - "stability": "deprecated" - }, - "fqn": "jsii-calc.IDeprecatedInterface", - "kind": "interface", - "locationInModule": { - "filename": "lib/stability.ts", - "line": 82 - }, - "methods": [ - { - "abstract": true, - "docs": { - "deprecated": "services no purpose", - "stability": "deprecated" - }, - "locationInModule": { - "filename": "lib/stability.ts", - "line": 86 - }, - "name": "method" - } - ], - "name": "IDeprecatedInterface", - "properties": [ - { - "abstract": true, - "docs": { - "deprecated": "could be better", - "stability": "deprecated" - }, - "locationInModule": { - "filename": "lib/stability.ts", - "line": 84 - }, - "name": "mutableProperty", - "optional": true, - "type": { - "primitive": "number" - } - } - ] - }, - "jsii-calc.IExperimentalInterface": { - "assembly": "jsii-calc", - "docs": { - "stability": "experimental" - }, - "fqn": "jsii-calc.IExperimentalInterface", - "kind": "interface", - "locationInModule": { - "filename": "lib/stability.ts", - "line": 9 - }, - "methods": [ - { - "abstract": true, - "docs": { - "stability": "experimental" - }, - "locationInModule": { - "filename": "lib/stability.ts", - "line": 13 - }, - "name": "method" - } - ], - "name": "IExperimentalInterface", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "experimental" - }, - "locationInModule": { - "filename": "lib/stability.ts", - "line": 11 - }, - "name": "mutableProperty", - "optional": true, - "type": { - "primitive": "number" - } - } - ] - }, - "jsii-calc.IExtendsPrivateInterface": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.IExtendsPrivateInterface", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1770 - }, - "name": "IExtendsPrivateInterface", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1771 - }, - "name": "moreThings", - "type": { - "collection": { - "elementtype": { - "primitive": "string" - }, - "kind": "array" - } - } - }, - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1755 - }, - "name": "private", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.IExternalInterface": { - "assembly": "jsii-calc", - "docs": { - "custom": { - "external": "true" - }, - "stability": "stable" - }, - "fqn": "jsii-calc.IExternalInterface", - "kind": "interface", - "locationInModule": { - "filename": "lib/stability.ts", - "line": 118 - }, - "methods": [ - { - "abstract": true, - "docs": { - "custom": { - "external": "true" - }, - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/stability.ts", - "line": 122 - }, - "name": "method" - } - ], - "name": "IExternalInterface", - "properties": [ - { - "abstract": true, - "docs": { - "custom": { - "external": "true" - }, - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/stability.ts", - "line": 120 - }, - "name": "mutableProperty", - "optional": true, - "type": { - "primitive": "number" - } - } - ] - }, - "jsii-calc.IFriendlier": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "Even friendlier classes can implement this interface." - }, - "fqn": "jsii-calc.IFriendlier", - "interfaces": [ - "@scope/jsii-calc-lib.IFriendly" - ], - "kind": "interface", - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 16 - }, - "methods": [ - { - "abstract": true, - "docs": { - "stability": "stable", - "summary": "Say farewell." - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 26 - }, - "name": "farewell", - "returns": { - "type": { - "primitive": "string" - } - } - }, - { - "abstract": true, - "docs": { - "returns": "A goodbye blessing.", - "stability": "stable", - "summary": "Say goodbye." - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 21 - }, - "name": "goodbye", - "returns": { - "type": { - "primitive": "string" - } - } - } - ], - "name": "IFriendlier" - }, - "jsii-calc.IFriendlyRandomGenerator": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.IFriendlyRandomGenerator", - "interfaces": [ - "jsii-calc.IRandomNumberGenerator", - "@scope/jsii-calc-lib.IFriendly" - ], - "kind": "interface", - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 40 - }, - "name": "IFriendlyRandomGenerator" - }, - "jsii-calc.IInterfaceImplementedByAbstractClass": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "awslabs/jsii#220 Abstract return type." - }, - "fqn": "jsii-calc.IInterfaceImplementedByAbstractClass", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1241 - }, - "name": "IInterfaceImplementedByAbstractClass", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1242 - }, - "name": "propFromInterface", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.IInterfaceThatShouldNotBeADataType": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "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." - }, - "fqn": "jsii-calc.IInterfaceThatShouldNotBeADataType", - "interfaces": [ - "jsii-calc.IInterfaceWithMethods" - ], - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1345 - }, - "name": "IInterfaceThatShouldNotBeADataType", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1347 - }, - "name": "otherValue", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.IInterfaceWithInternal": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.IInterfaceWithInternal", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1710 - }, - "methods": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1711 - }, - "name": "visible" - } - ], - "name": "IInterfaceWithInternal" - }, - "jsii-calc.IInterfaceWithMethods": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.IInterfaceWithMethods", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1335 - }, - "methods": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1338 - }, - "name": "doThings" - } - ], - "name": "IInterfaceWithMethods", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1336 - }, - "name": "value", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.IInterfaceWithOptionalMethodArguments": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "awslabs/jsii#175 Interface proxies (and builders) do not respect optional arguments in methods." - }, - "fqn": "jsii-calc.IInterfaceWithOptionalMethodArguments", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1219 - }, - "methods": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1220 - }, - "name": "hello", - "parameters": [ - { - "name": "arg1", - "type": { - "primitive": "string" - } - }, - { - "name": "arg2", - "optional": true, - "type": { - "primitive": "number" - } - } - ] - } - ], - "name": "IInterfaceWithOptionalMethodArguments" - }, - "jsii-calc.IInterfaceWithProperties": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.IInterfaceWithProperties", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 585 - }, - "name": "IInterfaceWithProperties", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 586 - }, - "name": "readOnlyString", - "type": { - "primitive": "string" - } - }, - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 587 - }, - "name": "readWriteString", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.IInterfaceWithPropertiesExtension": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.IInterfaceWithPropertiesExtension", - "interfaces": [ - "jsii-calc.IInterfaceWithProperties" - ], - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 590 - }, - "name": "IInterfaceWithPropertiesExtension", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 592 - }, - "name": "foo", - "type": { - "primitive": "number" - } - } - ] - }, - "jsii-calc.IJSII417Derived": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.IJSII417Derived", - "interfaces": [ - "jsii-calc.IJSII417PublicBaseOfBase" - ], - "kind": "interface", - "locationInModule": { - "filename": "lib/erasures.ts", - "line": 43 - }, - "methods": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/erasures.ts", - "line": 41 - }, - "name": "bar" - }, - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/erasures.ts", - "line": 44 - }, - "name": "baz" - } - ], - "name": "IJSII417Derived", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/erasures.ts", - "line": 40 - }, - "name": "property", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.IJSII417PublicBaseOfBase": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.IJSII417PublicBaseOfBase", - "kind": "interface", - "locationInModule": { - "filename": "lib/erasures.ts", - "line": 36 - }, - "methods": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/erasures.ts", - "line": 37 - }, - "name": "foo" - } - ], - "name": "IJSII417PublicBaseOfBase", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/erasures.ts", - "line": 34 - }, - "name": "hasRoot", - "type": { - "primitive": "boolean" - } - } - ] - }, - "jsii-calc.IJsii487External": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.IJsii487External", - "kind": "interface", - "locationInModule": { - "filename": "lib/erasures.ts", - "line": 52 - }, - "name": "IJsii487External" - }, - "jsii-calc.IJsii487External2": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.IJsii487External2", - "kind": "interface", - "locationInModule": { - "filename": "lib/erasures.ts", - "line": 54 - }, - "name": "IJsii487External2" - }, - "jsii-calc.IJsii496": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.IJsii496", - "kind": "interface", - "locationInModule": { - "filename": "lib/erasures.ts", - "line": 65 - }, - "name": "IJsii496" - }, - "jsii-calc.IMutableObjectLiteral": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.IMutableObjectLiteral", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1289 - }, - "name": "IMutableObjectLiteral", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1290 - }, - "name": "value", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.INonInternalInterface": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.INonInternalInterface", - "interfaces": [ - "jsii-calc.IAnotherPublicInterface" - ], - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1788 - }, - "name": "INonInternalInterface", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1785 - }, - "name": "b", - "type": { - "primitive": "string" - } - }, - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1789 - }, - "name": "c", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.IObjectWithProperty": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "Make sure that setters are properly called on objects with interfaces." - }, - "fqn": "jsii-calc.IObjectWithProperty", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2543 - }, - "methods": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2545 - }, - "name": "wasSet", - "returns": { - "type": { - "primitive": "boolean" - } - } - } - ], - "name": "IObjectWithProperty", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2544 - }, - "name": "property", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.IOptionalMethod": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "Checks that optional result from interface method code generates correctly." - }, - "fqn": "jsii-calc.IOptionalMethod", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2732 - }, - "methods": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2733 - }, - "name": "optional", - "returns": { - "optional": true, - "type": { - "primitive": "string" - } - } - } - ], - "name": "IOptionalMethod" - }, - "jsii-calc.IPrivatelyImplemented": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.IPrivatelyImplemented", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1512 - }, - "name": "IPrivatelyImplemented", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1513 - }, - "name": "success", - "type": { - "primitive": "boolean" - } - } - ] - }, - "jsii-calc.IPublicInterface": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.IPublicInterface", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1559 - }, - "methods": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1560 - }, - "name": "bye", - "returns": { - "type": { - "primitive": "string" - } - } - } - ], - "name": "IPublicInterface" - }, - "jsii-calc.IPublicInterface2": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.IPublicInterface2", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1563 - }, - "methods": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1564 - }, - "name": "ciao", - "returns": { - "type": { - "primitive": "string" - } - } - } - ], - "name": "IPublicInterface2" - }, - "jsii-calc.IRandomNumberGenerator": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "Generates random numbers." - }, - "fqn": "jsii-calc.IRandomNumberGenerator", - "kind": "interface", - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 32 - }, - "methods": [ - { - "abstract": true, - "docs": { - "returns": "A random number.", - "stability": "stable", - "summary": "Returns another random number." - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 37 - }, - "name": "next", - "returns": { - "type": { - "primitive": "number" - } - } - } - ], - "name": "IRandomNumberGenerator" - }, - "jsii-calc.IReturnJsii976": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "Returns a subclass of a known class which implements an interface." - }, - "fqn": "jsii-calc.IReturnJsii976", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2474 - }, - "name": "IReturnJsii976", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2475 - }, - "name": "foo", - "type": { - "primitive": "number" - } - } - ] - }, - "jsii-calc.IReturnsNumber": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.IReturnsNumber", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 638 - }, - "methods": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 639 - }, - "name": "obtainNumber", - "returns": { - "type": { - "fqn": "@scope/jsii-calc-lib.IDoublable" - } - } - } - ], - "name": "IReturnsNumber", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 641 - }, - "name": "numberProp", - "type": { - "fqn": "@scope/jsii-calc-lib.Number" - } - } - ] - }, - "jsii-calc.IStableInterface": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.IStableInterface", - "kind": "interface", - "locationInModule": { - "filename": "lib/stability.ts", - "line": 46 - }, - "methods": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/stability.ts", - "line": 50 - }, - "name": "method" - } - ], - "name": "IStableInterface", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/stability.ts", - "line": 48 - }, - "name": "mutableProperty", - "optional": true, - "type": { - "primitive": "number" - } - } - ] - }, - "jsii-calc.IStructReturningDelegate": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "Verifies that a \\"pure\\" implementation of an interface works correctly." - }, - "fqn": "jsii-calc.IStructReturningDelegate", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2661 - }, - "methods": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2662 - }, - "name": "returnStruct", - "returns": { - "type": { - "fqn": "jsii-calc.StructB" - } - } - } - ], - "name": "IStructReturningDelegate" - }, - "jsii-calc.IWallClock": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "Implement this interface." - }, - "fqn": "jsii-calc.IWallClock", - "kind": "interface", - "locationInModule": { - "filename": "lib/date.ts", - "line": 53 - }, - "methods": [ - { - "abstract": true, - "docs": { - "stability": "stable", - "summary": "Returns the current time, formatted as an ISO-8601 string." - }, - "locationInModule": { - "filename": "lib/date.ts", - "line": 57 - }, - "name": "iso8601Now", - "returns": { - "type": { - "primitive": "string" - } - } - } - ], - "name": "IWallClock" - }, - "jsii-calc.ImplementInternalInterface": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.ImplementInternalInterface", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1762 - }, - "name": "ImplementInternalInterface", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1763 - }, - "name": "prop", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.Implementation": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.Implementation", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2225 - }, - "name": "Implementation", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2226 - }, - "name": "value", - "type": { - "primitive": "number" - } - } - ] - }, - "jsii-calc.ImplementsInterfaceWithInternal": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.ImplementsInterfaceWithInternal", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "interfaces": [ - "jsii-calc.IInterfaceWithInternal" - ], - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1717 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1718 - }, - "name": "visible", - "overrides": "jsii-calc.IInterfaceWithInternal" - } - ], - "name": "ImplementsInterfaceWithInternal" - }, - "jsii-calc.ImplementsInterfaceWithInternalSubclass": { - "assembly": "jsii-calc", - "base": "jsii-calc.ImplementsInterfaceWithInternal", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.ImplementsInterfaceWithInternalSubclass", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1736 - }, - "name": "ImplementsInterfaceWithInternalSubclass" - }, - "jsii-calc.ImplementsPrivateInterface": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.ImplementsPrivateInterface", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1766 - }, - "name": "ImplementsPrivateInterface", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1767 - }, - "name": "private", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.ImplictBaseOfBase": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.ImplictBaseOfBase", - "interfaces": [ - "@scope/jsii-calc-base.BaseProps" - ], - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1175 - }, - "name": "ImplictBaseOfBase", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1176 - }, - "name": "goo", - "type": { - "primitive": "date" - } - } - ] - }, - "jsii-calc.InbetweenClass": { - "assembly": "jsii-calc", - "base": "jsii-calc.PublicClass", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.InbetweenClass", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "interfaces": [ - "jsii-calc.IPublicInterface2" - ], - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1566 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1567 - }, - "name": "ciao", - "overrides": "jsii-calc.IPublicInterface2", - "returns": { - "type": { - "primitive": "string" - } - } - } - ], - "name": "InbetweenClass" - }, - "jsii-calc.InterfaceCollections": { - "assembly": "jsii-calc", - "docs": { - "remarks": "See: https://github.com/aws/jsii/issues/1196", - "stability": "stable", - "summary": "Verifies that collections of interfaces or structs are correctly handled." - }, - "fqn": "jsii-calc.InterfaceCollections", - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2695 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2706 - }, - "name": "listOfInterfaces", - "returns": { - "type": { - "collection": { - "elementtype": { - "fqn": "jsii-calc.IBell" - }, - "kind": "array" - } - } - }, - "static": true - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2696 - }, - "name": "listOfStructs", - "returns": { - "type": { - "collection": { - "elementtype": { - "fqn": "jsii-calc.StructA" - }, - "kind": "array" - } - } - }, - "static": true - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2716 - }, - "name": "mapOfInterfaces", - "returns": { - "type": { - "collection": { - "elementtype": { - "fqn": "jsii-calc.IBell" - }, - "kind": "map" - } - } - }, - "static": true - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2700 - }, - "name": "mapOfStructs", - "returns": { - "type": { - "collection": { - "elementtype": { - "fqn": "jsii-calc.StructA" - }, - "kind": "map" - } - } - }, - "static": true - } - ], - "name": "InterfaceCollections" - }, - "jsii-calc.InterfaceInNamespaceIncludesClasses.Foo": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.InterfaceInNamespaceIncludesClasses.Foo", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1206 - }, - "name": "Foo", - "namespace": "InterfaceInNamespaceIncludesClasses", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1207 - }, - "name": "bar", - "optional": true, - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.InterfaceInNamespaceIncludesClasses.Hello": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.InterfaceInNamespaceIncludesClasses.Hello", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1210 - }, - "name": "Hello", - "namespace": "InterfaceInNamespaceIncludesClasses", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1211 - }, - "name": "foo", - "type": { - "primitive": "number" - } - } - ] - }, - "jsii-calc.InterfaceInNamespaceOnlyInterface.Hello": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.InterfaceInNamespaceOnlyInterface.Hello", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1200 - }, - "name": "Hello", - "namespace": "InterfaceInNamespaceOnlyInterface", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1201 - }, - "name": "foo", - "type": { - "primitive": "number" - } - } - ] - }, - "jsii-calc.InterfacesMaker": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "We can return arrays of interfaces See aws/aws-cdk#2362." - }, - "fqn": "jsii-calc.InterfacesMaker", - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2097 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2098 - }, - "name": "makeInterfaces", - "parameters": [ - { - "name": "count", - "type": { - "primitive": "number" - } - } - ], - "returns": { - "type": { - "collection": { - "elementtype": { - "fqn": "@scope/jsii-calc-lib.IDoublable" - }, - "kind": "array" - } - } - }, - "static": true - } - ], - "name": "InterfacesMaker" - }, - "jsii-calc.Isomorphism": { - "abstract": true, - "assembly": "jsii-calc", - "docs": { - "remarks": "Create a subclass of this, and assert that \`this.myself()\` actually returns\\n\`this\` from within the constructor.", - "stability": "stable", - "summary": "Checks the \\"same instance\\" isomorphism is preserved within the constructor." - }, - "fqn": "jsii-calc.Isomorphism", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2742 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2743 - }, - "name": "myself", - "returns": { - "type": { - "fqn": "jsii-calc.Isomorphism" - } - } - } - ], - "name": "Isomorphism" - }, - "jsii-calc.JSII417Derived": { - "assembly": "jsii-calc", - "base": "jsii-calc.JSII417PublicBaseOfBase", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.JSII417Derived", - "initializer": { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/erasures.ts", - "line": 17 - }, - "parameters": [ - { - "name": "property", - "type": { - "primitive": "string" - } - } - ] - }, - "kind": "class", - "locationInModule": { - "filename": "lib/erasures.ts", - "line": 24 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/erasures.ts", - "line": 25 - }, - "name": "bar" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/erasures.ts", - "line": 28 - }, - "name": "baz" - } - ], - "name": "JSII417Derived", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/erasures.ts", - "line": 17 - }, - "name": "property", - "protected": true, - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.JSII417PublicBaseOfBase": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.JSII417PublicBaseOfBase", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/erasures.ts", - "line": 8 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/erasures.ts", - "line": 9 - }, - "name": "makeInstance", - "returns": { - "type": { - "fqn": "jsii-calc.JSII417PublicBaseOfBase" - } - }, - "static": true - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/erasures.ts", - "line": 12 - }, - "name": "foo" - } - ], - "name": "JSII417PublicBaseOfBase", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/erasures.ts", - "line": 6 - }, - "name": "hasRoot", - "type": { - "primitive": "boolean" - } - } - ] - }, - "jsii-calc.JSObjectLiteralForInterface": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.JSObjectLiteralForInterface", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 516 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 517 - }, - "name": "giveMeFriendly", - "returns": { - "type": { - "fqn": "@scope/jsii-calc-lib.IFriendly" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 523 - }, - "name": "giveMeFriendlyGenerator", - "returns": { - "type": { - "fqn": "jsii-calc.IFriendlyRandomGenerator" - } - } - } - ], - "name": "JSObjectLiteralForInterface" - }, - "jsii-calc.JSObjectLiteralToNative": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.JSObjectLiteralToNative", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 246 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 247 - }, - "name": "returnLiteral", - "returns": { - "type": { - "fqn": "jsii-calc.JSObjectLiteralToNativeClass" - } - } - } - ], - "name": "JSObjectLiteralToNative" - }, - "jsii-calc.JSObjectLiteralToNativeClass": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.JSObjectLiteralToNativeClass", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 255 - }, - "name": "JSObjectLiteralToNativeClass", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 256 - }, - "name": "propA", - "type": { - "primitive": "string" - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 257 - }, - "name": "propB", - "type": { - "primitive": "number" - } - } - ] - }, - "jsii-calc.JavaReservedWords": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.JavaReservedWords", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 744 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 745 - }, - "name": "abstract" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 749 - }, - "name": "assert" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 753 - }, - "name": "boolean" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 757 - }, - "name": "break" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 761 - }, - "name": "byte" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 765 - }, - "name": "case" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 769 - }, - "name": "catch" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 773 - }, - "name": "char" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 777 - }, - "name": "class" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 781 - }, - "name": "const" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 785 - }, - "name": "continue" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 789 - }, - "name": "default" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 797 - }, - "name": "do" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 793 - }, - "name": "double" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 801 - }, - "name": "else" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 805 - }, - "name": "enum" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 809 - }, - "name": "extends" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 813 - }, - "name": "false" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 817 - }, - "name": "final" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 821 - }, - "name": "finally" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 825 - }, - "name": "float" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 829 - }, - "name": "for" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 833 - }, - "name": "goto" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 837 - }, - "name": "if" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 841 - }, - "name": "implements" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 845 - }, - "name": "import" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 849 - }, - "name": "instanceof" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 853 - }, - "name": "int" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 857 - }, - "name": "interface" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 861 - }, - "name": "long" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 865 - }, - "name": "native" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 869 - }, - "name": "new" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 873 - }, - "name": "null" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 877 - }, - "name": "package" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 881 - }, - "name": "private" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 885 - }, - "name": "protected" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 889 - }, - "name": "public" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 893 - }, - "name": "return" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 897 - }, - "name": "short" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 901 - }, - "name": "static" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 905 - }, - "name": "strictfp" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 909 - }, - "name": "super" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 913 - }, - "name": "switch" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 917 - }, - "name": "synchronized" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 921 - }, - "name": "this" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 925 - }, - "name": "throw" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 929 - }, - "name": "throws" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 933 - }, - "name": "transient" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 937 - }, - "name": "true" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 941 - }, - "name": "try" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 945 - }, - "name": "void" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 949 - }, - "name": "volatile" - } - ], - "name": "JavaReservedWords", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 953 - }, - "name": "while", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.Jsii487Derived": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.Jsii487Derived", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "interfaces": [ - "jsii-calc.IJsii487External2", - "jsii-calc.IJsii487External" - ], - "kind": "class", - "locationInModule": { - "filename": "lib/erasures.ts", - "line": 56 - }, - "name": "Jsii487Derived" - }, - "jsii-calc.Jsii496Derived": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.Jsii496Derived", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "interfaces": [ - "jsii-calc.IJsii496" - ], - "kind": "class", - "locationInModule": { - "filename": "lib/erasures.ts", - "line": 67 - }, - "name": "Jsii496Derived" - }, - "jsii-calc.JsiiAgent": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "Host runtime version should be set via JSII_AGENT." - }, - "fqn": "jsii-calc.JsiiAgent", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1529 - }, - "name": "JsiiAgent", - "properties": [ - { - "docs": { - "stability": "stable", - "summary": "Returns the value of the JSII_AGENT environment variable." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1533 - }, - "name": "value", - "optional": true, - "static": true, - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.JsonFormatter": { - "assembly": "jsii-calc", - "docs": { - "see": "https://github.com/aws/aws-cdk/issues/5066", - "stability": "stable", - "summary": "Make sure structs are un-decorated on the way in." - }, - "fqn": "jsii-calc.JsonFormatter", - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2576 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2621 - }, - "name": "anyArray", - "returns": { - "type": { - "primitive": "any" - } - }, - "static": true - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2617 - }, - "name": "anyBooleanFalse", - "returns": { - "type": { - "primitive": "any" - } - }, - "static": true - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2613 - }, - "name": "anyBooleanTrue", - "returns": { - "type": { - "primitive": "any" - } - }, - "static": true - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2593 - }, - "name": "anyDate", - "returns": { - "type": { - "primitive": "any" - } - }, - "static": true - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2609 - }, - "name": "anyEmptyString", - "returns": { - "type": { - "primitive": "any" - } - }, - "static": true - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2589 - }, - "name": "anyFunction", - "returns": { - "type": { - "primitive": "any" - } - }, - "static": true - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2625 - }, - "name": "anyHash", - "returns": { - "type": { - "primitive": "any" - } - }, - "static": true - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2581 - }, - "name": "anyNull", - "returns": { - "type": { - "primitive": "any" - } - }, - "static": true - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2597 - }, - "name": "anyNumber", - "returns": { - "type": { - "primitive": "any" - } - }, - "static": true - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2629 - }, - "name": "anyRef", - "returns": { - "type": { - "primitive": "any" - } - }, - "static": true - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2605 - }, - "name": "anyString", - "returns": { - "type": { - "primitive": "any" - } - }, - "static": true - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2585 - }, - "name": "anyUndefined", - "returns": { - "type": { - "primitive": "any" - } - }, - "static": true - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2601 - }, - "name": "anyZero", - "returns": { - "type": { - "primitive": "any" - } - }, - "static": true - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2577 - }, - "name": "stringify", - "parameters": [ - { - "name": "value", - "optional": true, - "type": { - "primitive": "any" - } - } - ], - "returns": { - "optional": true, - "type": { - "primitive": "string" - } - }, - "static": true - } - ], - "name": "JsonFormatter" - }, - "jsii-calc.LevelOne": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "Validates that nested classes get correct code generation for the occasional forward reference." - }, - "fqn": "jsii-calc.LevelOne", - "initializer": { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2829 - }, - "parameters": [ - { - "name": "props", - "type": { - "fqn": "jsii-calc.LevelOneProps" - } - } - ] - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2828 - }, - "name": "LevelOne", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2829 - }, - "name": "props", - "type": { - "fqn": "jsii-calc.LevelOneProps" - } - } - ] - }, - "jsii-calc.LevelOne.PropBooleanValue": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.LevelOne.PropBooleanValue", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2839 - }, - "name": "PropBooleanValue", - "namespace": "LevelOne", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2840 - }, - "name": "value", - "type": { - "primitive": "boolean" - } - } - ] - }, - "jsii-calc.LevelOne.PropProperty": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.LevelOne.PropProperty", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2835 - }, - "name": "PropProperty", - "namespace": "LevelOne", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2836 - }, - "name": "prop", - "type": { - "fqn": "jsii-calc.LevelOne.PropBooleanValue" - } - } - ] - }, - "jsii-calc.LevelOneProps": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.LevelOneProps", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2831 - }, - "name": "LevelOneProps", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2832 - }, - "name": "prop", - "type": { - "fqn": "jsii-calc.LevelOne.PropProperty" - } - } - ] - }, - "jsii-calc.LoadBalancedFargateServiceProps": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable", - "summary": "jsii#298: show default values in sphinx documentation, and respect newlines." - }, - "fqn": "jsii-calc.LoadBalancedFargateServiceProps", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1439 - }, - "name": "LoadBalancedFargateServiceProps", - "properties": [ - { - "abstract": true, - "docs": { - "default": "80", - "remarks": "Corresponds to container port mapping.", - "stability": "stable", - "summary": "The container port of the application load balancer attached to your Fargate service." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1482 - }, - "name": "containerPort", - "optional": true, - "type": { - "primitive": "number" - } - }, - { - "abstract": true, - "docs": { - "default": "256", - "remarks": "Valid values, which determines your range of valid values for the memory parameter:\\n256 (.25 vCPU) - Available memory values: 0.5GB, 1GB, 2GB\\n512 (.5 vCPU) - Available memory values: 1GB, 2GB, 3GB, 4GB\\n1024 (1 vCPU) - Available memory values: 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB\\n2048 (2 vCPU) - Available memory values: Between 4GB and 16GB in 1GB increments\\n4096 (4 vCPU) - Available memory values: Between 8GB and 30GB in 1GB increments\\n\\nThis default is set in the underlying FargateTaskDefinition construct.", - "stability": "stable", - "summary": "The number of cpu units used by the task." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1453 - }, - "name": "cpu", - "optional": true, - "type": { - "primitive": "string" - } - }, - { - "abstract": true, - "docs": { - "default": "512", - "remarks": "This field is required and you must use one of the following values, which determines your range of valid values\\nfor the cpu parameter:\\n\\n0.5GB, 1GB, 2GB - Available cpu values: 256 (.25 vCPU)\\n\\n1GB, 2GB, 3GB, 4GB - Available cpu values: 512 (.5 vCPU)\\n\\n2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB - Available cpu values: 1024 (1 vCPU)\\n\\nBetween 4GB and 16GB in 1GB increments - Available cpu values: 2048 (2 vCPU)\\n\\nBetween 8GB and 30GB in 1GB increments - Available cpu values: 4096 (4 vCPU)\\n\\nThis default is set in the underlying FargateTaskDefinition construct.", - "stability": "stable", - "summary": "The amount (in MiB) of memory used by the task." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1475 - }, - "name": "memoryMiB", - "optional": true, - "type": { - "primitive": "string" - } - }, - { - "abstract": true, - "docs": { - "default": "true", - "stability": "stable", - "summary": "Determines whether the Application Load Balancer will be internet-facing." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1489 - }, - "name": "publicLoadBalancer", - "optional": true, - "type": { - "primitive": "boolean" - } - }, - { - "abstract": true, - "docs": { - "default": "false", - "stability": "stable", - "summary": "Determines whether your Fargate Service will be assigned a public IP address." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1496 - }, - "name": "publicTasks", - "optional": true, - "type": { - "primitive": "boolean" - } - } - ] - }, - "jsii-calc.MethodNamedProperty": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.MethodNamedProperty", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 407 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 408 - }, - "name": "property", - "returns": { - "type": { - "primitive": "string" - } - } - } - ], - "name": "MethodNamedProperty", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 412 - }, - "name": "elite", - "type": { - "primitive": "number" - } - } - ] - }, - "jsii-calc.Multiply": { - "assembly": "jsii-calc", - "base": "jsii-calc.BinaryOperation", - "docs": { - "stability": "stable", - "summary": "The \\"*\\" binary operation." - }, - "fqn": "jsii-calc.Multiply", - "initializer": { - "docs": { - "stability": "stable", - "summary": "Creates a BinaryOperation." - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 53 - }, - "parameters": [ - { - "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" - } - } - ] - }, - "interfaces": [ - "jsii-calc.IFriendlier", - "jsii-calc.IRandomNumberGenerator" - ], - "kind": "class", - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 81 - }, - "methods": [ - { - "docs": { - "stability": "stable", - "summary": "Say farewell." - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 96 - }, - "name": "farewell", - "overrides": "jsii-calc.IFriendlier", - "returns": { - "type": { - "primitive": "string" - } - } - }, - { - "docs": { - "stability": "stable", - "summary": "Say goodbye." - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 92 - }, - "name": "goodbye", - "overrides": "jsii-calc.IFriendlier", - "returns": { - "type": { - "primitive": "string" - } - } - }, - { - "docs": { - "stability": "stable", - "summary": "Returns another random number." - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 100 - }, - "name": "next", - "overrides": "jsii-calc.IRandomNumberGenerator", - "returns": { - "type": { - "primitive": "number" - } - } - }, - { - "docs": { - "stability": "stable", - "summary": "(deprecated) String representation of the value." - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 88 - }, - "name": "toString", - "overrides": "@scope/jsii-calc-lib.Operation", - "returns": { - "type": { - "primitive": "string" - } - } - } - ], - "name": "Multiply", - "properties": [ - { - "docs": { - "stability": "stable", - "summary": "(deprecated) The value." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 84 - }, - "name": "value", - "overrides": "@scope/jsii-calc-lib.NumericValue", - "type": { - "primitive": "number" - } - } - ] - }, - "jsii-calc.Negate": { - "assembly": "jsii-calc", - "base": "jsii-calc.UnaryOperation", - "docs": { - "stability": "stable", - "summary": "The negation operation (\\"-value\\")." - }, - "fqn": "jsii-calc.Negate", - "initializer": { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 109 - }, - "parameters": [ - { - "name": "operand", - "type": { - "fqn": "@scope/jsii-calc-lib.NumericValue" - } - } - ] - }, - "interfaces": [ - "jsii-calc.IFriendlier" - ], - "kind": "class", - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 117 - }, - "methods": [ - { - "docs": { - "stability": "stable", - "summary": "Say farewell." - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 134 - }, - "name": "farewell", - "overrides": "jsii-calc.IFriendlier", - "returns": { - "type": { - "primitive": "string" - } - } - }, - { - "docs": { - "stability": "stable", - "summary": "Say goodbye." - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 130 - }, - "name": "goodbye", - "overrides": "jsii-calc.IFriendlier", - "returns": { - "type": { - "primitive": "string" - } - } - }, - { - "docs": { - "stability": "stable", - "summary": "(deprecated) Say hello!" - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 126 - }, - "name": "hello", - "overrides": "@scope/jsii-calc-lib.IFriendly", - "returns": { - "type": { - "primitive": "string" - } - } - }, - { - "docs": { - "stability": "stable", - "summary": "(deprecated) String representation of the value." - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 122 - }, - "name": "toString", - "overrides": "@scope/jsii-calc-lib.Operation", - "returns": { - "type": { - "primitive": "string" - } - } - } - ], - "name": "Negate", - "properties": [ - { - "docs": { - "stability": "stable", - "summary": "(deprecated) The value." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 118 - }, - "name": "value", - "overrides": "@scope/jsii-calc-lib.NumericValue", - "type": { - "primitive": "number" - } - } - ] - }, - "jsii-calc.NestedClassInstance": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.NestedClassInstance", - "kind": "class", - "locationInModule": { - "filename": "lib/nested-class.ts", - "line": 3 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/nested-class.ts", - "line": 4 - }, - "name": "makeInstance", - "returns": { - "type": { - "fqn": "@scope/jsii-calc-lib.submodule.NestingClass.NestedClass" - } - }, - "static": true - } - ], - "name": "NestedClassInstance" - }, - "jsii-calc.NestedStruct": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.NestedStruct", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2450 - }, - "name": "NestedStruct", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable", - "summary": "When provided, must be > 0." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2454 - }, - "name": "numberProp", - "type": { - "primitive": "number" - } - } - ] - }, - "jsii-calc.NodeStandardLibrary": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "Test fixture to verify that jsii modules can use the node standard library." - }, - "fqn": "jsii-calc.NodeStandardLibrary", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1125 - }, - "methods": [ - { - "docs": { - "returns": "\\"6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50\\"", - "stability": "stable", - "summary": "Uses node.js \\"crypto\\" module to calculate sha256 of a string." - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1156 - }, - "name": "cryptoSha256", - "returns": { - "type": { - "primitive": "string" - } - } - }, - { - "async": true, - "docs": { - "returns": "\\"Hello, resource!\\"", - "stability": "stable", - "summary": "Reads a local resource file (resource.txt) asynchronously." - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1130 - }, - "name": "fsReadFile", - "returns": { - "type": { - "primitive": "string" - } - } - }, - { - "docs": { - "returns": "\\"Hello, resource! SYNC!\\"", - "stability": "stable", - "summary": "Sync version of fsReadFile." - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1139 - }, - "name": "fsReadFileSync", - "returns": { - "type": { - "primitive": "string" - } - } - } - ], - "name": "NodeStandardLibrary", - "properties": [ - { - "docs": { - "stability": "stable", - "summary": "Returns the current os.platform() from the \\"os\\" node module." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1148 - }, - "name": "osPlatform", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.NullShouldBeTreatedAsUndefined": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "jsii#282, aws-cdk#157: null should be treated as \\"undefined\\"." - }, - "fqn": "jsii-calc.NullShouldBeTreatedAsUndefined", - "initializer": { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1369 - }, - "parameters": [ - { - "name": "_param1", - "type": { - "primitive": "string" - } - }, - { - "name": "optional", - "optional": true, - "type": { - "primitive": "any" - } - } - ] - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1366 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1377 - }, - "name": "giveMeUndefined", - "parameters": [ - { - "name": "value", - "optional": true, - "type": { - "primitive": "any" - } - } - ] - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1387 - }, - "name": "giveMeUndefinedInsideAnObject", - "parameters": [ - { - "name": "input", - "type": { - "fqn": "jsii-calc.NullShouldBeTreatedAsUndefinedData" - } - } - ] - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1416 - }, - "name": "verifyPropertyIsUndefined" - } - ], - "name": "NullShouldBeTreatedAsUndefined", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1367 - }, - "name": "changeMeToUndefined", - "optional": true, - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.NullShouldBeTreatedAsUndefinedData": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.NullShouldBeTreatedAsUndefinedData", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1425 - }, - "name": "NullShouldBeTreatedAsUndefinedData", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1427 - }, - "name": "arrayWithThreeElementsAndUndefinedAsSecondArgument", - "type": { - "collection": { - "elementtype": { - "primitive": "any" - }, - "kind": "array" - } - } - }, - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1426 - }, - "name": "thisShouldBeUndefined", - "optional": true, - "type": { - "primitive": "any" - } - } - ] - }, - "jsii-calc.NumberGenerator": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "This allows us to test that a reference can be stored for objects that implement interfaces." - }, - "fqn": "jsii-calc.NumberGenerator", - "initializer": { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 505 - }, - "parameters": [ - { - "name": "generator", - "type": { - "fqn": "jsii-calc.IRandomNumberGenerator" - } - } - ] - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 504 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 511 - }, - "name": "isSameGenerator", - "parameters": [ - { - "name": "gen", - "type": { - "fqn": "jsii-calc.IRandomNumberGenerator" - } - } - ], - "returns": { - "type": { - "primitive": "boolean" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 507 - }, - "name": "nextTimes100", - "returns": { - "type": { - "primitive": "number" - } - } - } - ], - "name": "NumberGenerator", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 505 - }, - "name": "generator", - "type": { - "fqn": "jsii-calc.IRandomNumberGenerator" - } - } - ] - }, - "jsii-calc.ObjectRefsInCollections": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "Verify that object references can be passed inside collections." - }, - "fqn": "jsii-calc.ObjectRefsInCollections", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 263 - }, - "methods": [ - { - "docs": { - "stability": "stable", - "summary": "Returns the sum of all values." - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 267 - }, - "name": "sumFromArray", - "parameters": [ - { - "name": "values", - "type": { - "collection": { - "elementtype": { - "fqn": "@scope/jsii-calc-lib.NumericValue" - }, - "kind": "array" - } - } - } - ], - "returns": { - "type": { - "primitive": "number" - } - } - }, - { - "docs": { - "stability": "stable", - "summary": "Returns the sum of all values in a map." - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 278 - }, - "name": "sumFromMap", - "parameters": [ - { - "name": "values", - "type": { - "collection": { - "elementtype": { - "fqn": "@scope/jsii-calc-lib.NumericValue" - }, - "kind": "map" - } - } - } - ], - "returns": { - "type": { - "primitive": "number" - } - } - } - ], - "name": "ObjectRefsInCollections" - }, - "jsii-calc.ObjectWithPropertyProvider": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.ObjectWithPropertyProvider", - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2547 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2548 - }, - "name": "provide", - "returns": { - "type": { - "fqn": "jsii-calc.IObjectWithProperty" - } - }, - "static": true - } - ], - "name": "ObjectWithPropertyProvider" - }, - "jsii-calc.Old": { - "assembly": "jsii-calc", - "docs": { - "deprecated": "Use the new class", - "stability": "deprecated", - "summary": "Old class." - }, - "fqn": "jsii-calc.Old", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/documented.ts", - "line": 53 - }, - "methods": [ - { - "docs": { - "stability": "deprecated", - "summary": "Doo wop that thing." - }, - "locationInModule": { - "filename": "lib/documented.ts", - "line": 57 - }, - "name": "doAThing" - } - ], - "name": "Old" - }, - "jsii-calc.OptionalArgumentInvoker": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.OptionalArgumentInvoker", - "initializer": { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1223 - }, - "parameters": [ - { - "name": "delegate", - "type": { - "fqn": "jsii-calc.IInterfaceWithOptionalMethodArguments" - } - } - ] - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1222 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1231 - }, - "name": "invokeWithOptional" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1227 - }, - "name": "invokeWithoutOptional" - } - ], - "name": "OptionalArgumentInvoker" - }, - "jsii-calc.OptionalConstructorArgument": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.OptionalConstructorArgument", - "initializer": { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 309 - }, - "parameters": [ - { - "name": "arg1", - "type": { - "primitive": "number" - } - }, - { - "name": "arg2", - "type": { - "primitive": "string" - } - }, - { - "name": "arg3", - "optional": true, - "type": { - "primitive": "date" - } - } - ] - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 308 - }, - "name": "OptionalConstructorArgument", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 310 - }, - "name": "arg1", - "type": { - "primitive": "number" - } - }, - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 311 - }, - "name": "arg2", - "type": { - "primitive": "string" - } - }, - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 312 - }, - "name": "arg3", - "optional": true, - "type": { - "primitive": "date" - } - } - ] - }, - "jsii-calc.OptionalStruct": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.OptionalStruct", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1868 - }, - "name": "OptionalStruct", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1869 - }, - "name": "field", - "optional": true, - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.OptionalStructConsumer": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.OptionalStructConsumer", - "initializer": { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1863 - }, - "parameters": [ - { - "name": "optionalStruct", - "optional": true, - "type": { - "fqn": "jsii-calc.OptionalStruct" - } - } - ] - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1859 - }, - "name": "OptionalStructConsumer", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1860 - }, - "name": "parameterWasUndefined", - "type": { - "primitive": "boolean" - } - }, - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1861 - }, - "name": "fieldValue", - "optional": true, - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.OverridableProtectedMember": { - "assembly": "jsii-calc", - "docs": { - "see": "https://github.com/aws/jsii/issues/903", - "stability": "stable" - }, - "fqn": "jsii-calc.OverridableProtectedMember", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2136 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2148 - }, - "name": "overrideMe", - "protected": true, - "returns": { - "type": { - "primitive": "string" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2144 - }, - "name": "switchModes" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2140 - }, - "name": "valueFromProtected", - "returns": { - "type": { - "primitive": "string" - } - } - } - ], - "name": "OverridableProtectedMember", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2137 - }, - "name": "overrideReadOnly", - "protected": true, - "type": { - "primitive": "string" - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2138 - }, - "name": "overrideReadWrite", - "protected": true, - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.OverrideReturnsObject": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.OverrideReturnsObject", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 644 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 645 - }, - "name": "test", - "parameters": [ - { - "name": "obj", - "type": { - "fqn": "jsii-calc.IReturnsNumber" - } - } - ], - "returns": { - "type": { - "primitive": "number" - } - } - } - ], - "name": "OverrideReturnsObject" - }, - "jsii-calc.ParentStruct982": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable", - "summary": "https://github.com/aws/jsii/issues/982." - }, - "fqn": "jsii-calc.ParentStruct982", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2499 - }, - "name": "ParentStruct982", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2500 - }, - "name": "foo", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.PartiallyInitializedThisConsumer": { - "abstract": true, - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.PartiallyInitializedThisConsumer", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1834 - }, - "methods": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1835 - }, - "name": "consumePartiallyInitializedThis", - "parameters": [ - { - "name": "obj", - "type": { - "fqn": "jsii-calc.ConstructorPassesThisOut" - } - }, - { - "name": "dt", - "type": { - "primitive": "date" - } - }, - { - "name": "ev", - "type": { - "fqn": "jsii-calc.AllTypesEnum" - } - } - ], - "returns": { - "type": { - "primitive": "string" - } - } - } - ], - "name": "PartiallyInitializedThisConsumer" - }, - "jsii-calc.Polymorphism": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.Polymorphism", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 494 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 495 - }, - "name": "sayHello", - "parameters": [ - { - "name": "friendly", - "type": { - "fqn": "@scope/jsii-calc-lib.IFriendly" - } - } - ], - "returns": { - "type": { - "primitive": "string" - } - } - } - ], - "name": "Polymorphism" - }, - "jsii-calc.Power": { - "assembly": "jsii-calc", - "base": "jsii-calc.composition.CompositeOperation", - "docs": { - "stability": "stable", - "summary": "The power operation." - }, - "fqn": "jsii-calc.Power", - "initializer": { - "docs": { - "stability": "stable", - "summary": "Creates a Power operation." - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 235 - }, - "parameters": [ - { - "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" - } - } - ] - }, - "kind": "class", - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 229 - }, - "name": "Power", - "properties": [ - { - "docs": { - "stability": "stable", - "summary": "The base of the power." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 236 - }, - "name": "base", - "type": { - "fqn": "@scope/jsii-calc-lib.NumericValue" - } - }, - { - "docs": { - "remarks": "Must be implemented by derived classes.", - "stability": "stable", - "summary": "The expression that this operation consists of." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 242 - }, - "name": "expression", - "overrides": "jsii-calc.composition.CompositeOperation", - "type": { - "fqn": "@scope/jsii-calc-lib.NumericValue" - } - }, - { - "docs": { - "stability": "stable", - "summary": "The number of times to multiply." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 237 - }, - "name": "pow", - "type": { - "fqn": "@scope/jsii-calc-lib.NumericValue" - } - } - ] - }, - "jsii-calc.PropertyNamedProperty": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "Reproduction for https://github.com/aws/jsii/issues/1113 Where a method or property named \\"property\\" would result in impossible to load Python code." - }, - "fqn": "jsii-calc.PropertyNamedProperty", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 403 - }, - "name": "PropertyNamedProperty", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 404 - }, - "name": "property", - "type": { - "primitive": "string" - } - }, - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 405 - }, - "name": "yetAnoterOne", - "type": { - "primitive": "boolean" - } - } - ] - }, - "jsii-calc.PublicClass": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.PublicClass", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1554 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1555 - }, - "name": "hello" - } - ], - "name": "PublicClass" - }, - "jsii-calc.PythonReservedWords": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.PythonReservedWords", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 956 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 957 - }, - "name": "and" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 961 - }, - "name": "as" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 965 - }, - "name": "assert" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 969 - }, - "name": "async" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 973 - }, - "name": "await" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 977 - }, - "name": "break" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 981 - }, - "name": "class" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 985 - }, - "name": "continue" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 989 - }, - "name": "def" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 993 - }, - "name": "del" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 997 - }, - "name": "elif" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1001 - }, - "name": "else" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1005 - }, - "name": "except" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1009 - }, - "name": "finally" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1013 - }, - "name": "for" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1017 - }, - "name": "from" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1021 - }, - "name": "global" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1025 - }, - "name": "if" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1029 - }, - "name": "import" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1033 - }, - "name": "in" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1037 - }, - "name": "is" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1041 - }, - "name": "lambda" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1045 - }, - "name": "nonlocal" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1049 - }, - "name": "not" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1053 - }, - "name": "or" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1057 - }, - "name": "pass" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1061 - }, - "name": "raise" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1065 - }, - "name": "return" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1069 - }, - "name": "try" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1073 - }, - "name": "while" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1077 - }, - "name": "with" - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1081 - }, - "name": "yield" - } - ], - "name": "PythonReservedWords" - }, - "jsii-calc.PythonSelf.ClassWithSelf": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.PythonSelf.ClassWithSelf", - "initializer": { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1091 - }, - "parameters": [ - { - "name": "self", - "type": { - "primitive": "string" - } - } - ] - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1090 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1093 - }, - "name": "method", - "parameters": [ - { - "name": "self", - "type": { - "primitive": "number" - } - } - ], - "returns": { - "type": { - "primitive": "string" - } - } - } - ], - "name": "ClassWithSelf", - "namespace": "PythonSelf", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1091 - }, - "name": "self", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.PythonSelf.ClassWithSelfKwarg": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.PythonSelf.ClassWithSelfKwarg", - "initializer": { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1099 - }, - "parameters": [ - { - "name": "props", - "type": { - "fqn": "jsii-calc.PythonSelf.StructWithSelf" - } - } - ] - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1098 - }, - "name": "ClassWithSelfKwarg", - "namespace": "PythonSelf", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1099 - }, - "name": "props", - "type": { - "fqn": "jsii-calc.PythonSelf.StructWithSelf" - } - } - ] - }, - "jsii-calc.PythonSelf.IInterfaceWithSelf": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.PythonSelf.IInterfaceWithSelf", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1106 - }, - "methods": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1107 - }, - "name": "method", - "parameters": [ - { - "name": "self", - "type": { - "primitive": "number" - } - } - ], - "returns": { - "type": { - "primitive": "string" - } - } - } - ], - "name": "IInterfaceWithSelf", - "namespace": "PythonSelf" - }, - "jsii-calc.PythonSelf.StructWithSelf": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.PythonSelf.StructWithSelf", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1102 - }, - "name": "StructWithSelf", - "namespace": "PythonSelf", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1103 - }, - "name": "self", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.ReferenceEnumFromScopedPackage": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "See awslabs/jsii#138." - }, - "fqn": "jsii-calc.ReferenceEnumFromScopedPackage", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1182 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1185 - }, - "name": "loadFoo", - "returns": { - "optional": true, - "type": { - "fqn": "@scope/jsii-calc-lib.EnumFromScopedModule" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1189 - }, - "name": "saveFoo", - "parameters": [ - { - "name": "value", - "type": { - "fqn": "@scope/jsii-calc-lib.EnumFromScopedModule" - } - } - ] - } - ], - "name": "ReferenceEnumFromScopedPackage", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1183 - }, - "name": "foo", - "optional": true, - "type": { - "fqn": "@scope/jsii-calc-lib.EnumFromScopedModule" - } - } - ] - }, - "jsii-calc.ReturnsPrivateImplementationOfInterface": { - "assembly": "jsii-calc", - "docs": { - "returns": "an instance of an un-exported class that extends \`ExportedBaseClass\`, declared as \`IPrivatelyImplemented\`.", - "see": "https://github.com/aws/jsii/issues/320", - "stability": "stable", - "summary": "Helps ensure the JSII kernel & runtime cooperate correctly when an un-exported instance of a class is returned with a declared type that is an exported interface, and the instance inherits from an exported class." - }, - "fqn": "jsii-calc.ReturnsPrivateImplementationOfInterface", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1507 - }, - "name": "ReturnsPrivateImplementationOfInterface", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1508 - }, - "name": "privateImplementation", - "type": { - "fqn": "jsii-calc.IPrivatelyImplemented" - } - } - ] - }, - "jsii-calc.RootStruct": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "remarks": "This is cheating with the (current) declared types, but this is the \\"more\\nidiomatic\\" way for Pythonists.", - "stability": "stable", - "summary": "This is here to check that we can pass a nested struct into a kwargs by specifying it as an in-line dictionary." - }, - "fqn": "jsii-calc.RootStruct", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2443 - }, - "name": "RootStruct", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable", - "summary": "May not be empty." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2447 - }, - "name": "stringProp", - "type": { - "primitive": "string" - } - }, - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2448 - }, - "name": "nestedStruct", - "optional": true, - "type": { - "fqn": "jsii-calc.NestedStruct" - } - } - ] - }, - "jsii-calc.RootStructValidator": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.RootStructValidator", - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2456 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2457 - }, - "name": "validate", - "parameters": [ - { - "name": "struct", - "type": { - "fqn": "jsii-calc.RootStruct" - } - } - ], - "static": true - } - ], - "name": "RootStructValidator" - }, - "jsii-calc.RuntimeTypeChecking": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.RuntimeTypeChecking", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 287 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 295 - }, - "name": "methodWithDefaultedArguments", - "parameters": [ - { - "name": "arg1", - "optional": true, - "type": { - "primitive": "number" - } - }, - { - "name": "arg2", - "optional": true, - "type": { - "primitive": "string" - } - }, - { - "name": "arg3", - "optional": true, - "type": { - "primitive": "date" - } - } - ] - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 303 - }, - "name": "methodWithOptionalAnyArgument", - "parameters": [ - { - "name": "arg", - "optional": true, - "type": { - "primitive": "any" - } - } - ] - }, - { - "docs": { - "stability": "stable", - "summary": "Used to verify verification of number of method arguments." - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 291 - }, - "name": "methodWithOptionalArguments", - "parameters": [ - { - "name": "arg1", - "type": { - "primitive": "number" - } - }, - { - "name": "arg2", - "type": { - "primitive": "string" - } - }, - { - "name": "arg3", - "optional": true, - "type": { - "primitive": "date" - } - } - ] - } - ], - "name": "RuntimeTypeChecking" - }, - "jsii-calc.SecondLevelStruct": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.SecondLevelStruct", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2015 - }, - "name": "SecondLevelStruct", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable", - "summary": "It's long and required." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2019 - }, - "name": "deeperRequiredProp", - "type": { - "primitive": "string" - } - }, - { - "abstract": true, - "docs": { - "stability": "stable", - "summary": "It's long, but you'll almost never pass it." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2024 - }, - "name": "deeperOptionalProp", - "optional": true, - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.SingleInstanceTwoTypes": { - "assembly": "jsii-calc", - "docs": { - "remarks": "JSII clients can instantiate 2 different strongly-typed wrappers for the same\\nobject. Unfortunately, this will break object equality, but if we didn't do\\nthis it would break runtime type checks in the JVM or CLR.", - "stability": "stable", - "summary": "Test that a single instance can be returned under two different FQNs." - }, - "fqn": "jsii-calc.SingleInstanceTwoTypes", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1625 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1628 - }, - "name": "interface1", - "returns": { - "type": { - "fqn": "jsii-calc.InbetweenClass" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1632 - }, - "name": "interface2", - "returns": { - "type": { - "fqn": "jsii-calc.IPublicInterface" - } - } - } - ], - "name": "SingleInstanceTwoTypes" - }, - "jsii-calc.SingletonInt": { - "assembly": "jsii-calc", - "docs": { - "remarks": "https://github.com/aws/jsii/issues/231", - "stability": "stable", - "summary": "Verifies that singleton enums are handled correctly." - }, - "fqn": "jsii-calc.SingletonInt", - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1967 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1969 - }, - "name": "isSingletonInt", - "parameters": [ - { - "name": "value", - "type": { - "primitive": "number" - } - } - ], - "returns": { - "type": { - "primitive": "boolean" - } - } - } - ], - "name": "SingletonInt" - }, - "jsii-calc.SingletonIntEnum": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "A singleton integer." - }, - "fqn": "jsii-calc.SingletonIntEnum", - "kind": "enum", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1974 - }, - "members": [ - { - "docs": { - "stability": "stable", - "summary": "Elite!" - }, - "name": "SINGLETON_INT" - } - ], - "name": "SingletonIntEnum" - }, - "jsii-calc.SingletonString": { - "assembly": "jsii-calc", - "docs": { - "remarks": "https://github.com/aws/jsii/issues/231", - "stability": "stable", - "summary": "Verifies that singleton enums are handled correctly." - }, - "fqn": "jsii-calc.SingletonString", - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1950 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1953 - }, - "name": "isSingletonString", - "parameters": [ - { - "name": "value", - "type": { - "primitive": "string" - } - } - ], - "returns": { - "type": { - "primitive": "boolean" - } - } - } - ], - "name": "SingletonString" - }, - "jsii-calc.SingletonStringEnum": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "A singleton string." - }, - "fqn": "jsii-calc.SingletonStringEnum", - "kind": "enum", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1958 - }, - "members": [ - { - "docs": { - "stability": "stable", - "summary": "1337." - }, - "name": "SINGLETON_STRING" - } - ], - "name": "SingletonStringEnum" - }, - "jsii-calc.SmellyStruct": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.SmellyStruct", - "kind": "interface", - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 414 - }, - "name": "SmellyStruct", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 415 - }, - "name": "property", - "type": { - "primitive": "string" - } - }, - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 416 - }, - "name": "yetAnoterOne", - "type": { - "primitive": "boolean" - } - } - ] - }, - "jsii-calc.SomeTypeJsii976": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.SomeTypeJsii976", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2480 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2489 - }, - "name": "returnAnonymous", - "returns": { - "type": { - "primitive": "any" - } - }, - "static": true - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2481 - }, - "name": "returnReturn", - "returns": { - "type": { - "fqn": "jsii-calc.IReturnJsii976" - } - }, - "static": true - } - ], - "name": "SomeTypeJsii976" - }, - "jsii-calc.StableClass": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.StableClass", - "initializer": { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/stability.ts", - "line": 59 - }, - "parameters": [ - { - "name": "readonlyString", - "type": { - "primitive": "string" - } - }, - { - "name": "mutableNumber", - "optional": true, - "type": { - "primitive": "number" - } - } - ] - }, - "kind": "class", - "locationInModule": { - "filename": "lib/stability.ts", - "line": 53 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/stability.ts", - "line": 64 - }, - "name": "method" - } - ], - "name": "StableClass", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/stability.ts", - "line": 55 - }, - "name": "readonlyProperty", - "type": { - "primitive": "string" - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/stability.ts", - "line": 57 - }, - "name": "mutableProperty", - "optional": true, - "type": { - "primitive": "number" - } - } - ] - }, - "jsii-calc.StableEnum": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.StableEnum", - "kind": "enum", - "locationInModule": { - "filename": "lib/stability.ts", - "line": 69 - }, - "members": [ - { - "docs": { - "stability": "stable" - }, - "name": "OPTION_A" - }, - { - "docs": { - "stability": "stable" - }, - "name": "OPTION_B" - } - ], - "name": "StableEnum" - }, - "jsii-calc.StableStruct": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.StableStruct", - "kind": "interface", - "locationInModule": { - "filename": "lib/stability.ts", - "line": 41 - }, - "name": "StableStruct", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/stability.ts", - "line": 43 - }, - "name": "readonlyProperty", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.StaticContext": { - "assembly": "jsii-calc", - "docs": { - "remarks": "https://github.com/awslabs/aws-cdk/issues/2304", - "stability": "stable", - "summary": "This is used to validate the ability to use \`this\` from within a static context." - }, - "fqn": "jsii-calc.StaticContext", - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1893 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1896 - }, - "name": "canAccessStaticContext", - "returns": { - "type": { - "primitive": "boolean" - } - }, - "static": true - } - ], - "name": "StaticContext", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1904 - }, - "name": "staticVariable", - "static": true, - "type": { - "primitive": "boolean" - } - } - ] - }, - "jsii-calc.Statics": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.Statics", - "initializer": { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 689 - }, - "parameters": [ - { - "name": "value", - "type": { - "primitive": "string" - } - } - ] - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 688 - }, - "methods": [ - { - "docs": { - "stability": "stable", - "summary": "Jsdocs for static method." - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 695 - }, - "name": "staticMethod", - "parameters": [ - { - "docs": { - "summary": "The name of the person to say hello to." - }, - "name": "name", - "type": { - "primitive": "string" - } - } - ], - "returns": { - "type": { - "primitive": "string" - } - }, - "static": true - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 699 - }, - "name": "justMethod", - "returns": { - "type": { - "primitive": "string" - } - } - } - ], - "name": "Statics", - "properties": [ - { - "const": true, - "docs": { - "stability": "stable", - "summary": "Constants may also use all-caps." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 711 - }, - "name": "BAR", - "static": true, - "type": { - "primitive": "number" - } - }, - { - "const": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 740 - }, - "name": "ConstObj", - "static": true, - "type": { - "fqn": "jsii-calc.DoubleTrouble" - } - }, - { - "const": true, - "docs": { - "stability": "stable", - "summary": "Jsdocs for static property." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 706 - }, - "name": "Foo", - "static": true, - "type": { - "primitive": "string" - } - }, - { - "const": true, - "docs": { - "stability": "stable", - "summary": "Constants can also use camelCase." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 716 - }, - "name": "zooBar", - "static": true, - "type": { - "collection": { - "elementtype": { - "primitive": "string" - }, - "kind": "map" - } - } - }, - { - "docs": { - "remarks": "Jsdocs for static setter.", - "stability": "stable", - "summary": "Jsdocs for static getter." - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 725 - }, - "name": "instance", - "static": true, - "type": { - "fqn": "jsii-calc.Statics" - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 739 - }, - "name": "nonConstStatic", - "static": true, - "type": { - "primitive": "number" - } - }, - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 689 - }, - "name": "value", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.StringEnum": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.StringEnum", - "kind": "enum", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 38 - }, - "members": [ - { - "docs": { - "stability": "stable" - }, - "name": "A" - }, - { - "docs": { - "stability": "stable" - }, - "name": "B" - }, - { - "docs": { - "stability": "stable" - }, - "name": "C" - } - ], - "name": "StringEnum" - }, - "jsii-calc.StripInternal": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.StripInternal", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1678 - }, - "name": "StripInternal", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1679 - }, - "name": "youSeeMe", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.StructA": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable", - "summary": "We can serialize and deserialize structs without silently ignoring optional fields." - }, - "fqn": "jsii-calc.StructA", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2241 - }, - "name": "StructA", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2242 - }, - "name": "requiredString", - "type": { - "primitive": "string" - } - }, - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2244 - }, - "name": "optionalNumber", - "optional": true, - "type": { - "primitive": "number" - } - }, - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2243 - }, - "name": "optionalString", - "optional": true, - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.StructB": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable", - "summary": "This intentionally overlaps with StructA (where only requiredString is provided) to test htat the kernel properly disambiguates those." - }, - "fqn": "jsii-calc.StructB", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2250 - }, - "name": "StructB", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2251 - }, - "name": "requiredString", - "type": { - "primitive": "string" - } - }, - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2252 - }, - "name": "optionalBoolean", - "optional": true, - "type": { - "primitive": "boolean" - } - }, - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2253 - }, - "name": "optionalStructA", - "optional": true, - "type": { - "fqn": "jsii-calc.StructA" - } - } - ] - }, - "jsii-calc.StructParameterType": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "remarks": "See: https://github.com/aws/aws-cdk/issues/4302", - "stability": "stable", - "summary": "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." - }, - "fqn": "jsii-calc.StructParameterType", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2679 - }, - "name": "StructParameterType", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2680 - }, - "name": "scope", - "type": { - "primitive": "string" - } - }, - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2681 - }, - "name": "props", - "optional": true, - "type": { - "primitive": "boolean" - } - } - ] - }, - "jsii-calc.StructPassing": { - "assembly": "jsii-calc", - "docs": { - "stability": "external", - "summary": "Just because we can." - }, - "fqn": "jsii-calc.StructPassing", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2073 - }, - "methods": [ - { - "docs": { - "stability": "external" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2085 - }, - "name": "howManyVarArgsDidIPass", - "parameters": [ - { - "name": "_positional", - "type": { - "primitive": "number" - } - }, - { - "name": "inputs", - "type": { - "fqn": "jsii-calc.TopLevelStruct" - }, - "variadic": true - } - ], - "returns": { - "type": { - "primitive": "number" - } - }, - "static": true, - "variadic": true - }, - { - "docs": { - "stability": "external" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2074 - }, - "name": "roundTrip", - "parameters": [ - { - "name": "_positional", - "type": { - "primitive": "number" - } - }, - { - "name": "input", - "type": { - "fqn": "jsii-calc.TopLevelStruct" - } - } - ], - "returns": { - "type": { - "fqn": "jsii-calc.TopLevelStruct" - } - }, - "static": true - } - ], - "name": "StructPassing" - }, - "jsii-calc.StructUnionConsumer": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.StructUnionConsumer", - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2255 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2256 - }, - "name": "isStructA", - "parameters": [ - { - "name": "struct", - "type": { - "union": { - "types": [ - { - "fqn": "jsii-calc.StructA" - }, - { - "fqn": "jsii-calc.StructB" - } - ] - } - } - } - ], - "returns": { - "type": { - "primitive": "boolean" - } - }, - "static": true - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2277 - }, - "name": "isStructB", - "parameters": [ - { - "name": "struct", - "type": { - "union": { - "types": [ - { - "fqn": "jsii-calc.StructA" - }, - { - "fqn": "jsii-calc.StructB" - } - ] - } - } - } - ], - "returns": { - "type": { - "primitive": "boolean" - } - }, - "static": true - } - ], - "name": "StructUnionConsumer" - }, - "jsii-calc.StructWithJavaReservedWords": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.StructWithJavaReservedWords", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2047 - }, - "name": "StructWithJavaReservedWords", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2048 - }, - "name": "default", - "type": { - "primitive": "string" - } - }, - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2049 - }, - "name": "assert", - "optional": true, - "type": { - "primitive": "string" - } - }, - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2052 - }, - "name": "result", - "optional": true, - "type": { - "primitive": "string" - } - }, - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2053 - }, - "name": "that", - "optional": true, - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.Sum": { - "assembly": "jsii-calc", - "base": "jsii-calc.composition.CompositeOperation", - "docs": { - "stability": "stable", - "summary": "An operation that sums multiple values." - }, - "fqn": "jsii-calc.Sum", - "initializer": { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 213 - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 205 - }, - "name": "Sum", - "properties": [ - { - "docs": { - "remarks": "Must be implemented by derived classes.", - "stability": "stable", - "summary": "The expression that this operation consists of." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 217 - }, - "name": "expression", - "overrides": "jsii-calc.composition.CompositeOperation", - "type": { - "fqn": "@scope/jsii-calc-lib.NumericValue" - } - }, - { - "docs": { - "stability": "stable", - "summary": "The parts to sum." - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 209 - }, - "name": "parts", - "type": { - "collection": { - "elementtype": { - "fqn": "@scope/jsii-calc-lib.NumericValue" - }, - "kind": "array" - } - } - } - ] - }, - "jsii-calc.SupportsNiceJavaBuilder": { - "assembly": "jsii-calc", - "base": "jsii-calc.SupportsNiceJavaBuilderWithRequiredProps", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.SupportsNiceJavaBuilder", - "initializer": { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2182 - }, - "parameters": [ - { - "docs": { - "summary": "some identifier." - }, - "name": "id", - "type": { - "primitive": "number" - } - }, - { - "docs": { - "summary": "the default value of \`bar\`." - }, - "name": "defaultBar", - "optional": true, - "type": { - "primitive": "number" - } - }, - { - "docs": { - "summary": "some props once can provide." - }, - "name": "props", - "optional": true, - "type": { - "fqn": "jsii-calc.SupportsNiceJavaBuilderProps" - } - }, - { - "docs": { - "summary": "a variadic continuation." - }, - "name": "rest", - "type": { - "primitive": "string" - }, - "variadic": true - } - ], - "variadic": true - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2172 - }, - "name": "SupportsNiceJavaBuilder", - "properties": [ - { - "docs": { - "stability": "stable", - "summary": "some identifier." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2183 - }, - "name": "id", - "overrides": "jsii-calc.SupportsNiceJavaBuilderWithRequiredProps", - "type": { - "primitive": "number" - } - }, - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2173 - }, - "name": "rest", - "type": { - "collection": { - "elementtype": { - "primitive": "string" - }, - "kind": "array" - } - } - } - ] - }, - "jsii-calc.SupportsNiceJavaBuilderProps": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.SupportsNiceJavaBuilderProps", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2192 - }, - "name": "SupportsNiceJavaBuilderProps", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable", - "summary": "Some number, like 42." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2202 - }, - "name": "bar", - "type": { - "primitive": "number" - } - }, - { - "abstract": true, - "docs": { - "remarks": "But here we are, doing it like we didn't care.", - "stability": "stable", - "summary": "An \`id\` field here is terrible API design, because the constructor of \`SupportsNiceJavaBuilder\` already has a parameter named \`id\`." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2197 - }, - "name": "id", - "optional": true, - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.SupportsNiceJavaBuilderWithRequiredProps": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "We can generate fancy builders in Java for classes which take a mix of positional & struct parameters." - }, - "fqn": "jsii-calc.SupportsNiceJavaBuilderWithRequiredProps", - "initializer": { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2164 - }, - "parameters": [ - { - "docs": { - "summary": "some identifier of your choice." - }, - "name": "id", - "type": { - "primitive": "number" - } - }, - { - "docs": { - "summary": "some properties." - }, - "name": "props", - "type": { - "fqn": "jsii-calc.SupportsNiceJavaBuilderProps" - } - } - ] - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2156 - }, - "name": "SupportsNiceJavaBuilderWithRequiredProps", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2158 - }, - "name": "bar", - "type": { - "primitive": "number" - } - }, - { - "docs": { - "stability": "stable", - "summary": "some identifier of your choice." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2165 - }, - "name": "id", - "type": { - "primitive": "number" - } - }, - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2157 - }, - "name": "propId", - "optional": true, - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.SyncVirtualMethods": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.SyncVirtualMethods", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 375 - }, - "methods": [ - { - "async": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 388 - }, - "name": "callerIsAsync", - "returns": { - "type": { - "primitive": "number" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 376 - }, - "name": "callerIsMethod", - "returns": { - "type": { - "primitive": "number" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 428 - }, - "name": "modifyOtherProperty", - "parameters": [ - { - "name": "value", - "type": { - "primitive": "string" - } - } - ] - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 400 - }, - "name": "modifyValueOfTheProperty", - "parameters": [ - { - "name": "value", - "type": { - "primitive": "string" - } - } - ] - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 441 - }, - "name": "readA", - "returns": { - "type": { - "primitive": "number" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 432 - }, - "name": "retrieveOtherProperty", - "returns": { - "type": { - "primitive": "string" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 412 - }, - "name": "retrieveReadOnlyProperty", - "returns": { - "type": { - "primitive": "string" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 404 - }, - "name": "retrieveValueOfTheProperty", - "returns": { - "type": { - "primitive": "string" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 392 - }, - "name": "virtualMethod", - "parameters": [ - { - "name": "n", - "type": { - "primitive": "number" - } - } - ], - "returns": { - "type": { - "primitive": "number" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 445 - }, - "name": "writeA", - "parameters": [ - { - "name": "value", - "type": { - "primitive": "number" - } - } - ] - } - ], - "name": "SyncVirtualMethods", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 410 - }, - "name": "readonlyProperty", - "type": { - "primitive": "string" - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 439 - }, - "name": "a", - "type": { - "primitive": "number" - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 380 - }, - "name": "callerIsProperty", - "type": { - "primitive": "number" - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 418 - }, - "name": "otherProperty", - "type": { - "primitive": "string" - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 398 - }, - "name": "theProperty", - "type": { - "primitive": "string" - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 426 - }, - "name": "valueOfOtherProperty", - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.Thrower": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.Thrower", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 650 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 651 - }, - "name": "throwError" - } - ], - "name": "Thrower" - }, - "jsii-calc.TopLevelStruct": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.TopLevelStruct", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1998 - }, - "name": "TopLevelStruct", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable", - "summary": "This is a required field." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2002 - }, - "name": "required", - "type": { - "primitive": "string" - } - }, - { - "abstract": true, - "docs": { - "stability": "stable", - "summary": "A union to really stress test our serialization." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2012 - }, - "name": "secondLevel", - "type": { - "union": { - "types": [ - { - "primitive": "number" - }, - { - "fqn": "jsii-calc.SecondLevelStruct" - } - ] - } - } - }, - { - "abstract": true, - "docs": { - "stability": "stable", - "summary": "You don't have to pass this." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2007 - }, - "name": "optional", - "optional": true, - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.UmaskCheck": { - "assembly": "jsii-calc", - "docs": { - "see": "https://github.com/aws/jsii/issues/1765", - "stability": "stable", - "summary": "Checks the current file permissions are cool (no funky UMASK down-scoping happened)." - }, - "fqn": "jsii-calc.UmaskCheck", - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2753 - }, - "methods": [ - { - "docs": { - "stability": "stable", - "summary": "This should return 0o644 (-rw-r--r--)." - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 2757 - }, - "name": "mode", - "returns": { - "type": { - "primitive": "number" - } - }, - "static": true - } - ], - "name": "UmaskCheck" - }, - "jsii-calc.UnaryOperation": { - "abstract": true, - "assembly": "jsii-calc", - "base": "@scope/jsii-calc-lib.Operation", - "docs": { - "stability": "stable", - "summary": "An operation on a single operand." - }, - "fqn": "jsii-calc.UnaryOperation", - "initializer": { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 109 - }, - "parameters": [ - { - "name": "operand", - "type": { - "fqn": "@scope/jsii-calc-lib.NumericValue" - } - } - ] - }, - "kind": "class", - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 108 - }, - "name": "UnaryOperation", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 109 - }, - "name": "operand", - "type": { - "fqn": "@scope/jsii-calc-lib.NumericValue" - } - } - ] - }, - "jsii-calc.UnionProperties": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.UnionProperties", - "kind": "interface", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1111 - }, - "name": "UnionProperties", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1113 - }, - "name": "bar", - "type": { - "union": { - "types": [ - { - "primitive": "string" - }, - { - "primitive": "number" - }, - { - "fqn": "jsii-calc.AllTypes" - } - ] - } - } - }, - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1112 - }, - "name": "foo", - "optional": true, - "type": { - "union": { - "types": [ - { - "primitive": "string" - }, - { - "primitive": "number" - } - ] - } - } - } - ] - }, - "jsii-calc.UpcasingReflectable": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "Ensures submodule-imported types from dependencies can be used correctly." - }, - "fqn": "jsii-calc.UpcasingReflectable", - "initializer": { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/submodules.ts", - "line": 9 - }, - "parameters": [ - { - "name": "delegate", - "type": { - "collection": { - "elementtype": { - "primitive": "any" - }, - "kind": "map" - } - } - } - ] - }, - "interfaces": [ - "@scope/jsii-calc-lib.submodule.IReflectable" - ], - "kind": "class", - "locationInModule": { - "filename": "lib/submodules.ts", - "line": 6 - }, - "name": "UpcasingReflectable", - "properties": [ - { - "const": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/submodules.ts", - "line": 7 - }, - "name": "reflector", - "static": true, - "type": { - "fqn": "@scope/jsii-calc-lib.submodule.Reflector" - } - }, - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/submodules.ts", - "line": 11 - }, - "name": "entries", - "overrides": "@scope/jsii-calc-lib.submodule.IReflectable", - "type": { - "collection": { - "elementtype": { - "fqn": "@scope/jsii-calc-lib.submodule.ReflectableEntry" - }, - "kind": "array" - } - } - } - ] - }, - "jsii-calc.UseBundledDependency": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.UseBundledDependency", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1116 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1117 - }, - "name": "value", - "returns": { - "type": { - "primitive": "any" - } - } - } - ], - "name": "UseBundledDependency" - }, - "jsii-calc.UseCalcBase": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "Depend on a type from jsii-calc-base as a test for awslabs/jsii#128." - }, - "fqn": "jsii-calc.UseCalcBase", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1167 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1168 - }, - "name": "hello", - "returns": { - "type": { - "fqn": "@scope/jsii-calc-base.Base" - } - } - } - ], - "name": "UseCalcBase" - }, - "jsii-calc.UsesInterfaceWithProperties": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.UsesInterfaceWithProperties", - "initializer": { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 596 - }, - "parameters": [ - { - "name": "obj", - "type": { - "fqn": "jsii-calc.IInterfaceWithProperties" - } - } - ] - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 595 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 598 - }, - "name": "justRead", - "returns": { - "type": { - "primitive": "string" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 607 - }, - "name": "readStringAndNumber", - "parameters": [ - { - "name": "ext", - "type": { - "fqn": "jsii-calc.IInterfaceWithPropertiesExtension" - } - } - ], - "returns": { - "type": { - "primitive": "string" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 602 - }, - "name": "writeAndRead", - "parameters": [ - { - "name": "value", - "type": { - "primitive": "string" - } - } - ], - "returns": { - "type": { - "primitive": "string" - } - } - } - ], - "name": "UsesInterfaceWithProperties", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 596 - }, - "name": "obj", - "type": { - "fqn": "jsii-calc.IInterfaceWithProperties" - } - } - ] - }, - "jsii-calc.VariadicInvoker": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.VariadicInvoker", - "initializer": { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 680 - }, - "parameters": [ - { - "name": "method", - "type": { - "fqn": "jsii-calc.VariadicMethod" - } - } - ] - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 679 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 682 - }, - "name": "asArray", - "parameters": [ - { - "name": "values", - "type": { - "primitive": "number" - }, - "variadic": true - } - ], - "returns": { - "type": { - "collection": { - "elementtype": { - "primitive": "number" - }, - "kind": "array" - } - } - }, - "variadic": true - } - ], - "name": "VariadicInvoker" - }, - "jsii-calc.VariadicMethod": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.VariadicMethod", - "initializer": { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 666 - }, - "parameters": [ - { - "docs": { - "summary": "a prefix that will be use for all values returned by \`#asArray\`." - }, - "name": "prefix", - "type": { - "primitive": "number" - }, - "variadic": true - } - ], - "variadic": true - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 660 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 674 - }, - "name": "asArray", - "parameters": [ - { - "docs": { - "summary": "the first element of the array to be returned (after the \`prefix\` provided at construction time)." - }, - "name": "first", - "type": { - "primitive": "number" - } - }, - { - "docs": { - "summary": "other elements to be included in the array." - }, - "name": "others", - "type": { - "primitive": "number" - }, - "variadic": true - } - ], - "returns": { - "type": { - "collection": { - "elementtype": { - "primitive": "number" - }, - "kind": "array" - } - } - }, - "variadic": true - } - ], - "name": "VariadicMethod" - }, - "jsii-calc.VirtualMethodPlayground": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.VirtualMethodPlayground", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 450 - }, - "methods": [ - { - "async": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 475 - }, - "name": "overrideMeAsync", - "parameters": [ - { - "name": "index", - "type": { - "primitive": "number" - } - } - ], - "returns": { - "type": { - "primitive": "number" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 479 - }, - "name": "overrideMeSync", - "parameters": [ - { - "name": "index", - "type": { - "primitive": "number" - } - } - ], - "returns": { - "type": { - "primitive": "number" - } - } - }, - { - "async": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 457 - }, - "name": "parallelSumAsync", - "parameters": [ - { - "name": "count", - "type": { - "primitive": "number" - } - } - ], - "returns": { - "type": { - "primitive": "number" - } - } - }, - { - "async": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 451 - }, - "name": "serialSumAsync", - "parameters": [ - { - "name": "count", - "type": { - "primitive": "number" - } - } - ], - "returns": { - "type": { - "primitive": "number" - } - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 467 - }, - "name": "sumSync", - "parameters": [ - { - "name": "count", - "type": { - "primitive": "number" - } - } - ], - "returns": { - "type": { - "primitive": "number" - } - } - } - ], - "name": "VirtualMethodPlayground" - }, - "jsii-calc.VoidCallback": { - "abstract": true, - "assembly": "jsii-calc", - "docs": { - "remarks": "- Implement \`overrideMe\` (method does not have to do anything).\\n- Invoke \`callMe\`\\n- Verify that \`methodWasCalled\` is \`true\`.", - "stability": "stable", - "summary": "This test is used to validate the runtimes can return correctly from a void callback." - }, - "fqn": "jsii-calc.VoidCallback", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1922 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1927 - }, - "name": "callMe" - }, - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1931 - }, - "name": "overrideMe", - "protected": true - } - ], - "name": "VoidCallback", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1924 - }, - "name": "methodWasCalled", - "type": { - "primitive": "boolean" - } - } - ] - }, - "jsii-calc.WithPrivatePropertyInConstructor": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "Verifies that private property declarations in constructor arguments are hidden." - }, - "fqn": "jsii-calc.WithPrivatePropertyInConstructor", - "initializer": { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1938 - }, - "parameters": [ - { - "name": "privateField", - "optional": true, - "type": { - "primitive": "string" - } - } - ] - }, - "kind": "class", - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1937 - }, - "name": "WithPrivatePropertyInConstructor", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/compliance.ts", - "line": 1940 - }, - "name": "success", - "type": { - "primitive": "boolean" - } - } - ] - }, - "jsii-calc.composition.CompositeOperation": { - "abstract": true, - "assembly": "jsii-calc", - "base": "@scope/jsii-calc-lib.Operation", - "docs": { - "stability": "stable", - "summary": "Abstract operation composed from an expression of other operations." - }, - "fqn": "jsii-calc.composition.CompositeOperation", - "initializer": {}, - "kind": "class", - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 146 - }, - "methods": [ - { - "docs": { - "stability": "stable", - "summary": "(deprecated) String representation of the value." - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 172 - }, - "name": "toString", - "overrides": "@scope/jsii-calc-lib.Operation", - "returns": { - "type": { - "primitive": "string" - } - } - } - ], - "name": "CompositeOperation", - "namespace": "composition", - "properties": [ - { - "abstract": true, - "docs": { - "remarks": "Must be implemented by derived classes.", - "stability": "stable", - "summary": "The expression that this operation consists of." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 170 - }, - "name": "expression", - "type": { - "fqn": "@scope/jsii-calc-lib.NumericValue" - } - }, - { - "docs": { - "stability": "stable", - "summary": "(deprecated) The value." - }, - "immutable": true, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 162 - }, - "name": "value", - "overrides": "@scope/jsii-calc-lib.NumericValue", - "type": { - "primitive": "number" - } - }, - { - "docs": { - "stability": "stable", - "summary": "A set of postfixes to include in a decorated .toString()." - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 160 - }, - "name": "decorationPostfixes", - "type": { - "collection": { - "elementtype": { - "primitive": "string" - }, - "kind": "array" - } - } - }, - { - "docs": { - "stability": "stable", - "summary": "A set of prefixes to include in a decorated .toString()." - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 155 - }, - "name": "decorationPrefixes", - "type": { - "collection": { - "elementtype": { - "primitive": "string" - }, - "kind": "array" - } - } - }, - { - "docs": { - "stability": "stable", - "summary": "The .toString() style." - }, - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 150 - }, - "name": "stringStyle", - "type": { - "fqn": "jsii-calc.composition.CompositeOperation.CompositionStringStyle" - } - } - ] - }, - "jsii-calc.composition.CompositeOperation.CompositionStringStyle": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "Style of .toString() output for CompositeOperation." - }, - "fqn": "jsii-calc.composition.CompositeOperation.CompositionStringStyle", - "kind": "enum", - "locationInModule": { - "filename": "lib/calculator.ts", - "line": 192 - }, - "members": [ - { - "docs": { - "stability": "stable", - "summary": "Normal string expression." - }, - "name": "NORMAL" - }, - { - "docs": { - "stability": "stable", - "summary": "Decorated string expression." - }, - "name": "DECORATED" - } - ], - "name": "CompositionStringStyle", - "namespace": "composition.CompositeOperation" - }, - "jsii-calc.submodule.MyClass": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.submodule.MyClass", - "initializer": { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/submodule/my-class.ts", - "line": 11 - }, - "parameters": [ - { - "name": "props", - "type": { - "fqn": "jsii-calc.submodule.child.SomeStruct" - } - } - ] - }, - "interfaces": [ - "jsii-calc.submodule.nested_submodule.deeplyNested.INamespaced" - ], - "kind": "class", - "locationInModule": { - "filename": "lib/submodule/my-class.ts", - "line": 5 - }, - "name": "MyClass", - "namespace": "submodule", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/submodule/my-class.ts", - "line": 8 - }, - "name": "awesomeness", - "type": { - "fqn": "jsii-calc.submodule.child.Awesomeness" - } - }, - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/submodule/my-class.ts", - "line": 6 - }, - "name": "definedAt", - "overrides": "jsii-calc.submodule.nested_submodule.deeplyNested.INamespaced", - "type": { - "primitive": "string" - } - }, - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/submodule/my-class.ts", - "line": 7 - }, - "name": "goodness", - "type": { - "fqn": "jsii-calc.submodule.child.Goodness" - } - }, - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/submodule/my-class.ts", - "line": 11 - }, - "name": "props", - "type": { - "fqn": "jsii-calc.submodule.child.SomeStruct" - } - }, - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/submodule/my-class.ts", - "line": 9 - }, - "name": "allTypes", - "optional": true, - "type": { - "fqn": "jsii-calc.AllTypes" - } - } - ] - }, - "jsii-calc.submodule.back_references.MyClassReference": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.submodule.back_references.MyClassReference", - "kind": "interface", - "locationInModule": { - "filename": "lib/submodule/refers-to-parent/index.ts", - "line": 3 - }, - "name": "MyClassReference", - "namespace": "submodule.back_references", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/submodule/refers-to-parent/index.ts", - "line": 4 - }, - "name": "reference", - "type": { - "fqn": "jsii-calc.submodule.MyClass" - } - } - ] - }, - "jsii-calc.submodule.child.Awesomeness": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.submodule.child.Awesomeness", - "kind": "enum", - "locationInModule": { - "filename": "lib/submodule/child/index.ts", - "line": 15 - }, - "members": [ - { - "docs": { - "stability": "stable", - "summary": "It was awesome!" - }, - "name": "AWESOME" - } - ], - "name": "Awesomeness", - "namespace": "submodule.child" - }, - "jsii-calc.submodule.child.Goodness": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.submodule.child.Goodness", - "kind": "enum", - "locationInModule": { - "filename": "lib/submodule/child/index.ts", - "line": 5 - }, - "members": [ - { - "docs": { - "stability": "stable", - "summary": "It's pretty good." - }, - "name": "PRETTY_GOOD" - }, - { - "docs": { - "stability": "stable", - "summary": "It's really good." - }, - "name": "REALLY_GOOD" - }, - { - "docs": { - "stability": "stable", - "summary": "It's amazingly good." - }, - "name": "AMAZINGLY_GOOD" - } - ], - "name": "Goodness", - "namespace": "submodule.child" - }, - "jsii-calc.submodule.child.InnerClass": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.submodule.child.InnerClass", - "initializer": { - "docs": { - "stability": "stable" - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/submodule/child/index.ts", - "line": 37 - }, - "name": "InnerClass", - "namespace": "submodule.child", - "properties": [ - { - "const": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/submodule/child/index.ts", - "line": 38 - }, - "name": "staticProp", - "static": true, - "type": { - "fqn": "jsii-calc.submodule.child.SomeStruct" - } - } - ] - }, - "jsii-calc.submodule.child.KwargsProps": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.submodule.child.KwargsProps", - "interfaces": [ - "jsii-calc.submodule.child.SomeStruct" - ], - "kind": "interface", - "locationInModule": { - "filename": "lib/submodule/child/index.ts", - "line": 41 - }, - "name": "KwargsProps", - "namespace": "submodule.child", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/submodule/child/index.ts", - "line": 42 - }, - "name": "extra", - "optional": true, - "type": { - "primitive": "string" - } - } - ] - }, - "jsii-calc.submodule.child.OuterClass": { - "assembly": "jsii-calc", - "docs": { - "see": ": https://github.com/aws/jsii/pull/1706", - "stability": "stable", - "summary": "Checks that classes can self-reference during initialization." - }, - "fqn": "jsii-calc.submodule.child.OuterClass", - "initializer": { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/submodule/child/index.ts", - "line": 27 - } - }, - "kind": "class", - "locationInModule": { - "filename": "lib/submodule/child/index.ts", - "line": 24 - }, - "name": "OuterClass", - "namespace": "submodule.child", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/submodule/child/index.ts", - "line": 25 - }, - "name": "innerClass", - "type": { - "fqn": "jsii-calc.submodule.child.InnerClass" - } - } - ] - }, - "jsii-calc.submodule.child.SomeEnum": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.submodule.child.SomeEnum", - "kind": "enum", - "locationInModule": { - "filename": "lib/submodule/child/index.ts", - "line": 31 - }, - "members": [ - { - "docs": { - "stability": "stable" - }, - "name": "SOME" - } - ], - "name": "SomeEnum", - "namespace": "submodule.child" - }, - "jsii-calc.submodule.child.SomeStruct": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.submodule.child.SomeStruct", - "kind": "interface", - "locationInModule": { - "filename": "lib/submodule/child/index.ts", - "line": 34 - }, - "name": "SomeStruct", - "namespace": "submodule.child", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/submodule/child/index.ts", - "line": 35 - }, - "name": "prop", - "type": { - "fqn": "jsii-calc.submodule.child.SomeEnum" - } - } - ] - }, - "jsii-calc.submodule.child.Structure": { - "assembly": "jsii-calc", - "datatype": true, - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.submodule.child.Structure", - "kind": "interface", - "locationInModule": { - "filename": "lib/submodule/child/index.ts", - "line": 1 - }, - "name": "Structure", - "namespace": "submodule.child", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/submodule/child/index.ts", - "line": 2 - }, - "name": "bool", - "type": { - "primitive": "boolean" - } - } - ] - }, - "jsii-calc.submodule.isolated.Kwargs": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable", - "summary": "Ensures imports are correctly registered for kwargs lifted properties from super-structs." - }, - "fqn": "jsii-calc.submodule.isolated.Kwargs", - "kind": "class", - "locationInModule": { - "filename": "lib/submodule/isolated.ts", - "line": 7 - }, - "methods": [ - { - "docs": { - "stability": "stable" - }, - "locationInModule": { - "filename": "lib/submodule/isolated.ts", - "line": 8 - }, - "name": "method", - "parameters": [ - { - "name": "props", - "optional": true, - "type": { - "fqn": "jsii-calc.submodule.child.KwargsProps" - } - } - ], - "returns": { - "type": { - "primitive": "boolean" - } - }, - "static": true - } - ], - "name": "Kwargs", - "namespace": "submodule.isolated" - }, - "jsii-calc.submodule.nested_submodule.Namespaced": { - "abstract": true, - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.submodule.nested_submodule.Namespaced", - "interfaces": [ - "jsii-calc.submodule.nested_submodule.deeplyNested.INamespaced" - ], - "kind": "class", - "locationInModule": { - "filename": "lib/submodule/nested_submodule.ts", - "line": 12 - }, - "name": "Namespaced", - "namespace": "submodule.nested_submodule", - "properties": [ - { - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/submodule/nested_submodule.ts", - "line": 13 - }, - "name": "definedAt", - "overrides": "jsii-calc.submodule.nested_submodule.deeplyNested.INamespaced", - "type": { - "primitive": "string" - } - }, - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/submodule/nested_submodule.ts", - "line": 14 - }, - "name": "goodness", - "type": { - "fqn": "jsii-calc.submodule.child.Goodness" - } - } - ] - }, - "jsii-calc.submodule.nested_submodule.deeplyNested.INamespaced": { - "assembly": "jsii-calc", - "docs": { - "stability": "stable" - }, - "fqn": "jsii-calc.submodule.nested_submodule.deeplyNested.INamespaced", - "kind": "interface", - "locationInModule": { - "filename": "lib/submodule/nested_submodule.ts", - "line": 7 - }, - "name": "INamespaced", - "namespace": "submodule.nested_submodule.deeplyNested", - "properties": [ - { - "abstract": true, - "docs": { - "stability": "stable" - }, - "immutable": true, - "locationInModule": { - "filename": "lib/submodule/nested_submodule.ts", - "line": 8 - }, - "name": "definedAt", - "type": { - "primitive": "string" - } - } - ] - } - }, - "version": "0.0.0", - "fingerprint": "azqNkkl+/4FLzTVBLkOyHcokS4xLoYtHsri0z9kIehQ=" -} - + โ”—โ” ๐Ÿ“„ jsii-calc-3.20.120.tgz `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon.JSII.Tests.CalculatorPackageId.csproj 1`] = ` @@ -17586,7 +2060,7 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu https://sdk-for-net.amazonwebservices.com/images/AWSLogo128x128.png Amazon.JSII.Tests.CalculatorPackageId Apache-2.0 - 0.0.0 + 3.20.120 Amazon Web Services Amazon Web Services @@ -17605,16 +2079,18 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.Calcu netcoreapp3.1 - + - - - + + + 0612,0618 + + 0108,0109 @@ -17664,12 +2140,32 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { get => GetInstanceProperty()!; } - } -} -`; + [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.AbstractClass), fullyQualifiedName: "jsii-calc.AbstractClass")] + new internal sealed class _Proxy : Amazon.JSII.Tests.CalculatorNamespace.AbstractClass + { + private _Proxy(ByRefValue reference): base(reference) + { + } -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractClassBase.cs 1`] = ` + [JsiiProperty(name: "abstractProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] + public override string AbstractProperty + { + get => GetInstanceProperty()!; + } + + [JsiiMethod(name: "abstractMethod", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"name\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] + public override string AbstractMethod(string name) + { + return InvokeInstanceMethod(new System.Type[]{typeof(string)}, new object[]{name})!; + } + } + } +} + +`; + +exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractClassBase.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 @@ -17702,59 +2198,19 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { get; } - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractClassBaseProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.AbstractClassBase), fullyQualifiedName: "jsii-calc.AbstractClassBase")] - internal sealed class AbstractClassBaseProxy : Amazon.JSII.Tests.CalculatorNamespace.AbstractClassBase - { - private AbstractClassBaseProxy(ByRefValue reference): base(reference) - { - } - - [JsiiProperty(name: "abstractProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] - public override string AbstractProperty - { - get => GetInstanceProperty()!; - } - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractClassProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.AbstractClass), fullyQualifiedName: "jsii-calc.AbstractClass")] - internal sealed class AbstractClassProxy : Amazon.JSII.Tests.CalculatorNamespace.AbstractClass - { - private AbstractClassProxy(ByRefValue reference): base(reference) - { - } - - [JsiiProperty(name: "abstractProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] - public override string AbstractProperty + [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.AbstractClassBase), fullyQualifiedName: "jsii-calc.AbstractClassBase")] + internal sealed class _Proxy : Amazon.JSII.Tests.CalculatorNamespace.AbstractClassBase { - get => GetInstanceProperty()!; - } + private _Proxy(ByRefValue reference): base(reference) + { + } - [JsiiMethod(name: "abstractMethod", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"name\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] - public override string AbstractMethod(string name) - { - return InvokeInstanceMethod(new System.Type[]{typeof(string)}, new object[]{name})!; + [JsiiProperty(name: "abstractProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] + public override string AbstractProperty + { + get => GetInstanceProperty()!; + } } } } @@ -17858,37 +2314,27 @@ namespace Amazon.JSII.Tests.CalculatorNamespace get; set; } - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractSuiteProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - /// Ensures abstract members implementations correctly register overrides in various languages. - [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.AbstractSuite), fullyQualifiedName: "jsii-calc.AbstractSuite")] - internal sealed class AbstractSuiteProxy : Amazon.JSII.Tests.CalculatorNamespace.AbstractSuite - { - private AbstractSuiteProxy(ByRefValue reference): base(reference) + /// Ensures abstract members implementations correctly register overrides in various languages. + [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.AbstractSuite), fullyQualifiedName: "jsii-calc.AbstractSuite")] + internal sealed class _Proxy : Amazon.JSII.Tests.CalculatorNamespace.AbstractSuite { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - [JsiiProperty(name: "property", typeJson: "{\\"primitive\\":\\"string\\"}")] - protected override string Property - { - get => GetInstanceProperty()!; - set => SetInstanceProperty(value); - } + [JsiiProperty(name: "property", typeJson: "{\\"primitive\\":\\"string\\"}")] + protected override string Property + { + get => GetInstanceProperty()!; + set => SetInstanceProperty(value); + } - [JsiiMethod(name: "someMethod", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"str\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] - protected override string SomeMethod(string str) - { - return InvokeInstanceMethod(new System.Type[]{typeof(string)}, new object[]{str})!; + [JsiiMethod(name: "someMethod", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"str\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] + protected override string SomeMethod(string str) + { + return InvokeInstanceMethod(new System.Type[]{typeof(string)}, new object[]{str})!; + } } } } @@ -18549,46 +2995,36 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { get => GetInstanceProperty()!; } - } -} - -`; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/BinaryOperationProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - /// Represents an operation with two operands. - [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.BinaryOperation), fullyQualifiedName: "jsii-calc.BinaryOperation")] - internal sealed class BinaryOperationProxy : Amazon.JSII.Tests.CalculatorNamespace.BinaryOperation - { - private BinaryOperationProxy(ByRefValue reference): base(reference) + /// Represents an operation with two operands. + [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.BinaryOperation), fullyQualifiedName: "jsii-calc.BinaryOperation")] + internal sealed class _Proxy : Amazon.JSII.Tests.CalculatorNamespace.BinaryOperation { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - /// (deprecated) The value. - /// - /// Stability: Deprecated - /// - [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"number\\"}")] - [System.Obsolete()] - public override double Value - { - get => GetInstanceProperty()!; - } + /// (deprecated) The value. + /// + /// Stability: Deprecated + /// + [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"number\\"}")] + [System.Obsolete()] + public override double Value + { + get => GetInstanceProperty()!; + } - /// (deprecated) String representation of the value. - /// - /// Stability: Deprecated - /// - [JsiiMethod(name: "toString", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", isOverride: true)] - [System.Obsolete()] - public override string ToString() - { - return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; + /// (deprecated) String representation of the value. + /// + /// Stability: Deprecated + /// + [JsiiMethod(name: "toString", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", isOverride: true)] + [System.Obsolete()] + public override string ToString() + { + return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; + } } } } @@ -18636,33 +3072,23 @@ namespace Amazon.JSII.Tests.CalculatorNamespace [JsiiMethod(name: "giveItBack", returnsJson: "{\\"type\\":{\\"primitive\\":\\"any\\"}}", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"the value that should be returned.\\"},\\"name\\":\\"value\\",\\"type\\":{\\"primitive\\":\\"any\\"}}]")] public abstract object GiveItBack(object @value); - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/BurriedAnonymousObjectProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - /// See https://github.com/aws/aws-cdk/issues/7977. - [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.BurriedAnonymousObject), fullyQualifiedName: "jsii-calc.BurriedAnonymousObject")] - internal sealed class BurriedAnonymousObjectProxy : Amazon.JSII.Tests.CalculatorNamespace.BurriedAnonymousObject - { - private BurriedAnonymousObjectProxy(ByRefValue reference): base(reference) + /// See https://github.com/aws/aws-cdk/issues/7977. + [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.BurriedAnonymousObject), fullyQualifiedName: "jsii-calc.BurriedAnonymousObject")] + internal sealed class _Proxy : Amazon.JSII.Tests.CalculatorNamespace.BurriedAnonymousObject { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - /// Implement this method and have it return it's parameter. - /// the value that should be returned. - /// \`value\` - [JsiiMethod(name: "giveItBack", returnsJson: "{\\"type\\":{\\"primitive\\":\\"any\\"}}", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"the value that should be returned.\\"},\\"name\\":\\"value\\",\\"type\\":{\\"primitive\\":\\"any\\"}}]")] - public override object GiveItBack(object @value) - { - return InvokeInstanceMethod(new System.Type[]{typeof(object)}, new object[]{@value})!; + /// Implement this method and have it return it's parameter. + /// the value that should be returned. + /// \`value\` + [JsiiMethod(name: "giveItBack", returnsJson: "{\\"type\\":{\\"primitive\\":\\"any\\"}}", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"the value that should be returned.\\"},\\"name\\":\\"value\\",\\"type\\":{\\"primitive\\":\\"any\\"}}]")] + public override object GiveItBack(object @value) + { + return InvokeInstanceMethod(new System.Type[]{typeof(object)}, new object[]{@value})!; + } } } } @@ -18847,49 +3273,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/CalculatorPropsProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - /// Properties for Calculator. - [JsiiTypeProxy(nativeType: typeof(ICalculatorProps), fullyQualifiedName: "jsii-calc.CalculatorProps")] - internal sealed class CalculatorPropsProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.ICalculatorProps - { - private CalculatorPropsProxy(ByRefValue reference): base(reference) - { - } - - /// The initial value of the calculator. - /// - /// NOTE: Any number works here, it's fine. - /// - /// Default: 0 - /// - [JsiiOptional] - [JsiiProperty(name: "initialValue", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] - public double? InitialValue - { - get => GetInstanceProperty(); - } - - /// The maximum value the calculator can store. - /// - /// Default: none - /// - [JsiiOptional] - [JsiiProperty(name: "maximumValue", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] - public double? MaximumValue - { - get => GetInstanceProperty(); - } - } -} - -`; - exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ChildStruct982.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -18920,36 +3303,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ChildStruct982Proxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(IChildStruct982), fullyQualifiedName: "jsii-calc.ChildStruct982")] - internal sealed class ChildStruct982Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IChildStruct982 - { - private ChildStruct982Proxy(ByRefValue reference): base(reference) - { - } - - [JsiiProperty(name: "bar", typeJson: "{\\"primitive\\":\\"number\\"}")] - public double Bar - { - get => GetInstanceProperty()!; - } - - [JsiiProperty(name: "foo", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string Foo - { - get => GetInstanceProperty()!; - } - } -} - -`; - exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassThatImplementsTheInternalInterface.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -19407,34 +3760,24 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.Composition [JsiiEnumMember(name: "DECORATED")] DECORATED } - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Composition/CompositeOperationProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 -namespace Amazon.JSII.Tests.CalculatorNamespace.Composition -{ - /// Abstract operation composed from an expression of other operations. - [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Composition.CompositeOperation), fullyQualifiedName: "jsii-calc.composition.CompositeOperation")] - internal sealed class CompositeOperationProxy : Amazon.JSII.Tests.CalculatorNamespace.Composition.CompositeOperation - { - private CompositeOperationProxy(ByRefValue reference): base(reference) + /// Abstract operation composed from an expression of other operations. + [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Composition.CompositeOperation), fullyQualifiedName: "jsii-calc.composition.CompositeOperation")] + internal sealed class _Proxy : Amazon.JSII.Tests.CalculatorNamespace.Composition.CompositeOperation { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - /// The expression that this operation consists of. - /// - /// Must be implemented by derived classes. - /// - [JsiiProperty(name: "expression", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}")] - public override Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue Expression - { - get => GetInstanceProperty()!; + /// The expression that this operation consists of. + /// + /// Must be implemented by derived classes. + /// + [JsiiProperty(name: "expression", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}")] + public override Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue Expression + { + get => GetInstanceProperty()!; + } } } } @@ -19515,49 +3858,24 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConfusingToJacksonStructProxy.cs 1`] = ` +exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConstructorPassesThisOut.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { - [JsiiTypeProxy(nativeType: typeof(IConfusingToJacksonStruct), fullyQualifiedName: "jsii-calc.ConfusingToJacksonStruct")] - internal sealed class ConfusingToJacksonStructProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IConfusingToJacksonStruct + [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.ConstructorPassesThisOut), fullyQualifiedName: "jsii-calc.ConstructorPassesThisOut", parametersJson: "[{\\"name\\":\\"consumer\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.PartiallyInitializedThisConsumer\\"}}]")] + public class ConstructorPassesThisOut : DeputyBase { - private ConfusingToJacksonStructProxy(ByRefValue reference): base(reference) + public ConstructorPassesThisOut(Amazon.JSII.Tests.CalculatorNamespace.PartiallyInitializedThisConsumer consumer): base(new DeputyProps(new object?[]{consumer})) { } - [JsiiOptional] - [JsiiProperty(name: "unionProperty", typeJson: "{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"@scope/jsii-calc-lib.IFriendly\\"},{\\"collection\\":{\\"elementtype\\":{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"@scope/jsii-calc-lib.IFriendly\\"},{\\"fqn\\":\\"jsii-calc.AbstractClass\\"}]}},\\"kind\\":\\"array\\"}}]}}", isOptional: true)] - public object? UnionProperty - { - get => GetInstanceProperty(); - } - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConstructorPassesThisOut.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.ConstructorPassesThisOut), fullyQualifiedName: "jsii-calc.ConstructorPassesThisOut", parametersJson: "[{\\"name\\":\\"consumer\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.PartiallyInitializedThisConsumer\\"}}]")] - public class ConstructorPassesThisOut : DeputyBase - { - public ConstructorPassesThisOut(Amazon.JSII.Tests.CalculatorNamespace.PartiallyInitializedThisConsumer consumer): base(new DeputyProps(new object?[]{consumer})) - { - } - - /// 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 ConstructorPassesThisOut(ByRefValue reference): base(reference) + /// 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 ConstructorPassesThisOut(ByRefValue reference): base(reference) { } @@ -20134,38 +4452,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DeprecatedStructProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - /// - /// Stability: Deprecated - /// - [JsiiTypeProxy(nativeType: typeof(IDeprecatedStruct), fullyQualifiedName: "jsii-calc.DeprecatedStruct")] - [System.Obsolete("it just wraps a string")] - internal sealed class DeprecatedStructProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IDeprecatedStruct - { - private DeprecatedStructProxy(ByRefValue reference): base(reference) - { - } - - /// - /// Stability: Deprecated - /// - [JsiiProperty(name: "readonlyProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] - [System.Obsolete("well, yeah")] - public string ReadonlyProperty - { - get => GetInstanceProperty()!; - } - } -} - -`; - exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DerivedClassHasNoProperties/Base.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -20337,99 +4623,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DerivedStructProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - /// A struct which derives from another struct. - [JsiiTypeProxy(nativeType: typeof(IDerivedStruct), fullyQualifiedName: "jsii-calc.DerivedStruct")] - internal sealed class DerivedStructProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IDerivedStruct - { - private DerivedStructProxy(ByRefValue reference): base(reference) - { - } - - [JsiiProperty(name: "anotherRequired", typeJson: "{\\"primitive\\":\\"date\\"}")] - public System.DateTime AnotherRequired - { - get => GetInstanceProperty()!; - } - - [JsiiProperty(name: "bool", typeJson: "{\\"primitive\\":\\"boolean\\"}")] - public bool Bool - { - get => GetInstanceProperty()!; - } - - /// An example of a non primitive property. - [JsiiProperty(name: "nonPrimitive", typeJson: "{\\"fqn\\":\\"jsii-calc.DoubleTrouble\\"}")] - public Amazon.JSII.Tests.CalculatorNamespace.DoubleTrouble NonPrimitive - { - get => GetInstanceProperty()!; - } - - /// This is optional. - [JsiiOptional] - [JsiiProperty(name: "anotherOptional", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"},\\"kind\\":\\"map\\"}}", isOptional: true)] - public System.Collections.Generic.IDictionary? AnotherOptional - { - get => GetInstanceProperty?>(); - } - - [JsiiOptional] - [JsiiProperty(name: "optionalAny", typeJson: "{\\"primitive\\":\\"any\\"}", isOptional: true)] - public object? OptionalAny - { - get => GetInstanceProperty(); - } - - [JsiiOptional] - [JsiiProperty(name: "optionalArray", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"string\\"},\\"kind\\":\\"array\\"}}", isOptional: true)] - public string[]? OptionalArray - { - get => GetInstanceProperty(); - } - - /// (deprecated) An awesome number value. - /// - /// Stability: Deprecated - /// - [JsiiProperty(name: "anumber", typeJson: "{\\"primitive\\":\\"number\\"}")] - [System.Obsolete()] - public double Anumber - { - get => GetInstanceProperty()!; - } - - /// (deprecated) A string value. - /// - /// Stability: Deprecated - /// - [JsiiProperty(name: "astring", typeJson: "{\\"primitive\\":\\"string\\"}")] - [System.Obsolete()] - public string Astring - { - get => GetInstanceProperty()!; - } - - /// - /// Stability: Deprecated - /// - [JsiiOptional] - [JsiiProperty(name: "firstOptional", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"string\\"},\\"kind\\":\\"array\\"}}", isOptional: true)] - [System.Obsolete()] - public string[]? FirstOptional - { - get => GetInstanceProperty(); - } - } -} - -`; - exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceBaseLevelStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -20453,30 +4646,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceBaseLevelStructProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(IDiamondInheritanceBaseLevelStruct), fullyQualifiedName: "jsii-calc.DiamondInheritanceBaseLevelStruct")] - internal sealed class DiamondInheritanceBaseLevelStructProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IDiamondInheritanceBaseLevelStruct - { - private DiamondInheritanceBaseLevelStructProxy(ByRefValue reference): base(reference) - { - } - - [JsiiProperty(name: "baseLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string BaseLevelProperty - { - get => GetInstanceProperty()!; - } - } -} - -`; - exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceFirstMidLevelStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -20507,36 +4676,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceFirstMidLevelStructProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(IDiamondInheritanceFirstMidLevelStruct), fullyQualifiedName: "jsii-calc.DiamondInheritanceFirstMidLevelStruct")] - internal sealed class DiamondInheritanceFirstMidLevelStructProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IDiamondInheritanceFirstMidLevelStruct - { - private DiamondInheritanceFirstMidLevelStructProxy(ByRefValue reference): base(reference) - { - } - - [JsiiProperty(name: "firstMidLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string FirstMidLevelProperty - { - get => GetInstanceProperty()!; - } - - [JsiiProperty(name: "baseLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string BaseLevelProperty - { - get => GetInstanceProperty()!; - } - } -} - -`; - exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceSecondMidLevelStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -20567,36 +4706,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceSecondMidLevelStructProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(IDiamondInheritanceSecondMidLevelStruct), fullyQualifiedName: "jsii-calc.DiamondInheritanceSecondMidLevelStruct")] - internal sealed class DiamondInheritanceSecondMidLevelStructProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IDiamondInheritanceSecondMidLevelStruct - { - private DiamondInheritanceSecondMidLevelStructProxy(ByRefValue reference): base(reference) - { - } - - [JsiiProperty(name: "secondMidLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string SecondMidLevelProperty - { - get => GetInstanceProperty()!; - } - - [JsiiProperty(name: "baseLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string BaseLevelProperty - { - get => GetInstanceProperty()!; - } - } -} - -`; - exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceTopLevelStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -20641,48 +4750,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceTopLevelStructProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(IDiamondInheritanceTopLevelStruct), fullyQualifiedName: "jsii-calc.DiamondInheritanceTopLevelStruct")] - internal sealed class DiamondInheritanceTopLevelStructProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IDiamondInheritanceTopLevelStruct - { - private DiamondInheritanceTopLevelStructProxy(ByRefValue reference): base(reference) - { - } - - [JsiiProperty(name: "topLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string TopLevelProperty - { - get => GetInstanceProperty()!; - } - - [JsiiProperty(name: "firstMidLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string FirstMidLevelProperty - { - get => GetInstanceProperty()!; - } - - [JsiiProperty(name: "baseLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string BaseLevelProperty - { - get => GetInstanceProperty()!; - } - - [JsiiProperty(name: "secondMidLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string SecondMidLevelProperty - { - get => GetInstanceProperty()!; - } - } -} - -`; - exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DisappointingCollectionSource.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -20840,6 +4907,16 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// /// Multiple paragraphs are separated by an empty line. /// + /// + /// // Example automatically generated. See https://github.com/aws/jsii/issues/826 + /// int x = 12 + 44; + /// string s1 = "string"; + /// string s2 = @"string + /// with new newlines";// see https://github.com/aws/jsii/issues/2569 + /// string s3 = @"string + /// with + /// new lines"; + /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.DocumentedClass), fullyQualifiedName: "jsii-calc.DocumentedClass")] public class DocumentedClass : DeputyBase { @@ -20863,10 +4940,10 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// Greet the indicated person. /// The person to be greeted. - /// A number that everyone knows very well + /// A number that everyone knows very well and represents the answer + /// to the ultimate question /// - /// This will print out a friendly greeting intended for - /// the indicated person. + /// This will print out a friendly greeting intended for the indicated person. /// [JsiiMethod(name: "greet", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"The person to be greeted.\\"},\\"name\\":\\"greetee\\",\\"optional\\":true,\\"type\\":{\\"fqn\\":\\"jsii-calc.Greetee\\"}}]")] public virtual double Greet(Amazon.JSII.Tests.CalculatorNamespace.IGreetee? greetee = null) @@ -21111,33 +5188,23 @@ namespace Amazon.JSII.Tests.CalculatorNamespace [JsiiMethod(name: "repeat", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"the value to return.\\"},\\"name\\":\\"word\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] public abstract string Repeat(string word); - } -} - -`; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/EntropyProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - /// This class is used to validate that serialization and deserialization does not interpret ISO-8601-formatted timestampts to the native date/time object, as the jsii protocol has a $jsii$date wrapper for this purpose (node's JSON parsing does *NOT* detect dates automatically in this way, so host libraries should not either). - [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Entropy), fullyQualifiedName: "jsii-calc.Entropy")] - internal sealed class EntropyProxy : Amazon.JSII.Tests.CalculatorNamespace.Entropy - { - private EntropyProxy(ByRefValue reference): base(reference) + /// This class is used to validate that serialization and deserialization does not interpret ISO-8601-formatted timestampts to the native date/time object, as the jsii protocol has a $jsii$date wrapper for this purpose (node's JSON parsing does *NOT* detect dates automatically in this way, so host libraries should not either). + [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Entropy), fullyQualifiedName: "jsii-calc.Entropy")] + internal sealed class _Proxy : Amazon.JSII.Tests.CalculatorNamespace.Entropy { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - /// Implement this method such that it returns \`word\`. - /// the value to return. - /// \`word\`. - [JsiiMethod(name: "repeat", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"the value to return.\\"},\\"name\\":\\"word\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] - public override string Repeat(string word) - { - return InvokeInstanceMethod(new System.Type[]{typeof(string)}, new object[]{word})!; + /// Implement this method such that it returns \`word\`. + /// the value to return. + /// \`word\`. + [JsiiMethod(name: "repeat", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"the value to return.\\"},\\"name\\":\\"word\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] + public override string Repeat(string word) + { + return InvokeInstanceMethod(new System.Type[]{typeof(string)}, new object[]{word})!; + } } } } @@ -21271,38 +5338,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/EraseUndefinedHashValuesOptionsProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(IEraseUndefinedHashValuesOptions), fullyQualifiedName: "jsii-calc.EraseUndefinedHashValuesOptions")] - internal sealed class EraseUndefinedHashValuesOptionsProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IEraseUndefinedHashValuesOptions - { - private EraseUndefinedHashValuesOptionsProxy(ByRefValue reference): base(reference) - { - } - - [JsiiOptional] - [JsiiProperty(name: "option1", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] - public string? Option1 - { - get => GetInstanceProperty(); - } - - [JsiiOptional] - [JsiiProperty(name: "option2", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] - public string? Option2 - { - get => GetInstanceProperty(); - } - } -} - -`; - exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExperimentalClass.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -21428,36 +5463,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExperimentalStructProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - /// - /// Stability: Experimental - /// - [JsiiTypeProxy(nativeType: typeof(IExperimentalStruct), fullyQualifiedName: "jsii-calc.ExperimentalStruct")] - internal sealed class ExperimentalStructProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IExperimentalStruct - { - private ExperimentalStructProxy(ByRefValue reference): base(reference) - { - } - - /// - /// Stability: Experimental - /// - [JsiiProperty(name: "readonlyProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string ReadonlyProperty - { - get => GetInstanceProperty()!; - } - } -} - -`; - exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExportedBaseClass.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -21526,36 +5531,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExtendsInternalInterfaceProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(IExtendsInternalInterface), fullyQualifiedName: "jsii-calc.ExtendsInternalInterface")] - internal sealed class ExtendsInternalInterfaceProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IExtendsInternalInterface - { - private ExtendsInternalInterfaceProxy(ByRefValue reference): base(reference) - { - } - - [JsiiProperty(name: "boom", typeJson: "{\\"primitive\\":\\"boolean\\"}")] - public bool Boom - { - get => GetInstanceProperty()!; - } - - [JsiiProperty(name: "prop", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string Prop - { - get => GetInstanceProperty()!; - } - } -} - -`; - exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExternalClass.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -21681,36 +5656,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExternalStructProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - /// - /// External: true - /// - [JsiiTypeProxy(nativeType: typeof(IExternalStruct), fullyQualifiedName: "jsii-calc.ExternalStruct")] - internal sealed class ExternalStructProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IExternalStruct - { - private ExternalStructProxy(ByRefValue reference): base(reference) - { - } - - /// - /// External: true - /// - [JsiiProperty(name: "readonlyProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string ReadonlyProperty - { - get => GetInstanceProperty()!; - } - } -} - -`; - exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/GiveMeStructs.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -21797,36 +5742,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/GreeteeProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - /// These are some arguments you can pass to a method. - [JsiiTypeProxy(nativeType: typeof(IGreetee), fullyQualifiedName: "jsii-calc.Greetee")] - internal sealed class GreeteeProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IGreetee - { - private GreeteeProxy(ByRefValue reference): base(reference) - { - } - - /// The name of the greetee. - /// - /// Default: world - /// - [JsiiOptional] - [JsiiProperty(name: "name", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] - public string? Name - { - get => GetInstanceProperty(); - } - } -} - -`; - exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/GreetingAugmenter.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -21880,36 +5795,26 @@ namespace Amazon.JSII.Tests.CalculatorNamespace Amazon.JSII.Tests.CalculatorNamespace.Implementation ProvideAsClass(); [JsiiMethod(name: "provideAsInterface", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.IAnonymouslyImplementMe\\"}}")] Amazon.JSII.Tests.CalculatorNamespace.IAnonymouslyImplementMe ProvideAsInterface(); - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IAnonymousImplementationProviderProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - /// We can return an anonymous interface implementation from an override without losing the interface declarations. - [JsiiTypeProxy(nativeType: typeof(IAnonymousImplementationProvider), fullyQualifiedName: "jsii-calc.IAnonymousImplementationProvider")] - internal sealed class IAnonymousImplementationProviderProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IAnonymousImplementationProvider - { - private IAnonymousImplementationProviderProxy(ByRefValue reference): base(reference) + /// We can return an anonymous interface implementation from an override without losing the interface declarations. + [JsiiTypeProxy(nativeType: typeof(IAnonymousImplementationProvider), fullyQualifiedName: "jsii-calc.IAnonymousImplementationProvider")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IAnonymousImplementationProvider { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - [JsiiMethod(name: "provideAsClass", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.Implementation\\"}}")] - public Amazon.JSII.Tests.CalculatorNamespace.Implementation ProvideAsClass() - { - return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; - } + [JsiiMethod(name: "provideAsClass", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.Implementation\\"}}")] + public Amazon.JSII.Tests.CalculatorNamespace.Implementation ProvideAsClass() + { + return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; + } - [JsiiMethod(name: "provideAsInterface", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.IAnonymouslyImplementMe\\"}}")] - public Amazon.JSII.Tests.CalculatorNamespace.IAnonymouslyImplementMe ProvideAsInterface() - { - return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; + [JsiiMethod(name: "provideAsInterface", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.IAnonymouslyImplementMe\\"}}")] + public Amazon.JSII.Tests.CalculatorNamespace.IAnonymouslyImplementMe ProvideAsInterface() + { + return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; + } } } } @@ -21933,35 +5838,25 @@ namespace Amazon.JSII.Tests.CalculatorNamespace } [JsiiMethod(name: "verb", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] string Verb(); - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IAnonymouslyImplementMeProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(IAnonymouslyImplementMe), fullyQualifiedName: "jsii-calc.IAnonymouslyImplementMe")] - internal sealed class IAnonymouslyImplementMeProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IAnonymouslyImplementMe - { - private IAnonymouslyImplementMeProxy(ByRefValue reference): base(reference) + [JsiiTypeProxy(nativeType: typeof(IAnonymouslyImplementMe), fullyQualifiedName: "jsii-calc.IAnonymouslyImplementMe")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IAnonymouslyImplementMe { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"number\\"}")] - public double Value - { - get => GetInstanceProperty()!; - } + [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"number\\"}")] + public double Value + { + get => GetInstanceProperty()!; + } - [JsiiMethod(name: "verb", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] - public string Verb() - { - return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; + [JsiiMethod(name: "verb", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] + public string Verb() + { + return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; + } } } } @@ -21984,30 +5879,20 @@ namespace Amazon.JSII.Tests.CalculatorNamespace get; set; } - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IAnotherPublicInterfaceProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(IAnotherPublicInterface), fullyQualifiedName: "jsii-calc.IAnotherPublicInterface")] - internal sealed class IAnotherPublicInterfaceProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IAnotherPublicInterface - { - private IAnotherPublicInterfaceProxy(ByRefValue reference): base(reference) + [JsiiTypeProxy(nativeType: typeof(IAnotherPublicInterface), fullyQualifiedName: "jsii-calc.IAnotherPublicInterface")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IAnotherPublicInterface { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - [JsiiProperty(name: "a", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string A - { - get => GetInstanceProperty()!; - set => SetInstanceProperty(value); + [JsiiProperty(name: "a", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string A + { + get => GetInstanceProperty()!; + set => SetInstanceProperty(value); + } } } } @@ -22026,29 +5911,19 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiMethod(name: "ring")] void Ring(); - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IBellProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(IBell), fullyQualifiedName: "jsii-calc.IBell")] - internal sealed class IBellProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IBell - { - private IBellProxy(ByRefValue reference): base(reference) + [JsiiTypeProxy(nativeType: typeof(IBell), fullyQualifiedName: "jsii-calc.IBell")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IBell { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - [JsiiMethod(name: "ring")] - public void Ring() - { - InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); + [JsiiMethod(name: "ring")] + public void Ring() + { + InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); + } } } } @@ -22068,46 +5943,36 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiMethod(name: "yourTurn", parametersJson: "[{\\"name\\":\\"bell\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.IBell\\"}}]")] void YourTurn(Amazon.JSII.Tests.CalculatorNamespace.IBell bell); + + /// Takes the object parameter as an interface. + [JsiiTypeProxy(nativeType: typeof(IBellRinger), fullyQualifiedName: "jsii-calc.IBellRinger")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IBellRinger + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiMethod(name: "yourTurn", parametersJson: "[{\\"name\\":\\"bell\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.IBell\\"}}]")] + public void YourTurn(Amazon.JSII.Tests.CalculatorNamespace.IBell bell) + { + InvokeInstanceVoidMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.IBell)}, new object[]{bell}); + } + } } } `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IBellRingerProxy.cs 1`] = ` +exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ICalculatorProps.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { - /// Takes the object parameter as an interface. - [JsiiTypeProxy(nativeType: typeof(IBellRinger), fullyQualifiedName: "jsii-calc.IBellRinger")] - internal sealed class IBellRingerProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IBellRinger - { - private IBellRingerProxy(ByRefValue reference): base(reference) - { - } - - [JsiiMethod(name: "yourTurn", parametersJson: "[{\\"name\\":\\"bell\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.IBell\\"}}]")] - public void YourTurn(Amazon.JSII.Tests.CalculatorNamespace.IBell bell) - { - InvokeInstanceVoidMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.IBell)}, new object[]{bell}); - } - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ICalculatorProps.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - /// Properties for Calculator. - [JsiiInterface(nativeType: typeof(ICalculatorProps), fullyQualifiedName: "jsii-calc.CalculatorProps")] - public interface ICalculatorProps + /// Properties for Calculator. + [JsiiInterface(nativeType: typeof(ICalculatorProps), fullyQualifiedName: "jsii-calc.CalculatorProps")] + public interface ICalculatorProps { /// The initial value of the calculator. /// @@ -22138,6 +6003,39 @@ namespace Amazon.JSII.Tests.CalculatorNamespace return null; } } + + /// Properties for Calculator. + [JsiiTypeProxy(nativeType: typeof(ICalculatorProps), fullyQualifiedName: "jsii-calc.CalculatorProps")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.ICalculatorProps + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + /// The initial value of the calculator. + /// + /// NOTE: Any number works here, it's fine. + /// + /// Default: 0 + /// + [JsiiOptional] + [JsiiProperty(name: "initialValue", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] + public double? InitialValue + { + get => GetInstanceProperty(); + } + + /// The maximum value the calculator can store. + /// + /// Default: none + /// + [JsiiOptional] + [JsiiProperty(name: "maximumValue", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] + public double? MaximumValue + { + get => GetInstanceProperty(); + } + } } } @@ -22158,6 +6056,26 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { get; } + + [JsiiTypeProxy(nativeType: typeof(IChildStruct982), fullyQualifiedName: "jsii-calc.ChildStruct982")] + new internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IChildStruct982 + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiProperty(name: "bar", typeJson: "{\\"primitive\\":\\"number\\"}")] + public double Bar + { + get => GetInstanceProperty()!; + } + + [JsiiProperty(name: "foo", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string Foo + { + get => GetInstanceProperty()!; + } + } } } @@ -22176,30 +6094,20 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiMethod(name: "yourTurn", parametersJson: "[{\\"name\\":\\"bell\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.Bell\\"}}]")] void YourTurn(Amazon.JSII.Tests.CalculatorNamespace.Bell bell); - } -} -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IConcreteBellRingerProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - /// Takes the object parameter as a calss. - [JsiiTypeProxy(nativeType: typeof(IConcreteBellRinger), fullyQualifiedName: "jsii-calc.IConcreteBellRinger")] - internal sealed class IConcreteBellRingerProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IConcreteBellRinger - { - private IConcreteBellRingerProxy(ByRefValue reference): base(reference) + /// Takes the object parameter as a calss. + [JsiiTypeProxy(nativeType: typeof(IConcreteBellRinger), fullyQualifiedName: "jsii-calc.IConcreteBellRinger")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IConcreteBellRinger { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - [JsiiMethod(name: "yourTurn", parametersJson: "[{\\"name\\":\\"bell\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.Bell\\"}}]")] - public void YourTurn(Amazon.JSII.Tests.CalculatorNamespace.Bell bell) - { - InvokeInstanceVoidMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.Bell)}, new object[]{bell}); + [JsiiMethod(name: "yourTurn", parametersJson: "[{\\"name\\":\\"bell\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.Bell\\"}}]")] + public void YourTurn(Amazon.JSII.Tests.CalculatorNamespace.Bell bell) + { + InvokeInstanceVoidMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.Bell)}, new object[]{bell}); + } } } } @@ -22225,6 +6133,21 @@ namespace Amazon.JSII.Tests.CalculatorNamespace return null; } } + + [JsiiTypeProxy(nativeType: typeof(IConfusingToJacksonStruct), fullyQualifiedName: "jsii-calc.ConfusingToJacksonStruct")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IConfusingToJacksonStruct + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiOptional] + [JsiiProperty(name: "unionProperty", typeJson: "{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"@scope/jsii-calc-lib.IFriendly\\"},{\\"collection\\":{\\"elementtype\\":{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"@scope/jsii-calc-lib.IFriendly\\"},{\\"fqn\\":\\"jsii-calc.AbstractClass\\"}]}},\\"kind\\":\\"array\\"}}]}}", isOptional: true)] + public object? UnionProperty + { + get => GetInstanceProperty(); + } + } } } @@ -22267,49 +6190,39 @@ namespace Amazon.JSII.Tests.CalculatorNamespace [JsiiMethod(name: "method")] [System.Obsolete("services no purpose")] void Method(); - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDeprecatedInterfaceProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - /// - /// Stability: Deprecated - /// - [JsiiTypeProxy(nativeType: typeof(IDeprecatedInterface), fullyQualifiedName: "jsii-calc.IDeprecatedInterface")] - [System.Obsolete("useless interface")] - internal sealed class IDeprecatedInterfaceProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IDeprecatedInterface - { - private IDeprecatedInterfaceProxy(ByRefValue reference): base(reference) - { - } /// /// Stability: Deprecated /// - [JsiiOptional] - [JsiiProperty(name: "mutableProperty", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] - [System.Obsolete("could be better")] - public double? MutableProperty + [JsiiTypeProxy(nativeType: typeof(IDeprecatedInterface), fullyQualifiedName: "jsii-calc.IDeprecatedInterface")] + [System.Obsolete("useless interface")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IDeprecatedInterface { - get => GetInstanceProperty(); - set => SetInstanceProperty(value); - } + private _Proxy(ByRefValue reference): base(reference) + { + } - /// - /// Stability: Deprecated - /// - [JsiiMethod(name: "method")] - [System.Obsolete("services no purpose")] - public void Method() - { - InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); + /// + /// Stability: Deprecated + /// + [JsiiOptional] + [JsiiProperty(name: "mutableProperty", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] + [System.Obsolete("could be better")] + public double? MutableProperty + { + get => GetInstanceProperty(); + set => SetInstanceProperty(value); + } + + /// + /// Stability: Deprecated + /// + [JsiiMethod(name: "method")] + [System.Obsolete("services no purpose")] + public void Method() + { + InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); + } } } } @@ -22339,6 +6252,28 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { get; } + + /// + /// Stability: Deprecated + /// + [JsiiTypeProxy(nativeType: typeof(IDeprecatedStruct), fullyQualifiedName: "jsii-calc.DeprecatedStruct")] + [System.Obsolete("it just wraps a string")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IDeprecatedStruct + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + /// + /// Stability: Deprecated + /// + [JsiiProperty(name: "readonlyProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] + [System.Obsolete("well, yeah")] + public string ReadonlyProperty + { + get => GetInstanceProperty()!; + } + } } } @@ -22404,6 +6339,89 @@ namespace Amazon.JSII.Tests.CalculatorNamespace return null; } } + + /// A struct which derives from another struct. + [JsiiTypeProxy(nativeType: typeof(IDerivedStruct), fullyQualifiedName: "jsii-calc.DerivedStruct")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IDerivedStruct + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiProperty(name: "anotherRequired", typeJson: "{\\"primitive\\":\\"date\\"}")] + public System.DateTime AnotherRequired + { + get => GetInstanceProperty()!; + } + + [JsiiProperty(name: "bool", typeJson: "{\\"primitive\\":\\"boolean\\"}")] + public bool Bool + { + get => GetInstanceProperty()!; + } + + /// An example of a non primitive property. + [JsiiProperty(name: "nonPrimitive", typeJson: "{\\"fqn\\":\\"jsii-calc.DoubleTrouble\\"}")] + public Amazon.JSII.Tests.CalculatorNamespace.DoubleTrouble NonPrimitive + { + get => GetInstanceProperty()!; + } + + /// This is optional. + [JsiiOptional] + [JsiiProperty(name: "anotherOptional", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"},\\"kind\\":\\"map\\"}}", isOptional: true)] + public System.Collections.Generic.IDictionary? AnotherOptional + { + get => GetInstanceProperty?>(); + } + + [JsiiOptional] + [JsiiProperty(name: "optionalAny", typeJson: "{\\"primitive\\":\\"any\\"}", isOptional: true)] + public object? OptionalAny + { + get => GetInstanceProperty(); + } + + [JsiiOptional] + [JsiiProperty(name: "optionalArray", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"string\\"},\\"kind\\":\\"array\\"}}", isOptional: true)] + public string[]? OptionalArray + { + get => GetInstanceProperty(); + } + + /// (deprecated) An awesome number value. + /// + /// Stability: Deprecated + /// + [JsiiProperty(name: "anumber", typeJson: "{\\"primitive\\":\\"number\\"}")] + [System.Obsolete()] + public double Anumber + { + get => GetInstanceProperty()!; + } + + /// (deprecated) A string value. + /// + /// Stability: Deprecated + /// + [JsiiProperty(name: "astring", typeJson: "{\\"primitive\\":\\"string\\"}")] + [System.Obsolete()] + public string Astring + { + get => GetInstanceProperty()!; + } + + /// + /// Stability: Deprecated + /// + [JsiiOptional] + [JsiiProperty(name: "firstOptional", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"string\\"},\\"kind\\":\\"array\\"}}", isOptional: true)] + [System.Obsolete()] + public string[]? FirstOptional + { + get => GetInstanceProperty(); + } + } } } @@ -22424,6 +6442,20 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { get; } + + [JsiiTypeProxy(nativeType: typeof(IDiamondInheritanceBaseLevelStruct), fullyQualifiedName: "jsii-calc.DiamondInheritanceBaseLevelStruct")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IDiamondInheritanceBaseLevelStruct + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiProperty(name: "baseLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string BaseLevelProperty + { + get => GetInstanceProperty()!; + } + } } } @@ -22444,6 +6476,26 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { get; } + + [JsiiTypeProxy(nativeType: typeof(IDiamondInheritanceFirstMidLevelStruct), fullyQualifiedName: "jsii-calc.DiamondInheritanceFirstMidLevelStruct")] + new internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IDiamondInheritanceFirstMidLevelStruct + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiProperty(name: "firstMidLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string FirstMidLevelProperty + { + get => GetInstanceProperty()!; + } + + [JsiiProperty(name: "baseLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string BaseLevelProperty + { + get => GetInstanceProperty()!; + } + } } } @@ -22464,6 +6516,26 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { get; } + + [JsiiTypeProxy(nativeType: typeof(IDiamondInheritanceSecondMidLevelStruct), fullyQualifiedName: "jsii-calc.DiamondInheritanceSecondMidLevelStruct")] + new internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IDiamondInheritanceSecondMidLevelStruct + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiProperty(name: "secondMidLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string SecondMidLevelProperty + { + get => GetInstanceProperty()!; + } + + [JsiiProperty(name: "baseLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string BaseLevelProperty + { + get => GetInstanceProperty()!; + } + } } } @@ -22484,6 +6556,38 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { get; } + + [JsiiTypeProxy(nativeType: typeof(IDiamondInheritanceTopLevelStruct), fullyQualifiedName: "jsii-calc.DiamondInheritanceTopLevelStruct")] + new internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IDiamondInheritanceTopLevelStruct + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiProperty(name: "topLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string TopLevelProperty + { + get => GetInstanceProperty()!; + } + + [JsiiProperty(name: "firstMidLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string FirstMidLevelProperty + { + get => GetInstanceProperty()!; + } + + [JsiiProperty(name: "baseLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string BaseLevelProperty + { + get => GetInstanceProperty()!; + } + + [JsiiProperty(name: "secondMidLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string SecondMidLevelProperty + { + get => GetInstanceProperty()!; + } + } } } @@ -22518,6 +6622,28 @@ namespace Amazon.JSII.Tests.CalculatorNamespace return null; } } + + [JsiiTypeProxy(nativeType: typeof(IEraseUndefinedHashValuesOptions), fullyQualifiedName: "jsii-calc.EraseUndefinedHashValuesOptions")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IEraseUndefinedHashValuesOptions + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiOptional] + [JsiiProperty(name: "option1", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] + public string? Option1 + { + get => GetInstanceProperty(); + } + + [JsiiOptional] + [JsiiProperty(name: "option2", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] + public string? Option2 + { + get => GetInstanceProperty(); + } + } } } @@ -22557,46 +6683,36 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// [JsiiMethod(name: "method")] void Method(); - } -} - -`; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExperimentalInterfaceProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; + /// + /// Stability: Experimental + /// + [JsiiTypeProxy(nativeType: typeof(IExperimentalInterface), fullyQualifiedName: "jsii-calc.IExperimentalInterface")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IExperimentalInterface + { + private _Proxy(ByRefValue reference): base(reference) + { + } -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - /// - /// Stability: Experimental - /// - [JsiiTypeProxy(nativeType: typeof(IExperimentalInterface), fullyQualifiedName: "jsii-calc.IExperimentalInterface")] - internal sealed class IExperimentalInterfaceProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IExperimentalInterface - { - private IExperimentalInterfaceProxy(ByRefValue reference): base(reference) - { - } - - /// - /// Stability: Experimental - /// - [JsiiOptional] - [JsiiProperty(name: "mutableProperty", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] - public double? MutableProperty - { - get => GetInstanceProperty(); - set => SetInstanceProperty(value); - } + /// + /// Stability: Experimental + /// + [JsiiOptional] + [JsiiProperty(name: "mutableProperty", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] + public double? MutableProperty + { + get => GetInstanceProperty(); + set => SetInstanceProperty(value); + } - /// - /// Stability: Experimental - /// - [JsiiMethod(name: "method")] - public void Method() - { - InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); + /// + /// Stability: Experimental + /// + [JsiiMethod(name: "method")] + public void Method() + { + InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); + } } } } @@ -22624,6 +6740,26 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { get; } + + /// + /// Stability: Experimental + /// + [JsiiTypeProxy(nativeType: typeof(IExperimentalStruct), fullyQualifiedName: "jsii-calc.ExperimentalStruct")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IExperimentalStruct + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + /// + /// Stability: Experimental + /// + [JsiiProperty(name: "readonlyProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string ReadonlyProperty + { + get => GetInstanceProperty()!; + } + } } } @@ -22650,6 +6786,26 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { get; } + + [JsiiTypeProxy(nativeType: typeof(IExtendsInternalInterface), fullyQualifiedName: "jsii-calc.ExtendsInternalInterface")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IExtendsInternalInterface + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiProperty(name: "boom", typeJson: "{\\"primitive\\":\\"boolean\\"}")] + public bool Boom + { + get => GetInstanceProperty()!; + } + + [JsiiProperty(name: "prop", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string Prop + { + get => GetInstanceProperty()!; + } + } } } @@ -22677,36 +6833,26 @@ namespace Amazon.JSII.Tests.CalculatorNamespace get; set; } - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExtendsPrivateInterfaceProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(IExtendsPrivateInterface), fullyQualifiedName: "jsii-calc.IExtendsPrivateInterface")] - internal sealed class IExtendsPrivateInterfaceProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IExtendsPrivateInterface - { - private IExtendsPrivateInterfaceProxy(ByRefValue reference): base(reference) + [JsiiTypeProxy(nativeType: typeof(IExtendsPrivateInterface), fullyQualifiedName: "jsii-calc.IExtendsPrivateInterface")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IExtendsPrivateInterface { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - [JsiiProperty(name: "moreThings", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"string\\"},\\"kind\\":\\"array\\"}}")] - public string[] MoreThings - { - get => GetInstanceProperty()!; - } + [JsiiProperty(name: "moreThings", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"string\\"},\\"kind\\":\\"array\\"}}")] + public string[] MoreThings + { + get => GetInstanceProperty()!; + } - [JsiiProperty(name: "private", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string Private - { - get => GetInstanceProperty()!; - set => SetInstanceProperty(value); + [JsiiProperty(name: "private", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string Private + { + get => GetInstanceProperty()!; + set => SetInstanceProperty(value); + } } } } @@ -22747,46 +6893,36 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// [JsiiMethod(name: "method")] void Method(); - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExternalInterfaceProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - /// - /// External: true - /// - [JsiiTypeProxy(nativeType: typeof(IExternalInterface), fullyQualifiedName: "jsii-calc.IExternalInterface")] - internal sealed class IExternalInterfaceProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IExternalInterface - { - private IExternalInterfaceProxy(ByRefValue reference): base(reference) - { - } /// /// External: true /// - [JsiiOptional] - [JsiiProperty(name: "mutableProperty", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] - public double? MutableProperty + [JsiiTypeProxy(nativeType: typeof(IExternalInterface), fullyQualifiedName: "jsii-calc.IExternalInterface")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IExternalInterface { - get => GetInstanceProperty(); - set => SetInstanceProperty(value); - } + private _Proxy(ByRefValue reference): base(reference) + { + } - /// - /// External: true - /// - [JsiiMethod(name: "method")] - public void Method() - { - InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); + /// + /// External: true + /// + [JsiiOptional] + [JsiiProperty(name: "mutableProperty", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] + public double? MutableProperty + { + get => GetInstanceProperty(); + set => SetInstanceProperty(value); + } + + /// + /// External: true + /// + [JsiiMethod(name: "method")] + public void Method() + { + InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); + } } } } @@ -22814,6 +6950,26 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { get; } + + /// + /// External: true + /// + [JsiiTypeProxy(nativeType: typeof(IExternalStruct), fullyQualifiedName: "jsii-calc.ExternalStruct")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IExternalStruct + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + /// + /// External: true + /// + [JsiiProperty(name: "readonlyProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string ReadonlyProperty + { + get => GetInstanceProperty()!; + } + } } } @@ -22837,50 +6993,40 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// A goodbye blessing. [JsiiMethod(name: "goodbye", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] string Goodbye(); - } -} -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IFriendlierProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - /// Even friendlier classes can implement this interface. - [JsiiTypeProxy(nativeType: typeof(IFriendlier), fullyQualifiedName: "jsii-calc.IFriendlier")] - internal sealed class IFriendlierProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IFriendlier - { - private IFriendlierProxy(ByRefValue reference): base(reference) + /// Even friendlier classes can implement this interface. + [JsiiTypeProxy(nativeType: typeof(IFriendlier), fullyQualifiedName: "jsii-calc.IFriendlier")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IFriendlier { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - /// Say farewell. - [JsiiMethod(name: "farewell", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] - public string Farewell() - { - return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; - } + /// Say farewell. + [JsiiMethod(name: "farewell", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] + public string Farewell() + { + return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; + } - /// Say goodbye. - /// A goodbye blessing. - [JsiiMethod(name: "goodbye", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] - public string Goodbye() - { - return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; - } + /// Say goodbye. + /// A goodbye blessing. + [JsiiMethod(name: "goodbye", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] + public string Goodbye() + { + return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; + } - /// (deprecated) Say hello! - /// - /// Stability: Deprecated - /// - [JsiiMethod(name: "hello", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] - [System.Obsolete()] - public string Hello() - { - return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; + /// (deprecated) Say hello! + /// + /// Stability: Deprecated + /// + [JsiiMethod(name: "hello", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] + [System.Obsolete()] + public string Hello() + { + return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; + } } } } @@ -22897,42 +7043,32 @@ namespace Amazon.JSII.Tests.CalculatorNamespace [JsiiInterface(nativeType: typeof(IFriendlyRandomGenerator), fullyQualifiedName: "jsii-calc.IFriendlyRandomGenerator")] public interface IFriendlyRandomGenerator : Amazon.JSII.Tests.CalculatorNamespace.IRandomNumberGenerator, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IFriendly { - } -} - -`; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IFriendlyRandomGeneratorProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(IFriendlyRandomGenerator), fullyQualifiedName: "jsii-calc.IFriendlyRandomGenerator")] - internal sealed class IFriendlyRandomGeneratorProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IFriendlyRandomGenerator - { - private IFriendlyRandomGeneratorProxy(ByRefValue reference): base(reference) + [JsiiTypeProxy(nativeType: typeof(IFriendlyRandomGenerator), fullyQualifiedName: "jsii-calc.IFriendlyRandomGenerator")] + new internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IFriendlyRandomGenerator { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - /// Returns another random number. - /// A random number. - [JsiiMethod(name: "next", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}")] - public double Next() - { - return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; - } + /// Returns another random number. + /// A random number. + [JsiiMethod(name: "next", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}")] + public double Next() + { + return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; + } - /// (deprecated) Say hello! - /// - /// Stability: Deprecated - /// - [JsiiMethod(name: "hello", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] - [System.Obsolete()] - public string Hello() - { - return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; + /// (deprecated) Say hello! + /// + /// Stability: Deprecated + /// + [JsiiMethod(name: "hello", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] + [System.Obsolete()] + public string Hello() + { + return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; + } } } } @@ -22963,6 +7099,26 @@ namespace Amazon.JSII.Tests.CalculatorNamespace return null; } } + + /// These are some arguments you can pass to a method. + [JsiiTypeProxy(nativeType: typeof(IGreetee), fullyQualifiedName: "jsii-calc.Greetee")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IGreetee + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + /// The name of the greetee. + /// + /// Default: world + /// + [JsiiOptional] + [JsiiProperty(name: "name", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] + public string? Name + { + get => GetInstanceProperty(); + } + } } } @@ -22983,6 +7139,32 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { get; } + + [JsiiTypeProxy(nativeType: typeof(IImplictBaseOfBase), fullyQualifiedName: "jsii-calc.ImplictBaseOfBase")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IImplictBaseOfBase + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiProperty(name: "goo", typeJson: "{\\"primitive\\":\\"date\\"}")] + public System.DateTime Goo + { + get => GetInstanceProperty()!; + } + + [JsiiProperty(name: "bar", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string Bar + { + get => GetInstanceProperty()!; + } + + [JsiiProperty(name: "foo", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-base-of-base.Very\\"}")] + public Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.Very Foo + { + get => GetInstanceProperty()!; + } + } } } @@ -23004,30 +7186,20 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { get; } - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceImplementedByAbstractClassProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - /// awslabs/jsii#220 Abstract return type. - [JsiiTypeProxy(nativeType: typeof(IInterfaceImplementedByAbstractClass), fullyQualifiedName: "jsii-calc.IInterfaceImplementedByAbstractClass")] - internal sealed class IInterfaceImplementedByAbstractClassProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IInterfaceImplementedByAbstractClass - { - private IInterfaceImplementedByAbstractClassProxy(ByRefValue reference): base(reference) + /// awslabs/jsii#220 Abstract return type. + [JsiiTypeProxy(nativeType: typeof(IInterfaceImplementedByAbstractClass), fullyQualifiedName: "jsii-calc.IInterfaceImplementedByAbstractClass")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IInterfaceImplementedByAbstractClass { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - [JsiiProperty(name: "propFromInterface", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string PropFromInterface - { - get => GetInstanceProperty()!; + [JsiiProperty(name: "propFromInterface", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string PropFromInterface + { + get => GetInstanceProperty()!; + } } } } @@ -23050,42 +7222,32 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { get; } - } -} -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceThatShouldNotBeADataTypeProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - /// 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. - [JsiiTypeProxy(nativeType: typeof(IInterfaceThatShouldNotBeADataType), fullyQualifiedName: "jsii-calc.IInterfaceThatShouldNotBeADataType")] - internal sealed class IInterfaceThatShouldNotBeADataTypeProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IInterfaceThatShouldNotBeADataType - { - private IInterfaceThatShouldNotBeADataTypeProxy(ByRefValue reference): base(reference) + /// 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. + [JsiiTypeProxy(nativeType: typeof(IInterfaceThatShouldNotBeADataType), fullyQualifiedName: "jsii-calc.IInterfaceThatShouldNotBeADataType")] + new internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IInterfaceThatShouldNotBeADataType { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - [JsiiProperty(name: "otherValue", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string OtherValue - { - get => GetInstanceProperty()!; - } + [JsiiProperty(name: "otherValue", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string OtherValue + { + get => GetInstanceProperty()!; + } - [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string Value - { - get => GetInstanceProperty()!; - } + [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string Value + { + get => GetInstanceProperty()!; + } - [JsiiMethod(name: "doThings")] - public void DoThings() - { - InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); + [JsiiMethod(name: "doThings")] + public void DoThings() + { + InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); + } } } } @@ -23104,29 +7266,19 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiMethod(name: "visible")] void Visible(); - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithInternalProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(IInterfaceWithInternal), fullyQualifiedName: "jsii-calc.IInterfaceWithInternal")] - internal sealed class IInterfaceWithInternalProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IInterfaceWithInternal - { - private IInterfaceWithInternalProxy(ByRefValue reference): base(reference) + [JsiiTypeProxy(nativeType: typeof(IInterfaceWithInternal), fullyQualifiedName: "jsii-calc.IInterfaceWithInternal")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IInterfaceWithInternal { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - [JsiiMethod(name: "visible")] - public void Visible() - { - InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); + [JsiiMethod(name: "visible")] + public void Visible() + { + InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); + } } } } @@ -23150,35 +7302,25 @@ namespace Amazon.JSII.Tests.CalculatorNamespace } [JsiiMethod(name: "doThings")] void DoThings(); - } -} - -`; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithMethodsProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(IInterfaceWithMethods), fullyQualifiedName: "jsii-calc.IInterfaceWithMethods")] - internal sealed class IInterfaceWithMethodsProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IInterfaceWithMethods - { - private IInterfaceWithMethodsProxy(ByRefValue reference): base(reference) + [JsiiTypeProxy(nativeType: typeof(IInterfaceWithMethods), fullyQualifiedName: "jsii-calc.IInterfaceWithMethods")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IInterfaceWithMethods { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string Value - { - get => GetInstanceProperty()!; - } + [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string Value + { + get => GetInstanceProperty()!; + } - [JsiiMethod(name: "doThings")] - public void DoThings() - { - InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); + [JsiiMethod(name: "doThings")] + public void DoThings() + { + InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); + } } } } @@ -23198,30 +7340,20 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiMethod(name: "hello", parametersJson: "[{\\"name\\":\\"arg1\\",\\"type\\":{\\"primitive\\":\\"string\\"}},{\\"name\\":\\"arg2\\",\\"optional\\":true,\\"type\\":{\\"primitive\\":\\"number\\"}}]")] void Hello(string arg1, double? arg2 = null); - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithOptionalMethodArgumentsProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - /// awslabs/jsii#175 Interface proxies (and builders) do not respect optional arguments in methods. - [JsiiTypeProxy(nativeType: typeof(IInterfaceWithOptionalMethodArguments), fullyQualifiedName: "jsii-calc.IInterfaceWithOptionalMethodArguments")] - internal sealed class IInterfaceWithOptionalMethodArgumentsProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IInterfaceWithOptionalMethodArguments - { - private IInterfaceWithOptionalMethodArgumentsProxy(ByRefValue reference): base(reference) + /// awslabs/jsii#175 Interface proxies (and builders) do not respect optional arguments in methods. + [JsiiTypeProxy(nativeType: typeof(IInterfaceWithOptionalMethodArguments), fullyQualifiedName: "jsii-calc.IInterfaceWithOptionalMethodArguments")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IInterfaceWithOptionalMethodArguments { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - [JsiiMethod(name: "hello", parametersJson: "[{\\"name\\":\\"arg1\\",\\"type\\":{\\"primitive\\":\\"string\\"}},{\\"name\\":\\"arg2\\",\\"optional\\":true,\\"type\\":{\\"primitive\\":\\"number\\"}}]")] - public void Hello(string arg1, double? arg2 = null) - { - InvokeInstanceVoidMethod(new System.Type[]{typeof(string), typeof(double)}, new object?[]{arg1, arg2}); + [JsiiMethod(name: "hello", parametersJson: "[{\\"name\\":\\"arg1\\",\\"type\\":{\\"primitive\\":\\"string\\"}},{\\"name\\":\\"arg2\\",\\"optional\\":true,\\"type\\":{\\"primitive\\":\\"number\\"}}]")] + public void Hello(string arg1, double? arg2 = null) + { + InvokeInstanceVoidMethod(new System.Type[]{typeof(string), typeof(double)}, new object?[]{arg1, arg2}); + } } } } @@ -23250,6 +7382,27 @@ namespace Amazon.JSII.Tests.CalculatorNamespace get; set; } + + [JsiiTypeProxy(nativeType: typeof(IInterfaceWithProperties), fullyQualifiedName: "jsii-calc.IInterfaceWithProperties")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IInterfaceWithProperties + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiProperty(name: "readOnlyString", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string ReadOnlyString + { + get => GetInstanceProperty()!; + } + + [JsiiProperty(name: "readWriteString", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string ReadWriteString + { + get => GetInstanceProperty()!; + set => SetInstanceProperty(value); + } + } } } @@ -23271,74 +7424,33 @@ namespace Amazon.JSII.Tests.CalculatorNamespace get; set; } - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithPropertiesExtensionProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(IInterfaceWithPropertiesExtension), fullyQualifiedName: "jsii-calc.IInterfaceWithPropertiesExtension")] - internal sealed class IInterfaceWithPropertiesExtensionProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IInterfaceWithPropertiesExtension - { - private IInterfaceWithPropertiesExtensionProxy(ByRefValue reference): base(reference) - { - } - [JsiiProperty(name: "foo", typeJson: "{\\"primitive\\":\\"number\\"}")] - public double Foo - { - get => GetInstanceProperty()!; - set => SetInstanceProperty(value); - } - - [JsiiProperty(name: "readOnlyString", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string ReadOnlyString - { - get => GetInstanceProperty()!; - } - - [JsiiProperty(name: "readWriteString", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string ReadWriteString + [JsiiTypeProxy(nativeType: typeof(IInterfaceWithPropertiesExtension), fullyQualifiedName: "jsii-calc.IInterfaceWithPropertiesExtension")] + new internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IInterfaceWithPropertiesExtension { - get => GetInstanceProperty()!; - set => SetInstanceProperty(value); - } - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithPropertiesProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 + private _Proxy(ByRefValue reference): base(reference) + { + } -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(IInterfaceWithProperties), fullyQualifiedName: "jsii-calc.IInterfaceWithProperties")] - internal sealed class IInterfaceWithPropertiesProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IInterfaceWithProperties - { - private IInterfaceWithPropertiesProxy(ByRefValue reference): base(reference) - { - } + [JsiiProperty(name: "foo", typeJson: "{\\"primitive\\":\\"number\\"}")] + public double Foo + { + get => GetInstanceProperty()!; + set => SetInstanceProperty(value); + } - [JsiiProperty(name: "readOnlyString", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string ReadOnlyString - { - get => GetInstanceProperty()!; - } + [JsiiProperty(name: "readOnlyString", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string ReadOnlyString + { + get => GetInstanceProperty()!; + } - [JsiiProperty(name: "readWriteString", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string ReadWriteString - { - get => GetInstanceProperty()!; - set => SetInstanceProperty(value); + [JsiiProperty(name: "readWriteString", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string ReadWriteString + { + get => GetInstanceProperty()!; + set => SetInstanceProperty(value); + } } } } @@ -23364,53 +7476,43 @@ namespace Amazon.JSII.Tests.CalculatorNamespace void Bar(); [JsiiMethod(name: "baz")] void Baz(); - } -} - -`; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJSII417DerivedProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(IJSII417Derived), fullyQualifiedName: "jsii-calc.IJSII417Derived")] - internal sealed class IJSII417DerivedProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IJSII417Derived - { - private IJSII417DerivedProxy(ByRefValue reference): base(reference) + [JsiiTypeProxy(nativeType: typeof(IJSII417Derived), fullyQualifiedName: "jsii-calc.IJSII417Derived")] + new internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IJSII417Derived { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - [JsiiProperty(name: "property", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string Property - { - get => GetInstanceProperty()!; - } + [JsiiProperty(name: "property", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string Property + { + get => GetInstanceProperty()!; + } - [JsiiProperty(name: "hasRoot", typeJson: "{\\"primitive\\":\\"boolean\\"}")] - public bool HasRoot - { - get => GetInstanceProperty()!; - } + [JsiiProperty(name: "hasRoot", typeJson: "{\\"primitive\\":\\"boolean\\"}")] + public bool HasRoot + { + get => GetInstanceProperty()!; + } - [JsiiMethod(name: "bar")] - public void Bar() - { - InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); - } + [JsiiMethod(name: "bar")] + public void Bar() + { + InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); + } - [JsiiMethod(name: "baz")] - public void Baz() - { - InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); - } + [JsiiMethod(name: "baz")] + public void Baz() + { + InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); + } - [JsiiMethod(name: "foo")] - public void Foo() - { - InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); + [JsiiMethod(name: "foo")] + public void Foo() + { + InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); + } } } } @@ -23434,35 +7536,25 @@ namespace Amazon.JSII.Tests.CalculatorNamespace } [JsiiMethod(name: "foo")] void Foo(); - } -} -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJSII417PublicBaseOfBaseProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(IJSII417PublicBaseOfBase), fullyQualifiedName: "jsii-calc.IJSII417PublicBaseOfBase")] - internal sealed class IJSII417PublicBaseOfBaseProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IJSII417PublicBaseOfBase - { - private IJSII417PublicBaseOfBaseProxy(ByRefValue reference): base(reference) + [JsiiTypeProxy(nativeType: typeof(IJSII417PublicBaseOfBase), fullyQualifiedName: "jsii-calc.IJSII417PublicBaseOfBase")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IJSII417PublicBaseOfBase { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - [JsiiProperty(name: "hasRoot", typeJson: "{\\"primitive\\":\\"boolean\\"}")] - public bool HasRoot - { - get => GetInstanceProperty()!; - } + [JsiiProperty(name: "hasRoot", typeJson: "{\\"primitive\\":\\"boolean\\"}")] + public bool HasRoot + { + get => GetInstanceProperty()!; + } - [JsiiMethod(name: "foo")] - public void Foo() - { - InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); + [JsiiMethod(name: "foo")] + public void Foo() + { + InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); + } } } } @@ -23479,6 +7571,14 @@ namespace Amazon.JSII.Tests.CalculatorNamespace [JsiiInterface(nativeType: typeof(IJsii487External), fullyQualifiedName: "jsii-calc.IJsii487External")] public interface IJsii487External { + + [JsiiTypeProxy(nativeType: typeof(IJsii487External), fullyQualifiedName: "jsii-calc.IJsii487External")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IJsii487External + { + private _Proxy(ByRefValue reference): base(reference) + { + } + } } } @@ -23494,41 +7594,13 @@ namespace Amazon.JSII.Tests.CalculatorNamespace [JsiiInterface(nativeType: typeof(IJsii487External2), fullyQualifiedName: "jsii-calc.IJsii487External2")] public interface IJsii487External2 { - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJsii487External2Proxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(IJsii487External2), fullyQualifiedName: "jsii-calc.IJsii487External2")] - internal sealed class IJsii487External2Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IJsii487External2 - { - private IJsii487External2Proxy(ByRefValue reference): base(reference) - { - } - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJsii487ExternalProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(IJsii487External), fullyQualifiedName: "jsii-calc.IJsii487External")] - internal sealed class IJsii487ExternalProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IJsii487External - { - private IJsii487ExternalProxy(ByRefValue reference): base(reference) + [JsiiTypeProxy(nativeType: typeof(IJsii487External2), fullyQualifiedName: "jsii-calc.IJsii487External2")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IJsii487External2 { + private _Proxy(ByRefValue reference): base(reference) + { + } } } } @@ -23545,23 +7617,13 @@ namespace Amazon.JSII.Tests.CalculatorNamespace [JsiiInterface(nativeType: typeof(IJsii496), fullyQualifiedName: "jsii-calc.IJsii496")] public interface IJsii496 { - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJsii496Proxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(IJsii496), fullyQualifiedName: "jsii-calc.IJsii496")] - internal sealed class IJsii496Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IJsii496 - { - private IJsii496Proxy(ByRefValue reference): base(reference) + [JsiiTypeProxy(nativeType: typeof(IJsii496), fullyQualifiedName: "jsii-calc.IJsii496")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IJsii496 { + private _Proxy(ByRefValue reference): base(reference) + { + } } } } @@ -23583,6 +7645,20 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { get; } + + [JsiiTypeProxy(nativeType: typeof(ILevelOneProps), fullyQualifiedName: "jsii-calc.LevelOneProps")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.ILevelOneProps + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiProperty(name: "prop", typeJson: "{\\"fqn\\":\\"jsii-calc.LevelOne.PropProperty\\"}")] + public Amazon.JSII.Tests.CalculatorNamespace.LevelOne.IPropProperty Prop + { + get => GetInstanceProperty()!; + } + } } } @@ -23694,6 +7770,96 @@ namespace Amazon.JSII.Tests.CalculatorNamespace return null; } } + + /// jsii#298: show default values in sphinx documentation, and respect newlines. + [JsiiTypeProxy(nativeType: typeof(ILoadBalancedFargateServiceProps), fullyQualifiedName: "jsii-calc.LoadBalancedFargateServiceProps")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.ILoadBalancedFargateServiceProps + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + /// The container port of the application load balancer attached to your Fargate service. + /// + /// Corresponds to container port mapping. + /// + /// Default: 80 + /// + [JsiiOptional] + [JsiiProperty(name: "containerPort", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] + public double? ContainerPort + { + get => GetInstanceProperty(); + } + + /// The number of cpu units used by the task. + /// + /// Valid values, which determines your range of valid values for the memory parameter: + /// 256 (.25 vCPU) - Available memory values: 0.5GB, 1GB, 2GB + /// 512 (.5 vCPU) - Available memory values: 1GB, 2GB, 3GB, 4GB + /// 1024 (1 vCPU) - Available memory values: 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB + /// 2048 (2 vCPU) - Available memory values: Between 4GB and 16GB in 1GB increments + /// 4096 (4 vCPU) - Available memory values: Between 8GB and 30GB in 1GB increments + /// + /// This default is set in the underlying FargateTaskDefinition construct. + /// + /// Default: 256 + /// + [JsiiOptional] + [JsiiProperty(name: "cpu", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] + public string? Cpu + { + get => GetInstanceProperty(); + } + + /// The amount (in MiB) of memory used by the task. + /// + /// This field is required and you must use one of the following values, which determines your range of valid values + /// for the cpu parameter: + /// + /// 0.5GB, 1GB, 2GB - Available cpu values: 256 (.25 vCPU) + /// + /// 1GB, 2GB, 3GB, 4GB - Available cpu values: 512 (.5 vCPU) + /// + /// 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB - Available cpu values: 1024 (1 vCPU) + /// + /// Between 4GB and 16GB in 1GB increments - Available cpu values: 2048 (2 vCPU) + /// + /// Between 8GB and 30GB in 1GB increments - Available cpu values: 4096 (4 vCPU) + /// + /// This default is set in the underlying FargateTaskDefinition construct. + /// + /// Default: 512 + /// + [JsiiOptional] + [JsiiProperty(name: "memoryMiB", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] + public string? MemoryMiB + { + get => GetInstanceProperty(); + } + + /// Determines whether the Application Load Balancer will be internet-facing. + /// + /// Default: true + /// + [JsiiOptional] + [JsiiProperty(name: "publicLoadBalancer", typeJson: "{\\"primitive\\":\\"boolean\\"}", isOptional: true)] + public bool? PublicLoadBalancer + { + get => GetInstanceProperty(); + } + + /// Determines whether your Fargate Service will be assigned a public IP address. + /// + /// Default: false + /// + [JsiiOptional] + [JsiiProperty(name: "publicTasks", typeJson: "{\\"primitive\\":\\"boolean\\"}", isOptional: true)] + public bool? PublicTasks + { + get => GetInstanceProperty(); + } + } } } @@ -23715,30 +7881,20 @@ namespace Amazon.JSII.Tests.CalculatorNamespace get; set; } - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IMutableObjectLiteralProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(IMutableObjectLiteral), fullyQualifiedName: "jsii-calc.IMutableObjectLiteral")] - internal sealed class IMutableObjectLiteralProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IMutableObjectLiteral - { - private IMutableObjectLiteralProxy(ByRefValue reference): base(reference) + [JsiiTypeProxy(nativeType: typeof(IMutableObjectLiteral), fullyQualifiedName: "jsii-calc.IMutableObjectLiteral")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IMutableObjectLiteral { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string Value - { - get => GetInstanceProperty()!; - set => SetInstanceProperty(value); + [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string Value + { + get => GetInstanceProperty()!; + set => SetInstanceProperty(value); + } } } } @@ -23761,6 +7917,21 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { get; } + + [JsiiTypeProxy(nativeType: typeof(INestedStruct), fullyQualifiedName: "jsii-calc.NestedStruct")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.INestedStruct + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + /// When provided, must be > 0. + [JsiiProperty(name: "numberProp", typeJson: "{\\"primitive\\":\\"number\\"}")] + public double NumberProp + { + get => GetInstanceProperty()!; + } + } } } @@ -23789,44 +7960,34 @@ namespace Amazon.JSII.Tests.CalculatorNamespace get; set; } - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/INonInternalInterfaceProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(INonInternalInterface), fullyQualifiedName: "jsii-calc.INonInternalInterface")] - internal sealed class INonInternalInterfaceProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.INonInternalInterface - { - private INonInternalInterfaceProxy(ByRefValue reference): base(reference) + [JsiiTypeProxy(nativeType: typeof(INonInternalInterface), fullyQualifiedName: "jsii-calc.INonInternalInterface")] + new internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.INonInternalInterface { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - [JsiiProperty(name: "b", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string B - { - get => GetInstanceProperty()!; - set => SetInstanceProperty(value); - } + [JsiiProperty(name: "b", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string B + { + get => GetInstanceProperty()!; + set => SetInstanceProperty(value); + } - [JsiiProperty(name: "c", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string C - { - get => GetInstanceProperty()!; - set => SetInstanceProperty(value); - } + [JsiiProperty(name: "c", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string C + { + get => GetInstanceProperty()!; + set => SetInstanceProperty(value); + } - [JsiiProperty(name: "a", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string A - { - get => GetInstanceProperty()!; - set => SetInstanceProperty(value); + [JsiiProperty(name: "a", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string A + { + get => GetInstanceProperty()!; + set => SetInstanceProperty(value); + } } } } @@ -23858,6 +8019,27 @@ namespace Amazon.JSII.Tests.CalculatorNamespace return null; } } + + [JsiiTypeProxy(nativeType: typeof(INullShouldBeTreatedAsUndefinedData), fullyQualifiedName: "jsii-calc.NullShouldBeTreatedAsUndefinedData")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.INullShouldBeTreatedAsUndefinedData + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiProperty(name: "arrayWithThreeElementsAndUndefinedAsSecondArgument", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"any\\"},\\"kind\\":\\"array\\"}}")] + public object[] ArrayWithThreeElementsAndUndefinedAsSecondArgument + { + get => GetInstanceProperty()!; + } + + [JsiiOptional] + [JsiiProperty(name: "thisShouldBeUndefined", typeJson: "{\\"primitive\\":\\"any\\"}", isOptional: true)] + public object? ThisShouldBeUndefined + { + get => GetInstanceProperty(); + } + } } } @@ -23882,37 +8064,27 @@ namespace Amazon.JSII.Tests.CalculatorNamespace } [JsiiMethod(name: "wasSet", returnsJson: "{\\"type\\":{\\"primitive\\":\\"boolean\\"}}")] bool WasSet(); - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IObjectWithPropertyProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - /// Make sure that setters are properly called on objects with interfaces. - [JsiiTypeProxy(nativeType: typeof(IObjectWithProperty), fullyQualifiedName: "jsii-calc.IObjectWithProperty")] - internal sealed class IObjectWithPropertyProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IObjectWithProperty - { - private IObjectWithPropertyProxy(ByRefValue reference): base(reference) + /// Make sure that setters are properly called on objects with interfaces. + [JsiiTypeProxy(nativeType: typeof(IObjectWithProperty), fullyQualifiedName: "jsii-calc.IObjectWithProperty")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IObjectWithProperty { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - [JsiiProperty(name: "property", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string Property - { - get => GetInstanceProperty()!; - set => SetInstanceProperty(value); - } + [JsiiProperty(name: "property", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string Property + { + get => GetInstanceProperty()!; + set => SetInstanceProperty(value); + } - [JsiiMethod(name: "wasSet", returnsJson: "{\\"type\\":{\\"primitive\\":\\"boolean\\"}}")] - public bool WasSet() - { - return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; + [JsiiMethod(name: "wasSet", returnsJson: "{\\"type\\":{\\"primitive\\":\\"boolean\\"}}")] + public bool WasSet() + { + return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; + } } } } @@ -23932,30 +8104,20 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiMethod(name: "optional", returnsJson: "{\\"optional\\":true,\\"type\\":{\\"primitive\\":\\"string\\"}}")] string? Optional(); - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IOptionalMethodProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - /// Checks that optional result from interface method code generates correctly. - [JsiiTypeProxy(nativeType: typeof(IOptionalMethod), fullyQualifiedName: "jsii-calc.IOptionalMethod")] - internal sealed class IOptionalMethodProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IOptionalMethod - { - private IOptionalMethodProxy(ByRefValue reference): base(reference) + /// Checks that optional result from interface method code generates correctly. + [JsiiTypeProxy(nativeType: typeof(IOptionalMethod), fullyQualifiedName: "jsii-calc.IOptionalMethod")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IOptionalMethod { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - [JsiiMethod(name: "optional", returnsJson: "{\\"optional\\":true,\\"type\\":{\\"primitive\\":\\"string\\"}}")] - public string? Optional() - { - return InvokeInstanceMethod(new System.Type[]{}, new object[]{}); + [JsiiMethod(name: "optional", returnsJson: "{\\"optional\\":true,\\"type\\":{\\"primitive\\":\\"string\\"}}")] + public string? Optional() + { + return InvokeInstanceMethod(new System.Type[]{}, new object[]{}); + } } } } @@ -23981,6 +8143,21 @@ namespace Amazon.JSII.Tests.CalculatorNamespace return null; } } + + [JsiiTypeProxy(nativeType: typeof(IOptionalStruct), fullyQualifiedName: "jsii-calc.OptionalStruct")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IOptionalStruct + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiOptional] + [JsiiProperty(name: "field", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] + public string? Field + { + get => GetInstanceProperty(); + } + } } } @@ -24002,6 +8179,21 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { get; } + + /// https://github.com/aws/jsii/issues/982. + [JsiiTypeProxy(nativeType: typeof(IParentStruct982), fullyQualifiedName: "jsii-calc.ParentStruct982")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IParentStruct982 + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiProperty(name: "foo", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string Foo + { + get => GetInstanceProperty()!; + } + } } } @@ -24022,29 +8214,19 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { get; } - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IPrivatelyImplementedProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(IPrivatelyImplemented), fullyQualifiedName: "jsii-calc.IPrivatelyImplemented")] - internal sealed class IPrivatelyImplementedProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IPrivatelyImplemented - { - private IPrivatelyImplementedProxy(ByRefValue reference): base(reference) + [JsiiTypeProxy(nativeType: typeof(IPrivatelyImplemented), fullyQualifiedName: "jsii-calc.IPrivatelyImplemented")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IPrivatelyImplemented { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - [JsiiProperty(name: "success", typeJson: "{\\"primitive\\":\\"boolean\\"}")] - public bool Success - { - get => GetInstanceProperty()!; + [JsiiProperty(name: "success", typeJson: "{\\"primitive\\":\\"boolean\\"}")] + public bool Success + { + get => GetInstanceProperty()!; + } } } } @@ -24063,6 +8245,20 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiMethod(name: "bye", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] string Bye(); + + [JsiiTypeProxy(nativeType: typeof(IPublicInterface), fullyQualifiedName: "jsii-calc.IPublicInterface")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IPublicInterface + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiMethod(name: "bye", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] + public string Bye() + { + return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; + } + } } } @@ -24080,53 +8276,19 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiMethod(name: "ciao", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] string Ciao(); - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IPublicInterface2Proxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(IPublicInterface2), fullyQualifiedName: "jsii-calc.IPublicInterface2")] - internal sealed class IPublicInterface2Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IPublicInterface2 - { - private IPublicInterface2Proxy(ByRefValue reference): base(reference) - { - } - - [JsiiMethod(name: "ciao", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] - public string Ciao() - { - return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; - } - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IPublicInterfaceProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(IPublicInterface), fullyQualifiedName: "jsii-calc.IPublicInterface")] - internal sealed class IPublicInterfaceProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IPublicInterface - { - private IPublicInterfaceProxy(ByRefValue reference): base(reference) + [JsiiTypeProxy(nativeType: typeof(IPublicInterface2), fullyQualifiedName: "jsii-calc.IPublicInterface2")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IPublicInterface2 { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - [JsiiMethod(name: "bye", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] - public string Bye() - { - return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; + [JsiiMethod(name: "ciao", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] + public string Ciao() + { + return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; + } } } } @@ -24148,32 +8310,22 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// A random number. [JsiiMethod(name: "next", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}")] double Next(); - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IRandomNumberGeneratorProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - /// Generates random numbers. - [JsiiTypeProxy(nativeType: typeof(IRandomNumberGenerator), fullyQualifiedName: "jsii-calc.IRandomNumberGenerator")] - internal sealed class IRandomNumberGeneratorProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IRandomNumberGenerator - { - private IRandomNumberGeneratorProxy(ByRefValue reference): base(reference) + /// Generates random numbers. + [JsiiTypeProxy(nativeType: typeof(IRandomNumberGenerator), fullyQualifiedName: "jsii-calc.IRandomNumberGenerator")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IRandomNumberGenerator { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - /// Returns another random number. - /// A random number. - [JsiiMethod(name: "next", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}")] - public double Next() - { - return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; + /// Returns another random number. + /// A random number. + [JsiiMethod(name: "next", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}")] + public double Next() + { + return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; + } } } } @@ -24196,30 +8348,20 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { get; } - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IReturnJsii976Proxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - /// Returns a subclass of a known class which implements an interface. - [JsiiTypeProxy(nativeType: typeof(IReturnJsii976), fullyQualifiedName: "jsii-calc.IReturnJsii976")] - internal sealed class IReturnJsii976Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IReturnJsii976 - { - private IReturnJsii976Proxy(ByRefValue reference): base(reference) + /// Returns a subclass of a known class which implements an interface. + [JsiiTypeProxy(nativeType: typeof(IReturnJsii976), fullyQualifiedName: "jsii-calc.IReturnJsii976")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IReturnJsii976 { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - [JsiiProperty(name: "foo", typeJson: "{\\"primitive\\":\\"number\\"}")] - public double Foo - { - get => GetInstanceProperty()!; + [JsiiProperty(name: "foo", typeJson: "{\\"primitive\\":\\"number\\"}")] + public double Foo + { + get => GetInstanceProperty()!; + } } } } @@ -24243,35 +8385,25 @@ namespace Amazon.JSII.Tests.CalculatorNamespace } [JsiiMethod(name: "obtainNumber", returnsJson: "{\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.IDoublable\\"}}")] Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IDoublable ObtainNumber(); - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IReturnsNumberProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(IReturnsNumber), fullyQualifiedName: "jsii-calc.IReturnsNumber")] - internal sealed class IReturnsNumberProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IReturnsNumber - { - private IReturnsNumberProxy(ByRefValue reference): base(reference) + [JsiiTypeProxy(nativeType: typeof(IReturnsNumber), fullyQualifiedName: "jsii-calc.IReturnsNumber")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IReturnsNumber { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - [JsiiProperty(name: "numberProp", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.Number\\"}")] - public Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Number NumberProp - { - get => GetInstanceProperty()!; - } + [JsiiProperty(name: "numberProp", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.Number\\"}")] + public Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Number NumberProp + { + get => GetInstanceProperty()!; + } - [JsiiMethod(name: "obtainNumber", returnsJson: "{\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.IDoublable\\"}}")] - public Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IDoublable ObtainNumber() - { - return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; + [JsiiMethod(name: "obtainNumber", returnsJson: "{\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.IDoublable\\"}}")] + public Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IDoublable ObtainNumber() + { + return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; + } } } } @@ -24309,6 +8441,33 @@ namespace Amazon.JSII.Tests.CalculatorNamespace return null; } } + + /// This is here to check that we can pass a nested struct into a kwargs by specifying it as an in-line dictionary. + /// + /// This is cheating with the (current) declared types, but this is the "more + /// idiomatic" way for Pythonists. + /// + [JsiiTypeProxy(nativeType: typeof(IRootStruct), fullyQualifiedName: "jsii-calc.RootStruct")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IRootStruct + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + /// May not be empty. + [JsiiProperty(name: "stringProp", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string StringProp + { + get => GetInstanceProperty()!; + } + + [JsiiOptional] + [JsiiProperty(name: "nestedStruct", typeJson: "{\\"fqn\\":\\"jsii-calc.NestedStruct\\"}", isOptional: true)] + public Amazon.JSII.Tests.CalculatorNamespace.INestedStruct? NestedStruct + { + get => GetInstanceProperty(); + } + } } } @@ -24341,6 +8500,29 @@ namespace Amazon.JSII.Tests.CalculatorNamespace return null; } } + + [JsiiTypeProxy(nativeType: typeof(ISecondLevelStruct), fullyQualifiedName: "jsii-calc.SecondLevelStruct")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.ISecondLevelStruct + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + /// It's long and required. + [JsiiProperty(name: "deeperRequiredProp", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string DeeperRequiredProp + { + get => GetInstanceProperty()!; + } + + /// It's long, but you'll almost never pass it. + [JsiiOptional] + [JsiiProperty(name: "deeperOptionalProp", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] + public string? DeeperOptionalProp + { + get => GetInstanceProperty(); + } + } } } @@ -24367,6 +8549,26 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { get; } + + [JsiiTypeProxy(nativeType: typeof(ISmellyStruct), fullyQualifiedName: "jsii-calc.SmellyStruct")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.ISmellyStruct + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiProperty(name: "property", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string Property + { + get => GetInstanceProperty()!; + } + + [JsiiProperty(name: "yetAnoterOne", typeJson: "{\\"primitive\\":\\"boolean\\"}")] + public bool YetAnoterOne + { + get => GetInstanceProperty()!; + } + } } } @@ -24397,37 +8599,27 @@ namespace Amazon.JSII.Tests.CalculatorNamespace } [JsiiMethod(name: "method")] void Method(); - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStableInterfaceProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(IStableInterface), fullyQualifiedName: "jsii-calc.IStableInterface")] - internal sealed class IStableInterfaceProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IStableInterface - { - private IStableInterfaceProxy(ByRefValue reference): base(reference) + [JsiiTypeProxy(nativeType: typeof(IStableInterface), fullyQualifiedName: "jsii-calc.IStableInterface")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IStableInterface { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - [JsiiOptional] - [JsiiProperty(name: "mutableProperty", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] - public double? MutableProperty - { - get => GetInstanceProperty(); - set => SetInstanceProperty(value); - } + [JsiiOptional] + [JsiiProperty(name: "mutableProperty", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] + public double? MutableProperty + { + get => GetInstanceProperty(); + set => SetInstanceProperty(value); + } - [JsiiMethod(name: "method")] - public void Method() - { - InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); + [JsiiMethod(name: "method")] + public void Method() + { + InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); + } } } } @@ -24449,6 +8641,20 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { get; } + + [JsiiTypeProxy(nativeType: typeof(IStableStruct), fullyQualifiedName: "jsii-calc.StableStruct")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IStableStruct + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiProperty(name: "readonlyProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string ReadonlyProperty + { + get => GetInstanceProperty()!; + } + } } } @@ -24490,6 +8696,35 @@ namespace Amazon.JSII.Tests.CalculatorNamespace return null; } } + + /// We can serialize and deserialize structs without silently ignoring optional fields. + [JsiiTypeProxy(nativeType: typeof(IStructA), fullyQualifiedName: "jsii-calc.StructA")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IStructA + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiProperty(name: "requiredString", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string RequiredString + { + get => GetInstanceProperty()!; + } + + [JsiiOptional] + [JsiiProperty(name: "optionalNumber", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] + public double? OptionalNumber + { + get => GetInstanceProperty(); + } + + [JsiiOptional] + [JsiiProperty(name: "optionalString", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] + public string? OptionalString + { + get => GetInstanceProperty(); + } + } } } @@ -24531,6 +8766,35 @@ namespace Amazon.JSII.Tests.CalculatorNamespace return null; } } + + /// This intentionally overlaps with StructA (where only requiredString is provided) to test htat the kernel properly disambiguates those. + [JsiiTypeProxy(nativeType: typeof(IStructB), fullyQualifiedName: "jsii-calc.StructB")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IStructB + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiProperty(name: "requiredString", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string RequiredString + { + get => GetInstanceProperty()!; + } + + [JsiiOptional] + [JsiiProperty(name: "optionalBoolean", typeJson: "{\\"primitive\\":\\"boolean\\"}", isOptional: true)] + public bool? OptionalBoolean + { + get => GetInstanceProperty(); + } + + [JsiiOptional] + [JsiiProperty(name: "optionalStructA", typeJson: "{\\"fqn\\":\\"jsii-calc.StructA\\"}", isOptional: true)] + public Amazon.JSII.Tests.CalculatorNamespace.IStructA? OptionalStructA + { + get => GetInstanceProperty(); + } + } } } @@ -24562,7 +8826,32 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { get { - return null; + return null; + } + } + + /// 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 + /// + [JsiiTypeProxy(nativeType: typeof(IStructParameterType), fullyQualifiedName: "jsii-calc.StructParameterType")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IStructParameterType + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiProperty(name: "scope", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string Scope + { + get => GetInstanceProperty()!; + } + + [JsiiOptional] + [JsiiProperty(name: "props", typeJson: "{\\"primitive\\":\\"boolean\\"}", isOptional: true)] + public bool? Props + { + get => GetInstanceProperty(); } } } @@ -24583,30 +8872,20 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiMethod(name: "returnStruct", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.StructB\\"}}")] Amazon.JSII.Tests.CalculatorNamespace.IStructB ReturnStruct(); - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStructReturningDelegateProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - /// Verifies that a "pure" implementation of an interface works correctly. - [JsiiTypeProxy(nativeType: typeof(IStructReturningDelegate), fullyQualifiedName: "jsii-calc.IStructReturningDelegate")] - internal sealed class IStructReturningDelegateProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IStructReturningDelegate - { - private IStructReturningDelegateProxy(ByRefValue reference): base(reference) + /// Verifies that a "pure" implementation of an interface works correctly. + [JsiiTypeProxy(nativeType: typeof(IStructReturningDelegate), fullyQualifiedName: "jsii-calc.IStructReturningDelegate")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IStructReturningDelegate { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - [JsiiMethod(name: "returnStruct", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.StructB\\"}}")] - public Amazon.JSII.Tests.CalculatorNamespace.IStructB ReturnStruct() - { - return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; + [JsiiMethod(name: "returnStruct", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.StructB\\"}}")] + public Amazon.JSII.Tests.CalculatorNamespace.IStructB ReturnStruct() + { + return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; + } } } } @@ -24658,6 +8937,41 @@ namespace Amazon.JSII.Tests.CalculatorNamespace return null; } } + + [JsiiTypeProxy(nativeType: typeof(IStructWithJavaReservedWords), fullyQualifiedName: "jsii-calc.StructWithJavaReservedWords")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IStructWithJavaReservedWords + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiProperty(name: "default", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string Default + { + get => GetInstanceProperty()!; + } + + [JsiiOptional] + [JsiiProperty(name: "assert", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] + public string? Assert + { + get => GetInstanceProperty(); + } + + [JsiiOptional] + [JsiiProperty(name: "result", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] + public string? Result + { + get => GetInstanceProperty(); + } + + [JsiiOptional] + [JsiiProperty(name: "that", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] + public string? That + { + get => GetInstanceProperty(); + } + } } } @@ -24693,6 +9007,32 @@ namespace Amazon.JSII.Tests.CalculatorNamespace return null; } } + + [JsiiTypeProxy(nativeType: typeof(ISupportsNiceJavaBuilderProps), fullyQualifiedName: "jsii-calc.SupportsNiceJavaBuilderProps")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.ISupportsNiceJavaBuilderProps + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + /// Some number, like 42. + [JsiiProperty(name: "bar", typeJson: "{\\"primitive\\":\\"number\\"}")] + public double Bar + { + get => GetInstanceProperty()!; + } + + /// 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. + /// + [JsiiOptional] + [JsiiProperty(name: "id", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] + public string? Id + { + get => GetInstanceProperty(); + } + } } } @@ -24732,6 +9072,36 @@ namespace Amazon.JSII.Tests.CalculatorNamespace return null; } } + + [JsiiTypeProxy(nativeType: typeof(ITopLevelStruct), fullyQualifiedName: "jsii-calc.TopLevelStruct")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.ITopLevelStruct + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + /// This is a required field. + [JsiiProperty(name: "required", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string Required + { + get => GetInstanceProperty()!; + } + + /// A union to really stress test our serialization. + [JsiiProperty(name: "secondLevel", typeJson: "{\\"union\\":{\\"types\\":[{\\"primitive\\":\\"number\\"},{\\"fqn\\":\\"jsii-calc.SecondLevelStruct\\"}]}}")] + public object SecondLevel + { + get => GetInstanceProperty()!; + } + + /// You don't have to pass this. + [JsiiOptional] + [JsiiProperty(name: "optional", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] + public string? Optional + { + get => GetInstanceProperty(); + } + } } } @@ -24762,6 +9132,27 @@ namespace Amazon.JSII.Tests.CalculatorNamespace return null; } } + + [JsiiTypeProxy(nativeType: typeof(IUnionProperties), fullyQualifiedName: "jsii-calc.UnionProperties")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IUnionProperties + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiProperty(name: "bar", typeJson: "{\\"union\\":{\\"types\\":[{\\"primitive\\":\\"string\\"},{\\"primitive\\":\\"number\\"},{\\"fqn\\":\\"jsii-calc.AllTypes\\"}]}}")] + public object Bar + { + get => GetInstanceProperty()!; + } + + [JsiiOptional] + [JsiiProperty(name: "foo", typeJson: "{\\"union\\":{\\"types\\":[{\\"primitive\\":\\"string\\"},{\\"primitive\\":\\"number\\"}]}}", isOptional: true)] + public object? Foo + { + get => GetInstanceProperty(); + } + } } } @@ -24781,31 +9172,21 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// Returns the current time, formatted as an ISO-8601 string. [JsiiMethod(name: "iso8601Now", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] string Iso8601Now(); - } -} -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IWallClockProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - /// Implement this interface. - [JsiiTypeProxy(nativeType: typeof(IWallClock), fullyQualifiedName: "jsii-calc.IWallClock")] - internal sealed class IWallClockProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IWallClock - { - private IWallClockProxy(ByRefValue reference): base(reference) + /// Implement this interface. + [JsiiTypeProxy(nativeType: typeof(IWallClock), fullyQualifiedName: "jsii-calc.IWallClock")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IWallClock { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - /// Returns the current time, formatted as an ISO-8601 string. - [JsiiMethod(name: "iso8601Now", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] - public string Iso8601Now() - { - return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; + /// Returns the current time, formatted as an ISO-8601 string. + [JsiiMethod(name: "iso8601Now", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] + public string Iso8601Now() + { + return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; + } } } } @@ -25035,42 +9416,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplictBaseOfBaseProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(IImplictBaseOfBase), fullyQualifiedName: "jsii-calc.ImplictBaseOfBase")] - internal sealed class ImplictBaseOfBaseProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IImplictBaseOfBase - { - private ImplictBaseOfBaseProxy(ByRefValue reference): base(reference) - { - } - - [JsiiProperty(name: "goo", typeJson: "{\\"primitive\\":\\"date\\"}")] - public System.DateTime Goo - { - get => GetInstanceProperty()!; - } - - [JsiiProperty(name: "bar", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string Bar - { - get => GetInstanceProperty()!; - } - - [JsiiProperty(name: "foo", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-base-of-base.Very\\"}")] - public Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.Very Foo - { - get => GetInstanceProperty()!; - } - } -} - -`; - exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InbetweenClass.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -25228,30 +9573,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.InterfaceInNamespaceIncludesClas `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceIncludesClasses/HelloProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace.InterfaceInNamespaceIncludesClasses -{ - [JsiiTypeProxy(nativeType: typeof(IHello), fullyQualifiedName: "jsii-calc.InterfaceInNamespaceIncludesClasses.Hello")] - internal sealed class HelloProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.InterfaceInNamespaceIncludesClasses.IHello - { - private HelloProxy(ByRefValue reference): base(reference) - { - } - - [JsiiProperty(name: "foo", typeJson: "{\\"primitive\\":\\"number\\"}")] - public double Foo - { - get => GetInstanceProperty()!; - } - } -} - -`; - exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceIncludesClasses/IHello.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -25267,6 +9588,20 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.InterfaceInNamespaceIncludesClas { get; } + + [JsiiTypeProxy(nativeType: typeof(IHello), fullyQualifiedName: "jsii-calc.InterfaceInNamespaceIncludesClasses.Hello")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.InterfaceInNamespaceIncludesClasses.IHello + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiProperty(name: "foo", typeJson: "{\\"primitive\\":\\"number\\"}")] + public double Foo + { + get => GetInstanceProperty()!; + } + } } } @@ -25295,30 +9630,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.InterfaceInNamespaceOnlyInterfac `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceOnlyInterface/HelloProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace.InterfaceInNamespaceOnlyInterface -{ - [JsiiTypeProxy(nativeType: typeof(IHello), fullyQualifiedName: "jsii-calc.InterfaceInNamespaceOnlyInterface.Hello")] - internal sealed class HelloProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.InterfaceInNamespaceOnlyInterface.IHello - { - private HelloProxy(ByRefValue reference): base(reference) - { - } - - [JsiiProperty(name: "foo", typeJson: "{\\"primitive\\":\\"number\\"}")] - public double Foo - { - get => GetInstanceProperty()!; - } - } -} - -`; - exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceOnlyInterface/IHello.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -25334,6 +9645,20 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.InterfaceInNamespaceOnlyInterfac { get; } + + [JsiiTypeProxy(nativeType: typeof(IHello), fullyQualifiedName: "jsii-calc.InterfaceInNamespaceOnlyInterface.Hello")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.InterfaceInNamespaceOnlyInterface.IHello + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiProperty(name: "foo", typeJson: "{\\"primitive\\":\\"number\\"}")] + public double Foo + { + get => GetInstanceProperty()!; + } + } } } @@ -25384,7 +9709,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.Internal.DependencyResolution public Anchor() { new Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.Internal.DependencyResolution.Anchor(); - new Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.Internal.DependencyResolution.Anchor(); new Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Internal.DependencyResolution.Anchor(); } } @@ -25430,28 +9754,18 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IsomorphismProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - /// Checks the "same instance" isomorphism is preserved within the constructor. - /// - /// Create a subclass of this, and assert that this.myself() actually returns - /// this from within the constructor. - /// - [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Isomorphism), fullyQualifiedName: "jsii-calc.Isomorphism")] - internal sealed class IsomorphismProxy : Amazon.JSII.Tests.CalculatorNamespace.Isomorphism - { - private IsomorphismProxy(ByRefValue reference): base(reference) + /// Checks the "same instance" isomorphism is preserved within the constructor. + /// + /// Create a subclass of this, and assert that this.myself() actually returns + /// this from within the constructor. + /// + [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Isomorphism), fullyQualifiedName: "jsii-calc.Isomorphism")] + internal sealed class _Proxy : Amazon.JSII.Tests.CalculatorNamespace.Isomorphism { + private _Proxy(ByRefValue reference): base(reference) + { + } } } } @@ -26300,18 +10614,19 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { get; } - } - [JsiiTypeProxy(nativeType: typeof(IPropBooleanValue), fullyQualifiedName: "jsii-calc.LevelOne.PropBooleanValue")] - internal sealed class PropBooleanValueProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.LevelOne.IPropBooleanValue - { - private PropBooleanValueProxy(ByRefValue reference): base(reference) - { - } - [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"boolean\\"}")] - public bool Value + [JsiiTypeProxy(nativeType: typeof(IPropBooleanValue), fullyQualifiedName: "jsii-calc.LevelOne.PropBooleanValue")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.LevelOne.IPropBooleanValue { - get => GetInstanceProperty()!; + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"boolean\\"}")] + public bool Value + { + get => GetInstanceProperty()!; + } } } #pragma warning disable CS8618 @@ -26334,18 +10649,19 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { get; } - } - [JsiiTypeProxy(nativeType: typeof(IPropProperty), fullyQualifiedName: "jsii-calc.LevelOne.PropProperty")] - internal sealed class PropPropertyProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.LevelOne.IPropProperty - { - private PropPropertyProxy(ByRefValue reference): base(reference) - { - } - [JsiiProperty(name: "prop", typeJson: "{\\"fqn\\":\\"jsii-calc.LevelOne.PropBooleanValue\\"}")] - public Amazon.JSII.Tests.CalculatorNamespace.LevelOne.IPropBooleanValue Prop + [JsiiTypeProxy(nativeType: typeof(IPropProperty), fullyQualifiedName: "jsii-calc.LevelOne.PropProperty")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.LevelOne.IPropProperty { - get => GetInstanceProperty()!; + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiProperty(name: "prop", typeJson: "{\\"fqn\\":\\"jsii-calc.LevelOne.PropBooleanValue\\"}")] + public Amazon.JSII.Tests.CalculatorNamespace.LevelOne.IPropBooleanValue Prop + { + get => GetInstanceProperty()!; + } } } #pragma warning disable CS8618 @@ -26371,41 +10687,17 @@ using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace -{ - #pragma warning disable CS8618 - - [JsiiByValue(fqn: "jsii-calc.LevelOneProps")] - public class LevelOneProps : Amazon.JSII.Tests.CalculatorNamespace.ILevelOneProps - { - [JsiiProperty(name: "prop", typeJson: "{\\"fqn\\":\\"jsii-calc.LevelOne.PropProperty\\"}", isOverride: true)] - public Amazon.JSII.Tests.CalculatorNamespace.LevelOne.IPropProperty Prop - { - get; - set; - } - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/LevelOnePropsProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(ILevelOneProps), fullyQualifiedName: "jsii-calc.LevelOneProps")] - internal sealed class LevelOnePropsProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.ILevelOneProps - { - private LevelOnePropsProxy(ByRefValue reference): base(reference) - { - } +{ + #pragma warning disable CS8618 - [JsiiProperty(name: "prop", typeJson: "{\\"fqn\\":\\"jsii-calc.LevelOne.PropProperty\\"}")] + [JsiiByValue(fqn: "jsii-calc.LevelOneProps")] + public class LevelOneProps : Amazon.JSII.Tests.CalculatorNamespace.ILevelOneProps + { + [JsiiProperty(name: "prop", typeJson: "{\\"fqn\\":\\"jsii-calc.LevelOne.PropProperty\\"}", isOverride: true)] public Amazon.JSII.Tests.CalculatorNamespace.LevelOne.IPropProperty Prop { - get => GetInstanceProperty()!; + get; + set; } } } @@ -26513,106 +10805,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/LoadBalancedFargateServicePropsProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - /// jsii#298: show default values in sphinx documentation, and respect newlines. - [JsiiTypeProxy(nativeType: typeof(ILoadBalancedFargateServiceProps), fullyQualifiedName: "jsii-calc.LoadBalancedFargateServiceProps")] - internal sealed class LoadBalancedFargateServicePropsProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.ILoadBalancedFargateServiceProps - { - private LoadBalancedFargateServicePropsProxy(ByRefValue reference): base(reference) - { - } - - /// The container port of the application load balancer attached to your Fargate service. - /// - /// Corresponds to container port mapping. - /// - /// Default: 80 - /// - [JsiiOptional] - [JsiiProperty(name: "containerPort", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] - public double? ContainerPort - { - get => GetInstanceProperty(); - } - - /// The number of cpu units used by the task. - /// - /// Valid values, which determines your range of valid values for the memory parameter: - /// 256 (.25 vCPU) - Available memory values: 0.5GB, 1GB, 2GB - /// 512 (.5 vCPU) - Available memory values: 1GB, 2GB, 3GB, 4GB - /// 1024 (1 vCPU) - Available memory values: 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB - /// 2048 (2 vCPU) - Available memory values: Between 4GB and 16GB in 1GB increments - /// 4096 (4 vCPU) - Available memory values: Between 8GB and 30GB in 1GB increments - /// - /// This default is set in the underlying FargateTaskDefinition construct. - /// - /// Default: 256 - /// - [JsiiOptional] - [JsiiProperty(name: "cpu", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] - public string? Cpu - { - get => GetInstanceProperty(); - } - - /// The amount (in MiB) of memory used by the task. - /// - /// This field is required and you must use one of the following values, which determines your range of valid values - /// for the cpu parameter: - /// - /// 0.5GB, 1GB, 2GB - Available cpu values: 256 (.25 vCPU) - /// - /// 1GB, 2GB, 3GB, 4GB - Available cpu values: 512 (.5 vCPU) - /// - /// 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB - Available cpu values: 1024 (1 vCPU) - /// - /// Between 4GB and 16GB in 1GB increments - Available cpu values: 2048 (2 vCPU) - /// - /// Between 8GB and 30GB in 1GB increments - Available cpu values: 4096 (4 vCPU) - /// - /// This default is set in the underlying FargateTaskDefinition construct. - /// - /// Default: 512 - /// - [JsiiOptional] - [JsiiProperty(name: "memoryMiB", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] - public string? MemoryMiB - { - get => GetInstanceProperty(); - } - - /// Determines whether the Application Load Balancer will be internet-facing. - /// - /// Default: true - /// - [JsiiOptional] - [JsiiProperty(name: "publicLoadBalancer", typeJson: "{\\"primitive\\":\\"boolean\\"}", isOptional: true)] - public bool? PublicLoadBalancer - { - get => GetInstanceProperty(); - } - - /// Determines whether your Fargate Service will be assigned a public IP address. - /// - /// Default: false - /// - [JsiiOptional] - [JsiiProperty(name: "publicTasks", typeJson: "{\\"primitive\\":\\"boolean\\"}", isOptional: true)] - public bool? PublicTasks - { - get => GetInstanceProperty(); - } - } -} - -`; - exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/MethodNamedProperty.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -26896,31 +11088,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NestedStructProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(INestedStruct), fullyQualifiedName: "jsii-calc.NestedStruct")] - internal sealed class NestedStructProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.INestedStruct - { - private NestedStructProxy(ByRefValue reference): base(reference) - { - } - - /// When provided, must be > 0. - [JsiiProperty(name: "numberProp", typeJson: "{\\"primitive\\":\\"number\\"}")] - public double NumberProp - { - get => GetInstanceProperty()!; - } - } -} - -`; - exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NodeStandardLibrary.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -27075,37 +11242,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NullShouldBeTreatedAsUndefinedDataProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(INullShouldBeTreatedAsUndefinedData), fullyQualifiedName: "jsii-calc.NullShouldBeTreatedAsUndefinedData")] - internal sealed class NullShouldBeTreatedAsUndefinedDataProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.INullShouldBeTreatedAsUndefinedData - { - private NullShouldBeTreatedAsUndefinedDataProxy(ByRefValue reference): base(reference) - { - } - - [JsiiProperty(name: "arrayWithThreeElementsAndUndefinedAsSecondArgument", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"any\\"},\\"kind\\":\\"array\\"}}")] - public object[] ArrayWithThreeElementsAndUndefinedAsSecondArgument - { - get => GetInstanceProperty()!; - } - - [JsiiOptional] - [JsiiProperty(name: "thisShouldBeUndefined", typeJson: "{\\"primitive\\":\\"any\\"}", isOptional: true)] - public object? ThisShouldBeUndefined - { - get => GetInstanceProperty(); - } - } -} - -`; - exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NumberGenerator.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -27251,7 +11387,7 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// Stability: Deprecated /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Old), fullyQualifiedName: "jsii-calc.Old")] - [System.Obsolete("Use the new class")] + [System.Obsolete("Use the new class or the old class whatever you want because whatever you like is always the best")] public class Old : DeputyBase { public Old(): base(new DeputyProps(System.Array.Empty())) @@ -27449,31 +11585,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OptionalStructProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(IOptionalStruct), fullyQualifiedName: "jsii-calc.OptionalStruct")] - internal sealed class OptionalStructProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IOptionalStruct - { - private OptionalStructProxy(ByRefValue reference): base(reference) - { - } - - [JsiiOptional] - [JsiiProperty(name: "field", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] - public string? Field - { - get => GetInstanceProperty(); - } - } -} - -`; - exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OverridableProtectedMember.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -27602,31 +11713,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ParentStruct982Proxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - /// https://github.com/aws/jsii/issues/982. - [JsiiTypeProxy(nativeType: typeof(IParentStruct982), fullyQualifiedName: "jsii-calc.ParentStruct982")] - internal sealed class ParentStruct982Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IParentStruct982 - { - private ParentStruct982Proxy(ByRefValue reference): base(reference) - { - } - - [JsiiProperty(name: "foo", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string Foo - { - get => GetInstanceProperty()!; - } - } -} - -`; - exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PartiallyInitializedThisConsumer.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -27658,29 +11744,19 @@ namespace Amazon.JSII.Tests.CalculatorNamespace [JsiiMethod(name: "consumePartiallyInitializedThis", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"obj\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.ConstructorPassesThisOut\\"}},{\\"name\\":\\"dt\\",\\"type\\":{\\"primitive\\":\\"date\\"}},{\\"name\\":\\"ev\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.AllTypesEnum\\"}}]")] public abstract string ConsumePartiallyInitializedThis(Amazon.JSII.Tests.CalculatorNamespace.ConstructorPassesThisOut obj, System.DateTime dt, Amazon.JSII.Tests.CalculatorNamespace.AllTypesEnum ev); - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PartiallyInitializedThisConsumerProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.PartiallyInitializedThisConsumer), fullyQualifiedName: "jsii-calc.PartiallyInitializedThisConsumer")] - internal sealed class PartiallyInitializedThisConsumerProxy : Amazon.JSII.Tests.CalculatorNamespace.PartiallyInitializedThisConsumer - { - private PartiallyInitializedThisConsumerProxy(ByRefValue reference): base(reference) + [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.PartiallyInitializedThisConsumer), fullyQualifiedName: "jsii-calc.PartiallyInitializedThisConsumer")] + internal sealed class _Proxy : Amazon.JSII.Tests.CalculatorNamespace.PartiallyInitializedThisConsumer { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - [JsiiMethod(name: "consumePartiallyInitializedThis", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"obj\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.ConstructorPassesThisOut\\"}},{\\"name\\":\\"dt\\",\\"type\\":{\\"primitive\\":\\"date\\"}},{\\"name\\":\\"ev\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.AllTypesEnum\\"}}]")] - public override string ConsumePartiallyInitializedThis(Amazon.JSII.Tests.CalculatorNamespace.ConstructorPassesThisOut obj, System.DateTime dt, Amazon.JSII.Tests.CalculatorNamespace.AllTypesEnum ev) - { - return InvokeInstanceMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.ConstructorPassesThisOut), typeof(System.DateTime), typeof(Amazon.JSII.Tests.CalculatorNamespace.AllTypesEnum)}, new object[]{obj, dt, ev})!; + [JsiiMethod(name: "consumePartiallyInitializedThis", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"obj\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.ConstructorPassesThisOut\\"}},{\\"name\\":\\"dt\\",\\"type\\":{\\"primitive\\":\\"date\\"}},{\\"name\\":\\"ev\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.AllTypesEnum\\"}}]")] + public override string ConsumePartiallyInitializedThis(Amazon.JSII.Tests.CalculatorNamespace.ConstructorPassesThisOut obj, System.DateTime dt, Amazon.JSII.Tests.CalculatorNamespace.AllTypesEnum ev) + { + return InvokeInstanceMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.ConstructorPassesThisOut), typeof(System.DateTime), typeof(Amazon.JSII.Tests.CalculatorNamespace.AllTypesEnum)}, new object[]{obj, dt, ev})!; + } } } } @@ -28186,29 +12262,19 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.PythonSelf { [JsiiMethod(name: "method", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"self\\",\\"type\\":{\\"primitive\\":\\"number\\"}}]")] string Method(double self); - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PythonSelf/IInterfaceWithSelfProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 -namespace Amazon.JSII.Tests.CalculatorNamespace.PythonSelf -{ - [JsiiTypeProxy(nativeType: typeof(IInterfaceWithSelf), fullyQualifiedName: "jsii-calc.PythonSelf.IInterfaceWithSelf")] - internal sealed class IInterfaceWithSelfProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.PythonSelf.IInterfaceWithSelf - { - private IInterfaceWithSelfProxy(ByRefValue reference): base(reference) + [JsiiTypeProxy(nativeType: typeof(IInterfaceWithSelf), fullyQualifiedName: "jsii-calc.PythonSelf.IInterfaceWithSelf")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.PythonSelf.IInterfaceWithSelf { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - [JsiiMethod(name: "method", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"self\\",\\"type\\":{\\"primitive\\":\\"number\\"}}]")] - public string Method(double self) - { - return InvokeInstanceMethod(new System.Type[]{typeof(double)}, new object[]{self})!; + [JsiiMethod(name: "method", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"self\\",\\"type\\":{\\"primitive\\":\\"number\\"}}]")] + public string Method(double self) + { + return InvokeInstanceMethod(new System.Type[]{typeof(double)}, new object[]{self})!; + } } } } @@ -28230,52 +12296,42 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.PythonSelf { get; } - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PythonSelf/StructWithSelf.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace.PythonSelf -{ - #pragma warning disable CS8618 - [JsiiByValue(fqn: "jsii-calc.PythonSelf.StructWithSelf")] - public class StructWithSelf : Amazon.JSII.Tests.CalculatorNamespace.PythonSelf.IStructWithSelf - { - [JsiiProperty(name: "self", typeJson: "{\\"primitive\\":\\"string\\"}", isOverride: true)] - public string Self + [JsiiTypeProxy(nativeType: typeof(IStructWithSelf), fullyQualifiedName: "jsii-calc.PythonSelf.StructWithSelf")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.PythonSelf.IStructWithSelf { - get; - set; + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiProperty(name: "self", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string Self + { + get => GetInstanceProperty()!; + } } } } `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PythonSelf/StructWithSelfProxy.cs 1`] = ` +exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PythonSelf/StructWithSelf.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.PythonSelf { - [JsiiTypeProxy(nativeType: typeof(IStructWithSelf), fullyQualifiedName: "jsii-calc.PythonSelf.StructWithSelf")] - internal sealed class StructWithSelfProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.PythonSelf.IStructWithSelf - { - private StructWithSelfProxy(ByRefValue reference): base(reference) - { - } + #pragma warning disable CS8618 - [JsiiProperty(name: "self", typeJson: "{\\"primitive\\":\\"string\\"}")] + [JsiiByValue(fqn: "jsii-calc.PythonSelf.StructWithSelf")] + public class StructWithSelf : Amazon.JSII.Tests.CalculatorNamespace.PythonSelf.IStructWithSelf + { + [JsiiProperty(name: "self", typeJson: "{\\"primitive\\":\\"string\\"}", isOverride: true)] public string Self { - get => GetInstanceProperty()!; + get; + set; } } } @@ -28415,43 +12471,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/RootStructProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - /// This is here to check that we can pass a nested struct into a kwargs by specifying it as an in-line dictionary. - /// - /// This is cheating with the (current) declared types, but this is the "more - /// idiomatic" way for Pythonists. - /// - [JsiiTypeProxy(nativeType: typeof(IRootStruct), fullyQualifiedName: "jsii-calc.RootStruct")] - internal sealed class RootStructProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IRootStruct - { - private RootStructProxy(ByRefValue reference): base(reference) - { - } - - /// May not be empty. - [JsiiProperty(name: "stringProp", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string StringProp - { - get => GetInstanceProperty()!; - } - - [JsiiOptional] - [JsiiProperty(name: "nestedStruct", typeJson: "{\\"fqn\\":\\"jsii-calc.NestedStruct\\"}", isOptional: true)] - public Amazon.JSII.Tests.CalculatorNamespace.INestedStruct? NestedStruct - { - get => GetInstanceProperty(); - } - } -} - -`; - exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/RootStructValidator.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -28570,39 +12589,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SecondLevelStructProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(ISecondLevelStruct), fullyQualifiedName: "jsii-calc.SecondLevelStruct")] - internal sealed class SecondLevelStructProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.ISecondLevelStruct - { - private SecondLevelStructProxy(ByRefValue reference): base(reference) - { - } - - /// It's long and required. - [JsiiProperty(name: "deeperRequiredProp", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string DeeperRequiredProp - { - get => GetInstanceProperty()!; - } - - /// It's long, but you'll almost never pass it. - [JsiiOptional] - [JsiiProperty(name: "deeperOptionalProp", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] - public string? DeeperOptionalProp - { - get => GetInstanceProperty(); - } - } -} - -`; - exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SingleInstanceTwoTypes.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -28799,36 +12785,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SmellyStructProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(ISmellyStruct), fullyQualifiedName: "jsii-calc.SmellyStruct")] - internal sealed class SmellyStructProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.ISmellyStruct - { - private SmellyStructProxy(ByRefValue reference): base(reference) - { - } - - [JsiiProperty(name: "property", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string Property - { - get => GetInstanceProperty()!; - } - - [JsiiProperty(name: "yetAnoterOne", typeJson: "{\\"primitive\\":\\"boolean\\"}")] - public bool YetAnoterOne - { - get => GetInstanceProperty()!; - } - } -} - -`; - exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SomeTypeJsii976.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -28968,69 +12924,135 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StableStructProxy.cs 1`] = ` +exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StaticContext.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { - [JsiiTypeProxy(nativeType: typeof(IStableStruct), fullyQualifiedName: "jsii-calc.StableStruct")] - internal sealed class StableStructProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IStableStruct + /// This is used to validate the ability to use \`this\` from within a static context. + /// + /// https://github.com/awslabs/aws-cdk/issues/2304 + /// + [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.StaticContext), fullyQualifiedName: "jsii-calc.StaticContext")] + public class StaticContext : DeputyBase { - private StableStructProxy(ByRefValue reference): base(reference) + /// 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 StaticContext(ByRefValue reference): base(reference) { } - [JsiiProperty(name: "readonlyProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string ReadonlyProperty + /// Used by jsii to construct an instance of this class from DeputyProps + /// The deputy props + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + protected StaticContext(DeputyProps props): base(props) { - get => GetInstanceProperty()!; + } + + [JsiiMethod(name: "canAccessStaticContext", returnsJson: "{\\"type\\":{\\"primitive\\":\\"boolean\\"}}")] + public static bool CanAccessStaticContext() + { + return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.StaticContext), new System.Type[]{}, new object[]{})!; + } + + [JsiiProperty(name: "staticVariable", typeJson: "{\\"primitive\\":\\"boolean\\"}")] + public static bool StaticVariable + { + get => GetStaticProperty(typeof(Amazon.JSII.Tests.CalculatorNamespace.StaticContext))!; + set => SetStaticProperty(typeof(Amazon.JSII.Tests.CalculatorNamespace.StaticContext), value); } } } `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StaticContext.cs 1`] = ` +exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StaticHelloChild.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { - /// This is used to validate the ability to use \`this\` from within a static context. + [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.StaticHelloChild), fullyQualifiedName: "jsii-calc.StaticHelloChild")] + public class StaticHelloChild : Amazon.JSII.Tests.CalculatorNamespace.StaticHelloParent + { + /// 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 StaticHelloChild(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 StaticHelloChild(DeputyProps props): base(props) + { + } + + [JsiiMethod(name: "method", isOverride: true)] + public static new void Method() + { + InvokeStaticVoidMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.StaticHelloChild), new System.Type[]{}, new object[]{}); + } + + [JsiiProperty(name: "property", typeJson: "{\\"primitive\\":\\"number\\"}")] + public static new double Property + { + get => GetStaticProperty(typeof(Amazon.JSII.Tests.CalculatorNamespace.StaticHelloChild))!; + } + } +} + +`; + +exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StaticHelloParent.cs 1`] = ` +using Amazon.JSII.Runtime.Deputy; + +#pragma warning disable CS0672,CS0809,CS1591 + +namespace Amazon.JSII.Tests.CalculatorNamespace +{ + /// Static methods that override parent class are technically overrides (the inheritance of statics is part of the ES6 specification), but certain other languages such as Java do not carry statics in the inheritance chain at all, so they cannot be overridden, only hidden. /// - /// https://github.com/awslabs/aws-cdk/issues/2304 + /// The difference is fairly minor (for typical use-cases, the end result is the + /// same), however this has implications on what the generated code should look + /// like. /// - [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.StaticContext), fullyQualifiedName: "jsii-calc.StaticContext")] - public class StaticContext : DeputyBase + [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.StaticHelloParent), fullyQualifiedName: "jsii-calc.StaticHelloParent")] + public class StaticHelloParent : DeputyBase { + public StaticHelloParent(): 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 StaticContext(ByRefValue reference): base(reference) + protected StaticHelloParent(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 StaticContext(DeputyProps props): base(props) + protected StaticHelloParent(DeputyProps props): base(props) { } - [JsiiMethod(name: "canAccessStaticContext", returnsJson: "{\\"type\\":{\\"primitive\\":\\"boolean\\"}}")] - public static bool CanAccessStaticContext() + [JsiiMethod(name: "method")] + public static void Method() { - return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.StaticContext), new System.Type[]{}, new object[]{})!; + InvokeStaticVoidMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.StaticHelloParent), new System.Type[]{}, new object[]{}); } - [JsiiProperty(name: "staticVariable", typeJson: "{\\"primitive\\":\\"boolean\\"}")] - public static bool StaticVariable + [JsiiProperty(name: "property", typeJson: "{\\"primitive\\":\\"number\\"}")] + public static double Property { - get => GetStaticProperty(typeof(Amazon.JSII.Tests.CalculatorNamespace.StaticContext))!; - set => SetStaticProperty(typeof(Amazon.JSII.Tests.CalculatorNamespace.StaticContext), value); + get => GetStaticProperty(typeof(Amazon.JSII.Tests.CalculatorNamespace.StaticHelloParent))!; } } } @@ -29168,117 +13190,38 @@ using Amazon.JSII.Runtime.Deputy; namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.StripInternal), fullyQualifiedName: "jsii-calc.StripInternal")] - public class StripInternal : DeputyBase - { - public StripInternal(): 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 StripInternal(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 StripInternal(DeputyProps props): base(props) - { - } - - [JsiiProperty(name: "youSeeMe", typeJson: "{\\"primitive\\":\\"string\\"}")] - public virtual string YouSeeMe - { - get => GetInstanceProperty()!; - set => SetInstanceProperty(value); - } - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructA.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - #pragma warning disable CS8618 - - /// We can serialize and deserialize structs without silently ignoring optional fields. - [JsiiByValue(fqn: "jsii-calc.StructA")] - public class StructA : Amazon.JSII.Tests.CalculatorNamespace.IStructA - { - [JsiiProperty(name: "requiredString", typeJson: "{\\"primitive\\":\\"string\\"}", isOverride: true)] - public string RequiredString - { - get; - set; - } - - [JsiiOptional] - [JsiiProperty(name: "optionalNumber", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true, isOverride: true)] - public double? OptionalNumber - { - get; - set; - } - - [JsiiOptional] - [JsiiProperty(name: "optionalString", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true, isOverride: true)] - public string? OptionalString - { - get; - set; - } - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructAProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - /// We can serialize and deserialize structs without silently ignoring optional fields. - [JsiiTypeProxy(nativeType: typeof(IStructA), fullyQualifiedName: "jsii-calc.StructA")] - internal sealed class StructAProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IStructA + public class StripInternal : DeputyBase { - private StructAProxy(ByRefValue reference): base(reference) + public StripInternal(): base(new DeputyProps(System.Array.Empty())) { } - [JsiiProperty(name: "requiredString", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string RequiredString + /// 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 StripInternal(ByRefValue reference): base(reference) { - get => GetInstanceProperty()!; } - [JsiiOptional] - [JsiiProperty(name: "optionalNumber", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] - public double? OptionalNumber + /// Used by jsii to construct an instance of this class from DeputyProps + /// The deputy props + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + protected StripInternal(DeputyProps props): base(props) { - get => GetInstanceProperty(); } - [JsiiOptional] - [JsiiProperty(name: "optionalString", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] - public string? OptionalString + [JsiiProperty(name: "youSeeMe", typeJson: "{\\"primitive\\":\\"string\\"}")] + public virtual string YouSeeMe { - get => GetInstanceProperty(); + get => GetInstanceProperty()!; + set => SetInstanceProperty(value); } } } `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructB.cs 1`] = ` +exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructA.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 @@ -29287,9 +13230,9 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { #pragma warning disable CS8618 - /// This intentionally overlaps with StructA (where only requiredString is provided) to test htat the kernel properly disambiguates those. - [JsiiByValue(fqn: "jsii-calc.StructB")] - public class StructB : Amazon.JSII.Tests.CalculatorNamespace.IStructB + /// We can serialize and deserialize structs without silently ignoring optional fields. + [JsiiByValue(fqn: "jsii-calc.StructA")] + public class StructA : Amazon.JSII.Tests.CalculatorNamespace.IStructA { [JsiiProperty(name: "requiredString", typeJson: "{\\"primitive\\":\\"string\\"}", isOverride: true)] public string RequiredString @@ -29299,16 +13242,16 @@ namespace Amazon.JSII.Tests.CalculatorNamespace } [JsiiOptional] - [JsiiProperty(name: "optionalBoolean", typeJson: "{\\"primitive\\":\\"boolean\\"}", isOptional: true, isOverride: true)] - public bool? OptionalBoolean + [JsiiProperty(name: "optionalNumber", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true, isOverride: true)] + public double? OptionalNumber { get; set; } [JsiiOptional] - [JsiiProperty(name: "optionalStructA", typeJson: "{\\"fqn\\":\\"jsii-calc.StructA\\"}", isOptional: true, isOverride: true)] - public Amazon.JSII.Tests.CalculatorNamespace.IStructA? OptionalStructA + [JsiiProperty(name: "optionalString", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true, isOverride: true)] + public string? OptionalString { get; set; @@ -29318,39 +13261,40 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructBProxy.cs 1`] = ` +exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructB.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { + #pragma warning disable CS8618 + /// This intentionally overlaps with StructA (where only requiredString is provided) to test htat the kernel properly disambiguates those. - [JsiiTypeProxy(nativeType: typeof(IStructB), fullyQualifiedName: "jsii-calc.StructB")] - internal sealed class StructBProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IStructB + [JsiiByValue(fqn: "jsii-calc.StructB")] + public class StructB : Amazon.JSII.Tests.CalculatorNamespace.IStructB { - private StructBProxy(ByRefValue reference): base(reference) - { - } - - [JsiiProperty(name: "requiredString", typeJson: "{\\"primitive\\":\\"string\\"}")] + [JsiiProperty(name: "requiredString", typeJson: "{\\"primitive\\":\\"string\\"}", isOverride: true)] public string RequiredString { - get => GetInstanceProperty()!; + get; + set; } [JsiiOptional] - [JsiiProperty(name: "optionalBoolean", typeJson: "{\\"primitive\\":\\"boolean\\"}", isOptional: true)] + [JsiiProperty(name: "optionalBoolean", typeJson: "{\\"primitive\\":\\"boolean\\"}", isOptional: true, isOverride: true)] public bool? OptionalBoolean { - get => GetInstanceProperty(); + get; + set; } [JsiiOptional] - [JsiiProperty(name: "optionalStructA", typeJson: "{\\"fqn\\":\\"jsii-calc.StructA\\"}", isOptional: true)] + [JsiiProperty(name: "optionalStructA", typeJson: "{\\"fqn\\":\\"jsii-calc.StructA\\"}", isOptional: true, isOverride: true)] public Amazon.JSII.Tests.CalculatorNamespace.IStructA? OptionalStructA { - get => GetInstanceProperty(); + get; + set; } } } @@ -29392,41 +13336,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructParameterTypeProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - /// 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 - /// - [JsiiTypeProxy(nativeType: typeof(IStructParameterType), fullyQualifiedName: "jsii-calc.StructParameterType")] - internal sealed class StructParameterTypeProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IStructParameterType - { - private StructParameterTypeProxy(ByRefValue reference): base(reference) - { - } - - [JsiiProperty(name: "scope", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string Scope - { - get => GetInstanceProperty()!; - } - - [JsiiOptional] - [JsiiProperty(name: "props", typeJson: "{\\"primitive\\":\\"boolean\\"}", isOptional: true)] - public bool? Props - { - get => GetInstanceProperty(); - } - } -} - -`; - exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructPassing.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -29559,51 +13468,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructWithJavaReservedWordsProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(IStructWithJavaReservedWords), fullyQualifiedName: "jsii-calc.StructWithJavaReservedWords")] - internal sealed class StructWithJavaReservedWordsProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IStructWithJavaReservedWords - { - private StructWithJavaReservedWordsProxy(ByRefValue reference): base(reference) - { - } - - [JsiiProperty(name: "default", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string Default - { - get => GetInstanceProperty()!; - } - - [JsiiOptional] - [JsiiProperty(name: "assert", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] - public string? Assert - { - get => GetInstanceProperty(); - } - - [JsiiOptional] - [JsiiProperty(name: "result", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] - public string? Result - { - get => GetInstanceProperty(); - } - - [JsiiOptional] - [JsiiProperty(name: "that", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] - public string? That - { - get => GetInstanceProperty(); - } - } -} - -`; - exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/BackReferences/IMyClassReference.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -29619,6 +13483,20 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.BackReferences { get; } + + [JsiiTypeProxy(nativeType: typeof(IMyClassReference), fullyQualifiedName: "jsii-calc.submodule.back_references.MyClassReference")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Submodule.BackReferences.IMyClassReference + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiProperty(name: "reference", typeJson: "{\\"fqn\\":\\"jsii-calc.submodule.MyClass\\"}")] + public Amazon.JSII.Tests.CalculatorNamespace.Submodule.MyClass Reference + { + get => GetInstanceProperty()!; + } + } } } @@ -29647,30 +13525,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.BackReferences `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/BackReferences/MyClassReferenceProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.BackReferences -{ - [JsiiTypeProxy(nativeType: typeof(IMyClassReference), fullyQualifiedName: "jsii-calc.submodule.back_references.MyClassReference")] - internal sealed class MyClassReferenceProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Submodule.BackReferences.IMyClassReference - { - private MyClassReferenceProxy(ByRefValue reference): base(reference) - { - } - - [JsiiProperty(name: "reference", typeJson: "{\\"fqn\\":\\"jsii-calc.submodule.MyClass\\"}")] - public Amazon.JSII.Tests.CalculatorNamespace.Submodule.MyClass Reference - { - get => GetInstanceProperty()!; - } - } -} - -`; - exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/Child/Awesomeness.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -29734,6 +13588,27 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child return null; } } + + [JsiiTypeProxy(nativeType: typeof(IKwargsProps), fullyQualifiedName: "jsii-calc.submodule.child.KwargsProps")] + new internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.IKwargsProps + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiOptional] + [JsiiProperty(name: "extra", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] + public string? Extra + { + get => GetInstanceProperty(); + } + + [JsiiProperty(name: "prop", typeJson: "{\\"fqn\\":\\"jsii-calc.submodule.child.SomeEnum\\"}")] + public Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.SomeEnum Prop + { + get => GetInstanceProperty()!; + } + } } } @@ -29754,6 +13629,20 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child { get; } + + [JsiiTypeProxy(nativeType: typeof(ISomeStruct), fullyQualifiedName: "jsii-calc.submodule.child.SomeStruct")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.ISomeStruct + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiProperty(name: "prop", typeJson: "{\\"fqn\\":\\"jsii-calc.submodule.child.SomeEnum\\"}")] + public Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.SomeEnum Prop + { + get => GetInstanceProperty()!; + } + } } } @@ -29774,6 +13663,20 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child { get; } + + [JsiiTypeProxy(nativeType: typeof(IStructure), fullyQualifiedName: "jsii-calc.submodule.child.Structure")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.IStructure + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiProperty(name: "bool", typeJson: "{\\"primitive\\":\\"boolean\\"}")] + public bool Bool + { + get => GetInstanceProperty()!; + } + } } } @@ -29847,37 +13750,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/Child/KwargsPropsProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child -{ - [JsiiTypeProxy(nativeType: typeof(IKwargsProps), fullyQualifiedName: "jsii-calc.submodule.child.KwargsProps")] - internal sealed class KwargsPropsProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.IKwargsProps - { - private KwargsPropsProxy(ByRefValue reference): base(reference) - { - } - - [JsiiOptional] - [JsiiProperty(name: "extra", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] - public string? Extra - { - get => GetInstanceProperty(); - } - - [JsiiProperty(name: "prop", typeJson: "{\\"fqn\\":\\"jsii-calc.submodule.child.SomeEnum\\"}")] - public Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.SomeEnum Prop - { - get => GetInstanceProperty()!; - } - } -} - -`; - exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/Child/OuterClass.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -29961,30 +13833,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/Child/SomeStructProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child -{ - [JsiiTypeProxy(nativeType: typeof(ISomeStruct), fullyQualifiedName: "jsii-calc.submodule.child.SomeStruct")] - internal sealed class SomeStructProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.ISomeStruct - { - private SomeStructProxy(ByRefValue reference): base(reference) - { - } - - [JsiiProperty(name: "prop", typeJson: "{\\"fqn\\":\\"jsii-calc.submodule.child.SomeEnum\\"}")] - public Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.SomeEnum Prop - { - get => GetInstanceProperty()!; - } - } -} - -`; - exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/Child/Structure.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -30008,30 +13856,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/Child/StructureProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child -{ - [JsiiTypeProxy(nativeType: typeof(IStructure), fullyQualifiedName: "jsii-calc.submodule.child.Structure")] - internal sealed class StructureProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.IStructure - { - private StructureProxy(ByRefValue reference): base(reference) - { - } - - [JsiiProperty(name: "bool", typeJson: "{\\"primitive\\":\\"boolean\\"}")] - public bool Bool - { - get => GetInstanceProperty()!; - } - } -} - -`; - exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/Isolated/Kwargs.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -30095,6 +13919,12 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule { } + [JsiiMethod(name: "methodWithSpecialParam", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"param\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.submodule.param.SpecialParameter\\"}}]")] + public virtual string MethodWithSpecialParam(Amazon.JSII.Tests.CalculatorNamespace.Submodule.Param.ISpecialParameter param) + { + return InvokeInstanceMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.Submodule.Param.ISpecialParameter)}, new object[]{param})!; + } + [JsiiProperty(name: "awesomeness", typeJson: "{\\"fqn\\":\\"jsii-calc.submodule.child.Awesomeness\\"}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.Awesomeness Awesomeness { @@ -30146,29 +13976,19 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.NestedSubmodule.Deeply { get; } - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/NestedSubmodule/DeeplyNested/INamespacedProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 -namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.NestedSubmodule.DeeplyNested -{ - [JsiiTypeProxy(nativeType: typeof(INamespaced), fullyQualifiedName: "jsii-calc.submodule.nested_submodule.deeplyNested.INamespaced")] - internal sealed class INamespacedProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Submodule.NestedSubmodule.DeeplyNested.INamespaced - { - private INamespacedProxy(ByRefValue reference): base(reference) + [JsiiTypeProxy(nativeType: typeof(INamespaced), fullyQualifiedName: "jsii-calc.submodule.nested_submodule.deeplyNested.INamespaced")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Submodule.NestedSubmodule.DeeplyNested.INamespaced { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - [JsiiProperty(name: "definedAt", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string DefinedAt - { - get => GetInstanceProperty()!; + [JsiiProperty(name: "definedAt", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string DefinedAt + { + get => GetInstanceProperty()!; + } } } } @@ -30210,29 +14030,114 @@ namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.NestedSubmodule { get; } + + [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Submodule.NestedSubmodule.Namespaced), fullyQualifiedName: "jsii-calc.submodule.nested_submodule.Namespaced")] + internal sealed class _Proxy : Amazon.JSII.Tests.CalculatorNamespace.Submodule.NestedSubmodule.Namespaced + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiProperty(name: "goodness", typeJson: "{\\"fqn\\":\\"jsii-calc.submodule.child.Goodness\\"}")] + public override Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.Goodness Goodness + { + get => GetInstanceProperty()!; + } + } } } `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/NestedSubmodule/NamespacedProxy.cs 1`] = ` +exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/Param/ISpecialParameter.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 -namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.NestedSubmodule +namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.Param { - [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Submodule.NestedSubmodule.Namespaced), fullyQualifiedName: "jsii-calc.submodule.nested_submodule.Namespaced")] - internal sealed class NamespacedProxy : Amazon.JSII.Tests.CalculatorNamespace.Submodule.NestedSubmodule.Namespaced + [JsiiInterface(nativeType: typeof(ISpecialParameter), fullyQualifiedName: "jsii-calc.submodule.param.SpecialParameter")] + public interface ISpecialParameter { - private NamespacedProxy(ByRefValue reference): base(reference) + [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"string\\"}")] + string Value + { + get; + } + + [JsiiTypeProxy(nativeType: typeof(ISpecialParameter), fullyQualifiedName: "jsii-calc.submodule.param.SpecialParameter")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Submodule.Param.ISpecialParameter { + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"string\\"}")] + public string Value + { + get => GetInstanceProperty()!; + } } + } +} - [JsiiProperty(name: "goodness", typeJson: "{\\"fqn\\":\\"jsii-calc.submodule.child.Goodness\\"}")] - public override Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.Goodness Goodness +`; + +exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/Param/SpecialParameter.cs 1`] = ` +using Amazon.JSII.Runtime.Deputy; + +#pragma warning disable CS0672,CS0809,CS1591 + +namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.Param +{ + #pragma warning disable CS8618 + + [JsiiByValue(fqn: "jsii-calc.submodule.param.SpecialParameter")] + public class SpecialParameter : Amazon.JSII.Tests.CalculatorNamespace.Submodule.Param.ISpecialParameter + { + [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"string\\"}", isOverride: true)] + public string Value { - get => GetInstanceProperty()!; + get; + set; + } + } +} + +`; + +exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/Returnsparam/ReturnsSpecialParameter.cs 1`] = ` +using Amazon.JSII.Runtime.Deputy; + +#pragma warning disable CS0672,CS0809,CS1591 + +namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.Returnsparam +{ + [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Submodule.Returnsparam.ReturnsSpecialParameter), fullyQualifiedName: "jsii-calc.submodule.returnsparam.ReturnsSpecialParameter")] + public class ReturnsSpecialParameter : DeputyBase + { + public ReturnsSpecialParameter(): 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 ReturnsSpecialParameter(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 ReturnsSpecialParameter(DeputyProps props): base(props) + { + } + + [JsiiMethod(name: "returnsSpecialParam", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.submodule.param.SpecialParameter\\"}}")] + public virtual Amazon.JSII.Tests.CalculatorNamespace.Submodule.Param.ISpecialParameter ReturnsSpecialParam() + { + return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } @@ -30375,42 +14280,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SupportsNiceJavaBuilderPropsProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(ISupportsNiceJavaBuilderProps), fullyQualifiedName: "jsii-calc.SupportsNiceJavaBuilderProps")] - internal sealed class SupportsNiceJavaBuilderPropsProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.ISupportsNiceJavaBuilderProps - { - private SupportsNiceJavaBuilderPropsProxy(ByRefValue reference): base(reference) - { - } - - /// Some number, like 42. - [JsiiProperty(name: "bar", typeJson: "{\\"primitive\\":\\"number\\"}")] - public double Bar - { - get => GetInstanceProperty()!; - } - - /// 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. - /// - [JsiiOptional] - [JsiiProperty(name: "id", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] - public string? Id - { - get => GetInstanceProperty(); - } - } -} - -`; - exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SupportsNiceJavaBuilderWithRequiredProps.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -30678,46 +14547,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/TopLevelStructProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(ITopLevelStruct), fullyQualifiedName: "jsii-calc.TopLevelStruct")] - internal sealed class TopLevelStructProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.ITopLevelStruct - { - private TopLevelStructProxy(ByRefValue reference): base(reference) - { - } - - /// This is a required field. - [JsiiProperty(name: "required", typeJson: "{\\"primitive\\":\\"string\\"}")] - public string Required - { - get => GetInstanceProperty()!; - } - - /// A union to really stress test our serialization. - [JsiiProperty(name: "secondLevel", typeJson: "{\\"union\\":{\\"types\\":[{\\"primitive\\":\\"number\\"},{\\"fqn\\":\\"jsii-calc.SecondLevelStruct\\"}]}}")] - public object SecondLevel - { - get => GetInstanceProperty()!; - } - - /// You don't have to pass this. - [JsiiOptional] - [JsiiProperty(name: "optional", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] - public string? Optional - { - get => GetInstanceProperty(); - } - } -} - -`; - exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UmaskCheck.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -30791,46 +14620,36 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { get => GetInstanceProperty()!; } - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnaryOperationProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - /// An operation on a single operand. - [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.UnaryOperation), fullyQualifiedName: "jsii-calc.UnaryOperation")] - internal sealed class UnaryOperationProxy : Amazon.JSII.Tests.CalculatorNamespace.UnaryOperation - { - private UnaryOperationProxy(ByRefValue reference): base(reference) + /// An operation on a single operand. + [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.UnaryOperation), fullyQualifiedName: "jsii-calc.UnaryOperation")] + internal sealed class _Proxy : Amazon.JSII.Tests.CalculatorNamespace.UnaryOperation { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - /// (deprecated) The value. - /// - /// Stability: Deprecated - /// - [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"number\\"}")] - [System.Obsolete()] - public override double Value - { - get => GetInstanceProperty()!; - } + /// (deprecated) The value. + /// + /// Stability: Deprecated + /// + [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"number\\"}")] + [System.Obsolete()] + public override double Value + { + get => GetInstanceProperty()!; + } - /// (deprecated) String representation of the value. - /// - /// Stability: Deprecated - /// - [JsiiMethod(name: "toString", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", isOverride: true)] - [System.Obsolete()] - public override string ToString() - { - return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; + /// (deprecated) String representation of the value. + /// + /// Stability: Deprecated + /// + [JsiiMethod(name: "toString", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", isOverride: true)] + [System.Obsolete()] + public override string ToString() + { + return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; + } } } } @@ -30868,37 +14687,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnionPropertiesProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 - -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - [JsiiTypeProxy(nativeType: typeof(IUnionProperties), fullyQualifiedName: "jsii-calc.UnionProperties")] - internal sealed class UnionPropertiesProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IUnionProperties - { - private UnionPropertiesProxy(ByRefValue reference): base(reference) - { - } - - [JsiiProperty(name: "bar", typeJson: "{\\"union\\":{\\"types\\":[{\\"primitive\\":\\"string\\"},{\\"primitive\\":\\"number\\"},{\\"fqn\\":\\"jsii-calc.AllTypes\\"}]}}")] - public object Bar - { - get => GetInstanceProperty()!; - } - - [JsiiOptional] - [JsiiProperty(name: "foo", typeJson: "{\\"union\\":{\\"types\\":[{\\"primitive\\":\\"string\\"},{\\"primitive\\":\\"number\\"}]}}", isOptional: true)] - public object? Foo - { - get => GetInstanceProperty(); - } - } -} - -`; - exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UpcasingReflectable.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -31270,37 +15058,27 @@ namespace Amazon.JSII.Tests.CalculatorNamespace { get => GetInstanceProperty()!; } - } -} - -`; - -exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VoidCallbackProxy.cs 1`] = ` -using Amazon.JSII.Runtime.Deputy; - -#pragma warning disable CS0672,CS0809,CS1591 -namespace Amazon.JSII.Tests.CalculatorNamespace -{ - /// This test is used to validate the runtimes can return correctly from a void callback. - /// - /// - /// Implement overrideMe (method does not have to do anything). - /// Invoke callMe - /// Verify that methodWasCalled is true. - /// - /// - [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.VoidCallback), fullyQualifiedName: "jsii-calc.VoidCallback")] - internal sealed class VoidCallbackProxy : Amazon.JSII.Tests.CalculatorNamespace.VoidCallback - { - private VoidCallbackProxy(ByRefValue reference): base(reference) + /// This test is used to validate the runtimes can return correctly from a void callback. + /// + /// + /// Implement overrideMe (method does not have to do anything). + /// Invoke callMe + /// Verify that methodWasCalled is true. + /// + /// + [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.VoidCallback), fullyQualifiedName: "jsii-calc.VoidCallback")] + internal sealed class _Proxy : Amazon.JSII.Tests.CalculatorNamespace.VoidCallback { - } + private _Proxy(ByRefValue reference): base(reference) + { + } - [JsiiMethod(name: "overrideMe")] - protected override void OverrideMe() - { - InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); + [JsiiMethod(name: "overrideMe")] + protected override void OverrideMe() + { + InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); + } } } } @@ -31349,8 +15127,8 @@ namespace Amazon.JSII.Tests.CalculatorNamespace exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/AssemblyInfo.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; -[assembly: JsiiAssembly("jsii-calc", "0.0.0", "jsii-calc-0.0.0.tgz")] +[assembly: JsiiAssembly("jsii-calc", "3.20.120", "jsii-calc-3.20.120.tgz")] `; -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": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/jsii-calc-3.20.120.tgz 1`] = `dotnet/Amazon.JSII.Tests.CalculatorPackageId/jsii-calc-3.20.120.tgz is a tarball`; diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-go.test.ts.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-go.test.ts.snap index 4a464620df..102f224af7 100644 --- a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-go.test.ts.snap +++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-go.test.ts.snap @@ -2,22 +2,36 @@ exports[`Generated code for "@scope/jsii-calc-base": / 1`] = ` - โ”—โ” ๐Ÿ“ golang + โ”—โ” ๐Ÿ“ go โ”—โ” ๐Ÿ“ scopejsiicalcbase + โ”ฃโ” ๐Ÿ“„ go.mod โ”ฃโ” ๐Ÿ“ jsii โ”ƒ โ”ฃโ” ๐Ÿ“„ jsii.go โ”ƒ โ”—โ” ๐Ÿ“„ tarball.embedded.go - โ”—โ” ๐Ÿ“„ scopejsiicalcbase.go + โ”ฃโ” ๐Ÿ“„ scopejsiicalcbase.go + โ”—โ” ๐Ÿ“„ version `; -exports[`Generated code for "@scope/jsii-calc-base": /golang/scopejsiicalcbase/jsii/jsii.go 1`] = ` +exports[`Generated code for "@scope/jsii-calc-base": /go/scopejsiicalcbase/go.mod 1`] = ` +module github.com/aws/jsii/jsii-calc/go/scopejsiicalcbase + +go 1.15 + +require ( + github.com/aws/jsii-runtime-go v0.0.0 + github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2 v2.1.1 +) + +`; + +exports[`Generated code for "@scope/jsii-calc-base": /go/scopejsiicalcbase/jsii/jsii.go 1`] = ` package jsii import ( - rt "github.com/aws-cdk/jsii/jsii-experimental" + rt "github.com/aws/jsii-runtime-go" "sync" // Initialization endpoints of dependencies - scopejsiicalcbaseofbase "github.com/aws-cdk/jsii/jsii-calc/golang/scopejsiicalcbaseofbase/jsii" + scopejsiicalcbaseofbase "github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2/jsii" ) var once sync.Once @@ -36,21 +50,22 @@ func Initialize() { `; -exports[`Generated code for "@scope/jsii-calc-base": /golang/scopejsiicalcbase/jsii/tarball.embedded.go 1`] = `golang/scopejsiicalcbase/jsii/tarball.embedded.go embeds a tarball`; +exports[`Generated code for "@scope/jsii-calc-base": /go/scopejsiicalcbase/jsii/tarball.embedded.go 1`] = `go/scopejsiicalcbase/jsii/tarball.embedded.go embeds a tarball`; -exports[`Generated code for "@scope/jsii-calc-base": /golang/scopejsiicalcbase/scopejsiicalcbase.go 1`] = ` +exports[`Generated code for "@scope/jsii-calc-base": /go/scopejsiicalcbase/scopejsiicalcbase.go 1`] = ` // An example direct dependency for jsii-calc. package scopejsiicalcbase import ( - "github.com/aws-cdk/jsii/jsii-experimental" - "github.com/aws-cdk/jsii/jsii-calc/golang/scopejsiicalcbaseofbase" - _init_ "github.com/aws-cdk/jsii/jsii-calc/golang/scopejsiicalcbase/jsii" + _jsii_ "github.com/aws/jsii-runtime-go" + _init_ "github.com/aws/jsii/jsii-calc/go/scopejsiicalcbase/jsii" + "reflect" + "github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2" ) // Class interface type BaseIface interface { - TypeName() jsii.Any + TypeName() interface{} } // A base class. @@ -60,67 +75,169 @@ type Base struct { func NewBase() BaseIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Base", - Method: "Constructor", - Args: []string{}, - }) - return &Base{} -} - -func (b *Base) TypeName() jsii.Any { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Base", - Method: "TypeName", - Args: []string{}, - }) - return nil + self := Base{} + _jsii_.Create( + "@scope/jsii-calc-base.Base", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self +} + +func (b *Base) TypeName() interface{} { + var returns interface{} + _jsii_.Invoke( + b, + "typeName", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // BasePropsIface is the public interface for the custom type BaseProps type BasePropsIface interface { - GetFoo() scopejsiicalcbaseofbase.Very + GetFoo() scopejsiicalcbaseofbase.VeryIface GetBar() string } // Struct proxy type BaseProps struct { - Foo scopejsiicalcbaseofbase.Very - Bar string + Foo scopejsiicalcbaseofbase.VeryIface \`json:"foo"\` + Bar string \`json:"bar"\` } -func (b *BaseProps) GetFoo() scopejsiicalcbaseofbase.Very { - return b.Foo +func (b *BaseProps) GetFoo() scopejsiicalcbaseofbase.VeryIface { + var returns scopejsiicalcbaseofbase.VeryIface + _jsii_.Get( + b, + "foo", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*scopejsiicalcbaseofbase.VeryIface)(nil)).Elem(): reflect.TypeOf((*scopejsiicalcbaseofbase.Very)(nil)).Elem(), + }, + ) + return returns } func (b *BaseProps) GetBar() string { - return b.Bar + var returns string + _jsii_.Get( + b, + "bar", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } -type IBaseInterface interface { - scopejsiicalcbaseofbase.IVeryBaseInterface +type IBaseInterfaceIface interface { + scopejsiicalcbaseofbase.IVeryBaseInterfaceIface Bar() } +type IBaseInterface struct {} + +func (i *IBaseInterface) Foo() { + var returns interface{} + _jsii_.Invoke( + i, + "foo", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) +} + +func (i *IBaseInterface) Bar() { + var returns interface{} + _jsii_.Invoke( + i, + "bar", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) +} + +// Class interface +type StaticConsumerIface interface { +} + +// Hides the transitive dependency of base-of-base. +// Struct proxy +type StaticConsumer struct { +} + +func NewStaticConsumer() StaticConsumerIface { + _init_.Initialize() + self := StaticConsumer{} + _jsii_.Create( + "@scope/jsii-calc-base.StaticConsumer", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self +} + +func StaticConsumer_Consume(args interface{}) { + _init_.Initialize() + var returns interface{} + _jsii_.InvokeStatic( + "@scope/jsii-calc-base.StaticConsumer", + "consume", + []interface{}{args}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) +} + + +`; + +exports[`Generated code for "@scope/jsii-calc-base": /go/scopejsiicalcbase/version 1`] = ` +0.0.0 `; exports[`Generated code for "@scope/jsii-calc-base-of-base": / 1`] = ` - โ”—โ” ๐Ÿ“ golang + โ”—โ” ๐Ÿ“ go โ”—โ” ๐Ÿ“ scopejsiicalcbaseofbase + โ”ฃโ” ๐Ÿ“„ go.mod โ”ฃโ” ๐Ÿ“ jsii โ”ƒ โ”ฃโ” ๐Ÿ“„ jsii.go โ”ƒ โ”—โ” ๐Ÿ“„ tarball.embedded.go - โ”—โ” ๐Ÿ“„ scopejsiicalcbaseofbase.go + โ”ฃโ” ๐Ÿ“„ scopejsiicalcbaseofbase.go + โ”—โ” ๐Ÿ“„ version `; -exports[`Generated code for "@scope/jsii-calc-base-of-base": /golang/scopejsiicalcbaseofbase/jsii/jsii.go 1`] = ` +exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/go.mod 1`] = ` +module github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2 + +go 1.15 + +require ( + github.com/aws/jsii-runtime-go v0.0.0 +) + +`; + +exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/jsii/jsii.go 1`] = ` package jsii import ( - rt "github.com/aws-cdk/jsii/jsii-experimental" + rt "github.com/aws/jsii-runtime-go" "sync" ) @@ -131,27 +248,42 @@ var once sync.Once func Initialize() { once.Do(func(){ // Load this library into the kernel - rt.Load("@scope/jsii-calc-base-of-base", "0.0.0", tarball) + rt.Load("@scope/jsii-calc-base-of-base", "2.1.1", tarball) }) } `; -exports[`Generated code for "@scope/jsii-calc-base-of-base": /golang/scopejsiicalcbaseofbase/jsii/tarball.embedded.go 1`] = `golang/scopejsiicalcbaseofbase/jsii/tarball.embedded.go embeds a tarball`; +exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/jsii/tarball.embedded.go 1`] = `go/scopejsiicalcbaseofbase/jsii/tarball.embedded.go embeds a tarball`; -exports[`Generated code for "@scope/jsii-calc-base-of-base": /golang/scopejsiicalcbaseofbase/scopejsiicalcbaseofbase.go 1`] = ` +exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/scopejsiicalcbaseofbase.go 1`] = ` // An example transitive dependency for jsii-calc. package scopejsiicalcbaseofbase import ( - "github.com/aws-cdk/jsii/jsii-experimental" - _init_ "github.com/aws-cdk/jsii/jsii-calc/golang/scopejsiicalcbaseofbase/jsii" + _jsii_ "github.com/aws/jsii-runtime-go" + _init_ "github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2/jsii" + "reflect" ) -type IVeryBaseInterface interface { +type IVeryBaseInterfaceIface interface { Foo() } +type IVeryBaseInterface struct {} + +func (i *IVeryBaseInterface) Foo() { + var returns interface{} + _jsii_.Invoke( + i, + "foo", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) +} + // Class interface type StaticConsumerIface interface { } @@ -160,13 +292,17 @@ type StaticConsumerIface interface { type StaticConsumer struct { } -func StaticConsumer_Consume(_args jsii.Any) { +func StaticConsumer_Consume(_args interface{}) { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "StaticConsumer", - Method: "Consume", - Args: []string{"any",}, - }) + var returns interface{} + _jsii_.InvokeStatic( + "@scope/jsii-calc-base-of-base.StaticConsumer", + "consume", + []interface{}{_args}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } // Class interface @@ -182,62 +318,98 @@ type Very struct { func NewVery() VeryIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Very", - Method: "Constructor", - Args: []string{}, - }) - return &Very{} + self := Very{} + _jsii_.Create( + "@scope/jsii-calc-base-of-base.Very", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (v *Very) Hey() float64 { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Very", - Method: "Hey", - Args: []string{}, - }) - return 0.0 + var returns float64 + _jsii_.Invoke( + v, + "hey", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // VeryBasePropsIface is the public interface for the custom type VeryBaseProps type VeryBasePropsIface interface { - GetFoo() Very + GetFoo() VeryIface } // Struct proxy type VeryBaseProps struct { - Foo Very + Foo VeryIface \`json:"foo"\` } -func (v *VeryBaseProps) GetFoo() Very { - return v.Foo +func (v *VeryBaseProps) GetFoo() VeryIface { + var returns VeryIface + _jsii_.Get( + v, + "foo", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*VeryIface)(nil)).Elem(): reflect.TypeOf((*Very)(nil)).Elem(), + }, + ) + return returns } +`; + +exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/version 1`] = ` +2.1.1 + `; exports[`Generated code for "@scope/jsii-calc-lib": / 1`] = ` - โ”—โ” ๐Ÿ“ golang + โ”—โ” ๐Ÿ“ go โ”—โ” ๐Ÿ“ scopejsiicalclib + โ”ฃโ” ๐Ÿ“„ go.mod โ”ฃโ” ๐Ÿ“ jsii โ”ƒ โ”ฃโ” ๐Ÿ“„ jsii.go โ”ƒ โ”—โ” ๐Ÿ“„ tarball.embedded.go โ”ฃโ” ๐Ÿ“„ scopejsiicalclib.go - โ”—โ” ๐Ÿ“ submodule - โ”—โ” ๐Ÿ“„ submodule.go + โ”ฃโ” ๐Ÿ“ submodule + โ”ƒ โ”—โ” ๐Ÿ“„ submodule.go + โ”—โ” ๐Ÿ“„ version +`; + +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/go.mod 1`] = ` +module github.com/aws/jsii/jsii-calc/go/scopejsiicalclib + +go 1.15 + +require ( + github.com/aws/jsii-runtime-go v0.0.0 + github.com/aws/jsii/jsii-calc/go/scopejsiicalcbase v0.0.0 + github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2 v2.1.1 +) + `; -exports[`Generated code for "@scope/jsii-calc-lib": /golang/scopejsiicalclib/jsii/jsii.go 1`] = ` +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/jsii/jsii.go 1`] = ` package jsii import ( - rt "github.com/aws-cdk/jsii/jsii-experimental" + rt "github.com/aws/jsii-runtime-go" "sync" // Initialization endpoints of dependencies - scopejsiicalcbase "github.com/aws-cdk/jsii/jsii-calc/golang/scopejsiicalcbase/jsii" - scopejsiicalcbaseofbase "github.com/aws-cdk/jsii/jsii-calc/golang/scopejsiicalcbaseofbase/jsii" + scopejsiicalcbase "github.com/aws/jsii/jsii-calc/go/scopejsiicalcbase/jsii" + scopejsiicalcbaseofbase "github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2/jsii" ) var once sync.Once @@ -257,21 +429,22 @@ func Initialize() { `; -exports[`Generated code for "@scope/jsii-calc-lib": /golang/scopejsiicalclib/jsii/tarball.embedded.go 1`] = `golang/scopejsiicalclib/jsii/tarball.embedded.go embeds a tarball`; +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/jsii/tarball.embedded.go 1`] = `go/scopejsiicalclib/jsii/tarball.embedded.go embeds a tarball`; -exports[`Generated code for "@scope/jsii-calc-lib": /golang/scopejsiicalclib/scopejsiicalclib.go 1`] = ` +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib.go 1`] = ` // A simple calcuator library built on JSII. package scopejsiicalclib import ( - "github.com/aws-cdk/jsii/jsii-experimental" - "github.com/aws-cdk/jsii/jsii-calc/golang/scopejsiicalcbaseofbase" - "github.com/aws-cdk/jsii/jsii-calc/golang/scopejsiicalcbase" - _init_ "github.com/aws-cdk/jsii/jsii-calc/golang/scopejsiicalclib/jsii" + _jsii_ "github.com/aws/jsii-runtime-go" + _init_ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/jsii" + "reflect" + "github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2" + "github.com/aws/jsii/jsii-calc/go/scopejsiicalcbase" ) // Check that enums from \\@scoped packages can be references. -// +// // See awslabs/jsii#138 // Deprecated. type EnumFromScopedModule string @@ -283,34 +456,100 @@ const ( // The general contract for a concrete number. // Deprecated. -type IDoublable interface { +type IDoublableIface interface { // Deprecated. GetDoubleValue() float64 } +type IDoublable struct {} + +func (i *IDoublable) GetDoubleValue() float64 { + var returns float64 + _jsii_.Get( + i, + "doubleValue", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + // Applies to classes that are considered friendly. -// +// // These classes can be greeted with // a "hello" or "goodbye" blessing and they will respond back in a fun and friendly manner. // Deprecated. -type IFriendly interface { +type IFriendlyIface interface { // Say hello! // Deprecated. Hello() string } +type IFriendly struct {} + +func (i *IFriendly) Hello() string { + var returns string + _jsii_.Invoke( + i, + "hello", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + // Interface that inherits from packages 2 levels up the tree. -// +// // Their presence validates that .NET/Java/jsii-reflect can track all fields // far enough up the tree. // Deprecated. -type IThreeLevelsInterface interface { - scopejsiicalcbaseofbase.IVeryBaseInterface - scopejsiicalcbase.IBaseInterface +type IThreeLevelsInterfaceIface interface { + scopejsiicalcbaseofbase.IVeryBaseInterfaceIface + scopejsiicalcbase.IBaseInterfaceIface // Deprecated. Baz() } +type IThreeLevelsInterface struct {} + +func (i *IThreeLevelsInterface) Foo() { + var returns interface{} + _jsii_.Invoke( + i, + "foo", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) +} + +func (i *IThreeLevelsInterface) Bar() { + var returns interface{} + _jsii_.Invoke( + i, + "bar", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) +} + +func (i *IThreeLevelsInterface) Baz() { + var returns interface{} + _jsii_.Invoke( + i, + "baz", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) +} + // MyFirstStructIface is the public interface for the custom type MyFirstStruct // Deprecated. type MyFirstStructIface interface { @@ -325,35 +564,56 @@ type MyFirstStructIface interface { type MyFirstStruct struct { // An awesome number value. // Deprecated. - Anumber float64 + Anumber float64 \`json:"anumber"\` // A string value. // Deprecated. - Astring string + Astring string \`json:"astring"\` // Deprecated. - FirstOptional []string + FirstOptional []string \`json:"firstOptional"\` } func (m *MyFirstStruct) GetAnumber() float64 { - return m.Anumber + var returns float64 + _jsii_.Get( + m, + "anumber", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (m *MyFirstStruct) GetAstring() string { - return m.Astring + var returns string + _jsii_.Get( + m, + "astring", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (m *MyFirstStruct) GetFirstOptional() []string { - return m.FirstOptional + var returns []string + _jsii_.Get( + m, + "firstOptional", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*string)(nil)).Elem(): reflect.TypeOf((*string)(nil)).Elem(), + }, + ) + return returns } // Class interface type NumberIface interface { - IDoublable + IDoublableIface GetValue() float64 - SetValue(val float64) GetDoubleValue() float64 - SetDoubleValue(val float64) - TypeName() jsii.Any + TypeName() interface{} ToString() string } @@ -363,63 +623,79 @@ type NumberIface interface { type Number struct { // The number. // Deprecated. - Value float64 + Value float64 \`json:"value"\` // The number multiplied by 2. // Deprecated. - DoubleValue float64 + DoubleValue float64 \`json:"doubleValue"\` } func (n *Number) GetValue() float64 { - return n.Value + var returns float64 + _jsii_.Get( + n, + "value", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (n *Number) GetDoubleValue() float64 { - return n.DoubleValue + var returns float64 + _jsii_.Get( + n, + "doubleValue", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Creates a Number object. func NewNumber(value float64) NumberIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Number", - Method: "Constructor", - Args: []string{"number",}, - }) - return &Number{} -} - -func (n *Number) SetValue(val float64) { - n.Value = val -} - -func (n *Number) SetDoubleValue(val float64) { - n.DoubleValue = val -} - -func (n *Number) TypeName() jsii.Any { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Number", - Method: "TypeName", - Args: []string{}, - }) - return nil + self := Number{} + _jsii_.Create( + "@scope/jsii-calc-lib.Number", + []interface{}{value}, + []_jsii_.FQN{"@scope/jsii-calc-lib.IDoublable"}, + []_jsii_.Override{}, + &self, + ) + return &self +} + +func (n *Number) TypeName() interface{} { + var returns interface{} + _jsii_.Invoke( + n, + "typeName", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (n *Number) ToString() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Number", - Method: "ToString", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + n, + "toString", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type NumericValueIface interface { GetValue() float64 - SetValue(val float64) - TypeName() jsii.Any + TypeName() interface{} ToString() string } @@ -429,51 +705,64 @@ type NumericValueIface interface { type NumericValue struct { // The value. // Deprecated. - Value float64 + Value float64 \`json:"value"\` } func (n *NumericValue) GetValue() float64 { - return n.Value + var returns float64 + _jsii_.Get( + n, + "value", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewNumericValue() NumericValueIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "NumericValue", - Method: "Constructor", - Args: []string{}, - }) - return &NumericValue{} -} - -func (n *NumericValue) SetValue(val float64) { - n.Value = val -} - -func (n *NumericValue) TypeName() jsii.Any { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "NumericValue", - Method: "TypeName", - Args: []string{}, - }) - return nil + self := NumericValue{} + _jsii_.Create( + "@scope/jsii-calc-lib.NumericValue", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self +} + +func (n *NumericValue) TypeName() interface{} { + var returns interface{} + _jsii_.Invoke( + n, + "typeName", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (n *NumericValue) ToString() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "NumericValue", - Method: "ToString", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + n, + "toString", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type OperationIface interface { GetValue() float64 - SetValue(val float64) - TypeName() jsii.Any + TypeName() interface{} ToString() string } @@ -483,44 +772,58 @@ type OperationIface interface { type Operation struct { // The value. // Deprecated. - Value float64 + Value float64 \`json:"value"\` } func (o *Operation) GetValue() float64 { - return o.Value + var returns float64 + _jsii_.Get( + o, + "value", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewOperation() OperationIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Operation", - Method: "Constructor", - Args: []string{}, - }) - return &Operation{} -} - -func (o *Operation) SetValue(val float64) { - o.Value = val -} - -func (o *Operation) TypeName() jsii.Any { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Operation", - Method: "TypeName", - Args: []string{}, - }) - return nil + self := Operation{} + _jsii_.Create( + "@scope/jsii-calc-lib.Operation", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self +} + +func (o *Operation) TypeName() interface{} { + var returns interface{} + _jsii_.Invoke( + o, + "typeName", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (o *Operation) ToString() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Operation", - Method: "ToString", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + o, + "toString", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // StructWithOnlyOptionalsIface is the public interface for the custom type StructWithOnlyOptionals @@ -537,41 +840,78 @@ type StructWithOnlyOptionalsIface interface { type StructWithOnlyOptionals struct { // The first optional! // Deprecated. - Optional1 string + Optional1 string \`json:"optional1"\` // Deprecated. - Optional2 float64 + Optional2 float64 \`json:"optional2"\` // Deprecated. - Optional3 bool + Optional3 bool \`json:"optional3"\` } func (s *StructWithOnlyOptionals) GetOptional1() string { - return s.Optional1 + var returns string + _jsii_.Get( + s, + "optional1", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (s *StructWithOnlyOptionals) GetOptional2() float64 { - return s.Optional2 + var returns float64 + _jsii_.Get( + s, + "optional2", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (s *StructWithOnlyOptionals) GetOptional3() bool { - return s.Optional3 + var returns bool + _jsii_.Get( + s, + "optional3", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } `; -exports[`Generated code for "@scope/jsii-calc-lib": /golang/scopejsiicalclib/submodule/submodule.go 1`] = ` +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/submodule/submodule.go 1`] = ` package submodule import ( - "github.com/aws-cdk/jsii/jsii-experimental" - _init_ "github.com/aws-cdk/jsii/jsii-calc/golang/scopejsiicalclib/jsii" + _jsii_ "github.com/aws/jsii-runtime-go" + _init_ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/jsii" + "reflect" ) // Deprecated. -type IReflectable interface { +type IReflectableIface interface { // Deprecated. - GetEntries() []ReflectableEntry + GetEntries() []ReflectableEntryIface +} + +type IReflectable struct {} + +func (i *IReflectable) GetEntries() []ReflectableEntryIface { + var returns []ReflectableEntryIface + _jsii_.Get( + i, + "entries", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*ReflectableEntryIface)(nil)).Elem(): reflect.TypeOf((*ReflectableEntry)(nil)).Elem(), + }, + ) + return returns } // Class interface @@ -587,7 +927,6 @@ type NestingClass struct { // Class interface type NestedClassIface interface { GetProperty() string - SetProperty(val string) } // This class is here to show we can use nested classes across module boundaries. @@ -595,26 +934,32 @@ type NestedClassIface interface { // Struct proxy type NestedClass struct { // Deprecated. - Property string + Property string \`json:"property"\` } func (n *NestedClass) GetProperty() string { - return n.Property + var returns string + _jsii_.Get( + n, + "property", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewNestedClass() NestedClassIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "NestedClass", - Method: "Constructor", - Args: []string{}, - }) - return &NestedClass{} -} - -func (n *NestedClass) SetProperty(val string) { - n.Property = val + self := NestedClass{} + _jsii_.Create( + "@scope/jsii-calc-lib.submodule.NestingClass.NestedClass", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } // NestedStructIface is the public interface for the custom type NestedStruct @@ -624,17 +969,24 @@ type NestedStructIface interface { } // This is a struct, nested within a class. -// +// // Normal. // Deprecated. // Struct proxy type NestedStruct struct { // Deprecated. - Name string + Name string \`json:"name"\` } func (n *NestedStruct) GetName() string { - return n.Name + var returns string + _jsii_.Get( + n, + "name", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } @@ -642,30 +994,44 @@ func (n *NestedStruct) GetName() string { // Deprecated. type ReflectableEntryIface interface { GetKey() string - GetValue() jsii.Any + GetValue() interface{} } // Deprecated. // Struct proxy type ReflectableEntry struct { // Deprecated. - Key string + Key string \`json:"key"\` // Deprecated. - Value jsii.Any + Value interface{} \`json:"value"\` } func (r *ReflectableEntry) GetKey() string { - return r.Key + var returns string + _jsii_.Get( + r, + "key", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } -func (r *ReflectableEntry) GetValue() jsii.Any { - return r.Value +func (r *ReflectableEntry) GetValue() interface{} { + var returns interface{} + _jsii_.Get( + r, + "value", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type ReflectorIface interface { - AsMap(reflectable IReflectable) map[string]jsii.Any + AsMap(reflectable IReflectableIface) map[string]interface{} } // Deprecated. @@ -675,34 +1041,49 @@ type Reflector struct { func NewReflector() ReflectorIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Reflector", - Method: "Constructor", - Args: []string{}, - }) - return &Reflector{} + self := Reflector{} + _jsii_.Create( + "@scope/jsii-calc-lib.submodule.Reflector", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self +} + +func (r *Reflector) AsMap(reflectable IReflectableIface) map[string]interface{} { + var returns map[string]interface{} + _jsii_.Invoke( + r, + "asMap", + []interface{}{reflectable}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*interface{})(nil)).Elem(): reflect.TypeOf((*interface{})(nil)).Elem(), + }, + ) + return returns } -func (r *Reflector) AsMap(reflectable IReflectable) map[string]jsii.Any { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Reflector", - Method: "AsMap", - Args: []string{"@scope/jsii-calc-lib.submodule.IReflectable",}, - }) - return nil -} +`; + +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/version 1`] = ` +0.0.0 `; exports[`Generated code for "jsii-calc": / 1`] = ` - โ”—โ” ๐Ÿ“ golang + โ”—โ” ๐Ÿ“ go โ”—โ” ๐Ÿ“ jsiicalc โ”ฃโ” ๐Ÿ“ composition โ”ƒ โ”—โ” ๐Ÿ“„ composition.go โ”ฃโ” ๐Ÿ“ derivedclasshasnoproperties โ”ƒ โ”—โ” ๐Ÿ“„ derivedclasshasnoproperties.go + โ”ฃโ” ๐Ÿ“„ go.mod โ”ฃโ” ๐Ÿ“ interfaceinnamespaceincludesclasses โ”ƒ โ”—โ” ๐Ÿ“„ interfaceinnamespaceincludesclasses.go โ”ฃโ” ๐Ÿ“ interfaceinnamespaceonlyinterface @@ -714,16 +1095,26 @@ exports[`Generated code for "jsii-calc": / 1`] = ` โ”ฃโ” ๐Ÿ“ pythonself โ”ƒ โ”—โ” ๐Ÿ“„ pythonself.go โ”ฃโ” ๐Ÿ“„ README.md - โ”—โ” ๐Ÿ“ submodule - โ”ฃโ” ๐Ÿ“„ backreferences.go - โ”ฃโ” ๐Ÿ“„ child.go - โ”ฃโ” ๐Ÿ“„ deeplynested.go - โ”ฃโ” ๐Ÿ“„ isolated.go - โ”ฃโ” ๐Ÿ“„ nestedsubmodule.go - โ”—โ” ๐Ÿ“„ submodule.go + โ”ฃโ” ๐Ÿ“ submodule + โ”ƒ โ”ฃโ” ๐Ÿ“ backreferences + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ backreferences.go + โ”ƒ โ”ฃโ” ๐Ÿ“ child + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ child.go + โ”ƒ โ”ฃโ” ๐Ÿ“ isolated + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ isolated.go + โ”ƒ โ”ฃโ” ๐Ÿ“ nestedsubmodule + โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“ deeplynested + โ”ƒ โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ deeplynested.go + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ nestedsubmodule.go + โ”ƒ โ”ฃโ” ๐Ÿ“ param + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ param.go + โ”ƒ โ”ฃโ” ๐Ÿ“ returnsparam + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ returnsparam.go + โ”ƒ โ”—โ” ๐Ÿ“„ submodule.go + โ”—โ” ๐Ÿ“„ version `; -exports[`Generated code for "jsii-calc": /golang/jsiicalc/README.md 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/README.md 1`] = ` # jsii Calculator This library is used to demonstrate and test the features of JSII @@ -753,28 +1144,27 @@ const foo = 'bar'; `; -exports[`Generated code for "jsii-calc": /golang/jsiicalc/composition/composition.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/composition/composition.go 1`] = ` package composition import ( - "github.com/aws-cdk/jsii/jsii-experimental" - "github.com/aws-cdk/jsii/jsii-calc/golang/scopejsiicalclib" - _init_ "github.com/aws-cdk/jsii/jsii-calc/golang/jsiicalc/jsii" + _jsii_ "github.com/aws/jsii-runtime-go" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" + "reflect" + "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" ) // Class interface type CompositeOperationIface interface { GetValue() float64 - SetValue(val float64) - GetExpression() scopejsiicalclib.NumericValue - SetExpression(val scopejsiicalclib.NumericValue) + GetExpression() scopejsiicalclib.NumericValueIface GetDecorationPostfixes() []string SetDecorationPostfixes(val []string) GetDecorationPrefixes() []string SetDecorationPrefixes(val []string) GetStringStyle() CompositionStringStyle SetStringStyle(val CompositionStringStyle) - TypeName() jsii.Any + TypeName() interface{} ToString() string } @@ -782,86 +1172,144 @@ type CompositeOperationIface interface { // Struct proxy type CompositeOperation struct { // (deprecated) The value. - Value float64 + Value float64 \`json:"value"\` // The expression that this operation consists of. - // + // // Must be implemented by derived classes. - Expression scopejsiicalclib.NumericValue + Expression scopejsiicalclib.NumericValueIface \`json:"expression"\` // A set of postfixes to include in a decorated .toString(). - DecorationPostfixes []string + DecorationPostfixes []string \`json:"decorationPostfixes"\` // A set of prefixes to include in a decorated .toString(). - DecorationPrefixes []string + DecorationPrefixes []string \`json:"decorationPrefixes"\` // The .toString() style. - StringStyle CompositionStringStyle + StringStyle CompositionStringStyle \`json:"stringStyle"\` } func (c *CompositeOperation) GetValue() float64 { - return c.Value -} - -func (c *CompositeOperation) GetExpression() scopejsiicalclib.NumericValue { - return c.Expression + var returns float64 + _jsii_.Get( + c, + "value", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (c *CompositeOperation) GetExpression() scopejsiicalclib.NumericValueIface { + var returns scopejsiicalclib.NumericValueIface + _jsii_.Get( + c, + "expression", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*scopejsiicalclib.NumericValueIface)(nil)).Elem(): reflect.TypeOf((*scopejsiicalclib.NumericValue)(nil)).Elem(), + }, + ) + return returns } func (c *CompositeOperation) GetDecorationPostfixes() []string { - return c.DecorationPostfixes + var returns []string + _jsii_.Get( + c, + "decorationPostfixes", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*string)(nil)).Elem(): reflect.TypeOf((*string)(nil)).Elem(), + }, + ) + return returns } func (c *CompositeOperation) GetDecorationPrefixes() []string { - return c.DecorationPrefixes + var returns []string + _jsii_.Get( + c, + "decorationPrefixes", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*string)(nil)).Elem(): reflect.TypeOf((*string)(nil)).Elem(), + }, + ) + return returns } func (c *CompositeOperation) GetStringStyle() CompositionStringStyle { - return c.StringStyle + var returns CompositionStringStyle + _jsii_.Get( + c, + "stringStyle", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*CompositionStringStyle)(nil)).Elem(): reflect.TypeOf((*CompositionStringStyle)(nil)).Elem(), + }, + ) + return returns } func NewCompositeOperation() CompositeOperationIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "CompositeOperation", - Method: "Constructor", - Args: []string{}, - }) - return &CompositeOperation{} -} - -func (c *CompositeOperation) SetValue(val float64) { - c.Value = val -} - -func (c *CompositeOperation) SetExpression(val scopejsiicalclib.NumericValue) { - c.Expression = val + self := CompositeOperation{} + _jsii_.Create( + "jsii-calc.composition.CompositeOperation", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (c *CompositeOperation) SetDecorationPostfixes(val []string) { - c.DecorationPostfixes = val + _jsii_.Set( + c, + "decorationPostfixes", + val, + ) } func (c *CompositeOperation) SetDecorationPrefixes(val []string) { - c.DecorationPrefixes = val + _jsii_.Set( + c, + "decorationPrefixes", + val, + ) } func (c *CompositeOperation) SetStringStyle(val CompositionStringStyle) { - c.StringStyle = val -} - -func (c *CompositeOperation) TypeName() jsii.Any { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "CompositeOperation", - Method: "TypeName", - Args: []string{}, - }) - return nil + _jsii_.Set( + c, + "stringStyle", + val, + ) +} + +func (c *CompositeOperation) TypeName() interface{} { + var returns interface{} + _jsii_.Invoke( + c, + "typeName", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (c *CompositeOperation) ToString() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "CompositeOperation", - Method: "ToString", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + c, + "toString", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Style of .toString() output for CompositeOperation. @@ -875,12 +1323,13 @@ const ( `; -exports[`Generated code for "jsii-calc": /golang/jsiicalc/derivedclasshasnoproperties/derivedclasshasnoproperties.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/derivedclasshasnoproperties/derivedclasshasnoproperties.go 1`] = ` package derivedclasshasnoproperties import ( - "github.com/aws-cdk/jsii/jsii-experimental" - _init_ "github.com/aws-cdk/jsii/jsii-calc/golang/jsiicalc/jsii" + _jsii_ "github.com/aws/jsii-runtime-go" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" + "reflect" ) // Class interface @@ -891,26 +1340,40 @@ type BaseIface interface { // Struct proxy type Base struct { - Prop string + Prop string \`json:"prop"\` } func (b *Base) GetProp() string { - return b.Prop + var returns string + _jsii_.Get( + b, + "prop", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewBase() BaseIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Base", - Method: "Constructor", - Args: []string{}, - }) - return &Base{} + self := Base{} + _jsii_.Create( + "jsii-calc.DerivedClassHasNoProperties.Base", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (b *Base) SetProp(val string) { - b.Prop = val + _jsii_.Set( + b, + "prop", + val, + ) } // Class interface @@ -921,37 +1384,65 @@ type DerivedIface interface { // Struct proxy type Derived struct { - Prop string + Prop string \`json:"prop"\` } func (d *Derived) GetProp() string { - return d.Prop + var returns string + _jsii_.Get( + d, + "prop", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewDerived() DerivedIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Derived", - Method: "Constructor", - Args: []string{}, - }) - return &Derived{} + self := Derived{} + _jsii_.Create( + "jsii-calc.DerivedClassHasNoProperties.Derived", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (d *Derived) SetProp(val string) { - d.Prop = val + _jsii_.Set( + d, + "prop", + val, + ) } `; -exports[`Generated code for "jsii-calc": /golang/jsiicalc/interfaceinnamespaceincludesclasses/interfaceinnamespaceincludesclasses.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/go.mod 1`] = ` +module github.com/aws/jsii/jsii-calc/go/jsiicalc/v3 + +go 1.15 + +require ( + github.com/aws/jsii-runtime-go v0.0.0 + github.com/aws/jsii/jsii-calc/go/scopejsiicalcbase v0.0.0 + github.com/aws/jsii/jsii-calc/go/scopejsiicalclib v0.0.0 +) + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/interfaceinnamespaceincludesclasses/interfaceinnamespaceincludesclasses.go 1`] = ` package interfaceinnamespaceincludesclasses import ( - "github.com/aws-cdk/jsii/jsii-experimental" - _init_ "github.com/aws-cdk/jsii/jsii-calc/golang/jsiicalc/jsii" + _jsii_ "github.com/aws/jsii-runtime-go" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" + "reflect" ) // Class interface @@ -962,26 +1453,40 @@ type FooIface interface { // Struct proxy type Foo struct { - Bar string + Bar string \`json:"bar"\` } func (f *Foo) GetBar() string { - return f.Bar + var returns string + _jsii_.Get( + f, + "bar", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewFoo() FooIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Foo", - Method: "Constructor", - Args: []string{}, - }) - return &Foo{} + self := Foo{} + _jsii_.Create( + "jsii-calc.InterfaceInNamespaceIncludesClasses.Foo", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (f *Foo) SetBar(val string) { - f.Bar = val + _jsii_.Set( + f, + "bar", + val, + ) } // HelloIface is the public interface for the custom type Hello @@ -991,23 +1496,30 @@ type HelloIface interface { // Struct proxy type Hello struct { - Foo float64 + Foo float64 \`json:"foo"\` } func (h *Hello) GetFoo() float64 { - return h.Foo + var returns float64 + _jsii_.Get( + h, + "foo", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } `; -exports[`Generated code for "jsii-calc": /golang/jsiicalc/interfaceinnamespaceonlyinterface/interfaceinnamespaceonlyinterface.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/interfaceinnamespaceonlyinterface/interfaceinnamespaceonlyinterface.go 1`] = ` package interfaceinnamespaceonlyinterface import ( - "github.com/aws-cdk/jsii/jsii-experimental" - _init_ "github.com/aws-cdk/jsii/jsii-calc/golang/jsiicalc/jsii" + _jsii_ "github.com/aws/jsii-runtime-go" + "reflect" ) // HelloIface is the public interface for the custom type Hello @@ -1017,27 +1529,33 @@ type HelloIface interface { // Struct proxy type Hello struct { - Foo float64 + Foo float64 \`json:"foo"\` } func (h *Hello) GetFoo() float64 { - return h.Foo + var returns float64 + _jsii_.Get( + h, + "foo", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } `; -exports[`Generated code for "jsii-calc": /golang/jsiicalc/jsii/jsii.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/jsii/jsii.go 1`] = ` package jsii import ( - rt "github.com/aws-cdk/jsii/jsii-experimental" + rt "github.com/aws/jsii-runtime-go" "sync" // Initialization endpoints of dependencies - scopejsiicalcbase "github.com/aws-cdk/jsii/jsii-calc/golang/scopejsiicalcbase/jsii" - scopejsiicalcbaseofbase "github.com/aws-cdk/jsii/jsii-calc/golang/scopejsiicalcbaseofbase/jsii" - scopejsiicalclib "github.com/aws-cdk/jsii/jsii-calc/golang/scopejsiicalclib/jsii" + scopejsiicalcbase "github.com/aws/jsii/jsii-calc/go/scopejsiicalcbase/jsii" + scopejsiicalclib "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/jsii" ) var once sync.Once @@ -1048,172 +1566,211 @@ func Initialize() { once.Do(func(){ // Ensure all dependencies are initialized scopejsiicalcbase.Initialize() - scopejsiicalcbaseofbase.Initialize() scopejsiicalclib.Initialize() // Load this library into the kernel - rt.Load("jsii-calc", "0.0.0", tarball) + rt.Load("jsii-calc", "3.20.120", tarball) }) } `; -exports[`Generated code for "jsii-calc": /golang/jsiicalc/jsii/tarball.embedded.go 1`] = `golang/jsiicalc/jsii/tarball.embedded.go embeds a tarball`; +exports[`Generated code for "jsii-calc": /go/jsiicalc/jsii/tarball.embedded.go 1`] = `go/jsiicalc/jsii/tarball.embedded.go embeds a tarball`; -exports[`Generated code for "jsii-calc": /golang/jsiicalc/jsiicalc.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( - "github.com/aws-cdk/jsii/jsii-experimental" - "github.com/aws-cdk/jsii/jsii-calc/golang/scopejsiicalclib" - "github.com/aws-cdk/jsii/jsii-calc/golang/jsiicalc/composition" - "github.com/aws-cdk/jsii/jsii-calc/golang/scopejsiicalcbaseofbase" - "github.com/aws-cdk/jsii/jsii-calc/golang/scopejsiicalcbase" - "github.com/aws-cdk/jsii/jsii-calc/golang/scopejsiicalclib/submodule" - _init_ "github.com/aws-cdk/jsii/jsii-calc/golang/jsiicalc/jsii" + _jsii_ "github.com/aws/jsii-runtime-go" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" + "reflect" + "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" + "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/composition" + "github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2" + "github.com/aws/jsii/jsii-calc/go/scopejsiicalcbase" + "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/submodule" ) // Class interface type AbstractClassIface interface { - IInterfaceImplementedByAbstractClass + IInterfaceImplementedByAbstractClassIface GetAbstractProperty() string - SetAbstractProperty(val string) GetPropFromInterface() string - SetPropFromInterface(val string) AbstractMethod(name string) string NonAbstractMethod() float64 } // Struct proxy type AbstractClass struct { - AbstractProperty string - PropFromInterface string + AbstractProperty string \`json:"abstractProperty"\` + PropFromInterface string \`json:"propFromInterface"\` } func (a *AbstractClass) GetAbstractProperty() string { - return a.AbstractProperty + var returns string + _jsii_.Get( + a, + "abstractProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (a *AbstractClass) GetPropFromInterface() string { - return a.PropFromInterface + var returns string + _jsii_.Get( + a, + "propFromInterface", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewAbstractClass() AbstractClassIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "AbstractClass", - Method: "Constructor", - Args: []string{}, - }) - return &AbstractClass{} -} - -func (a *AbstractClass) SetAbstractProperty(val string) { - a.AbstractProperty = val -} - -func (a *AbstractClass) SetPropFromInterface(val string) { - a.PropFromInterface = val + self := AbstractClass{} + _jsii_.Create( + "jsii-calc.AbstractClass", + []interface{}{}, + []_jsii_.FQN{"jsii-calc.IInterfaceImplementedByAbstractClass"}, + []_jsii_.Override{}, + &self, + ) + return &self } func (a *AbstractClass) AbstractMethod(name string) string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "AbstractClass", - Method: "AbstractMethod", - Args: []string{"string",}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + a, + "abstractMethod", + []interface{}{name}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (a *AbstractClass) NonAbstractMethod() float64 { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "AbstractClass", - Method: "NonAbstractMethod", - Args: []string{}, - }) - return 0.0 + var returns float64 + _jsii_.Invoke( + a, + "nonAbstractMethod", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type AbstractClassBaseIface interface { GetAbstractProperty() string - SetAbstractProperty(val string) } // Struct proxy type AbstractClassBase struct { - AbstractProperty string + AbstractProperty string \`json:"abstractProperty"\` } func (a *AbstractClassBase) GetAbstractProperty() string { - return a.AbstractProperty + var returns string + _jsii_.Get( + a, + "abstractProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewAbstractClassBase() AbstractClassBaseIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "AbstractClassBase", - Method: "Constructor", - Args: []string{}, - }) - return &AbstractClassBase{} -} - -func (a *AbstractClassBase) SetAbstractProperty(val string) { - a.AbstractProperty = val + self := AbstractClassBase{} + _jsii_.Create( + "jsii-calc.AbstractClassBase", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } // Class interface type AbstractClassReturnerIface interface { - GetReturnAbstractFromProperty() AbstractClassBase - SetReturnAbstractFromProperty(val AbstractClassBase) - GiveMeAbstract() AbstractClass - GiveMeInterface() IInterfaceImplementedByAbstractClass + GetReturnAbstractFromProperty() AbstractClassBaseIface + GiveMeAbstract() AbstractClassIface + GiveMeInterface() IInterfaceImplementedByAbstractClassIface } // Struct proxy type AbstractClassReturner struct { - ReturnAbstractFromProperty AbstractClassBase + ReturnAbstractFromProperty AbstractClassBaseIface \`json:"returnAbstractFromProperty"\` } -func (a *AbstractClassReturner) GetReturnAbstractFromProperty() AbstractClassBase { - return a.ReturnAbstractFromProperty +func (a *AbstractClassReturner) GetReturnAbstractFromProperty() AbstractClassBaseIface { + var returns AbstractClassBaseIface + _jsii_.Get( + a, + "returnAbstractFromProperty", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*AbstractClassBaseIface)(nil)).Elem(): reflect.TypeOf((*AbstractClassBase)(nil)).Elem(), + }, + ) + return returns } func NewAbstractClassReturner() AbstractClassReturnerIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "AbstractClassReturner", - Method: "Constructor", - Args: []string{}, - }) - return &AbstractClassReturner{} -} - -func (a *AbstractClassReturner) SetReturnAbstractFromProperty(val AbstractClassBase) { - a.ReturnAbstractFromProperty = val -} - -func (a *AbstractClassReturner) GiveMeAbstract() AbstractClass { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "AbstractClassReturner", - Method: "GiveMeAbstract", - Args: []string{}, - }) - return AbstractClass{} -} - -func (a *AbstractClassReturner) GiveMeInterface() IInterfaceImplementedByAbstractClass { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "AbstractClassReturner", - Method: "GiveMeInterface", - Args: []string{}, - }) - return nil + self := AbstractClassReturner{} + _jsii_.Create( + "jsii-calc.AbstractClassReturner", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self +} + +func (a *AbstractClassReturner) GiveMeAbstract() AbstractClassIface { + var returns AbstractClassIface + _jsii_.Invoke( + a, + "giveMeAbstract", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*AbstractClassIface)(nil)).Elem(): reflect.TypeOf((*AbstractClass)(nil)).Elem(), + }, + ) + return returns +} + +func (a *AbstractClassReturner) GiveMeInterface() IInterfaceImplementedByAbstractClassIface { + var returns IInterfaceImplementedByAbstractClassIface + _jsii_.Invoke( + a, + "giveMeInterface", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*IInterfaceImplementedByAbstractClassIface)(nil)).Elem(): reflect.TypeOf((*IInterfaceImplementedByAbstractClass)(nil)).Elem(), + }, + ) + return returns } // Class interface @@ -1226,56 +1783,75 @@ type AbstractSuiteIface interface { // Ensures abstract members implementations correctly register overrides in various languages. // Struct proxy type AbstractSuite struct { - Property string + Property string \`json:"property"\` } func (a *AbstractSuite) GetProperty() string { - return a.Property + var returns string + _jsii_.Get( + a, + "property", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewAbstractSuite() AbstractSuiteIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "AbstractSuite", - Method: "Constructor", - Args: []string{}, - }) - return &AbstractSuite{} + self := AbstractSuite{} + _jsii_.Create( + "jsii-calc.AbstractSuite", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (a *AbstractSuite) SetProperty(val string) { - a.Property = val + _jsii_.Set( + a, + "property", + val, + ) } func (a *AbstractSuite) SomeMethod(str string) string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "AbstractSuite", - Method: "SomeMethod", - Args: []string{"string",}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + a, + "someMethod", + []interface{}{str}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (a *AbstractSuite) WorkItAll(seed string) string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "AbstractSuite", - Method: "WorkItAll", - Args: []string{"string",}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + a, + "workItAll", + []interface{}{seed}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type AddIface interface { - scopejsiicalclib.IFriendly + scopejsiicalclib.IFriendlyIface GetValue() float64 - SetValue(val float64) - GetLhs() scopejsiicalclib.NumericValue - SetLhs(val scopejsiicalclib.NumericValue) - GetRhs() scopejsiicalclib.NumericValue - SetRhs(val scopejsiicalclib.NumericValue) - TypeName() jsii.Any + GetLhs() scopejsiicalclib.NumericValueIface + GetRhs() scopejsiicalclib.NumericValueIface + TypeName() interface{} ToString() string Hello() string } @@ -1284,86 +1860,113 @@ type AddIface interface { // Struct proxy type Add struct { // (deprecated) The value. - Value float64 + Value float64 \`json:"value"\` // Left-hand side operand. - Lhs scopejsiicalclib.NumericValue + Lhs scopejsiicalclib.NumericValueIface \`json:"lhs"\` // Right-hand side operand. - Rhs scopejsiicalclib.NumericValue + Rhs scopejsiicalclib.NumericValueIface \`json:"rhs"\` } func (a *Add) GetValue() float64 { - return a.Value -} - -func (a *Add) GetLhs() scopejsiicalclib.NumericValue { - return a.Lhs -} - -func (a *Add) GetRhs() scopejsiicalclib.NumericValue { - return a.Rhs + var returns float64 + _jsii_.Get( + a, + "value", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (a *Add) GetLhs() scopejsiicalclib.NumericValueIface { + var returns scopejsiicalclib.NumericValueIface + _jsii_.Get( + a, + "lhs", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*scopejsiicalclib.NumericValueIface)(nil)).Elem(): reflect.TypeOf((*scopejsiicalclib.NumericValue)(nil)).Elem(), + }, + ) + return returns +} + +func (a *Add) GetRhs() scopejsiicalclib.NumericValueIface { + var returns scopejsiicalclib.NumericValueIface + _jsii_.Get( + a, + "rhs", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*scopejsiicalclib.NumericValueIface)(nil)).Elem(): reflect.TypeOf((*scopejsiicalclib.NumericValue)(nil)).Elem(), + }, + ) + return returns } // Creates a BinaryOperation. -func NewAdd(lhs scopejsiicalclib.NumericValue, rhs scopejsiicalclib.NumericValue) AddIface { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Add", - Method: "Constructor", - Args: []string{"@scope/jsii-calc-lib.NumericValue", "@scope/jsii-calc-lib.NumericValue",}, - }) - return &Add{} -} - -func (a *Add) SetValue(val float64) { - a.Value = val -} - -func (a *Add) SetLhs(val scopejsiicalclib.NumericValue) { - a.Lhs = val -} - -func (a *Add) SetRhs(val scopejsiicalclib.NumericValue) { - a.Rhs = val -} - -func (a *Add) TypeName() jsii.Any { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Add", - Method: "TypeName", - Args: []string{}, - }) - return nil +func NewAdd(lhs scopejsiicalclib.NumericValueIface, rhs scopejsiicalclib.NumericValueIface) AddIface { + _init_.Initialize() + self := Add{} + _jsii_.Create( + "jsii-calc.Add", + []interface{}{lhs, rhs}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self +} + +func (a *Add) TypeName() interface{} { + var returns interface{} + _jsii_.Invoke( + a, + "typeName", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (a *Add) ToString() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Add", - Method: "ToString", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + a, + "toString", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (a *Add) Hello() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Add", - Method: "Hello", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + a, + "hello", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type AllTypesIface interface { GetEnumPropertyValue() float64 - SetEnumPropertyValue(val float64) - GetAnyArrayProperty() []jsii.Any - SetAnyArrayProperty(val []jsii.Any) - GetAnyMapProperty() map[string]jsii.Any - SetAnyMapProperty(val map[string]jsii.Any) - GetAnyProperty() jsii.Any - SetAnyProperty(val jsii.Any) + GetAnyArrayProperty() []interface{} + SetAnyArrayProperty(val []interface{}) + GetAnyMapProperty() map[string]interface{} + SetAnyMapProperty(val map[string]interface{}) + GetAnyProperty() interface{} + SetAnyProperty(val interface{}) GetArrayProperty() []string SetArrayProperty(val []string) GetBooleanProperty() bool @@ -1372,247 +1975,485 @@ type AllTypesIface interface { SetDateProperty(val string) GetEnumProperty() AllTypesEnum SetEnumProperty(val AllTypesEnum) - GetJsonProperty() map[string]jsii.Any - SetJsonProperty(val map[string]jsii.Any) - GetMapProperty() map[string]scopejsiicalclib.Number - SetMapProperty(val map[string]scopejsiicalclib.Number) + GetJsonProperty() map[string]interface{} + SetJsonProperty(val map[string]interface{}) + GetMapProperty() map[string]scopejsiicalclib.NumberIface + SetMapProperty(val map[string]scopejsiicalclib.NumberIface) GetNumberProperty() float64 SetNumberProperty(val float64) GetStringProperty() string SetStringProperty(val string) - GetUnionArrayProperty() []jsii.Any - SetUnionArrayProperty(val []jsii.Any) - GetUnionMapProperty() map[string]jsii.Any - SetUnionMapProperty(val map[string]jsii.Any) - GetUnionProperty() jsii.Any - SetUnionProperty(val jsii.Any) - GetUnknownArrayProperty() []jsii.Any - SetUnknownArrayProperty(val []jsii.Any) - GetUnknownMapProperty() map[string]jsii.Any - SetUnknownMapProperty(val map[string]jsii.Any) - GetUnknownProperty() jsii.Any - SetUnknownProperty(val jsii.Any) + GetUnionArrayProperty() []interface{} + SetUnionArrayProperty(val []interface{}) + GetUnionMapProperty() map[string]interface{} + SetUnionMapProperty(val map[string]interface{}) + GetUnionProperty() interface{} + SetUnionProperty(val interface{}) + GetUnknownArrayProperty() []interface{} + SetUnknownArrayProperty(val []interface{}) + GetUnknownMapProperty() map[string]interface{} + SetUnknownMapProperty(val map[string]interface{}) + GetUnknownProperty() interface{} + SetUnknownProperty(val interface{}) GetOptionalEnumValue() StringEnum SetOptionalEnumValue(val StringEnum) - AnyIn(inp jsii.Any) - AnyOut() jsii.Any + AnyIn(inp interface{}) + AnyOut() interface{} EnumMethod(value StringEnum) StringEnum } // This class includes property for all types supported by jsii. -// +// // The setters will validate // that the value set is of the expected type and throw otherwise. // 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]scopejsiicalclib.Number - 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 + EnumPropertyValue float64 \`json:"enumPropertyValue"\` + AnyArrayProperty []interface{} \`json:"anyArrayProperty"\` + AnyMapProperty map[string]interface{} \`json:"anyMapProperty"\` + AnyProperty interface{} \`json:"anyProperty"\` + ArrayProperty []string \`json:"arrayProperty"\` + BooleanProperty bool \`json:"booleanProperty"\` + DateProperty string \`json:"dateProperty"\` + EnumProperty AllTypesEnum \`json:"enumProperty"\` + JsonProperty map[string]interface{} \`json:"jsonProperty"\` + MapProperty map[string]scopejsiicalclib.NumberIface \`json:"mapProperty"\` + NumberProperty float64 \`json:"numberProperty"\` + StringProperty string \`json:"stringProperty"\` + UnionArrayProperty []interface{} \`json:"unionArrayProperty"\` + UnionMapProperty map[string]interface{} \`json:"unionMapProperty"\` + UnionProperty interface{} \`json:"unionProperty"\` + UnknownArrayProperty []interface{} \`json:"unknownArrayProperty"\` + UnknownMapProperty map[string]interface{} \`json:"unknownMapProperty"\` + UnknownProperty interface{} \`json:"unknownProperty"\` + OptionalEnumValue StringEnum \`json:"optionalEnumValue"\` } 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 + var returns float64 + _jsii_.Get( + a, + "enumPropertyValue", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (a *AllTypes) GetAnyArrayProperty() []interface{} { + var returns []interface{} + _jsii_.Get( + a, + "anyArrayProperty", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*interface{})(nil)).Elem(): reflect.TypeOf((*interface{})(nil)).Elem(), + }, + ) + return returns +} + +func (a *AllTypes) GetAnyMapProperty() map[string]interface{} { + var returns map[string]interface{} + _jsii_.Get( + a, + "anyMapProperty", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*interface{})(nil)).Elem(): reflect.TypeOf((*interface{})(nil)).Elem(), + }, + ) + return returns +} + +func (a *AllTypes) GetAnyProperty() interface{} { + var returns interface{} + _jsii_.Get( + a, + "anyProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (a *AllTypes) GetArrayProperty() []string { - return a.ArrayProperty + var returns []string + _jsii_.Get( + a, + "arrayProperty", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*string)(nil)).Elem(): reflect.TypeOf((*string)(nil)).Elem(), + }, + ) + return returns } func (a *AllTypes) GetBooleanProperty() bool { - return a.BooleanProperty + var returns bool + _jsii_.Get( + a, + "booleanProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (a *AllTypes) GetDateProperty() string { - return a.DateProperty + var returns string + _jsii_.Get( + a, + "dateProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } 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]scopejsiicalclib.Number { - return a.MapProperty + var returns AllTypesEnum + _jsii_.Get( + a, + "enumProperty", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*AllTypesEnum)(nil)).Elem(): reflect.TypeOf((*AllTypesEnum)(nil)).Elem(), + }, + ) + return returns +} + +func (a *AllTypes) GetJsonProperty() map[string]interface{} { + var returns map[string]interface{} + _jsii_.Get( + a, + "jsonProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (a *AllTypes) GetMapProperty() map[string]scopejsiicalclib.NumberIface { + var returns map[string]scopejsiicalclib.NumberIface + _jsii_.Get( + a, + "mapProperty", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*scopejsiicalclib.NumberIface)(nil)).Elem(): reflect.TypeOf((*scopejsiicalclib.Number)(nil)).Elem(), + }, + ) + return returns } func (a *AllTypes) GetNumberProperty() float64 { - return a.NumberProperty + var returns float64 + _jsii_.Get( + a, + "numberProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } 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 + var returns string + _jsii_.Get( + a, + "stringProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (a *AllTypes) GetUnionArrayProperty() []interface{} { + var returns []interface{} + _jsii_.Get( + a, + "unionArrayProperty", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*interface{})(nil)).Elem(): reflect.TypeOf((*interface{})(nil)).Elem(), + }, + ) + return returns +} + +func (a *AllTypes) GetUnionMapProperty() map[string]interface{} { + var returns map[string]interface{} + _jsii_.Get( + a, + "unionMapProperty", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*interface{})(nil)).Elem(): reflect.TypeOf((*interface{})(nil)).Elem(), + }, + ) + return returns +} + +func (a *AllTypes) GetUnionProperty() interface{} { + var returns interface{} + _jsii_.Get( + a, + "unionProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (a *AllTypes) GetUnknownArrayProperty() []interface{} { + var returns []interface{} + _jsii_.Get( + a, + "unknownArrayProperty", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*interface{})(nil)).Elem(): reflect.TypeOf((*interface{})(nil)).Elem(), + }, + ) + return returns +} + +func (a *AllTypes) GetUnknownMapProperty() map[string]interface{} { + var returns map[string]interface{} + _jsii_.Get( + a, + "unknownMapProperty", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*interface{})(nil)).Elem(): reflect.TypeOf((*interface{})(nil)).Elem(), + }, + ) + return returns +} + +func (a *AllTypes) GetUnknownProperty() interface{} { + var returns interface{} + _jsii_.Get( + a, + "unknownProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (a *AllTypes) GetOptionalEnumValue() StringEnum { - return a.OptionalEnumValue + var returns StringEnum + _jsii_.Get( + a, + "optionalEnumValue", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*StringEnum)(nil)).Elem(): reflect.TypeOf((*StringEnum)(nil)).Elem(), + }, + ) + return returns } func NewAllTypes() AllTypesIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "AllTypes", - Method: "Constructor", - Args: []string{}, - }) - return &AllTypes{} + self := AllTypes{} + _jsii_.Create( + "jsii-calc.AllTypes", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } -func (a *AllTypes) SetEnumPropertyValue(val float64) { - a.EnumPropertyValue = val +func (a *AllTypes) SetAnyArrayProperty(val []interface{}) { + _jsii_.Set( + a, + "anyArrayProperty", + val, + ) } -func (a *AllTypes) SetAnyArrayProperty(val []jsii.Any) { - a.AnyArrayProperty = val +func (a *AllTypes) SetAnyMapProperty(val map[string]interface{}) { + _jsii_.Set( + a, + "anyMapProperty", + 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) SetAnyProperty(val interface{}) { + _jsii_.Set( + a, + "anyProperty", + val, + ) } func (a *AllTypes) SetArrayProperty(val []string) { - a.ArrayProperty = val + _jsii_.Set( + a, + "arrayProperty", + val, + ) } func (a *AllTypes) SetBooleanProperty(val bool) { - a.BooleanProperty = val + _jsii_.Set( + a, + "booleanProperty", + val, + ) } func (a *AllTypes) SetDateProperty(val string) { - a.DateProperty = val + _jsii_.Set( + a, + "dateProperty", + val, + ) } func (a *AllTypes) SetEnumProperty(val AllTypesEnum) { - a.EnumProperty = val + _jsii_.Set( + a, + "enumProperty", + val, + ) } -func (a *AllTypes) SetJsonProperty(val map[string]jsii.Any) { - a.JsonProperty = val +func (a *AllTypes) SetJsonProperty(val map[string]interface{}) { + _jsii_.Set( + a, + "jsonProperty", + val, + ) } -func (a *AllTypes) SetMapProperty(val map[string]scopejsiicalclib.Number) { - a.MapProperty = val +func (a *AllTypes) SetMapProperty(val map[string]scopejsiicalclib.NumberIface) { + _jsii_.Set( + a, + "mapProperty", + val, + ) } func (a *AllTypes) SetNumberProperty(val float64) { - a.NumberProperty = val + _jsii_.Set( + a, + "numberProperty", + val, + ) } func (a *AllTypes) SetStringProperty(val string) { - a.StringProperty = val + _jsii_.Set( + a, + "stringProperty", + val, + ) } -func (a *AllTypes) SetUnionArrayProperty(val []jsii.Any) { - a.UnionArrayProperty = val +func (a *AllTypes) SetUnionArrayProperty(val []interface{}) { + _jsii_.Set( + a, + "unionArrayProperty", + val, + ) } -func (a *AllTypes) SetUnionMapProperty(val map[string]jsii.Any) { - a.UnionMapProperty = val +func (a *AllTypes) SetUnionMapProperty(val map[string]interface{}) { + _jsii_.Set( + a, + "unionMapProperty", + val, + ) } -func (a *AllTypes) SetUnionProperty(val jsii.Any) { - a.UnionProperty = val +func (a *AllTypes) SetUnionProperty(val interface{}) { + _jsii_.Set( + a, + "unionProperty", + val, + ) } -func (a *AllTypes) SetUnknownArrayProperty(val []jsii.Any) { - a.UnknownArrayProperty = val +func (a *AllTypes) SetUnknownArrayProperty(val []interface{}) { + _jsii_.Set( + a, + "unknownArrayProperty", + val, + ) } -func (a *AllTypes) SetUnknownMapProperty(val map[string]jsii.Any) { - a.UnknownMapProperty = val +func (a *AllTypes) SetUnknownMapProperty(val map[string]interface{}) { + _jsii_.Set( + a, + "unknownMapProperty", + val, + ) } -func (a *AllTypes) SetUnknownProperty(val jsii.Any) { - a.UnknownProperty = val +func (a *AllTypes) SetUnknownProperty(val interface{}) { + _jsii_.Set( + a, + "unknownProperty", + val, + ) } func (a *AllTypes) SetOptionalEnumValue(val StringEnum) { - a.OptionalEnumValue = val -} - -func (a *AllTypes) AnyIn(inp jsii.Any) { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "AllTypes", - Method: "AnyIn", - Args: []string{"any",}, - }) -} - -func (a *AllTypes) AnyOut() jsii.Any { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "AllTypes", - Method: "AnyOut", - Args: []string{}, - }) - return nil + _jsii_.Set( + a, + "optionalEnumValue", + val, + ) +} + +func (a *AllTypes) AnyIn(inp interface{}) { + var returns interface{} + _jsii_.Invoke( + a, + "anyIn", + []interface{}{inp}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) +} + +func (a *AllTypes) AnyOut() interface{} { + var returns interface{} + _jsii_.Invoke( + a, + "anyOut", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (a *AllTypes) EnumMethod(value StringEnum) StringEnum { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "AllTypes", - Method: "EnumMethod", - Args: []string{"jsii-calc.StringEnum",}, - }) - return "ENUM_DUMMY" + var returns StringEnum + _jsii_.Invoke( + a, + "enumMethod", + []interface{}{value}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*StringEnum)(nil)).Elem(): reflect.TypeOf((*StringEnum)(nil)).Elem(), + }, + ) + return returns } type AllTypesEnum string @@ -1637,93 +2478,123 @@ type AllowedMethodNames struct { func NewAllowedMethodNames() AllowedMethodNamesIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "AllowedMethodNames", - Method: "Constructor", - Args: []string{}, - }) - return &AllowedMethodNames{} + self := AllowedMethodNames{} + _jsii_.Create( + "jsii-calc.AllowedMethodNames", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (a *AllowedMethodNames) GetBar(_p1 string, _p2 float64) { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "AllowedMethodNames", - Method: "GetBar", - Args: []string{"string", "number",}, - }) + var returns interface{} + _jsii_.Invoke( + a, + "getBar", + []interface{}{_p1, _p2}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (a *AllowedMethodNames) GetFoo(withParam string) string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "AllowedMethodNames", - Method: "GetFoo", - Args: []string{"string",}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + a, + "getFoo", + []interface{}{withParam}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (a *AllowedMethodNames) SetBar(_x string, _y float64, _z bool) { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "AllowedMethodNames", - Method: "SetBar", - Args: []string{"string", "number", "boolean",}, - }) + var returns interface{} + _jsii_.Invoke( + a, + "setBar", + []interface{}{_x, _y, _z}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (a *AllowedMethodNames) SetFoo(_x string, _y float64) { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "AllowedMethodNames", - Method: "SetFoo", - Args: []string{"string", "number",}, - }) + var returns interface{} + _jsii_.Invoke( + a, + "setFoo", + []interface{}{_x, _y}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } // Class interface type AmbiguousParametersIface interface { - GetProps() StructParameterType - SetProps(val StructParameterType) - GetScope() Bell - SetScope(val Bell) + GetProps() StructParameterTypeIface + GetScope() BellIface } // Struct proxy type AmbiguousParameters struct { - Props StructParameterType - Scope Bell + Props StructParameterTypeIface \`json:"props"\` + Scope BellIface \`json:"scope"\` } -func (a *AmbiguousParameters) GetProps() StructParameterType { - return a.Props +func (a *AmbiguousParameters) GetProps() StructParameterTypeIface { + var returns StructParameterTypeIface + _jsii_.Get( + a, + "props", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*StructParameterTypeIface)(nil)).Elem(): reflect.TypeOf((*StructParameterType)(nil)).Elem(), + }, + ) + return returns } -func (a *AmbiguousParameters) GetScope() Bell { - return a.Scope +func (a *AmbiguousParameters) GetScope() BellIface { + var returns BellIface + _jsii_.Get( + a, + "scope", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*BellIface)(nil)).Elem(): reflect.TypeOf((*Bell)(nil)).Elem(), + }, + ) + return returns } -func NewAmbiguousParameters(scope Bell, props StructParameterType) AmbiguousParametersIface { +func NewAmbiguousParameters(scope BellIface, props StructParameterTypeIface) AmbiguousParametersIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "AmbiguousParameters", - Method: "Constructor", - Args: []string{"jsii-calc.Bell", "jsii-calc.StructParameterType",}, - }) - return &AmbiguousParameters{} -} - -func (a *AmbiguousParameters) SetProps(val StructParameterType) { - a.Props = val -} - -func (a *AmbiguousParameters) SetScope(val Bell) { - a.Scope = val + self := AmbiguousParameters{} + _jsii_.Create( + "jsii-calc.AmbiguousParameters", + []interface{}{scope, props}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } // Class interface type AnonymousImplementationProviderIface interface { - IAnonymousImplementationProvider - ProvideAsClass() Implementation - ProvideAsInterface() IAnonymouslyImplementMe + IAnonymousImplementationProviderIface + ProvideAsClass() ImplementationIface + ProvideAsInterface() IAnonymouslyImplementMeIface } // Struct proxy @@ -1732,30 +2603,45 @@ type AnonymousImplementationProvider struct { func NewAnonymousImplementationProvider() AnonymousImplementationProviderIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "AnonymousImplementationProvider", - Method: "Constructor", - Args: []string{}, - }) - return &AnonymousImplementationProvider{} -} - -func (a *AnonymousImplementationProvider) ProvideAsClass() Implementation { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "AnonymousImplementationProvider", - Method: "ProvideAsClass", - Args: []string{}, - }) - return Implementation{} -} - -func (a *AnonymousImplementationProvider) ProvideAsInterface() IAnonymouslyImplementMe { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "AnonymousImplementationProvider", - Method: "ProvideAsInterface", - Args: []string{}, - }) - return nil + self := AnonymousImplementationProvider{} + _jsii_.Create( + "jsii-calc.AnonymousImplementationProvider", + []interface{}{}, + []_jsii_.FQN{"jsii-calc.IAnonymousImplementationProvider"}, + []_jsii_.Override{}, + &self, + ) + return &self +} + +func (a *AnonymousImplementationProvider) ProvideAsClass() ImplementationIface { + var returns ImplementationIface + _jsii_.Invoke( + a, + "provideAsClass", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*ImplementationIface)(nil)).Elem(): reflect.TypeOf((*Implementation)(nil)).Elem(), + }, + ) + return returns +} + +func (a *AnonymousImplementationProvider) ProvideAsInterface() IAnonymouslyImplementMeIface { + var returns IAnonymouslyImplementMeIface + _jsii_.Invoke( + a, + "provideAsInterface", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*IAnonymouslyImplementMeIface)(nil)).Elem(): reflect.TypeOf((*IAnonymouslyImplementMe)(nil)).Elem(), + }, + ) + return returns } // Class interface @@ -1774,66 +2660,93 @@ type AsyncVirtualMethods struct { func NewAsyncVirtualMethods() AsyncVirtualMethodsIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "AsyncVirtualMethods", - Method: "Constructor", - Args: []string{}, - }) - return &AsyncVirtualMethods{} + self := AsyncVirtualMethods{} + _jsii_.Create( + "jsii-calc.AsyncVirtualMethods", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (a *AsyncVirtualMethods) CallMe() float64 { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "AsyncVirtualMethods", - Method: "CallMe", - Args: []string{}, - }) - return 0.0 + var returns float64 + _jsii_.Invoke( + a, + "callMe", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (a *AsyncVirtualMethods) CallMe2() float64 { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "AsyncVirtualMethods", - Method: "CallMe2", - Args: []string{}, - }) - return 0.0 + var returns float64 + _jsii_.Invoke( + a, + "callMe2", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (a *AsyncVirtualMethods) CallMeDoublePromise() float64 { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "AsyncVirtualMethods", - Method: "CallMeDoublePromise", - Args: []string{}, - }) - return 0.0 + var returns float64 + _jsii_.Invoke( + a, + "callMeDoublePromise", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (a *AsyncVirtualMethods) DontOverrideMe() float64 { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "AsyncVirtualMethods", - Method: "DontOverrideMe", - Args: []string{}, - }) - return 0.0 + var returns float64 + _jsii_.Invoke( + a, + "dontOverrideMe", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (a *AsyncVirtualMethods) OverrideMe(mult float64) float64 { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "AsyncVirtualMethods", - Method: "OverrideMe", - Args: []string{"number",}, - }) - return 0.0 + var returns float64 + _jsii_.Invoke( + a, + "overrideMe", + []interface{}{mult}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (a *AsyncVirtualMethods) OverrideMeToo() float64 { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "AsyncVirtualMethods", - Method: "OverrideMeToo", - Args: []string{}, - }) - return 0.0 + var returns float64 + _jsii_.Invoke( + a, + "overrideMeToo", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface @@ -1848,28 +2761,39 @@ type AugmentableClass struct { func NewAugmentableClass() AugmentableClassIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "AugmentableClass", - Method: "Constructor", - Args: []string{}, - }) - return &AugmentableClass{} + self := AugmentableClass{} + _jsii_.Create( + "jsii-calc.AugmentableClass", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (a *AugmentableClass) MethodOne() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "AugmentableClass", - Method: "MethodOne", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + a, + "methodOne", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (a *AugmentableClass) MethodTwo() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "AugmentableClass", - Method: "MethodTwo", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + a, + "methodTwo", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } // Class interface @@ -1882,17 +2806,20 @@ type BaseJsii976 struct { func NewBaseJsii976() BaseJsii976Iface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "BaseJsii976", - Method: "Constructor", - Args: []string{}, - }) - return &BaseJsii976{} + self := BaseJsii976{} + _jsii_.Create( + "jsii-calc.BaseJsii976", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } // Class interface type BellIface interface { - IBell + IBellIface GetRung() bool SetRung(val bool) Ring() @@ -1900,46 +2827,61 @@ type BellIface interface { // Struct proxy type Bell struct { - Rung bool + Rung bool \`json:"rung"\` } func (b *Bell) GetRung() bool { - return b.Rung + var returns bool + _jsii_.Get( + b, + "rung", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewBell() BellIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Bell", - Method: "Constructor", - Args: []string{}, - }) - return &Bell{} + self := Bell{} + _jsii_.Create( + "jsii-calc.Bell", + []interface{}{}, + []_jsii_.FQN{"jsii-calc.IBell"}, + []_jsii_.Override{}, + &self, + ) + return &self } func (b *Bell) SetRung(val bool) { - b.Rung = val + _jsii_.Set( + b, + "rung", + val, + ) } func (b *Bell) Ring() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Bell", - Method: "Ring", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + b, + "ring", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } // Class interface type BinaryOperationIface interface { - scopejsiicalclib.IFriendly + scopejsiicalclib.IFriendlyIface GetValue() float64 - SetValue(val float64) - GetLhs() scopejsiicalclib.NumericValue - SetLhs(val scopejsiicalclib.NumericValue) - GetRhs() scopejsiicalclib.NumericValue - SetRhs(val scopejsiicalclib.NumericValue) - TypeName() jsii.Any + GetLhs() scopejsiicalclib.NumericValueIface + GetRhs() scopejsiicalclib.NumericValueIface + TypeName() interface{} ToString() string Hello() string } @@ -1949,80 +2891,108 @@ type BinaryOperationIface interface { type BinaryOperation struct { // The value. // Deprecated. - Value float64 + Value float64 \`json:"value"\` // Left-hand side operand. - Lhs scopejsiicalclib.NumericValue + Lhs scopejsiicalclib.NumericValueIface \`json:"lhs"\` // Right-hand side operand. - Rhs scopejsiicalclib.NumericValue + Rhs scopejsiicalclib.NumericValueIface \`json:"rhs"\` } func (b *BinaryOperation) GetValue() float64 { - return b.Value -} - -func (b *BinaryOperation) GetLhs() scopejsiicalclib.NumericValue { - return b.Lhs -} - -func (b *BinaryOperation) GetRhs() scopejsiicalclib.NumericValue { - return b.Rhs + var returns float64 + _jsii_.Get( + b, + "value", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (b *BinaryOperation) GetLhs() scopejsiicalclib.NumericValueIface { + var returns scopejsiicalclib.NumericValueIface + _jsii_.Get( + b, + "lhs", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*scopejsiicalclib.NumericValueIface)(nil)).Elem(): reflect.TypeOf((*scopejsiicalclib.NumericValue)(nil)).Elem(), + }, + ) + return returns +} + +func (b *BinaryOperation) GetRhs() scopejsiicalclib.NumericValueIface { + var returns scopejsiicalclib.NumericValueIface + _jsii_.Get( + b, + "rhs", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*scopejsiicalclib.NumericValueIface)(nil)).Elem(): reflect.TypeOf((*scopejsiicalclib.NumericValue)(nil)).Elem(), + }, + ) + return returns } // Creates a BinaryOperation. -func NewBinaryOperation(lhs scopejsiicalclib.NumericValue, rhs scopejsiicalclib.NumericValue) BinaryOperationIface { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "BinaryOperation", - Method: "Constructor", - Args: []string{"@scope/jsii-calc-lib.NumericValue", "@scope/jsii-calc-lib.NumericValue",}, - }) - return &BinaryOperation{} -} - -func (b *BinaryOperation) SetValue(val float64) { - b.Value = val -} - -func (b *BinaryOperation) SetLhs(val scopejsiicalclib.NumericValue) { - b.Lhs = val -} - -func (b *BinaryOperation) SetRhs(val scopejsiicalclib.NumericValue) { - b.Rhs = val -} - -func (b *BinaryOperation) TypeName() jsii.Any { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "BinaryOperation", - Method: "TypeName", - Args: []string{}, - }) - return nil +func NewBinaryOperation(lhs scopejsiicalclib.NumericValueIface, rhs scopejsiicalclib.NumericValueIface) BinaryOperationIface { + _init_.Initialize() + self := BinaryOperation{} + _jsii_.Create( + "jsii-calc.BinaryOperation", + []interface{}{lhs, rhs}, + []_jsii_.FQN{"@scope/jsii-calc-lib.IFriendly"}, + []_jsii_.Override{}, + &self, + ) + return &self +} + +func (b *BinaryOperation) TypeName() interface{} { + var returns interface{} + _jsii_.Invoke( + b, + "typeName", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (b *BinaryOperation) ToString() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "BinaryOperation", - Method: "ToString", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + b, + "toString", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (b *BinaryOperation) Hello() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "BinaryOperation", - Method: "Hello", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + b, + "hello", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type BurriedAnonymousObjectIface interface { Check() bool - GiveItBack(value jsii.Any) jsii.Any + GiveItBack(value interface{}) interface{} } // See https://github.com/aws/aws-cdk/issues/7977. @@ -2032,55 +3002,62 @@ type BurriedAnonymousObject struct { func NewBurriedAnonymousObject() BurriedAnonymousObjectIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "BurriedAnonymousObject", - Method: "Constructor", - Args: []string{}, - }) - return &BurriedAnonymousObject{} + self := BurriedAnonymousObject{} + _jsii_.Create( + "jsii-calc.BurriedAnonymousObject", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (b *BurriedAnonymousObject) Check() bool { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "BurriedAnonymousObject", - Method: "Check", - Args: []string{}, - }) - return true -} - -func (b *BurriedAnonymousObject) GiveItBack(value jsii.Any) jsii.Any { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "BurriedAnonymousObject", - Method: "GiveItBack", - Args: []string{"any",}, - }) - return nil + var returns bool + _jsii_.Invoke( + b, + "check", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (b *BurriedAnonymousObject) GiveItBack(value interface{}) interface{} { + var returns interface{} + _jsii_.Invoke( + b, + "giveItBack", + []interface{}{value}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type CalculatorIface interface { GetValue() float64 - SetValue(val float64) - GetExpression() scopejsiicalclib.NumericValue - SetExpression(val scopejsiicalclib.NumericValue) + GetExpression() scopejsiicalclib.NumericValueIface GetDecorationPostfixes() []string SetDecorationPostfixes(val []string) GetDecorationPrefixes() []string SetDecorationPrefixes(val []string) GetStringStyle() composition.CompositionStringStyle SetStringStyle(val composition.CompositionStringStyle) - GetOperationsLog() []scopejsiicalclib.NumericValue - SetOperationsLog(val []scopejsiicalclib.NumericValue) - GetOperationsMap() map[string][]scopejsiicalclib.NumericValue - SetOperationsMap(val map[string][]scopejsiicalclib.NumericValue) - GetCurr() scopejsiicalclib.NumericValue - SetCurr(val scopejsiicalclib.NumericValue) + GetOperationsLog() []scopejsiicalclib.NumericValueIface + GetOperationsMap() map[string][]scopejsiicalclib.NumericValueIface + GetCurr() scopejsiicalclib.NumericValueIface + SetCurr(val scopejsiicalclib.NumericValueIface) GetMaxValue() float64 SetMaxValue(val float64) - GetUnionProperty() jsii.Any - SetUnionProperty(val jsii.Any) - TypeName() jsii.Any + GetUnionProperty() interface{} + SetUnionProperty(val interface{}) + TypeName() interface{} ToString() string Add(value float64) Mul(value float64) @@ -2090,16 +3067,16 @@ type CalculatorIface interface { } // A calculator which maintains a current value and allows adding operations. -// +// // Here's how you use it: -// +// // \`\`\`ts // const calculator = new calc.Calculator(); // calculator.add(5); // calculator.mul(3); // console.log(calculator.expression.value); // \`\`\` -// +// // I will repeat this example again, but in an @example tag. // // TODO: EXAMPLE @@ -2107,176 +3084,299 @@ type CalculatorIface interface { // Struct proxy type Calculator struct { // (deprecated) The value. - Value float64 + Value float64 \`json:"value"\` // Returns the expression. - Expression scopejsiicalclib.NumericValue + Expression scopejsiicalclib.NumericValueIface \`json:"expression"\` // A set of postfixes to include in a decorated .toString(). - DecorationPostfixes []string + DecorationPostfixes []string \`json:"decorationPostfixes"\` // A set of prefixes to include in a decorated .toString(). - DecorationPrefixes []string + DecorationPrefixes []string \`json:"decorationPrefixes"\` // The .toString() style. - StringStyle composition.CompositionStringStyle + StringStyle composition.CompositionStringStyle \`json:"stringStyle"\` // A log of all operations. - OperationsLog []scopejsiicalclib.NumericValue + OperationsLog []scopejsiicalclib.NumericValueIface \`json:"operationsLog"\` // A map of per operation name of all operations performed. - OperationsMap map[string][]scopejsiicalclib.NumericValue + OperationsMap map[string][]scopejsiicalclib.NumericValueIface \`json:"operationsMap"\` // The current value. - Curr scopejsiicalclib.NumericValue + Curr scopejsiicalclib.NumericValueIface \`json:"curr"\` // The maximum value allows in this calculator. - MaxValue float64 + MaxValue float64 \`json:"maxValue"\` // Example of a property that accepts a union of types. - UnionProperty jsii.Any + UnionProperty interface{} \`json:"unionProperty"\` } func (c *Calculator) GetValue() float64 { - return c.Value -} - -func (c *Calculator) GetExpression() scopejsiicalclib.NumericValue { - return c.Expression + var returns float64 + _jsii_.Get( + c, + "value", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (c *Calculator) GetExpression() scopejsiicalclib.NumericValueIface { + var returns scopejsiicalclib.NumericValueIface + _jsii_.Get( + c, + "expression", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*scopejsiicalclib.NumericValueIface)(nil)).Elem(): reflect.TypeOf((*scopejsiicalclib.NumericValue)(nil)).Elem(), + }, + ) + return returns } func (c *Calculator) GetDecorationPostfixes() []string { - return c.DecorationPostfixes + var returns []string + _jsii_.Get( + c, + "decorationPostfixes", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*string)(nil)).Elem(): reflect.TypeOf((*string)(nil)).Elem(), + }, + ) + return returns } func (c *Calculator) GetDecorationPrefixes() []string { - return c.DecorationPrefixes + var returns []string + _jsii_.Get( + c, + "decorationPrefixes", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*string)(nil)).Elem(): reflect.TypeOf((*string)(nil)).Elem(), + }, + ) + return returns } func (c *Calculator) GetStringStyle() composition.CompositionStringStyle { - return c.StringStyle + var returns composition.CompositionStringStyle + _jsii_.Get( + c, + "stringStyle", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*composition.CompositionStringStyle)(nil)).Elem(): reflect.TypeOf((*composition.CompositionStringStyle)(nil)).Elem(), + }, + ) + return returns +} + +func (c *Calculator) GetOperationsLog() []scopejsiicalclib.NumericValueIface { + var returns []scopejsiicalclib.NumericValueIface + _jsii_.Get( + c, + "operationsLog", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*scopejsiicalclib.NumericValueIface)(nil)).Elem(): reflect.TypeOf((*scopejsiicalclib.NumericValue)(nil)).Elem(), + }, + ) + return returns +} + +func (c *Calculator) GetOperationsMap() map[string][]scopejsiicalclib.NumericValueIface { + var returns map[string][]scopejsiicalclib.NumericValueIface + _jsii_.Get( + c, + "operationsMap", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*[]scopejsiicalclib.NumericValueIface)(nil)).Elem(): reflect.TypeOf((*[]scopejsiicalclib.NumericValue)(nil)).Elem(), + }, + ) + return returns +} + +func (c *Calculator) GetCurr() scopejsiicalclib.NumericValueIface { + var returns scopejsiicalclib.NumericValueIface + _jsii_.Get( + c, + "curr", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*scopejsiicalclib.NumericValueIface)(nil)).Elem(): reflect.TypeOf((*scopejsiicalclib.NumericValue)(nil)).Elem(), + }, + ) + return returns } -func (c *Calculator) GetOperationsLog() []scopejsiicalclib.NumericValue { - return c.OperationsLog +func (c *Calculator) GetMaxValue() float64 { + var returns float64 + _jsii_.Get( + c, + "maxValue", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } -func (c *Calculator) GetOperationsMap() map[string][]scopejsiicalclib.NumericValue { - return c.OperationsMap +func (c *Calculator) GetUnionProperty() interface{} { + var returns interface{} + _jsii_.Get( + c, + "unionProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } -func (c *Calculator) GetCurr() scopejsiicalclib.NumericValue { - return c.Curr -} -func (c *Calculator) GetMaxValue() float64 { - return c.MaxValue +// Creates a Calculator object. +func NewCalculator(props CalculatorPropsIface) CalculatorIface { + _init_.Initialize() + self := Calculator{} + _jsii_.Create( + "jsii-calc.Calculator", + []interface{}{props}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } -func (c *Calculator) GetUnionProperty() jsii.Any { - return c.UnionProperty -} - - -// Creates a Calculator object. -func NewCalculator(props CalculatorProps) CalculatorIface { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Calculator", - Method: "Constructor", - Args: []string{"jsii-calc.CalculatorProps",}, - }) - return &Calculator{} -} - -func (c *Calculator) SetValue(val float64) { - c.Value = val -} - -func (c *Calculator) SetExpression(val scopejsiicalclib.NumericValue) { - c.Expression = val -} - -func (c *Calculator) SetDecorationPostfixes(val []string) { - c.DecorationPostfixes = val +func (c *Calculator) SetDecorationPostfixes(val []string) { + _jsii_.Set( + c, + "decorationPostfixes", + val, + ) } func (c *Calculator) SetDecorationPrefixes(val []string) { - c.DecorationPrefixes = val + _jsii_.Set( + c, + "decorationPrefixes", + val, + ) } func (c *Calculator) SetStringStyle(val composition.CompositionStringStyle) { - c.StringStyle = val -} - -func (c *Calculator) SetOperationsLog(val []scopejsiicalclib.NumericValue) { - c.OperationsLog = val -} - -func (c *Calculator) SetOperationsMap(val map[string][]scopejsiicalclib.NumericValue) { - c.OperationsMap = val + _jsii_.Set( + c, + "stringStyle", + val, + ) } -func (c *Calculator) SetCurr(val scopejsiicalclib.NumericValue) { - c.Curr = val +func (c *Calculator) SetCurr(val scopejsiicalclib.NumericValueIface) { + _jsii_.Set( + 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) TypeName() jsii.Any { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Calculator", - Method: "TypeName", - Args: []string{}, - }) - return nil + _jsii_.Set( + c, + "maxValue", + val, + ) +} + +func (c *Calculator) SetUnionProperty(val interface{}) { + _jsii_.Set( + c, + "unionProperty", + val, + ) +} + +func (c *Calculator) TypeName() interface{} { + var returns interface{} + _jsii_.Invoke( + c, + "typeName", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (c *Calculator) ToString() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Calculator", - Method: "ToString", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + c, + "toString", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (c *Calculator) Add(value float64) { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Calculator", - Method: "Add", - Args: []string{"number",}, - }) + var returns interface{} + _jsii_.Invoke( + c, + "add", + []interface{}{value}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (c *Calculator) Mul(value float64) { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Calculator", - Method: "Mul", - Args: []string{"number",}, - }) + var returns interface{} + _jsii_.Invoke( + c, + "mul", + []interface{}{value}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (c *Calculator) Neg() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Calculator", - Method: "Neg", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + c, + "neg", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (c *Calculator) Pow(value float64) { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Calculator", - Method: "Pow", - Args: []string{"number",}, - }) + var returns interface{} + _jsii_.Invoke( + c, + "pow", + []interface{}{value}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (c *Calculator) ReadUnionValue() float64 { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Calculator", - Method: "ReadUnionValue", - Args: []string{}, - }) - return 0.0 + var returns float64 + _jsii_.Invoke( + c, + "readUnionValue", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // CalculatorPropsIface is the public interface for the custom type CalculatorProps @@ -2289,19 +3389,33 @@ type CalculatorPropsIface interface { // Struct proxy type CalculatorProps struct { // The initial value of the calculator. - // + // // NOTE: Any number works here, it's fine. - InitialValue float64 + InitialValue float64 \`json:"initialValue"\` // The maximum value the calculator can store. - MaximumValue float64 + MaximumValue float64 \`json:"maximumValue"\` } func (c *CalculatorProps) GetInitialValue() float64 { - return c.InitialValue + var returns float64 + _jsii_.Get( + c, + "initialValue", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (c *CalculatorProps) GetMaximumValue() float64 { - return c.MaximumValue + var returns float64 + _jsii_.Get( + c, + "maximumValue", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } @@ -2313,23 +3427,37 @@ type ChildStruct982Iface interface { // Struct proxy type ChildStruct982 struct { - Foo string - Bar float64 + Foo string \`json:"foo"\` + Bar float64 \`json:"bar"\` } func (c *ChildStruct982) GetFoo() string { - return c.Foo + var returns string + _jsii_.Get( + c, + "foo", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (c *ChildStruct982) GetBar() float64 { - return c.Bar + var returns float64 + _jsii_.Get( + c, + "bar", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type ClassThatImplementsTheInternalInterfaceIface interface { - INonInternalInterface - IAnotherPublicInterface + INonInternalInterfaceIface + IAnotherPublicInterfaceIface GetA() string SetA(val string) GetB() string @@ -2342,59 +3470,106 @@ type ClassThatImplementsTheInternalInterfaceIface interface { // Struct proxy type ClassThatImplementsTheInternalInterface struct { - A string - B string - C string - D string + A string \`json:"a"\` + B string \`json:"b"\` + C string \`json:"c"\` + D string \`json:"d"\` } func (c *ClassThatImplementsTheInternalInterface) GetA() string { - return c.A + var returns string + _jsii_.Get( + c, + "a", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (c *ClassThatImplementsTheInternalInterface) GetB() string { - return c.B + var returns string + _jsii_.Get( + c, + "b", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (c *ClassThatImplementsTheInternalInterface) GetC() string { - return c.C + var returns string + _jsii_.Get( + c, + "c", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (c *ClassThatImplementsTheInternalInterface) GetD() string { - return c.D + var returns string + _jsii_.Get( + c, + "d", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewClassThatImplementsTheInternalInterface() ClassThatImplementsTheInternalInterfaceIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ClassThatImplementsTheInternalInterface", - Method: "Constructor", - Args: []string{}, - }) - return &ClassThatImplementsTheInternalInterface{} + self := ClassThatImplementsTheInternalInterface{} + _jsii_.Create( + "jsii-calc.ClassThatImplementsTheInternalInterface", + []interface{}{}, + []_jsii_.FQN{"jsii-calc.INonInternalInterface"}, + []_jsii_.Override{}, + &self, + ) + return &self } func (c *ClassThatImplementsTheInternalInterface) SetA(val string) { - c.A = val + _jsii_.Set( + c, + "a", + val, + ) } func (c *ClassThatImplementsTheInternalInterface) SetB(val string) { - c.B = val + _jsii_.Set( + c, + "b", + val, + ) } func (c *ClassThatImplementsTheInternalInterface) SetC(val string) { - c.C = val + _jsii_.Set( + c, + "c", + val, + ) } func (c *ClassThatImplementsTheInternalInterface) SetD(val string) { - c.D = val + _jsii_.Set( + c, + "d", + val, + ) } // Class interface type ClassThatImplementsThePrivateInterfaceIface interface { - INonInternalInterface - IAnotherPublicInterface + INonInternalInterfaceIface + IAnotherPublicInterfaceIface GetA() string SetA(val string) GetB() string @@ -2407,61 +3582,104 @@ type ClassThatImplementsThePrivateInterfaceIface interface { // Struct proxy type ClassThatImplementsThePrivateInterface struct { - A string - B string - C string - E string + A string \`json:"a"\` + B string \`json:"b"\` + C string \`json:"c"\` + E string \`json:"e"\` } func (c *ClassThatImplementsThePrivateInterface) GetA() string { - return c.A + var returns string + _jsii_.Get( + c, + "a", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (c *ClassThatImplementsThePrivateInterface) GetB() string { - return c.B + var returns string + _jsii_.Get( + c, + "b", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (c *ClassThatImplementsThePrivateInterface) GetC() string { - return c.C + var returns string + _jsii_.Get( + c, + "c", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (c *ClassThatImplementsThePrivateInterface) GetE() string { - return c.E + var returns string + _jsii_.Get( + c, + "e", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewClassThatImplementsThePrivateInterface() ClassThatImplementsThePrivateInterfaceIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ClassThatImplementsThePrivateInterface", - Method: "Constructor", - Args: []string{}, - }) - return &ClassThatImplementsThePrivateInterface{} + self := ClassThatImplementsThePrivateInterface{} + _jsii_.Create( + "jsii-calc.ClassThatImplementsThePrivateInterface", + []interface{}{}, + []_jsii_.FQN{"jsii-calc.INonInternalInterface"}, + []_jsii_.Override{}, + &self, + ) + return &self } func (c *ClassThatImplementsThePrivateInterface) SetA(val string) { - c.A = val + _jsii_.Set( + c, + "a", + val, + ) } func (c *ClassThatImplementsThePrivateInterface) SetB(val string) { - c.B = val + _jsii_.Set( + c, + "b", + val, + ) } func (c *ClassThatImplementsThePrivateInterface) SetC(val string) { - c.C = val + _jsii_.Set( + c, + "c", + val, + ) } func (c *ClassThatImplementsThePrivateInterface) SetE(val string) { - c.E = val + _jsii_.Set( + c, + "e", + val, + ) } // Class interface type ClassWithCollectionsIface interface { - GetStaticArray() []string - SetStaticArray(val []string) - GetStaticMap() map[string]string - SetStaticMap(val map[string]string) GetArray() []string SetArray(val []string) GetMap() map[string]string @@ -2470,77 +3688,142 @@ type ClassWithCollectionsIface interface { // Struct proxy type ClassWithCollections struct { - StaticArray []string - StaticMap map[string]string - Array []string - Map map[string]string -} - -func (c *ClassWithCollections) GetStaticArray() []string { - _init_.Initialize() - return c.StaticArray -} - -func (c *ClassWithCollections) GetStaticMap() map[string]string { - _init_.Initialize() - return c.StaticMap + Array []string \`json:"array"\` + Map map[string]string \`json:"map"\` } func (c *ClassWithCollections) GetArray() []string { - return c.Array + var returns []string + _jsii_.Get( + c, + "array", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*string)(nil)).Elem(): reflect.TypeOf((*string)(nil)).Elem(), + }, + ) + return returns } func (c *ClassWithCollections) GetMap() map[string]string { - return c.Map + var returns map[string]string + _jsii_.Get( + c, + "map", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*string)(nil)).Elem(): reflect.TypeOf((*string)(nil)).Elem(), + }, + ) + return returns } func NewClassWithCollections(map_ map[string]string, array []string) ClassWithCollectionsIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ClassWithCollections", - Method: "Constructor", - Args: []string{"Map string>", "Array",}, - }) - return &ClassWithCollections{} + self := ClassWithCollections{} + _jsii_.Create( + "jsii-calc.ClassWithCollections", + []interface{}{map_, array}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self +} + +func (c *ClassWithCollections) SetArray(val []string) { + _jsii_.Set( + c, + "array", + val, + ) +} + +func (c *ClassWithCollections) SetMap(val map[string]string) { + _jsii_.Set( + c, + "map", + val, + ) } -func (c *ClassWithCollections) SetStaticArray(val []string) { +func ClassWithCollections_CreateAList() []string { _init_.Initialize() - c.StaticArray = val + var returns []string + _jsii_.InvokeStatic( + "jsii-calc.ClassWithCollections", + "createAList", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*string)(nil)).Elem(): reflect.TypeOf((*string)(nil)).Elem(), + }, + ) + return returns } -func (c *ClassWithCollections) SetStaticMap(val map[string]string) { +func ClassWithCollections_CreateAMap() map[string]string { _init_.Initialize() - c.StaticMap = val + var returns map[string]string + _jsii_.InvokeStatic( + "jsii-calc.ClassWithCollections", + "createAMap", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*string)(nil)).Elem(): reflect.TypeOf((*string)(nil)).Elem(), + }, + ) + return returns } -func (c *ClassWithCollections) SetArray(val []string) { - c.Array = val +func ClassWithCollections_StaticArray() []string { + _init_.Initialize() + var returns []string + _jsii_.StaticGet( + "jsii-calc.ClassWithCollections", + "staticArray", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*string)(nil)).Elem(): reflect.TypeOf((*string)(nil)).Elem(), + }, + ) + return returns } -func (c *ClassWithCollections) SetMap(val map[string]string) { - c.Map = val +func ClassWithCollections_SetStaticArray(val []string) { + _init_.Initialize() + _jsii_.StaticSet( + "jsii-calc.ClassWithCollections", + "staticArray", + val, + ) } -func ClassWithCollections_CreateAList() []string { +func ClassWithCollections_StaticMap() map[string]string { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ClassWithCollections", - Method: "CreateAList", - Args: []string{}, - }) - return nil + var returns map[string]string + _jsii_.StaticGet( + "jsii-calc.ClassWithCollections", + "staticMap", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*string)(nil)).Elem(): reflect.TypeOf((*string)(nil)).Elem(), + }, + ) + return returns } -func ClassWithCollections_CreateAMap() map[string]string { +func ClassWithCollections_SetStaticMap(val map[string]string) { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ClassWithCollections", - Method: "CreateAMap", - Args: []string{}, - }) - return nil + _jsii_.StaticSet( + "jsii-calc.ClassWithCollections", + "staticMap", + val, + ) } // Class interface @@ -2548,7 +3831,7 @@ type ClassWithDocsIface interface { } // This class has docs. -// +// // The docs are great. They're a bunch of tags. // // TODO: EXAMPLE @@ -2561,89 +3844,116 @@ type ClassWithDocs struct { func NewClassWithDocs() ClassWithDocsIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ClassWithDocs", - Method: "Constructor", - Args: []string{}, - }) - return &ClassWithDocs{} + self := ClassWithDocs{} + _jsii_.Create( + "jsii-calc.ClassWithDocs", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } // Class interface type ClassWithJavaReservedWordsIface interface { GetInt() string - SetInt(val string) Import(assert string) string } // Struct proxy type ClassWithJavaReservedWords struct { - Int string + Int string \`json:"int"\` } func (c *ClassWithJavaReservedWords) GetInt() string { - return c.Int + var returns string + _jsii_.Get( + c, + "int", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewClassWithJavaReservedWords(int string) ClassWithJavaReservedWordsIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ClassWithJavaReservedWords", - Method: "Constructor", - Args: []string{"string",}, - }) - return &ClassWithJavaReservedWords{} -} - -func (c *ClassWithJavaReservedWords) SetInt(val string) { - c.Int = val + self := ClassWithJavaReservedWords{} + _jsii_.Create( + "jsii-calc.ClassWithJavaReservedWords", + []interface{}{int}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (c *ClassWithJavaReservedWords) Import(assert string) string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ClassWithJavaReservedWords", - Method: "Import", - Args: []string{"string",}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + c, + "import", + []interface{}{assert}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type ClassWithMutableObjectLiteralPropertyIface interface { - GetMutableObject() IMutableObjectLiteral - SetMutableObject(val IMutableObjectLiteral) + GetMutableObject() IMutableObjectLiteralIface + SetMutableObject(val IMutableObjectLiteralIface) } // Struct proxy type ClassWithMutableObjectLiteralProperty struct { - MutableObject IMutableObjectLiteral + MutableObject IMutableObjectLiteralIface \`json:"mutableObject"\` } -func (c *ClassWithMutableObjectLiteralProperty) GetMutableObject() IMutableObjectLiteral { - return c.MutableObject +func (c *ClassWithMutableObjectLiteralProperty) GetMutableObject() IMutableObjectLiteralIface { + var returns IMutableObjectLiteralIface + _jsii_.Get( + c, + "mutableObject", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*IMutableObjectLiteralIface)(nil)).Elem(): reflect.TypeOf((*IMutableObjectLiteral)(nil)).Elem(), + }, + ) + return returns } func NewClassWithMutableObjectLiteralProperty() ClassWithMutableObjectLiteralPropertyIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ClassWithMutableObjectLiteralProperty", - Method: "Constructor", - Args: []string{}, - }) - return &ClassWithMutableObjectLiteralProperty{} + self := ClassWithMutableObjectLiteralProperty{} + _jsii_.Create( + "jsii-calc.ClassWithMutableObjectLiteralProperty", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } -func (c *ClassWithMutableObjectLiteralProperty) SetMutableObject(val IMutableObjectLiteral) { - c.MutableObject = val +func (c *ClassWithMutableObjectLiteralProperty) SetMutableObject(val IMutableObjectLiteralIface) { + _jsii_.Set( + c, + "mutableObject", + val, + ) } // Class interface type ClassWithPrivateConstructorAndAutomaticPropertiesIface interface { - IInterfaceWithProperties + IInterfaceWithPropertiesIface GetReadOnlyString() string - SetReadOnlyString(val string) GetReadWriteString() string SetReadWriteString(val string) } @@ -2651,41 +3961,61 @@ type ClassWithPrivateConstructorAndAutomaticPropertiesIface interface { // Class that implements interface properties automatically, but using a private constructor. // Struct proxy type ClassWithPrivateConstructorAndAutomaticProperties struct { - ReadOnlyString string - ReadWriteString string + ReadOnlyString string \`json:"readOnlyString"\` + ReadWriteString string \`json:"readWriteString"\` } func (c *ClassWithPrivateConstructorAndAutomaticProperties) GetReadOnlyString() string { - return c.ReadOnlyString + var returns string + _jsii_.Get( + c, + "readOnlyString", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (c *ClassWithPrivateConstructorAndAutomaticProperties) GetReadWriteString() string { - return c.ReadWriteString + var returns string + _jsii_.Get( + c, + "readWriteString", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } -func (c *ClassWithPrivateConstructorAndAutomaticProperties) SetReadOnlyString(val string) { - c.ReadOnlyString = val -} - func (c *ClassWithPrivateConstructorAndAutomaticProperties) SetReadWriteString(val string) { - c.ReadWriteString = val + _jsii_.Set( + c, + "readWriteString", + val, + ) } -func ClassWithPrivateConstructorAndAutomaticProperties_Create(readOnlyString string, readWriteString string) ClassWithPrivateConstructorAndAutomaticProperties { +func ClassWithPrivateConstructorAndAutomaticProperties_Create(readOnlyString string, readWriteString string) ClassWithPrivateConstructorAndAutomaticPropertiesIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ClassWithPrivateConstructorAndAutomaticProperties", - Method: "Create", - Args: []string{"string", "string",}, - }) - return ClassWithPrivateConstructorAndAutomaticProperties{} + var returns ClassWithPrivateConstructorAndAutomaticPropertiesIface + _jsii_.InvokeStatic( + "jsii-calc.ClassWithPrivateConstructorAndAutomaticProperties", + "create", + []interface{}{readOnlyString, readWriteString}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*ClassWithPrivateConstructorAndAutomaticPropertiesIface)(nil)).Elem(): reflect.TypeOf((*ClassWithPrivateConstructorAndAutomaticProperties)(nil)).Elem(), + }, + ) + return returns } // Class interface type ConfusingToJacksonIface interface { - GetUnionProperty() jsii.Any - SetUnionProperty(val jsii.Any) + GetUnionProperty() interface{} + SetUnionProperty(val interface{}) } // This tries to confuse Jackson by having overloaded property setters. @@ -2693,50 +4023,80 @@ type ConfusingToJacksonIface interface { // // Struct proxy type ConfusingToJackson struct { - UnionProperty jsii.Any + UnionProperty interface{} \`json:"unionProperty"\` } -func (c *ConfusingToJackson) GetUnionProperty() jsii.Any { - return c.UnionProperty +func (c *ConfusingToJackson) GetUnionProperty() interface{} { + var returns interface{} + _jsii_.Get( + c, + "unionProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } -func (c *ConfusingToJackson) SetUnionProperty(val jsii.Any) { - c.UnionProperty = val +func (c *ConfusingToJackson) SetUnionProperty(val interface{}) { + _jsii_.Set( + c, + "unionProperty", + val, + ) } -func ConfusingToJackson_MakeInstance() ConfusingToJackson { +func ConfusingToJackson_MakeInstance() ConfusingToJacksonIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ConfusingToJackson", - Method: "MakeInstance", - Args: []string{}, - }) - return ConfusingToJackson{} + var returns ConfusingToJacksonIface + _jsii_.InvokeStatic( + "jsii-calc.ConfusingToJackson", + "makeInstance", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*ConfusingToJacksonIface)(nil)).Elem(): reflect.TypeOf((*ConfusingToJackson)(nil)).Elem(), + }, + ) + return returns } -func ConfusingToJackson_MakeStructInstance() ConfusingToJacksonStruct { +func ConfusingToJackson_MakeStructInstance() ConfusingToJacksonStructIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ConfusingToJackson", - Method: "MakeStructInstance", - Args: []string{}, - }) - return ConfusingToJacksonStruct{} + var returns ConfusingToJacksonStructIface + _jsii_.InvokeStatic( + "jsii-calc.ConfusingToJackson", + "makeStructInstance", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*ConfusingToJacksonStructIface)(nil)).Elem(): reflect.TypeOf((*ConfusingToJacksonStruct)(nil)).Elem(), + }, + ) + return returns } // ConfusingToJacksonStructIface is the public interface for the custom type ConfusingToJacksonStruct type ConfusingToJacksonStructIface interface { - GetUnionProperty() jsii.Any + GetUnionProperty() interface{} } // Struct proxy type ConfusingToJacksonStruct struct { - UnionProperty jsii.Any + UnionProperty interface{} \`json:"unionProperty"\` } -func (c *ConfusingToJacksonStruct) GetUnionProperty() jsii.Any { - return c.UnionProperty +func (c *ConfusingToJacksonStruct) GetUnionProperty() interface{} { + var returns interface{} + _jsii_.Get( + c, + "unionProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } @@ -2748,14 +4108,17 @@ type ConstructorPassesThisOutIface interface { type ConstructorPassesThisOut struct { } -func NewConstructorPassesThisOut(consumer PartiallyInitializedThisConsumer) ConstructorPassesThisOutIface { +func NewConstructorPassesThisOut(consumer PartiallyInitializedThisConsumerIface) ConstructorPassesThisOutIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ConstructorPassesThisOut", - Method: "Constructor", - Args: []string{"jsii-calc.PartiallyInitializedThisConsumer",}, - }) - return &ConstructorPassesThisOut{} + self := ConstructorPassesThisOut{} + _jsii_.Create( + "jsii-calc.ConstructorPassesThisOut", + []interface{}{consumer}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } // Class interface @@ -2768,122 +4131,176 @@ type Constructors struct { func NewConstructors() ConstructorsIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Constructors", - Method: "Constructor", - Args: []string{}, - }) - return &Constructors{} -} - -func Constructors_HiddenInterface() IPublicInterface { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Constructors", - Method: "HiddenInterface", - Args: []string{}, - }) - return nil -} - -func Constructors_HiddenInterfaces() []IPublicInterface { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Constructors", - Method: "HiddenInterfaces", - Args: []string{}, - }) - return nil -} - -func Constructors_HiddenSubInterfaces() []IPublicInterface { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Constructors", - Method: "HiddenSubInterfaces", - Args: []string{}, - }) - return nil -} - -func Constructors_MakeClass() PublicClass { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Constructors", - Method: "MakeClass", - Args: []string{}, - }) - return PublicClass{} -} - -func Constructors_MakeInterface() IPublicInterface { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Constructors", - Method: "MakeInterface", - Args: []string{}, - }) - return nil -} - -func Constructors_MakeInterface2() IPublicInterface2 { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Constructors", - Method: "MakeInterface2", - Args: []string{}, - }) - return nil -} - -func Constructors_MakeInterfaces() []IPublicInterface { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Constructors", - Method: "MakeInterfaces", - Args: []string{}, - }) - return nil + self := Constructors{} + _jsii_.Create( + "jsii-calc.Constructors", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self +} + +func Constructors_HiddenInterface() IPublicInterfaceIface { + _init_.Initialize() + var returns IPublicInterfaceIface + _jsii_.InvokeStatic( + "jsii-calc.Constructors", + "hiddenInterface", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*IPublicInterfaceIface)(nil)).Elem(): reflect.TypeOf((*IPublicInterface)(nil)).Elem(), + }, + ) + return returns +} + +func Constructors_HiddenInterfaces() []IPublicInterfaceIface { + _init_.Initialize() + var returns []IPublicInterfaceIface + _jsii_.InvokeStatic( + "jsii-calc.Constructors", + "hiddenInterfaces", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*IPublicInterfaceIface)(nil)).Elem(): reflect.TypeOf((*IPublicInterface)(nil)).Elem(), + }, + ) + return returns +} + +func Constructors_HiddenSubInterfaces() []IPublicInterfaceIface { + _init_.Initialize() + var returns []IPublicInterfaceIface + _jsii_.InvokeStatic( + "jsii-calc.Constructors", + "hiddenSubInterfaces", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*IPublicInterfaceIface)(nil)).Elem(): reflect.TypeOf((*IPublicInterface)(nil)).Elem(), + }, + ) + return returns +} + +func Constructors_MakeClass() PublicClassIface { + _init_.Initialize() + var returns PublicClassIface + _jsii_.InvokeStatic( + "jsii-calc.Constructors", + "makeClass", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*PublicClassIface)(nil)).Elem(): reflect.TypeOf((*PublicClass)(nil)).Elem(), + }, + ) + return returns +} + +func Constructors_MakeInterface() IPublicInterfaceIface { + _init_.Initialize() + var returns IPublicInterfaceIface + _jsii_.InvokeStatic( + "jsii-calc.Constructors", + "makeInterface", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*IPublicInterfaceIface)(nil)).Elem(): reflect.TypeOf((*IPublicInterface)(nil)).Elem(), + }, + ) + return returns +} + +func Constructors_MakeInterface2() IPublicInterface2Iface { + _init_.Initialize() + var returns IPublicInterface2Iface + _jsii_.InvokeStatic( + "jsii-calc.Constructors", + "makeInterface2", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*IPublicInterface2Iface)(nil)).Elem(): reflect.TypeOf((*IPublicInterface2)(nil)).Elem(), + }, + ) + return returns +} + +func Constructors_MakeInterfaces() []IPublicInterfaceIface { + _init_.Initialize() + var returns []IPublicInterfaceIface + _jsii_.InvokeStatic( + "jsii-calc.Constructors", + "makeInterfaces", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*IPublicInterfaceIface)(nil)).Elem(): reflect.TypeOf((*IPublicInterface)(nil)).Elem(), + }, + ) + return returns } // Class interface type ConsumePureInterfaceIface interface { - WorkItBaby() StructB + WorkItBaby() StructBIface } // Struct proxy type ConsumePureInterface struct { } -func NewConsumePureInterface(delegate IStructReturningDelegate) ConsumePureInterfaceIface { +func NewConsumePureInterface(delegate IStructReturningDelegateIface) ConsumePureInterfaceIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ConsumePureInterface", - Method: "Constructor", - Args: []string{"jsii-calc.IStructReturningDelegate",}, - }) - return &ConsumePureInterface{} + self := ConsumePureInterface{} + _jsii_.Create( + "jsii-calc.ConsumePureInterface", + []interface{}{delegate}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } -func (c *ConsumePureInterface) WorkItBaby() StructB { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ConsumePureInterface", - Method: "WorkItBaby", - Args: []string{}, - }) - return StructB{} +func (c *ConsumePureInterface) WorkItBaby() StructBIface { + var returns StructBIface + _jsii_.Invoke( + c, + "workItBaby", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*StructBIface)(nil)).Elem(): reflect.TypeOf((*StructB)(nil)).Elem(), + }, + ) + return returns } // Class interface type ConsumerCanRingBellIface interface { - ImplementedByObjectLiteral(ringer IBellRinger) bool - ImplementedByPrivateClass(ringer IBellRinger) bool - ImplementedByPublicClass(ringer IBellRinger) bool - WhenTypedAsClass(ringer IConcreteBellRinger) bool + ImplementedByObjectLiteral(ringer IBellRingerIface) bool + ImplementedByPrivateClass(ringer IBellRingerIface) bool + ImplementedByPublicClass(ringer IBellRingerIface) bool + WhenTypedAsClass(ringer IConcreteBellRingerIface) bool } // Test calling back to consumers that implement interfaces. -// +// // Check that if a JSII consumer implements IConsumerWithInterfaceParam, they can call // the method on the argument that they're passed... // Struct proxy @@ -2892,94 +4309,129 @@ type ConsumerCanRingBell struct { func NewConsumerCanRingBell() ConsumerCanRingBellIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ConsumerCanRingBell", - Method: "Constructor", - Args: []string{}, - }) - return &ConsumerCanRingBell{} -} - -func ConsumerCanRingBell_StaticImplementedByObjectLiteral(ringer IBellRinger) bool { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ConsumerCanRingBell", - Method: "StaticImplementedByObjectLiteral", - Args: []string{"jsii-calc.IBellRinger",}, - }) - return true -} - -func ConsumerCanRingBell_StaticImplementedByPrivateClass(ringer IBellRinger) bool { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ConsumerCanRingBell", - Method: "StaticImplementedByPrivateClass", - Args: []string{"jsii-calc.IBellRinger",}, - }) - return true -} - -func ConsumerCanRingBell_StaticImplementedByPublicClass(ringer IBellRinger) bool { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ConsumerCanRingBell", - Method: "StaticImplementedByPublicClass", - Args: []string{"jsii-calc.IBellRinger",}, - }) - return true -} - -func ConsumerCanRingBell_StaticWhenTypedAsClass(ringer IConcreteBellRinger) bool { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ConsumerCanRingBell", - Method: "StaticWhenTypedAsClass", - Args: []string{"jsii-calc.IConcreteBellRinger",}, - }) - return true -} - -func (c *ConsumerCanRingBell) ImplementedByObjectLiteral(ringer IBellRinger) bool { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ConsumerCanRingBell", - Method: "ImplementedByObjectLiteral", - Args: []string{"jsii-calc.IBellRinger",}, - }) - return true -} - -func (c *ConsumerCanRingBell) ImplementedByPrivateClass(ringer IBellRinger) bool { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ConsumerCanRingBell", - Method: "ImplementedByPrivateClass", - Args: []string{"jsii-calc.IBellRinger",}, - }) - return true -} - -func (c *ConsumerCanRingBell) ImplementedByPublicClass(ringer IBellRinger) bool { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ConsumerCanRingBell", - Method: "ImplementedByPublicClass", - Args: []string{"jsii-calc.IBellRinger",}, - }) - return true -} - -func (c *ConsumerCanRingBell) WhenTypedAsClass(ringer IConcreteBellRinger) bool { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ConsumerCanRingBell", - Method: "WhenTypedAsClass", - Args: []string{"jsii-calc.IConcreteBellRinger",}, - }) - return true + self := ConsumerCanRingBell{} + _jsii_.Create( + "jsii-calc.ConsumerCanRingBell", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self +} + +func ConsumerCanRingBell_StaticImplementedByObjectLiteral(ringer IBellRingerIface) bool { + _init_.Initialize() + var returns bool + _jsii_.InvokeStatic( + "jsii-calc.ConsumerCanRingBell", + "staticImplementedByObjectLiteral", + []interface{}{ringer}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func ConsumerCanRingBell_StaticImplementedByPrivateClass(ringer IBellRingerIface) bool { + _init_.Initialize() + var returns bool + _jsii_.InvokeStatic( + "jsii-calc.ConsumerCanRingBell", + "staticImplementedByPrivateClass", + []interface{}{ringer}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func ConsumerCanRingBell_StaticImplementedByPublicClass(ringer IBellRingerIface) bool { + _init_.Initialize() + var returns bool + _jsii_.InvokeStatic( + "jsii-calc.ConsumerCanRingBell", + "staticImplementedByPublicClass", + []interface{}{ringer}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func ConsumerCanRingBell_StaticWhenTypedAsClass(ringer IConcreteBellRingerIface) bool { + _init_.Initialize() + var returns bool + _jsii_.InvokeStatic( + "jsii-calc.ConsumerCanRingBell", + "staticWhenTypedAsClass", + []interface{}{ringer}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (c *ConsumerCanRingBell) ImplementedByObjectLiteral(ringer IBellRingerIface) bool { + var returns bool + _jsii_.Invoke( + c, + "implementedByObjectLiteral", + []interface{}{ringer}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (c *ConsumerCanRingBell) ImplementedByPrivateClass(ringer IBellRingerIface) bool { + var returns bool + _jsii_.Invoke( + c, + "implementedByPrivateClass", + []interface{}{ringer}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (c *ConsumerCanRingBell) ImplementedByPublicClass(ringer IBellRingerIface) bool { + var returns bool + _jsii_.Invoke( + c, + "implementedByPublicClass", + []interface{}{ringer}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (c *ConsumerCanRingBell) WhenTypedAsClass(ringer IConcreteBellRingerIface) bool { + var returns bool + _jsii_.Invoke( + c, + "whenTypedAsClass", + []interface{}{ringer}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type ConsumersOfThisCrazyTypeSystemIface interface { - ConsumeAnotherPublicInterface(obj IAnotherPublicInterface) string - ConsumeNonInternalInterface(obj INonInternalInterface) jsii.Any + ConsumeAnotherPublicInterface(obj IAnotherPublicInterfaceIface) string + ConsumeNonInternalInterface(obj INonInternalInterfaceIface) interface{} } // Struct proxy @@ -2988,37 +4440,48 @@ type ConsumersOfThisCrazyTypeSystem struct { func NewConsumersOfThisCrazyTypeSystem() ConsumersOfThisCrazyTypeSystemIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ConsumersOfThisCrazyTypeSystem", - Method: "Constructor", - Args: []string{}, - }) - return &ConsumersOfThisCrazyTypeSystem{} -} - -func (c *ConsumersOfThisCrazyTypeSystem) ConsumeAnotherPublicInterface(obj IAnotherPublicInterface) string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ConsumersOfThisCrazyTypeSystem", - Method: "ConsumeAnotherPublicInterface", - Args: []string{"jsii-calc.IAnotherPublicInterface",}, - }) - return "NOOP_RETURN_STRING" -} - -func (c *ConsumersOfThisCrazyTypeSystem) ConsumeNonInternalInterface(obj INonInternalInterface) jsii.Any { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ConsumersOfThisCrazyTypeSystem", - Method: "ConsumeNonInternalInterface", - Args: []string{"jsii-calc.INonInternalInterface",}, - }) - return nil + self := ConsumersOfThisCrazyTypeSystem{} + _jsii_.Create( + "jsii-calc.ConsumersOfThisCrazyTypeSystem", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self +} + +func (c *ConsumersOfThisCrazyTypeSystem) ConsumeAnotherPublicInterface(obj IAnotherPublicInterfaceIface) string { + var returns string + _jsii_.Invoke( + c, + "consumeAnotherPublicInterface", + []interface{}{obj}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (c *ConsumersOfThisCrazyTypeSystem) ConsumeNonInternalInterface(obj INonInternalInterfaceIface) interface{} { + var returns interface{} + _jsii_.Invoke( + c, + "consumeNonInternalInterface", + []interface{}{obj}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type DataRendererIface interface { - Render(data scopejsiicalclib.MyFirstStruct) string - RenderArbitrary(data map[string]jsii.Any) string - RenderMap(map_ map[string]jsii.Any) string + Render(data scopejsiicalclib.MyFirstStructIface) string + RenderArbitrary(data map[string]interface{}) string + RenderMap(map_ map[string]interface{}) string } // Verifies proper type handling through dynamic overrides. @@ -3028,91 +4491,115 @@ type DataRenderer struct { func NewDataRenderer() DataRendererIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "DataRenderer", - Method: "Constructor", - Args: []string{}, - }) - return &DataRenderer{} -} - -func (d *DataRenderer) Render(data scopejsiicalclib.MyFirstStruct) string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "DataRenderer", - Method: "Render", - Args: []string{"@scope/jsii-calc-lib.MyFirstStruct",}, - }) - return "NOOP_RETURN_STRING" -} - -func (d *DataRenderer) RenderArbitrary(data map[string]jsii.Any) string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "DataRenderer", - Method: "RenderArbitrary", - Args: []string{"Map any>",}, - }) - return "NOOP_RETURN_STRING" -} - -func (d *DataRenderer) RenderMap(map_ map[string]jsii.Any) string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "DataRenderer", - Method: "RenderMap", - Args: []string{"Map any>",}, - }) - return "NOOP_RETURN_STRING" + self := DataRenderer{} + _jsii_.Create( + "jsii-calc.DataRenderer", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self +} + +func (d *DataRenderer) Render(data scopejsiicalclib.MyFirstStructIface) string { + var returns string + _jsii_.Invoke( + d, + "render", + []interface{}{data}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (d *DataRenderer) RenderArbitrary(data map[string]interface{}) string { + var returns string + _jsii_.Invoke( + d, + "renderArbitrary", + []interface{}{data}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (d *DataRenderer) RenderMap(map_ map[string]interface{}) string { + var returns string + _jsii_.Invoke( + d, + "renderMap", + []interface{}{map_}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type DefaultedConstructorArgumentIface interface { GetArg1() float64 - SetArg1(val float64) GetArg3() string - SetArg3(val string) GetArg2() string - SetArg2(val string) } // Struct proxy type DefaultedConstructorArgument struct { - Arg1 float64 - Arg3 string - Arg2 string + Arg1 float64 \`json:"arg1"\` + Arg3 string \`json:"arg3"\` + Arg2 string \`json:"arg2"\` } func (d *DefaultedConstructorArgument) GetArg1() float64 { - return d.Arg1 + var returns float64 + _jsii_.Get( + d, + "arg1", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (d *DefaultedConstructorArgument) GetArg3() string { - return d.Arg3 + var returns string + _jsii_.Get( + d, + "arg3", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (d *DefaultedConstructorArgument) GetArg2() string { - return d.Arg2 + var returns string + _jsii_.Get( + d, + "arg2", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewDefaultedConstructorArgument(arg1 float64, arg2 string, arg3 string) DefaultedConstructorArgumentIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "DefaultedConstructorArgument", - Method: "Constructor", - Args: []string{"number", "string", "date",}, - }) - return &DefaultedConstructorArgument{} -} - -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 + self := DefaultedConstructorArgument{} + _jsii_.Create( + "jsii-calc.DefaultedConstructorArgument", + []interface{}{arg1, arg2, arg3}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } // Class interface @@ -3120,7 +4607,7 @@ type Demonstrate982Iface interface { } // 1. -// +// // call #takeThis() -> An ObjectRef will be provisioned for the value (it'll be re-used!) // 2. call #takeThisToo() -> The ObjectRef from before will need to be down-cased to the ParentStruct982 type // Struct proxy @@ -3129,38 +4616,52 @@ type Demonstrate982 struct { func NewDemonstrate982() Demonstrate982Iface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Demonstrate982", - Method: "Constructor", - Args: []string{}, - }) - return &Demonstrate982{} -} - -func Demonstrate982_TakeThis() ChildStruct982 { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Demonstrate982", - Method: "TakeThis", - Args: []string{}, - }) - return ChildStruct982{} -} - -func Demonstrate982_TakeThisToo() ParentStruct982 { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Demonstrate982", - Method: "TakeThisToo", - Args: []string{}, - }) - return ParentStruct982{} + self := Demonstrate982{} + _jsii_.Create( + "jsii-calc.Demonstrate982", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self +} + +func Demonstrate982_TakeThis() ChildStruct982Iface { + _init_.Initialize() + var returns ChildStruct982Iface + _jsii_.InvokeStatic( + "jsii-calc.Demonstrate982", + "takeThis", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*ChildStruct982Iface)(nil)).Elem(): reflect.TypeOf((*ChildStruct982)(nil)).Elem(), + }, + ) + return returns +} + +func Demonstrate982_TakeThisToo() ParentStruct982Iface { + _init_.Initialize() + var returns ParentStruct982Iface + _jsii_.InvokeStatic( + "jsii-calc.Demonstrate982", + "takeThisToo", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*ParentStruct982Iface)(nil)).Elem(): reflect.TypeOf((*ParentStruct982)(nil)).Elem(), + }, + ) + return returns } // Class interface type DeprecatedClassIface interface { GetReadonlyProperty() string - SetReadonlyProperty(val string) GetMutableProperty() float64 SetMutableProperty(val float64) Method() @@ -3170,44 +4671,65 @@ type DeprecatedClassIface interface { // Struct proxy type DeprecatedClass struct { // Deprecated: this is not always "wazoo", be ready to be disappointed - ReadonlyProperty string + ReadonlyProperty string \`json:"readonlyProperty"\` // Deprecated: shouldn't have been mutable - MutableProperty float64 + MutableProperty float64 \`json:"mutableProperty"\` } func (d *DeprecatedClass) GetReadonlyProperty() string { - return d.ReadonlyProperty + var returns string + _jsii_.Get( + d, + "readonlyProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (d *DeprecatedClass) GetMutableProperty() float64 { - return d.MutableProperty + var returns float64 + _jsii_.Get( + d, + "mutableProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewDeprecatedClass(readonlyString string, mutableNumber float64) DeprecatedClassIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "DeprecatedClass", - Method: "Constructor", - Args: []string{"string", "number",}, - }) - return &DeprecatedClass{} -} - -func (d *DeprecatedClass) SetReadonlyProperty(val string) { - d.ReadonlyProperty = val + self := DeprecatedClass{} + _jsii_.Create( + "jsii-calc.DeprecatedClass", + []interface{}{readonlyString, mutableNumber}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (d *DeprecatedClass) SetMutableProperty(val float64) { - d.MutableProperty = val + _jsii_.Set( + d, + "mutableProperty", + val, + ) } func (d *DeprecatedClass) Method() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "DeprecatedClass", - Method: "Method", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + d, + "method", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } // Deprecated: your deprecated selection of bad options @@ -3228,11 +4750,18 @@ type DeprecatedStructIface interface { // Struct proxy type DeprecatedStruct struct { // Deprecated: well, yeah - ReadonlyProperty string + ReadonlyProperty string \`json:"readonlyProperty"\` } func (d *DeprecatedStruct) GetReadonlyProperty() string { - return d.ReadonlyProperty + var returns string + _jsii_.Get( + d, + "readonlyProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } @@ -3243,9 +4772,9 @@ type DerivedStructIface interface { GetFirstOptional() []string GetAnotherRequired() string GetBool() bool - GetNonPrimitive() DoubleTrouble - GetAnotherOptional() map[string]scopejsiicalclib.NumericValue - GetOptionalAny() jsii.Any + GetNonPrimitive() DoubleTroubleIface + GetAnotherOptional() map[string]scopejsiicalclib.NumericValueIface + GetOptionalAny() interface{} GetOptionalArray() []string } @@ -3254,56 +4783,127 @@ type DerivedStructIface interface { type DerivedStruct struct { // An awesome number value. // Deprecated. - Anumber float64 + Anumber float64 \`json:"anumber"\` // A string value. // Deprecated. - Astring string + Astring string \`json:"astring"\` // Deprecated. - FirstOptional []string - AnotherRequired string - Bool bool + FirstOptional []string \`json:"firstOptional"\` + AnotherRequired string \`json:"anotherRequired"\` + Bool bool \`json:"bool"\` // An example of a non primitive property. - NonPrimitive DoubleTrouble + NonPrimitive DoubleTroubleIface \`json:"nonPrimitive"\` // This is optional. - AnotherOptional map[string]scopejsiicalclib.NumericValue - OptionalAny jsii.Any - OptionalArray []string + AnotherOptional map[string]scopejsiicalclib.NumericValueIface \`json:"anotherOptional"\` + OptionalAny interface{} \`json:"optionalAny"\` + OptionalArray []string \`json:"optionalArray"\` } func (d *DerivedStruct) GetAnumber() float64 { - return d.Anumber + var returns float64 + _jsii_.Get( + d, + "anumber", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (d *DerivedStruct) GetAstring() string { - return d.Astring + var returns string + _jsii_.Get( + d, + "astring", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (d *DerivedStruct) GetFirstOptional() []string { - return d.FirstOptional + var returns []string + _jsii_.Get( + d, + "firstOptional", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*string)(nil)).Elem(): reflect.TypeOf((*string)(nil)).Elem(), + }, + ) + return returns } func (d *DerivedStruct) GetAnotherRequired() string { - return d.AnotherRequired + var returns string + _jsii_.Get( + d, + "anotherRequired", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (d *DerivedStruct) GetBool() bool { - return d.Bool -} - -func (d *DerivedStruct) GetNonPrimitive() DoubleTrouble { - return d.NonPrimitive -} - -func (d *DerivedStruct) GetAnotherOptional() map[string]scopejsiicalclib.NumericValue { - return d.AnotherOptional -} - -func (d *DerivedStruct) GetOptionalAny() jsii.Any { - return d.OptionalAny + var returns bool + _jsii_.Get( + d, + "bool", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (d *DerivedStruct) GetNonPrimitive() DoubleTroubleIface { + var returns DoubleTroubleIface + _jsii_.Get( + d, + "nonPrimitive", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*DoubleTroubleIface)(nil)).Elem(): reflect.TypeOf((*DoubleTrouble)(nil)).Elem(), + }, + ) + return returns +} + +func (d *DerivedStruct) GetAnotherOptional() map[string]scopejsiicalclib.NumericValueIface { + var returns map[string]scopejsiicalclib.NumericValueIface + _jsii_.Get( + d, + "anotherOptional", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*scopejsiicalclib.NumericValueIface)(nil)).Elem(): reflect.TypeOf((*scopejsiicalclib.NumericValue)(nil)).Elem(), + }, + ) + return returns +} + +func (d *DerivedStruct) GetOptionalAny() interface{} { + var returns interface{} + _jsii_.Get( + d, + "optionalAny", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (d *DerivedStruct) GetOptionalArray() []string { - return d.OptionalArray + var returns []string + _jsii_.Get( + d, + "optionalArray", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*string)(nil)).Elem(): reflect.TypeOf((*string)(nil)).Elem(), + }, + ) + return returns } @@ -3314,11 +4914,18 @@ type DiamondInheritanceBaseLevelStructIface interface { // Struct proxy type DiamondInheritanceBaseLevelStruct struct { - BaseLevelProperty string + BaseLevelProperty string \`json:"baseLevelProperty"\` } func (d *DiamondInheritanceBaseLevelStruct) GetBaseLevelProperty() string { - return d.BaseLevelProperty + var returns string + _jsii_.Get( + d, + "baseLevelProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } @@ -3330,16 +4937,30 @@ type DiamondInheritanceFirstMidLevelStructIface interface { // Struct proxy type DiamondInheritanceFirstMidLevelStruct struct { - BaseLevelProperty string - FirstMidLevelProperty string + BaseLevelProperty string \`json:"baseLevelProperty"\` + FirstMidLevelProperty string \`json:"firstMidLevelProperty"\` } func (d *DiamondInheritanceFirstMidLevelStruct) GetBaseLevelProperty() string { - return d.BaseLevelProperty + var returns string + _jsii_.Get( + d, + "baseLevelProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (d *DiamondInheritanceFirstMidLevelStruct) GetFirstMidLevelProperty() string { - return d.FirstMidLevelProperty + var returns string + _jsii_.Get( + d, + "firstMidLevelProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } @@ -3351,16 +4972,30 @@ type DiamondInheritanceSecondMidLevelStructIface interface { // Struct proxy type DiamondInheritanceSecondMidLevelStruct struct { - BaseLevelProperty string - SecondMidLevelProperty string + BaseLevelProperty string \`json:"baseLevelProperty"\` + SecondMidLevelProperty string \`json:"secondMidLevelProperty"\` } func (d *DiamondInheritanceSecondMidLevelStruct) GetBaseLevelProperty() string { - return d.BaseLevelProperty + var returns string + _jsii_.Get( + d, + "baseLevelProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (d *DiamondInheritanceSecondMidLevelStruct) GetSecondMidLevelProperty() string { - return d.SecondMidLevelProperty + var returns string + _jsii_.Get( + d, + "secondMidLevelProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } @@ -3374,71 +5009,94 @@ type DiamondInheritanceTopLevelStructIface interface { // Struct proxy type DiamondInheritanceTopLevelStruct struct { - BaseLevelProperty string - FirstMidLevelProperty string - SecondMidLevelProperty string - TopLevelProperty string + BaseLevelProperty string \`json:"baseLevelProperty"\` + FirstMidLevelProperty string \`json:"firstMidLevelProperty"\` + SecondMidLevelProperty string \`json:"secondMidLevelProperty"\` + TopLevelProperty string \`json:"topLevelProperty"\` } func (d *DiamondInheritanceTopLevelStruct) GetBaseLevelProperty() string { - return d.BaseLevelProperty + var returns string + _jsii_.Get( + d, + "baseLevelProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (d *DiamondInheritanceTopLevelStruct) GetFirstMidLevelProperty() string { - return d.FirstMidLevelProperty + var returns string + _jsii_.Get( + d, + "firstMidLevelProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (d *DiamondInheritanceTopLevelStruct) GetSecondMidLevelProperty() string { - return d.SecondMidLevelProperty + var returns string + _jsii_.Get( + d, + "secondMidLevelProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (d *DiamondInheritanceTopLevelStruct) GetTopLevelProperty() string { - return d.TopLevelProperty + var returns string + _jsii_.Get( + d, + "topLevelProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type DisappointingCollectionSourceIface interface { - GetMaybeList() []string - SetMaybeList(val []string) - GetMaybeMap() map[string]float64 - SetMaybeMap(val map[string]float64) } // Verifies that null/undefined can be returned for optional collections. -// +// // This source of collections is disappointing - it'll always give you nothing :( // Struct proxy type DisappointingCollectionSource struct { - // Some List of strings, maybe? - // - // (Nah, just a billion dollars mistake!) - MaybeList []string - // Some Map of strings to numbers, maybe? - // - // (Nah, just a billion dollars mistake!) - MaybeMap map[string]float64 -} - -func (d *DisappointingCollectionSource) GetMaybeList() []string { - _init_.Initialize() - return d.MaybeList } -func (d *DisappointingCollectionSource) GetMaybeMap() map[string]float64 { +func DisappointingCollectionSource_MaybeList() []string { _init_.Initialize() - return d.MaybeMap + var returns []string + _jsii_.StaticGet( + "jsii-calc.DisappointingCollectionSource", + "maybeList", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*string)(nil)).Elem(): reflect.TypeOf((*string)(nil)).Elem(), + }, + ) + return returns } - -func (d *DisappointingCollectionSource) SetMaybeList(val []string) { - _init_.Initialize() - d.MaybeList = val -} - -func (d *DisappointingCollectionSource) SetMaybeMap(val map[string]float64) { +func DisappointingCollectionSource_MaybeMap() map[string]float64 { _init_.Initialize() - d.MaybeMap = val + var returns map[string]float64 + _jsii_.StaticGet( + "jsii-calc.DisappointingCollectionSource", + "maybeMap", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*float64)(nil)).Elem(): reflect.TypeOf((*float64)(nil)).Elem(), + }, + ) + return returns } // Class interface @@ -3454,43 +5112,58 @@ type DoNotOverridePrivates struct { func NewDoNotOverridePrivates() DoNotOverridePrivatesIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "DoNotOverridePrivates", - Method: "Constructor", - Args: []string{}, - }) - return &DoNotOverridePrivates{} + self := DoNotOverridePrivates{} + _jsii_.Create( + "jsii-calc.DoNotOverridePrivates", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (d *DoNotOverridePrivates) ChangePrivatePropertyValue(newValue string) { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "DoNotOverridePrivates", - Method: "ChangePrivatePropertyValue", - Args: []string{"string",}, - }) + var returns interface{} + _jsii_.Invoke( + d, + "changePrivatePropertyValue", + []interface{}{newValue}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (d *DoNotOverridePrivates) PrivateMethodValue() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "DoNotOverridePrivates", - Method: "PrivateMethodValue", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + d, + "privateMethodValue", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (d *DoNotOverridePrivates) PrivatePropertyValue() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "DoNotOverridePrivates", - Method: "PrivatePropertyValue", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + d, + "privatePropertyValue", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type DoNotRecognizeAnyAsOptionalIface interface { - Method(_requiredAny jsii.Any, _optionalAny jsii.Any, _optionalString string) + Method(_requiredAny interface{}, _optionalAny interface{}, _optionalString string) } // jsii#284: do not recognize "any" as an optional argument. @@ -3500,63 +5173,84 @@ type DoNotRecognizeAnyAsOptional struct { func NewDoNotRecognizeAnyAsOptional() DoNotRecognizeAnyAsOptionalIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "DoNotRecognizeAnyAsOptional", - Method: "Constructor", - Args: []string{}, - }) - return &DoNotRecognizeAnyAsOptional{} + self := DoNotRecognizeAnyAsOptional{} + _jsii_.Create( + "jsii-calc.DoNotRecognizeAnyAsOptional", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } -func (d *DoNotRecognizeAnyAsOptional) Method(_requiredAny jsii.Any, _optionalAny jsii.Any, _optionalString string) { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "DoNotRecognizeAnyAsOptional", - Method: "Method", - Args: []string{"any", "any", "string",}, - }) +func (d *DoNotRecognizeAnyAsOptional) Method(_requiredAny interface{}, _optionalAny interface{}, _optionalString string) { + var returns interface{} + _jsii_.Invoke( + d, + "method", + []interface{}{_requiredAny, _optionalAny, _optionalString}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } // Class interface type DocumentedClassIface interface { - Greet(greetee Greetee) float64 + Greet(greetee GreeteeIface) float64 Hola() } // Here's the first line of the TSDoc comment. -// +// // This is the meat of the TSDoc comment. It may contain // multiple lines and multiple paragraphs. -// +// // Multiple paragraphs are separated by an empty line. +// +// TODO: EXAMPLE +// // Struct proxy type DocumentedClass struct { } func NewDocumentedClass() DocumentedClassIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "DocumentedClass", - Method: "Constructor", - Args: []string{}, - }) - return &DocumentedClass{} -} - -func (d *DocumentedClass) Greet(greetee Greetee) float64 { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "DocumentedClass", - Method: "Greet", - Args: []string{"jsii-calc.Greetee",}, - }) - return 0.0 + self := DocumentedClass{} + _jsii_.Create( + "jsii-calc.DocumentedClass", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self +} + +func (d *DocumentedClass) Greet(greetee GreeteeIface) float64 { + var returns float64 + _jsii_.Invoke( + d, + "greet", + []interface{}{greetee}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (d *DocumentedClass) Hola() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "DocumentedClass", - Method: "Hola", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + d, + "hola", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } // Class interface @@ -3570,28 +5264,35 @@ type DontComplainAboutVariadicAfterOptional struct { func NewDontComplainAboutVariadicAfterOptional() DontComplainAboutVariadicAfterOptionalIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "DontComplainAboutVariadicAfterOptional", - Method: "Constructor", - Args: []string{}, - }) - return &DontComplainAboutVariadicAfterOptional{} + self := DontComplainAboutVariadicAfterOptional{} + _jsii_.Create( + "jsii-calc.DontComplainAboutVariadicAfterOptional", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (d *DontComplainAboutVariadicAfterOptional) OptionalAndVariadic(optional string, things string) string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "DontComplainAboutVariadicAfterOptional", - Method: "OptionalAndVariadic", - Args: []string{"string", "string",}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + d, + "optionalAndVariadic", + []interface{}{optional, things}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type DoubleTroubleIface interface { - IFriendlyRandomGenerator - IRandomNumberGenerator - scopejsiicalclib.IFriendly + IFriendlyRandomGeneratorIface + IRandomNumberGeneratorIface + scopejsiicalclib.IFriendlyIface Hello() string Next() float64 } @@ -3602,30 +5303,41 @@ type DoubleTrouble struct { func NewDoubleTrouble() DoubleTroubleIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "DoubleTrouble", - Method: "Constructor", - Args: []string{}, - }) - return &DoubleTrouble{} + self := DoubleTrouble{} + _jsii_.Create( + "jsii-calc.DoubleTrouble", + []interface{}{}, + []_jsii_.FQN{"jsii-calc.IFriendlyRandomGenerator"}, + []_jsii_.Override{}, + &self, + ) + return &self } func (d *DoubleTrouble) Hello() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "DoubleTrouble", - Method: "Hello", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + d, + "hello", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (d *DoubleTrouble) Next() float64 { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "DoubleTrouble", - Method: "Next", - Args: []string{}, - }) - return 0.0 + var returns float64 + _jsii_.Invoke( + d, + "next", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface @@ -3639,35 +5351,60 @@ type DynamicPropertyBearerIface interface { // Ensures we can override a dynamic property that was inherited. // Struct proxy type DynamicPropertyBearer struct { - DynamicProperty string - ValueStore string + DynamicProperty string \`json:"dynamicProperty"\` + ValueStore string \`json:"valueStore"\` } func (d *DynamicPropertyBearer) GetDynamicProperty() string { - return d.DynamicProperty + var returns string + _jsii_.Get( + d, + "dynamicProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (d *DynamicPropertyBearer) GetValueStore() string { - return d.ValueStore + var returns string + _jsii_.Get( + d, + "valueStore", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewDynamicPropertyBearer(valueStore string) DynamicPropertyBearerIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "DynamicPropertyBearer", - Method: "Constructor", - Args: []string{"string",}, - }) - return &DynamicPropertyBearer{} + self := DynamicPropertyBearer{} + _jsii_.Create( + "jsii-calc.DynamicPropertyBearer", + []interface{}{valueStore}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (d *DynamicPropertyBearer) SetDynamicProperty(val string) { - d.DynamicProperty = val + _jsii_.Set( + d, + "dynamicProperty", + val, + ) } func (d *DynamicPropertyBearer) SetValueStore(val string) { - d.ValueStore = val + _jsii_.Set( + d, + "valueStore", + val, + ) } // Class interface @@ -3677,59 +5414,90 @@ type DynamicPropertyBearerChildIface interface { GetValueStore() string SetValueStore(val string) GetOriginalValue() string - SetOriginalValue(val string) OverrideValue(newValue string) string } // Struct proxy type DynamicPropertyBearerChild struct { - DynamicProperty string - ValueStore string - OriginalValue string + DynamicProperty string \`json:"dynamicProperty"\` + ValueStore string \`json:"valueStore"\` + OriginalValue string \`json:"originalValue"\` } func (d *DynamicPropertyBearerChild) GetDynamicProperty() string { - return d.DynamicProperty + var returns string + _jsii_.Get( + d, + "dynamicProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (d *DynamicPropertyBearerChild) GetValueStore() string { - return d.ValueStore + var returns string + _jsii_.Get( + d, + "valueStore", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (d *DynamicPropertyBearerChild) GetOriginalValue() string { - return d.OriginalValue + var returns string + _jsii_.Get( + d, + "originalValue", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewDynamicPropertyBearerChild(originalValue string) DynamicPropertyBearerChildIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "DynamicPropertyBearerChild", - Method: "Constructor", - Args: []string{"string",}, - }) - return &DynamicPropertyBearerChild{} + self := DynamicPropertyBearerChild{} + _jsii_.Create( + "jsii-calc.DynamicPropertyBearerChild", + []interface{}{originalValue}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (d *DynamicPropertyBearerChild) SetDynamicProperty(val string) { - d.DynamicProperty = val + _jsii_.Set( + d, + "dynamicProperty", + val, + ) } func (d *DynamicPropertyBearerChild) SetValueStore(val string) { - d.ValueStore = val -} - -func (d *DynamicPropertyBearerChild) SetOriginalValue(val string) { - d.OriginalValue = val + _jsii_.Set( + d, + "valueStore", + val, + ) } func (d *DynamicPropertyBearerChild) OverrideValue(newValue string) string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "DynamicPropertyBearerChild", - Method: "OverrideValue", - Args: []string{"string",}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + d, + "overrideValue", + []interface{}{newValue}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface @@ -3744,32 +5512,43 @@ type Entropy struct { } // Creates a new instance of Entropy. -func NewEntropy(clock IWallClock) EntropyIface { +func NewEntropy(clock IWallClockIface) EntropyIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Entropy", - Method: "Constructor", - Args: []string{"jsii-calc.IWallClock",}, - }) - return &Entropy{} + self := Entropy{} + _jsii_.Create( + "jsii-calc.Entropy", + []interface{}{clock}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (e *Entropy) Increase() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Entropy", - Method: "Increase", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + e, + "increase", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (e *Entropy) Repeat(word string) string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Entropy", - Method: "Repeat", - Args: []string{"string",}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + e, + "repeat", + []interface{}{word}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface @@ -3782,22 +5561,34 @@ type EnumDispenser struct { func EnumDispenser_RandomIntegerLikeEnum() AllTypesEnum { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "EnumDispenser", - Method: "RandomIntegerLikeEnum", - Args: []string{}, - }) - return "ENUM_DUMMY" + var returns AllTypesEnum + _jsii_.InvokeStatic( + "jsii-calc.EnumDispenser", + "randomIntegerLikeEnum", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*AllTypesEnum)(nil)).Elem(): reflect.TypeOf((*AllTypesEnum)(nil)).Elem(), + }, + ) + return returns } func EnumDispenser_RandomStringLikeEnum() StringEnum { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "EnumDispenser", - Method: "RandomStringLikeEnum", - Args: []string{}, - }) - return "ENUM_DUMMY" + var returns StringEnum + _jsii_.InvokeStatic( + "jsii-calc.EnumDispenser", + "randomStringLikeEnum", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*StringEnum)(nil)).Elem(): reflect.TypeOf((*StringEnum)(nil)).Elem(), + }, + ) + return returns } // Class interface @@ -3810,42 +5601,61 @@ type EraseUndefinedHashValues struct { func NewEraseUndefinedHashValues() EraseUndefinedHashValuesIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "EraseUndefinedHashValues", - Method: "Constructor", - Args: []string{}, - }) - return &EraseUndefinedHashValues{} -} - -func EraseUndefinedHashValues_DoesKeyExist(opts EraseUndefinedHashValuesOptions, key string) bool { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "EraseUndefinedHashValues", - Method: "DoesKeyExist", - Args: []string{"jsii-calc.EraseUndefinedHashValuesOptions", "string",}, - }) - return true -} - -func EraseUndefinedHashValues_Prop1IsNull() map[string]jsii.Any { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "EraseUndefinedHashValues", - Method: "Prop1IsNull", - Args: []string{}, - }) - return nil -} - -func EraseUndefinedHashValues_Prop2IsUndefined() map[string]jsii.Any { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "EraseUndefinedHashValues", - Method: "Prop2IsUndefined", - Args: []string{}, - }) - return nil + self := EraseUndefinedHashValues{} + _jsii_.Create( + "jsii-calc.EraseUndefinedHashValues", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self +} + +func EraseUndefinedHashValues_DoesKeyExist(opts EraseUndefinedHashValuesOptionsIface, key string) bool { + _init_.Initialize() + var returns bool + _jsii_.InvokeStatic( + "jsii-calc.EraseUndefinedHashValues", + "doesKeyExist", + []interface{}{opts, key}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func EraseUndefinedHashValues_Prop1IsNull() map[string]interface{} { + _init_.Initialize() + var returns map[string]interface{} + _jsii_.InvokeStatic( + "jsii-calc.EraseUndefinedHashValues", + "prop1IsNull", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*interface{})(nil)).Elem(): reflect.TypeOf((*interface{})(nil)).Elem(), + }, + ) + return returns +} + +func EraseUndefinedHashValues_Prop2IsUndefined() map[string]interface{} { + _init_.Initialize() + var returns map[string]interface{} + _jsii_.InvokeStatic( + "jsii-calc.EraseUndefinedHashValues", + "prop2IsUndefined", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*interface{})(nil)).Elem(): reflect.TypeOf((*interface{})(nil)).Elem(), + }, + ) + return returns } // EraseUndefinedHashValuesOptionsIface is the public interface for the custom type EraseUndefinedHashValuesOptions @@ -3856,23 +5666,36 @@ type EraseUndefinedHashValuesOptionsIface interface { // Struct proxy type EraseUndefinedHashValuesOptions struct { - Option1 string - Option2 string + Option1 string \`json:"option1"\` + Option2 string \`json:"option2"\` } func (e *EraseUndefinedHashValuesOptions) GetOption1() string { - return e.Option1 + var returns string + _jsii_.Get( + e, + "option1", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (e *EraseUndefinedHashValuesOptions) GetOption2() string { - return e.Option2 + var returns string + _jsii_.Get( + e, + "option2", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type ExperimentalClassIface interface { GetReadonlyProperty() string - SetReadonlyProperty(val string) GetMutableProperty() float64 SetMutableProperty(val float64) Method() @@ -3882,44 +5705,65 @@ type ExperimentalClassIface interface { // Struct proxy type ExperimentalClass struct { // Experimental. - ReadonlyProperty string + ReadonlyProperty string \`json:"readonlyProperty"\` // Experimental. - MutableProperty float64 + MutableProperty float64 \`json:"mutableProperty"\` } func (e *ExperimentalClass) GetReadonlyProperty() string { - return e.ReadonlyProperty + var returns string + _jsii_.Get( + e, + "readonlyProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (e *ExperimentalClass) GetMutableProperty() float64 { - return e.MutableProperty + var returns float64 + _jsii_.Get( + e, + "mutableProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewExperimentalClass(readonlyString string, mutableNumber float64) ExperimentalClassIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ExperimentalClass", - Method: "Constructor", - Args: []string{"string", "number",}, - }) - return &ExperimentalClass{} -} - -func (e *ExperimentalClass) SetReadonlyProperty(val string) { - e.ReadonlyProperty = val + self := ExperimentalClass{} + _jsii_.Create( + "jsii-calc.ExperimentalClass", + []interface{}{readonlyString, mutableNumber}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (e *ExperimentalClass) SetMutableProperty(val float64) { - e.MutableProperty = val + _jsii_.Set( + e, + "mutableProperty", + val, + ) } func (e *ExperimentalClass) Method() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ExperimentalClass", - Method: "Method", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + e, + "method", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } // Experimental. @@ -3940,42 +5784,54 @@ type ExperimentalStructIface interface { // Struct proxy type ExperimentalStruct struct { // Experimental. - ReadonlyProperty string + ReadonlyProperty string \`json:"readonlyProperty"\` } func (e *ExperimentalStruct) GetReadonlyProperty() string { - return e.ReadonlyProperty + var returns string + _jsii_.Get( + e, + "readonlyProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type ExportedBaseClassIface interface { GetSuccess() bool - SetSuccess(val bool) } // Struct proxy type ExportedBaseClass struct { - Success bool + Success bool \`json:"success"\` } func (e *ExportedBaseClass) GetSuccess() bool { - return e.Success + var returns bool + _jsii_.Get( + e, + "success", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewExportedBaseClass(success bool) ExportedBaseClassIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ExportedBaseClass", - Method: "Constructor", - Args: []string{"boolean",}, - }) - return &ExportedBaseClass{} -} - -func (e *ExportedBaseClass) SetSuccess(val bool) { - e.Success = val + self := ExportedBaseClass{} + _jsii_.Create( + "jsii-calc.ExportedBaseClass", + []interface{}{success}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } // ExtendsInternalInterfaceIface is the public interface for the custom type ExtendsInternalInterface @@ -3986,23 +5842,36 @@ type ExtendsInternalInterfaceIface interface { // Struct proxy type ExtendsInternalInterface struct { - Boom bool - Prop string + Boom bool \`json:"boom"\` + Prop string \`json:"prop"\` } func (e *ExtendsInternalInterface) GetBoom() bool { - return e.Boom + var returns bool + _jsii_.Get( + e, + "boom", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (e *ExtendsInternalInterface) GetProp() string { - return e.Prop + var returns string + _jsii_.Get( + e, + "prop", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type ExternalClassIface interface { GetReadonlyProperty() string - SetReadonlyProperty(val string) GetMutableProperty() float64 SetMutableProperty(val float64) Method() @@ -4010,43 +5879,64 @@ type ExternalClassIface interface { // Struct proxy type ExternalClass struct { - ReadonlyProperty string - MutableProperty float64 + ReadonlyProperty string \`json:"readonlyProperty"\` + MutableProperty float64 \`json:"mutableProperty"\` } func (e *ExternalClass) GetReadonlyProperty() string { - return e.ReadonlyProperty + var returns string + _jsii_.Get( + e, + "readonlyProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (e *ExternalClass) GetMutableProperty() float64 { - return e.MutableProperty + var returns float64 + _jsii_.Get( + e, + "mutableProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewExternalClass(readonlyString string, mutableNumber float64) ExternalClassIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ExternalClass", - Method: "Constructor", - Args: []string{"string", "number",}, - }) - return &ExternalClass{} -} - -func (e *ExternalClass) SetReadonlyProperty(val string) { - e.ReadonlyProperty = val + self := ExternalClass{} + _jsii_.Create( + "jsii-calc.ExternalClass", + []interface{}{readonlyString, mutableNumber}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (e *ExternalClass) SetMutableProperty(val float64) { - e.MutableProperty = val + _jsii_.Set( + e, + "mutableProperty", + val, + ) } func (e *ExternalClass) Method() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ExternalClass", - Method: "Method", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + e, + "method", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } type ExternalEnum string @@ -4063,72 +5953,102 @@ type ExternalStructIface interface { // Struct proxy type ExternalStruct struct { - ReadonlyProperty string + ReadonlyProperty string \`json:"readonlyProperty"\` } func (e *ExternalStruct) GetReadonlyProperty() string { - return e.ReadonlyProperty + var returns string + _jsii_.Get( + e, + "readonlyProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type GiveMeStructsIface interface { - GetStructLiteral() scopejsiicalclib.StructWithOnlyOptionals - SetStructLiteral(val scopejsiicalclib.StructWithOnlyOptionals) - DerivedToFirst(derived DerivedStruct) scopejsiicalclib.MyFirstStruct - ReadDerivedNonPrimitive(derived DerivedStruct) DoubleTrouble - ReadFirstNumber(first scopejsiicalclib.MyFirstStruct) float64 + GetStructLiteral() scopejsiicalclib.StructWithOnlyOptionalsIface + DerivedToFirst(derived DerivedStructIface) scopejsiicalclib.MyFirstStructIface + ReadDerivedNonPrimitive(derived DerivedStructIface) DoubleTroubleIface + ReadFirstNumber(first scopejsiicalclib.MyFirstStructIface) float64 } // Struct proxy type GiveMeStructs struct { - StructLiteral scopejsiicalclib.StructWithOnlyOptionals + StructLiteral scopejsiicalclib.StructWithOnlyOptionalsIface \`json:"structLiteral"\` } -func (g *GiveMeStructs) GetStructLiteral() scopejsiicalclib.StructWithOnlyOptionals { - return g.StructLiteral +func (g *GiveMeStructs) GetStructLiteral() scopejsiicalclib.StructWithOnlyOptionalsIface { + var returns scopejsiicalclib.StructWithOnlyOptionalsIface + _jsii_.Get( + g, + "structLiteral", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*scopejsiicalclib.StructWithOnlyOptionalsIface)(nil)).Elem(): reflect.TypeOf((*scopejsiicalclib.StructWithOnlyOptionals)(nil)).Elem(), + }, + ) + return returns } func NewGiveMeStructs() GiveMeStructsIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "GiveMeStructs", - Method: "Constructor", - Args: []string{}, - }) - return &GiveMeStructs{} -} - -func (g *GiveMeStructs) SetStructLiteral(val scopejsiicalclib.StructWithOnlyOptionals) { - g.StructLiteral = val -} - -func (g *GiveMeStructs) DerivedToFirst(derived DerivedStruct) scopejsiicalclib.MyFirstStruct { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "GiveMeStructs", - Method: "DerivedToFirst", - Args: []string{"jsii-calc.DerivedStruct",}, - }) - return scopejsiicalclib.MyFirstStruct{} -} - -func (g *GiveMeStructs) ReadDerivedNonPrimitive(derived DerivedStruct) DoubleTrouble { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "GiveMeStructs", - Method: "ReadDerivedNonPrimitive", - Args: []string{"jsii-calc.DerivedStruct",}, - }) - return DoubleTrouble{} -} - -func (g *GiveMeStructs) ReadFirstNumber(first scopejsiicalclib.MyFirstStruct) float64 { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "GiveMeStructs", - Method: "ReadFirstNumber", - Args: []string{"@scope/jsii-calc-lib.MyFirstStruct",}, - }) - return 0.0 + self := GiveMeStructs{} + _jsii_.Create( + "jsii-calc.GiveMeStructs", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self +} + +func (g *GiveMeStructs) DerivedToFirst(derived DerivedStructIface) scopejsiicalclib.MyFirstStructIface { + var returns scopejsiicalclib.MyFirstStructIface + _jsii_.Invoke( + g, + "derivedToFirst", + []interface{}{derived}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*scopejsiicalclib.MyFirstStructIface)(nil)).Elem(): reflect.TypeOf((*scopejsiicalclib.MyFirstStruct)(nil)).Elem(), + }, + ) + return returns +} + +func (g *GiveMeStructs) ReadDerivedNonPrimitive(derived DerivedStructIface) DoubleTroubleIface { + var returns DoubleTroubleIface + _jsii_.Invoke( + g, + "readDerivedNonPrimitive", + []interface{}{derived}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*DoubleTroubleIface)(nil)).Elem(): reflect.TypeOf((*DoubleTrouble)(nil)).Elem(), + }, + ) + return returns +} + +func (g *GiveMeStructs) ReadFirstNumber(first scopejsiicalclib.MyFirstStructIface) float64 { + var returns float64 + _jsii_.Invoke( + g, + "readFirstNumber", + []interface{}{first}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // GreeteeIface is the public interface for the custom type Greetee @@ -4140,17 +6060,24 @@ type GreeteeIface interface { // Struct proxy type Greetee struct { // The name of the greetee. - Name string + Name string \`json:"name"\` } func (g *Greetee) GetName() string { - return g.Name + var returns string + _jsii_.Get( + g, + "name", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type GreetingAugmenterIface interface { - BetterGreeting(friendly scopejsiicalclib.IFriendly) string + BetterGreeting(friendly scopejsiicalclib.IFriendlyIface) string } // Struct proxy @@ -4159,81 +6086,342 @@ type GreetingAugmenter struct { func NewGreetingAugmenter() GreetingAugmenterIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "GreetingAugmenter", - Method: "Constructor", - Args: []string{}, - }) - return &GreetingAugmenter{} -} - -func (g *GreetingAugmenter) BetterGreeting(friendly scopejsiicalclib.IFriendly) string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "GreetingAugmenter", - Method: "BetterGreeting", - Args: []string{"@scope/jsii-calc-lib.IFriendly",}, - }) - return "NOOP_RETURN_STRING" + self := GreetingAugmenter{} + _jsii_.Create( + "jsii-calc.GreetingAugmenter", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self +} + +func (g *GreetingAugmenter) BetterGreeting(friendly scopejsiicalclib.IFriendlyIface) string { + var returns string + _jsii_.Invoke( + g, + "betterGreeting", + []interface{}{friendly}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // We can return an anonymous interface implementation from an override without losing the interface declarations. -type IAnonymousImplementationProvider interface { - ProvideAsClass() Implementation - ProvideAsInterface() IAnonymouslyImplementMe -} - -type IAnonymouslyImplementMe interface { +type IAnonymousImplementationProviderIface interface { + ProvideAsClass() ImplementationIface + ProvideAsInterface() IAnonymouslyImplementMeIface +} + +type IAnonymousImplementationProvider struct {} + +func (i *IAnonymousImplementationProvider) ProvideAsClass() ImplementationIface { + var returns ImplementationIface + _jsii_.Invoke( + i, + "provideAsClass", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*ImplementationIface)(nil)).Elem(): reflect.TypeOf((*Implementation)(nil)).Elem(), + }, + ) + return returns +} + +func (i *IAnonymousImplementationProvider) ProvideAsInterface() IAnonymouslyImplementMeIface { + var returns IAnonymouslyImplementMeIface + _jsii_.Invoke( + i, + "provideAsInterface", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*IAnonymouslyImplementMeIface)(nil)).Elem(): reflect.TypeOf((*IAnonymouslyImplementMe)(nil)).Elem(), + }, + ) + return returns +} + +type IAnonymouslyImplementMeIface interface { Verb() string GetValue() float64 } -type IAnotherPublicInterface interface { - GetA() string +type IAnonymouslyImplementMe struct {} + +func (i *IAnonymouslyImplementMe) Verb() string { + var returns string + _jsii_.Invoke( + i, + "verb", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } -type IBell interface { - Ring() +func (i *IAnonymouslyImplementMe) GetValue() float64 { + var returns float64 + _jsii_.Get( + i, + "value", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +type IAnotherPublicInterfaceIface interface { + GetA() string +} + +type IAnotherPublicInterface struct {} + +func (i *IAnotherPublicInterface) GetA() string { + var returns string + _jsii_.Get( + i, + "a", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (i *IAnotherPublicInterface) SetA(val string) { + _jsii_.Set( + i, + "a", + val, + ) +} + +type IBellIface interface { + Ring() +} + +type IBell struct {} + +func (i *IBell) Ring() { + var returns interface{} + _jsii_.Invoke( + i, + "ring", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } // Takes the object parameter as an interface. -type IBellRinger interface { - YourTurn(bell IBell) +type IBellRingerIface interface { + YourTurn(bell IBellIface) +} + +type IBellRinger struct {} + +func (i *IBellRinger) YourTurn(bell IBellIface) { + var returns interface{} + _jsii_.Invoke( + i, + "yourTurn", + []interface{}{bell}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } // Takes the object parameter as a calss. -type IConcreteBellRinger interface { - YourTurn(bell Bell) +type IConcreteBellRingerIface interface { + YourTurn(bell BellIface) +} + +type IConcreteBellRinger struct {} + +func (i *IConcreteBellRinger) YourTurn(bell BellIface) { + var returns interface{} + _jsii_.Invoke( + i, + "yourTurn", + []interface{}{bell}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } // Deprecated: useless interface -type IDeprecatedInterface interface { +type IDeprecatedInterfaceIface interface { // Deprecated: services no purpose Method() // Deprecated: could be better GetMutableProperty() float64 } +type IDeprecatedInterface struct {} + +func (i *IDeprecatedInterface) Method() { + var returns interface{} + _jsii_.Invoke( + i, + "method", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) +} + +func (i *IDeprecatedInterface) GetMutableProperty() float64 { + var returns float64 + _jsii_.Get( + i, + "mutableProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (i *IDeprecatedInterface) SetMutableProperty(val float64) { + _jsii_.Set( + i, + "mutableProperty", + val, + ) +} + // Experimental. -type IExperimentalInterface interface { +type IExperimentalInterfaceIface interface { // Experimental. Method() // Experimental. GetMutableProperty() float64 } -type IExtendsPrivateInterface interface { +type IExperimentalInterface struct {} + +func (i *IExperimentalInterface) Method() { + var returns interface{} + _jsii_.Invoke( + i, + "method", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) +} + +func (i *IExperimentalInterface) GetMutableProperty() float64 { + var returns float64 + _jsii_.Get( + i, + "mutableProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (i *IExperimentalInterface) SetMutableProperty(val float64) { + _jsii_.Set( + i, + "mutableProperty", + val, + ) +} + +type IExtendsPrivateInterfaceIface interface { GetMoreThings() []string GetPrivate() string } -type IExternalInterface interface { +type IExtendsPrivateInterface struct {} + +func (i *IExtendsPrivateInterface) GetMoreThings() []string { + var returns []string + _jsii_.Get( + i, + "moreThings", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*string)(nil)).Elem(): reflect.TypeOf((*string)(nil)).Elem(), + }, + ) + return returns +} + +func (i *IExtendsPrivateInterface) GetPrivate() string { + var returns string + _jsii_.Get( + i, + "private", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (i *IExtendsPrivateInterface) SetPrivate(val string) { + _jsii_.Set( + i, + "private", + val, + ) +} + +type IExternalInterfaceIface interface { Method() GetMutableProperty() float64 } +type IExternalInterface struct {} + +func (i *IExternalInterface) Method() { + var returns interface{} + _jsii_.Invoke( + i, + "method", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) +} + +func (i *IExternalInterface) GetMutableProperty() float64 { + var returns float64 + _jsii_.Get( + i, + "mutableProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (i *IExternalInterface) SetMutableProperty(val float64) { + _jsii_.Set( + i, + "mutableProperty", + val, + ) +} + // Even friendlier classes can implement this interface. -type IFriendlier interface { - scopejsiicalclib.IFriendly +type IFriendlierIface interface { + scopejsiicalclib.IFriendlyIface // Say farewell. Farewell() string // Say goodbye. @@ -4242,134 +6430,774 @@ type IFriendlier interface { Goodbye() string } -type IFriendlyRandomGenerator interface { - IRandomNumberGenerator - scopejsiicalclib.IFriendly +type IFriendlier struct {} + +func (i *IFriendlier) Hello() string { + var returns string + _jsii_.Invoke( + i, + "hello", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (i *IFriendlier) Farewell() string { + var returns string + _jsii_.Invoke( + i, + "farewell", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (i *IFriendlier) Goodbye() string { + var returns string + _jsii_.Invoke( + i, + "goodbye", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +type IFriendlyRandomGeneratorIface interface { + IRandomNumberGeneratorIface + scopejsiicalclib.IFriendlyIface +} + +type IFriendlyRandomGenerator struct {} + +func (i *IFriendlyRandomGenerator) Next() float64 { + var returns float64 + _jsii_.Invoke( + i, + "next", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (i *IFriendlyRandomGenerator) Hello() string { + var returns string + _jsii_.Invoke( + i, + "hello", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // awslabs/jsii#220 Abstract return type. -type IInterfaceImplementedByAbstractClass interface { +type IInterfaceImplementedByAbstractClassIface interface { GetPropFromInterface() string } +type IInterfaceImplementedByAbstractClass struct {} + +func (i *IInterfaceImplementedByAbstractClass) GetPropFromInterface() string { + var returns string + _jsii_.Get( + i, + "propFromInterface", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + // 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. -type IInterfaceThatShouldNotBeADataType interface { - IInterfaceWithMethods +type IInterfaceThatShouldNotBeADataTypeIface interface { + IInterfaceWithMethodsIface GetOtherValue() string } -type IInterfaceWithInternal interface { +type IInterfaceThatShouldNotBeADataType struct {} + +func (i *IInterfaceThatShouldNotBeADataType) DoThings() { + var returns interface{} + _jsii_.Invoke( + i, + "doThings", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) +} + +func (i *IInterfaceThatShouldNotBeADataType) GetValue() string { + var returns string + _jsii_.Get( + i, + "value", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (i *IInterfaceThatShouldNotBeADataType) GetOtherValue() string { + var returns string + _jsii_.Get( + i, + "otherValue", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +type IInterfaceWithInternalIface interface { Visible() } -type IInterfaceWithMethods interface { +type IInterfaceWithInternal struct {} + +func (i *IInterfaceWithInternal) Visible() { + var returns interface{} + _jsii_.Invoke( + i, + "visible", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) +} + +type IInterfaceWithMethodsIface interface { DoThings() GetValue() string } +type IInterfaceWithMethods struct {} + +func (i *IInterfaceWithMethods) DoThings() { + var returns interface{} + _jsii_.Invoke( + i, + "doThings", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) +} + +func (i *IInterfaceWithMethods) GetValue() string { + var returns string + _jsii_.Get( + i, + "value", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + // awslabs/jsii#175 Interface proxies (and builders) do not respect optional arguments in methods. -type IInterfaceWithOptionalMethodArguments interface { +type IInterfaceWithOptionalMethodArgumentsIface interface { Hello(arg1 string, arg2 float64) } -type IInterfaceWithProperties interface { +type IInterfaceWithOptionalMethodArguments struct {} + +func (i *IInterfaceWithOptionalMethodArguments) Hello(arg1 string, arg2 float64) { + var returns interface{} + _jsii_.Invoke( + i, + "hello", + []interface{}{arg1, arg2}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) +} + +type IInterfaceWithPropertiesIface interface { GetReadOnlyString() string GetReadWriteString() string } -type IInterfaceWithPropertiesExtension interface { - IInterfaceWithProperties +type IInterfaceWithProperties struct {} + +func (i *IInterfaceWithProperties) GetReadOnlyString() string { + var returns string + _jsii_.Get( + i, + "readOnlyString", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (i *IInterfaceWithProperties) GetReadWriteString() string { + var returns string + _jsii_.Get( + i, + "readWriteString", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (i *IInterfaceWithProperties) SetReadWriteString(val string) { + _jsii_.Set( + i, + "readWriteString", + val, + ) +} + +type IInterfaceWithPropertiesExtensionIface interface { + IInterfaceWithPropertiesIface GetFoo() float64 } -type Ijsii417Derived interface { - Ijsii417PublicBaseOfBase +type IInterfaceWithPropertiesExtension struct {} + +func (i *IInterfaceWithPropertiesExtension) GetReadOnlyString() string { + var returns string + _jsii_.Get( + i, + "readOnlyString", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (i *IInterfaceWithPropertiesExtension) GetReadWriteString() string { + var returns string + _jsii_.Get( + i, + "readWriteString", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (i *IInterfaceWithPropertiesExtension) SetReadWriteString(val string) { + _jsii_.Set( + i, + "readWriteString", + val, + ) +} + +func (i *IInterfaceWithPropertiesExtension) GetFoo() float64 { + var returns float64 + _jsii_.Get( + i, + "foo", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (i *IInterfaceWithPropertiesExtension) SetFoo(val float64) { + _jsii_.Set( + i, + "foo", + val, + ) +} + +type Ijsii417DerivedIface interface { + Ijsii417PublicBaseOfBaseIface Bar() Baz() GetProperty() string } -type Ijsii417PublicBaseOfBase interface { +type Ijsii417Derived struct {} + +func (i *Ijsii417Derived) Foo() { + var returns interface{} + _jsii_.Invoke( + i, + "foo", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) +} + +func (i *Ijsii417Derived) Bar() { + var returns interface{} + _jsii_.Invoke( + i, + "bar", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) +} + +func (i *Ijsii417Derived) Baz() { + var returns interface{} + _jsii_.Invoke( + i, + "baz", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) +} + +func (i *Ijsii417Derived) GetHasRoot() bool { + var returns bool + _jsii_.Get( + i, + "hasRoot", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (i *Ijsii417Derived) GetProperty() string { + var returns string + _jsii_.Get( + i, + "property", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +type Ijsii417PublicBaseOfBaseIface interface { Foo() GetHasRoot() bool } -type IJsii487External interface { +type Ijsii417PublicBaseOfBase struct {} + +func (i *Ijsii417PublicBaseOfBase) Foo() { + var returns interface{} + _jsii_.Invoke( + i, + "foo", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) +} + +func (i *Ijsii417PublicBaseOfBase) GetHasRoot() bool { + var returns bool + _jsii_.Get( + i, + "hasRoot", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +type IJsii487ExternalIface interface { } -type IJsii487External2 interface { +type IJsii487External struct {} + +type IJsii487External2Iface interface { } -type IJsii496 interface { +type IJsii487External2 struct {} + +type IJsii496Iface interface { } -type IMutableObjectLiteral interface { +type IJsii496 struct {} + +type IMutableObjectLiteralIface interface { GetValue() string } -type INonInternalInterface interface { - IAnotherPublicInterface +type IMutableObjectLiteral struct {} + +func (i *IMutableObjectLiteral) GetValue() string { + var returns string + _jsii_.Get( + i, + "value", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (i *IMutableObjectLiteral) SetValue(val string) { + _jsii_.Set( + i, + "value", + val, + ) +} + +type INonInternalInterfaceIface interface { + IAnotherPublicInterfaceIface GetB() string GetC() string } +type INonInternalInterface struct {} + +func (i *INonInternalInterface) GetA() string { + var returns string + _jsii_.Get( + i, + "a", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (i *INonInternalInterface) SetA(val string) { + _jsii_.Set( + i, + "a", + val, + ) +} + +func (i *INonInternalInterface) GetB() string { + var returns string + _jsii_.Get( + i, + "b", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (i *INonInternalInterface) SetB(val string) { + _jsii_.Set( + i, + "b", + val, + ) +} + +func (i *INonInternalInterface) GetC() string { + var returns string + _jsii_.Get( + i, + "c", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (i *INonInternalInterface) SetC(val string) { + _jsii_.Set( + i, + "c", + val, + ) +} + // Make sure that setters are properly called on objects with interfaces. -type IObjectWithProperty interface { +type IObjectWithPropertyIface interface { WasSet() bool GetProperty() string } +type IObjectWithProperty struct {} + +func (i *IObjectWithProperty) WasSet() bool { + var returns bool + _jsii_.Invoke( + i, + "wasSet", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (i *IObjectWithProperty) GetProperty() string { + var returns string + _jsii_.Get( + i, + "property", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (i *IObjectWithProperty) SetProperty(val string) { + _jsii_.Set( + i, + "property", + val, + ) +} + // Checks that optional result from interface method code generates correctly. -type IOptionalMethod interface { +type IOptionalMethodIface interface { Optional() string } -type IPrivatelyImplemented interface { +type IOptionalMethod struct {} + +func (i *IOptionalMethod) Optional() string { + var returns string + _jsii_.Invoke( + i, + "optional", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +type IPrivatelyImplementedIface interface { GetSuccess() bool } -type IPublicInterface interface { +type IPrivatelyImplemented struct {} + +func (i *IPrivatelyImplemented) GetSuccess() bool { + var returns bool + _jsii_.Get( + i, + "success", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +type IPublicInterfaceIface interface { Bye() string } -type IPublicInterface2 interface { +type IPublicInterface struct {} + +func (i *IPublicInterface) Bye() string { + var returns string + _jsii_.Invoke( + i, + "bye", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +type IPublicInterface2Iface interface { Ciao() string } +type IPublicInterface2 struct {} + +func (i *IPublicInterface2) Ciao() string { + var returns string + _jsii_.Invoke( + i, + "ciao", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + // Generates random numbers. -type IRandomNumberGenerator interface { +type IRandomNumberGeneratorIface interface { // Returns another random number. // // Returns: A random number. Next() float64 } +type IRandomNumberGenerator struct {} + +func (i *IRandomNumberGenerator) Next() float64 { + var returns float64 + _jsii_.Invoke( + i, + "next", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + // Returns a subclass of a known class which implements an interface. -type IReturnJsii976 interface { +type IReturnJsii976Iface interface { GetFoo() float64 } -type IReturnsNumber interface { - ObtainNumber() scopejsiicalclib.IDoublable - GetNumberProp() scopejsiicalclib.Number +type IReturnJsii976 struct {} + +func (i *IReturnJsii976) GetFoo() float64 { + var returns float64 + _jsii_.Get( + i, + "foo", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +type IReturnsNumberIface interface { + ObtainNumber() scopejsiicalclib.IDoublableIface + GetNumberProp() scopejsiicalclib.NumberIface } -type IStableInterface interface { +type IReturnsNumber struct {} + +func (i *IReturnsNumber) ObtainNumber() scopejsiicalclib.IDoublableIface { + var returns scopejsiicalclib.IDoublableIface + _jsii_.Invoke( + i, + "obtainNumber", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*scopejsiicalclib.IDoublableIface)(nil)).Elem(): reflect.TypeOf((*scopejsiicalclib.IDoublable)(nil)).Elem(), + }, + ) + return returns +} + +func (i *IReturnsNumber) GetNumberProp() scopejsiicalclib.NumberIface { + var returns scopejsiicalclib.NumberIface + _jsii_.Get( + i, + "numberProp", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*scopejsiicalclib.NumberIface)(nil)).Elem(): reflect.TypeOf((*scopejsiicalclib.Number)(nil)).Elem(), + }, + ) + return returns +} + +type IStableInterfaceIface interface { Method() GetMutableProperty() float64 } +type IStableInterface struct {} + +func (i *IStableInterface) Method() { + var returns interface{} + _jsii_.Invoke( + i, + "method", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) +} + +func (i *IStableInterface) GetMutableProperty() float64 { + var returns float64 + _jsii_.Get( + i, + "mutableProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (i *IStableInterface) SetMutableProperty(val float64) { + _jsii_.Set( + i, + "mutableProperty", + val, + ) +} + // Verifies that a "pure" implementation of an interface works correctly. -type IStructReturningDelegate interface { - ReturnStruct() StructB +type IStructReturningDelegateIface interface { + ReturnStruct() StructBIface +} + +type IStructReturningDelegate struct {} + +func (i *IStructReturningDelegate) ReturnStruct() StructBIface { + var returns StructBIface + _jsii_.Invoke( + i, + "returnStruct", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*StructBIface)(nil)).Elem(): reflect.TypeOf((*StructB)(nil)).Elem(), + }, + ) + return returns } // Implement this interface. -type IWallClock interface { +type IWallClockIface interface { // Returns the current time, formatted as an ISO-8601 string. Iso8601Now() string } +type IWallClock struct {} + +func (i *IWallClock) Iso8601Now() string { + var returns string + _jsii_.Invoke( + i, + "iso8601Now", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + // Class interface type ImplementInternalInterfaceIface interface { GetProp() string @@ -4378,61 +7206,80 @@ type ImplementInternalInterfaceIface interface { // Struct proxy type ImplementInternalInterface struct { - Prop string + Prop string \`json:"prop"\` } func (i *ImplementInternalInterface) GetProp() string { - return i.Prop + var returns string + _jsii_.Get( + i, + "prop", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewImplementInternalInterface() ImplementInternalInterfaceIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ImplementInternalInterface", - Method: "Constructor", - Args: []string{}, - }) - return &ImplementInternalInterface{} + self := ImplementInternalInterface{} + _jsii_.Create( + "jsii-calc.ImplementInternalInterface", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (i *ImplementInternalInterface) SetProp(val string) { - i.Prop = val + _jsii_.Set( + i, + "prop", + val, + ) } // Class interface type ImplementationIface interface { GetValue() float64 - SetValue(val float64) } // Struct proxy type Implementation struct { - Value float64 + Value float64 \`json:"value"\` } func (i *Implementation) GetValue() float64 { - return i.Value + var returns float64 + _jsii_.Get( + i, + "value", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewImplementation() ImplementationIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Implementation", - Method: "Constructor", - Args: []string{}, - }) - return &Implementation{} -} - -func (i *Implementation) SetValue(val float64) { - i.Value = val + self := Implementation{} + _jsii_.Create( + "jsii-calc.Implementation", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } // Class interface type ImplementsInterfaceWithInternalIface interface { - IInterfaceWithInternal + IInterfaceWithInternalIface Visible() } @@ -4442,25 +7289,32 @@ type ImplementsInterfaceWithInternal struct { func NewImplementsInterfaceWithInternal() ImplementsInterfaceWithInternalIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ImplementsInterfaceWithInternal", - Method: "Constructor", - Args: []string{}, - }) - return &ImplementsInterfaceWithInternal{} + self := ImplementsInterfaceWithInternal{} + _jsii_.Create( + "jsii-calc.ImplementsInterfaceWithInternal", + []interface{}{}, + []_jsii_.FQN{"jsii-calc.IInterfaceWithInternal"}, + []_jsii_.Override{}, + &self, + ) + return &self } func (i *ImplementsInterfaceWithInternal) Visible() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ImplementsInterfaceWithInternal", - Method: "Visible", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + i, + "visible", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } // Class interface type ImplementsInterfaceWithInternalSubclassIface interface { - IInterfaceWithInternal + IInterfaceWithInternalIface Visible() } @@ -4470,20 +7324,27 @@ type ImplementsInterfaceWithInternalSubclass struct { func NewImplementsInterfaceWithInternalSubclass() ImplementsInterfaceWithInternalSubclassIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ImplementsInterfaceWithInternalSubclass", - Method: "Constructor", - Args: []string{}, - }) - return &ImplementsInterfaceWithInternalSubclass{} + self := ImplementsInterfaceWithInternalSubclass{} + _jsii_.Create( + "jsii-calc.ImplementsInterfaceWithInternalSubclass", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (i *ImplementsInterfaceWithInternalSubclass) Visible() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ImplementsInterfaceWithInternalSubclass", - Method: "Visible", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + i, + "visible", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } // Class interface @@ -4494,58 +7355,95 @@ type ImplementsPrivateInterfaceIface interface { // Struct proxy type ImplementsPrivateInterface struct { - Private string + Private string \`json:"private"\` } func (i *ImplementsPrivateInterface) GetPrivate() string { - return i.Private + var returns string + _jsii_.Get( + i, + "private", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewImplementsPrivateInterface() ImplementsPrivateInterfaceIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ImplementsPrivateInterface", - Method: "Constructor", - Args: []string{}, - }) - return &ImplementsPrivateInterface{} + self := ImplementsPrivateInterface{} + _jsii_.Create( + "jsii-calc.ImplementsPrivateInterface", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (i *ImplementsPrivateInterface) SetPrivate(val string) { - i.Private = val + _jsii_.Set( + i, + "private", + val, + ) } // ImplictBaseOfBaseIface is the public interface for the custom type ImplictBaseOfBase type ImplictBaseOfBaseIface interface { - GetFoo() scopejsiicalcbaseofbase.Very + GetFoo() scopejsiicalcbaseofbase.VeryIface GetBar() string GetGoo() string } // Struct proxy type ImplictBaseOfBase struct { - Foo scopejsiicalcbaseofbase.Very - Bar string - Goo string + Foo scopejsiicalcbaseofbase.VeryIface \`json:"foo"\` + Bar string \`json:"bar"\` + Goo string \`json:"goo"\` } -func (i *ImplictBaseOfBase) GetFoo() scopejsiicalcbaseofbase.Very { - return i.Foo +func (i *ImplictBaseOfBase) GetFoo() scopejsiicalcbaseofbase.VeryIface { + var returns scopejsiicalcbaseofbase.VeryIface + _jsii_.Get( + i, + "foo", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*scopejsiicalcbaseofbase.VeryIface)(nil)).Elem(): reflect.TypeOf((*scopejsiicalcbaseofbase.Very)(nil)).Elem(), + }, + ) + return returns } func (i *ImplictBaseOfBase) GetBar() string { - return i.Bar + var returns string + _jsii_.Get( + i, + "bar", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (i *ImplictBaseOfBase) GetGoo() string { - return i.Goo + var returns string + _jsii_.Get( + i, + "goo", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type InbetweenClassIface interface { - IPublicInterface2 + IPublicInterface2Iface Hello() Ciao() string } @@ -4556,29 +7454,40 @@ type InbetweenClass struct { func NewInbetweenClass() InbetweenClassIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "InbetweenClass", - Method: "Constructor", - Args: []string{}, - }) - return &InbetweenClass{} + self := InbetweenClass{} + _jsii_.Create( + "jsii-calc.InbetweenClass", + []interface{}{}, + []_jsii_.FQN{"jsii-calc.IPublicInterface2"}, + []_jsii_.Override{}, + &self, + ) + return &self } func (i *InbetweenClass) Hello() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "InbetweenClass", - Method: "Hello", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + i, + "hello", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (i *InbetweenClass) Ciao() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "InbetweenClass", - Method: "Ciao", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + i, + "ciao", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface @@ -4586,50 +7495,74 @@ type InterfaceCollectionsIface interface { } // Verifies that collections of interfaces or structs are correctly handled. -// +// // See: https://github.com/aws/jsii/issues/1196 // Struct proxy type InterfaceCollections struct { } -func InterfaceCollections_ListOfInterfaces() []IBell { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "InterfaceCollections", - Method: "ListOfInterfaces", - Args: []string{}, - }) - return nil -} - -func InterfaceCollections_ListOfStructs() []StructA { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "InterfaceCollections", - Method: "ListOfStructs", - Args: []string{}, - }) - return nil -} - -func InterfaceCollections_MapOfInterfaces() map[string]IBell { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "InterfaceCollections", - Method: "MapOfInterfaces", - Args: []string{}, - }) - return nil -} - -func InterfaceCollections_MapOfStructs() map[string]StructA { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "InterfaceCollections", - Method: "MapOfStructs", - Args: []string{}, - }) - return nil +func InterfaceCollections_ListOfInterfaces() []IBellIface { + _init_.Initialize() + var returns []IBellIface + _jsii_.InvokeStatic( + "jsii-calc.InterfaceCollections", + "listOfInterfaces", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*IBellIface)(nil)).Elem(): reflect.TypeOf((*IBell)(nil)).Elem(), + }, + ) + return returns +} + +func InterfaceCollections_ListOfStructs() []StructAIface { + _init_.Initialize() + var returns []StructAIface + _jsii_.InvokeStatic( + "jsii-calc.InterfaceCollections", + "listOfStructs", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*StructAIface)(nil)).Elem(): reflect.TypeOf((*StructA)(nil)).Elem(), + }, + ) + return returns +} + +func InterfaceCollections_MapOfInterfaces() map[string]IBellIface { + _init_.Initialize() + var returns map[string]IBellIface + _jsii_.InvokeStatic( + "jsii-calc.InterfaceCollections", + "mapOfInterfaces", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*IBellIface)(nil)).Elem(): reflect.TypeOf((*IBell)(nil)).Elem(), + }, + ) + return returns +} + +func InterfaceCollections_MapOfStructs() map[string]StructAIface { + _init_.Initialize() + var returns map[string]StructAIface + _jsii_.InvokeStatic( + "jsii-calc.InterfaceCollections", + "mapOfStructs", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*StructAIface)(nil)).Elem(): reflect.TypeOf((*StructA)(nil)).Elem(), + }, + ) + return returns } // Class interface @@ -4641,23 +7574,29 @@ type InterfacesMakerIface interface { type InterfacesMaker struct { } -func InterfacesMaker_MakeInterfaces(count float64) []scopejsiicalclib.IDoublable { +func InterfacesMaker_MakeInterfaces(count float64) []scopejsiicalclib.IDoublableIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "InterfacesMaker", - Method: "MakeInterfaces", - Args: []string{"number",}, - }) - return nil + var returns []scopejsiicalclib.IDoublableIface + _jsii_.InvokeStatic( + "jsii-calc.InterfacesMaker", + "makeInterfaces", + []interface{}{count}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*scopejsiicalclib.IDoublableIface)(nil)).Elem(): reflect.TypeOf((*scopejsiicalclib.IDoublable)(nil)).Elem(), + }, + ) + return returns } // Class interface type IsomorphismIface interface { - Myself() Isomorphism + Myself() IsomorphismIface } // Checks the "same instance" isomorphism is preserved within the constructor. -// +// // Create a subclass of this, and assert that \`this.myself()\` actually returns // \`this\` from within the constructor. // Struct proxy @@ -4666,27 +7605,35 @@ type Isomorphism struct { func NewIsomorphism() IsomorphismIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Isomorphism", - Method: "Constructor", - Args: []string{}, - }) - return &Isomorphism{} -} - -func (i *Isomorphism) Myself() Isomorphism { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Isomorphism", - Method: "Myself", - Args: []string{}, - }) - return Isomorphism{} + self := Isomorphism{} + _jsii_.Create( + "jsii-calc.Isomorphism", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self +} + +func (i *Isomorphism) Myself() IsomorphismIface { + var returns IsomorphismIface + _jsii_.Invoke( + i, + "myself", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*IsomorphismIface)(nil)).Elem(): reflect.TypeOf((*Isomorphism)(nil)).Elem(), + }, + ) + return returns } // Class interface type Jsii417DerivedIface interface { GetHasRoot() bool - SetHasRoot(val bool) GetProperty() string Foo() Bar() @@ -4695,124 +7642,166 @@ type Jsii417DerivedIface interface { // Struct proxy type Jsii417Derived struct { - HasRoot bool - Property string + HasRoot bool \`json:"hasRoot"\` + Property string \`json:"property"\` } func (j *Jsii417Derived) GetHasRoot() bool { - return j.HasRoot + var returns bool + _jsii_.Get( + j, + "hasRoot", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (j *Jsii417Derived) GetProperty() string { - return j.Property + var returns string + _jsii_.Get( + j, + "property", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewJsii417Derived(property string) Jsii417DerivedIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Jsii417Derived", - Method: "Constructor", - Args: []string{"string",}, - }) - return &Jsii417Derived{} -} - -func (j *Jsii417Derived) SetHasRoot(val bool) { - j.HasRoot = val -} - -func (j *Jsii417Derived) SetProperty(val string) { - j.Property = val -} - -func Jsii417Derived_MakeInstance() Jsii417PublicBaseOfBase { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Jsii417Derived", - Method: "MakeInstance", - Args: []string{}, - }) - return Jsii417PublicBaseOfBase{} + self := Jsii417Derived{} + _jsii_.Create( + "jsii-calc.JSII417Derived", + []interface{}{property}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self +} + +func Jsii417Derived_MakeInstance() Jsii417PublicBaseOfBaseIface { + _init_.Initialize() + var returns Jsii417PublicBaseOfBaseIface + _jsii_.InvokeStatic( + "jsii-calc.JSII417Derived", + "makeInstance", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*Jsii417PublicBaseOfBaseIface)(nil)).Elem(): reflect.TypeOf((*Jsii417PublicBaseOfBase)(nil)).Elem(), + }, + ) + return returns } func (j *Jsii417Derived) Foo() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Jsii417Derived", - Method: "Foo", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "foo", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *Jsii417Derived) Bar() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Jsii417Derived", - Method: "Bar", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "bar", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *Jsii417Derived) Baz() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Jsii417Derived", - Method: "Baz", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "baz", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } // Class interface type Jsii417PublicBaseOfBaseIface interface { GetHasRoot() bool - SetHasRoot(val bool) Foo() } // Struct proxy type Jsii417PublicBaseOfBase struct { - HasRoot bool + HasRoot bool \`json:"hasRoot"\` } func (j *Jsii417PublicBaseOfBase) GetHasRoot() bool { - return j.HasRoot + var returns bool + _jsii_.Get( + j, + "hasRoot", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewJsii417PublicBaseOfBase() Jsii417PublicBaseOfBaseIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Jsii417PublicBaseOfBase", - Method: "Constructor", - Args: []string{}, - }) - return &Jsii417PublicBaseOfBase{} -} - -func (j *Jsii417PublicBaseOfBase) SetHasRoot(val bool) { - j.HasRoot = val -} - -func Jsii417PublicBaseOfBase_MakeInstance() Jsii417PublicBaseOfBase { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Jsii417PublicBaseOfBase", - Method: "MakeInstance", - Args: []string{}, - }) - return Jsii417PublicBaseOfBase{} + self := Jsii417PublicBaseOfBase{} + _jsii_.Create( + "jsii-calc.JSII417PublicBaseOfBase", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self +} + +func Jsii417PublicBaseOfBase_MakeInstance() Jsii417PublicBaseOfBaseIface { + _init_.Initialize() + var returns Jsii417PublicBaseOfBaseIface + _jsii_.InvokeStatic( + "jsii-calc.JSII417PublicBaseOfBase", + "makeInstance", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*Jsii417PublicBaseOfBaseIface)(nil)).Elem(): reflect.TypeOf((*Jsii417PublicBaseOfBase)(nil)).Elem(), + }, + ) + return returns } func (j *Jsii417PublicBaseOfBase) Foo() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Jsii417PublicBaseOfBase", - Method: "Foo", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "foo", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } // Class interface type JsObjectLiteralForInterfaceIface interface { - GiveMeFriendly() scopejsiicalclib.IFriendly - GiveMeFriendlyGenerator() IFriendlyRandomGenerator + GiveMeFriendly() scopejsiicalclib.IFriendlyIface + GiveMeFriendlyGenerator() IFriendlyRandomGeneratorIface } // Struct proxy @@ -4821,35 +7810,50 @@ type JsObjectLiteralForInterface struct { func NewJsObjectLiteralForInterface() JsObjectLiteralForInterfaceIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JsObjectLiteralForInterface", - Method: "Constructor", - Args: []string{}, - }) - return &JsObjectLiteralForInterface{} -} - -func (j *JsObjectLiteralForInterface) GiveMeFriendly() scopejsiicalclib.IFriendly { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JsObjectLiteralForInterface", - Method: "GiveMeFriendly", - Args: []string{}, - }) - return nil -} - -func (j *JsObjectLiteralForInterface) GiveMeFriendlyGenerator() IFriendlyRandomGenerator { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JsObjectLiteralForInterface", - Method: "GiveMeFriendlyGenerator", - Args: []string{}, - }) - return nil + self := JsObjectLiteralForInterface{} + _jsii_.Create( + "jsii-calc.JSObjectLiteralForInterface", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self +} + +func (j *JsObjectLiteralForInterface) GiveMeFriendly() scopejsiicalclib.IFriendlyIface { + var returns scopejsiicalclib.IFriendlyIface + _jsii_.Invoke( + j, + "giveMeFriendly", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*scopejsiicalclib.IFriendlyIface)(nil)).Elem(): reflect.TypeOf((*scopejsiicalclib.IFriendly)(nil)).Elem(), + }, + ) + return returns +} + +func (j *JsObjectLiteralForInterface) GiveMeFriendlyGenerator() IFriendlyRandomGeneratorIface { + var returns IFriendlyRandomGeneratorIface + _jsii_.Invoke( + j, + "giveMeFriendlyGenerator", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*IFriendlyRandomGeneratorIface)(nil)).Elem(): reflect.TypeOf((*IFriendlyRandomGenerator)(nil)).Elem(), + }, + ) + return returns } // Class interface type JsObjectLiteralToNativeIface interface { - ReturnLiteral() JsObjectLiteralToNativeClass + ReturnLiteral() JsObjectLiteralToNativeClassIface } // Struct proxy @@ -4858,21 +7862,30 @@ type JsObjectLiteralToNative struct { func NewJsObjectLiteralToNative() JsObjectLiteralToNativeIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JsObjectLiteralToNative", - Method: "Constructor", - Args: []string{}, - }) - return &JsObjectLiteralToNative{} -} - -func (j *JsObjectLiteralToNative) ReturnLiteral() JsObjectLiteralToNativeClass { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JsObjectLiteralToNative", - Method: "ReturnLiteral", - Args: []string{}, - }) - return JsObjectLiteralToNativeClass{} + self := JsObjectLiteralToNative{} + _jsii_.Create( + "jsii-calc.JSObjectLiteralToNative", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self +} + +func (j *JsObjectLiteralToNative) ReturnLiteral() JsObjectLiteralToNativeClassIface { + var returns JsObjectLiteralToNativeClassIface + _jsii_.Invoke( + j, + "returnLiteral", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*JsObjectLiteralToNativeClassIface)(nil)).Elem(): reflect.TypeOf((*JsObjectLiteralToNativeClass)(nil)).Elem(), + }, + ) + return returns } // Class interface @@ -4885,35 +7898,60 @@ type JsObjectLiteralToNativeClassIface interface { // Struct proxy type JsObjectLiteralToNativeClass struct { - PropA string - PropB float64 + PropA string \`json:"propA"\` + PropB float64 \`json:"propB"\` } func (j *JsObjectLiteralToNativeClass) GetPropA() string { - return j.PropA + var returns string + _jsii_.Get( + j, + "propA", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (j *JsObjectLiteralToNativeClass) GetPropB() float64 { - return j.PropB + var returns float64 + _jsii_.Get( + j, + "propB", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewJsObjectLiteralToNativeClass() JsObjectLiteralToNativeClassIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JsObjectLiteralToNativeClass", - Method: "Constructor", - Args: []string{}, - }) - return &JsObjectLiteralToNativeClass{} + self := JsObjectLiteralToNativeClass{} + _jsii_.Create( + "jsii-calc.JSObjectLiteralToNativeClass", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (j *JsObjectLiteralToNativeClass) SetPropA(val string) { - j.PropA = val + _jsii_.Set( + j, + "propA", + val, + ) } func (j *JsObjectLiteralToNativeClass) SetPropB(val float64) { - j.PropB = val + _jsii_.Set( + j, + "propB", + val, + ) } // Class interface @@ -4976,448 +8014,670 @@ type JavaReservedWordsIface interface { // Struct proxy type JavaReservedWords struct { - While string + While string \`json:"while"\` } func (j *JavaReservedWords) GetWhile() string { - return j.While + var returns string + _jsii_.Get( + j, + "while", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewJavaReservedWords() JavaReservedWordsIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Constructor", - Args: []string{}, - }) - return &JavaReservedWords{} + self := JavaReservedWords{} + _jsii_.Create( + "jsii-calc.JavaReservedWords", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (j *JavaReservedWords) SetWhile(val string) { - j.While = val + _jsii_.Set( + j, + "while", + val, + ) } func (j *JavaReservedWords) Abstract() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Abstract", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "abstract", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Assert() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Assert", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "assert", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Boolean() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Boolean", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "boolean", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Break() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Break", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "break", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Byte() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Byte", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "byte", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Case() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Case", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "case", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Catch() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Catch", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "catch", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Char() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Char", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "char", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Class() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Class", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "class", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Const() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Const", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "const", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Continue() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Continue", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "continue", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Default() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Default", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "default", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Do() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Do", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "do", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Double() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Double", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "double", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Else() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Else", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "else", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Enum() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Enum", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "enum", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Extends() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Extends", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "extends", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) False() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "False", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "false", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Final() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Final", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "final", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Finally() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Finally", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "finally", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Float() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Float", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "float", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) For() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "For", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "for", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Goto() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Goto", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "goto", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) If() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "If", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "if", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Implements() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Implements", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "implements", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Import() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Import", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "import", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Instanceof() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Instanceof", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "instanceof", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Int() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Int", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "int", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Interface() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Interface", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "interface", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Long() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Long", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "long", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Native() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Native", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "native", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) New() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "New", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "new", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Null() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Null", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "null", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Package() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Package", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "package", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Private() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Private", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "private", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Protected() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Protected", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "protected", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Public() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Public", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "public", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Return() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Return", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "return", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Short() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Short", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "short", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Static() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Static", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "static", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Strictfp() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Strictfp", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "strictfp", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Super() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Super", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "super", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Switch() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Switch", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "switch", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Synchronized() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Synchronized", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "synchronized", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) This() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "This", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "this", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Throw() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Throw", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "throw", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Throws() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Throws", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "throws", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Transient() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Transient", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "transient", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) True() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "True", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "true", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Try() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Try", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "try", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Void() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Void", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "void", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (j *JavaReservedWords) Volatile() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JavaReservedWords", - Method: "Volatile", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + j, + "volatile", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } // Class interface type Jsii487DerivedIface interface { - IJsii487External2 - IJsii487External + IJsii487External2Iface + IJsii487ExternalIface } // Struct proxy @@ -5426,17 +8686,20 @@ type Jsii487Derived struct { func NewJsii487Derived() Jsii487DerivedIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Jsii487Derived", - Method: "Constructor", - Args: []string{}, - }) - return &Jsii487Derived{} + self := Jsii487Derived{} + _jsii_.Create( + "jsii-calc.Jsii487Derived", + []interface{}{}, + []_jsii_.FQN{"jsii-calc.IJsii487External2", "jsii-calc.IJsii487External"}, + []_jsii_.Override{}, + &self, + ) + return &self } // Class interface type Jsii496DerivedIface interface { - IJsii496 + IJsii496Iface } // Struct proxy @@ -5445,46 +8708,49 @@ type Jsii496Derived struct { func NewJsii496Derived() Jsii496DerivedIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Jsii496Derived", - Method: "Constructor", - Args: []string{}, - }) - return &Jsii496Derived{} + self := Jsii496Derived{} + _jsii_.Create( + "jsii-calc.Jsii496Derived", + []interface{}{}, + []_jsii_.FQN{"jsii-calc.IJsii496"}, + []_jsii_.Override{}, + &self, + ) + return &self } // Class interface type JsiiAgentIface interface { - GetValue() string - SetValue(val string) } // Host runtime version should be set via JSII_AGENT. // Struct proxy type JsiiAgent struct { - // Returns the value of the JSII_AGENT environment variable. - Value string -} - -func (j *JsiiAgent) GetValue() string { - _init_.Initialize() - return j.Value } - func NewJsiiAgent() JsiiAgentIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JsiiAgent", - Method: "Constructor", - Args: []string{}, - }) - return &JsiiAgent{} + self := JsiiAgent{} + _jsii_.Create( + "jsii-calc.JsiiAgent", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } -func (j *JsiiAgent) SetValue(val string) { +func JsiiAgent_Value() string { _init_.Initialize() - j.Value = val + var returns string + _jsii_.StaticGet( + "jsii-calc.JsiiAgent", + "value", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface @@ -5498,175 +8764,238 @@ type JsonFormatterIface interface { type JsonFormatter struct { } -func JsonFormatter_AnyArray() jsii.Any { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JsonFormatter", - Method: "AnyArray", - Args: []string{}, - }) - return nil -} - -func JsonFormatter_AnyBooleanFalse() jsii.Any { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JsonFormatter", - Method: "AnyBooleanFalse", - Args: []string{}, - }) - return nil -} - -func JsonFormatter_AnyBooleanTrue() jsii.Any { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JsonFormatter", - Method: "AnyBooleanTrue", - Args: []string{}, - }) - return nil -} - -func JsonFormatter_AnyDate() jsii.Any { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JsonFormatter", - Method: "AnyDate", - Args: []string{}, - }) - return nil -} - -func JsonFormatter_AnyEmptyString() jsii.Any { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JsonFormatter", - Method: "AnyEmptyString", - Args: []string{}, - }) - return nil -} - -func JsonFormatter_AnyFunction() jsii.Any { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JsonFormatter", - Method: "AnyFunction", - Args: []string{}, - }) - return nil -} - -func JsonFormatter_AnyHash() jsii.Any { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JsonFormatter", - Method: "AnyHash", - Args: []string{}, - }) - return nil -} - -func JsonFormatter_AnyNull() jsii.Any { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JsonFormatter", - Method: "AnyNull", - Args: []string{}, - }) - return nil -} - -func JsonFormatter_AnyNumber() jsii.Any { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JsonFormatter", - Method: "AnyNumber", - Args: []string{}, - }) - return nil -} - -func JsonFormatter_AnyRef() jsii.Any { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JsonFormatter", - Method: "AnyRef", - Args: []string{}, - }) - return nil -} - -func JsonFormatter_AnyString() jsii.Any { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JsonFormatter", - Method: "AnyString", - Args: []string{}, - }) - return nil -} - -func JsonFormatter_AnyUndefined() jsii.Any { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JsonFormatter", - Method: "AnyUndefined", - Args: []string{}, - }) - return nil -} - -func JsonFormatter_AnyZero() jsii.Any { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JsonFormatter", - Method: "AnyZero", - Args: []string{}, - }) - return nil -} - -func JsonFormatter_Stringify(value jsii.Any) string { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "JsonFormatter", - Method: "Stringify", - Args: []string{"any",}, - }) - return "NOOP_RETURN_STRING" +func JsonFormatter_AnyArray() interface{} { + _init_.Initialize() + var returns interface{} + _jsii_.InvokeStatic( + "jsii-calc.JsonFormatter", + "anyArray", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func JsonFormatter_AnyBooleanFalse() interface{} { + _init_.Initialize() + var returns interface{} + _jsii_.InvokeStatic( + "jsii-calc.JsonFormatter", + "anyBooleanFalse", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func JsonFormatter_AnyBooleanTrue() interface{} { + _init_.Initialize() + var returns interface{} + _jsii_.InvokeStatic( + "jsii-calc.JsonFormatter", + "anyBooleanTrue", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func JsonFormatter_AnyDate() interface{} { + _init_.Initialize() + var returns interface{} + _jsii_.InvokeStatic( + "jsii-calc.JsonFormatter", + "anyDate", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func JsonFormatter_AnyEmptyString() interface{} { + _init_.Initialize() + var returns interface{} + _jsii_.InvokeStatic( + "jsii-calc.JsonFormatter", + "anyEmptyString", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func JsonFormatter_AnyFunction() interface{} { + _init_.Initialize() + var returns interface{} + _jsii_.InvokeStatic( + "jsii-calc.JsonFormatter", + "anyFunction", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func JsonFormatter_AnyHash() interface{} { + _init_.Initialize() + var returns interface{} + _jsii_.InvokeStatic( + "jsii-calc.JsonFormatter", + "anyHash", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func JsonFormatter_AnyNull() interface{} { + _init_.Initialize() + var returns interface{} + _jsii_.InvokeStatic( + "jsii-calc.JsonFormatter", + "anyNull", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func JsonFormatter_AnyNumber() interface{} { + _init_.Initialize() + var returns interface{} + _jsii_.InvokeStatic( + "jsii-calc.JsonFormatter", + "anyNumber", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func JsonFormatter_AnyRef() interface{} { + _init_.Initialize() + var returns interface{} + _jsii_.InvokeStatic( + "jsii-calc.JsonFormatter", + "anyRef", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func JsonFormatter_AnyString() interface{} { + _init_.Initialize() + var returns interface{} + _jsii_.InvokeStatic( + "jsii-calc.JsonFormatter", + "anyString", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func JsonFormatter_AnyUndefined() interface{} { + _init_.Initialize() + var returns interface{} + _jsii_.InvokeStatic( + "jsii-calc.JsonFormatter", + "anyUndefined", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func JsonFormatter_AnyZero() interface{} { + _init_.Initialize() + var returns interface{} + _jsii_.InvokeStatic( + "jsii-calc.JsonFormatter", + "anyZero", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func JsonFormatter_Stringify(value interface{}) string { + _init_.Initialize() + var returns string + _jsii_.InvokeStatic( + "jsii-calc.JsonFormatter", + "stringify", + []interface{}{value}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type LevelOneIface interface { - GetProps() LevelOneProps - SetProps(val LevelOneProps) + GetProps() LevelOnePropsIface } // Validates that nested classes get correct code generation for the occasional forward reference. // Struct proxy type LevelOne struct { - Props LevelOneProps + Props LevelOnePropsIface \`json:"props"\` } -func (l *LevelOne) GetProps() LevelOneProps { - return l.Props +func (l *LevelOne) GetProps() LevelOnePropsIface { + var returns LevelOnePropsIface + _jsii_.Get( + l, + "props", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*LevelOnePropsIface)(nil)).Elem(): reflect.TypeOf((*LevelOneProps)(nil)).Elem(), + }, + ) + return returns } -func NewLevelOne(props LevelOneProps) LevelOneIface { +func NewLevelOne(props LevelOnePropsIface) LevelOneIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "LevelOne", - Method: "Constructor", - Args: []string{"jsii-calc.LevelOneProps",}, - }) - return &LevelOne{} -} - -func (l *LevelOne) SetProps(val LevelOneProps) { - l.Props = val + self := LevelOne{} + _jsii_.Create( + "jsii-calc.LevelOne", + []interface{}{props}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } // PropBooleanValueIface is the public interface for the custom type PropBooleanValue @@ -5676,41 +9005,66 @@ type PropBooleanValueIface interface { // Struct proxy type PropBooleanValue struct { - Value bool + Value bool \`json:"value"\` } func (p *PropBooleanValue) GetValue() bool { - return p.Value + var returns bool + _jsii_.Get( + p, + "value", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // PropPropertyIface is the public interface for the custom type PropProperty type PropPropertyIface interface { - GetProp() PropBooleanValue + GetProp() PropBooleanValueIface } // Struct proxy type PropProperty struct { - Prop PropBooleanValue + Prop PropBooleanValueIface \`json:"prop"\` } -func (p *PropProperty) GetProp() PropBooleanValue { - return p.Prop +func (p *PropProperty) GetProp() PropBooleanValueIface { + var returns PropBooleanValueIface + _jsii_.Get( + p, + "prop", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*PropBooleanValueIface)(nil)).Elem(): reflect.TypeOf((*PropBooleanValue)(nil)).Elem(), + }, + ) + return returns } // LevelOnePropsIface is the public interface for the custom type LevelOneProps type LevelOnePropsIface interface { - GetProp() PropProperty + GetProp() PropPropertyIface } // Struct proxy type LevelOneProps struct { - Prop PropProperty + Prop PropPropertyIface \`json:"prop"\` } -func (l *LevelOneProps) GetProp() PropProperty { - return l.Prop +func (l *LevelOneProps) GetProp() PropPropertyIface { + var returns PropPropertyIface + _jsii_.Get( + l, + "prop", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*PropPropertyIface)(nil)).Elem(): reflect.TypeOf((*PropProperty)(nil)).Elem(), + }, + ) + return returns } @@ -5727,117 +9081,158 @@ type LoadBalancedFargateServicePropsIface interface { // Struct proxy type LoadBalancedFargateServiceProps struct { // The container port of the application load balancer attached to your Fargate service. - // + // // Corresponds to container port mapping. - ContainerPort float64 + ContainerPort float64 \`json:"containerPort"\` // The number of cpu units used by the task. - // + // // Valid values, which determines your range of valid values for the memory parameter: // 256 (.25 vCPU) - Available memory values: 0.5GB, 1GB, 2GB // 512 (.5 vCPU) - Available memory values: 1GB, 2GB, 3GB, 4GB // 1024 (1 vCPU) - Available memory values: 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB // 2048 (2 vCPU) - Available memory values: Between 4GB and 16GB in 1GB increments // 4096 (4 vCPU) - Available memory values: Between 8GB and 30GB in 1GB increments - // + // // This default is set in the underlying FargateTaskDefinition construct. - Cpu string + Cpu string \`json:"cpu"\` // The amount (in MiB) of memory used by the task. - // + // // This field is required and you must use one of the following values, which determines your range of valid values // for the cpu parameter: - // + // // 0.5GB, 1GB, 2GB - Available cpu values: 256 (.25 vCPU) - // + // // 1GB, 2GB, 3GB, 4GB - Available cpu values: 512 (.5 vCPU) - // + // // 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB - Available cpu values: 1024 (1 vCPU) - // + // // Between 4GB and 16GB in 1GB increments - Available cpu values: 2048 (2 vCPU) - // + // // Between 8GB and 30GB in 1GB increments - Available cpu values: 4096 (4 vCPU) - // + // // This default is set in the underlying FargateTaskDefinition construct. - MemoryMiB string + MemoryMiB string \`json:"memoryMiB"\` // Determines whether the Application Load Balancer will be internet-facing. - PublicLoadBalancer bool + PublicLoadBalancer bool \`json:"publicLoadBalancer"\` // Determines whether your Fargate Service will be assigned a public IP address. - PublicTasks bool + PublicTasks bool \`json:"publicTasks"\` } func (l *LoadBalancedFargateServiceProps) GetContainerPort() float64 { - return l.ContainerPort + var returns float64 + _jsii_.Get( + l, + "containerPort", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (l *LoadBalancedFargateServiceProps) GetCpu() string { - return l.Cpu + var returns string + _jsii_.Get( + l, + "cpu", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (l *LoadBalancedFargateServiceProps) GetMemoryMiB() string { - return l.MemoryMiB + var returns string + _jsii_.Get( + l, + "memoryMiB", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (l *LoadBalancedFargateServiceProps) GetPublicLoadBalancer() bool { - return l.PublicLoadBalancer + var returns bool + _jsii_.Get( + l, + "publicLoadBalancer", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (l *LoadBalancedFargateServiceProps) GetPublicTasks() bool { - return l.PublicTasks + var returns bool + _jsii_.Get( + l, + "publicTasks", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type MethodNamedPropertyIface interface { GetElite() float64 - SetElite(val float64) Property() string } // Struct proxy type MethodNamedProperty struct { - Elite float64 + Elite float64 \`json:"elite"\` } func (m *MethodNamedProperty) GetElite() float64 { - return m.Elite + var returns float64 + _jsii_.Get( + m, + "elite", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewMethodNamedProperty() MethodNamedPropertyIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "MethodNamedProperty", - Method: "Constructor", - Args: []string{}, - }) - return &MethodNamedProperty{} -} - -func (m *MethodNamedProperty) SetElite(val float64) { - m.Elite = val + self := MethodNamedProperty{} + _jsii_.Create( + "jsii-calc.MethodNamedProperty", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (m *MethodNamedProperty) Property() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "MethodNamedProperty", - Method: "Property", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + m, + "property", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type MultiplyIface interface { - scopejsiicalclib.IFriendly - IFriendlier - scopejsiicalclib.IFriendly - IRandomNumberGenerator + scopejsiicalclib.IFriendlyIface + IFriendlierIface + scopejsiicalclib.IFriendlyIface + IRandomNumberGeneratorIface GetValue() float64 - SetValue(val float64) - GetLhs() scopejsiicalclib.NumericValue - SetLhs(val scopejsiicalclib.NumericValue) - GetRhs() scopejsiicalclib.NumericValue - SetRhs(val scopejsiicalclib.NumericValue) - TypeName() jsii.Any + GetLhs() scopejsiicalclib.NumericValueIface + GetRhs() scopejsiicalclib.NumericValueIface + TypeName() interface{} ToString() string Hello() string Farewell() string @@ -5849,112 +9244,150 @@ type MultiplyIface interface { // Struct proxy type Multiply struct { // (deprecated) The value. - Value float64 + Value float64 \`json:"value"\` // Left-hand side operand. - Lhs scopejsiicalclib.NumericValue + Lhs scopejsiicalclib.NumericValueIface \`json:"lhs"\` // Right-hand side operand. - Rhs scopejsiicalclib.NumericValue + Rhs scopejsiicalclib.NumericValueIface \`json:"rhs"\` } func (m *Multiply) GetValue() float64 { - return m.Value -} - -func (m *Multiply) GetLhs() scopejsiicalclib.NumericValue { - return m.Lhs -} - -func (m *Multiply) GetRhs() scopejsiicalclib.NumericValue { - return m.Rhs + var returns float64 + _jsii_.Get( + m, + "value", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (m *Multiply) GetLhs() scopejsiicalclib.NumericValueIface { + var returns scopejsiicalclib.NumericValueIface + _jsii_.Get( + m, + "lhs", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*scopejsiicalclib.NumericValueIface)(nil)).Elem(): reflect.TypeOf((*scopejsiicalclib.NumericValue)(nil)).Elem(), + }, + ) + return returns +} + +func (m *Multiply) GetRhs() scopejsiicalclib.NumericValueIface { + var returns scopejsiicalclib.NumericValueIface + _jsii_.Get( + m, + "rhs", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*scopejsiicalclib.NumericValueIface)(nil)).Elem(): reflect.TypeOf((*scopejsiicalclib.NumericValue)(nil)).Elem(), + }, + ) + return returns } // Creates a BinaryOperation. -func NewMultiply(lhs scopejsiicalclib.NumericValue, rhs scopejsiicalclib.NumericValue) MultiplyIface { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Multiply", - Method: "Constructor", - Args: []string{"@scope/jsii-calc-lib.NumericValue", "@scope/jsii-calc-lib.NumericValue",}, - }) - return &Multiply{} -} - -func (m *Multiply) SetValue(val float64) { - m.Value = val -} - -func (m *Multiply) SetLhs(val scopejsiicalclib.NumericValue) { - m.Lhs = val -} - -func (m *Multiply) SetRhs(val scopejsiicalclib.NumericValue) { - m.Rhs = val -} - -func (m *Multiply) TypeName() jsii.Any { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Multiply", - Method: "TypeName", - Args: []string{}, - }) - return nil +func NewMultiply(lhs scopejsiicalclib.NumericValueIface, rhs scopejsiicalclib.NumericValueIface) MultiplyIface { + _init_.Initialize() + self := Multiply{} + _jsii_.Create( + "jsii-calc.Multiply", + []interface{}{lhs, rhs}, + []_jsii_.FQN{"jsii-calc.IFriendlier", "jsii-calc.IRandomNumberGenerator"}, + []_jsii_.Override{}, + &self, + ) + return &self +} + +func (m *Multiply) TypeName() interface{} { + var returns interface{} + _jsii_.Invoke( + m, + "typeName", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (m *Multiply) ToString() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Multiply", - Method: "ToString", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + m, + "toString", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (m *Multiply) Hello() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Multiply", - Method: "Hello", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + m, + "hello", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (m *Multiply) Farewell() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Multiply", - Method: "Farewell", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + m, + "farewell", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (m *Multiply) Goodbye() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Multiply", - Method: "Goodbye", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + m, + "goodbye", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (m *Multiply) Next() float64 { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Multiply", - Method: "Next", - Args: []string{}, - }) - return 0.0 + var returns float64 + _jsii_.Invoke( + m, + "next", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type NegateIface interface { - IFriendlier - scopejsiicalclib.IFriendly + IFriendlierIface + scopejsiicalclib.IFriendlyIface GetValue() float64 - SetValue(val float64) - GetOperand() scopejsiicalclib.NumericValue - SetOperand(val scopejsiicalclib.NumericValue) - TypeName() jsii.Any + GetOperand() scopejsiicalclib.NumericValueIface + TypeName() interface{} ToString() string Farewell() string Goodbye() string @@ -5965,80 +9398,111 @@ type NegateIface interface { // Struct proxy type Negate struct { // (deprecated) The value. - Value float64 - Operand scopejsiicalclib.NumericValue + Value float64 \`json:"value"\` + Operand scopejsiicalclib.NumericValueIface \`json:"operand"\` } func (n *Negate) GetValue() float64 { - return n.Value -} - -func (n *Negate) GetOperand() scopejsiicalclib.NumericValue { - return n.Operand -} - - -func NewNegate(operand scopejsiicalclib.NumericValue) NegateIface { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Negate", - Method: "Constructor", - Args: []string{"@scope/jsii-calc-lib.NumericValue",}, - }) - return &Negate{} -} - -func (n *Negate) SetValue(val float64) { - n.Value = val -} - -func (n *Negate) SetOperand(val scopejsiicalclib.NumericValue) { - n.Operand = val -} - -func (n *Negate) TypeName() jsii.Any { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Negate", - Method: "TypeName", - Args: []string{}, - }) - return nil + var returns float64 + _jsii_.Get( + n, + "value", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (n *Negate) GetOperand() scopejsiicalclib.NumericValueIface { + var returns scopejsiicalclib.NumericValueIface + _jsii_.Get( + n, + "operand", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*scopejsiicalclib.NumericValueIface)(nil)).Elem(): reflect.TypeOf((*scopejsiicalclib.NumericValue)(nil)).Elem(), + }, + ) + return returns +} + + +func NewNegate(operand scopejsiicalclib.NumericValueIface) NegateIface { + _init_.Initialize() + self := Negate{} + _jsii_.Create( + "jsii-calc.Negate", + []interface{}{operand}, + []_jsii_.FQN{"jsii-calc.IFriendlier"}, + []_jsii_.Override{}, + &self, + ) + return &self +} + +func (n *Negate) TypeName() interface{} { + var returns interface{} + _jsii_.Invoke( + n, + "typeName", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (n *Negate) ToString() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Negate", - Method: "ToString", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + n, + "toString", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (n *Negate) Farewell() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Negate", - Method: "Farewell", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + n, + "farewell", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (n *Negate) Goodbye() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Negate", - Method: "Goodbye", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + n, + "goodbye", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (n *Negate) Hello() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Negate", - Method: "Hello", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + n, + "hello", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface @@ -6049,14 +9513,20 @@ type NestedClassInstanceIface interface { type NestedClassInstance struct { } -func NestedClassInstance_MakeInstance() submodule.NestedClass { +func NestedClassInstance_MakeInstance() submodule.NestedClassIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "NestedClassInstance", - Method: "MakeInstance", - Args: []string{}, - }) - return submodule.NestedClass{} + var returns submodule.NestedClassIface + _jsii_.InvokeStatic( + "jsii-calc.NestedClassInstance", + "makeInstance", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*submodule.NestedClassIface)(nil)).Elem(): reflect.TypeOf((*submodule.NestedClass)(nil)).Elem(), + }, + ) + return returns } // NestedStructIface is the public interface for the custom type NestedStruct @@ -6067,18 +9537,24 @@ type NestedStructIface interface { // Struct proxy type NestedStruct struct { // When provided, must be > 0. - NumberProp float64 + NumberProp float64 \`json:"numberProp"\` } func (n *NestedStruct) GetNumberProp() float64 { - return n.NumberProp + var returns float64 + _jsii_.Get( + n, + "numberProp", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type NodeStandardLibraryIface interface { GetOsPlatform() string - SetOsPlatform(val string) CryptoSha256() string FsReadFile() string FsReadFileSync() string @@ -6088,189 +9564,273 @@ type NodeStandardLibraryIface interface { // Struct proxy type NodeStandardLibrary struct { // Returns the current os.platform() from the "os" node module. - OsPlatform string + OsPlatform string \`json:"osPlatform"\` } func (n *NodeStandardLibrary) GetOsPlatform() string { - return n.OsPlatform + var returns string + _jsii_.Get( + n, + "osPlatform", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewNodeStandardLibrary() NodeStandardLibraryIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "NodeStandardLibrary", - Method: "Constructor", - Args: []string{}, - }) - return &NodeStandardLibrary{} -} - -func (n *NodeStandardLibrary) SetOsPlatform(val string) { - n.OsPlatform = val + self := NodeStandardLibrary{} + _jsii_.Create( + "jsii-calc.NodeStandardLibrary", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (n *NodeStandardLibrary) CryptoSha256() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "NodeStandardLibrary", - Method: "CryptoSha256", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + n, + "cryptoSha256", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (n *NodeStandardLibrary) FsReadFile() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "NodeStandardLibrary", - Method: "FsReadFile", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + n, + "fsReadFile", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (n *NodeStandardLibrary) FsReadFileSync() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "NodeStandardLibrary", - Method: "FsReadFileSync", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + n, + "fsReadFileSync", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type NullShouldBeTreatedAsUndefinedIface interface { GetChangeMeToUndefined() string SetChangeMeToUndefined(val string) - GiveMeUndefined(value jsii.Any) - GiveMeUndefinedInsideAnObject(input NullShouldBeTreatedAsUndefinedData) + GiveMeUndefined(value interface{}) + GiveMeUndefinedInsideAnObject(input NullShouldBeTreatedAsUndefinedDataIface) VerifyPropertyIsUndefined() } // jsii#282, aws-cdk#157: null should be treated as "undefined". // Struct proxy type NullShouldBeTreatedAsUndefined struct { - ChangeMeToUndefined string + ChangeMeToUndefined string \`json:"changeMeToUndefined"\` } func (n *NullShouldBeTreatedAsUndefined) GetChangeMeToUndefined() string { - return n.ChangeMeToUndefined + var returns string + _jsii_.Get( + n, + "changeMeToUndefined", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } -func NewNullShouldBeTreatedAsUndefined(_param1 string, optional jsii.Any) NullShouldBeTreatedAsUndefinedIface { +func NewNullShouldBeTreatedAsUndefined(_param1 string, optional interface{}) NullShouldBeTreatedAsUndefinedIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "NullShouldBeTreatedAsUndefined", - Method: "Constructor", - Args: []string{"string", "any",}, - }) - return &NullShouldBeTreatedAsUndefined{} + self := NullShouldBeTreatedAsUndefined{} + _jsii_.Create( + "jsii-calc.NullShouldBeTreatedAsUndefined", + []interface{}{_param1, optional}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (n *NullShouldBeTreatedAsUndefined) SetChangeMeToUndefined(val string) { - n.ChangeMeToUndefined = val -} - -func (n *NullShouldBeTreatedAsUndefined) GiveMeUndefined(value jsii.Any) { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "NullShouldBeTreatedAsUndefined", - Method: "GiveMeUndefined", - Args: []string{"any",}, - }) -} - -func (n *NullShouldBeTreatedAsUndefined) GiveMeUndefinedInsideAnObject(input NullShouldBeTreatedAsUndefinedData) { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "NullShouldBeTreatedAsUndefined", - Method: "GiveMeUndefinedInsideAnObject", - Args: []string{"jsii-calc.NullShouldBeTreatedAsUndefinedData",}, - }) + _jsii_.Set( + n, + "changeMeToUndefined", + val, + ) +} + +func (n *NullShouldBeTreatedAsUndefined) GiveMeUndefined(value interface{}) { + var returns interface{} + _jsii_.Invoke( + n, + "giveMeUndefined", + []interface{}{value}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) +} + +func (n *NullShouldBeTreatedAsUndefined) GiveMeUndefinedInsideAnObject(input NullShouldBeTreatedAsUndefinedDataIface) { + var returns interface{} + _jsii_.Invoke( + n, + "giveMeUndefinedInsideAnObject", + []interface{}{input}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (n *NullShouldBeTreatedAsUndefined) VerifyPropertyIsUndefined() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "NullShouldBeTreatedAsUndefined", - Method: "VerifyPropertyIsUndefined", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + n, + "verifyPropertyIsUndefined", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } // NullShouldBeTreatedAsUndefinedDataIface is the public interface for the custom type NullShouldBeTreatedAsUndefinedData type NullShouldBeTreatedAsUndefinedDataIface interface { - GetArrayWithThreeElementsAndUndefinedAsSecondArgument() []jsii.Any - GetThisShouldBeUndefined() jsii.Any + GetArrayWithThreeElementsAndUndefinedAsSecondArgument() []interface{} + GetThisShouldBeUndefined() interface{} } // Struct proxy type NullShouldBeTreatedAsUndefinedData struct { - ArrayWithThreeElementsAndUndefinedAsSecondArgument []jsii.Any - ThisShouldBeUndefined jsii.Any + ArrayWithThreeElementsAndUndefinedAsSecondArgument []interface{} \`json:"arrayWithThreeElementsAndUndefinedAsSecondArgument"\` + ThisShouldBeUndefined interface{} \`json:"thisShouldBeUndefined"\` } -func (n *NullShouldBeTreatedAsUndefinedData) GetArrayWithThreeElementsAndUndefinedAsSecondArgument() []jsii.Any { - return n.ArrayWithThreeElementsAndUndefinedAsSecondArgument +func (n *NullShouldBeTreatedAsUndefinedData) GetArrayWithThreeElementsAndUndefinedAsSecondArgument() []interface{} { + var returns []interface{} + _jsii_.Get( + n, + "arrayWithThreeElementsAndUndefinedAsSecondArgument", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*interface{})(nil)).Elem(): reflect.TypeOf((*interface{})(nil)).Elem(), + }, + ) + return returns } -func (n *NullShouldBeTreatedAsUndefinedData) GetThisShouldBeUndefined() jsii.Any { - return n.ThisShouldBeUndefined +func (n *NullShouldBeTreatedAsUndefinedData) GetThisShouldBeUndefined() interface{} { + var returns interface{} + _jsii_.Get( + n, + "thisShouldBeUndefined", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type NumberGeneratorIface interface { - GetGenerator() IRandomNumberGenerator - SetGenerator(val IRandomNumberGenerator) - IsSameGenerator(gen IRandomNumberGenerator) bool + GetGenerator() IRandomNumberGeneratorIface + SetGenerator(val IRandomNumberGeneratorIface) + IsSameGenerator(gen IRandomNumberGeneratorIface) bool NextTimes100() float64 } // This allows us to test that a reference can be stored for objects that implement interfaces. // Struct proxy type NumberGenerator struct { - Generator IRandomNumberGenerator + Generator IRandomNumberGeneratorIface \`json:"generator"\` } -func (n *NumberGenerator) GetGenerator() IRandomNumberGenerator { - return n.Generator +func (n *NumberGenerator) GetGenerator() IRandomNumberGeneratorIface { + var returns IRandomNumberGeneratorIface + _jsii_.Get( + n, + "generator", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*IRandomNumberGeneratorIface)(nil)).Elem(): reflect.TypeOf((*IRandomNumberGenerator)(nil)).Elem(), + }, + ) + return returns } -func NewNumberGenerator(generator IRandomNumberGenerator) NumberGeneratorIface { +func NewNumberGenerator(generator IRandomNumberGeneratorIface) NumberGeneratorIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "NumberGenerator", - Method: "Constructor", - Args: []string{"jsii-calc.IRandomNumberGenerator",}, - }) - return &NumberGenerator{} + self := NumberGenerator{} + _jsii_.Create( + "jsii-calc.NumberGenerator", + []interface{}{generator}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } -func (n *NumberGenerator) SetGenerator(val IRandomNumberGenerator) { - n.Generator = val +func (n *NumberGenerator) SetGenerator(val IRandomNumberGeneratorIface) { + _jsii_.Set( + n, + "generator", + val, + ) } -func (n *NumberGenerator) IsSameGenerator(gen IRandomNumberGenerator) bool { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "NumberGenerator", - Method: "IsSameGenerator", - Args: []string{"jsii-calc.IRandomNumberGenerator",}, - }) - return true +func (n *NumberGenerator) IsSameGenerator(gen IRandomNumberGeneratorIface) bool { + var returns bool + _jsii_.Invoke( + n, + "isSameGenerator", + []interface{}{gen}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (n *NumberGenerator) NextTimes100() float64 { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "NumberGenerator", - Method: "NextTimes100", - Args: []string{}, - }) - return 0.0 + var returns float64 + _jsii_.Invoke( + n, + "nextTimes100", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type ObjectRefsInCollectionsIface interface { - SumFromArray(values []scopejsiicalclib.NumericValue) float64 - SumFromMap(values map[string]scopejsiicalclib.NumericValue) float64 + SumFromArray(values []scopejsiicalclib.NumericValueIface) float64 + SumFromMap(values map[string]scopejsiicalclib.NumericValueIface) float64 } // Verify that object references can be passed inside collections. @@ -6280,30 +9840,41 @@ type ObjectRefsInCollections struct { func NewObjectRefsInCollections() ObjectRefsInCollectionsIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ObjectRefsInCollections", - Method: "Constructor", - Args: []string{}, - }) - return &ObjectRefsInCollections{} -} - -func (o *ObjectRefsInCollections) SumFromArray(values []scopejsiicalclib.NumericValue) float64 { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ObjectRefsInCollections", - Method: "SumFromArray", - Args: []string{"Array<@scope/jsii-calc-lib.NumericValue>",}, - }) - return 0.0 -} - -func (o *ObjectRefsInCollections) SumFromMap(values map[string]scopejsiicalclib.NumericValue) float64 { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ObjectRefsInCollections", - Method: "SumFromMap", - Args: []string{"Map @scope/jsii-calc-lib.NumericValue>",}, - }) - return 0.0 + self := ObjectRefsInCollections{} + _jsii_.Create( + "jsii-calc.ObjectRefsInCollections", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self +} + +func (o *ObjectRefsInCollections) SumFromArray(values []scopejsiicalclib.NumericValueIface) float64 { + var returns float64 + _jsii_.Invoke( + o, + "sumFromArray", + []interface{}{values}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (o *ObjectRefsInCollections) SumFromMap(values map[string]scopejsiicalclib.NumericValueIface) float64 { + var returns float64 + _jsii_.Invoke( + o, + "sumFromMap", + []interface{}{values}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface @@ -6314,14 +9885,20 @@ type ObjectWithPropertyProviderIface interface { type ObjectWithPropertyProvider struct { } -func ObjectWithPropertyProvider_Provide() IObjectWithProperty { +func ObjectWithPropertyProvider_Provide() IObjectWithPropertyIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ObjectWithPropertyProvider", - Method: "Provide", - Args: []string{}, - }) - return nil + var returns IObjectWithPropertyIface + _jsii_.InvokeStatic( + "jsii-calc.ObjectWithPropertyProvider", + "provide", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*IObjectWithPropertyIface)(nil)).Elem(): reflect.TypeOf((*IObjectWithProperty)(nil)).Elem(), + }, + ) + return returns } // Class interface @@ -6330,27 +9907,35 @@ type OldIface interface { } // Old class. -// Deprecated: Use the new class +// Deprecated: Use the new class or the old class whatever you want because +// whatever you like is always the best // Struct proxy type Old struct { } func NewOld() OldIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Old", - Method: "Constructor", - Args: []string{}, - }) - return &Old{} + self := Old{} + _jsii_.Create( + "jsii-calc.Old", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (o *Old) DoAThing() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Old", - Method: "DoAThing", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + o, + "doAThing", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } // Class interface @@ -6363,82 +9948,102 @@ type OptionalArgumentInvokerIface interface { type OptionalArgumentInvoker struct { } -func NewOptionalArgumentInvoker(delegate IInterfaceWithOptionalMethodArguments) OptionalArgumentInvokerIface { +func NewOptionalArgumentInvoker(delegate IInterfaceWithOptionalMethodArgumentsIface) OptionalArgumentInvokerIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "OptionalArgumentInvoker", - Method: "Constructor", - Args: []string{"jsii-calc.IInterfaceWithOptionalMethodArguments",}, - }) - return &OptionalArgumentInvoker{} + self := OptionalArgumentInvoker{} + _jsii_.Create( + "jsii-calc.OptionalArgumentInvoker", + []interface{}{delegate}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (o *OptionalArgumentInvoker) InvokeWithOptional() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "OptionalArgumentInvoker", - Method: "InvokeWithOptional", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + o, + "invokeWithOptional", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (o *OptionalArgumentInvoker) InvokeWithoutOptional() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "OptionalArgumentInvoker", - Method: "InvokeWithoutOptional", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + o, + "invokeWithoutOptional", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } // Class interface type OptionalConstructorArgumentIface interface { GetArg1() float64 - SetArg1(val float64) GetArg2() string - SetArg2(val string) GetArg3() string - SetArg3(val string) } // Struct proxy type OptionalConstructorArgument struct { - Arg1 float64 - Arg2 string - Arg3 string + Arg1 float64 \`json:"arg1"\` + Arg2 string \`json:"arg2"\` + Arg3 string \`json:"arg3"\` } func (o *OptionalConstructorArgument) GetArg1() float64 { - return o.Arg1 + var returns float64 + _jsii_.Get( + o, + "arg1", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (o *OptionalConstructorArgument) GetArg2() string { - return o.Arg2 + var returns string + _jsii_.Get( + o, + "arg2", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (o *OptionalConstructorArgument) GetArg3() string { - return o.Arg3 + var returns string + _jsii_.Get( + o, + "arg3", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewOptionalConstructorArgument(arg1 float64, arg2 string, arg3 string) OptionalConstructorArgumentIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "OptionalConstructorArgument", - Method: "Constructor", - Args: []string{"number", "string", "date",}, - }) - return &OptionalConstructorArgument{} -} - -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 + self := OptionalConstructorArgument{} + _jsii_.Create( + "jsii-calc.OptionalConstructorArgument", + []interface{}{arg1, arg2, arg3}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } // OptionalStructIface is the public interface for the custom type OptionalStruct @@ -6448,53 +10053,67 @@ type OptionalStructIface interface { // Struct proxy type OptionalStruct struct { - Field string + Field string \`json:"field"\` } func (o *OptionalStruct) GetField() string { - return o.Field + var returns string + _jsii_.Get( + o, + "field", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type OptionalStructConsumerIface interface { GetParameterWasUndefined() bool - SetParameterWasUndefined(val bool) GetFieldValue() string - SetFieldValue(val string) } // Struct proxy type OptionalStructConsumer struct { - ParameterWasUndefined bool - FieldValue string + ParameterWasUndefined bool \`json:"parameterWasUndefined"\` + FieldValue string \`json:"fieldValue"\` } func (o *OptionalStructConsumer) GetParameterWasUndefined() bool { - return o.ParameterWasUndefined + var returns bool + _jsii_.Get( + o, + "parameterWasUndefined", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (o *OptionalStructConsumer) GetFieldValue() string { - return o.FieldValue + var returns string + _jsii_.Get( + o, + "fieldValue", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } -func NewOptionalStructConsumer(optionalStruct OptionalStruct) OptionalStructConsumerIface { +func NewOptionalStructConsumer(optionalStruct OptionalStructIface) OptionalStructConsumerIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "OptionalStructConsumer", - Method: "Constructor", - Args: []string{"jsii-calc.OptionalStruct",}, - }) - return &OptionalStructConsumer{} -} - -func (o *OptionalStructConsumer) SetParameterWasUndefined(val bool) { - o.ParameterWasUndefined = val -} - -func (o *OptionalStructConsumer) SetFieldValue(val string) { - o.FieldValue = val + self := OptionalStructConsumer{} + _jsii_.Create( + "jsii-calc.OptionalStructConsumer", + []interface{}{optionalStruct}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } // Class interface @@ -6510,66 +10129,95 @@ type OverridableProtectedMemberIface interface { // // Struct proxy type OverridableProtectedMember struct { - OverrideReadOnly string - OverrideReadWrite string + OverrideReadOnly string \`json:"overrideReadOnly"\` + OverrideReadWrite string \`json:"overrideReadWrite"\` } func (o *OverridableProtectedMember) GetOverrideReadOnly() string { - return o.OverrideReadOnly + var returns string + _jsii_.Get( + o, + "overrideReadOnly", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (o *OverridableProtectedMember) GetOverrideReadWrite() string { - return o.OverrideReadWrite + var returns string + _jsii_.Get( + o, + "overrideReadWrite", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewOverridableProtectedMember() OverridableProtectedMemberIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "OverridableProtectedMember", - Method: "Constructor", - Args: []string{}, - }) - return &OverridableProtectedMember{} -} - -func (o *OverridableProtectedMember) SetOverrideReadOnly(val string) { - o.OverrideReadOnly = val + self := OverridableProtectedMember{} + _jsii_.Create( + "jsii-calc.OverridableProtectedMember", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (o *OverridableProtectedMember) SetOverrideReadWrite(val string) { - o.OverrideReadWrite = val + _jsii_.Set( + o, + "overrideReadWrite", + val, + ) } func (o *OverridableProtectedMember) OverrideMe() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "OverridableProtectedMember", - Method: "OverrideMe", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + o, + "overrideMe", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (o *OverridableProtectedMember) SwitchModes() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "OverridableProtectedMember", - Method: "SwitchModes", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + o, + "switchModes", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (o *OverridableProtectedMember) ValueFromProtected() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "OverridableProtectedMember", - Method: "ValueFromProtected", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + o, + "valueFromProtected", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type OverrideReturnsObjectIface interface { - Test(obj IReturnsNumber) float64 + Test(obj IReturnsNumberIface) float64 } // Struct proxy @@ -6578,21 +10226,28 @@ type OverrideReturnsObject struct { func NewOverrideReturnsObject() OverrideReturnsObjectIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "OverrideReturnsObject", - Method: "Constructor", - Args: []string{}, - }) - return &OverrideReturnsObject{} -} - -func (o *OverrideReturnsObject) Test(obj IReturnsNumber) float64 { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "OverrideReturnsObject", - Method: "Test", - Args: []string{"jsii-calc.IReturnsNumber",}, - }) - return 0.0 + self := OverrideReturnsObject{} + _jsii_.Create( + "jsii-calc.OverrideReturnsObject", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self +} + +func (o *OverrideReturnsObject) Test(obj IReturnsNumberIface) float64 { + var returns float64 + _jsii_.Invoke( + o, + "test", + []interface{}{obj}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // ParentStruct982Iface is the public interface for the custom type ParentStruct982 @@ -6603,17 +10258,24 @@ type ParentStruct982Iface interface { // https://github.com/aws/jsii/issues/982. // Struct proxy type ParentStruct982 struct { - Foo string + Foo string \`json:"foo"\` } func (p *ParentStruct982) GetFoo() string { - return p.Foo + var returns string + _jsii_.Get( + p, + "foo", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type PartiallyInitializedThisConsumerIface interface { - ConsumePartiallyInitializedThis(obj ConstructorPassesThisOut, dt string, ev AllTypesEnum) string + ConsumePartiallyInitializedThis(obj ConstructorPassesThisOutIface, dt string, ev AllTypesEnum) string } // Struct proxy @@ -6622,26 +10284,33 @@ type PartiallyInitializedThisConsumer struct { func NewPartiallyInitializedThisConsumer() PartiallyInitializedThisConsumerIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PartiallyInitializedThisConsumer", - Method: "Constructor", - Args: []string{}, - }) - return &PartiallyInitializedThisConsumer{} + self := PartiallyInitializedThisConsumer{} + _jsii_.Create( + "jsii-calc.PartiallyInitializedThisConsumer", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } -func (p *PartiallyInitializedThisConsumer) ConsumePartiallyInitializedThis(obj ConstructorPassesThisOut, dt string, ev AllTypesEnum) string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PartiallyInitializedThisConsumer", - Method: "ConsumePartiallyInitializedThis", - Args: []string{"jsii-calc.ConstructorPassesThisOut", "date", "jsii-calc.AllTypesEnum",}, - }) - return "NOOP_RETURN_STRING" +func (p *PartiallyInitializedThisConsumer) ConsumePartiallyInitializedThis(obj ConstructorPassesThisOutIface, dt string, ev AllTypesEnum) string { + var returns string + _jsii_.Invoke( + p, + "consumePartiallyInitializedThis", + []interface{}{obj, dt, ev}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type PolymorphismIface interface { - SayHello(friendly scopejsiicalclib.IFriendly) string + SayHello(friendly scopejsiicalclib.IFriendlyIface) string } // Struct proxy @@ -6650,40 +10319,43 @@ type Polymorphism struct { func NewPolymorphism() PolymorphismIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Polymorphism", - Method: "Constructor", - Args: []string{}, - }) - return &Polymorphism{} + self := Polymorphism{} + _jsii_.Create( + "jsii-calc.Polymorphism", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } -func (p *Polymorphism) SayHello(friendly scopejsiicalclib.IFriendly) string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Polymorphism", - Method: "SayHello", - Args: []string{"@scope/jsii-calc-lib.IFriendly",}, - }) - return "NOOP_RETURN_STRING" +func (p *Polymorphism) SayHello(friendly scopejsiicalclib.IFriendlyIface) string { + var returns string + _jsii_.Invoke( + p, + "sayHello", + []interface{}{friendly}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type PowerIface interface { GetValue() float64 - SetValue(val float64) - GetExpression() scopejsiicalclib.NumericValue - SetExpression(val scopejsiicalclib.NumericValue) + GetExpression() scopejsiicalclib.NumericValueIface GetDecorationPostfixes() []string SetDecorationPostfixes(val []string) GetDecorationPrefixes() []string SetDecorationPrefixes(val []string) GetStringStyle() composition.CompositionStringStyle SetStringStyle(val composition.CompositionStringStyle) - GetBase() scopejsiicalclib.NumericValue - SetBase(val scopejsiicalclib.NumericValue) - GetPow() scopejsiicalclib.NumericValue - SetPow(val scopejsiicalclib.NumericValue) - TypeName() jsii.Any + GetBase() scopejsiicalclib.NumericValueIface + GetPow() scopejsiicalclib.NumericValueIface + TypeName() interface{} ToString() string } @@ -6691,149 +10363,224 @@ type PowerIface interface { // Struct proxy type Power struct { // (deprecated) The value. - Value float64 + Value float64 \`json:"value"\` // The expression that this operation consists of. - // + // // Must be implemented by derived classes. - Expression scopejsiicalclib.NumericValue + Expression scopejsiicalclib.NumericValueIface \`json:"expression"\` // A set of postfixes to include in a decorated .toString(). - DecorationPostfixes []string + DecorationPostfixes []string \`json:"decorationPostfixes"\` // A set of prefixes to include in a decorated .toString(). - DecorationPrefixes []string + DecorationPrefixes []string \`json:"decorationPrefixes"\` // The .toString() style. - StringStyle composition.CompositionStringStyle + StringStyle composition.CompositionStringStyle \`json:"stringStyle"\` // The base of the power. - Base scopejsiicalclib.NumericValue + Base scopejsiicalclib.NumericValueIface \`json:"base"\` // The number of times to multiply. - Pow scopejsiicalclib.NumericValue + Pow scopejsiicalclib.NumericValueIface \`json:"pow"\` } func (p *Power) GetValue() float64 { - return p.Value -} - -func (p *Power) GetExpression() scopejsiicalclib.NumericValue { - return p.Expression + var returns float64 + _jsii_.Get( + p, + "value", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (p *Power) GetExpression() scopejsiicalclib.NumericValueIface { + var returns scopejsiicalclib.NumericValueIface + _jsii_.Get( + p, + "expression", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*scopejsiicalclib.NumericValueIface)(nil)).Elem(): reflect.TypeOf((*scopejsiicalclib.NumericValue)(nil)).Elem(), + }, + ) + return returns } func (p *Power) GetDecorationPostfixes() []string { - return p.DecorationPostfixes + var returns []string + _jsii_.Get( + p, + "decorationPostfixes", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*string)(nil)).Elem(): reflect.TypeOf((*string)(nil)).Elem(), + }, + ) + return returns } func (p *Power) GetDecorationPrefixes() []string { - return p.DecorationPrefixes + var returns []string + _jsii_.Get( + p, + "decorationPrefixes", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*string)(nil)).Elem(): reflect.TypeOf((*string)(nil)).Elem(), + }, + ) + return returns } func (p *Power) GetStringStyle() composition.CompositionStringStyle { - return p.StringStyle -} - -func (p *Power) GetBase() scopejsiicalclib.NumericValue { - return p.Base -} - -func (p *Power) GetPow() scopejsiicalclib.NumericValue { - return p.Pow + var returns composition.CompositionStringStyle + _jsii_.Get( + p, + "stringStyle", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*composition.CompositionStringStyle)(nil)).Elem(): reflect.TypeOf((*composition.CompositionStringStyle)(nil)).Elem(), + }, + ) + return returns +} + +func (p *Power) GetBase() scopejsiicalclib.NumericValueIface { + var returns scopejsiicalclib.NumericValueIface + _jsii_.Get( + p, + "base", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*scopejsiicalclib.NumericValueIface)(nil)).Elem(): reflect.TypeOf((*scopejsiicalclib.NumericValue)(nil)).Elem(), + }, + ) + return returns +} + +func (p *Power) GetPow() scopejsiicalclib.NumericValueIface { + var returns scopejsiicalclib.NumericValueIface + _jsii_.Get( + p, + "pow", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*scopejsiicalclib.NumericValueIface)(nil)).Elem(): reflect.TypeOf((*scopejsiicalclib.NumericValue)(nil)).Elem(), + }, + ) + return returns } // Creates a Power operation. -func NewPower(base scopejsiicalclib.NumericValue, pow scopejsiicalclib.NumericValue) PowerIface { +func NewPower(base scopejsiicalclib.NumericValueIface, pow scopejsiicalclib.NumericValueIface) PowerIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Power", - Method: "Constructor", - Args: []string{"@scope/jsii-calc-lib.NumericValue", "@scope/jsii-calc-lib.NumericValue",}, - }) - return &Power{} -} - -func (p *Power) SetValue(val float64) { - p.Value = val -} - -func (p *Power) SetExpression(val scopejsiicalclib.NumericValue) { - p.Expression = val + self := Power{} + _jsii_.Create( + "jsii-calc.Power", + []interface{}{base, pow}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (p *Power) SetDecorationPostfixes(val []string) { - p.DecorationPostfixes = val + _jsii_.Set( + p, + "decorationPostfixes", + val, + ) } func (p *Power) SetDecorationPrefixes(val []string) { - p.DecorationPrefixes = val + _jsii_.Set( + p, + "decorationPrefixes", + val, + ) } func (p *Power) SetStringStyle(val composition.CompositionStringStyle) { - p.StringStyle = val -} - -func (p *Power) SetBase(val scopejsiicalclib.NumericValue) { - p.Base = val -} - -func (p *Power) SetPow(val scopejsiicalclib.NumericValue) { - p.Pow = val -} - -func (p *Power) TypeName() jsii.Any { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Power", - Method: "TypeName", - Args: []string{}, - }) - return nil + _jsii_.Set( + p, + "stringStyle", + val, + ) +} + +func (p *Power) TypeName() interface{} { + var returns interface{} + _jsii_.Invoke( + p, + "typeName", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (p *Power) ToString() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Power", - Method: "ToString", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + p, + "toString", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type PropertyNamedPropertyIface interface { GetProperty() string - SetProperty(val string) GetYetAnoterOne() bool - SetYetAnoterOne(val bool) } // Reproduction for https://github.com/aws/jsii/issues/1113 Where a method or property named "property" would result in impossible to load Python code. // Struct proxy type PropertyNamedProperty struct { - Property string - YetAnoterOne bool + Property string \`json:"property"\` + YetAnoterOne bool \`json:"yetAnoterOne"\` } func (p *PropertyNamedProperty) GetProperty() string { - return p.Property + var returns string + _jsii_.Get( + p, + "property", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (p *PropertyNamedProperty) GetYetAnoterOne() bool { - return p.YetAnoterOne + var returns bool + _jsii_.Get( + p, + "yetAnoterOne", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewPropertyNamedProperty() PropertyNamedPropertyIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PropertyNamedProperty", - Method: "Constructor", - Args: []string{}, - }) - return &PropertyNamedProperty{} -} - -func (p *PropertyNamedProperty) SetProperty(val string) { - p.Property = val -} - -func (p *PropertyNamedProperty) SetYetAnoterOne(val bool) { - p.YetAnoterOne = val + self := PropertyNamedProperty{} + _jsii_.Create( + "jsii-calc.PropertyNamedProperty", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } // Class interface @@ -6847,20 +10594,27 @@ type PublicClass struct { func NewPublicClass() PublicClassIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PublicClass", - Method: "Constructor", - Args: []string{}, - }) - return &PublicClass{} + self := PublicClass{} + _jsii_.Create( + "jsii-calc.PublicClass", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (p *PublicClass) Hello() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PublicClass", - Method: "Hello", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + p, + "hello", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } // Class interface @@ -6905,268 +10659,399 @@ type PythonReservedWords struct { func NewPythonReservedWords() PythonReservedWordsIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PythonReservedWords", - Method: "Constructor", - Args: []string{}, - }) - return &PythonReservedWords{} + self := PythonReservedWords{} + _jsii_.Create( + "jsii-calc.PythonReservedWords", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (p *PythonReservedWords) And() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PythonReservedWords", - Method: "And", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + p, + "and", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (p *PythonReservedWords) As() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PythonReservedWords", - Method: "As", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + p, + "as", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (p *PythonReservedWords) Assert() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PythonReservedWords", - Method: "Assert", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + p, + "assert", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (p *PythonReservedWords) Async() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PythonReservedWords", - Method: "Async", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + p, + "async", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (p *PythonReservedWords) Await() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PythonReservedWords", - Method: "Await", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + p, + "await", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (p *PythonReservedWords) Break() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PythonReservedWords", - Method: "Break", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + p, + "break", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (p *PythonReservedWords) Class() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PythonReservedWords", - Method: "Class", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + p, + "class", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (p *PythonReservedWords) Continue() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PythonReservedWords", - Method: "Continue", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + p, + "continue", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (p *PythonReservedWords) Def() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PythonReservedWords", - Method: "Def", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + p, + "def", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (p *PythonReservedWords) Del() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PythonReservedWords", - Method: "Del", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + p, + "del", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (p *PythonReservedWords) Elif() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PythonReservedWords", - Method: "Elif", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + p, + "elif", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (p *PythonReservedWords) Else() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PythonReservedWords", - Method: "Else", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + p, + "else", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (p *PythonReservedWords) Except() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PythonReservedWords", - Method: "Except", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + p, + "except", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (p *PythonReservedWords) Finally() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PythonReservedWords", - Method: "Finally", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + p, + "finally", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (p *PythonReservedWords) For() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PythonReservedWords", - Method: "For", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + p, + "for", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (p *PythonReservedWords) From() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PythonReservedWords", - Method: "From", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + p, + "from", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (p *PythonReservedWords) Global() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PythonReservedWords", - Method: "Global", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + p, + "global", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (p *PythonReservedWords) If() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PythonReservedWords", - Method: "If", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + p, + "if", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (p *PythonReservedWords) Import() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PythonReservedWords", - Method: "Import", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + p, + "import", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (p *PythonReservedWords) In() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PythonReservedWords", - Method: "In", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + p, + "in", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (p *PythonReservedWords) Is() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PythonReservedWords", - Method: "Is", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + p, + "is", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (p *PythonReservedWords) Lambda() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PythonReservedWords", - Method: "Lambda", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + p, + "lambda", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (p *PythonReservedWords) Nonlocal() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PythonReservedWords", - Method: "Nonlocal", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + p, + "nonlocal", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (p *PythonReservedWords) Not() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PythonReservedWords", - Method: "Not", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + p, + "not", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (p *PythonReservedWords) Or() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PythonReservedWords", - Method: "Or", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + p, + "or", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (p *PythonReservedWords) Pass() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PythonReservedWords", - Method: "Pass", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + p, + "pass", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (p *PythonReservedWords) Raise() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PythonReservedWords", - Method: "Raise", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + p, + "raise", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (p *PythonReservedWords) Return() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PythonReservedWords", - Method: "Return", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + p, + "return", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (p *PythonReservedWords) Try() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PythonReservedWords", - Method: "Try", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + p, + "try", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (p *PythonReservedWords) While() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PythonReservedWords", - Method: "While", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + p, + "while", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (p *PythonReservedWords) With() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PythonReservedWords", - Method: "With", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + p, + "with", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (p *PythonReservedWords) Yield() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "PythonReservedWords", - Method: "Yield", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + p, + "yield", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } // Class interface @@ -7180,49 +11065,74 @@ type ReferenceEnumFromScopedPackageIface interface { // See awslabs/jsii#138. // Struct proxy type ReferenceEnumFromScopedPackage struct { - Foo scopejsiicalclib.EnumFromScopedModule + Foo scopejsiicalclib.EnumFromScopedModule \`json:"foo"\` } func (r *ReferenceEnumFromScopedPackage) GetFoo() scopejsiicalclib.EnumFromScopedModule { - return r.Foo + var returns scopejsiicalclib.EnumFromScopedModule + _jsii_.Get( + r, + "foo", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*scopejsiicalclib.EnumFromScopedModule)(nil)).Elem(): reflect.TypeOf((*scopejsiicalclib.EnumFromScopedModule)(nil)).Elem(), + }, + ) + return returns } func NewReferenceEnumFromScopedPackage() ReferenceEnumFromScopedPackageIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ReferenceEnumFromScopedPackage", - Method: "Constructor", - Args: []string{}, - }) - return &ReferenceEnumFromScopedPackage{} + self := ReferenceEnumFromScopedPackage{} + _jsii_.Create( + "jsii-calc.ReferenceEnumFromScopedPackage", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (r *ReferenceEnumFromScopedPackage) SetFoo(val scopejsiicalclib.EnumFromScopedModule) { - r.Foo = val + _jsii_.Set( + r, + "foo", + val, + ) } func (r *ReferenceEnumFromScopedPackage) LoadFoo() scopejsiicalclib.EnumFromScopedModule { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ReferenceEnumFromScopedPackage", - Method: "LoadFoo", - Args: []string{}, - }) - return "ENUM_DUMMY" + var returns scopejsiicalclib.EnumFromScopedModule + _jsii_.Invoke( + r, + "loadFoo", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*scopejsiicalclib.EnumFromScopedModule)(nil)).Elem(): reflect.TypeOf((*scopejsiicalclib.EnumFromScopedModule)(nil)).Elem(), + }, + ) + return returns } func (r *ReferenceEnumFromScopedPackage) SaveFoo(value scopejsiicalclib.EnumFromScopedModule) { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ReferenceEnumFromScopedPackage", - Method: "SaveFoo", - Args: []string{"@scope/jsii-calc-lib.EnumFromScopedModule",}, - }) + var returns interface{} + _jsii_.Invoke( + r, + "saveFoo", + []interface{}{value}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } // Class interface type ReturnsPrivateImplementationOfInterfaceIface interface { - GetPrivateImplementation() IPrivatelyImplemented - SetPrivateImplementation(val IPrivatelyImplemented) + GetPrivateImplementation() IPrivatelyImplementedIface } // Helps ensure the JSII kernel & runtime cooperate correctly when an un-exported instance of a class is returned with a declared type that is an exported interface, and the instance inherits from an exported class. @@ -7232,51 +11142,75 @@ type ReturnsPrivateImplementationOfInterfaceIface interface { // // Struct proxy type ReturnsPrivateImplementationOfInterface struct { - PrivateImplementation IPrivatelyImplemented + PrivateImplementation IPrivatelyImplementedIface \`json:"privateImplementation"\` } -func (r *ReturnsPrivateImplementationOfInterface) GetPrivateImplementation() IPrivatelyImplemented { - return r.PrivateImplementation +func (r *ReturnsPrivateImplementationOfInterface) GetPrivateImplementation() IPrivatelyImplementedIface { + var returns IPrivatelyImplementedIface + _jsii_.Get( + r, + "privateImplementation", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*IPrivatelyImplementedIface)(nil)).Elem(): reflect.TypeOf((*IPrivatelyImplemented)(nil)).Elem(), + }, + ) + return returns } func NewReturnsPrivateImplementationOfInterface() ReturnsPrivateImplementationOfInterfaceIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ReturnsPrivateImplementationOfInterface", - Method: "Constructor", - Args: []string{}, - }) - return &ReturnsPrivateImplementationOfInterface{} -} - -func (r *ReturnsPrivateImplementationOfInterface) SetPrivateImplementation(val IPrivatelyImplemented) { - r.PrivateImplementation = val + self := ReturnsPrivateImplementationOfInterface{} + _jsii_.Create( + "jsii-calc.ReturnsPrivateImplementationOfInterface", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } // RootStructIface is the public interface for the custom type RootStruct type RootStructIface interface { GetStringProp() string - GetNestedStruct() NestedStruct + GetNestedStruct() NestedStructIface } // This is here to check that we can pass a nested struct into a kwargs by specifying it as an in-line dictionary. -// +// // This is cheating with the (current) declared types, but this is the "more // idiomatic" way for Pythonists. // Struct proxy type RootStruct struct { // May not be empty. - StringProp string - NestedStruct NestedStruct + StringProp string \`json:"stringProp"\` + NestedStruct NestedStructIface \`json:"nestedStruct"\` } func (r *RootStruct) GetStringProp() string { - return r.StringProp + var returns string + _jsii_.Get( + r, + "stringProp", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } -func (r *RootStruct) GetNestedStruct() NestedStruct { - return r.NestedStruct +func (r *RootStruct) GetNestedStruct() NestedStructIface { + var returns NestedStructIface + _jsii_.Get( + r, + "nestedStruct", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*NestedStructIface)(nil)).Elem(): reflect.TypeOf((*NestedStruct)(nil)).Elem(), + }, + ) + return returns } @@ -7288,19 +11222,23 @@ type RootStructValidatorIface interface { type RootStructValidator struct { } -func RootStructValidator_Validate(struct_ RootStruct) { +func RootStructValidator_Validate(struct_ RootStructIface) { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "RootStructValidator", - Method: "Validate", - Args: []string{"jsii-calc.RootStruct",}, - }) + var returns interface{} + _jsii_.InvokeStatic( + "jsii-calc.RootStructValidator", + "validate", + []interface{}{struct_}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } // Class interface type RuntimeTypeCheckingIface interface { MethodWithDefaultedArguments(arg1 float64, arg2 string, arg3 string) - MethodWithOptionalAnyArgument(arg jsii.Any) + MethodWithOptionalAnyArgument(arg interface{}) MethodWithOptionalArguments(arg1 float64, arg2 string, arg3 string) } @@ -7309,37 +11247,52 @@ type RuntimeTypeChecking struct { } func NewRuntimeTypeChecking() RuntimeTypeCheckingIface { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "RuntimeTypeChecking", - Method: "Constructor", - Args: []string{}, - }) - return &RuntimeTypeChecking{} -} - -func (r *RuntimeTypeChecking) MethodWithDefaultedArguments(arg1 float64, arg2 string, arg3 string) { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "RuntimeTypeChecking", - Method: "MethodWithDefaultedArguments", - Args: []string{"number", "string", "date",}, - }) + _init_.Initialize() + self := RuntimeTypeChecking{} + _jsii_.Create( + "jsii-calc.RuntimeTypeChecking", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } -func (r *RuntimeTypeChecking) MethodWithOptionalAnyArgument(arg jsii.Any) { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "RuntimeTypeChecking", - Method: "MethodWithOptionalAnyArgument", - Args: []string{"any",}, - }) +func (r *RuntimeTypeChecking) MethodWithDefaultedArguments(arg1 float64, arg2 string, arg3 string) { + var returns interface{} + _jsii_.Invoke( + r, + "methodWithDefaultedArguments", + []interface{}{arg1, arg2, arg3}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) +} + +func (r *RuntimeTypeChecking) MethodWithOptionalAnyArgument(arg interface{}) { + var returns interface{} + _jsii_.Invoke( + r, + "methodWithOptionalAnyArgument", + []interface{}{arg}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (r *RuntimeTypeChecking) MethodWithOptionalArguments(arg1 float64, arg2 string, arg3 string) { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "RuntimeTypeChecking", - Method: "MethodWithOptionalArguments", - Args: []string{"number", "string", "date",}, - }) + var returns interface{} + _jsii_.Invoke( + r, + "methodWithOptionalArguments", + []interface{}{arg1, arg2, arg3}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } // SecondLevelStructIface is the public interface for the custom type SecondLevelStruct @@ -7351,28 +11304,42 @@ type SecondLevelStructIface interface { // Struct proxy type SecondLevelStruct struct { // It's long and required. - DeeperRequiredProp string + DeeperRequiredProp string \`json:"deeperRequiredProp"\` // It's long, but you'll almost never pass it. - DeeperOptionalProp string + DeeperOptionalProp string \`json:"deeperOptionalProp"\` } func (s *SecondLevelStruct) GetDeeperRequiredProp() string { - return s.DeeperRequiredProp + var returns string + _jsii_.Get( + s, + "deeperRequiredProp", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (s *SecondLevelStruct) GetDeeperOptionalProp() string { - return s.DeeperOptionalProp + var returns string + _jsii_.Get( + s, + "deeperOptionalProp", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type SingleInstanceTwoTypesIface interface { - Interface1() InbetweenClass - Interface2() IPublicInterface + Interface1() InbetweenClassIface + Interface2() IPublicInterfaceIface } // Test that a single instance can be returned under two different FQNs. -// +// // JSII clients can instantiate 2 different strongly-typed wrappers for the same // object. Unfortunately, this will break object equality, but if we didn't do // this it would break runtime type checks in the JVM or CLR. @@ -7382,30 +11349,45 @@ type SingleInstanceTwoTypes struct { func NewSingleInstanceTwoTypes() SingleInstanceTwoTypesIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "SingleInstanceTwoTypes", - Method: "Constructor", - Args: []string{}, - }) - return &SingleInstanceTwoTypes{} -} - -func (s *SingleInstanceTwoTypes) Interface1() InbetweenClass { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "SingleInstanceTwoTypes", - Method: "Interface1", - Args: []string{}, - }) - return InbetweenClass{} -} - -func (s *SingleInstanceTwoTypes) Interface2() IPublicInterface { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "SingleInstanceTwoTypes", - Method: "Interface2", - Args: []string{}, - }) - return nil + self := SingleInstanceTwoTypes{} + _jsii_.Create( + "jsii-calc.SingleInstanceTwoTypes", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self +} + +func (s *SingleInstanceTwoTypes) Interface1() InbetweenClassIface { + var returns InbetweenClassIface + _jsii_.Invoke( + s, + "interface1", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*InbetweenClassIface)(nil)).Elem(): reflect.TypeOf((*InbetweenClass)(nil)).Elem(), + }, + ) + return returns +} + +func (s *SingleInstanceTwoTypes) Interface2() IPublicInterfaceIface { + var returns IPublicInterfaceIface + _jsii_.Invoke( + s, + "interface2", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*IPublicInterfaceIface)(nil)).Elem(): reflect.TypeOf((*IPublicInterface)(nil)).Elem(), + }, + ) + return returns } // Class interface @@ -7414,19 +11396,23 @@ type SingletonIntIface interface { } // Verifies that singleton enums are handled correctly. -// +// // https://github.com/aws/jsii/issues/231 // Struct proxy type SingletonInt struct { } func (s *SingletonInt) IsSingletonInt(value float64) bool { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "SingletonInt", - Method: "IsSingletonInt", - Args: []string{"number",}, - }) - return true + var returns bool + _jsii_.Invoke( + s, + "isSingletonInt", + []interface{}{value}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // A singleton integer. @@ -7442,19 +11428,23 @@ type SingletonStringIface interface { } // Verifies that singleton enums are handled correctly. -// +// // https://github.com/aws/jsii/issues/231 // Struct proxy type SingletonString struct { } func (s *SingletonString) IsSingletonString(value string) bool { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "SingletonString", - Method: "IsSingletonString", - Args: []string{"string",}, - }) - return true + var returns bool + _jsii_.Invoke( + s, + "isSingletonString", + []interface{}{value}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // A singleton string. @@ -7472,16 +11462,30 @@ type SmellyStructIface interface { // Struct proxy type SmellyStruct struct { - Property string - YetAnoterOne bool + Property string \`json:"property"\` + YetAnoterOne bool \`json:"yetAnoterOne"\` } func (s *SmellyStruct) GetProperty() string { - return s.Property + var returns string + _jsii_.Get( + s, + "property", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (s *SmellyStruct) GetYetAnoterOne() bool { - return s.YetAnoterOne + var returns bool + _jsii_.Get( + s, + "yetAnoterOne", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } @@ -7495,38 +11499,50 @@ type SomeTypeJsii976 struct { func NewSomeTypeJsii976() SomeTypeJsii976Iface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "SomeTypeJsii976", - Method: "Constructor", - Args: []string{}, - }) - return &SomeTypeJsii976{} + self := SomeTypeJsii976{} + _jsii_.Create( + "jsii-calc.SomeTypeJsii976", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } -func SomeTypeJsii976_ReturnAnonymous() jsii.Any { +func SomeTypeJsii976_ReturnAnonymous() interface{} { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "SomeTypeJsii976", - Method: "ReturnAnonymous", - Args: []string{}, - }) - return nil + var returns interface{} + _jsii_.InvokeStatic( + "jsii-calc.SomeTypeJsii976", + "returnAnonymous", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } -func SomeTypeJsii976_ReturnReturn() IReturnJsii976 { +func SomeTypeJsii976_ReturnReturn() IReturnJsii976Iface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "SomeTypeJsii976", - Method: "ReturnReturn", - Args: []string{}, - }) - return nil + var returns IReturnJsii976Iface + _jsii_.InvokeStatic( + "jsii-calc.SomeTypeJsii976", + "returnReturn", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*IReturnJsii976Iface)(nil)).Elem(): reflect.TypeOf((*IReturnJsii976)(nil)).Elem(), + }, + ) + return returns } // Class interface type StableClassIface interface { GetReadonlyProperty() string - SetReadonlyProperty(val string) GetMutableProperty() float64 SetMutableProperty(val float64) Method() @@ -7534,43 +11550,64 @@ type StableClassIface interface { // Struct proxy type StableClass struct { - ReadonlyProperty string - MutableProperty float64 + ReadonlyProperty string \`json:"readonlyProperty"\` + MutableProperty float64 \`json:"mutableProperty"\` } func (s *StableClass) GetReadonlyProperty() string { - return s.ReadonlyProperty + var returns string + _jsii_.Get( + s, + "readonlyProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (s *StableClass) GetMutableProperty() float64 { - return s.MutableProperty + var returns float64 + _jsii_.Get( + s, + "mutableProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewStableClass(readonlyString string, mutableNumber float64) StableClassIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "StableClass", - Method: "Constructor", - Args: []string{"string", "number",}, - }) - return &StableClass{} -} - -func (s *StableClass) SetReadonlyProperty(val string) { - s.ReadonlyProperty = val + self := StableClass{} + _jsii_.Create( + "jsii-calc.StableClass", + []interface{}{readonlyString, mutableNumber}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (s *StableClass) SetMutableProperty(val float64) { - s.MutableProperty = val + _jsii_.Set( + s, + "mutableProperty", + val, + ) } func (s *StableClass) Method() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "StableClass", - Method: "Method", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + s, + "method", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } type StableEnum string @@ -7587,181 +11624,308 @@ type StableStructIface interface { // Struct proxy type StableStruct struct { - ReadonlyProperty string + ReadonlyProperty string \`json:"readonlyProperty"\` } func (s *StableStruct) GetReadonlyProperty() string { - return s.ReadonlyProperty + var returns string + _jsii_.Get( + s, + "readonlyProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type StaticContextIface interface { - GetStaticVariable() bool - SetStaticVariable(val bool) } // This is used to validate the ability to use \`this\` from within a static context. -// +// // https://github.com/awslabs/aws-cdk/issues/2304 // Struct proxy type StaticContext struct { - StaticVariable bool } -func (s *StaticContext) GetStaticVariable() bool { +func StaticContext_CanAccessStaticContext() bool { _init_.Initialize() - return s.StaticVariable + var returns bool + _jsii_.InvokeStatic( + "jsii-calc.StaticContext", + "canAccessStaticContext", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } - -func (s *StaticContext) SetStaticVariable(val bool) { +func StaticContext_StaticVariable() bool { _init_.Initialize() - s.StaticVariable = val + var returns bool + _jsii_.StaticGet( + "jsii-calc.StaticContext", + "staticVariable", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } -func StaticContext_CanAccessStaticContext() bool { +func StaticContext_SetStaticVariable(val bool) { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "StaticContext", - Method: "CanAccessStaticContext", - Args: []string{}, - }) - return true + _jsii_.StaticSet( + "jsii-calc.StaticContext", + "staticVariable", + val, + ) } // Class interface -type StaticsIface interface { - GetBar() float64 - SetBar(val float64) - GetConstObj() DoubleTrouble - SetConstObj(val DoubleTrouble) - GetFoo() string - SetFoo(val string) - GetZooBar() map[string]string - SetZooBar(val map[string]string) - GetInstance() Statics - SetInstance(val Statics) - GetNonConstStatic() float64 - SetNonConstStatic(val float64) - GetValue() string - SetValue(val string) - JustMethod() string +type StaticHelloChildIface interface { } // Struct proxy -type Statics struct { - // Constants may also use all-caps. - Bar float64 - ConstObj DoubleTrouble - // Jsdocs for static property. - Foo string - // Constants can also use camelCase. - ZooBar map[string]string - // Jsdocs for static getter. - // - // Jsdocs for static setter. - Instance *Statics - NonConstStatic float64 - Value string +type StaticHelloChild struct { } -func (s *Statics) GetBar() float64 { +func StaticHelloChild_Method() { _init_.Initialize() - return s.Bar + var returns interface{} + _jsii_.InvokeStatic( + "jsii-calc.StaticHelloChild", + "method", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } -func (s *Statics) GetConstObj() DoubleTrouble { +func StaticHelloChild_Property() float64 { _init_.Initialize() - return s.ConstObj + var returns float64 + _jsii_.StaticGet( + "jsii-calc.StaticHelloChild", + "property", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } -func (s *Statics) GetFoo() string { - _init_.Initialize() - return s.Foo +// Class interface +type StaticHelloParentIface interface { +} + +// Static methods that override parent class are technically overrides (the inheritance of statics is part of the ES6 specification), but certain other languages such as Java do not carry statics in the inheritance chain at all, so they cannot be overridden, only hidden. +// +// The difference is fairly minor (for typical use-cases, the end result is the +// same), however this has implications on what the generated code should look +// like. +// Struct proxy +type StaticHelloParent struct { } -func (s *Statics) GetZooBar() map[string]string { +func NewStaticHelloParent() StaticHelloParentIface { _init_.Initialize() - return s.ZooBar + self := StaticHelloParent{} + _jsii_.Create( + "jsii-calc.StaticHelloParent", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } -func (s *Statics) GetInstance() Statics { +func StaticHelloParent_Method() { _init_.Initialize() - return *s.Instance + var returns interface{} + _jsii_.InvokeStatic( + "jsii-calc.StaticHelloParent", + "method", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } -func (s *Statics) GetNonConstStatic() float64 { +func StaticHelloParent_Property() float64 { _init_.Initialize() - return s.NonConstStatic + var returns float64 + _jsii_.StaticGet( + "jsii-calc.StaticHelloParent", + "property", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +// Class interface +type StaticsIface interface { + GetValue() string + JustMethod() string +} + +// Struct proxy +type Statics struct { + Value string \`json:"value"\` } func (s *Statics) GetValue() string { - return s.Value + var returns string + _jsii_.Get( + s, + "value", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewStatics(value string) StaticsIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Statics", - Method: "Constructor", - Args: []string{"string",}, - }) - return &Statics{} + self := Statics{} + _jsii_.Create( + "jsii-calc.Statics", + []interface{}{value}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } -func (s *Statics) SetBar(val float64) { +func Statics_StaticMethod(name string) string { _init_.Initialize() - s.Bar = val + var returns string + _jsii_.InvokeStatic( + "jsii-calc.Statics", + "staticMethod", + []interface{}{name}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } -func (s *Statics) SetConstObj(val DoubleTrouble) { +func Statics_Bar() float64 { _init_.Initialize() - s.ConstObj = val + var returns float64 + _jsii_.StaticGet( + "jsii-calc.Statics", + "BAR", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } -func (s *Statics) SetFoo(val string) { +func Statics_ConstObj() DoubleTroubleIface { _init_.Initialize() - s.Foo = val + var returns DoubleTroubleIface + _jsii_.StaticGet( + "jsii-calc.Statics", + "ConstObj", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*DoubleTroubleIface)(nil)).Elem(): reflect.TypeOf((*DoubleTrouble)(nil)).Elem(), + }, + ) + return returns } -func (s *Statics) SetZooBar(val map[string]string) { +func Statics_Foo() string { _init_.Initialize() - s.ZooBar = val + var returns string + _jsii_.StaticGet( + "jsii-calc.Statics", + "Foo", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } -func (s *Statics) SetInstance(val Statics) { +func Statics_ZooBar() map[string]string { _init_.Initialize() - s.Instance = &val + var returns map[string]string + _jsii_.StaticGet( + "jsii-calc.Statics", + "zooBar", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*string)(nil)).Elem(): reflect.TypeOf((*string)(nil)).Elem(), + }, + ) + return returns } -func (s *Statics) SetNonConstStatic(val float64) { +func Statics_Instance() StaticsIface { _init_.Initialize() - s.NonConstStatic = val + var returns StaticsIface + _jsii_.StaticGet( + "jsii-calc.Statics", + "instance", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*StaticsIface)(nil)).Elem(): reflect.TypeOf((*Statics)(nil)).Elem(), + }, + ) + return returns } -func (s *Statics) SetValue(val string) { - s.Value = val +func Statics_SetInstance(val StaticsIface) { + _init_.Initialize() + _jsii_.StaticSet( + "jsii-calc.Statics", + "instance", + val, + ) } -func Statics_StaticMethod(name string) string { +func Statics_NonConstStatic() float64 { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Statics", - Method: "StaticMethod", - Args: []string{"string",}, - }) - return "NOOP_RETURN_STRING" + var returns float64 + _jsii_.StaticGet( + "jsii-calc.Statics", + "nonConstStatic", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func Statics_SetNonConstStatic(val float64) { + _init_.Initialize() + _jsii_.StaticSet( + "jsii-calc.Statics", + "nonConstStatic", + val, + ) } func (s *Statics) JustMethod() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Statics", - Method: "JustMethod", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + s, + "justMethod", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } type StringEnum string @@ -7780,26 +11944,40 @@ type StripInternalIface interface { // Struct proxy type StripInternal struct { - YouSeeMe string + YouSeeMe string \`json:"youSeeMe"\` } func (s *StripInternal) GetYouSeeMe() string { - return s.YouSeeMe + var returns string + _jsii_.Get( + s, + "youSeeMe", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewStripInternal() StripInternalIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "StripInternal", - Method: "Constructor", - Args: []string{}, - }) - return &StripInternal{} + self := StripInternal{} + _jsii_.Create( + "jsii-calc.StripInternal", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (s *StripInternal) SetYouSeeMe(val string) { - s.YouSeeMe = val + _jsii_.Set( + s, + "youSeeMe", + val, + ) } // StructAIface is the public interface for the custom type StructA @@ -7812,21 +11990,42 @@ type StructAIface interface { // We can serialize and deserialize structs without silently ignoring optional fields. // Struct proxy type StructA struct { - RequiredString string - OptionalNumber float64 - OptionalString string + RequiredString string \`json:"requiredString"\` + OptionalNumber float64 \`json:"optionalNumber"\` + OptionalString string \`json:"optionalString"\` } func (s *StructA) GetRequiredString() string { - return s.RequiredString + var returns string + _jsii_.Get( + s, + "requiredString", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (s *StructA) GetOptionalNumber() float64 { - return s.OptionalNumber + var returns float64 + _jsii_.Get( + s, + "optionalNumber", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (s *StructA) GetOptionalString() string { - return s.OptionalString + var returns string + _jsii_.Get( + s, + "optionalString", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } @@ -7834,27 +12033,50 @@ func (s *StructA) GetOptionalString() string { type StructBIface interface { GetRequiredString() string GetOptionalBoolean() bool - GetOptionalStructA() StructA + GetOptionalStructA() StructAIface } // This intentionally overlaps with StructA (where only requiredString is provided) to test htat the kernel properly disambiguates those. // Struct proxy type StructB struct { - RequiredString string - OptionalBoolean bool - OptionalStructA StructA + RequiredString string \`json:"requiredString"\` + OptionalBoolean bool \`json:"optionalBoolean"\` + OptionalStructA StructAIface \`json:"optionalStructA"\` } func (s *StructB) GetRequiredString() string { - return s.RequiredString + var returns string + _jsii_.Get( + s, + "requiredString", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (s *StructB) GetOptionalBoolean() bool { - return s.OptionalBoolean -} - -func (s *StructB) GetOptionalStructA() StructA { - return s.OptionalStructA + var returns bool + _jsii_.Get( + s, + "optionalBoolean", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (s *StructB) GetOptionalStructA() StructAIface { + var returns StructAIface + _jsii_.Get( + s, + "optionalStructA", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*StructAIface)(nil)).Elem(): reflect.TypeOf((*StructA)(nil)).Elem(), + }, + ) + return returns } @@ -7865,20 +12087,34 @@ type StructParameterTypeIface interface { } // 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 // Struct proxy type StructParameterType struct { - Scope string - Props bool + Scope string \`json:"scope"\` + Props bool \`json:"props"\` } func (s *StructParameterType) GetScope() string { - return s.Scope + var returns string + _jsii_.Get( + s, + "scope", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (s *StructParameterType) GetProps() bool { - return s.Props + var returns bool + _jsii_.Get( + s, + "props", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } @@ -7893,32 +12129,45 @@ type StructPassing struct { func NewStructPassing() StructPassingIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "StructPassing", - Method: "Constructor", - Args: []string{}, - }) - return &StructPassing{} + self := StructPassing{} + _jsii_.Create( + "jsii-calc.StructPassing", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } -func StructPassing_HowManyVarArgsDidIPass(_positional float64, inputs TopLevelStruct) float64 { +func StructPassing_HowManyVarArgsDidIPass(_positional float64, inputs TopLevelStructIface) float64 { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "StructPassing", - Method: "HowManyVarArgsDidIPass", - Args: []string{"number", "jsii-calc.TopLevelStruct",}, - }) - return 0.0 + var returns float64 + _jsii_.InvokeStatic( + "jsii-calc.StructPassing", + "howManyVarArgsDidIPass", + []interface{}{_positional, inputs}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } -func StructPassing_RoundTrip(_positional float64, input TopLevelStruct) TopLevelStruct { +func StructPassing_RoundTrip(_positional float64, input TopLevelStructIface) TopLevelStructIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "StructPassing", - Method: "RoundTrip", - Args: []string{"number", "jsii-calc.TopLevelStruct",}, - }) - return TopLevelStruct{} + var returns TopLevelStructIface + _jsii_.InvokeStatic( + "jsii-calc.StructPassing", + "roundTrip", + []interface{}{_positional, input}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*TopLevelStructIface)(nil)).Elem(): reflect.TypeOf((*TopLevelStruct)(nil)).Elem(), + }, + ) + return returns } // Class interface @@ -7929,24 +12178,32 @@ type StructUnionConsumerIface interface { type StructUnionConsumer struct { } -func StructUnionConsumer_IsStructA(struct_ jsii.Any) bool { +func StructUnionConsumer_IsStructA(struct_ interface{}) bool { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "StructUnionConsumer", - Method: "IsStructA", - Args: []string{"jsii-calc.StructA | jsii-calc.StructB",}, - }) - return true + var returns bool + _jsii_.InvokeStatic( + "jsii-calc.StructUnionConsumer", + "isStructA", + []interface{}{struct_}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } -func StructUnionConsumer_IsStructB(struct_ jsii.Any) bool { +func StructUnionConsumer_IsStructB(struct_ interface{}) bool { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "StructUnionConsumer", - Method: "IsStructB", - Args: []string{"jsii-calc.StructA | jsii-calc.StructB",}, - }) - return true + var returns bool + _jsii_.InvokeStatic( + "jsii-calc.StructUnionConsumer", + "isStructB", + []interface{}{struct_}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // StructWithJavaReservedWordsIface is the public interface for the custom type StructWithJavaReservedWords @@ -7959,44 +12216,70 @@ type StructWithJavaReservedWordsIface interface { // Struct proxy type StructWithJavaReservedWords struct { - Default string - Assert string - Result string - That string + Default string \`json:"default"\` + Assert string \`json:"assert"\` + Result string \`json:"result"\` + That string \`json:"that"\` } func (s *StructWithJavaReservedWords) GetDefault() string { - return s.Default + var returns string + _jsii_.Get( + s, + "default", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (s *StructWithJavaReservedWords) GetAssert() string { - return s.Assert + var returns string + _jsii_.Get( + s, + "assert", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (s *StructWithJavaReservedWords) GetResult() string { - return s.Result + var returns string + _jsii_.Get( + s, + "result", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (s *StructWithJavaReservedWords) GetThat() string { - return s.That + var returns string + _jsii_.Get( + s, + "that", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type SumIface interface { GetValue() float64 - SetValue(val float64) - GetExpression() scopejsiicalclib.NumericValue - SetExpression(val scopejsiicalclib.NumericValue) + GetExpression() scopejsiicalclib.NumericValueIface GetDecorationPostfixes() []string SetDecorationPostfixes(val []string) GetDecorationPrefixes() []string SetDecorationPrefixes(val []string) GetStringStyle() composition.CompositionStringStyle SetStringStyle(val composition.CompositionStringStyle) - GetParts() []scopejsiicalclib.NumericValue - SetParts(val []scopejsiicalclib.NumericValue) - TypeName() jsii.Any + GetParts() []scopejsiicalclib.NumericValueIface + SetParts(val []scopejsiicalclib.NumericValueIface) + TypeName() interface{} ToString() string } @@ -8004,160 +12287,244 @@ type SumIface interface { // Struct proxy type Sum struct { // (deprecated) The value. - Value float64 + Value float64 \`json:"value"\` // The expression that this operation consists of. - // + // // Must be implemented by derived classes. - Expression scopejsiicalclib.NumericValue + Expression scopejsiicalclib.NumericValueIface \`json:"expression"\` // A set of postfixes to include in a decorated .toString(). - DecorationPostfixes []string + DecorationPostfixes []string \`json:"decorationPostfixes"\` // A set of prefixes to include in a decorated .toString(). - DecorationPrefixes []string + DecorationPrefixes []string \`json:"decorationPrefixes"\` // The .toString() style. - StringStyle composition.CompositionStringStyle + StringStyle composition.CompositionStringStyle \`json:"stringStyle"\` // The parts to sum. - Parts []scopejsiicalclib.NumericValue + Parts []scopejsiicalclib.NumericValueIface \`json:"parts"\` } func (s *Sum) GetValue() float64 { - return s.Value -} - -func (s *Sum) GetExpression() scopejsiicalclib.NumericValue { - return s.Expression + var returns float64 + _jsii_.Get( + s, + "value", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (s *Sum) GetExpression() scopejsiicalclib.NumericValueIface { + var returns scopejsiicalclib.NumericValueIface + _jsii_.Get( + s, + "expression", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*scopejsiicalclib.NumericValueIface)(nil)).Elem(): reflect.TypeOf((*scopejsiicalclib.NumericValue)(nil)).Elem(), + }, + ) + return returns } func (s *Sum) GetDecorationPostfixes() []string { - return s.DecorationPostfixes + var returns []string + _jsii_.Get( + s, + "decorationPostfixes", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*string)(nil)).Elem(): reflect.TypeOf((*string)(nil)).Elem(), + }, + ) + return returns } func (s *Sum) GetDecorationPrefixes() []string { - return s.DecorationPrefixes + var returns []string + _jsii_.Get( + s, + "decorationPrefixes", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*string)(nil)).Elem(): reflect.TypeOf((*string)(nil)).Elem(), + }, + ) + return returns } func (s *Sum) GetStringStyle() composition.CompositionStringStyle { - return s.StringStyle -} - -func (s *Sum) GetParts() []scopejsiicalclib.NumericValue { - return s.Parts + var returns composition.CompositionStringStyle + _jsii_.Get( + s, + "stringStyle", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*composition.CompositionStringStyle)(nil)).Elem(): reflect.TypeOf((*composition.CompositionStringStyle)(nil)).Elem(), + }, + ) + return returns +} + +func (s *Sum) GetParts() []scopejsiicalclib.NumericValueIface { + var returns []scopejsiicalclib.NumericValueIface + _jsii_.Get( + s, + "parts", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*scopejsiicalclib.NumericValueIface)(nil)).Elem(): reflect.TypeOf((*scopejsiicalclib.NumericValue)(nil)).Elem(), + }, + ) + return returns } func NewSum() SumIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Sum", - Method: "Constructor", - Args: []string{}, - }) - return &Sum{} -} - -func (s *Sum) SetValue(val float64) { - s.Value = val -} - -func (s *Sum) SetExpression(val scopejsiicalclib.NumericValue) { - s.Expression = val + self := Sum{} + _jsii_.Create( + "jsii-calc.Sum", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (s *Sum) SetDecorationPostfixes(val []string) { - s.DecorationPostfixes = val + _jsii_.Set( + s, + "decorationPostfixes", + val, + ) } func (s *Sum) SetDecorationPrefixes(val []string) { - s.DecorationPrefixes = val + _jsii_.Set( + s, + "decorationPrefixes", + val, + ) } func (s *Sum) SetStringStyle(val composition.CompositionStringStyle) { - s.StringStyle = val -} - -func (s *Sum) SetParts(val []scopejsiicalclib.NumericValue) { - s.Parts = val -} - -func (s *Sum) TypeName() jsii.Any { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Sum", - Method: "TypeName", - Args: []string{}, - }) - return nil + _jsii_.Set( + s, + "stringStyle", + val, + ) +} + +func (s *Sum) SetParts(val []scopejsiicalclib.NumericValueIface) { + _jsii_.Set( + s, + "parts", + val, + ) +} + +func (s *Sum) TypeName() interface{} { + var returns interface{} + _jsii_.Invoke( + s, + "typeName", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (s *Sum) ToString() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Sum", - Method: "ToString", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + s, + "toString", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type SupportsNiceJavaBuilderIface interface { GetBar() float64 - SetBar(val float64) GetId() float64 - SetId(val float64) GetPropId() string - SetPropId(val string) GetRest() []string - SetRest(val []string) } // Struct proxy type SupportsNiceJavaBuilder struct { - Bar float64 + Bar float64 \`json:"bar"\` // some identifier. - Id float64 - PropId string - Rest []string + Id float64 \`json:"id"\` + PropId string \`json:"propId"\` + Rest []string \`json:"rest"\` } func (s *SupportsNiceJavaBuilder) GetBar() float64 { - return s.Bar + var returns float64 + _jsii_.Get( + s, + "bar", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (s *SupportsNiceJavaBuilder) GetId() float64 { - return s.Id + var returns float64 + _jsii_.Get( + s, + "id", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (s *SupportsNiceJavaBuilder) GetPropId() string { - return s.PropId + var returns string + _jsii_.Get( + s, + "propId", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (s *SupportsNiceJavaBuilder) GetRest() []string { - return s.Rest + var returns []string + _jsii_.Get( + s, + "rest", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*string)(nil)).Elem(): reflect.TypeOf((*string)(nil)).Elem(), + }, + ) + return returns } -func NewSupportsNiceJavaBuilder(id float64, defaultBar float64, props SupportsNiceJavaBuilderProps, rest string) SupportsNiceJavaBuilderIface { +func NewSupportsNiceJavaBuilder(id float64, defaultBar float64, props SupportsNiceJavaBuilderPropsIface, rest string) SupportsNiceJavaBuilderIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "SupportsNiceJavaBuilder", - Method: "Constructor", - Args: []string{"number", "number", "jsii-calc.SupportsNiceJavaBuilderProps", "string",}, - }) - return &SupportsNiceJavaBuilder{} -} - -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 + self := SupportsNiceJavaBuilder{} + _jsii_.Create( + "jsii-calc.SupportsNiceJavaBuilder", + []interface{}{id, defaultBar, props, rest}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } // SupportsNiceJavaBuilderPropsIface is the public interface for the custom type SupportsNiceJavaBuilderProps @@ -8169,80 +12536,102 @@ type SupportsNiceJavaBuilderPropsIface interface { // Struct proxy type SupportsNiceJavaBuilderProps struct { // Some number, like 42. - Bar float64 + Bar float64 \`json:"bar"\` // 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. - Id string + Id string \`json:"id"\` } func (s *SupportsNiceJavaBuilderProps) GetBar() float64 { - return s.Bar + var returns float64 + _jsii_.Get( + s, + "bar", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (s *SupportsNiceJavaBuilderProps) GetId() string { - return s.Id + var returns string + _jsii_.Get( + s, + "id", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type SupportsNiceJavaBuilderWithRequiredPropsIface interface { GetBar() float64 - SetBar(val float64) GetId() float64 - SetId(val float64) GetPropId() string - SetPropId(val string) } // We can generate fancy builders in Java for classes which take a mix of positional & struct parameters. // Struct proxy type SupportsNiceJavaBuilderWithRequiredProps struct { - Bar float64 + Bar float64 \`json:"bar"\` // some identifier of your choice. - Id float64 - PropId string + Id float64 \`json:"id"\` + PropId string \`json:"propId"\` } func (s *SupportsNiceJavaBuilderWithRequiredProps) GetBar() float64 { - return s.Bar + var returns float64 + _jsii_.Get( + s, + "bar", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (s *SupportsNiceJavaBuilderWithRequiredProps) GetId() float64 { - return s.Id + var returns float64 + _jsii_.Get( + s, + "id", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (s *SupportsNiceJavaBuilderWithRequiredProps) GetPropId() string { - return s.PropId + var returns string + _jsii_.Get( + s, + "propId", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } -func NewSupportsNiceJavaBuilderWithRequiredProps(id float64, props SupportsNiceJavaBuilderProps) SupportsNiceJavaBuilderWithRequiredPropsIface { +func NewSupportsNiceJavaBuilderWithRequiredProps(id float64, props SupportsNiceJavaBuilderPropsIface) SupportsNiceJavaBuilderWithRequiredPropsIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "SupportsNiceJavaBuilderWithRequiredProps", - Method: "Constructor", - Args: []string{"number", "jsii-calc.SupportsNiceJavaBuilderProps",}, - }) - return &SupportsNiceJavaBuilderWithRequiredProps{} -} - -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 + self := SupportsNiceJavaBuilderWithRequiredProps{} + _jsii_.Create( + "jsii-calc.SupportsNiceJavaBuilderWithRequiredProps", + []interface{}{id, props}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } // Class interface type SyncVirtualMethodsIface interface { GetReadonlyProperty() string - SetReadonlyProperty(val string) GetA() float64 SetA(val float64) GetCallerIsProperty() float64 @@ -8267,158 +12656,259 @@ type SyncVirtualMethodsIface interface { // Struct proxy type SyncVirtualMethods struct { - ReadonlyProperty string - A float64 - CallerIsProperty float64 - OtherProperty string - TheProperty string - ValueOfOtherProperty string + ReadonlyProperty string \`json:"readonlyProperty"\` + A float64 \`json:"a"\` + CallerIsProperty float64 \`json:"callerIsProperty"\` + OtherProperty string \`json:"otherProperty"\` + TheProperty string \`json:"theProperty"\` + ValueOfOtherProperty string \`json:"valueOfOtherProperty"\` } func (s *SyncVirtualMethods) GetReadonlyProperty() string { - return s.ReadonlyProperty + var returns string + _jsii_.Get( + s, + "readonlyProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (s *SyncVirtualMethods) GetA() float64 { - return s.A + var returns float64 + _jsii_.Get( + s, + "a", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (s *SyncVirtualMethods) GetCallerIsProperty() float64 { - return s.CallerIsProperty + var returns float64 + _jsii_.Get( + s, + "callerIsProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (s *SyncVirtualMethods) GetOtherProperty() string { - return s.OtherProperty + var returns string + _jsii_.Get( + s, + "otherProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (s *SyncVirtualMethods) GetTheProperty() string { - return s.TheProperty + var returns string + _jsii_.Get( + s, + "theProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (s *SyncVirtualMethods) GetValueOfOtherProperty() string { - return s.ValueOfOtherProperty + var returns string + _jsii_.Get( + s, + "valueOfOtherProperty", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewSyncVirtualMethods() SyncVirtualMethodsIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "SyncVirtualMethods", - Method: "Constructor", - Args: []string{}, - }) - return &SyncVirtualMethods{} -} - -func (s *SyncVirtualMethods) SetReadonlyProperty(val string) { - s.ReadonlyProperty = val + self := SyncVirtualMethods{} + _jsii_.Create( + "jsii-calc.SyncVirtualMethods", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (s *SyncVirtualMethods) SetA(val float64) { - s.A = val + _jsii_.Set( + s, + "a", + val, + ) } func (s *SyncVirtualMethods) SetCallerIsProperty(val float64) { - s.CallerIsProperty = val + _jsii_.Set( + s, + "callerIsProperty", + val, + ) } func (s *SyncVirtualMethods) SetOtherProperty(val string) { - s.OtherProperty = val + _jsii_.Set( + s, + "otherProperty", + val, + ) } func (s *SyncVirtualMethods) SetTheProperty(val string) { - s.TheProperty = val + _jsii_.Set( + s, + "theProperty", + val, + ) } func (s *SyncVirtualMethods) SetValueOfOtherProperty(val string) { - s.ValueOfOtherProperty = val + _jsii_.Set( + s, + "valueOfOtherProperty", + val, + ) } func (s *SyncVirtualMethods) CallerIsAsync() float64 { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "SyncVirtualMethods", - Method: "CallerIsAsync", - Args: []string{}, - }) - return 0.0 + var returns float64 + _jsii_.Invoke( + s, + "callerIsAsync", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (s *SyncVirtualMethods) CallerIsMethod() float64 { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "SyncVirtualMethods", - Method: "CallerIsMethod", - Args: []string{}, - }) - return 0.0 + var returns float64 + _jsii_.Invoke( + s, + "callerIsMethod", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (s *SyncVirtualMethods) ModifyOtherProperty(value string) { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "SyncVirtualMethods", - Method: "ModifyOtherProperty", - Args: []string{"string",}, - }) + var returns interface{} + _jsii_.Invoke( + s, + "modifyOtherProperty", + []interface{}{value}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (s *SyncVirtualMethods) ModifyValueOfTheProperty(value string) { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "SyncVirtualMethods", - Method: "ModifyValueOfTheProperty", - Args: []string{"string",}, - }) + var returns interface{} + _jsii_.Invoke( + s, + "modifyValueOfTheProperty", + []interface{}{value}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (s *SyncVirtualMethods) ReadA() float64 { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "SyncVirtualMethods", - Method: "ReadA", - Args: []string{}, - }) - return 0.0 + var returns float64 + _jsii_.Invoke( + s, + "readA", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (s *SyncVirtualMethods) RetrieveOtherProperty() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "SyncVirtualMethods", - Method: "RetrieveOtherProperty", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + s, + "retrieveOtherProperty", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (s *SyncVirtualMethods) RetrieveReadOnlyProperty() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "SyncVirtualMethods", - Method: "RetrieveReadOnlyProperty", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + s, + "retrieveReadOnlyProperty", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (s *SyncVirtualMethods) RetrieveValueOfTheProperty() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "SyncVirtualMethods", - Method: "RetrieveValueOfTheProperty", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + s, + "retrieveValueOfTheProperty", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (s *SyncVirtualMethods) VirtualMethod(n float64) float64 { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "SyncVirtualMethods", - Method: "VirtualMethod", - Args: []string{"number",}, - }) - return 0.0 + var returns float64 + _jsii_.Invoke( + s, + "virtualMethod", + []interface{}{n}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (s *SyncVirtualMethods) WriteA(value float64) { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "SyncVirtualMethods", - Method: "WriteA", - Args: []string{"number",}, - }) + var returns interface{} + _jsii_.Invoke( + s, + "writeA", + []interface{}{value}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } // Class interface @@ -8432,49 +12922,77 @@ type Thrower struct { func NewThrower() ThrowerIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Thrower", - Method: "Constructor", - Args: []string{}, - }) - return &Thrower{} + self := Thrower{} + _jsii_.Create( + "jsii-calc.Thrower", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (t *Thrower) ThrowError() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Thrower", - Method: "ThrowError", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + t, + "throwError", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } // TopLevelStructIface is the public interface for the custom type TopLevelStruct type TopLevelStructIface interface { GetRequired() string - GetSecondLevel() jsii.Any + GetSecondLevel() interface{} GetOptional() string } // Struct proxy type TopLevelStruct struct { // This is a required field. - Required string + Required string \`json:"required"\` // A union to really stress test our serialization. - SecondLevel jsii.Any + SecondLevel interface{} \`json:"secondLevel"\` // You don't have to pass this. - Optional string + Optional string \`json:"optional"\` } func (t *TopLevelStruct) GetRequired() string { - return t.Required -} - -func (t *TopLevelStruct) GetSecondLevel() jsii.Any { - return t.SecondLevel + var returns string + _jsii_.Get( + t, + "required", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (t *TopLevelStruct) GetSecondLevel() interface{} { + var returns interface{} + _jsii_.Get( + t, + "secondLevel", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (t *TopLevelStruct) GetOptional() string { - return t.Optional + var returns string + _jsii_.Get( + t, + "optional", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } @@ -8491,21 +13009,23 @@ type UmaskCheck struct { func UmaskCheck_Mode() float64 { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "UmaskCheck", - Method: "Mode", - Args: []string{}, - }) - return 0.0 + var returns float64 + _jsii_.InvokeStatic( + "jsii-calc.UmaskCheck", + "mode", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type UnaryOperationIface interface { GetValue() float64 - SetValue(val float64) - GetOperand() scopejsiicalclib.NumericValue - SetOperand(val scopejsiicalclib.NumericValue) - TypeName() jsii.Any + GetOperand() scopejsiicalclib.NumericValueIface + TypeName() interface{} ToString() string } @@ -8514,124 +13034,165 @@ type UnaryOperationIface interface { type UnaryOperation struct { // The value. // Deprecated. - Value float64 - Operand scopejsiicalclib.NumericValue + Value float64 \`json:"value"\` + Operand scopejsiicalclib.NumericValueIface \`json:"operand"\` } func (u *UnaryOperation) GetValue() float64 { - return u.Value -} - -func (u *UnaryOperation) GetOperand() scopejsiicalclib.NumericValue { - return u.Operand -} - - -func NewUnaryOperation(operand scopejsiicalclib.NumericValue) UnaryOperationIface { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "UnaryOperation", - Method: "Constructor", - Args: []string{"@scope/jsii-calc-lib.NumericValue",}, - }) - return &UnaryOperation{} -} - -func (u *UnaryOperation) SetValue(val float64) { - u.Value = val -} - -func (u *UnaryOperation) SetOperand(val scopejsiicalclib.NumericValue) { - u.Operand = val -} - -func (u *UnaryOperation) TypeName() jsii.Any { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "UnaryOperation", - Method: "TypeName", - Args: []string{}, - }) - return nil + var returns float64 + _jsii_.Get( + u, + "value", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (u *UnaryOperation) GetOperand() scopejsiicalclib.NumericValueIface { + var returns scopejsiicalclib.NumericValueIface + _jsii_.Get( + u, + "operand", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*scopejsiicalclib.NumericValueIface)(nil)).Elem(): reflect.TypeOf((*scopejsiicalclib.NumericValue)(nil)).Elem(), + }, + ) + return returns +} + + +func NewUnaryOperation(operand scopejsiicalclib.NumericValueIface) UnaryOperationIface { + _init_.Initialize() + self := UnaryOperation{} + _jsii_.Create( + "jsii-calc.UnaryOperation", + []interface{}{operand}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self +} + +func (u *UnaryOperation) TypeName() interface{} { + var returns interface{} + _jsii_.Invoke( + u, + "typeName", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (u *UnaryOperation) ToString() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "UnaryOperation", - Method: "ToString", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + u, + "toString", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // UnionPropertiesIface is the public interface for the custom type UnionProperties type UnionPropertiesIface interface { - GetBar() jsii.Any - GetFoo() jsii.Any + GetBar() interface{} + GetFoo() interface{} } // Struct proxy type UnionProperties struct { - Bar jsii.Any - Foo jsii.Any + Bar interface{} \`json:"bar"\` + Foo interface{} \`json:"foo"\` } -func (u *UnionProperties) GetBar() jsii.Any { - return u.Bar +func (u *UnionProperties) GetBar() interface{} { + var returns interface{} + _jsii_.Get( + u, + "bar", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } -func (u *UnionProperties) GetFoo() jsii.Any { - return u.Foo +func (u *UnionProperties) GetFoo() interface{} { + var returns interface{} + _jsii_.Get( + u, + "foo", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type UpcasingReflectableIface interface { - submodule.IReflectable - GetReflector() submodule.Reflector - SetReflector(val submodule.Reflector) - GetEntries() []submodule.ReflectableEntry - SetEntries(val []submodule.ReflectableEntry) + submodule.IReflectableIface + GetEntries() []submodule.ReflectableEntryIface } // Ensures submodule-imported types from dependencies can be used correctly. // Struct proxy type UpcasingReflectable struct { - Reflector submodule.Reflector - Entries []submodule.ReflectableEntry -} - -func (u *UpcasingReflectable) GetReflector() submodule.Reflector { - _init_.Initialize() - return u.Reflector + Entries []submodule.ReflectableEntryIface \`json:"entries"\` } -func (u *UpcasingReflectable) GetEntries() []submodule.ReflectableEntry { - return u.Entries +func (u *UpcasingReflectable) GetEntries() []submodule.ReflectableEntryIface { + var returns []submodule.ReflectableEntryIface + _jsii_.Get( + u, + "entries", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*submodule.ReflectableEntryIface)(nil)).Elem(): reflect.TypeOf((*submodule.ReflectableEntry)(nil)).Elem(), + }, + ) + return returns } -func NewUpcasingReflectable(delegate map[string]jsii.Any) UpcasingReflectableIface { +func NewUpcasingReflectable(delegate map[string]interface{}) UpcasingReflectableIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "UpcasingReflectable", - Method: "Constructor", - Args: []string{"Map any>",}, - }) - return &UpcasingReflectable{} + self := UpcasingReflectable{} + _jsii_.Create( + "jsii-calc.UpcasingReflectable", + []interface{}{delegate}, + []_jsii_.FQN{"@scope/jsii-calc-lib.submodule.IReflectable"}, + []_jsii_.Override{}, + &self, + ) + return &self } -func (u *UpcasingReflectable) SetReflector(val submodule.Reflector) { +func UpcasingReflectable_Reflector() submodule.ReflectorIface { _init_.Initialize() - u.Reflector = val -} - -func (u *UpcasingReflectable) SetEntries(val []submodule.ReflectableEntry) { - u.Entries = val + var returns submodule.ReflectorIface + _jsii_.StaticGet( + "jsii-calc.UpcasingReflectable", + "reflector", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*submodule.ReflectorIface)(nil)).Elem(): reflect.TypeOf((*submodule.Reflector)(nil)).Elem(), + }, + ) + return returns } // Class interface type UseBundledDependencyIface interface { - Value() jsii.Any + Value() interface{} } // Struct proxy @@ -8640,26 +13201,33 @@ type UseBundledDependency struct { func NewUseBundledDependency() UseBundledDependencyIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "UseBundledDependency", - Method: "Constructor", - Args: []string{}, - }) - return &UseBundledDependency{} + self := UseBundledDependency{} + _jsii_.Create( + "jsii-calc.UseBundledDependency", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } -func (u *UseBundledDependency) Value() jsii.Any { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "UseBundledDependency", - Method: "Value", - Args: []string{}, - }) - return nil +func (u *UseBundledDependency) Value() interface{} { + var returns interface{} + _jsii_.Invoke( + u, + "value", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type UseCalcBaseIface interface { - Hello() scopejsiicalcbase.Base + Hello() scopejsiicalcbase.BaseIface } // Depend on a type from jsii-calc-base as a test for awslabs/jsii#128. @@ -8669,81 +13237,109 @@ type UseCalcBase struct { func NewUseCalcBase() UseCalcBaseIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "UseCalcBase", - Method: "Constructor", - Args: []string{}, - }) - return &UseCalcBase{} -} - -func (u *UseCalcBase) Hello() scopejsiicalcbase.Base { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "UseCalcBase", - Method: "Hello", - Args: []string{}, - }) - return scopejsiicalcbase.Base{} + self := UseCalcBase{} + _jsii_.Create( + "jsii-calc.UseCalcBase", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self +} + +func (u *UseCalcBase) Hello() scopejsiicalcbase.BaseIface { + var returns scopejsiicalcbase.BaseIface + _jsii_.Invoke( + u, + "hello", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*scopejsiicalcbase.BaseIface)(nil)).Elem(): reflect.TypeOf((*scopejsiicalcbase.Base)(nil)).Elem(), + }, + ) + return returns } // Class interface type UsesInterfaceWithPropertiesIface interface { - GetObj() IInterfaceWithProperties - SetObj(val IInterfaceWithProperties) + GetObj() IInterfaceWithPropertiesIface JustRead() string - ReadStringAndNumber(ext IInterfaceWithPropertiesExtension) string + ReadStringAndNumber(ext IInterfaceWithPropertiesExtensionIface) string WriteAndRead(value string) string } // Struct proxy type UsesInterfaceWithProperties struct { - Obj IInterfaceWithProperties + Obj IInterfaceWithPropertiesIface \`json:"obj"\` } -func (u *UsesInterfaceWithProperties) GetObj() IInterfaceWithProperties { - return u.Obj +func (u *UsesInterfaceWithProperties) GetObj() IInterfaceWithPropertiesIface { + var returns IInterfaceWithPropertiesIface + _jsii_.Get( + u, + "obj", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*IInterfaceWithPropertiesIface)(nil)).Elem(): reflect.TypeOf((*IInterfaceWithProperties)(nil)).Elem(), + }, + ) + return returns } -func NewUsesInterfaceWithProperties(obj IInterfaceWithProperties) UsesInterfaceWithPropertiesIface { +func NewUsesInterfaceWithProperties(obj IInterfaceWithPropertiesIface) UsesInterfaceWithPropertiesIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "UsesInterfaceWithProperties", - Method: "Constructor", - Args: []string{"jsii-calc.IInterfaceWithProperties",}, - }) - return &UsesInterfaceWithProperties{} -} - -func (u *UsesInterfaceWithProperties) SetObj(val IInterfaceWithProperties) { - u.Obj = val + self := UsesInterfaceWithProperties{} + _jsii_.Create( + "jsii-calc.UsesInterfaceWithProperties", + []interface{}{obj}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (u *UsesInterfaceWithProperties) JustRead() string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "UsesInterfaceWithProperties", - Method: "JustRead", - Args: []string{}, - }) - return "NOOP_RETURN_STRING" -} - -func (u *UsesInterfaceWithProperties) ReadStringAndNumber(ext IInterfaceWithPropertiesExtension) string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "UsesInterfaceWithProperties", - Method: "ReadStringAndNumber", - Args: []string{"jsii-calc.IInterfaceWithPropertiesExtension",}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + u, + "justRead", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns +} + +func (u *UsesInterfaceWithProperties) ReadStringAndNumber(ext IInterfaceWithPropertiesExtensionIface) string { + var returns string + _jsii_.Invoke( + u, + "readStringAndNumber", + []interface{}{ext}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (u *UsesInterfaceWithProperties) WriteAndRead(value string) string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "UsesInterfaceWithProperties", - Method: "WriteAndRead", - Args: []string{"string",}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + u, + "writeAndRead", + []interface{}{value}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface @@ -8755,23 +13351,32 @@ type VariadicInvokerIface interface { type VariadicInvoker struct { } -func NewVariadicInvoker(method VariadicMethod) VariadicInvokerIface { +func NewVariadicInvoker(method VariadicMethodIface) VariadicInvokerIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "VariadicInvoker", - Method: "Constructor", - Args: []string{"jsii-calc.VariadicMethod",}, - }) - return &VariadicInvoker{} + self := VariadicInvoker{} + _jsii_.Create( + "jsii-calc.VariadicInvoker", + []interface{}{method}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (v *VariadicInvoker) AsArray(values float64) []float64 { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "VariadicInvoker", - Method: "AsArray", - Args: []string{"number",}, - }) - return nil + var returns []float64 + _jsii_.Invoke( + v, + "asArray", + []interface{}{values}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*float64)(nil)).Elem(): reflect.TypeOf((*float64)(nil)).Elem(), + }, + ) + return returns } // Class interface @@ -8785,21 +13390,30 @@ type VariadicMethod struct { func NewVariadicMethod(prefix float64) VariadicMethodIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "VariadicMethod", - Method: "Constructor", - Args: []string{"number",}, - }) - return &VariadicMethod{} + self := VariadicMethod{} + _jsii_.Create( + "jsii-calc.VariadicMethod", + []interface{}{prefix}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (v *VariadicMethod) AsArray(first float64, others float64) []float64 { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "VariadicMethod", - Method: "AsArray", - Args: []string{"number", "number",}, - }) - return nil + var returns []float64 + _jsii_.Invoke( + v, + "asArray", + []interface{}{first, others}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*float64)(nil)).Elem(): reflect.TypeOf((*float64)(nil)).Elem(), + }, + ) + return returns } // Class interface @@ -8817,226 +13431,299 @@ type VirtualMethodPlayground struct { func NewVirtualMethodPlayground() VirtualMethodPlaygroundIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "VirtualMethodPlayground", - Method: "Constructor", - Args: []string{}, - }) - return &VirtualMethodPlayground{} + self := VirtualMethodPlayground{} + _jsii_.Create( + "jsii-calc.VirtualMethodPlayground", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (v *VirtualMethodPlayground) OverrideMeAsync(index float64) float64 { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "VirtualMethodPlayground", - Method: "OverrideMeAsync", - Args: []string{"number",}, - }) - return 0.0 + var returns float64 + _jsii_.Invoke( + v, + "overrideMeAsync", + []interface{}{index}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (v *VirtualMethodPlayground) OverrideMeSync(index float64) float64 { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "VirtualMethodPlayground", - Method: "OverrideMeSync", - Args: []string{"number",}, - }) - return 0.0 + var returns float64 + _jsii_.Invoke( + v, + "overrideMeSync", + []interface{}{index}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (v *VirtualMethodPlayground) ParallelSumAsync(count float64) float64 { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "VirtualMethodPlayground", - Method: "ParallelSumAsync", - Args: []string{"number",}, - }) - return 0.0 + var returns float64 + _jsii_.Invoke( + v, + "parallelSumAsync", + []interface{}{count}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (v *VirtualMethodPlayground) SerialSumAsync(count float64) float64 { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "VirtualMethodPlayground", - Method: "SerialSumAsync", - Args: []string{"number",}, - }) - return 0.0 + var returns float64 + _jsii_.Invoke( + v, + "serialSumAsync", + []interface{}{count}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (v *VirtualMethodPlayground) SumSync(count float64) float64 { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "VirtualMethodPlayground", - Method: "SumSync", - Args: []string{"number",}, - }) - return 0.0 + var returns float64 + _jsii_.Invoke( + v, + "sumSync", + []interface{}{count}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type VoidCallbackIface interface { GetMethodWasCalled() bool - SetMethodWasCalled(val bool) CallMe() OverrideMe() } // This test is used to validate the runtimes can return correctly from a void callback. -// +// // - Implement \`overrideMe\` (method does not have to do anything). // - Invoke \`callMe\` // - Verify that \`methodWasCalled\` is \`true\`. // Struct proxy type VoidCallback struct { - MethodWasCalled bool + MethodWasCalled bool \`json:"methodWasCalled"\` } func (v *VoidCallback) GetMethodWasCalled() bool { - return v.MethodWasCalled + var returns bool + _jsii_.Get( + v, + "methodWasCalled", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewVoidCallback() VoidCallbackIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "VoidCallback", - Method: "Constructor", - Args: []string{}, - }) - return &VoidCallback{} -} - -func (v *VoidCallback) SetMethodWasCalled(val bool) { - v.MethodWasCalled = val + self := VoidCallback{} + _jsii_.Create( + "jsii-calc.VoidCallback", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } func (v *VoidCallback) CallMe() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "VoidCallback", - Method: "CallMe", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + v, + "callMe", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } func (v *VoidCallback) OverrideMe() { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "VoidCallback", - Method: "OverrideMe", - Args: []string{}, - }) + var returns interface{} + _jsii_.Invoke( + v, + "overrideMe", + []interface{}{}, + false, + &returns, + map[reflect.Type]reflect.Type{}, + ) } // Class interface type WithPrivatePropertyInConstructorIface interface { GetSuccess() bool - SetSuccess(val bool) } // Verifies that private property declarations in constructor arguments are hidden. // Struct proxy type WithPrivatePropertyInConstructor struct { - Success bool + Success bool \`json:"success"\` } func (w *WithPrivatePropertyInConstructor) GetSuccess() bool { - return w.Success + var returns bool + _jsii_.Get( + w, + "success", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewWithPrivatePropertyInConstructor(privateField string) WithPrivatePropertyInConstructorIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "WithPrivatePropertyInConstructor", - Method: "Constructor", - Args: []string{"string",}, - }) - return &WithPrivatePropertyInConstructor{} -} - -func (w *WithPrivatePropertyInConstructor) SetSuccess(val bool) { - w.Success = val + self := WithPrivatePropertyInConstructor{} + _jsii_.Create( + "jsii-calc.WithPrivatePropertyInConstructor", + []interface{}{privateField}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } `; -exports[`Generated code for "jsii-calc": /golang/jsiicalc/pythonself/pythonself.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/pythonself/pythonself.go 1`] = ` package pythonself import ( - "github.com/aws-cdk/jsii/jsii-experimental" - _init_ "github.com/aws-cdk/jsii/jsii-calc/golang/jsiicalc/jsii" + _jsii_ "github.com/aws/jsii-runtime-go" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" + "reflect" ) // Class interface type ClassWithSelfIface interface { GetSelf() string - SetSelf(val string) Method(self float64) string } // Struct proxy type ClassWithSelf struct { - Self string + Self string \`json:"self"\` } func (c *ClassWithSelf) GetSelf() string { - return c.Self + var returns string + _jsii_.Get( + c, + "self", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func NewClassWithSelf(self string) ClassWithSelfIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ClassWithSelf", - Method: "Constructor", - Args: []string{"string",}, - }) - return &ClassWithSelf{} -} - -func (c *ClassWithSelf) SetSelf(val string) { - c.Self = val + self_ := ClassWithSelf{} + _jsii_.Create( + "jsii-calc.PythonSelf.ClassWithSelf", + []interface{}{self}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self_, + ) + return &self_ } func (c *ClassWithSelf) Method(self float64) string { - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ClassWithSelf", - Method: "Method", - Args: []string{"number",}, - }) - return "NOOP_RETURN_STRING" + var returns string + _jsii_.Invoke( + c, + "method", + []interface{}{self}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type ClassWithSelfKwargIface interface { - GetProps() StructWithSelf - SetProps(val StructWithSelf) + GetProps() StructWithSelfIface } // Struct proxy type ClassWithSelfKwarg struct { - Props StructWithSelf + Props StructWithSelfIface \`json:"props"\` } -func (c *ClassWithSelfKwarg) GetProps() StructWithSelf { - return c.Props +func (c *ClassWithSelfKwarg) GetProps() StructWithSelfIface { + var returns StructWithSelfIface + _jsii_.Get( + c, + "props", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*StructWithSelfIface)(nil)).Elem(): reflect.TypeOf((*StructWithSelf)(nil)).Elem(), + }, + ) + return returns } -func NewClassWithSelfKwarg(props StructWithSelf) ClassWithSelfKwargIface { +func NewClassWithSelfKwarg(props StructWithSelfIface) ClassWithSelfKwargIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "ClassWithSelfKwarg", - Method: "Constructor", - Args: []string{"jsii-calc.PythonSelf.StructWithSelf",}, - }) - return &ClassWithSelfKwarg{} + self := ClassWithSelfKwarg{} + _jsii_.Create( + "jsii-calc.PythonSelf.ClassWithSelfKwarg", + []interface{}{props}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } -func (c *ClassWithSelfKwarg) SetProps(val StructWithSelf) { - c.Props = val +type IInterfaceWithSelfIface interface { + Method(self float64) string } -type IInterfaceWithSelf interface { - Method(self float64) string +type IInterfaceWithSelf struct {} + +func (i *IInterfaceWithSelf) Method(self float64) string { + var returns string + _jsii_.Invoke( + i, + "method", + []interface{}{self}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // StructWithSelfIface is the public interface for the custom type StructWithSelf @@ -9046,50 +13733,67 @@ type StructWithSelfIface interface { // Struct proxy type StructWithSelf struct { - Self string + Self string \`json:"self"\` } func (s *StructWithSelf) GetSelf() string { - return s.Self + var returns string + _jsii_.Get( + s, + "self", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } `; -exports[`Generated code for "jsii-calc": /golang/jsiicalc/submodule/backreferences.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/backreferences/backreferences.go 1`] = ` package backreferences import ( - "github.com/aws-cdk/jsii/jsii-experimental" - "github.com/aws-cdk/jsii/jsii-calc/golang/jsiicalc/submodule" - _init_ "github.com/aws-cdk/jsii/jsii-calc/golang/jsiicalc/jsii" + _jsii_ "github.com/aws/jsii-runtime-go" + "reflect" + "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/submodule" ) // MyClassReferenceIface is the public interface for the custom type MyClassReference type MyClassReferenceIface interface { - GetReference() submodule.MyClass + GetReference() submodule.MyClassIface } // Struct proxy type MyClassReference struct { - Reference submodule.MyClass + Reference submodule.MyClassIface \`json:"reference"\` } -func (m *MyClassReference) GetReference() submodule.MyClass { - return m.Reference +func (m *MyClassReference) GetReference() submodule.MyClassIface { + var returns submodule.MyClassIface + _jsii_.Get( + m, + "reference", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*submodule.MyClassIface)(nil)).Elem(): reflect.TypeOf((*submodule.MyClass)(nil)).Elem(), + }, + ) + return returns } `; -exports[`Generated code for "jsii-calc": /golang/jsiicalc/submodule/child.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/child/child.go 1`] = ` package child import ( - "github.com/aws-cdk/jsii/jsii-experimental" - _init_ "github.com/aws-cdk/jsii/jsii-calc/golang/jsiicalc/jsii" + _jsii_ "github.com/aws/jsii-runtime-go" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" + "reflect" ) type Awesomeness string @@ -9108,34 +13812,37 @@ const ( // Class interface type InnerClassIface interface { - GetStaticProp() SomeStruct - SetStaticProp(val SomeStruct) } // Struct proxy type InnerClass struct { - StaticProp SomeStruct } -func (i *InnerClass) GetStaticProp() SomeStruct { - _init_.Initialize() - return i.StaticProp -} - - func NewInnerClass() InnerClassIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "InnerClass", - Method: "Constructor", - Args: []string{}, - }) - return &InnerClass{} + self := InnerClass{} + _jsii_.Create( + "jsii-calc.submodule.child.InnerClass", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } -func (i *InnerClass) SetStaticProp(val SomeStruct) { +func InnerClass_StaticProp() SomeStructIface { _init_.Initialize() - i.StaticProp = val + var returns SomeStructIface + _jsii_.StaticGet( + "jsii-calc.submodule.child.InnerClass", + "staticProp", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*SomeStructIface)(nil)).Elem(): reflect.TypeOf((*SomeStruct)(nil)).Elem(), + }, + ) + return returns } // KwargsPropsIface is the public interface for the custom type KwargsProps @@ -9146,23 +13853,38 @@ type KwargsPropsIface interface { // Struct proxy type KwargsProps struct { - Prop SomeEnum - Extra string + Prop SomeEnum \`json:"prop"\` + Extra string \`json:"extra"\` } func (k *KwargsProps) GetProp() SomeEnum { - return k.Prop + var returns SomeEnum + _jsii_.Get( + k, + "prop", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*SomeEnum)(nil)).Elem(): reflect.TypeOf((*SomeEnum)(nil)).Elem(), + }, + ) + return returns } func (k *KwargsProps) GetExtra() string { - return k.Extra + var returns string + _jsii_.Get( + k, + "extra", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } // Class interface type OuterClassIface interface { - GetInnerClass() InnerClass - SetInnerClass(val InnerClass) + GetInnerClass() InnerClassIface } // Checks that classes can self-reference during initialization. @@ -9170,26 +13892,34 @@ type OuterClassIface interface { // // Struct proxy type OuterClass struct { - InnerClass InnerClass + InnerClass InnerClassIface \`json:"innerClass"\` } -func (o *OuterClass) GetInnerClass() InnerClass { - return o.InnerClass +func (o *OuterClass) GetInnerClass() InnerClassIface { + var returns InnerClassIface + _jsii_.Get( + o, + "innerClass", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*InnerClassIface)(nil)).Elem(): reflect.TypeOf((*InnerClass)(nil)).Elem(), + }, + ) + return returns } func NewOuterClass() OuterClassIface { _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "OuterClass", - Method: "Constructor", - Args: []string{}, - }) - return &OuterClass{} -} - -func (o *OuterClass) SetInnerClass(val InnerClass) { - o.InnerClass = val + self := OuterClass{} + _jsii_.Create( + "jsii-calc.submodule.child.OuterClass", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } type SomeEnum string @@ -9205,11 +13935,20 @@ type SomeStructIface interface { // Struct proxy type SomeStruct struct { - Prop SomeEnum + Prop SomeEnum \`json:"prop"\` } func (s *SomeStruct) GetProp() SomeEnum { - return s.Prop + var returns SomeEnum + _jsii_.Get( + s, + "prop", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*SomeEnum)(nil)).Elem(): reflect.TypeOf((*SomeEnum)(nil)).Elem(), + }, + ) + return returns } @@ -9220,190 +13959,354 @@ type StructureIface interface { // Struct proxy type Structure struct { - Bool bool + Bool bool \`json:"bool"\` } func (s *Structure) GetBool() bool { - return s.Bool + var returns bool + _jsii_.Get( + s, + "bool", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } `; -exports[`Generated code for "jsii-calc": /golang/jsiicalc/submodule/deeplynested.go 1`] = ` -package deeplynested +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/isolated/isolated.go 1`] = ` +package isolated import ( - "github.com/aws-cdk/jsii/jsii-experimental" - _init_ "github.com/aws-cdk/jsii/jsii-calc/golang/jsiicalc/jsii" ) -type INamespaced interface { - GetDefinedAt() string +// Class interface +type KwargsIface interface { +} + +// Ensures imports are correctly registered for kwargs lifted properties from super-structs. +// Struct proxy +type Kwargs struct { +} + +func Kwargs_Method(props child.KwargsPropsIface) bool { + _init_.Initialize() + var returns bool + _jsii_.InvokeStatic( + "jsii-calc.submodule.isolated.Kwargs", + "method", + []interface{}{props}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } `; -exports[`Generated code for "jsii-calc": /golang/jsiicalc/submodule/isolated.go 1`] = ` -package isolated +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/nestedsubmodule/deeplynested/deeplynested.go 1`] = ` +package deeplynested import ( - "github.com/aws-cdk/jsii/jsii-experimental" - _init_ "github.com/aws-cdk/jsii/jsii-calc/golang/jsiicalc/jsii" + _jsii_ "github.com/aws/jsii-runtime-go" + "reflect" ) -// Class interface -type KwargsIface interface { +type INamespacedIface interface { + GetDefinedAt() string } -// Ensures imports are correctly registered for kwargs lifted properties from super-structs. -// Struct proxy -type Kwargs struct { -} +type INamespaced struct {} -func Kwargs_Method(props child.KwargsProps) bool { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "Kwargs", - Method: "Method", - Args: []string{"jsii-calc.submodule.child.KwargsProps",}, - }) - return true +func (i *INamespaced) GetDefinedAt() string { + var returns string + _jsii_.Get( + i, + "definedAt", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } `; -exports[`Generated code for "jsii-calc": /golang/jsiicalc/submodule/nestedsubmodule.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/nestedsubmodule/nestedsubmodule.go 1`] = ` package nestedsubmodule import ( - "github.com/aws-cdk/jsii/jsii-experimental" - "github.com/aws-cdk/jsii/jsii-calc/golang/jsiicalc/submodule" - _init_ "github.com/aws-cdk/jsii/jsii-calc/golang/jsiicalc/jsii" + _jsii_ "github.com/aws/jsii-runtime-go" + "reflect" + "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/submodule/nestedsubmodule/deeplynested" + "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/submodule/child" ) // Class interface type NamespacedIface interface { - deeplynested.INamespaced + deeplynested.INamespacedIface GetDefinedAt() string - SetDefinedAt(val string) GetGoodness() child.Goodness - SetGoodness(val child.Goodness) } // Struct proxy type Namespaced struct { - DefinedAt string - Goodness child.Goodness + DefinedAt string \`json:"definedAt"\` + Goodness child.Goodness \`json:"goodness"\` } func (n *Namespaced) GetDefinedAt() string { - return n.DefinedAt + var returns string + _jsii_.Get( + n, + "definedAt", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } func (n *Namespaced) GetGoodness() child.Goodness { - return n.Goodness + var returns child.Goodness + _jsii_.Get( + n, + "goodness", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*child.Goodness)(nil)).Elem(): reflect.TypeOf((*child.Goodness)(nil)).Elem(), + }, + ) + return returns } -func (n *Namespaced) SetDefinedAt(val string) { - n.DefinedAt = val + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/param/param.go 1`] = ` +package param + +import ( + _jsii_ "github.com/aws/jsii-runtime-go" + "reflect" +) + +// SpecialParameterIface is the public interface for the custom type SpecialParameter +type SpecialParameterIface interface { + GetValue() string } -func (n *Namespaced) SetGoodness(val child.Goodness) { - n.Goodness = val +// Struct proxy +type SpecialParameter struct { + Value string \`json:"value"\` +} + +func (s *SpecialParameter) GetValue() string { + var returns string + _jsii_.Get( + s, + "value", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } + `; -exports[`Generated code for "jsii-calc": /golang/jsiicalc/submodule/submodule.go 1`] = ` -package submodule +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/returnsparam/returnsparam.go 1`] = ` +package returnsparam import ( - "github.com/aws-cdk/jsii/jsii-experimental" - "github.com/aws-cdk/jsii/jsii-calc/golang/jsiicalc/submodule" - "github.com/aws-cdk/jsii/jsii-calc/golang/jsiicalc" - _init_ "github.com/aws-cdk/jsii/jsii-calc/golang/jsiicalc/jsii" + _jsii_ "github.com/aws/jsii-runtime-go" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" + "reflect" + "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/submodule/param" ) // Class interface -type MyClassIface interface { - deeplynested.INamespaced - GetAwesomeness() child.Awesomeness - SetAwesomeness(val child.Awesomeness) - GetDefinedAt() string - SetDefinedAt(val string) - GetGoodness() child.Goodness - SetGoodness(val child.Goodness) - GetProps() child.SomeStruct - SetProps(val child.SomeStruct) - GetAllTypes() jsiicalc.AllTypes - SetAllTypes(val jsiicalc.AllTypes) +type ReturnsSpecialParameterIface interface { + ReturnsSpecialParam() param.SpecialParameterIface } // Struct proxy -type MyClass struct { - Awesomeness child.Awesomeness - DefinedAt string - Goodness child.Goodness - Props child.SomeStruct - AllTypes jsiicalc.AllTypes +type ReturnsSpecialParameter struct { } -func (m *MyClass) GetAwesomeness() child.Awesomeness { - return m.Awesomeness +func NewReturnsSpecialParameter() ReturnsSpecialParameterIface { + _init_.Initialize() + self := ReturnsSpecialParameter{} + _jsii_.Create( + "jsii-calc.submodule.returnsparam.ReturnsSpecialParameter", + []interface{}{}, + []_jsii_.FQN{}, + []_jsii_.Override{}, + &self, + ) + return &self } -func (m *MyClass) GetDefinedAt() string { - return m.DefinedAt +func (r *ReturnsSpecialParameter) ReturnsSpecialParam() param.SpecialParameterIface { + var returns param.SpecialParameterIface + _jsii_.Invoke( + r, + "returnsSpecialParam", + []interface{}{}, + true, + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*param.SpecialParameterIface)(nil)).Elem(): reflect.TypeOf((*param.SpecialParameter)(nil)).Elem(), + }, + ) + return returns } -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 -} +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/submodule.go 1`] = ` +package submodule +import ( + _jsii_ "github.com/aws/jsii-runtime-go" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" + "reflect" + "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/submodule/nestedsubmodule/deeplynested" + "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/submodule/child" + "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3" + "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/submodule/param" +) -func NewMyClass(props child.SomeStruct) MyClassIface { - _init_.Initialize() - jsii.NoOpRequest(jsii.NoOpApiRequest { - Class: "MyClass", - Method: "Constructor", - Args: []string{"jsii-calc.submodule.child.SomeStruct",}, - }) - return &MyClass{} +// Class interface +type MyClassIface interface { + deeplynested.INamespacedIface + GetAwesomeness() child.Awesomeness + GetDefinedAt() string + GetGoodness() child.Goodness + GetProps() child.SomeStructIface + GetAllTypes() jsiicalc.AllTypesIface + SetAllTypes(val jsiicalc.AllTypesIface) + MethodWithSpecialParam(param param.SpecialParameterIface) string } -func (m *MyClass) SetAwesomeness(val child.Awesomeness) { - m.Awesomeness = val +// Struct proxy +type MyClass struct { + Awesomeness child.Awesomeness \`json:"awesomeness"\` + DefinedAt string \`json:"definedAt"\` + Goodness child.Goodness \`json:"goodness"\` + Props child.SomeStructIface \`json:"props"\` + AllTypes jsiicalc.AllTypesIface \`json:"allTypes"\` } -func (m *MyClass) SetDefinedAt(val string) { - m.DefinedAt = val +func (m *MyClass) GetAwesomeness() child.Awesomeness { + var returns child.Awesomeness + _jsii_.Get( + m, + "awesomeness", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*child.Awesomeness)(nil)).Elem(): reflect.TypeOf((*child.Awesomeness)(nil)).Elem(), + }, + ) + return returns } -func (m *MyClass) SetGoodness(val child.Goodness) { - m.Goodness = val +func (m *MyClass) GetDefinedAt() string { + var returns string + _jsii_.Get( + m, + "definedAt", + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } -func (m *MyClass) SetProps(val child.SomeStruct) { - m.Props = val +func (m *MyClass) GetGoodness() child.Goodness { + var returns child.Goodness + _jsii_.Get( + m, + "goodness", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*child.Goodness)(nil)).Elem(): reflect.TypeOf((*child.Goodness)(nil)).Elem(), + }, + ) + return returns +} + +func (m *MyClass) GetProps() child.SomeStructIface { + var returns child.SomeStructIface + _jsii_.Get( + m, + "props", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*child.SomeStructIface)(nil)).Elem(): reflect.TypeOf((*child.SomeStruct)(nil)).Elem(), + }, + ) + return returns +} + +func (m *MyClass) GetAllTypes() jsiicalc.AllTypesIface { + var returns jsiicalc.AllTypesIface + _jsii_.Get( + m, + "allTypes", + &returns, + map[reflect.Type]reflect.Type{ + reflect.TypeOf((*jsiicalc.AllTypesIface)(nil)).Elem(): reflect.TypeOf((*jsiicalc.AllTypes)(nil)).Elem(), + }, + ) + return returns +} + + +func NewMyClass(props child.SomeStructIface) MyClassIface { + _init_.Initialize() + self := MyClass{} + _jsii_.Create( + "jsii-calc.submodule.MyClass", + []interface{}{props}, + []_jsii_.FQN{"jsii-calc.submodule.nested_submodule.deeplyNested.INamespaced"}, + []_jsii_.Override{}, + &self, + ) + return &self +} + +func (m *MyClass) SetAllTypes(val jsiicalc.AllTypesIface) { + _jsii_.Set( + m, + "allTypes", + val, + ) +} + +func (m *MyClass) MethodWithSpecialParam(param param.SpecialParameterIface) string { + var returns string + _jsii_.Invoke( + m, + "methodWithSpecialParam", + []interface{}{param}, + true, + &returns, + map[reflect.Type]reflect.Type{}, + ) + return returns } -func (m *MyClass) SetAllTypes(val jsiicalc.AllTypes) { - m.AllTypes = val -} +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/version 1`] = ` +3.20.120 `; diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-java.test.ts.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-java.test.ts.snap index 53d27e1825..267236b642 100644 --- a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-java.test.ts.snap +++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-java.test.ts.snap @@ -16,7 +16,8 @@ exports[`Generated code for "@scope/jsii-calc-base": / 1`] = ` โ”ƒ โ”ฃโ” ๐Ÿ“„ $Module.java โ”ƒ โ”ฃโ” ๐Ÿ“„ Base.java โ”ƒ โ”ฃโ” ๐Ÿ“„ BaseProps.java - โ”ƒ โ”—โ” ๐Ÿ“„ IBaseInterface.java + โ”ƒ โ”ฃโ” ๐Ÿ“„ IBaseInterface.java + โ”ƒ โ”—โ” ๐Ÿ“„ StaticConsumer.java โ”—โ” ๐Ÿ“ resources โ”—โ” ๐Ÿ“ software โ”—โ” ๐Ÿ“ amazon @@ -67,12 +68,12 @@ exports[`Generated code for "@scope/jsii-calc-base": /java/pom.xml 1`] = software.amazon.jsii.tests calculator-base-of-base - [0.0.0,0.0.1) + [2.1.1,3.0.0) software.amazon.jsii jsii-runtime - [0.0.0,0.0.1) + (,0.0.1) org.jetbrains @@ -128,7 +129,7 @@ exports[`Generated code for "@scope/jsii-calc-base": /java/pom.xml 1`] = org.apache.maven.plugins maven-javadoc-plugin - 3.1.1 + 3.2.0 attach-javadocs @@ -170,7 +171,7 @@ exports[`Generated code for "@scope/jsii-calc-base": /java/pom.xml 1`] = org.codehaus.mojo versions-maven-plugin - 2.7 + 2.8.1 false @@ -201,6 +202,7 @@ import java.util.Map; import software.amazon.jsii.JsiiModule; +@software.amazon.jsii.Internal public final class $Module extends JsiiModule { private static final Map MODULE_TYPES = load(); @@ -287,13 +289,14 @@ public abstract class Base extends software.amazon.jsii.JsiiObject { * @return the name of the class (to verify native type names are created for derived classes). */ public @org.jetbrains.annotations.NotNull java.lang.Object typeName() { - return this.jsiiCall("typeName", java.lang.Object.class); + return software.amazon.jsii.Kernel.call(this, "typeName", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); } /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.tests.calculator.base.Base { + @software.amazon.jsii.Internal + private static final class Jsii$Proxy extends software.amazon.jsii.tests.calculator.base.Base { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -359,6 +362,7 @@ public interface BaseProps extends software.amazon.jsii.JsiiSerializable, softwa /** * An implementation for {@link BaseProps} */ + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements BaseProps { private final java.lang.String bar; private final software.amazon.jsii.tests.calculator.baseofbase.Very foo; @@ -369,30 +373,31 @@ public interface BaseProps extends software.amazon.jsii.JsiiSerializable, softwa */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.bar = this.jsiiGet("bar", java.lang.String.class); - this.foo = this.jsiiGet("foo", software.amazon.jsii.tests.calculator.baseofbase.Very.class); + this.bar = software.amazon.jsii.Kernel.get(this, "bar", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + this.foo = software.amazon.jsii.Kernel.get(this, "foo", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.baseofbase.Very.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ - private Jsii$Proxy(final java.lang.String bar, final software.amazon.jsii.tests.calculator.baseofbase.Very foo) { + protected Jsii$Proxy(final java.lang.String bar, final software.amazon.jsii.tests.calculator.baseofbase.Very foo) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.bar = java.util.Objects.requireNonNull(bar, "bar is required"); this.foo = java.util.Objects.requireNonNull(foo, "foo is required"); } @Override - public java.lang.String getBar() { + public final java.lang.String getBar() { return this.bar; } @Override - public software.amazon.jsii.tests.calculator.baseofbase.Very getFoo() { + public final software.amazon.jsii.tests.calculator.baseofbase.Very getFoo() { return this.foo; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -411,7 +416,7 @@ public interface BaseProps extends software.amazon.jsii.JsiiSerializable, softwa } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -422,7 +427,7 @@ public interface BaseProps extends software.amazon.jsii.JsiiSerializable, softwa } @Override - public int hashCode() { + public final int hashCode() { int result = this.bar.hashCode(); result = 31 * result + (this.foo.hashCode()); return result; @@ -445,29 +450,61 @@ public interface IBaseInterface extends software.amazon.jsii.JsiiSerializable, s /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.base.IBaseInterface { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.baseofbase.IVeryBaseInterface.Jsii$Default, software.amazon.jsii.tests.calculator.base.IBaseInterface { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @Override - public void bar() { - this.jsiiCall("bar", software.amazon.jsii.NativeType.VOID); + public final void foo() { + software.amazon.jsii.Kernel.call(this, "foo", software.amazon.jsii.NativeType.VOID); } @Override - public void foo() { - this.jsiiCall("foo", software.amazon.jsii.NativeType.VOID); + public final void bar() { + software.amazon.jsii.Kernel.call(this, "bar", software.amazon.jsii.NativeType.VOID); } } } `; +exports[`Generated code for "@scope/jsii-calc-base": /java/src/main/java/software/amazon/jsii/tests/calculator/base/StaticConsumer.java 1`] = ` +package software.amazon.jsii.tests.calculator.base; + +/** + * Hides the transitive dependency of base-of-base. + */ +@javax.annotation.Generated(value = "jsii-pacmak") +@software.amazon.jsii.Jsii(module = software.amazon.jsii.tests.calculator.base.$Module.class, fqn = "@scope/jsii-calc-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 StaticConsumer() { + super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); + software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this); + } + + public static void consume(final @org.jetbrains.annotations.NotNull java.lang.Object... args) { + software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.base.StaticConsumer.class, "consume", software.amazon.jsii.NativeType.VOID, java.util.Arrays.stream(args).toArray(Object[]::new)); + } +} + +`; + exports[`Generated code for "@scope/jsii-calc-base": /java/src/main/resources/software/amazon/jsii/tests/calculator/base/$Module.txt 1`] = ` @scope/jsii-calc-base.Base=software.amazon.jsii.tests.calculator.base.Base @scope/jsii-calc-base.BaseProps=software.amazon.jsii.tests.calculator.base.BaseProps @scope/jsii-calc-base.IBaseInterface=software.amazon.jsii.tests.calculator.base.IBaseInterface +@scope/jsii-calc-base.StaticConsumer=software.amazon.jsii.tests.calculator.base.StaticConsumer `; @@ -499,7 +536,7 @@ exports[`Generated code for "@scope/jsii-calc-base-of-base": / 1`] = ` โ”—โ” ๐Ÿ“ calculator โ”—โ” ๐Ÿ“ baseofbase โ”ฃโ” ๐Ÿ“„ $Module.txt - โ”—โ” ๐Ÿ“„ jsii-calc-base-of-base@0.0.0.jsii.tgz + โ”—โ” ๐Ÿ“„ jsii-calc-base-of-base@2.1.1.jsii.tgz `; exports[`Generated code for "@scope/jsii-calc-base-of-base": /java/pom.xml 1`] = ` @@ -532,7 +569,7 @@ exports[`Generated code for "@scope/jsii-calc-base-of-base": /java/pom.x software.amazon.jsii.tests calculator-base-of-base - 0.0.0 + 2.1.1 jar UTF-8 @@ -541,7 +578,7 @@ exports[`Generated code for "@scope/jsii-calc-base-of-base": /java/pom.x software.amazon.jsii jsii-runtime - [0.0.0,0.0.1) + (,0.0.1) org.jetbrains @@ -597,7 +634,7 @@ exports[`Generated code for "@scope/jsii-calc-base-of-base": /java/pom.x org.apache.maven.plugins maven-javadoc-plugin - 3.1.1 + 3.2.0 attach-javadocs @@ -639,7 +676,7 @@ exports[`Generated code for "@scope/jsii-calc-base-of-base": /java/pom.x org.codehaus.mojo versions-maven-plugin - 2.7 + 2.8.1 false @@ -667,6 +704,7 @@ import java.util.Map; import software.amazon.jsii.JsiiModule; +@software.amazon.jsii.Internal public final class $Module extends JsiiModule { private static final Map MODULE_TYPES = load(); @@ -694,7 +732,7 @@ public final class $Module extends JsiiModule { private final Map> cache = new HashMap<>(); public $Module() { - super("@scope/jsii-calc-base-of-base", "0.0.0", $Module.class, "jsii-calc-base-of-base@0.0.0.jsii.tgz"); + super("@scope/jsii-calc-base-of-base", "2.1.1", $Module.class, "jsii-calc-base-of-base@2.1.1.jsii.tgz"); } @Override @@ -734,14 +772,27 @@ public interface IVeryBaseInterface extends software.amazon.jsii.JsiiSerializabl /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.baseofbase.IVeryBaseInterface { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.baseofbase.IVeryBaseInterface.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @Override - public void foo() { - this.jsiiCall("foo", software.amazon.jsii.NativeType.VOID); + public final void foo() { + software.amazon.jsii.Kernel.call(this, "foo", software.amazon.jsii.NativeType.VOID); + } + } + + /** + * Internal default implementation for {@link IVeryBaseInterface}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IVeryBaseInterface { + + @Override + default void foo() { + software.amazon.jsii.Kernel.call(this, "foo", software.amazon.jsii.NativeType.VOID); } } } @@ -798,7 +849,7 @@ public class Very extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.lang.Number hey() { - return this.jsiiCall("hey", java.lang.Number.class); + return software.amazon.jsii.Kernel.call(this, "hey", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } } @@ -850,6 +901,7 @@ public interface VeryBaseProps extends software.amazon.jsii.JsiiSerializable { /** * An implementation for {@link VeryBaseProps} */ + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements VeryBaseProps { private final software.amazon.jsii.tests.calculator.baseofbase.Very foo; @@ -859,23 +911,24 @@ public interface VeryBaseProps extends software.amazon.jsii.JsiiSerializable { */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.foo = this.jsiiGet("foo", software.amazon.jsii.tests.calculator.baseofbase.Very.class); + this.foo = software.amazon.jsii.Kernel.get(this, "foo", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.baseofbase.Very.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ - private Jsii$Proxy(final software.amazon.jsii.tests.calculator.baseofbase.Very foo) { + protected Jsii$Proxy(final software.amazon.jsii.tests.calculator.baseofbase.Very foo) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.foo = java.util.Objects.requireNonNull(foo, "foo is required"); } @Override - public software.amazon.jsii.tests.calculator.baseofbase.Very getFoo() { + public final software.amazon.jsii.tests.calculator.baseofbase.Very getFoo() { return this.foo; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -893,7 +946,7 @@ public interface VeryBaseProps extends software.amazon.jsii.JsiiSerializable { } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -903,7 +956,7 @@ public interface VeryBaseProps extends software.amazon.jsii.JsiiSerializable { } @Override - public int hashCode() { + public final int hashCode() { int result = this.foo.hashCode(); return result; } @@ -920,7 +973,7 @@ exports[`Generated code for "@scope/jsii-calc-base-of-base": /java/src/m `; -exports[`Generated code for "@scope/jsii-calc-base-of-base": /java/src/main/resources/software/amazon/jsii/tests/calculator/baseofbase/jsii-calc-base-of-base@0.0.0.jsii.tgz 1`] = `java/src/main/resources/software/amazon/jsii/tests/calculator/baseofbase/jsii-calc-base-of-base@0.0.0.jsii.tgz is a tarball`; +exports[`Generated code for "@scope/jsii-calc-base-of-base": /java/src/main/resources/software/amazon/jsii/tests/calculator/baseofbase/jsii-calc-base-of-base@2.1.1.jsii.tgz 1`] = `java/src/main/resources/software/amazon/jsii/tests/calculator/baseofbase/jsii-calc-base-of-base@2.1.1.jsii.tgz is a tarball`; exports[`Generated code for "@scope/jsii-calc-lib": / 1`] = ` @@ -1001,17 +1054,17 @@ exports[`Generated code for "@scope/jsii-calc-lib": /java/pom.xml 1`] = software.amazon.jsii.tests calculator-base - [0.0.0,0.0.1) + (,0.0.1) software.amazon.jsii.tests calculator-base-of-base - [0.0.0,0.0.1) + [2.1.1,3.0.0) software.amazon.jsii jsii-runtime - [0.0.0,0.0.1) + (,0.0.1) org.jetbrains @@ -1067,7 +1120,7 @@ exports[`Generated code for "@scope/jsii-calc-lib": /java/pom.xml 1`] = org.apache.maven.plugins maven-javadoc-plugin - 3.1.1 + 3.2.0 attach-javadocs @@ -1109,7 +1162,7 @@ exports[`Generated code for "@scope/jsii-calc-lib": /java/pom.xml 1`] = org.codehaus.mojo versions-maven-plugin - 2.7 + 2.8.1 false @@ -1141,7 +1194,8 @@ public interface IReflectable extends software.amazon.jsii.JsiiSerializable { /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.custom_submodule_name.IReflectable { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.custom_submodule_name.IReflectable.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -1151,8 +1205,24 @@ public interface IReflectable extends software.amazon.jsii.JsiiSerializable { @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated - public @org.jetbrains.annotations.NotNull java.util.List getEntries() { - return java.util.Collections.unmodifiableList(this.jsiiGet("entries", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.custom_submodule_name.ReflectableEntry.class)))); + public final @org.jetbrains.annotations.NotNull java.util.List getEntries() { + return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "entries", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.custom_submodule_name.ReflectableEntry.class)))); + } + } + + /** + * Internal default implementation for {@link IReflectable}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IReflectable { + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) + @Deprecated + default @org.jetbrains.annotations.NotNull java.util.List getEntries() { + return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "entries", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.custom_submodule_name.ReflectableEntry.class)))); } } } @@ -1208,7 +1278,7 @@ public class NestingClass extends software.amazon.jsii.JsiiObject { @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated public @org.jetbrains.annotations.NotNull java.lang.String getProperty() { - return this.jsiiGet("property", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "property", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } } /** @@ -1274,6 +1344,7 @@ public class NestingClass extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements NestedStruct { private final java.lang.String name; @@ -1283,23 +1354,24 @@ public class NestingClass extends software.amazon.jsii.JsiiObject { */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.name = this.jsiiGet("name", java.lang.String.class); + this.name = software.amazon.jsii.Kernel.get(this, "name", software.amazon.jsii.NativeType.forClass(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) { + protected 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() { + public final java.lang.String getName() { return this.name; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -1317,7 +1389,7 @@ public class NestingClass extends software.amazon.jsii.JsiiObject { } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -1327,7 +1399,7 @@ public class NestingClass extends software.amazon.jsii.JsiiObject { } @Override - public int hashCode() { + public final int hashCode() { int result = this.name.hashCode(); return result; } @@ -1420,6 +1492,7 @@ public interface ReflectableEntry extends software.amazon.jsii.JsiiSerializable */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ReflectableEntry { private final java.lang.String key; private final java.lang.Object value; @@ -1430,30 +1503,31 @@ public interface ReflectableEntry extends software.amazon.jsii.JsiiSerializable */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.key = this.jsiiGet("key", java.lang.String.class); - this.value = this.jsiiGet("value", java.lang.Object.class); + this.key = software.amazon.jsii.Kernel.get(this, "key", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + this.value = software.amazon.jsii.Kernel.get(this, "value", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ - private Jsii$Proxy(final java.lang.String key, final java.lang.Object value) { + protected Jsii$Proxy(final java.lang.String key, final java.lang.Object value) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.key = java.util.Objects.requireNonNull(key, "key is required"); this.value = java.util.Objects.requireNonNull(value, "value is required"); } @Override - public java.lang.String getKey() { + public final java.lang.String getKey() { return this.key; } @Override - public java.lang.Object getValue() { + public final java.lang.Object getValue() { return this.value; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -1472,7 +1546,7 @@ public interface ReflectableEntry extends software.amazon.jsii.JsiiSerializable } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -1483,7 +1557,7 @@ public interface ReflectableEntry extends software.amazon.jsii.JsiiSerializable } @Override - public int hashCode() { + public final int hashCode() { int result = this.key.hashCode(); result = 31 * result + (this.value.hashCode()); return result; @@ -1527,7 +1601,7 @@ public class Reflector extends software.amazon.jsii.JsiiObject { @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated public @org.jetbrains.annotations.NotNull java.util.Map asMap(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.custom_submodule_name.IReflectable reflectable) { - return java.util.Collections.unmodifiableMap(this.jsiiCall("asMap", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class)), new Object[] { java.util.Objects.requireNonNull(reflectable, "reflectable is required") })); + return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.call(this, "asMap", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class)), new Object[] { java.util.Objects.requireNonNull(reflectable, "reflectable is required") })); } } @@ -1553,6 +1627,7 @@ import java.util.Map; import software.amazon.jsii.JsiiModule; +@software.amazon.jsii.Internal public final class $Module extends JsiiModule { private static final Map MODULE_TYPES = load(); @@ -1661,7 +1736,8 @@ public interface IDoublable extends software.amazon.jsii.JsiiSerializable { /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.lib.IDoublable { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.lib.IDoublable.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -1671,8 +1747,24 @@ public interface IDoublable extends software.amazon.jsii.JsiiSerializable { @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated - public @org.jetbrains.annotations.NotNull java.lang.Number getDoubleValue() { - return this.jsiiGet("doubleValue", java.lang.Number.class); + public final @org.jetbrains.annotations.NotNull java.lang.Number getDoubleValue() { + return software.amazon.jsii.Kernel.get(this, "doubleValue", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); + } + } + + /** + * Internal default implementation for {@link IDoublable}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IDoublable { + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) + @Deprecated + default @org.jetbrains.annotations.NotNull java.lang.Number getDoubleValue() { + return software.amazon.jsii.Kernel.get(this, "doubleValue", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } } } @@ -1705,7 +1797,8 @@ public interface IFriendly extends software.amazon.jsii.JsiiSerializable { /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.lib.IFriendly { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.lib.IFriendly.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -1716,8 +1809,25 @@ public interface IFriendly extends software.amazon.jsii.JsiiSerializable { @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated @Override - public @org.jetbrains.annotations.NotNull java.lang.String hello() { - return this.jsiiCall("hello", java.lang.String.class); + public final @org.jetbrains.annotations.NotNull java.lang.String hello() { + return software.amazon.jsii.Kernel.call(this, "hello", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + } + } + + /** + * Internal default implementation for {@link IFriendly}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IFriendly { + + /** + * (deprecated) Say hello! + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) + @Deprecated + @Override + default @org.jetbrains.annotations.NotNull java.lang.String hello() { + return software.amazon.jsii.Kernel.call(this, "hello", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } } } @@ -1749,28 +1859,55 @@ public interface IThreeLevelsInterface extends software.amazon.jsii.JsiiSerializ /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.lib.IThreeLevelsInterface { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.lib.IThreeLevelsInterface.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } + @Override + public final void foo() { + software.amazon.jsii.Kernel.call(this, "foo", software.amazon.jsii.NativeType.VOID); + } + + @Override + public final void bar() { + software.amazon.jsii.Kernel.call(this, "bar", software.amazon.jsii.NativeType.VOID); + } + /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated @Override - public void baz() { - this.jsiiCall("baz", software.amazon.jsii.NativeType.VOID); + public final void baz() { + software.amazon.jsii.Kernel.call(this, "baz", software.amazon.jsii.NativeType.VOID); + } + } + + /** + * Internal default implementation for {@link IThreeLevelsInterface}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IThreeLevelsInterface, software.amazon.jsii.tests.calculator.baseofbase.IVeryBaseInterface.Jsii$Default { + + @Override + default void foo() { + software.amazon.jsii.Kernel.call(this, "foo", software.amazon.jsii.NativeType.VOID); } @Override - public void bar() { - this.jsiiCall("bar", software.amazon.jsii.NativeType.VOID); + default void bar() { + software.amazon.jsii.Kernel.call(this, "bar", software.amazon.jsii.NativeType.VOID); } + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) + @Deprecated @Override - public void foo() { - this.jsiiCall("foo", software.amazon.jsii.NativeType.VOID); + default void baz() { + software.amazon.jsii.Kernel.call(this, "baz", software.amazon.jsii.NativeType.VOID); } } } @@ -1884,6 +2021,7 @@ public interface MyFirstStruct extends software.amazon.jsii.JsiiSerializable { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements MyFirstStruct { private final java.lang.Number anumber; private final java.lang.String astring; @@ -1895,15 +2033,15 @@ public interface MyFirstStruct extends software.amazon.jsii.JsiiSerializable { */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.anumber = this.jsiiGet("anumber", java.lang.Number.class); - this.astring = this.jsiiGet("astring", java.lang.String.class); - this.firstOptional = this.jsiiGet("firstOptional", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class))); + this.anumber = software.amazon.jsii.Kernel.get(this, "anumber", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); + this.astring = software.amazon.jsii.Kernel.get(this, "astring", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + this.firstOptional = software.amazon.jsii.Kernel.get(this, "firstOptional", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(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.Number anumber, final java.lang.String astring, final java.util.List firstOptional) { + protected Jsii$Proxy(final java.lang.Number anumber, final java.lang.String astring, final java.util.List firstOptional) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.anumber = java.util.Objects.requireNonNull(anumber, "anumber is required"); this.astring = java.util.Objects.requireNonNull(astring, "astring is required"); @@ -1911,21 +2049,22 @@ public interface MyFirstStruct extends software.amazon.jsii.JsiiSerializable { } @Override - public java.lang.Number getAnumber() { + public final java.lang.Number getAnumber() { return this.anumber; } @Override - public java.lang.String getAstring() { + public final java.lang.String getAstring() { return this.astring; } @Override - public java.util.List getFirstOptional() { + public final java.util.List getFirstOptional() { return this.firstOptional; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -1947,7 +2086,7 @@ public interface MyFirstStruct extends software.amazon.jsii.JsiiSerializable { } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -1959,7 +2098,7 @@ public interface MyFirstStruct extends software.amazon.jsii.JsiiSerializable { } @Override - public int hashCode() { + public final int hashCode() { int result = this.anumber.hashCode(); result = 31 * result + (this.astring.hashCode()); result = 31 * result + (this.firstOptional != null ? this.firstOptional.hashCode() : 0); @@ -2009,7 +2148,7 @@ public class Number extends software.amazon.jsii.tests.calculator.lib.NumericVal @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated public @org.jetbrains.annotations.NotNull java.lang.Number getDoubleValue() { - return this.jsiiGet("doubleValue", java.lang.Number.class); + return software.amazon.jsii.Kernel.get(this, "doubleValue", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** @@ -2019,7 +2158,7 @@ public class Number extends software.amazon.jsii.tests.calculator.lib.NumericVal @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); + return software.amazon.jsii.Kernel.get(this, "value", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } } @@ -2056,7 +2195,7 @@ public abstract class NumericValue extends software.amazon.jsii.tests.calculator @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); + return software.amazon.jsii.Kernel.call(this, "toString", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** @@ -2069,7 +2208,8 @@ public abstract class NumericValue extends software.amazon.jsii.tests.calculator /** * 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 { + @software.amazon.jsii.Internal + private static final class Jsii$Proxy extends software.amazon.jsii.tests.calculator.lib.NumericValue { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -2080,8 +2220,8 @@ public abstract class NumericValue extends software.amazon.jsii.tests.calculator @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); + public final @org.jetbrains.annotations.NotNull java.lang.Number getValue() { + return software.amazon.jsii.Kernel.get(this, "value", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } } } @@ -2124,7 +2264,8 @@ public abstract class Operation extends software.amazon.jsii.tests.calculator.li /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.tests.calculator.lib.Operation { + @software.amazon.jsii.Internal + private static final class Jsii$Proxy extends software.amazon.jsii.tests.calculator.lib.Operation { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -2135,8 +2276,8 @@ public abstract class Operation extends software.amazon.jsii.tests.calculator.li @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); + public final @org.jetbrains.annotations.NotNull java.lang.Number getValue() { + return software.amazon.jsii.Kernel.get(this, "value", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** @@ -2145,8 +2286,8 @@ public abstract class Operation extends software.amazon.jsii.tests.calculator.li @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated @Override - public @org.jetbrains.annotations.NotNull java.lang.String toString() { - return this.jsiiCall("toString", java.lang.String.class); + public final @org.jetbrains.annotations.NotNull java.lang.String toString() { + return software.amazon.jsii.Kernel.call(this, "toString", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } } } @@ -2263,6 +2404,7 @@ public interface StructWithOnlyOptionals extends software.amazon.jsii.JsiiSerial */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements StructWithOnlyOptionals { private final java.lang.String optional1; private final java.lang.Number optional2; @@ -2274,15 +2416,15 @@ public interface StructWithOnlyOptionals extends software.amazon.jsii.JsiiSerial */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.optional1 = this.jsiiGet("optional1", java.lang.String.class); - this.optional2 = this.jsiiGet("optional2", java.lang.Number.class); - this.optional3 = this.jsiiGet("optional3", java.lang.Boolean.class); + this.optional1 = software.amazon.jsii.Kernel.get(this, "optional1", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + this.optional2 = software.amazon.jsii.Kernel.get(this, "optional2", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); + this.optional3 = software.amazon.jsii.Kernel.get(this, "optional3", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ - private Jsii$Proxy(final java.lang.String optional1, final java.lang.Number optional2, final java.lang.Boolean optional3) { + protected Jsii$Proxy(final java.lang.String optional1, final java.lang.Number optional2, final java.lang.Boolean optional3) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.optional1 = optional1; this.optional2 = optional2; @@ -2290,21 +2432,22 @@ public interface StructWithOnlyOptionals extends software.amazon.jsii.JsiiSerial } @Override - public java.lang.String getOptional1() { + public final java.lang.String getOptional1() { return this.optional1; } @Override - public java.lang.Number getOptional2() { + public final java.lang.Number getOptional2() { return this.optional2; } @Override - public java.lang.Boolean getOptional3() { + public final java.lang.Boolean getOptional3() { return this.optional3; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -2330,7 +2473,7 @@ public interface StructWithOnlyOptionals extends software.amazon.jsii.JsiiSerial } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -2342,7 +2485,7 @@ public interface StructWithOnlyOptionals extends software.amazon.jsii.JsiiSerial } @Override - public int hashCode() { + public final int hashCode() { int result = this.optional1 != null ? this.optional1.hashCode() : 0; result = 31 * result + (this.optional2 != null ? this.optional2.hashCode() : 0); result = 31 * result + (this.optional3 != null ? this.optional3.hashCode() : 0); @@ -2583,6 +2726,8 @@ exports[`Generated code for "jsii-calc": / 1`] = ` โ”ƒ โ”ฃโ” ๐Ÿ“„ StableEnum.java โ”ƒ โ”ฃโ” ๐Ÿ“„ StableStruct.java โ”ƒ โ”ฃโ” ๐Ÿ“„ StaticContext.java + โ”ƒ โ”ฃโ” ๐Ÿ“„ StaticHelloChild.java + โ”ƒ โ”ฃโ” ๐Ÿ“„ StaticHelloParent.java โ”ƒ โ”ฃโ” ๐Ÿ“„ Statics.java โ”ƒ โ”ฃโ” ๐Ÿ“„ StringEnum.java โ”ƒ โ”ฃโ” ๐Ÿ“„ StripInternal.java @@ -2607,10 +2752,14 @@ exports[`Generated code for "jsii-calc": / 1`] = ` โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“ isolated โ”ƒ โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ Kwargs.java โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“„ MyClass.java - โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ nested_submodule - โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“ deeply_nested - โ”ƒ โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ INamespaced.java - โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ Namespaced.java + โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“ nested_submodule + โ”ƒ โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“ deeply_nested + โ”ƒ โ”ƒ โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ INamespaced.java + โ”ƒ โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ Namespaced.java + โ”ƒ โ”ƒ โ”ฃโ” ๐Ÿ“ param + โ”ƒ โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ SpecialParameter.java + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“ returnsparam + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ ReturnsSpecialParameter.java โ”ƒ โ”ฃโ” ๐Ÿ“„ Sum.java โ”ƒ โ”ฃโ” ๐Ÿ“„ SupportsNiceJavaBuilder.java โ”ƒ โ”ฃโ” ๐Ÿ“„ SupportsNiceJavaBuilderProps.java @@ -2637,7 +2786,7 @@ exports[`Generated code for "jsii-calc": / 1`] = ` โ”—โ” ๐Ÿ“ tests โ”—โ” ๐Ÿ“ calculator โ”ฃโ” ๐Ÿ“„ $Module.txt - โ”—โ” ๐Ÿ“„ jsii-calc@0.0.0.jsii.tgz + โ”—โ” ๐Ÿ“„ jsii-calc@3.20.120.jsii.tgz `; exports[`Generated code for "jsii-calc": /java/pom.xml 1`] = ` @@ -2691,7 +2840,7 @@ exports[`Generated code for "jsii-calc": /java/pom.xml 1`] = ` software.amazon.jsii.tests calculator - 0.0.0 + 3.20.120 jar UTF-8 @@ -2700,22 +2849,17 @@ exports[`Generated code for "jsii-calc": /java/pom.xml 1`] = ` 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) + (,0.0.1) software.amazon.jsii.tests calculator-lib - [0.0.0.DEVPREVIEW,0.0.1.DEVPREVIEW) + (,0.0.1.DEVPREVIEW) software.amazon.jsii jsii-runtime - [0.0.0,0.0.1) + (,0.0.1) org.jetbrains @@ -2771,7 +2915,7 @@ exports[`Generated code for "jsii-calc": /java/pom.xml 1`] = ` org.apache.maven.plugins maven-javadoc-plugin - 3.1.1 + 3.2.0 attach-javadocs @@ -2813,7 +2957,7 @@ exports[`Generated code for "jsii-calc": /java/pom.xml 1`] = ` org.codehaus.mojo versions-maven-plugin - 2.7 + 2.8.1 false @@ -2844,6 +2988,7 @@ import java.util.Map; import software.amazon.jsii.JsiiModule; +@software.amazon.jsii.Internal public final class $Module extends JsiiModule { private static final Map MODULE_TYPES = load(); @@ -2871,12 +3016,12 @@ public final class $Module extends JsiiModule { private final Map> cache = new HashMap<>(); public $Module() { - super("jsii-calc", "0.0.0", $Module.class, "jsii-calc@0.0.0.jsii.tgz"); + super("jsii-calc", "3.20.120", $Module.class, "jsii-calc@3.20.120.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); + return asList(software.amazon.jsii.tests.calculator.base.$Module.class, software.amazon.jsii.tests.calculator.lib.$Module.class); } @Override @@ -2939,7 +3084,7 @@ public abstract class AbstractClass extends software.amazon.jsii.tests.calculato */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number nonAbstractMethod() { - return this.jsiiCall("nonAbstractMethod", java.lang.Number.class); + return software.amazon.jsii.Kernel.call(this, "nonAbstractMethod", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** @@ -2947,13 +3092,14 @@ public abstract class AbstractClass extends software.amazon.jsii.tests.calculato @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getPropFromInterface() { - return this.jsiiGet("propFromInterface", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "propFromInterface", software.amazon.jsii.NativeType.forClass(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 { + @software.amazon.jsii.Internal + private static final class Jsii$Proxy extends software.amazon.jsii.tests.calculator.AbstractClass implements software.amazon.jsii.tests.calculator.IInterfaceImplementedByAbstractClass.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -2962,16 +3108,8 @@ public abstract class AbstractClass extends software.amazon.jsii.tests.calculato */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public @org.jetbrains.annotations.NotNull java.lang.String getPropFromInterface() { - return this.jsiiGet("propFromInterface", java.lang.String.class); - } - - /** - */ - @Override - @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public @org.jetbrains.annotations.NotNull java.lang.String getAbstractProperty() { - return this.jsiiGet("abstractProperty", java.lang.String.class); + public final @org.jetbrains.annotations.NotNull java.lang.String getAbstractProperty() { + return software.amazon.jsii.Kernel.get(this, "abstractProperty", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** @@ -2979,8 +3117,8 @@ public abstract class AbstractClass extends software.amazon.jsii.tests.calculato */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - public @org.jetbrains.annotations.NotNull java.lang.String abstractMethod(final @org.jetbrains.annotations.NotNull java.lang.String name) { - return this.jsiiCall("abstractMethod", java.lang.String.class, new Object[] { java.util.Objects.requireNonNull(name, "name is required") }); + public final @org.jetbrains.annotations.NotNull java.lang.String abstractMethod(final @org.jetbrains.annotations.NotNull java.lang.String name) { + return software.amazon.jsii.Kernel.call(this, "abstractMethod", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(name, "name is required") }); } } } @@ -3021,7 +3159,8 @@ public abstract class AbstractClassBase extends software.amazon.jsii.JsiiObject /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.tests.calculator.AbstractClassBase { + @software.amazon.jsii.Internal + private static final class Jsii$Proxy extends software.amazon.jsii.tests.calculator.AbstractClassBase { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -3030,8 +3169,8 @@ public abstract class AbstractClassBase extends software.amazon.jsii.JsiiObject */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public @org.jetbrains.annotations.NotNull java.lang.String getAbstractProperty() { - return this.jsiiGet("abstractProperty", java.lang.String.class); + public final @org.jetbrains.annotations.NotNull java.lang.String getAbstractProperty() { + return software.amazon.jsii.Kernel.get(this, "abstractProperty", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } } } @@ -3068,21 +3207,21 @@ public class AbstractClassReturner extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.AbstractClass giveMeAbstract() { - return this.jsiiCall("giveMeAbstract", software.amazon.jsii.tests.calculator.AbstractClass.class); + return software.amazon.jsii.Kernel.call(this, "giveMeAbstract", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.AbstractClass.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.IInterfaceImplementedByAbstractClass giveMeInterface() { - return this.jsiiCall("giveMeInterface", software.amazon.jsii.tests.calculator.IInterfaceImplementedByAbstractClass.class); + return software.amazon.jsii.Kernel.call(this, "giveMeInterface", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.IInterfaceImplementedByAbstractClass.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.AbstractClassBase getReturnAbstractFromProperty() { - return this.jsiiGet("returnAbstractFromProperty", software.amazon.jsii.tests.calculator.AbstractClassBase.class); + return software.amazon.jsii.Kernel.get(this, "returnAbstractFromProperty", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.AbstractClassBase.class)); } } @@ -3128,7 +3267,7 @@ public abstract class AbstractSuite extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String workItAll(final @org.jetbrains.annotations.NotNull java.lang.String seed) { - return this.jsiiCall("workItAll", java.lang.String.class, new Object[] { java.util.Objects.requireNonNull(seed, "seed is required") }); + return software.amazon.jsii.Kernel.call(this, "workItAll", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(seed, "seed is required") }); } /** @@ -3144,7 +3283,8 @@ public abstract class AbstractSuite extends software.amazon.jsii.JsiiObject { /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.tests.calculator.AbstractSuite { + @software.amazon.jsii.Internal + private static final class Jsii$Proxy extends software.amazon.jsii.tests.calculator.AbstractSuite { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -3153,16 +3293,16 @@ public abstract class AbstractSuite extends software.amazon.jsii.JsiiObject { */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - protected @org.jetbrains.annotations.NotNull java.lang.String getProperty() { - return this.jsiiGet("property", java.lang.String.class); + protected final @org.jetbrains.annotations.NotNull java.lang.String getProperty() { + return software.amazon.jsii.Kernel.get(this, "property", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - protected void setProperty(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiSet("property", java.util.Objects.requireNonNull(value, "property is required")); + protected final void setProperty(final @org.jetbrains.annotations.NotNull java.lang.String value) { + software.amazon.jsii.Kernel.set(this, "property", java.util.Objects.requireNonNull(value, "property is required")); } /** @@ -3170,8 +3310,8 @@ public abstract class AbstractSuite extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - protected @org.jetbrains.annotations.NotNull java.lang.String someMethod(final @org.jetbrains.annotations.NotNull java.lang.String str) { - return this.jsiiCall("someMethod", java.lang.String.class, new Object[] { java.util.Objects.requireNonNull(str, "str is required") }); + protected final @org.jetbrains.annotations.NotNull java.lang.String someMethod(final @org.jetbrains.annotations.NotNull java.lang.String str) { + return software.amazon.jsii.Kernel.call(this, "someMethod", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(str, "str is required") }); } } } @@ -3215,7 +3355,7 @@ public class Add extends software.amazon.jsii.tests.calculator.BinaryOperation { @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public @org.jetbrains.annotations.NotNull java.lang.String toString() { - return this.jsiiCall("toString", java.lang.String.class); + return software.amazon.jsii.Kernel.call(this, "toString", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** @@ -3224,7 +3364,7 @@ public class Add extends software.amazon.jsii.tests.calculator.BinaryOperation { @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number getValue() { - return this.jsiiGet("value", java.lang.Number.class); + return software.amazon.jsii.Kernel.get(this, "value", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } } @@ -3265,14 +3405,14 @@ public class AllTypes extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void anyIn(final @org.jetbrains.annotations.NotNull java.lang.Object inp) { - this.jsiiCall("anyIn", software.amazon.jsii.NativeType.VOID, new Object[] { inp }); + software.amazon.jsii.Kernel.call(this, "anyIn", software.amazon.jsii.NativeType.VOID, new Object[] { inp }); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Object anyOut() { - return this.jsiiCall("anyOut", java.lang.Object.class); + return software.amazon.jsii.Kernel.call(this, "anyOut", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); } /** @@ -3280,287 +3420,287 @@ public class AllTypes extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.StringEnum enumMethod(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.StringEnum value) { - return this.jsiiCall("enumMethod", software.amazon.jsii.tests.calculator.StringEnum.class, new Object[] { java.util.Objects.requireNonNull(value, "value is required") }); + return software.amazon.jsii.Kernel.call(this, "enumMethod", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.StringEnum.class), new Object[] { java.util.Objects.requireNonNull(value, "value is required") }); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number getEnumPropertyValue() { - return this.jsiiGet("enumPropertyValue", java.lang.Number.class); + return software.amazon.jsii.Kernel.get(this, "enumPropertyValue", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.util.List getAnyArrayProperty() { - return java.util.Collections.unmodifiableList(this.jsiiGet("anyArrayProperty", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class)))); + return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "anyArrayProperty", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class)))); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setAnyArrayProperty(final @org.jetbrains.annotations.NotNull java.util.List value) { - this.jsiiSet("anyArrayProperty", java.util.Objects.requireNonNull(value, "anyArrayProperty is required")); + software.amazon.jsii.Kernel.set(this, "anyArrayProperty", java.util.Objects.requireNonNull(value, "anyArrayProperty is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.util.Map getAnyMapProperty() { - return java.util.Collections.unmodifiableMap(this.jsiiGet("anyMapProperty", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class)))); + return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.get(this, "anyMapProperty", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class)))); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setAnyMapProperty(final @org.jetbrains.annotations.NotNull java.util.Map value) { - this.jsiiSet("anyMapProperty", java.util.Objects.requireNonNull(value, "anyMapProperty is required")); + software.amazon.jsii.Kernel.set(this, "anyMapProperty", java.util.Objects.requireNonNull(value, "anyMapProperty is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Object getAnyProperty() { - return this.jsiiGet("anyProperty", java.lang.Object.class); + return software.amazon.jsii.Kernel.get(this, "anyProperty", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setAnyProperty(final @org.jetbrains.annotations.NotNull java.lang.Object value) { - this.jsiiSet("anyProperty", java.util.Objects.requireNonNull(value, "anyProperty is required")); + software.amazon.jsii.Kernel.set(this, "anyProperty", java.util.Objects.requireNonNull(value, "anyProperty is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.util.List getArrayProperty() { - return java.util.Collections.unmodifiableList(this.jsiiGet("arrayProperty", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)))); + return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "arrayProperty", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)))); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setArrayProperty(final @org.jetbrains.annotations.NotNull java.util.List value) { - this.jsiiSet("arrayProperty", java.util.Objects.requireNonNull(value, "arrayProperty is required")); + software.amazon.jsii.Kernel.set(this, "arrayProperty", java.util.Objects.requireNonNull(value, "arrayProperty is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Boolean getBooleanProperty() { - return this.jsiiGet("booleanProperty", java.lang.Boolean.class); + return software.amazon.jsii.Kernel.get(this, "booleanProperty", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setBooleanProperty(final @org.jetbrains.annotations.NotNull java.lang.Boolean value) { - this.jsiiSet("booleanProperty", java.util.Objects.requireNonNull(value, "booleanProperty is required")); + software.amazon.jsii.Kernel.set(this, "booleanProperty", java.util.Objects.requireNonNull(value, "booleanProperty is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.time.Instant getDateProperty() { - return this.jsiiGet("dateProperty", java.time.Instant.class); + return software.amazon.jsii.Kernel.get(this, "dateProperty", software.amazon.jsii.NativeType.forClass(java.time.Instant.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setDateProperty(final @org.jetbrains.annotations.NotNull java.time.Instant value) { - this.jsiiSet("dateProperty", java.util.Objects.requireNonNull(value, "dateProperty is required")); + software.amazon.jsii.Kernel.set(this, "dateProperty", java.util.Objects.requireNonNull(value, "dateProperty is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.AllTypesEnum getEnumProperty() { - return this.jsiiGet("enumProperty", software.amazon.jsii.tests.calculator.AllTypesEnum.class); + return software.amazon.jsii.Kernel.get(this, "enumProperty", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.AllTypesEnum.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setEnumProperty(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.AllTypesEnum value) { - this.jsiiSet("enumProperty", java.util.Objects.requireNonNull(value, "enumProperty is required")); + software.amazon.jsii.Kernel.set(this, "enumProperty", java.util.Objects.requireNonNull(value, "enumProperty is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull com.fasterxml.jackson.databind.node.ObjectNode getJsonProperty() { - return this.jsiiGet("jsonProperty", com.fasterxml.jackson.databind.node.ObjectNode.class); + return software.amazon.jsii.Kernel.get(this, "jsonProperty", software.amazon.jsii.NativeType.forClass(com.fasterxml.jackson.databind.node.ObjectNode.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setJsonProperty(final @org.jetbrains.annotations.NotNull com.fasterxml.jackson.databind.node.ObjectNode value) { - this.jsiiSet("jsonProperty", java.util.Objects.requireNonNull(value, "jsonProperty is required")); + software.amazon.jsii.Kernel.set(this, "jsonProperty", java.util.Objects.requireNonNull(value, "jsonProperty is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.util.Map getMapProperty() { - return java.util.Collections.unmodifiableMap(this.jsiiGet("mapProperty", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.lib.Number.class)))); + return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.get(this, "mapProperty", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.lib.Number.class)))); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setMapProperty(final @org.jetbrains.annotations.NotNull java.util.Map value) { - this.jsiiSet("mapProperty", java.util.Objects.requireNonNull(value, "mapProperty is required")); + software.amazon.jsii.Kernel.set(this, "mapProperty", java.util.Objects.requireNonNull(value, "mapProperty is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number getNumberProperty() { - return this.jsiiGet("numberProperty", java.lang.Number.class); + return software.amazon.jsii.Kernel.get(this, "numberProperty", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setNumberProperty(final @org.jetbrains.annotations.NotNull java.lang.Number value) { - this.jsiiSet("numberProperty", java.util.Objects.requireNonNull(value, "numberProperty is required")); + software.amazon.jsii.Kernel.set(this, "numberProperty", java.util.Objects.requireNonNull(value, "numberProperty is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getStringProperty() { - return this.jsiiGet("stringProperty", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "stringProperty", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setStringProperty(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiSet("stringProperty", java.util.Objects.requireNonNull(value, "stringProperty is required")); + software.amazon.jsii.Kernel.set(this, "stringProperty", java.util.Objects.requireNonNull(value, "stringProperty is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.util.List getUnionArrayProperty() { - return java.util.Collections.unmodifiableList(this.jsiiGet("unionArrayProperty", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class)))); + return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "unionArrayProperty", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class)))); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setUnionArrayProperty(final @org.jetbrains.annotations.NotNull java.util.List value) { - this.jsiiSet("unionArrayProperty", java.util.Objects.requireNonNull(value, "unionArrayProperty is required")); + software.amazon.jsii.Kernel.set(this, "unionArrayProperty", java.util.Objects.requireNonNull(value, "unionArrayProperty is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.util.Map getUnionMapProperty() { - return java.util.Collections.unmodifiableMap(this.jsiiGet("unionMapProperty", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class)))); + return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.get(this, "unionMapProperty", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class)))); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setUnionMapProperty(final @org.jetbrains.annotations.NotNull java.util.Map value) { - this.jsiiSet("unionMapProperty", java.util.Objects.requireNonNull(value, "unionMapProperty is required")); + software.amazon.jsii.Kernel.set(this, "unionMapProperty", java.util.Objects.requireNonNull(value, "unionMapProperty is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Object getUnionProperty() { - return this.jsiiGet("unionProperty", java.lang.Object.class); + return software.amazon.jsii.Kernel.get(this, "unionProperty", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setUnionProperty(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiSet("unionProperty", java.util.Objects.requireNonNull(value, "unionProperty is required")); + software.amazon.jsii.Kernel.set(this, "unionProperty", java.util.Objects.requireNonNull(value, "unionProperty is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setUnionProperty(final @org.jetbrains.annotations.NotNull java.lang.Number value) { - this.jsiiSet("unionProperty", java.util.Objects.requireNonNull(value, "unionProperty is required")); + software.amazon.jsii.Kernel.set(this, "unionProperty", java.util.Objects.requireNonNull(value, "unionProperty is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setUnionProperty(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.Multiply value) { - this.jsiiSet("unionProperty", java.util.Objects.requireNonNull(value, "unionProperty is required")); + software.amazon.jsii.Kernel.set(this, "unionProperty", java.util.Objects.requireNonNull(value, "unionProperty is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setUnionProperty(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.Number value) { - this.jsiiSet("unionProperty", java.util.Objects.requireNonNull(value, "unionProperty is required")); + software.amazon.jsii.Kernel.set(this, "unionProperty", java.util.Objects.requireNonNull(value, "unionProperty is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.util.List getUnknownArrayProperty() { - return java.util.Collections.unmodifiableList(this.jsiiGet("unknownArrayProperty", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class)))); + return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "unknownArrayProperty", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class)))); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setUnknownArrayProperty(final @org.jetbrains.annotations.NotNull java.util.List value) { - this.jsiiSet("unknownArrayProperty", java.util.Objects.requireNonNull(value, "unknownArrayProperty is required")); + software.amazon.jsii.Kernel.set(this, "unknownArrayProperty", java.util.Objects.requireNonNull(value, "unknownArrayProperty is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.util.Map getUnknownMapProperty() { - return java.util.Collections.unmodifiableMap(this.jsiiGet("unknownMapProperty", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class)))); + return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.get(this, "unknownMapProperty", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class)))); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setUnknownMapProperty(final @org.jetbrains.annotations.NotNull java.util.Map value) { - this.jsiiSet("unknownMapProperty", java.util.Objects.requireNonNull(value, "unknownMapProperty is required")); + software.amazon.jsii.Kernel.set(this, "unknownMapProperty", java.util.Objects.requireNonNull(value, "unknownMapProperty is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Object getUnknownProperty() { - return this.jsiiGet("unknownProperty", java.lang.Object.class); + return software.amazon.jsii.Kernel.get(this, "unknownProperty", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setUnknownProperty(final @org.jetbrains.annotations.NotNull java.lang.Object value) { - this.jsiiSet("unknownProperty", java.util.Objects.requireNonNull(value, "unknownProperty is required")); + software.amazon.jsii.Kernel.set(this, "unknownProperty", java.util.Objects.requireNonNull(value, "unknownProperty is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.Nullable software.amazon.jsii.tests.calculator.StringEnum getOptionalEnumValue() { - return this.jsiiGet("optionalEnumValue", software.amazon.jsii.tests.calculator.StringEnum.class); + return software.amazon.jsii.Kernel.get(this, "optionalEnumValue", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.StringEnum.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setOptionalEnumValue(final @org.jetbrains.annotations.Nullable software.amazon.jsii.tests.calculator.StringEnum value) { - this.jsiiSet("optionalEnumValue", value); + software.amazon.jsii.Kernel.set(this, "optionalEnumValue", value); } } @@ -3623,7 +3763,7 @@ public class AllowedMethodNames extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void getBar(final @org.jetbrains.annotations.NotNull java.lang.String _p1, final @org.jetbrains.annotations.NotNull java.lang.Number _p2) { - this.jsiiCall("getBar", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(_p1, "_p1 is required"), java.util.Objects.requireNonNull(_p2, "_p2 is required") }); + software.amazon.jsii.Kernel.call(this, "getBar", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(_p1, "_p1 is required"), java.util.Objects.requireNonNull(_p2, "_p2 is required") }); } /** @@ -3633,7 +3773,7 @@ public class AllowedMethodNames extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getFoo(final @org.jetbrains.annotations.NotNull java.lang.String withParam) { - return this.jsiiCall("getFoo", java.lang.String.class, new Object[] { java.util.Objects.requireNonNull(withParam, "withParam is required") }); + return software.amazon.jsii.Kernel.call(this, "getFoo", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(withParam, "withParam is required") }); } /** @@ -3643,7 +3783,7 @@ public class AllowedMethodNames extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setBar(final @org.jetbrains.annotations.NotNull java.lang.String _x, final @org.jetbrains.annotations.NotNull java.lang.Number _y, final @org.jetbrains.annotations.NotNull java.lang.Boolean _z) { - this.jsiiCall("setBar", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(_x, "_x is required"), java.util.Objects.requireNonNull(_y, "_y is required"), java.util.Objects.requireNonNull(_z, "_z is required") }); + software.amazon.jsii.Kernel.call(this, "setBar", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(_x, "_x is required"), java.util.Objects.requireNonNull(_y, "_y is required"), java.util.Objects.requireNonNull(_z, "_z is required") }); } /** @@ -3654,7 +3794,7 @@ public class AllowedMethodNames extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setFoo(final @org.jetbrains.annotations.NotNull java.lang.String _x, final @org.jetbrains.annotations.NotNull java.lang.Number _y) { - this.jsiiCall("setFoo", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(_x, "_x is required"), java.util.Objects.requireNonNull(_y, "_y is required") }); + software.amazon.jsii.Kernel.call(this, "setFoo", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(_x, "_x is required"), java.util.Objects.requireNonNull(_y, "_y is required") }); } } @@ -3692,14 +3832,14 @@ public class AmbiguousParameters extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.StructParameterType getProps() { - return this.jsiiGet("props", software.amazon.jsii.tests.calculator.StructParameterType.class); + return software.amazon.jsii.Kernel.get(this, "props", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.StructParameterType.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.Bell getScope() { - return this.jsiiGet("scope", software.amazon.jsii.tests.calculator.Bell.class); + return software.amazon.jsii.Kernel.get(this, "scope", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.Bell.class)); } /** @@ -3791,7 +3931,7 @@ public class AnonymousImplementationProvider extends software.amazon.jsii.JsiiOb @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.Implementation provideAsClass() { - return this.jsiiCall("provideAsClass", software.amazon.jsii.tests.calculator.Implementation.class); + return software.amazon.jsii.Kernel.call(this, "provideAsClass", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.Implementation.class)); } /** @@ -3799,7 +3939,7 @@ public class AnonymousImplementationProvider extends software.amazon.jsii.JsiiOb @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.IAnonymouslyImplementMe provideAsInterface() { - return this.jsiiCall("provideAsInterface", software.amazon.jsii.tests.calculator.IAnonymouslyImplementMe.class); + return software.amazon.jsii.Kernel.call(this, "provideAsInterface", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.IAnonymouslyImplementMe.class)); } } @@ -3835,7 +3975,7 @@ public class AsyncVirtualMethods extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number callMe() { - return this.jsiiAsyncCall("callMe", java.lang.Number.class); + return software.amazon.jsii.Kernel.asyncCall(this, "callMe", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** @@ -3843,7 +3983,7 @@ public class AsyncVirtualMethods extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number callMe2() { - return this.jsiiAsyncCall("callMe2", java.lang.Number.class); + return software.amazon.jsii.Kernel.asyncCall(this, "callMe2", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** @@ -3855,14 +3995,14 @@ public class AsyncVirtualMethods extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number callMeDoublePromise() { - return this.jsiiAsyncCall("callMeDoublePromise", java.lang.Number.class); + return software.amazon.jsii.Kernel.asyncCall(this, "callMeDoublePromise", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number dontOverrideMe() { - return this.jsiiCall("dontOverrideMe", java.lang.Number.class); + return software.amazon.jsii.Kernel.call(this, "dontOverrideMe", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** @@ -3870,14 +4010,14 @@ public class AsyncVirtualMethods extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number overrideMe(final @org.jetbrains.annotations.NotNull java.lang.Number mult) { - return this.jsiiAsyncCall("overrideMe", java.lang.Number.class, new Object[] { java.util.Objects.requireNonNull(mult, "mult is required") }); + return software.amazon.jsii.Kernel.asyncCall(this, "overrideMe", software.amazon.jsii.NativeType.forClass(java.lang.Number.class), new Object[] { java.util.Objects.requireNonNull(mult, "mult is required") }); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number overrideMeToo() { - return this.jsiiAsyncCall("overrideMeToo", java.lang.Number.class); + return software.amazon.jsii.Kernel.asyncCall(this, "overrideMeToo", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } } @@ -3913,14 +4053,14 @@ public class AugmentableClass extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void methodOne() { - this.jsiiCall("methodOne", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "methodOne", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void methodTwo() { - this.jsiiCall("methodTwo", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "methodTwo", software.amazon.jsii.NativeType.VOID); } } @@ -3986,21 +4126,21 @@ public class Bell extends software.amazon.jsii.JsiiObject implements software.am @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public void ring() { - this.jsiiCall("ring", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "ring", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Boolean getRung() { - return this.jsiiGet("rung", java.lang.Boolean.class); + return software.amazon.jsii.Kernel.get(this, "rung", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setRung(final @org.jetbrains.annotations.NotNull java.lang.Boolean value) { - this.jsiiSet("rung", java.util.Objects.requireNonNull(value, "rung is required")); + software.amazon.jsii.Kernel.set(this, "rung", java.util.Objects.requireNonNull(value, "rung is required")); } } @@ -4043,7 +4183,7 @@ public abstract class BinaryOperation extends software.amazon.jsii.tests.calcula @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public @org.jetbrains.annotations.NotNull java.lang.String hello() { - return this.jsiiCall("hello", java.lang.String.class); + return software.amazon.jsii.Kernel.call(this, "hello", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** @@ -4051,7 +4191,7 @@ public abstract class BinaryOperation extends software.amazon.jsii.tests.calcula */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) 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); + return software.amazon.jsii.Kernel.get(this, "lhs", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.lib.NumericValue.class)); } /** @@ -4059,13 +4199,14 @@ public abstract class BinaryOperation extends software.amazon.jsii.tests.calcula */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) 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); + return software.amazon.jsii.Kernel.get(this, "rhs", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.lib.NumericValue.class)); } /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.tests.calculator.BinaryOperation { + @software.amazon.jsii.Internal + private static final class Jsii$Proxy extends software.amazon.jsii.tests.calculator.BinaryOperation implements software.amazon.jsii.tests.calculator.lib.IFriendly.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -4076,18 +4217,8 @@ public abstract class BinaryOperation extends software.amazon.jsii.tests.calcula @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); - } - - /** - * (deprecated) Say hello! - */ - @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) - @Deprecated - @Override - public @org.jetbrains.annotations.NotNull java.lang.String hello() { - return this.jsiiCall("hello", java.lang.String.class); + public final @org.jetbrains.annotations.NotNull java.lang.Number getValue() { + return software.amazon.jsii.Kernel.get(this, "value", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** @@ -4096,8 +4227,8 @@ public abstract class BinaryOperation extends software.amazon.jsii.tests.calcula @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated @Override - public @org.jetbrains.annotations.NotNull java.lang.String toString() { - return this.jsiiCall("toString", java.lang.String.class); + public final @org.jetbrains.annotations.NotNull java.lang.String toString() { + return software.amazon.jsii.Kernel.call(this, "toString", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } } } @@ -4135,7 +4266,7 @@ public abstract class BurriedAnonymousObject extends software.amazon.jsii.JsiiOb */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Boolean check() { - return this.jsiiCall("check", java.lang.Boolean.class); + return software.amazon.jsii.Kernel.call(this, "check", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); } /** @@ -4150,7 +4281,8 @@ public abstract class BurriedAnonymousObject extends software.amazon.jsii.JsiiOb /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.tests.calculator.BurriedAnonymousObject { + @software.amazon.jsii.Internal + private static final class Jsii$Proxy extends software.amazon.jsii.tests.calculator.BurriedAnonymousObject { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -4163,8 +4295,8 @@ public abstract class BurriedAnonymousObject extends software.amazon.jsii.JsiiOb */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - public @org.jetbrains.annotations.NotNull java.lang.Object giveItBack(final @org.jetbrains.annotations.NotNull java.lang.Object value) { - return this.jsiiCall("giveItBack", java.lang.Object.class, new Object[] { value }); + public final @org.jetbrains.annotations.NotNull java.lang.Object giveItBack(final @org.jetbrains.annotations.NotNull java.lang.Object value) { + return software.amazon.jsii.Kernel.call(this, "giveItBack", software.amazon.jsii.NativeType.forClass(java.lang.Object.class), new Object[] { value }); } } } @@ -4238,7 +4370,7 @@ public class Calculator extends software.amazon.jsii.tests.calculator.compositio */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void add(final @org.jetbrains.annotations.NotNull java.lang.Number value) { - this.jsiiCall("add", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(value, "value is required") }); + software.amazon.jsii.Kernel.call(this, "add", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(value, "value is required") }); } /** @@ -4248,7 +4380,7 @@ public class Calculator extends software.amazon.jsii.tests.calculator.compositio */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void mul(final @org.jetbrains.annotations.NotNull java.lang.Number value) { - this.jsiiCall("mul", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(value, "value is required") }); + software.amazon.jsii.Kernel.call(this, "mul", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(value, "value is required") }); } /** @@ -4256,7 +4388,7 @@ public class Calculator extends software.amazon.jsii.tests.calculator.compositio */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void neg() { - this.jsiiCall("neg", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "neg", software.amazon.jsii.NativeType.VOID); } /** @@ -4266,7 +4398,7 @@ public class Calculator extends software.amazon.jsii.tests.calculator.compositio */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void pow(final @org.jetbrains.annotations.NotNull java.lang.Number value) { - this.jsiiCall("pow", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(value, "value is required") }); + software.amazon.jsii.Kernel.call(this, "pow", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(value, "value is required") }); } /** @@ -4274,7 +4406,7 @@ public class Calculator extends software.amazon.jsii.tests.calculator.compositio */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number readUnionValue() { - return this.jsiiCall("readUnionValue", java.lang.Number.class); + return software.amazon.jsii.Kernel.call(this, "readUnionValue", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** @@ -4283,7 +4415,7 @@ public class Calculator extends software.amazon.jsii.tests.calculator.compositio @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) 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); + return software.amazon.jsii.Kernel.get(this, "expression", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.lib.NumericValue.class)); } /** @@ -4291,7 +4423,7 @@ public class Calculator extends software.amazon.jsii.tests.calculator.compositio */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) 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)))); + return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "operationsLog", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.lib.NumericValue.class)))); } /** @@ -4299,7 +4431,7 @@ public class Calculator extends software.amazon.jsii.tests.calculator.compositio */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) 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))))); + return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.get(this, "operationsMap", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.lib.NumericValue.class))))); } /** @@ -4307,7 +4439,7 @@ public class Calculator extends software.amazon.jsii.tests.calculator.compositio */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) 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); + return software.amazon.jsii.Kernel.get(this, "curr", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.lib.NumericValue.class)); } /** @@ -4315,7 +4447,7 @@ public class Calculator extends software.amazon.jsii.tests.calculator.compositio */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) 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")); + software.amazon.jsii.Kernel.set(this, "curr", java.util.Objects.requireNonNull(value, "curr is required")); } /** @@ -4323,7 +4455,7 @@ public class Calculator extends software.amazon.jsii.tests.calculator.compositio */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.Nullable java.lang.Number getMaxValue() { - return this.jsiiGet("maxValue", java.lang.Number.class); + return software.amazon.jsii.Kernel.get(this, "maxValue", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** @@ -4331,7 +4463,7 @@ public class Calculator extends software.amazon.jsii.tests.calculator.compositio */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setMaxValue(final @org.jetbrains.annotations.Nullable java.lang.Number value) { - this.jsiiSet("maxValue", value); + software.amazon.jsii.Kernel.set(this, "maxValue", value); } /** @@ -4339,7 +4471,7 @@ public class Calculator extends software.amazon.jsii.tests.calculator.compositio */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.Nullable java.lang.Object getUnionProperty() { - return this.jsiiGet("unionProperty", java.lang.Object.class); + return software.amazon.jsii.Kernel.get(this, "unionProperty", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); } /** @@ -4347,7 +4479,7 @@ public class Calculator extends software.amazon.jsii.tests.calculator.compositio */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setUnionProperty(final @org.jetbrains.annotations.Nullable software.amazon.jsii.tests.calculator.Add value) { - this.jsiiSet("unionProperty", value); + software.amazon.jsii.Kernel.set(this, "unionProperty", value); } /** @@ -4355,7 +4487,7 @@ public class Calculator extends software.amazon.jsii.tests.calculator.compositio */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setUnionProperty(final @org.jetbrains.annotations.Nullable software.amazon.jsii.tests.calculator.Multiply value) { - this.jsiiSet("unionProperty", value); + software.amazon.jsii.Kernel.set(this, "unionProperty", value); } /** @@ -4363,7 +4495,7 @@ public class Calculator extends software.amazon.jsii.tests.calculator.compositio */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setUnionProperty(final @org.jetbrains.annotations.Nullable software.amazon.jsii.tests.calculator.Power value) { - this.jsiiSet("unionProperty", value); + software.amazon.jsii.Kernel.set(this, "unionProperty", value); } /** @@ -4524,6 +4656,7 @@ public interface CalculatorProps extends software.amazon.jsii.JsiiSerializable { * An implementation for {@link CalculatorProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements CalculatorProps { private final java.lang.Number initialValue; private final java.lang.Number maximumValue; @@ -4534,30 +4667,31 @@ public interface CalculatorProps extends software.amazon.jsii.JsiiSerializable { */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.initialValue = this.jsiiGet("initialValue", java.lang.Number.class); - this.maximumValue = this.jsiiGet("maximumValue", java.lang.Number.class); + this.initialValue = software.amazon.jsii.Kernel.get(this, "initialValue", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); + this.maximumValue = software.amazon.jsii.Kernel.get(this, "maximumValue", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ - private Jsii$Proxy(final java.lang.Number initialValue, final java.lang.Number maximumValue) { + protected Jsii$Proxy(final java.lang.Number initialValue, final java.lang.Number maximumValue) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.initialValue = initialValue; this.maximumValue = maximumValue; } @Override - public java.lang.Number getInitialValue() { + public final java.lang.Number getInitialValue() { return this.initialValue; } @Override - public java.lang.Number getMaximumValue() { + public final java.lang.Number getMaximumValue() { return this.maximumValue; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -4580,7 +4714,7 @@ public interface CalculatorProps extends software.amazon.jsii.JsiiSerializable { } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -4591,7 +4725,7 @@ public interface CalculatorProps extends software.amazon.jsii.JsiiSerializable { } @Override - public int hashCode() { + public final int hashCode() { int result = this.initialValue != null ? this.initialValue.hashCode() : 0; result = 31 * result + (this.maximumValue != null ? this.maximumValue.hashCode() : 0); return result; @@ -4670,6 +4804,7 @@ public interface ChildStruct982 extends software.amazon.jsii.JsiiSerializable, s * An implementation for {@link ChildStruct982} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ChildStruct982 { private final java.lang.Number bar; private final java.lang.String foo; @@ -4680,30 +4815,31 @@ public interface ChildStruct982 extends software.amazon.jsii.JsiiSerializable, s */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.bar = this.jsiiGet("bar", java.lang.Number.class); - this.foo = this.jsiiGet("foo", java.lang.String.class); + this.bar = software.amazon.jsii.Kernel.get(this, "bar", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); + this.foo = software.amazon.jsii.Kernel.get(this, "foo", software.amazon.jsii.NativeType.forClass(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.Number bar, final java.lang.String foo) { + protected Jsii$Proxy(final java.lang.Number bar, final java.lang.String foo) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.bar = java.util.Objects.requireNonNull(bar, "bar is required"); this.foo = java.util.Objects.requireNonNull(foo, "foo is required"); } @Override - public java.lang.Number getBar() { + public final java.lang.Number getBar() { return this.bar; } @Override - public java.lang.String getFoo() { + public final java.lang.String getFoo() { return this.foo; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -4722,7 +4858,7 @@ public interface ChildStruct982 extends software.amazon.jsii.JsiiSerializable, s } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -4733,7 +4869,7 @@ public interface ChildStruct982 extends software.amazon.jsii.JsiiSerializable, s } @Override - public int hashCode() { + public final int hashCode() { int result = this.bar.hashCode(); result = 31 * result + (this.foo.hashCode()); return result; @@ -4774,7 +4910,7 @@ public class ClassThatImplementsTheInternalInterface extends software.amazon.jsi @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getA() { - return this.jsiiGet("a", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "a", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** @@ -4782,7 +4918,7 @@ public class ClassThatImplementsTheInternalInterface extends software.amazon.jsi @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setA(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiSet("a", java.util.Objects.requireNonNull(value, "a is required")); + software.amazon.jsii.Kernel.set(this, "a", java.util.Objects.requireNonNull(value, "a is required")); } /** @@ -4790,7 +4926,7 @@ public class ClassThatImplementsTheInternalInterface extends software.amazon.jsi @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getB() { - return this.jsiiGet("b", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "b", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** @@ -4798,7 +4934,7 @@ public class ClassThatImplementsTheInternalInterface extends software.amazon.jsi @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setB(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiSet("b", java.util.Objects.requireNonNull(value, "b is required")); + software.amazon.jsii.Kernel.set(this, "b", java.util.Objects.requireNonNull(value, "b is required")); } /** @@ -4806,7 +4942,7 @@ public class ClassThatImplementsTheInternalInterface extends software.amazon.jsi @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getC() { - return this.jsiiGet("c", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "c", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** @@ -4814,21 +4950,21 @@ public class ClassThatImplementsTheInternalInterface extends software.amazon.jsi @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setC(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiSet("c", java.util.Objects.requireNonNull(value, "c is required")); + software.amazon.jsii.Kernel.set(this, "c", java.util.Objects.requireNonNull(value, "c is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getD() { - return this.jsiiGet("d", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "d", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setD(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiSet("d", java.util.Objects.requireNonNull(value, "d is required")); + software.amazon.jsii.Kernel.set(this, "d", java.util.Objects.requireNonNull(value, "d is required")); } } @@ -4865,7 +5001,7 @@ public class ClassThatImplementsThePrivateInterface extends software.amazon.jsii @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getA() { - return this.jsiiGet("a", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "a", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** @@ -4873,7 +5009,7 @@ public class ClassThatImplementsThePrivateInterface extends software.amazon.jsii @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setA(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiSet("a", java.util.Objects.requireNonNull(value, "a is required")); + software.amazon.jsii.Kernel.set(this, "a", java.util.Objects.requireNonNull(value, "a is required")); } /** @@ -4881,7 +5017,7 @@ public class ClassThatImplementsThePrivateInterface extends software.amazon.jsii @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getB() { - return this.jsiiGet("b", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "b", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** @@ -4889,7 +5025,7 @@ public class ClassThatImplementsThePrivateInterface extends software.amazon.jsii @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setB(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiSet("b", java.util.Objects.requireNonNull(value, "b is required")); + software.amazon.jsii.Kernel.set(this, "b", java.util.Objects.requireNonNull(value, "b is required")); } /** @@ -4897,7 +5033,7 @@ public class ClassThatImplementsThePrivateInterface extends software.amazon.jsii @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getC() { - return this.jsiiGet("c", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "c", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** @@ -4905,21 +5041,21 @@ public class ClassThatImplementsThePrivateInterface extends software.amazon.jsii @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setC(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiSet("c", java.util.Objects.requireNonNull(value, "c is required")); + software.amazon.jsii.Kernel.set(this, "c", java.util.Objects.requireNonNull(value, "c is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getE() { - return this.jsiiGet("e", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "e", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setE(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiSet("e", java.util.Objects.requireNonNull(value, "e is required")); + software.amazon.jsii.Kernel.set(this, "e", java.util.Objects.requireNonNull(value, "e is required")); } } @@ -4999,28 +5135,28 @@ public class ClassWithCollections extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.util.List getArray() { - return java.util.Collections.unmodifiableList(this.jsiiGet("array", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)))); + return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "array", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)))); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setArray(final @org.jetbrains.annotations.NotNull java.util.List value) { - this.jsiiSet("array", java.util.Objects.requireNonNull(value, "array is required")); + software.amazon.jsii.Kernel.set(this, "array", java.util.Objects.requireNonNull(value, "array is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.util.Map getMap() { - return java.util.Collections.unmodifiableMap(this.jsiiGet("map", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)))); + return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.get(this, "map", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)))); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setMap(final @org.jetbrains.annotations.NotNull java.util.Map value) { - this.jsiiSet("map", java.util.Objects.requireNonNull(value, "map is required")); + software.amazon.jsii.Kernel.set(this, "map", java.util.Objects.requireNonNull(value, "map is required")); } } @@ -5099,14 +5235,14 @@ public class ClassWithJavaReservedWords extends software.amazon.jsii.JsiiObject */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String doImport(final @org.jetbrains.annotations.NotNull java.lang.String assertValue) { - return this.jsiiCall("import", java.lang.String.class, new Object[] { java.util.Objects.requireNonNull(assertValue, "assertValue is required") }); + return software.amazon.jsii.Kernel.call(this, "import", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(assertValue, "assertValue is required") }); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getIntValue() { - return this.jsiiGet("int", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "int", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } } @@ -5142,14 +5278,14 @@ public class ClassWithMutableObjectLiteralProperty extends software.amazon.jsii. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.IMutableObjectLiteral getMutableObject() { - return this.jsiiGet("mutableObject", software.amazon.jsii.tests.calculator.IMutableObjectLiteral.class); + return software.amazon.jsii.Kernel.get(this, "mutableObject", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.IMutableObjectLiteral.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setMutableObject(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.IMutableObjectLiteral value) { - this.jsiiSet("mutableObject", java.util.Objects.requireNonNull(value, "mutableObject is required")); + software.amazon.jsii.Kernel.set(this, "mutableObject", java.util.Objects.requireNonNull(value, "mutableObject is required")); } } @@ -5180,7 +5316,7 @@ public class ClassWithPrivateConstructorAndAutomaticProperties extends software. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.ClassWithPrivateConstructorAndAutomaticProperties create(final @org.jetbrains.annotations.NotNull java.lang.String readOnlyString, final @org.jetbrains.annotations.NotNull java.lang.String readWriteString) { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.ClassWithPrivateConstructorAndAutomaticProperties.class, "create", software.amazon.jsii.tests.calculator.ClassWithPrivateConstructorAndAutomaticProperties.class, new Object[] { java.util.Objects.requireNonNull(readOnlyString, "readOnlyString is required"), java.util.Objects.requireNonNull(readWriteString, "readWriteString is required") }); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.ClassWithPrivateConstructorAndAutomaticProperties.class, "create", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.ClassWithPrivateConstructorAndAutomaticProperties.class), new Object[] { java.util.Objects.requireNonNull(readOnlyString, "readOnlyString is required"), java.util.Objects.requireNonNull(readWriteString, "readWriteString is required") }); } /** @@ -5188,7 +5324,7 @@ public class ClassWithPrivateConstructorAndAutomaticProperties extends software. @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getReadOnlyString() { - return this.jsiiGet("readOnlyString", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "readOnlyString", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** @@ -5196,7 +5332,7 @@ public class ClassWithPrivateConstructorAndAutomaticProperties extends software. @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getReadWriteString() { - return this.jsiiGet("readWriteString", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "readWriteString", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** @@ -5204,7 +5340,7 @@ public class ClassWithPrivateConstructorAndAutomaticProperties extends software. @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setReadWriteString(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiSet("readWriteString", java.util.Objects.requireNonNull(value, "readWriteString is required")); + software.amazon.jsii.Kernel.set(this, "readWriteString", java.util.Objects.requireNonNull(value, "readWriteString is required")); } } @@ -5235,35 +5371,35 @@ public class ConfusingToJackson extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.ConfusingToJackson makeInstance() { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.ConfusingToJackson.class, "makeInstance", software.amazon.jsii.tests.calculator.ConfusingToJackson.class); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.ConfusingToJackson.class, "makeInstance", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.ConfusingToJackson.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.ConfusingToJacksonStruct makeStructInstance() { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.ConfusingToJackson.class, "makeStructInstance", software.amazon.jsii.tests.calculator.ConfusingToJacksonStruct.class); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.ConfusingToJackson.class, "makeStructInstance", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.ConfusingToJacksonStruct.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.Nullable java.lang.Object getUnionProperty() { - return this.jsiiGet("unionProperty", java.lang.Object.class); + return software.amazon.jsii.Kernel.get(this, "unionProperty", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setUnionProperty(final @org.jetbrains.annotations.Nullable software.amazon.jsii.tests.calculator.lib.IFriendly value) { - this.jsiiSet("unionProperty", value); + software.amazon.jsii.Kernel.set(this, "unionProperty", value); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setUnionProperty(final @org.jetbrains.annotations.Nullable java.util.List value) { - this.jsiiSet("unionProperty", value); + software.amazon.jsii.Kernel.set(this, "unionProperty", value); } } @@ -5339,6 +5475,7 @@ public interface ConfusingToJacksonStruct extends software.amazon.jsii.JsiiSeria * An implementation for {@link ConfusingToJacksonStruct} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ConfusingToJacksonStruct { private final java.lang.Object unionProperty; @@ -5348,23 +5485,24 @@ public interface ConfusingToJacksonStruct extends software.amazon.jsii.JsiiSeria */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.unionProperty = this.jsiiGet("unionProperty", java.lang.Object.class); + this.unionProperty = software.amazon.jsii.Kernel.get(this, "unionProperty", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ - private Jsii$Proxy(final java.lang.Object unionProperty) { + protected Jsii$Proxy(final java.lang.Object unionProperty) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.unionProperty = unionProperty; } @Override - public java.lang.Object getUnionProperty() { + public final java.lang.Object getUnionProperty() { return this.unionProperty; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -5384,7 +5522,7 @@ public interface ConfusingToJacksonStruct extends software.amazon.jsii.JsiiSeria } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -5394,7 +5532,7 @@ public interface ConfusingToJacksonStruct extends software.amazon.jsii.JsiiSeria } @Override - public int hashCode() { + public final int hashCode() { int result = this.unionProperty != null ? this.unionProperty.hashCode() : 0; return result; } @@ -5463,7 +5601,7 @@ public class Constructors extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.IPublicInterface hiddenInterface() { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.Constructors.class, "hiddenInterface", software.amazon.jsii.tests.calculator.IPublicInterface.class); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.Constructors.class, "hiddenInterface", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.IPublicInterface.class)); } /** @@ -5484,21 +5622,21 @@ public class Constructors extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.PublicClass makeClass() { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.Constructors.class, "makeClass", software.amazon.jsii.tests.calculator.PublicClass.class); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.Constructors.class, "makeClass", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.PublicClass.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.IPublicInterface makeInterface() { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.Constructors.class, "makeInterface", software.amazon.jsii.tests.calculator.IPublicInterface.class); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.Constructors.class, "makeInterface", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.IPublicInterface.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.IPublicInterface2 makeInterface2() { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.Constructors.class, "makeInterface2", software.amazon.jsii.tests.calculator.IPublicInterface2.class); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.Constructors.class, "makeInterface2", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.IPublicInterface2.class)); } /** @@ -5542,7 +5680,7 @@ public class ConsumePureInterface extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.StructB workItBaby() { - return this.jsiiCall("workItBaby", software.amazon.jsii.tests.calculator.StructB.class); + return software.amazon.jsii.Kernel.call(this, "workItBaby", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.StructB.class)); } } @@ -5587,7 +5725,7 @@ public class ConsumerCanRingBell extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.Boolean staticImplementedByObjectLiteral(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.IBellRinger ringer) { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.ConsumerCanRingBell.class, "staticImplementedByObjectLiteral", java.lang.Boolean.class, new Object[] { java.util.Objects.requireNonNull(ringer, "ringer is required") }); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.ConsumerCanRingBell.class, "staticImplementedByObjectLiteral", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class), new Object[] { java.util.Objects.requireNonNull(ringer, "ringer is required") }); } /** @@ -5599,7 +5737,7 @@ public class ConsumerCanRingBell extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.Boolean staticImplementedByPrivateClass(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.IBellRinger ringer) { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.ConsumerCanRingBell.class, "staticImplementedByPrivateClass", java.lang.Boolean.class, new Object[] { java.util.Objects.requireNonNull(ringer, "ringer is required") }); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.ConsumerCanRingBell.class, "staticImplementedByPrivateClass", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class), new Object[] { java.util.Objects.requireNonNull(ringer, "ringer is required") }); } /** @@ -5611,7 +5749,7 @@ public class ConsumerCanRingBell extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.Boolean staticImplementedByPublicClass(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.IBellRinger ringer) { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.ConsumerCanRingBell.class, "staticImplementedByPublicClass", java.lang.Boolean.class, new Object[] { java.util.Objects.requireNonNull(ringer, "ringer is required") }); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.ConsumerCanRingBell.class, "staticImplementedByPublicClass", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class), new Object[] { java.util.Objects.requireNonNull(ringer, "ringer is required") }); } /** @@ -5623,7 +5761,7 @@ public class ConsumerCanRingBell extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.Boolean staticWhenTypedAsClass(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.IConcreteBellRinger ringer) { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.ConsumerCanRingBell.class, "staticWhenTypedAsClass", java.lang.Boolean.class, new Object[] { java.util.Objects.requireNonNull(ringer, "ringer is required") }); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.ConsumerCanRingBell.class, "staticWhenTypedAsClass", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class), new Object[] { java.util.Objects.requireNonNull(ringer, "ringer is required") }); } /** @@ -5635,7 +5773,7 @@ public class ConsumerCanRingBell extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Boolean implementedByObjectLiteral(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.IBellRinger ringer) { - return this.jsiiCall("implementedByObjectLiteral", java.lang.Boolean.class, new Object[] { java.util.Objects.requireNonNull(ringer, "ringer is required") }); + return software.amazon.jsii.Kernel.call(this, "implementedByObjectLiteral", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class), new Object[] { java.util.Objects.requireNonNull(ringer, "ringer is required") }); } /** @@ -5647,7 +5785,7 @@ public class ConsumerCanRingBell extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Boolean implementedByPrivateClass(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.IBellRinger ringer) { - return this.jsiiCall("implementedByPrivateClass", java.lang.Boolean.class, new Object[] { java.util.Objects.requireNonNull(ringer, "ringer is required") }); + return software.amazon.jsii.Kernel.call(this, "implementedByPrivateClass", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class), new Object[] { java.util.Objects.requireNonNull(ringer, "ringer is required") }); } /** @@ -5659,7 +5797,7 @@ public class ConsumerCanRingBell extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Boolean implementedByPublicClass(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.IBellRinger ringer) { - return this.jsiiCall("implementedByPublicClass", java.lang.Boolean.class, new Object[] { java.util.Objects.requireNonNull(ringer, "ringer is required") }); + return software.amazon.jsii.Kernel.call(this, "implementedByPublicClass", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class), new Object[] { java.util.Objects.requireNonNull(ringer, "ringer is required") }); } /** @@ -5671,7 +5809,7 @@ public class ConsumerCanRingBell extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Boolean whenTypedAsClass(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.IConcreteBellRinger ringer) { - return this.jsiiCall("whenTypedAsClass", java.lang.Boolean.class, new Object[] { java.util.Objects.requireNonNull(ringer, "ringer is required") }); + return software.amazon.jsii.Kernel.call(this, "whenTypedAsClass", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class), new Object[] { java.util.Objects.requireNonNull(ringer, "ringer is required") }); } } @@ -5708,7 +5846,7 @@ public class ConsumersOfThisCrazyTypeSystem extends software.amazon.jsii.JsiiObj */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String consumeAnotherPublicInterface(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.IAnotherPublicInterface obj) { - return this.jsiiCall("consumeAnotherPublicInterface", java.lang.String.class, new Object[] { java.util.Objects.requireNonNull(obj, "obj is required") }); + return software.amazon.jsii.Kernel.call(this, "consumeAnotherPublicInterface", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(obj, "obj is required") }); } /** @@ -5716,7 +5854,7 @@ public class ConsumersOfThisCrazyTypeSystem extends software.amazon.jsii.JsiiObj */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Object consumeNonInternalInterface(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.INonInternalInterface obj) { - return this.jsiiCall("consumeNonInternalInterface", java.lang.Object.class, new Object[] { java.util.Objects.requireNonNull(obj, "obj is required") }); + return software.amazon.jsii.Kernel.call(this, "consumeNonInternalInterface", software.amazon.jsii.NativeType.forClass(java.lang.Object.class), new Object[] { java.util.Objects.requireNonNull(obj, "obj is required") }); } } @@ -5754,14 +5892,14 @@ public class DataRenderer extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String render(final @org.jetbrains.annotations.Nullable software.amazon.jsii.tests.calculator.lib.MyFirstStruct data) { - return this.jsiiCall("render", java.lang.String.class, new Object[] { data }); + return software.amazon.jsii.Kernel.call(this, "render", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { data }); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String render() { - return this.jsiiCall("render", java.lang.String.class); + return software.amazon.jsii.Kernel.call(this, "render", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** @@ -5769,7 +5907,7 @@ public class DataRenderer extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String renderArbitrary(final @org.jetbrains.annotations.NotNull java.util.Map data) { - return this.jsiiCall("renderArbitrary", java.lang.String.class, new Object[] { java.util.Objects.requireNonNull(data, "data is required") }); + return software.amazon.jsii.Kernel.call(this, "renderArbitrary", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(data, "data is required") }); } /** @@ -5777,7 +5915,7 @@ public class DataRenderer extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String renderMap(final @org.jetbrains.annotations.NotNull java.util.Map map) { - return this.jsiiCall("renderMap", java.lang.String.class, new Object[] { java.util.Objects.requireNonNull(map, "map is required") }); + return software.amazon.jsii.Kernel.call(this, "renderMap", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(map, "map is required") }); } } @@ -5843,21 +5981,21 @@ public class DefaultedConstructorArgument extends software.amazon.jsii.JsiiObjec */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number getArg1() { - return this.jsiiGet("arg1", java.lang.Number.class); + return software.amazon.jsii.Kernel.get(this, "arg1", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.time.Instant getArg3() { - return this.jsiiGet("arg3", java.time.Instant.class); + return software.amazon.jsii.Kernel.get(this, "arg3", software.amazon.jsii.NativeType.forClass(java.time.Instant.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.Nullable java.lang.String getArg2() { - return this.jsiiGet("arg2", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "arg2", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } } @@ -5898,7 +6036,7 @@ public class Demonstrate982 extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.ChildStruct982 takeThis() { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.Demonstrate982.class, "takeThis", software.amazon.jsii.tests.calculator.ChildStruct982.class); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.Demonstrate982.class, "takeThis", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.ChildStruct982.class)); } /** @@ -5906,7 +6044,7 @@ public class Demonstrate982 extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.ParentStruct982 takeThisToo() { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.Demonstrate982.class, "takeThisToo", software.amazon.jsii.tests.calculator.ParentStruct982.class); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.Demonstrate982.class, "takeThisToo", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.ParentStruct982.class)); } } @@ -5961,7 +6099,7 @@ public class DeprecatedClass extends software.amazon.jsii.JsiiObject { @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated public void method() { - this.jsiiCall("method", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "method", software.amazon.jsii.NativeType.VOID); } /** @@ -5970,7 +6108,7 @@ public class DeprecatedClass extends software.amazon.jsii.JsiiObject { @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated public @org.jetbrains.annotations.NotNull java.lang.String getReadonlyProperty() { - return this.jsiiGet("readonlyProperty", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "readonlyProperty", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** @@ -5979,7 +6117,7 @@ public class DeprecatedClass extends software.amazon.jsii.JsiiObject { @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated public @org.jetbrains.annotations.Nullable java.lang.Number getMutableProperty() { - return this.jsiiGet("mutableProperty", java.lang.Number.class); + return software.amazon.jsii.Kernel.get(this, "mutableProperty", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** @@ -5988,7 +6126,7 @@ public class DeprecatedClass extends software.amazon.jsii.JsiiObject { @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated public void setMutableProperty(final @org.jetbrains.annotations.Nullable java.lang.Number value) { - this.jsiiSet("mutableProperty", value); + software.amazon.jsii.Kernel.set(this, "mutableProperty", value); } } @@ -6088,6 +6226,7 @@ public interface DeprecatedStruct extends software.amazon.jsii.JsiiSerializable */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements DeprecatedStruct { private final java.lang.String readonlyProperty; @@ -6097,23 +6236,24 @@ public interface DeprecatedStruct extends software.amazon.jsii.JsiiSerializable */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.readonlyProperty = this.jsiiGet("readonlyProperty", java.lang.String.class); + this.readonlyProperty = software.amazon.jsii.Kernel.get(this, "readonlyProperty", software.amazon.jsii.NativeType.forClass(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 readonlyProperty) { + protected Jsii$Proxy(final java.lang.String readonlyProperty) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.readonlyProperty = java.util.Objects.requireNonNull(readonlyProperty, "readonlyProperty is required"); } @Override - public java.lang.String getReadonlyProperty() { + public final java.lang.String getReadonlyProperty() { return this.readonlyProperty; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -6131,7 +6271,7 @@ public interface DeprecatedStruct extends software.amazon.jsii.JsiiSerializable } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -6141,7 +6281,7 @@ public interface DeprecatedStruct extends software.amazon.jsii.JsiiSerializable } @Override - public int hashCode() { + public final int hashCode() { int result = this.readonlyProperty.hashCode(); return result; } @@ -6341,6 +6481,7 @@ public interface DerivedStruct extends software.amazon.jsii.JsiiSerializable, so * An implementation for {@link DerivedStruct} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements DerivedStruct { private final java.time.Instant anotherRequired; private final java.lang.Boolean bool; @@ -6358,22 +6499,22 @@ public interface DerivedStruct extends software.amazon.jsii.JsiiSerializable, so */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - 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.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); - this.astring = this.jsiiGet("astring", java.lang.String.class); - this.firstOptional = this.jsiiGet("firstOptional", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class))); + this.anotherRequired = software.amazon.jsii.Kernel.get(this, "anotherRequired", software.amazon.jsii.NativeType.forClass(java.time.Instant.class)); + this.bool = software.amazon.jsii.Kernel.get(this, "bool", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); + this.nonPrimitive = software.amazon.jsii.Kernel.get(this, "nonPrimitive", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.DoubleTrouble.class)); + this.anotherOptional = software.amazon.jsii.Kernel.get(this, "anotherOptional", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.lib.NumericValue.class))); + this.optionalAny = software.amazon.jsii.Kernel.get(this, "optionalAny", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); + this.optionalArray = software.amazon.jsii.Kernel.get(this, "optionalArray", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class))); + this.anumber = software.amazon.jsii.Kernel.get(this, "anumber", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); + this.astring = software.amazon.jsii.Kernel.get(this, "astring", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + this.firstOptional = software.amazon.jsii.Kernel.get(this, "firstOptional", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class))); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ @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) { + protected 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"); @@ -6387,51 +6528,52 @@ public interface DerivedStruct extends software.amazon.jsii.JsiiSerializable, so } @Override - public java.time.Instant getAnotherRequired() { + public final java.time.Instant getAnotherRequired() { return this.anotherRequired; } @Override - public java.lang.Boolean getBool() { + public final java.lang.Boolean getBool() { return this.bool; } @Override - public software.amazon.jsii.tests.calculator.DoubleTrouble getNonPrimitive() { + public final software.amazon.jsii.tests.calculator.DoubleTrouble getNonPrimitive() { return this.nonPrimitive; } @Override - public java.util.Map getAnotherOptional() { + public final java.util.Map getAnotherOptional() { return this.anotherOptional; } @Override - public java.lang.Object getOptionalAny() { + public final java.lang.Object getOptionalAny() { return this.optionalAny; } @Override - public java.util.List getOptionalArray() { + public final java.util.List getOptionalArray() { return this.optionalArray; } @Override - public java.lang.Number getAnumber() { + public final java.lang.Number getAnumber() { return this.anumber; } @Override - public java.lang.String getAstring() { + public final java.lang.String getAstring() { return this.astring; } @Override - public java.util.List getFirstOptional() { + public final java.util.List getFirstOptional() { return this.firstOptional; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -6465,7 +6607,7 @@ public interface DerivedStruct extends software.amazon.jsii.JsiiSerializable, so } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -6483,7 +6625,7 @@ public interface DerivedStruct extends software.amazon.jsii.JsiiSerializable, so } @Override - public int hashCode() { + public final int hashCode() { int result = this.anotherRequired.hashCode(); result = 31 * result + (this.bool.hashCode()); result = 31 * result + (this.nonPrimitive.hashCode()); @@ -6557,6 +6699,7 @@ public interface DiamondInheritanceBaseLevelStruct extends software.amazon.jsii. * An implementation for {@link DiamondInheritanceBaseLevelStruct} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements DiamondInheritanceBaseLevelStruct { private final java.lang.String baseLevelProperty; @@ -6566,23 +6709,24 @@ public interface DiamondInheritanceBaseLevelStruct extends software.amazon.jsii. */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.baseLevelProperty = this.jsiiGet("baseLevelProperty", java.lang.String.class); + this.baseLevelProperty = software.amazon.jsii.Kernel.get(this, "baseLevelProperty", software.amazon.jsii.NativeType.forClass(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 baseLevelProperty) { + protected Jsii$Proxy(final java.lang.String baseLevelProperty) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.baseLevelProperty = java.util.Objects.requireNonNull(baseLevelProperty, "baseLevelProperty is required"); } @Override - public java.lang.String getBaseLevelProperty() { + public final java.lang.String getBaseLevelProperty() { return this.baseLevelProperty; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -6600,7 +6744,7 @@ public interface DiamondInheritanceBaseLevelStruct extends software.amazon.jsii. } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -6610,7 +6754,7 @@ public interface DiamondInheritanceBaseLevelStruct extends software.amazon.jsii. } @Override - public int hashCode() { + public final int hashCode() { int result = this.baseLevelProperty.hashCode(); return result; } @@ -6688,6 +6832,7 @@ public interface DiamondInheritanceFirstMidLevelStruct extends software.amazon.j * An implementation for {@link DiamondInheritanceFirstMidLevelStruct} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements DiamondInheritanceFirstMidLevelStruct { private final java.lang.String firstMidLevelProperty; private final java.lang.String baseLevelProperty; @@ -6698,30 +6843,31 @@ public interface DiamondInheritanceFirstMidLevelStruct extends software.amazon.j */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.firstMidLevelProperty = this.jsiiGet("firstMidLevelProperty", java.lang.String.class); - this.baseLevelProperty = this.jsiiGet("baseLevelProperty", java.lang.String.class); + this.firstMidLevelProperty = software.amazon.jsii.Kernel.get(this, "firstMidLevelProperty", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + this.baseLevelProperty = software.amazon.jsii.Kernel.get(this, "baseLevelProperty", software.amazon.jsii.NativeType.forClass(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 firstMidLevelProperty, final java.lang.String baseLevelProperty) { + protected Jsii$Proxy(final java.lang.String firstMidLevelProperty, final java.lang.String baseLevelProperty) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.firstMidLevelProperty = java.util.Objects.requireNonNull(firstMidLevelProperty, "firstMidLevelProperty is required"); this.baseLevelProperty = java.util.Objects.requireNonNull(baseLevelProperty, "baseLevelProperty is required"); } @Override - public java.lang.String getFirstMidLevelProperty() { + public final java.lang.String getFirstMidLevelProperty() { return this.firstMidLevelProperty; } @Override - public java.lang.String getBaseLevelProperty() { + public final java.lang.String getBaseLevelProperty() { return this.baseLevelProperty; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -6740,7 +6886,7 @@ public interface DiamondInheritanceFirstMidLevelStruct extends software.amazon.j } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -6751,7 +6897,7 @@ public interface DiamondInheritanceFirstMidLevelStruct extends software.amazon.j } @Override - public int hashCode() { + public final int hashCode() { int result = this.firstMidLevelProperty.hashCode(); result = 31 * result + (this.baseLevelProperty.hashCode()); return result; @@ -6830,6 +6976,7 @@ public interface DiamondInheritanceSecondMidLevelStruct extends software.amazon. * An implementation for {@link DiamondInheritanceSecondMidLevelStruct} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements DiamondInheritanceSecondMidLevelStruct { private final java.lang.String secondMidLevelProperty; private final java.lang.String baseLevelProperty; @@ -6840,30 +6987,31 @@ public interface DiamondInheritanceSecondMidLevelStruct extends software.amazon. */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.secondMidLevelProperty = this.jsiiGet("secondMidLevelProperty", java.lang.String.class); - this.baseLevelProperty = this.jsiiGet("baseLevelProperty", java.lang.String.class); + this.secondMidLevelProperty = software.amazon.jsii.Kernel.get(this, "secondMidLevelProperty", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + this.baseLevelProperty = software.amazon.jsii.Kernel.get(this, "baseLevelProperty", software.amazon.jsii.NativeType.forClass(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 secondMidLevelProperty, final java.lang.String baseLevelProperty) { + protected Jsii$Proxy(final java.lang.String secondMidLevelProperty, final java.lang.String baseLevelProperty) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.secondMidLevelProperty = java.util.Objects.requireNonNull(secondMidLevelProperty, "secondMidLevelProperty is required"); this.baseLevelProperty = java.util.Objects.requireNonNull(baseLevelProperty, "baseLevelProperty is required"); } @Override - public java.lang.String getSecondMidLevelProperty() { + public final java.lang.String getSecondMidLevelProperty() { return this.secondMidLevelProperty; } @Override - public java.lang.String getBaseLevelProperty() { + public final java.lang.String getBaseLevelProperty() { return this.baseLevelProperty; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -6882,7 +7030,7 @@ public interface DiamondInheritanceSecondMidLevelStruct extends software.amazon. } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -6893,7 +7041,7 @@ public interface DiamondInheritanceSecondMidLevelStruct extends software.amazon. } @Override - public int hashCode() { + public final int hashCode() { int result = this.secondMidLevelProperty.hashCode(); result = 31 * result + (this.baseLevelProperty.hashCode()); return result; @@ -6996,6 +7144,7 @@ public interface DiamondInheritanceTopLevelStruct extends software.amazon.jsii.J * An implementation for {@link DiamondInheritanceTopLevelStruct} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements DiamondInheritanceTopLevelStruct { private final java.lang.String topLevelProperty; private final java.lang.String firstMidLevelProperty; @@ -7008,16 +7157,16 @@ public interface DiamondInheritanceTopLevelStruct extends software.amazon.jsii.J */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.topLevelProperty = this.jsiiGet("topLevelProperty", java.lang.String.class); - this.firstMidLevelProperty = this.jsiiGet("firstMidLevelProperty", java.lang.String.class); - this.baseLevelProperty = this.jsiiGet("baseLevelProperty", java.lang.String.class); - this.secondMidLevelProperty = this.jsiiGet("secondMidLevelProperty", java.lang.String.class); + this.topLevelProperty = software.amazon.jsii.Kernel.get(this, "topLevelProperty", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + this.firstMidLevelProperty = software.amazon.jsii.Kernel.get(this, "firstMidLevelProperty", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + this.baseLevelProperty = software.amazon.jsii.Kernel.get(this, "baseLevelProperty", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + this.secondMidLevelProperty = software.amazon.jsii.Kernel.get(this, "secondMidLevelProperty", software.amazon.jsii.NativeType.forClass(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 topLevelProperty, final java.lang.String firstMidLevelProperty, final java.lang.String baseLevelProperty, final java.lang.String secondMidLevelProperty) { + protected Jsii$Proxy(final java.lang.String topLevelProperty, final java.lang.String firstMidLevelProperty, final java.lang.String baseLevelProperty, final java.lang.String secondMidLevelProperty) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.topLevelProperty = java.util.Objects.requireNonNull(topLevelProperty, "topLevelProperty is required"); this.firstMidLevelProperty = java.util.Objects.requireNonNull(firstMidLevelProperty, "firstMidLevelProperty is required"); @@ -7026,26 +7175,27 @@ public interface DiamondInheritanceTopLevelStruct extends software.amazon.jsii.J } @Override - public java.lang.String getTopLevelProperty() { + public final java.lang.String getTopLevelProperty() { return this.topLevelProperty; } @Override - public java.lang.String getFirstMidLevelProperty() { + public final java.lang.String getFirstMidLevelProperty() { return this.firstMidLevelProperty; } @Override - public java.lang.String getBaseLevelProperty() { + public final java.lang.String getBaseLevelProperty() { return this.baseLevelProperty; } @Override - public java.lang.String getSecondMidLevelProperty() { + public final java.lang.String getSecondMidLevelProperty() { return this.secondMidLevelProperty; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -7066,7 +7216,7 @@ public interface DiamondInheritanceTopLevelStruct extends software.amazon.jsii.J } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -7079,7 +7229,7 @@ public interface DiamondInheritanceTopLevelStruct extends software.amazon.jsii.J } @Override - public int hashCode() { + public final int hashCode() { int result = this.topLevelProperty.hashCode(); result = 31 * result + (this.firstMidLevelProperty.hashCode()); result = 31 * result + (this.baseLevelProperty.hashCode()); @@ -7167,21 +7317,21 @@ public class DoNotOverridePrivates extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void changePrivatePropertyValue(final @org.jetbrains.annotations.NotNull java.lang.String newValue) { - this.jsiiCall("changePrivatePropertyValue", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(newValue, "newValue is required") }); + software.amazon.jsii.Kernel.call(this, "changePrivatePropertyValue", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(newValue, "newValue is required") }); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String privateMethodValue() { - return this.jsiiCall("privateMethodValue", java.lang.String.class); + return software.amazon.jsii.Kernel.call(this, "privateMethodValue", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String privatePropertyValue() { - return this.jsiiCall("privatePropertyValue", java.lang.String.class); + return software.amazon.jsii.Kernel.call(this, "privatePropertyValue", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } } @@ -7221,7 +7371,7 @@ public class DoNotRecognizeAnyAsOptional extends software.amazon.jsii.JsiiObject */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void method(final @org.jetbrains.annotations.NotNull java.lang.Object _requiredAny, final @org.jetbrains.annotations.Nullable java.lang.Object _optionalAny, final @org.jetbrains.annotations.Nullable java.lang.String _optionalString) { - this.jsiiCall("method", software.amazon.jsii.NativeType.VOID, new Object[] { _requiredAny, _optionalAny, _optionalString }); + software.amazon.jsii.Kernel.call(this, "method", software.amazon.jsii.NativeType.VOID, new Object[] { _requiredAny, _optionalAny, _optionalString }); } /** @@ -7230,7 +7380,7 @@ public class DoNotRecognizeAnyAsOptional extends software.amazon.jsii.JsiiObject */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void method(final @org.jetbrains.annotations.NotNull java.lang.Object _requiredAny, final @org.jetbrains.annotations.Nullable java.lang.Object _optionalAny) { - this.jsiiCall("method", software.amazon.jsii.NativeType.VOID, new Object[] { _requiredAny, _optionalAny }); + software.amazon.jsii.Kernel.call(this, "method", software.amazon.jsii.NativeType.VOID, new Object[] { _requiredAny, _optionalAny }); } /** @@ -7238,7 +7388,7 @@ public class DoNotRecognizeAnyAsOptional extends software.amazon.jsii.JsiiObject */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void method(final @org.jetbrains.annotations.NotNull java.lang.Object _requiredAny) { - this.jsiiCall("method", software.amazon.jsii.NativeType.VOID, new Object[] { _requiredAny }); + software.amazon.jsii.Kernel.call(this, "method", software.amazon.jsii.NativeType.VOID, new Object[] { _requiredAny }); } } @@ -7254,6 +7404,15 @@ package software.amazon.jsii.tests.calculator; * multiple lines and multiple paragraphs. *

* Multiple paragraphs are separated by an empty line. + *

+ * Example: + *

+ *

{@code
+ * // Example automatically generated. See https://github.com/aws/jsii/issues/826
+ * Number x = 12 + 44;
+ * String s1 = "string";
+ * String s2 = "string \\nwith new newlines";// see https://github.com/aws/jsii/issues/2569
+ * String s3 = "string\\n            with\\n            new lines";}
*/ @javax.annotation.Generated(value = "jsii-pacmak") @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @@ -7279,28 +7438,28 @@ public class DocumentedClass extends software.amazon.jsii.JsiiObject { /** * Greet the indicated person. *

- * This will print out a friendly greeting intended for - * the indicated person. + * This will print out a friendly greeting intended for the indicated person. *

- * @return A number that everyone knows very well + * @return A number that everyone knows very well and represents the answer + * to the ultimate question * @param greetee The person to be greeted. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number greet(final @org.jetbrains.annotations.Nullable software.amazon.jsii.tests.calculator.Greetee greetee) { - return this.jsiiCall("greet", java.lang.Number.class, new Object[] { greetee }); + return software.amazon.jsii.Kernel.call(this, "greet", software.amazon.jsii.NativeType.forClass(java.lang.Number.class), new Object[] { greetee }); } /** * Greet the indicated person. *

- * This will print out a friendly greeting intended for - * the indicated person. + * This will print out a friendly greeting intended for the indicated person. *

- * @return A number that everyone knows very well + * @return A number that everyone knows very well and represents the answer + * to the ultimate question */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number greet() { - return this.jsiiCall("greet", java.lang.Number.class); + return software.amazon.jsii.Kernel.call(this, "greet", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** @@ -7308,7 +7467,7 @@ public class DocumentedClass extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public void hola() { - this.jsiiCall("hola", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "hola", software.amazon.jsii.NativeType.VOID); } } @@ -7346,7 +7505,7 @@ public class DontComplainAboutVariadicAfterOptional extends software.amazon.jsii */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String optionalAndVariadic(final @org.jetbrains.annotations.Nullable java.lang.String optional, final @org.jetbrains.annotations.NotNull java.lang.String... things) { - return this.jsiiCall("optionalAndVariadic", java.lang.String.class, java.util.stream.Stream.concat(java.util.Arrays.stream(new Object[] { optional }), java.util.Arrays.stream(things)).toArray(Object[]::new)); + return software.amazon.jsii.Kernel.call(this, "optionalAndVariadic", software.amazon.jsii.NativeType.forClass(java.lang.String.class), java.util.stream.Stream.concat(java.util.Arrays.stream(new Object[] { optional }), java.util.Arrays.stream(things)).toArray(Object[]::new)); } } @@ -7384,7 +7543,7 @@ public class DoubleTrouble extends software.amazon.jsii.JsiiObject implements so @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public @org.jetbrains.annotations.NotNull java.lang.String hello() { - return this.jsiiCall("hello", java.lang.String.class); + return software.amazon.jsii.Kernel.call(this, "hello", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** @@ -7393,7 +7552,7 @@ public class DoubleTrouble extends software.amazon.jsii.JsiiObject implements so @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public @org.jetbrains.annotations.NotNull java.lang.Number next() { - return this.jsiiCall("next", java.lang.Number.class); + return software.amazon.jsii.Kernel.call(this, "next", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } } @@ -7431,28 +7590,28 @@ public class DynamicPropertyBearer extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getDynamicProperty() { - return this.jsiiGet("dynamicProperty", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "dynamicProperty", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setDynamicProperty(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiSet("dynamicProperty", java.util.Objects.requireNonNull(value, "dynamicProperty is required")); + software.amazon.jsii.Kernel.set(this, "dynamicProperty", java.util.Objects.requireNonNull(value, "dynamicProperty is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getValueStore() { - return this.jsiiGet("valueStore", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "valueStore", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setValueStore(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiSet("valueStore", java.util.Objects.requireNonNull(value, "valueStore is required")); + software.amazon.jsii.Kernel.set(this, "valueStore", java.util.Objects.requireNonNull(value, "valueStore is required")); } } @@ -7493,14 +7652,14 @@ public class DynamicPropertyBearerChild extends software.amazon.jsii.tests.calcu */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) 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") }); + return software.amazon.jsii.Kernel.call(this, "overrideValue", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(newValue, "newValue is required") }); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getOriginalValue() { - return this.jsiiGet("originalValue", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "originalValue", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } } @@ -7543,7 +7702,7 @@ public abstract class Entropy extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String increase() { - return this.jsiiCall("increase", java.lang.String.class); + return software.amazon.jsii.Kernel.call(this, "increase", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** @@ -7558,7 +7717,8 @@ public abstract class Entropy extends software.amazon.jsii.JsiiObject { /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.tests.calculator.Entropy { + @software.amazon.jsii.Internal + private static final class Jsii$Proxy extends software.amazon.jsii.tests.calculator.Entropy { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -7571,8 +7731,8 @@ public abstract class Entropy extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - public @org.jetbrains.annotations.NotNull java.lang.String repeat(final @org.jetbrains.annotations.NotNull java.lang.String word) { - return this.jsiiCall("repeat", java.lang.String.class, new Object[] { java.util.Objects.requireNonNull(word, "word is required") }); + public final @org.jetbrains.annotations.NotNull java.lang.String repeat(final @org.jetbrains.annotations.NotNull java.lang.String word) { + return software.amazon.jsii.Kernel.call(this, "repeat", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(word, "word is required") }); } } } @@ -7601,14 +7761,14 @@ public class EnumDispenser extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.AllTypesEnum randomIntegerLikeEnum() { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.EnumDispenser.class, "randomIntegerLikeEnum", software.amazon.jsii.tests.calculator.AllTypesEnum.class); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.EnumDispenser.class, "randomIntegerLikeEnum", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.AllTypesEnum.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.StringEnum randomStringLikeEnum() { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.EnumDispenser.class, "randomStringLikeEnum", software.amazon.jsii.tests.calculator.StringEnum.class); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.EnumDispenser.class, "randomStringLikeEnum", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.StringEnum.class)); } } @@ -7651,7 +7811,7 @@ public class EraseUndefinedHashValues extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.Boolean doesKeyExist(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.EraseUndefinedHashValuesOptions opts, final @org.jetbrains.annotations.NotNull java.lang.String key) { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.EraseUndefinedHashValues.class, "doesKeyExist", java.lang.Boolean.class, new Object[] { java.util.Objects.requireNonNull(opts, "opts is required"), java.util.Objects.requireNonNull(key, "key is required") }); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.EraseUndefinedHashValues.class, "doesKeyExist", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class), new Object[] { java.util.Objects.requireNonNull(opts, "opts is required"), java.util.Objects.requireNonNull(key, "key is required") }); } /** @@ -7751,6 +7911,7 @@ public interface EraseUndefinedHashValuesOptions extends software.amazon.jsii.Js * An implementation for {@link EraseUndefinedHashValuesOptions} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements EraseUndefinedHashValuesOptions { private final java.lang.String option1; private final java.lang.String option2; @@ -7761,30 +7922,31 @@ public interface EraseUndefinedHashValuesOptions extends software.amazon.jsii.Js */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.option1 = this.jsiiGet("option1", java.lang.String.class); - this.option2 = this.jsiiGet("option2", java.lang.String.class); + this.option1 = software.amazon.jsii.Kernel.get(this, "option1", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + this.option2 = software.amazon.jsii.Kernel.get(this, "option2", software.amazon.jsii.NativeType.forClass(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 option1, final java.lang.String option2) { + protected Jsii$Proxy(final java.lang.String option1, final java.lang.String option2) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.option1 = option1; this.option2 = option2; } @Override - public java.lang.String getOption1() { + public final java.lang.String getOption1() { return this.option1; } @Override - public java.lang.String getOption2() { + public final java.lang.String getOption2() { return this.option2; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -7807,7 +7969,7 @@ public interface EraseUndefinedHashValuesOptions extends software.amazon.jsii.Js } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -7818,7 +7980,7 @@ public interface EraseUndefinedHashValuesOptions extends software.amazon.jsii.Js } @Override - public int hashCode() { + public final int hashCode() { int result = this.option1 != null ? this.option1.hashCode() : 0; result = 31 * result + (this.option2 != null ? this.option2.hashCode() : 0); return result; @@ -7869,28 +8031,28 @@ public class ExperimentalClass extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public void method() { - this.jsiiCall("method", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "method", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.lang.String getReadonlyProperty() { - return this.jsiiGet("readonlyProperty", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "readonlyProperty", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.Nullable java.lang.Number getMutableProperty() { - return this.jsiiGet("mutableProperty", java.lang.Number.class); + return software.amazon.jsii.Kernel.get(this, "mutableProperty", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public void setMutableProperty(final @org.jetbrains.annotations.Nullable java.lang.Number value) { - this.jsiiSet("mutableProperty", value); + software.amazon.jsii.Kernel.set(this, "mutableProperty", value); } } @@ -7974,6 +8136,7 @@ public interface ExperimentalStruct extends software.amazon.jsii.JsiiSerializabl * An implementation for {@link ExperimentalStruct} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ExperimentalStruct { private final java.lang.String readonlyProperty; @@ -7983,23 +8146,24 @@ public interface ExperimentalStruct extends software.amazon.jsii.JsiiSerializabl */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.readonlyProperty = this.jsiiGet("readonlyProperty", java.lang.String.class); + this.readonlyProperty = software.amazon.jsii.Kernel.get(this, "readonlyProperty", software.amazon.jsii.NativeType.forClass(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 readonlyProperty) { + protected Jsii$Proxy(final java.lang.String readonlyProperty) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.readonlyProperty = java.util.Objects.requireNonNull(readonlyProperty, "readonlyProperty is required"); } @Override - public java.lang.String getReadonlyProperty() { + public final java.lang.String getReadonlyProperty() { return this.readonlyProperty; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -8017,7 +8181,7 @@ public interface ExperimentalStruct extends software.amazon.jsii.JsiiSerializabl } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -8027,7 +8191,7 @@ public interface ExperimentalStruct extends software.amazon.jsii.JsiiSerializabl } @Override - public int hashCode() { + public final int hashCode() { int result = this.readonlyProperty.hashCode(); return result; } @@ -8067,7 +8231,7 @@ public class ExportedBaseClass extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Boolean getSuccess() { - return this.jsiiGet("success", java.lang.Boolean.class); + return software.amazon.jsii.Kernel.get(this, "success", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); } } @@ -8147,6 +8311,7 @@ public interface ExtendsInternalInterface extends software.amazon.jsii.JsiiSeria * An implementation for {@link ExtendsInternalInterface} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ExtendsInternalInterface { private final java.lang.Boolean boom; private final java.lang.String prop; @@ -8157,30 +8322,31 @@ public interface ExtendsInternalInterface extends software.amazon.jsii.JsiiSeria */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.boom = this.jsiiGet("boom", java.lang.Boolean.class); - this.prop = this.jsiiGet("prop", java.lang.String.class); + this.boom = software.amazon.jsii.Kernel.get(this, "boom", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); + this.prop = software.amazon.jsii.Kernel.get(this, "prop", software.amazon.jsii.NativeType.forClass(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.Boolean boom, final java.lang.String prop) { + protected Jsii$Proxy(final java.lang.Boolean boom, final java.lang.String prop) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.boom = java.util.Objects.requireNonNull(boom, "boom is required"); this.prop = java.util.Objects.requireNonNull(prop, "prop is required"); } @Override - public java.lang.Boolean getBoom() { + public final java.lang.Boolean getBoom() { return this.boom; } @Override - public java.lang.String getProp() { + public final java.lang.String getProp() { return this.prop; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -8199,7 +8365,7 @@ public interface ExtendsInternalInterface extends software.amazon.jsii.JsiiSeria } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -8210,7 +8376,7 @@ public interface ExtendsInternalInterface extends software.amazon.jsii.JsiiSeria } @Override - public int hashCode() { + public final int hashCode() { int result = this.boom.hashCode(); result = 31 * result + (this.prop.hashCode()); return result; @@ -8261,28 +8427,28 @@ public class ExternalClass extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void method() { - this.jsiiCall("method", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "method", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getReadonlyProperty() { - return this.jsiiGet("readonlyProperty", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "readonlyProperty", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.Nullable java.lang.Number getMutableProperty() { - return this.jsiiGet("mutableProperty", java.lang.Number.class); + return software.amazon.jsii.Kernel.get(this, "mutableProperty", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setMutableProperty(final @org.jetbrains.annotations.Nullable java.lang.Number value) { - this.jsiiSet("mutableProperty", value); + software.amazon.jsii.Kernel.set(this, "mutableProperty", value); } } @@ -8366,6 +8532,7 @@ public interface ExternalStruct extends software.amazon.jsii.JsiiSerializable { * An implementation for {@link ExternalStruct} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ExternalStruct { private final java.lang.String readonlyProperty; @@ -8375,23 +8542,24 @@ public interface ExternalStruct extends software.amazon.jsii.JsiiSerializable { */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.readonlyProperty = this.jsiiGet("readonlyProperty", java.lang.String.class); + this.readonlyProperty = software.amazon.jsii.Kernel.get(this, "readonlyProperty", software.amazon.jsii.NativeType.forClass(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 readonlyProperty) { + protected Jsii$Proxy(final java.lang.String readonlyProperty) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.readonlyProperty = java.util.Objects.requireNonNull(readonlyProperty, "readonlyProperty is required"); } @Override - public java.lang.String getReadonlyProperty() { + public final java.lang.String getReadonlyProperty() { return this.readonlyProperty; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -8409,7 +8577,7 @@ public interface ExternalStruct extends software.amazon.jsii.JsiiSerializable { } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -8419,7 +8587,7 @@ public interface ExternalStruct extends software.amazon.jsii.JsiiSerializable { } @Override - public int hashCode() { + public final int hashCode() { int result = this.readonlyProperty.hashCode(); return result; } @@ -8461,7 +8629,7 @@ public class GiveMeStructs extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.MyFirstStruct derivedToFirst(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.DerivedStruct derived) { - return this.jsiiCall("derivedToFirst", software.amazon.jsii.tests.calculator.lib.MyFirstStruct.class, new Object[] { java.util.Objects.requireNonNull(derived, "derived is required") }); + return software.amazon.jsii.Kernel.call(this, "derivedToFirst", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.lib.MyFirstStruct.class), new Object[] { java.util.Objects.requireNonNull(derived, "derived is required") }); } /** @@ -8471,7 +8639,7 @@ public class GiveMeStructs extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.DoubleTrouble readDerivedNonPrimitive(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.DerivedStruct derived) { - return this.jsiiCall("readDerivedNonPrimitive", software.amazon.jsii.tests.calculator.DoubleTrouble.class, new Object[] { java.util.Objects.requireNonNull(derived, "derived is required") }); + return software.amazon.jsii.Kernel.call(this, "readDerivedNonPrimitive", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.DoubleTrouble.class), new Object[] { java.util.Objects.requireNonNull(derived, "derived is required") }); } /** @@ -8481,14 +8649,14 @@ public class GiveMeStructs extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number readFirstNumber(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.MyFirstStruct first) { - return this.jsiiCall("readFirstNumber", java.lang.Number.class, new Object[] { java.util.Objects.requireNonNull(first, "first is required") }); + return software.amazon.jsii.Kernel.call(this, "readFirstNumber", software.amazon.jsii.NativeType.forClass(java.lang.Number.class), new Object[] { java.util.Objects.requireNonNull(first, "first is required") }); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.StructWithOnlyOptionals getStructLiteral() { - return this.jsiiGet("structLiteral", software.amazon.jsii.tests.calculator.lib.StructWithOnlyOptionals.class); + return software.amazon.jsii.Kernel.get(this, "structLiteral", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.lib.StructWithOnlyOptionals.class)); } } @@ -8557,6 +8725,7 @@ public interface Greetee extends software.amazon.jsii.JsiiSerializable { * An implementation for {@link Greetee} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements Greetee { private final java.lang.String name; @@ -8566,23 +8735,24 @@ public interface Greetee extends software.amazon.jsii.JsiiSerializable { */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.name = this.jsiiGet("name", java.lang.String.class); + this.name = software.amazon.jsii.Kernel.get(this, "name", software.amazon.jsii.NativeType.forClass(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) { + protected Jsii$Proxy(final java.lang.String name) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.name = name; } @Override - public java.lang.String getName() { + public final java.lang.String getName() { return this.name; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -8602,7 +8772,7 @@ public interface Greetee extends software.amazon.jsii.JsiiSerializable { } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -8612,7 +8782,7 @@ public interface Greetee extends software.amazon.jsii.JsiiSerializable { } @Override - public int hashCode() { + public final int hashCode() { int result = this.name != null ? this.name.hashCode() : 0; return result; } @@ -8652,7 +8822,7 @@ public class GreetingAugmenter extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String betterGreeting(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.IFriendly friendly) { - return this.jsiiCall("betterGreeting", java.lang.String.class, new Object[] { java.util.Objects.requireNonNull(friendly, "friendly is required") }); + return software.amazon.jsii.Kernel.call(this, "betterGreeting", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(friendly, "friendly is required") }); } } @@ -8683,7 +8853,8 @@ public interface IAnonymousImplementationProvider extends software.amazon.jsii.J /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IAnonymousImplementationProvider { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IAnonymousImplementationProvider.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -8692,16 +8863,39 @@ public interface IAnonymousImplementationProvider extends software.amazon.jsii.J */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.Implementation provideAsClass() { - return this.jsiiCall("provideAsClass", software.amazon.jsii.tests.calculator.Implementation.class); + public final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.Implementation provideAsClass() { + return software.amazon.jsii.Kernel.call(this, "provideAsClass", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.Implementation.class)); + } + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @Override + public final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.IAnonymouslyImplementMe provideAsInterface() { + return software.amazon.jsii.Kernel.call(this, "provideAsInterface", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.IAnonymouslyImplementMe.class)); + } + } + + /** + * Internal default implementation for {@link IAnonymousImplementationProvider}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IAnonymousImplementationProvider { + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @Override + default @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.Implementation provideAsClass() { + return software.amazon.jsii.Kernel.call(this, "provideAsClass", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.Implementation.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.IAnonymouslyImplementMe provideAsInterface() { - return this.jsiiCall("provideAsInterface", software.amazon.jsii.tests.calculator.IAnonymouslyImplementMe.class); + default @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.IAnonymouslyImplementMe provideAsInterface() { + return software.amazon.jsii.Kernel.call(this, "provideAsInterface", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.IAnonymouslyImplementMe.class)); } } } @@ -8732,7 +8926,8 @@ public interface IAnonymouslyImplementMe extends software.amazon.jsii.JsiiSerial /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IAnonymouslyImplementMe { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IAnonymouslyImplementMe.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -8741,16 +8936,39 @@ public interface IAnonymouslyImplementMe extends software.amazon.jsii.JsiiSerial */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public @org.jetbrains.annotations.NotNull java.lang.Number getValue() { - return this.jsiiGet("value", java.lang.Number.class); + public final @org.jetbrains.annotations.NotNull java.lang.Number getValue() { + return software.amazon.jsii.Kernel.get(this, "value", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); + } + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @Override + public final @org.jetbrains.annotations.NotNull java.lang.String verb() { + return software.amazon.jsii.Kernel.call(this, "verb", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + } + } + + /** + * Internal default implementation for {@link IAnonymouslyImplementMe}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IAnonymouslyImplementMe { + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + default @org.jetbrains.annotations.NotNull java.lang.Number getValue() { + return software.amazon.jsii.Kernel.get(this, "value", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - public @org.jetbrains.annotations.NotNull java.lang.String verb() { - return this.jsiiCall("verb", java.lang.String.class); + default @org.jetbrains.annotations.NotNull java.lang.String verb() { + return software.amazon.jsii.Kernel.call(this, "verb", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } } } @@ -8780,7 +8998,8 @@ public interface IAnotherPublicInterface extends software.amazon.jsii.JsiiSerial /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IAnotherPublicInterface { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IAnotherPublicInterface.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -8789,16 +9008,39 @@ public interface IAnotherPublicInterface extends software.amazon.jsii.JsiiSerial */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public @org.jetbrains.annotations.NotNull java.lang.String getA() { - return this.jsiiGet("a", java.lang.String.class); + public final @org.jetbrains.annotations.NotNull java.lang.String getA() { + return software.amazon.jsii.Kernel.get(this, "a", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + } + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public final void setA(final @org.jetbrains.annotations.NotNull java.lang.String value) { + software.amazon.jsii.Kernel.set(this, "a", java.util.Objects.requireNonNull(value, "a is required")); + } + } + + /** + * Internal default implementation for {@link IAnotherPublicInterface}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IAnotherPublicInterface { + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + default @org.jetbrains.annotations.NotNull java.lang.String getA() { + return software.amazon.jsii.Kernel.get(this, "a", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public void setA(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiSet("a", java.util.Objects.requireNonNull(value, "a is required")); + default void setA(final @org.jetbrains.annotations.NotNull java.lang.String value) { + software.amazon.jsii.Kernel.set(this, "a", java.util.Objects.requireNonNull(value, "a is required")); } } } @@ -8824,7 +9066,8 @@ public interface IBell extends software.amazon.jsii.JsiiSerializable { /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IBell { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IBell.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -8833,8 +9076,23 @@ public interface IBell extends software.amazon.jsii.JsiiSerializable { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - public void ring() { - this.jsiiCall("ring", software.amazon.jsii.NativeType.VOID); + public final void ring() { + software.amazon.jsii.Kernel.call(this, "ring", software.amazon.jsii.NativeType.VOID); + } + } + + /** + * Internal default implementation for {@link IBell}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IBell { + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @Override + default void ring() { + software.amazon.jsii.Kernel.call(this, "ring", software.amazon.jsii.NativeType.VOID); } } } @@ -8862,7 +9120,8 @@ public interface IBellRinger extends software.amazon.jsii.JsiiSerializable { /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IBellRinger { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IBellRinger.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -8872,8 +9131,24 @@ public interface IBellRinger extends software.amazon.jsii.JsiiSerializable { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - public void yourTurn(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.IBell bell) { - this.jsiiCall("yourTurn", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(bell, "bell is required") }); + public final void yourTurn(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.IBell bell) { + software.amazon.jsii.Kernel.call(this, "yourTurn", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(bell, "bell is required") }); + } + } + + /** + * Internal default implementation for {@link IBellRinger}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IBellRinger { + + /** + * @param bell This parameter is required. + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @Override + default void yourTurn(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.IBell bell) { + software.amazon.jsii.Kernel.call(this, "yourTurn", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(bell, "bell is required") }); } } } @@ -8901,7 +9176,8 @@ public interface IConcreteBellRinger extends software.amazon.jsii.JsiiSerializab /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IConcreteBellRinger { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IConcreteBellRinger.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -8911,8 +9187,24 @@ public interface IConcreteBellRinger extends software.amazon.jsii.JsiiSerializab */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - public void yourTurn(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.Bell bell) { - this.jsiiCall("yourTurn", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(bell, "bell is required") }); + public final void yourTurn(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.Bell bell) { + software.amazon.jsii.Kernel.call(this, "yourTurn", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(bell, "bell is required") }); + } + } + + /** + * Internal default implementation for {@link IConcreteBellRinger}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IConcreteBellRinger { + + /** + * @param bell This parameter is required. + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @Override + default void yourTurn(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.Bell bell) { + software.amazon.jsii.Kernel.call(this, "yourTurn", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(bell, "bell is required") }); } } } @@ -8959,7 +9251,8 @@ public interface IDeprecatedInterface extends software.amazon.jsii.JsiiSerializa /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IDeprecatedInterface { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IDeprecatedInterface.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -8970,8 +9263,45 @@ public interface IDeprecatedInterface extends software.amazon.jsii.JsiiSerializa @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated - public @org.jetbrains.annotations.Nullable java.lang.Number getMutableProperty() { - return this.jsiiGet("mutableProperty", java.lang.Number.class); + public final @org.jetbrains.annotations.Nullable java.lang.Number getMutableProperty() { + return software.amazon.jsii.Kernel.get(this, "mutableProperty", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); + } + + /** + * @deprecated could be better + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) + @Deprecated + public final void setMutableProperty(final @org.jetbrains.annotations.Nullable java.lang.Number value) { + software.amazon.jsii.Kernel.set(this, "mutableProperty", value); + } + + /** + * @deprecated services no purpose + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) + @Deprecated + @Override + public final void method() { + software.amazon.jsii.Kernel.call(this, "method", software.amazon.jsii.NativeType.VOID); + } + } + + /** + * Internal default implementation for {@link IDeprecatedInterface}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IDeprecatedInterface { + + /** + * @deprecated could be better + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) + @Deprecated + default @org.jetbrains.annotations.Nullable java.lang.Number getMutableProperty() { + return software.amazon.jsii.Kernel.get(this, "mutableProperty", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** @@ -8980,8 +9310,8 @@ public interface IDeprecatedInterface extends software.amazon.jsii.JsiiSerializa @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated - public void setMutableProperty(final @org.jetbrains.annotations.Nullable java.lang.Number value) { - this.jsiiSet("mutableProperty", value); + default void setMutableProperty(final @org.jetbrains.annotations.Nullable java.lang.Number value) { + software.amazon.jsii.Kernel.set(this, "mutableProperty", value); } /** @@ -8990,8 +9320,8 @@ public interface IDeprecatedInterface extends software.amazon.jsii.JsiiSerializa @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated @Override - public void method() { - this.jsiiCall("method", software.amazon.jsii.NativeType.VOID); + default void method() { + software.amazon.jsii.Kernel.call(this, "method", software.amazon.jsii.NativeType.VOID); } } } @@ -9031,7 +9361,8 @@ public interface IExperimentalInterface extends software.amazon.jsii.JsiiSeriali /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IExperimentalInterface { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IExperimentalInterface.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -9040,24 +9371,55 @@ public interface IExperimentalInterface extends software.amazon.jsii.JsiiSeriali */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - public @org.jetbrains.annotations.Nullable java.lang.Number getMutableProperty() { - return this.jsiiGet("mutableProperty", java.lang.Number.class); + public final @org.jetbrains.annotations.Nullable java.lang.Number getMutableProperty() { + return software.amazon.jsii.Kernel.get(this, "mutableProperty", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); + } + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) + public final void setMutableProperty(final @org.jetbrains.annotations.Nullable java.lang.Number value) { + software.amazon.jsii.Kernel.set(this, "mutableProperty", value); + } + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) + @Override + public final void method() { + software.amazon.jsii.Kernel.call(this, "method", software.amazon.jsii.NativeType.VOID); + } + } + + /** + * Internal default implementation for {@link IExperimentalInterface}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IExperimentalInterface { + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) + default @org.jetbrains.annotations.Nullable java.lang.Number getMutableProperty() { + return software.amazon.jsii.Kernel.get(this, "mutableProperty", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) - public void setMutableProperty(final @org.jetbrains.annotations.Nullable java.lang.Number value) { - this.jsiiSet("mutableProperty", value); + default void setMutableProperty(final @org.jetbrains.annotations.Nullable java.lang.Number value) { + software.amazon.jsii.Kernel.set(this, "mutableProperty", value); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override - public void method() { - this.jsiiCall("method", software.amazon.jsii.NativeType.VOID); + default void method() { + software.amazon.jsii.Kernel.call(this, "method", software.amazon.jsii.NativeType.VOID); } } } @@ -9092,7 +9454,8 @@ public interface IExtendsPrivateInterface extends software.amazon.jsii.JsiiSeria /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IExtendsPrivateInterface { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IExtendsPrivateInterface.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -9101,44 +9464,75 @@ public interface IExtendsPrivateInterface extends software.amazon.jsii.JsiiSeria */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public @org.jetbrains.annotations.NotNull java.util.List getMoreThings() { - return java.util.Collections.unmodifiableList(this.jsiiGet("moreThings", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)))); + public final @org.jetbrains.annotations.NotNull java.util.List getMoreThings() { + return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "moreThings", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)))); } /** */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public @org.jetbrains.annotations.NotNull java.lang.String getPrivateValue() { - return this.jsiiGet("private", java.lang.String.class); + public final @org.jetbrains.annotations.NotNull java.lang.String getPrivateValue() { + return software.amazon.jsii.Kernel.get(this, "private", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public void setPrivateValue(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiSet("private", java.util.Objects.requireNonNull(value, "private is required")); + public final void setPrivateValue(final @org.jetbrains.annotations.NotNull java.lang.String value) { + software.amazon.jsii.Kernel.set(this, "private", java.util.Objects.requireNonNull(value, "private is required")); } } -} - -`; - -exports[`Generated code for "jsii-calc": /java/src/main/java/software/amazon/jsii/tests/calculator/IExternalInterface.java 1`] = ` -package software.amazon.jsii.tests.calculator; - -/** - */ -@javax.annotation.Generated(value = "jsii-pacmak") -@software.amazon.jsii.Jsii(module = software.amazon.jsii.tests.calculator.$Module.class, fqn = "jsii-calc.IExternalInterface") -@software.amazon.jsii.Jsii.Proxy(IExternalInterface.Jsii$Proxy.class) -@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) -public interface IExternalInterface extends software.amazon.jsii.JsiiSerializable { /** + * Internal default implementation for {@link IExtendsPrivateInterface}. */ - @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal + interface Jsii$Default extends IExtendsPrivateInterface { + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + default @org.jetbrains.annotations.NotNull java.util.List getMoreThings() { + return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "moreThings", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)))); + } + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + default @org.jetbrains.annotations.NotNull java.lang.String getPrivateValue() { + return software.amazon.jsii.Kernel.get(this, "private", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + } + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + default void setPrivateValue(final @org.jetbrains.annotations.NotNull java.lang.String value) { + software.amazon.jsii.Kernel.set(this, "private", java.util.Objects.requireNonNull(value, "private is required")); + } + } +} + +`; + +exports[`Generated code for "jsii-calc": /java/src/main/java/software/amazon/jsii/tests/calculator/IExternalInterface.java 1`] = ` +package software.amazon.jsii.tests.calculator; + +/** + */ +@javax.annotation.Generated(value = "jsii-pacmak") +@software.amazon.jsii.Jsii(module = software.amazon.jsii.tests.calculator.$Module.class, fqn = "jsii-calc.IExternalInterface") +@software.amazon.jsii.Jsii.Proxy(IExternalInterface.Jsii$Proxy.class) +@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) +public interface IExternalInterface extends software.amazon.jsii.JsiiSerializable { + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.lang.Number getMutableProperty() { return null; } @@ -9158,7 +9552,8 @@ public interface IExternalInterface extends software.amazon.jsii.JsiiSerializabl /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IExternalInterface { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IExternalInterface.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -9167,24 +9562,55 @@ public interface IExternalInterface extends software.amazon.jsii.JsiiSerializabl */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public @org.jetbrains.annotations.Nullable java.lang.Number getMutableProperty() { - return this.jsiiGet("mutableProperty", java.lang.Number.class); + public final @org.jetbrains.annotations.Nullable java.lang.Number getMutableProperty() { + return software.amazon.jsii.Kernel.get(this, "mutableProperty", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); + } + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public final void setMutableProperty(final @org.jetbrains.annotations.Nullable java.lang.Number value) { + software.amazon.jsii.Kernel.set(this, "mutableProperty", value); + } + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @Override + public final void method() { + software.amazon.jsii.Kernel.call(this, "method", software.amazon.jsii.NativeType.VOID); + } + } + + /** + * Internal default implementation for {@link IExternalInterface}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IExternalInterface { + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + default @org.jetbrains.annotations.Nullable java.lang.Number getMutableProperty() { + return software.amazon.jsii.Kernel.get(this, "mutableProperty", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public void setMutableProperty(final @org.jetbrains.annotations.Nullable java.lang.Number value) { - this.jsiiSet("mutableProperty", value); + default void setMutableProperty(final @org.jetbrains.annotations.Nullable java.lang.Number value) { + software.amazon.jsii.Kernel.set(this, "mutableProperty", value); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - public void method() { - this.jsiiCall("method", software.amazon.jsii.NativeType.VOID); + default void method() { + software.amazon.jsii.Kernel.call(this, "method", software.amazon.jsii.NativeType.VOID); } } } @@ -9220,18 +9646,29 @@ public interface IFriendlier extends software.amazon.jsii.JsiiSerializable, soft /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IFriendlier { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IFriendlier.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } + /** + * (deprecated) Say hello! + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) + @Deprecated + @Override + public final @org.jetbrains.annotations.NotNull java.lang.String hello() { + return software.amazon.jsii.Kernel.call(this, "hello", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + } + /** * Say farewell. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - public @org.jetbrains.annotations.NotNull java.lang.String farewell() { - return this.jsiiCall("farewell", java.lang.String.class); + public final @org.jetbrains.annotations.NotNull java.lang.String farewell() { + return software.amazon.jsii.Kernel.call(this, "farewell", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** @@ -9241,9 +9678,16 @@ public interface IFriendlier extends software.amazon.jsii.JsiiSerializable, soft */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - public @org.jetbrains.annotations.NotNull java.lang.String goodbye() { - return this.jsiiCall("goodbye", java.lang.String.class); + public final @org.jetbrains.annotations.NotNull java.lang.String goodbye() { + return software.amazon.jsii.Kernel.call(this, "goodbye", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } + } + + /** + * Internal default implementation for {@link IFriendlier}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IFriendlier, software.amazon.jsii.tests.calculator.lib.IFriendly.Jsii$Default { /** * (deprecated) Say hello! @@ -9251,8 +9695,28 @@ public interface IFriendlier extends software.amazon.jsii.JsiiSerializable, soft @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated @Override - public @org.jetbrains.annotations.NotNull java.lang.String hello() { - return this.jsiiCall("hello", java.lang.String.class); + default @org.jetbrains.annotations.NotNull java.lang.String hello() { + return software.amazon.jsii.Kernel.call(this, "hello", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + } + + /** + * Say farewell. + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @Override + default @org.jetbrains.annotations.NotNull java.lang.String farewell() { + return software.amazon.jsii.Kernel.call(this, "farewell", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + } + + /** + * Say goodbye. + *

+ * @return A goodbye blessing. + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @Override + default @org.jetbrains.annotations.NotNull java.lang.String goodbye() { + return software.amazon.jsii.Kernel.call(this, "goodbye", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } } } @@ -9273,7 +9737,8 @@ public interface IFriendlyRandomGenerator extends software.amazon.jsii.JsiiSeria /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IFriendlyRandomGenerator { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IFriendlyRandomGenerator.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -9285,8 +9750,36 @@ public interface IFriendlyRandomGenerator extends software.amazon.jsii.JsiiSeria */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - public @org.jetbrains.annotations.NotNull java.lang.Number next() { - return this.jsiiCall("next", java.lang.Number.class); + public final @org.jetbrains.annotations.NotNull java.lang.Number next() { + return software.amazon.jsii.Kernel.call(this, "next", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); + } + + /** + * (deprecated) Say hello! + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) + @Deprecated + @Override + public final @org.jetbrains.annotations.NotNull java.lang.String hello() { + return software.amazon.jsii.Kernel.call(this, "hello", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + } + } + + /** + * Internal default implementation for {@link IFriendlyRandomGenerator}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IFriendlyRandomGenerator, software.amazon.jsii.tests.calculator.IRandomNumberGenerator.Jsii$Default, software.amazon.jsii.tests.calculator.lib.IFriendly.Jsii$Default { + + /** + * Returns another random number. + *

+ * @return A random number. + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @Override + default @org.jetbrains.annotations.NotNull java.lang.Number next() { + return software.amazon.jsii.Kernel.call(this, "next", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** @@ -9295,8 +9788,8 @@ public interface IFriendlyRandomGenerator extends software.amazon.jsii.JsiiSeria @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated @Override - public @org.jetbrains.annotations.NotNull java.lang.String hello() { - return this.jsiiCall("hello", java.lang.String.class); + default @org.jetbrains.annotations.NotNull java.lang.String hello() { + return software.amazon.jsii.Kernel.call(this, "hello", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } } } @@ -9323,7 +9816,8 @@ public interface IInterfaceImplementedByAbstractClass extends software.amazon.js /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IInterfaceImplementedByAbstractClass { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IInterfaceImplementedByAbstractClass.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -9332,8 +9826,23 @@ public interface IInterfaceImplementedByAbstractClass extends software.amazon.js */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public @org.jetbrains.annotations.NotNull java.lang.String getPropFromInterface() { - return this.jsiiGet("propFromInterface", java.lang.String.class); + public final @org.jetbrains.annotations.NotNull java.lang.String getPropFromInterface() { + return software.amazon.jsii.Kernel.get(this, "propFromInterface", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + } + } + + /** + * Internal default implementation for {@link IInterfaceImplementedByAbstractClass}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IInterfaceImplementedByAbstractClass { + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + default @org.jetbrains.annotations.NotNull java.lang.String getPropFromInterface() { + return software.amazon.jsii.Kernel.get(this, "propFromInterface", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } } } @@ -9360,7 +9869,8 @@ public interface IInterfaceThatShouldNotBeADataType extends software.amazon.jsii /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IInterfaceThatShouldNotBeADataType { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IInterfaceThatShouldNotBeADataType.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -9369,24 +9879,55 @@ public interface IInterfaceThatShouldNotBeADataType extends software.amazon.jsii */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public @org.jetbrains.annotations.NotNull java.lang.String getOtherValue() { - return this.jsiiGet("otherValue", java.lang.String.class); + public final @org.jetbrains.annotations.NotNull java.lang.String getValue() { + return software.amazon.jsii.Kernel.get(this, "value", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + } + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public final @org.jetbrains.annotations.NotNull java.lang.String getOtherValue() { + return software.amazon.jsii.Kernel.get(this, "otherValue", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + } + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @Override + public final void doThings() { + software.amazon.jsii.Kernel.call(this, "doThings", software.amazon.jsii.NativeType.VOID); + } + } + + /** + * Internal default implementation for {@link IInterfaceThatShouldNotBeADataType}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IInterfaceThatShouldNotBeADataType, software.amazon.jsii.tests.calculator.IInterfaceWithMethods.Jsii$Default { + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + default @org.jetbrains.annotations.NotNull java.lang.String getValue() { + return software.amazon.jsii.Kernel.get(this, "value", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public @org.jetbrains.annotations.NotNull java.lang.String getValue() { - return this.jsiiGet("value", java.lang.String.class); + default @org.jetbrains.annotations.NotNull java.lang.String getOtherValue() { + return software.amazon.jsii.Kernel.get(this, "otherValue", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - public void doThings() { - this.jsiiCall("doThings", software.amazon.jsii.NativeType.VOID); + default void doThings() { + software.amazon.jsii.Kernel.call(this, "doThings", software.amazon.jsii.NativeType.VOID); } } } @@ -9412,7 +9953,8 @@ public interface IInterfaceWithInternal extends software.amazon.jsii.JsiiSeriali /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IInterfaceWithInternal { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IInterfaceWithInternal.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -9421,8 +9963,23 @@ public interface IInterfaceWithInternal extends software.amazon.jsii.JsiiSeriali */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - public void visible() { - this.jsiiCall("visible", software.amazon.jsii.NativeType.VOID); + public final void visible() { + software.amazon.jsii.Kernel.call(this, "visible", software.amazon.jsii.NativeType.VOID); + } + } + + /** + * Internal default implementation for {@link IInterfaceWithInternal}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IInterfaceWithInternal { + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @Override + default void visible() { + software.amazon.jsii.Kernel.call(this, "visible", software.amazon.jsii.NativeType.VOID); } } } @@ -9453,7 +10010,8 @@ public interface IInterfaceWithMethods extends software.amazon.jsii.JsiiSerializ /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IInterfaceWithMethods { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IInterfaceWithMethods.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -9462,16 +10020,39 @@ public interface IInterfaceWithMethods extends software.amazon.jsii.JsiiSerializ */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public @org.jetbrains.annotations.NotNull java.lang.String getValue() { - return this.jsiiGet("value", java.lang.String.class); + public final @org.jetbrains.annotations.NotNull java.lang.String getValue() { + return software.amazon.jsii.Kernel.get(this, "value", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - public void doThings() { - this.jsiiCall("doThings", software.amazon.jsii.NativeType.VOID); + public final void doThings() { + software.amazon.jsii.Kernel.call(this, "doThings", software.amazon.jsii.NativeType.VOID); + } + } + + /** + * Internal default implementation for {@link IInterfaceWithMethods}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IInterfaceWithMethods { + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + default @org.jetbrains.annotations.NotNull java.lang.String getValue() { + return software.amazon.jsii.Kernel.get(this, "value", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + } + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @Override + default void doThings() { + software.amazon.jsii.Kernel.call(this, "doThings", software.amazon.jsii.NativeType.VOID); } } } @@ -9506,7 +10087,8 @@ public interface IInterfaceWithOptionalMethodArguments extends software.amazon.j /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IInterfaceWithOptionalMethodArguments { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IInterfaceWithOptionalMethodArguments.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -9517,8 +10099,8 @@ public interface IInterfaceWithOptionalMethodArguments extends software.amazon.j */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - public void hello(final @org.jetbrains.annotations.NotNull java.lang.String arg1, final @org.jetbrains.annotations.Nullable java.lang.Number arg2) { - this.jsiiCall("hello", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(arg1, "arg1 is required"), arg2 }); + public final void hello(final @org.jetbrains.annotations.NotNull java.lang.String arg1, final @org.jetbrains.annotations.Nullable java.lang.Number arg2) { + software.amazon.jsii.Kernel.call(this, "hello", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(arg1, "arg1 is required"), arg2 }); } /** @@ -9526,8 +10108,25 @@ public interface IInterfaceWithOptionalMethodArguments extends software.amazon.j */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - public void hello(final @org.jetbrains.annotations.NotNull java.lang.String arg1) { - this.jsiiCall("hello", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(arg1, "arg1 is required") }); + public final void hello(final @org.jetbrains.annotations.NotNull java.lang.String arg1) { + software.amazon.jsii.Kernel.call(this, "hello", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(arg1, "arg1 is required") }); + } + } + + /** + * Internal default implementation for {@link IInterfaceWithOptionalMethodArguments}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IInterfaceWithOptionalMethodArguments { + + /** + * @param arg1 This parameter is required. + * @param arg2 + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @Override + default void hello(final @org.jetbrains.annotations.NotNull java.lang.String arg1, final @org.jetbrains.annotations.Nullable java.lang.Number arg2) { + software.amazon.jsii.Kernel.call(this, "hello", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(arg1, "arg1 is required"), arg2 }); } } } @@ -9562,7 +10161,8 @@ public interface IInterfaceWithProperties extends software.amazon.jsii.JsiiSeria /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IInterfaceWithProperties { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IInterfaceWithProperties.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -9571,24 +10171,55 @@ public interface IInterfaceWithProperties extends software.amazon.jsii.JsiiSeria */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public @org.jetbrains.annotations.NotNull java.lang.String getReadOnlyString() { - return this.jsiiGet("readOnlyString", java.lang.String.class); + public final @org.jetbrains.annotations.NotNull java.lang.String getReadOnlyString() { + return software.amazon.jsii.Kernel.get(this, "readOnlyString", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + } + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public final @org.jetbrains.annotations.NotNull java.lang.String getReadWriteString() { + return software.amazon.jsii.Kernel.get(this, "readWriteString", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + } + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public final void setReadWriteString(final @org.jetbrains.annotations.NotNull java.lang.String value) { + software.amazon.jsii.Kernel.set(this, "readWriteString", java.util.Objects.requireNonNull(value, "readWriteString is required")); + } + } + + /** + * Internal default implementation for {@link IInterfaceWithProperties}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IInterfaceWithProperties { + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + default @org.jetbrains.annotations.NotNull java.lang.String getReadOnlyString() { + return software.amazon.jsii.Kernel.get(this, "readOnlyString", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public @org.jetbrains.annotations.NotNull java.lang.String getReadWriteString() { - return this.jsiiGet("readWriteString", java.lang.String.class); + default @org.jetbrains.annotations.NotNull java.lang.String getReadWriteString() { + return software.amazon.jsii.Kernel.get(this, "readWriteString", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public void setReadWriteString(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiSet("readWriteString", java.util.Objects.requireNonNull(value, "readWriteString is required")); + default void setReadWriteString(final @org.jetbrains.annotations.NotNull java.lang.String value) { + software.amazon.jsii.Kernel.set(this, "readWriteString", java.util.Objects.requireNonNull(value, "readWriteString is required")); } } } @@ -9618,7 +10249,8 @@ public interface IInterfaceWithPropertiesExtension extends software.amazon.jsii. /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IInterfaceWithPropertiesExtension { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IInterfaceWithPropertiesExtension.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -9627,40 +10259,87 @@ public interface IInterfaceWithPropertiesExtension extends software.amazon.jsii. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public @org.jetbrains.annotations.NotNull java.lang.Number getFoo() { - return this.jsiiGet("foo", java.lang.Number.class); + public final @org.jetbrains.annotations.NotNull java.lang.String getReadOnlyString() { + return software.amazon.jsii.Kernel.get(this, "readOnlyString", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + } + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public final @org.jetbrains.annotations.NotNull java.lang.String getReadWriteString() { + return software.amazon.jsii.Kernel.get(this, "readWriteString", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + } + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public final void setReadWriteString(final @org.jetbrains.annotations.NotNull java.lang.String value) { + software.amazon.jsii.Kernel.set(this, "readWriteString", java.util.Objects.requireNonNull(value, "readWriteString is required")); + } + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public final @org.jetbrains.annotations.NotNull java.lang.Number getFoo() { + return software.amazon.jsii.Kernel.get(this, "foo", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); + } + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public final void setFoo(final @org.jetbrains.annotations.NotNull java.lang.Number value) { + software.amazon.jsii.Kernel.set(this, "foo", java.util.Objects.requireNonNull(value, "foo is required")); + } + } + + /** + * Internal default implementation for {@link IInterfaceWithPropertiesExtension}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IInterfaceWithPropertiesExtension, software.amazon.jsii.tests.calculator.IInterfaceWithProperties.Jsii$Default { + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + default @org.jetbrains.annotations.NotNull java.lang.String getReadOnlyString() { + return software.amazon.jsii.Kernel.get(this, "readOnlyString", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public void setFoo(final @org.jetbrains.annotations.NotNull java.lang.Number value) { - this.jsiiSet("foo", java.util.Objects.requireNonNull(value, "foo is required")); + default @org.jetbrains.annotations.NotNull java.lang.String getReadWriteString() { + return software.amazon.jsii.Kernel.get(this, "readWriteString", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public @org.jetbrains.annotations.NotNull java.lang.String getReadOnlyString() { - return this.jsiiGet("readOnlyString", java.lang.String.class); + default void setReadWriteString(final @org.jetbrains.annotations.NotNull java.lang.String value) { + software.amazon.jsii.Kernel.set(this, "readWriteString", java.util.Objects.requireNonNull(value, "readWriteString is required")); } /** */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public @org.jetbrains.annotations.NotNull java.lang.String getReadWriteString() { - return this.jsiiGet("readWriteString", java.lang.String.class); + default @org.jetbrains.annotations.NotNull java.lang.Number getFoo() { + return software.amazon.jsii.Kernel.get(this, "foo", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public void setReadWriteString(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiSet("readWriteString", java.util.Objects.requireNonNull(value, "readWriteString is required")); + default void setFoo(final @org.jetbrains.annotations.NotNull java.lang.Number value) { + software.amazon.jsii.Kernel.set(this, "foo", java.util.Objects.requireNonNull(value, "foo is required")); } } } @@ -9696,7 +10375,8 @@ public interface IJSII417Derived extends software.amazon.jsii.JsiiSerializable, /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IJSII417Derived { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IJSII417Derived.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -9705,40 +10385,87 @@ public interface IJSII417Derived extends software.amazon.jsii.JsiiSerializable, */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public @org.jetbrains.annotations.NotNull java.lang.String getProperty() { - return this.jsiiGet("property", java.lang.String.class); + public final @org.jetbrains.annotations.NotNull java.lang.Boolean getHasRoot() { + return software.amazon.jsii.Kernel.get(this, "hasRoot", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); } /** */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public @org.jetbrains.annotations.NotNull java.lang.Boolean getHasRoot() { - return this.jsiiGet("hasRoot", java.lang.Boolean.class); + public final @org.jetbrains.annotations.NotNull java.lang.String getProperty() { + return software.amazon.jsii.Kernel.get(this, "property", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - public void bar() { - this.jsiiCall("bar", software.amazon.jsii.NativeType.VOID); + public final void foo() { + software.amazon.jsii.Kernel.call(this, "foo", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - public void baz() { - this.jsiiCall("baz", software.amazon.jsii.NativeType.VOID); + public final void bar() { + software.amazon.jsii.Kernel.call(this, "bar", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - public void foo() { - this.jsiiCall("foo", software.amazon.jsii.NativeType.VOID); + public final void baz() { + software.amazon.jsii.Kernel.call(this, "baz", software.amazon.jsii.NativeType.VOID); + } + } + + /** + * Internal default implementation for {@link IJSII417Derived}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IJSII417Derived, software.amazon.jsii.tests.calculator.IJSII417PublicBaseOfBase.Jsii$Default { + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + default @org.jetbrains.annotations.NotNull java.lang.Boolean getHasRoot() { + return software.amazon.jsii.Kernel.get(this, "hasRoot", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); + } + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + default @org.jetbrains.annotations.NotNull java.lang.String getProperty() { + return software.amazon.jsii.Kernel.get(this, "property", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + } + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @Override + default void foo() { + software.amazon.jsii.Kernel.call(this, "foo", software.amazon.jsii.NativeType.VOID); + } + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @Override + default void bar() { + software.amazon.jsii.Kernel.call(this, "bar", software.amazon.jsii.NativeType.VOID); + } + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @Override + default void baz() { + software.amazon.jsii.Kernel.call(this, "baz", software.amazon.jsii.NativeType.VOID); } } } @@ -9769,7 +10496,8 @@ public interface IJSII417PublicBaseOfBase extends software.amazon.jsii.JsiiSeria /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IJSII417PublicBaseOfBase { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IJSII417PublicBaseOfBase.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -9778,16 +10506,39 @@ public interface IJSII417PublicBaseOfBase extends software.amazon.jsii.JsiiSeria */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public @org.jetbrains.annotations.NotNull java.lang.Boolean getHasRoot() { - return this.jsiiGet("hasRoot", java.lang.Boolean.class); + public final @org.jetbrains.annotations.NotNull java.lang.Boolean getHasRoot() { + return software.amazon.jsii.Kernel.get(this, "hasRoot", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); + } + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @Override + public final void foo() { + software.amazon.jsii.Kernel.call(this, "foo", software.amazon.jsii.NativeType.VOID); + } + } + + /** + * Internal default implementation for {@link IJSII417PublicBaseOfBase}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IJSII417PublicBaseOfBase { + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + default @org.jetbrains.annotations.NotNull java.lang.Boolean getHasRoot() { + return software.amazon.jsii.Kernel.get(this, "hasRoot", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - public void foo() { - this.jsiiCall("foo", software.amazon.jsii.NativeType.VOID); + default void foo() { + software.amazon.jsii.Kernel.call(this, "foo", software.amazon.jsii.NativeType.VOID); } } } @@ -9808,11 +10559,19 @@ public interface IJsii487External extends software.amazon.jsii.JsiiSerializable /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IJsii487External { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IJsii487External.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } } + + /** + * Internal default implementation for {@link IJsii487External}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IJsii487External { + } } `; @@ -9831,11 +10590,19 @@ public interface IJsii487External2 extends software.amazon.jsii.JsiiSerializable /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IJsii487External2 { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IJsii487External2.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } } + + /** + * Internal default implementation for {@link IJsii487External2}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IJsii487External2 { + } } `; @@ -9854,11 +10621,19 @@ public interface IJsii496 extends software.amazon.jsii.JsiiSerializable { /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IJsii496 { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IJsii496.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } } + + /** + * Internal default implementation for {@link IJsii496}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IJsii496 { + } } `; @@ -9886,7 +10661,8 @@ public interface IMutableObjectLiteral extends software.amazon.jsii.JsiiSerializ /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IMutableObjectLiteral { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IMutableObjectLiteral.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -9895,16 +10671,39 @@ public interface IMutableObjectLiteral extends software.amazon.jsii.JsiiSerializ */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public @org.jetbrains.annotations.NotNull java.lang.String getValue() { - return this.jsiiGet("value", java.lang.String.class); + public final @org.jetbrains.annotations.NotNull java.lang.String getValue() { + return software.amazon.jsii.Kernel.get(this, "value", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + } + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public final void setValue(final @org.jetbrains.annotations.NotNull java.lang.String value) { + software.amazon.jsii.Kernel.set(this, "value", java.util.Objects.requireNonNull(value, "value is required")); } + } + + /** + * Internal default implementation for {@link IMutableObjectLiteral}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IMutableObjectLiteral { /** */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public void setValue(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiSet("value", java.util.Objects.requireNonNull(value, "value is required")); + default @org.jetbrains.annotations.NotNull java.lang.String getValue() { + return software.amazon.jsii.Kernel.get(this, "value", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + } + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + default void setValue(final @org.jetbrains.annotations.NotNull java.lang.String value) { + software.amazon.jsii.Kernel.set(this, "value", java.util.Objects.requireNonNull(value, "value is required")); } } } @@ -9943,7 +10742,8 @@ public interface INonInternalInterface extends software.amazon.jsii.JsiiSerializ /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.INonInternalInterface { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.INonInternalInterface.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -9952,48 +10752,103 @@ public interface INonInternalInterface extends software.amazon.jsii.JsiiSerializ */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public @org.jetbrains.annotations.NotNull java.lang.String getB() { - return this.jsiiGet("b", java.lang.String.class); + public final @org.jetbrains.annotations.NotNull java.lang.String getA() { + return software.amazon.jsii.Kernel.get(this, "a", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + } + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public final void setA(final @org.jetbrains.annotations.NotNull java.lang.String value) { + software.amazon.jsii.Kernel.set(this, "a", java.util.Objects.requireNonNull(value, "a is required")); + } + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public final @org.jetbrains.annotations.NotNull java.lang.String getB() { + return software.amazon.jsii.Kernel.get(this, "b", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + } + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public final void setB(final @org.jetbrains.annotations.NotNull java.lang.String value) { + software.amazon.jsii.Kernel.set(this, "b", java.util.Objects.requireNonNull(value, "b is required")); + } + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public final @org.jetbrains.annotations.NotNull java.lang.String getC() { + return software.amazon.jsii.Kernel.get(this, "c", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + } + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public final void setC(final @org.jetbrains.annotations.NotNull java.lang.String value) { + software.amazon.jsii.Kernel.set(this, "c", java.util.Objects.requireNonNull(value, "c is required")); + } + } + + /** + * Internal default implementation for {@link INonInternalInterface}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends INonInternalInterface, software.amazon.jsii.tests.calculator.IAnotherPublicInterface.Jsii$Default { + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + default @org.jetbrains.annotations.NotNull java.lang.String getA() { + return software.amazon.jsii.Kernel.get(this, "a", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public void setB(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiSet("b", java.util.Objects.requireNonNull(value, "b is required")); + default void setA(final @org.jetbrains.annotations.NotNull java.lang.String value) { + software.amazon.jsii.Kernel.set(this, "a", java.util.Objects.requireNonNull(value, "a is required")); } /** */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public @org.jetbrains.annotations.NotNull java.lang.String getC() { - return this.jsiiGet("c", java.lang.String.class); + default @org.jetbrains.annotations.NotNull java.lang.String getB() { + return software.amazon.jsii.Kernel.get(this, "b", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public void setC(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiSet("c", java.util.Objects.requireNonNull(value, "c is required")); + default void setB(final @org.jetbrains.annotations.NotNull java.lang.String value) { + software.amazon.jsii.Kernel.set(this, "b", java.util.Objects.requireNonNull(value, "b is required")); } /** */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public @org.jetbrains.annotations.NotNull java.lang.String getA() { - return this.jsiiGet("a", java.lang.String.class); + default @org.jetbrains.annotations.NotNull java.lang.String getC() { + return software.amazon.jsii.Kernel.get(this, "c", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public void setA(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiSet("a", java.util.Objects.requireNonNull(value, "a is required")); + default void setC(final @org.jetbrains.annotations.NotNull java.lang.String value) { + software.amazon.jsii.Kernel.set(this, "c", java.util.Objects.requireNonNull(value, "c is required")); } } } @@ -10029,7 +10884,8 @@ public interface IObjectWithProperty extends software.amazon.jsii.JsiiSerializab /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IObjectWithProperty { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IObjectWithProperty.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -10038,24 +10894,55 @@ public interface IObjectWithProperty extends software.amazon.jsii.JsiiSerializab */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public @org.jetbrains.annotations.NotNull java.lang.String getProperty() { - return this.jsiiGet("property", java.lang.String.class); + public final @org.jetbrains.annotations.NotNull java.lang.String getProperty() { + return software.amazon.jsii.Kernel.get(this, "property", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public void setProperty(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiSet("property", java.util.Objects.requireNonNull(value, "property is required")); + public final void setProperty(final @org.jetbrains.annotations.NotNull java.lang.String value) { + software.amazon.jsii.Kernel.set(this, "property", java.util.Objects.requireNonNull(value, "property is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - public @org.jetbrains.annotations.NotNull java.lang.Boolean wasSet() { - return this.jsiiCall("wasSet", java.lang.Boolean.class); + public final @org.jetbrains.annotations.NotNull java.lang.Boolean wasSet() { + return software.amazon.jsii.Kernel.call(this, "wasSet", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); + } + } + + /** + * Internal default implementation for {@link IObjectWithProperty}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IObjectWithProperty { + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + default @org.jetbrains.annotations.NotNull java.lang.String getProperty() { + return software.amazon.jsii.Kernel.get(this, "property", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + } + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + default void setProperty(final @org.jetbrains.annotations.NotNull java.lang.String value) { + software.amazon.jsii.Kernel.set(this, "property", java.util.Objects.requireNonNull(value, "property is required")); + } + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @Override + default @org.jetbrains.annotations.NotNull java.lang.Boolean wasSet() { + return software.amazon.jsii.Kernel.call(this, "wasSet", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); } } } @@ -10082,7 +10969,8 @@ public interface IOptionalMethod extends software.amazon.jsii.JsiiSerializable { /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IOptionalMethod { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IOptionalMethod.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -10091,8 +10979,23 @@ public interface IOptionalMethod extends software.amazon.jsii.JsiiSerializable { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - public @org.jetbrains.annotations.Nullable java.lang.String optional() { - return this.jsiiCall("optional", java.lang.String.class); + public final @org.jetbrains.annotations.Nullable java.lang.String optional() { + return software.amazon.jsii.Kernel.call(this, "optional", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + } + } + + /** + * Internal default implementation for {@link IOptionalMethod}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IOptionalMethod { + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @Override + default @org.jetbrains.annotations.Nullable java.lang.String optional() { + return software.amazon.jsii.Kernel.call(this, "optional", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } } } @@ -10118,7 +11021,8 @@ public interface IPrivatelyImplemented extends software.amazon.jsii.JsiiSerializ /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IPrivatelyImplemented { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IPrivatelyImplemented.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -10127,8 +11031,23 @@ public interface IPrivatelyImplemented extends software.amazon.jsii.JsiiSerializ */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public @org.jetbrains.annotations.NotNull java.lang.Boolean getSuccess() { - return this.jsiiGet("success", java.lang.Boolean.class); + public final @org.jetbrains.annotations.NotNull java.lang.Boolean getSuccess() { + return software.amazon.jsii.Kernel.get(this, "success", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); + } + } + + /** + * Internal default implementation for {@link IPrivatelyImplemented}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IPrivatelyImplemented { + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + default @org.jetbrains.annotations.NotNull java.lang.Boolean getSuccess() { + return software.amazon.jsii.Kernel.get(this, "success", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); } } } @@ -10154,7 +11073,8 @@ public interface IPublicInterface extends software.amazon.jsii.JsiiSerializable /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IPublicInterface { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IPublicInterface.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -10163,8 +11083,23 @@ public interface IPublicInterface extends software.amazon.jsii.JsiiSerializable */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - public @org.jetbrains.annotations.NotNull java.lang.String bye() { - return this.jsiiCall("bye", java.lang.String.class); + public final @org.jetbrains.annotations.NotNull java.lang.String bye() { + return software.amazon.jsii.Kernel.call(this, "bye", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + } + } + + /** + * Internal default implementation for {@link IPublicInterface}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IPublicInterface { + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @Override + default @org.jetbrains.annotations.NotNull java.lang.String bye() { + return software.amazon.jsii.Kernel.call(this, "bye", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } } } @@ -10190,7 +11125,8 @@ public interface IPublicInterface2 extends software.amazon.jsii.JsiiSerializable /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IPublicInterface2 { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IPublicInterface2.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -10199,8 +11135,23 @@ public interface IPublicInterface2 extends software.amazon.jsii.JsiiSerializable */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - public @org.jetbrains.annotations.NotNull java.lang.String ciao() { - return this.jsiiCall("ciao", java.lang.String.class); + public final @org.jetbrains.annotations.NotNull java.lang.String ciao() { + return software.amazon.jsii.Kernel.call(this, "ciao", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + } + } + + /** + * Internal default implementation for {@link IPublicInterface2}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IPublicInterface2 { + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @Override + default @org.jetbrains.annotations.NotNull java.lang.String ciao() { + return software.amazon.jsii.Kernel.call(this, "ciao", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } } } @@ -10230,7 +11181,8 @@ public interface IRandomNumberGenerator extends software.amazon.jsii.JsiiSeriali /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IRandomNumberGenerator { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IRandomNumberGenerator.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -10242,8 +11194,26 @@ public interface IRandomNumberGenerator extends software.amazon.jsii.JsiiSeriali */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - public @org.jetbrains.annotations.NotNull java.lang.Number next() { - return this.jsiiCall("next", java.lang.Number.class); + public final @org.jetbrains.annotations.NotNull java.lang.Number next() { + return software.amazon.jsii.Kernel.call(this, "next", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); + } + } + + /** + * Internal default implementation for {@link IRandomNumberGenerator}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IRandomNumberGenerator { + + /** + * Returns another random number. + *

+ * @return A random number. + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @Override + default @org.jetbrains.annotations.NotNull java.lang.Number next() { + return software.amazon.jsii.Kernel.call(this, "next", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } } } @@ -10270,7 +11240,8 @@ public interface IReturnJsii976 extends software.amazon.jsii.JsiiSerializable { /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IReturnJsii976 { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IReturnJsii976.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -10279,8 +11250,23 @@ public interface IReturnJsii976 extends software.amazon.jsii.JsiiSerializable { */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public @org.jetbrains.annotations.NotNull java.lang.Number getFoo() { - return this.jsiiGet("foo", java.lang.Number.class); + public final @org.jetbrains.annotations.NotNull java.lang.Number getFoo() { + return software.amazon.jsii.Kernel.get(this, "foo", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); + } + } + + /** + * Internal default implementation for {@link IReturnJsii976}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IReturnJsii976 { + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + default @org.jetbrains.annotations.NotNull java.lang.Number getFoo() { + return software.amazon.jsii.Kernel.get(this, "foo", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } } } @@ -10311,7 +11297,8 @@ public interface IReturnsNumber extends software.amazon.jsii.JsiiSerializable { /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IReturnsNumber { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IReturnsNumber.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -10320,16 +11307,39 @@ public interface IReturnsNumber extends software.amazon.jsii.JsiiSerializable { */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.Number getNumberProp() { - return this.jsiiGet("numberProp", software.amazon.jsii.tests.calculator.lib.Number.class); + public final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.Number getNumberProp() { + return software.amazon.jsii.Kernel.get(this, "numberProp", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.lib.Number.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.IDoublable obtainNumber() { - return this.jsiiCall("obtainNumber", software.amazon.jsii.tests.calculator.lib.IDoublable.class); + public final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.IDoublable obtainNumber() { + return software.amazon.jsii.Kernel.call(this, "obtainNumber", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.lib.IDoublable.class)); + } + } + + /** + * Internal default implementation for {@link IReturnsNumber}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IReturnsNumber { + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + default @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.Number getNumberProp() { + return software.amazon.jsii.Kernel.get(this, "numberProp", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.lib.Number.class)); + } + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @Override + default @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.IDoublable obtainNumber() { + return software.amazon.jsii.Kernel.call(this, "obtainNumber", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.lib.IDoublable.class)); } } } @@ -10367,35 +11377,67 @@ public interface IStableInterface extends software.amazon.jsii.JsiiSerializable void method(); /** - * A proxy class which represents a concrete javascript instance of this type. + * A proxy class which represents a concrete javascript instance of this type. + */ + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IStableInterface.Jsii$Default { + protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { + super(objRef); + } + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public final @org.jetbrains.annotations.Nullable java.lang.Number getMutableProperty() { + return software.amazon.jsii.Kernel.get(this, "mutableProperty", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); + } + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public final void setMutableProperty(final @org.jetbrains.annotations.Nullable java.lang.Number value) { + software.amazon.jsii.Kernel.set(this, "mutableProperty", value); + } + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @Override + public final void method() { + software.amazon.jsii.Kernel.call(this, "method", software.amazon.jsii.NativeType.VOID); + } + } + + /** + * Internal default implementation for {@link IStableInterface}. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IStableInterface { - protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { - super(objRef); - } + @software.amazon.jsii.Internal + interface Jsii$Default extends IStableInterface { /** */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public @org.jetbrains.annotations.Nullable java.lang.Number getMutableProperty() { - return this.jsiiGet("mutableProperty", java.lang.Number.class); + default @org.jetbrains.annotations.Nullable java.lang.Number getMutableProperty() { + return software.amazon.jsii.Kernel.get(this, "mutableProperty", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public void setMutableProperty(final @org.jetbrains.annotations.Nullable java.lang.Number value) { - this.jsiiSet("mutableProperty", value); + default void setMutableProperty(final @org.jetbrains.annotations.Nullable java.lang.Number value) { + software.amazon.jsii.Kernel.set(this, "mutableProperty", value); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - public void method() { - this.jsiiCall("method", software.amazon.jsii.NativeType.VOID); + default void method() { + software.amazon.jsii.Kernel.call(this, "method", software.amazon.jsii.NativeType.VOID); } } } @@ -10422,7 +11464,8 @@ public interface IStructReturningDelegate extends software.amazon.jsii.JsiiSeria /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IStructReturningDelegate { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IStructReturningDelegate.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -10431,8 +11474,23 @@ public interface IStructReturningDelegate extends software.amazon.jsii.JsiiSeria */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.StructB returnStruct() { - return this.jsiiCall("returnStruct", software.amazon.jsii.tests.calculator.StructB.class); + public final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.StructB returnStruct() { + return software.amazon.jsii.Kernel.call(this, "returnStruct", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.StructB.class)); + } + } + + /** + * Internal default implementation for {@link IStructReturningDelegate}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IStructReturningDelegate { + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @Override + default @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.StructB returnStruct() { + return software.amazon.jsii.Kernel.call(this, "returnStruct", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.StructB.class)); } } } @@ -10460,7 +11518,8 @@ public interface IWallClock extends software.amazon.jsii.JsiiSerializable { /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IWallClock { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IWallClock.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -10470,8 +11529,24 @@ public interface IWallClock extends software.amazon.jsii.JsiiSerializable { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - public @org.jetbrains.annotations.NotNull java.lang.String iso8601Now() { - return this.jsiiCall("iso8601Now", java.lang.String.class); + public final @org.jetbrains.annotations.NotNull java.lang.String iso8601Now() { + return software.amazon.jsii.Kernel.call(this, "iso8601Now", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + } + } + + /** + * Internal default implementation for {@link IWallClock}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IWallClock { + + /** + * Returns the current time, formatted as an ISO-8601 string. + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @Override + default @org.jetbrains.annotations.NotNull java.lang.String iso8601Now() { + return software.amazon.jsii.Kernel.call(this, "iso8601Now", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } } } @@ -10508,14 +11583,14 @@ public class ImplementInternalInterface extends software.amazon.jsii.JsiiObject */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getProp() { - return this.jsiiGet("prop", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "prop", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setProp(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiSet("prop", java.util.Objects.requireNonNull(value, "prop is required")); + software.amazon.jsii.Kernel.set(this, "prop", java.util.Objects.requireNonNull(value, "prop is required")); } } @@ -10551,7 +11626,7 @@ public class Implementation extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number getValue() { - return this.jsiiGet("value", java.lang.Number.class); + return software.amazon.jsii.Kernel.get(this, "value", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } } @@ -10588,7 +11663,7 @@ public class ImplementsInterfaceWithInternal extends software.amazon.jsii.JsiiOb @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public void visible() { - this.jsiiCall("visible", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "visible", software.amazon.jsii.NativeType.VOID); } } @@ -10653,14 +11728,14 @@ public class ImplementsPrivateInterface extends software.amazon.jsii.JsiiObject */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getPrivateValue() { - return this.jsiiGet("private", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "private", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setPrivateValue(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiSet("private", java.util.Objects.requireNonNull(value, "private is required")); + software.amazon.jsii.Kernel.set(this, "private", java.util.Objects.requireNonNull(value, "private is required")); } } @@ -10745,6 +11820,7 @@ public interface ImplictBaseOfBase extends software.amazon.jsii.JsiiSerializable * An implementation for {@link ImplictBaseOfBase} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ImplictBaseOfBase { private final java.time.Instant goo; private final java.lang.String bar; @@ -10756,15 +11832,15 @@ public interface ImplictBaseOfBase extends software.amazon.jsii.JsiiSerializable */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.goo = this.jsiiGet("goo", java.time.Instant.class); - this.bar = this.jsiiGet("bar", java.lang.String.class); - this.foo = this.jsiiGet("foo", software.amazon.jsii.tests.calculator.baseofbase.Very.class); + this.goo = software.amazon.jsii.Kernel.get(this, "goo", software.amazon.jsii.NativeType.forClass(java.time.Instant.class)); + this.bar = software.amazon.jsii.Kernel.get(this, "bar", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + this.foo = software.amazon.jsii.Kernel.get(this, "foo", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.baseofbase.Very.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ - private Jsii$Proxy(final java.time.Instant goo, final java.lang.String bar, final software.amazon.jsii.tests.calculator.baseofbase.Very foo) { + protected Jsii$Proxy(final java.time.Instant goo, final java.lang.String bar, final software.amazon.jsii.tests.calculator.baseofbase.Very foo) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.goo = java.util.Objects.requireNonNull(goo, "goo is required"); this.bar = java.util.Objects.requireNonNull(bar, "bar is required"); @@ -10772,21 +11848,22 @@ public interface ImplictBaseOfBase extends software.amazon.jsii.JsiiSerializable } @Override - public java.time.Instant getGoo() { + public final java.time.Instant getGoo() { return this.goo; } @Override - public java.lang.String getBar() { + public final java.lang.String getBar() { return this.bar; } @Override - public software.amazon.jsii.tests.calculator.baseofbase.Very getFoo() { + public final software.amazon.jsii.tests.calculator.baseofbase.Very getFoo() { return this.foo; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -10806,7 +11883,7 @@ public interface ImplictBaseOfBase extends software.amazon.jsii.JsiiSerializable } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -10818,7 +11895,7 @@ public interface ImplictBaseOfBase extends software.amazon.jsii.JsiiSerializable } @Override - public int hashCode() { + public final int hashCode() { int result = this.goo.hashCode(); result = 31 * result + (this.bar.hashCode()); result = 31 * result + (this.foo.hashCode()); @@ -10860,7 +11937,7 @@ public class InbetweenClass extends software.amazon.jsii.tests.calculator.Public @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public @org.jetbrains.annotations.NotNull java.lang.String ciao() { - return this.jsiiCall("ciao", java.lang.String.class); + return software.amazon.jsii.Kernel.call(this, "ciao", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } } @@ -10982,13 +12059,14 @@ public abstract class Isomorphism extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.Isomorphism myself() { - return this.jsiiCall("myself", software.amazon.jsii.tests.calculator.Isomorphism.class); + return software.amazon.jsii.Kernel.call(this, "myself", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.Isomorphism.class)); } /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.tests.calculator.Isomorphism { + @software.amazon.jsii.Internal + private static final class Jsii$Proxy extends software.amazon.jsii.tests.calculator.Isomorphism { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -11028,21 +12106,21 @@ public class JSII417Derived extends software.amazon.jsii.tests.calculator.JSII41 */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void bar() { - this.jsiiCall("bar", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "bar", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void baz() { - this.jsiiCall("baz", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "baz", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) protected @org.jetbrains.annotations.NotNull java.lang.String getProperty() { - return this.jsiiGet("property", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "property", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } } @@ -11078,21 +12156,21 @@ public class JSII417PublicBaseOfBase extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.JSII417PublicBaseOfBase makeInstance() { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.JSII417PublicBaseOfBase.class, "makeInstance", software.amazon.jsii.tests.calculator.JSII417PublicBaseOfBase.class); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.JSII417PublicBaseOfBase.class, "makeInstance", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.JSII417PublicBaseOfBase.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void foo() { - this.jsiiCall("foo", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "foo", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Boolean getHasRoot() { - return this.jsiiGet("hasRoot", java.lang.Boolean.class); + return software.amazon.jsii.Kernel.get(this, "hasRoot", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); } } @@ -11128,14 +12206,14 @@ public class JSObjectLiteralForInterface extends software.amazon.jsii.JsiiObject */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.IFriendly giveMeFriendly() { - return this.jsiiCall("giveMeFriendly", software.amazon.jsii.tests.calculator.lib.IFriendly.class); + return software.amazon.jsii.Kernel.call(this, "giveMeFriendly", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.lib.IFriendly.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.IFriendlyRandomGenerator giveMeFriendlyGenerator() { - return this.jsiiCall("giveMeFriendlyGenerator", software.amazon.jsii.tests.calculator.IFriendlyRandomGenerator.class); + return software.amazon.jsii.Kernel.call(this, "giveMeFriendlyGenerator", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.IFriendlyRandomGenerator.class)); } } @@ -11171,7 +12249,7 @@ public class JSObjectLiteralToNative extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.JSObjectLiteralToNativeClass returnLiteral() { - return this.jsiiCall("returnLiteral", software.amazon.jsii.tests.calculator.JSObjectLiteralToNativeClass.class); + return software.amazon.jsii.Kernel.call(this, "returnLiteral", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.JSObjectLiteralToNativeClass.class)); } } @@ -11207,28 +12285,28 @@ public class JSObjectLiteralToNativeClass extends software.amazon.jsii.JsiiObjec */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getPropA() { - return this.jsiiGet("propA", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "propA", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setPropA(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiSet("propA", java.util.Objects.requireNonNull(value, "propA is required")); + software.amazon.jsii.Kernel.set(this, "propA", java.util.Objects.requireNonNull(value, "propA is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number getPropB() { - return this.jsiiGet("propB", java.lang.Number.class); + return software.amazon.jsii.Kernel.get(this, "propB", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setPropB(final @org.jetbrains.annotations.NotNull java.lang.Number value) { - this.jsiiSet("propB", java.util.Objects.requireNonNull(value, "propB is required")); + software.amazon.jsii.Kernel.set(this, "propB", java.util.Objects.requireNonNull(value, "propB is required")); } } @@ -11264,378 +12342,378 @@ public class JavaReservedWords extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doAbstract() { - this.jsiiCall("abstract", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "abstract", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doAssert() { - this.jsiiCall("assert", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "assert", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doBoolean() { - this.jsiiCall("boolean", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "boolean", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doBreak() { - this.jsiiCall("break", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "break", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doByte() { - this.jsiiCall("byte", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "byte", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doCase() { - this.jsiiCall("case", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "case", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doCatch() { - this.jsiiCall("catch", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "catch", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doChar() { - this.jsiiCall("char", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "char", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doClass() { - this.jsiiCall("class", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "class", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doConst() { - this.jsiiCall("const", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "const", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doContinue() { - this.jsiiCall("continue", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "continue", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doDefault() { - this.jsiiCall("default", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "default", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doDo() { - this.jsiiCall("do", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "do", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doDouble() { - this.jsiiCall("double", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "double", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doElse() { - this.jsiiCall("else", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "else", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doEnum() { - this.jsiiCall("enum", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "enum", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doExtends() { - this.jsiiCall("extends", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "extends", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doFalse() { - this.jsiiCall("false", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "false", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doFinal() { - this.jsiiCall("final", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "final", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doFinally() { - this.jsiiCall("finally", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "finally", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doFloat() { - this.jsiiCall("float", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "float", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doFor() { - this.jsiiCall("for", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "for", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doGoto() { - this.jsiiCall("goto", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "goto", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doIf() { - this.jsiiCall("if", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "if", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doImplements() { - this.jsiiCall("implements", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "implements", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doImport() { - this.jsiiCall("import", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "import", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doInstanceof() { - this.jsiiCall("instanceof", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "instanceof", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doInt() { - this.jsiiCall("int", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "int", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doInterface() { - this.jsiiCall("interface", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "interface", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doLong() { - this.jsiiCall("long", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "long", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doNative() { - this.jsiiCall("native", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "native", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doNew() { - this.jsiiCall("new", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "new", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doNull() { - this.jsiiCall("null", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "null", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doPackage() { - this.jsiiCall("package", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "package", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doPrivate() { - this.jsiiCall("private", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "private", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doProtected() { - this.jsiiCall("protected", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "protected", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doPublic() { - this.jsiiCall("public", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "public", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doReturn() { - this.jsiiCall("return", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "return", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doShort() { - this.jsiiCall("short", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "short", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doStatic() { - this.jsiiCall("static", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "static", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doStrictfp() { - this.jsiiCall("strictfp", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "strictfp", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doSuper() { - this.jsiiCall("super", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "super", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doSwitch() { - this.jsiiCall("switch", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "switch", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doSynchronized() { - this.jsiiCall("synchronized", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "synchronized", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doThis() { - this.jsiiCall("this", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "this", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doThrow() { - this.jsiiCall("throw", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "throw", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doThrows() { - this.jsiiCall("throws", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "throws", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doTransient() { - this.jsiiCall("transient", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "transient", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doTrue() { - this.jsiiCall("true", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "true", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doTry() { - this.jsiiCall("try", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "try", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doVoid() { - this.jsiiCall("void", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "void", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doVolatile() { - this.jsiiCall("volatile", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "volatile", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getWhileValue() { - return this.jsiiGet("while", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "while", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setWhileValue(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiSet("while", java.util.Objects.requireNonNull(value, "while is required")); + software.amazon.jsii.Kernel.set(this, "while", java.util.Objects.requireNonNull(value, "while is required")); } } @@ -11731,7 +12809,7 @@ public class JsiiAgent extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) 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); + return software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.jsii.tests.calculator.JsiiAgent.class, "value", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } } @@ -11762,91 +12840,91 @@ public class JsonFormatter extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.Object anyArray() { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.JsonFormatter.class, "anyArray", java.lang.Object.class); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.JsonFormatter.class, "anyArray", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.Object anyBooleanFalse() { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.JsonFormatter.class, "anyBooleanFalse", java.lang.Object.class); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.JsonFormatter.class, "anyBooleanFalse", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.Object anyBooleanTrue() { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.JsonFormatter.class, "anyBooleanTrue", java.lang.Object.class); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.JsonFormatter.class, "anyBooleanTrue", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.Object anyDate() { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.JsonFormatter.class, "anyDate", java.lang.Object.class); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.JsonFormatter.class, "anyDate", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.Object anyEmptyString() { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.JsonFormatter.class, "anyEmptyString", java.lang.Object.class); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.JsonFormatter.class, "anyEmptyString", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.Object anyFunction() { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.JsonFormatter.class, "anyFunction", java.lang.Object.class); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.JsonFormatter.class, "anyFunction", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.Object anyHash() { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.JsonFormatter.class, "anyHash", java.lang.Object.class); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.JsonFormatter.class, "anyHash", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.Object anyNull() { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.JsonFormatter.class, "anyNull", java.lang.Object.class); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.JsonFormatter.class, "anyNull", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.Object anyNumber() { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.JsonFormatter.class, "anyNumber", java.lang.Object.class); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.JsonFormatter.class, "anyNumber", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.Object anyRef() { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.JsonFormatter.class, "anyRef", java.lang.Object.class); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.JsonFormatter.class, "anyRef", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.Object anyString() { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.JsonFormatter.class, "anyString", java.lang.Object.class); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.JsonFormatter.class, "anyString", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.Object anyUndefined() { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.JsonFormatter.class, "anyUndefined", java.lang.Object.class); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.JsonFormatter.class, "anyUndefined", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.Object anyZero() { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.JsonFormatter.class, "anyZero", java.lang.Object.class); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.JsonFormatter.class, "anyZero", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); } /** @@ -11854,14 +12932,14 @@ public class JsonFormatter extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.Nullable java.lang.String stringify(final @org.jetbrains.annotations.Nullable java.lang.Object value) { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.JsonFormatter.class, "stringify", java.lang.String.class, new Object[] { value }); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.JsonFormatter.class, "stringify", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { value }); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.Nullable java.lang.String stringify() { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.JsonFormatter.class, "stringify", java.lang.String.class); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.JsonFormatter.class, "stringify", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } } @@ -11899,7 +12977,7 @@ public class LevelOne extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.LevelOneProps getProps() { - return this.jsiiGet("props", software.amazon.jsii.tests.calculator.LevelOneProps.class); + return software.amazon.jsii.Kernel.get(this, "props", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.LevelOneProps.class)); } /** */ @@ -11954,6 +13032,7 @@ public class LevelOne extends software.amazon.jsii.JsiiObject { * An implementation for {@link PropBooleanValue} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements PropBooleanValue { private final java.lang.Boolean value; @@ -11963,23 +13042,24 @@ public class LevelOne extends software.amazon.jsii.JsiiObject { */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.value = this.jsiiGet("value", java.lang.Boolean.class); + this.value = software.amazon.jsii.Kernel.get(this, "value", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ - private Jsii$Proxy(final java.lang.Boolean value) { + protected Jsii$Proxy(final java.lang.Boolean value) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.value = java.util.Objects.requireNonNull(value, "value is required"); } @Override - public java.lang.Boolean getValue() { + public final java.lang.Boolean getValue() { return this.value; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -11997,7 +13077,7 @@ public class LevelOne extends software.amazon.jsii.JsiiObject { } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -12007,7 +13087,7 @@ public class LevelOne extends software.amazon.jsii.JsiiObject { } @Override - public int hashCode() { + public final int hashCode() { int result = this.value.hashCode(); return result; } @@ -12066,6 +13146,7 @@ public class LevelOne extends software.amazon.jsii.JsiiObject { * An implementation for {@link PropProperty} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements PropProperty { private final software.amazon.jsii.tests.calculator.LevelOne.PropBooleanValue prop; @@ -12075,23 +13156,24 @@ public class LevelOne extends software.amazon.jsii.JsiiObject { */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.prop = this.jsiiGet("prop", software.amazon.jsii.tests.calculator.LevelOne.PropBooleanValue.class); + this.prop = software.amazon.jsii.Kernel.get(this, "prop", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.LevelOne.PropBooleanValue.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ - private Jsii$Proxy(final software.amazon.jsii.tests.calculator.LevelOne.PropBooleanValue prop) { + protected Jsii$Proxy(final software.amazon.jsii.tests.calculator.LevelOne.PropBooleanValue prop) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.prop = java.util.Objects.requireNonNull(prop, "prop is required"); } @Override - public software.amazon.jsii.tests.calculator.LevelOne.PropBooleanValue getProp() { + public final software.amazon.jsii.tests.calculator.LevelOne.PropBooleanValue getProp() { return this.prop; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -12109,7 +13191,7 @@ public class LevelOne extends software.amazon.jsii.JsiiObject { } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -12119,7 +13201,7 @@ public class LevelOne extends software.amazon.jsii.JsiiObject { } @Override - public int hashCode() { + public final int hashCode() { int result = this.prop.hashCode(); return result; } @@ -12227,6 +13309,7 @@ public interface LevelOneProps extends software.amazon.jsii.JsiiSerializable { * An implementation for {@link LevelOneProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements LevelOneProps { private final software.amazon.jsii.tests.calculator.LevelOne.PropProperty prop; @@ -12236,23 +13319,24 @@ public interface LevelOneProps extends software.amazon.jsii.JsiiSerializable { */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.prop = this.jsiiGet("prop", software.amazon.jsii.tests.calculator.LevelOne.PropProperty.class); + this.prop = software.amazon.jsii.Kernel.get(this, "prop", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.LevelOne.PropProperty.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ - private Jsii$Proxy(final software.amazon.jsii.tests.calculator.LevelOne.PropProperty prop) { + protected Jsii$Proxy(final software.amazon.jsii.tests.calculator.LevelOne.PropProperty prop) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.prop = java.util.Objects.requireNonNull(prop, "prop is required"); } @Override - public software.amazon.jsii.tests.calculator.LevelOne.PropProperty getProp() { + public final software.amazon.jsii.tests.calculator.LevelOne.PropProperty getProp() { return this.prop; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -12270,7 +13354,7 @@ public interface LevelOneProps extends software.amazon.jsii.JsiiSerializable { } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -12280,7 +13364,7 @@ public interface LevelOneProps extends software.amazon.jsii.JsiiSerializable { } @Override - public int hashCode() { + public final int hashCode() { int result = this.prop.hashCode(); return result; } @@ -12489,6 +13573,7 @@ public interface LoadBalancedFargateServiceProps extends software.amazon.jsii.Js * An implementation for {@link LoadBalancedFargateServiceProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements LoadBalancedFargateServiceProps { private final java.lang.Number containerPort; private final java.lang.String cpu; @@ -12502,17 +13587,17 @@ public interface LoadBalancedFargateServiceProps extends software.amazon.jsii.Js */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.containerPort = this.jsiiGet("containerPort", java.lang.Number.class); - this.cpu = this.jsiiGet("cpu", java.lang.String.class); - this.memoryMiB = this.jsiiGet("memoryMiB", java.lang.String.class); - this.publicLoadBalancer = this.jsiiGet("publicLoadBalancer", java.lang.Boolean.class); - this.publicTasks = this.jsiiGet("publicTasks", java.lang.Boolean.class); + this.containerPort = software.amazon.jsii.Kernel.get(this, "containerPort", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); + this.cpu = software.amazon.jsii.Kernel.get(this, "cpu", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + this.memoryMiB = software.amazon.jsii.Kernel.get(this, "memoryMiB", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + this.publicLoadBalancer = software.amazon.jsii.Kernel.get(this, "publicLoadBalancer", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); + this.publicTasks = software.amazon.jsii.Kernel.get(this, "publicTasks", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ - private Jsii$Proxy(final java.lang.Number containerPort, final java.lang.String cpu, final java.lang.String memoryMiB, final java.lang.Boolean publicLoadBalancer, final java.lang.Boolean publicTasks) { + protected Jsii$Proxy(final java.lang.Number containerPort, final java.lang.String cpu, final java.lang.String memoryMiB, final java.lang.Boolean publicLoadBalancer, final java.lang.Boolean publicTasks) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.containerPort = containerPort; this.cpu = cpu; @@ -12522,31 +13607,32 @@ public interface LoadBalancedFargateServiceProps extends software.amazon.jsii.Js } @Override - public java.lang.Number getContainerPort() { + public final java.lang.Number getContainerPort() { return this.containerPort; } @Override - public java.lang.String getCpu() { + public final java.lang.String getCpu() { return this.cpu; } @Override - public java.lang.String getMemoryMiB() { + public final java.lang.String getMemoryMiB() { return this.memoryMiB; } @Override - public java.lang.Boolean getPublicLoadBalancer() { + public final java.lang.Boolean getPublicLoadBalancer() { return this.publicLoadBalancer; } @Override - public java.lang.Boolean getPublicTasks() { + public final java.lang.Boolean getPublicTasks() { return this.publicTasks; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -12578,7 +13664,7 @@ public interface LoadBalancedFargateServiceProps extends software.amazon.jsii.Js } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -12592,7 +13678,7 @@ public interface LoadBalancedFargateServiceProps extends software.amazon.jsii.Js } @Override - public int hashCode() { + public final int hashCode() { int result = this.containerPort != null ? this.containerPort.hashCode() : 0; result = 31 * result + (this.cpu != null ? this.cpu.hashCode() : 0); result = 31 * result + (this.memoryMiB != null ? this.memoryMiB.hashCode() : 0); @@ -12635,14 +13721,14 @@ public class MethodNamedProperty extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String property() { - return this.jsiiCall("property", java.lang.String.class); + return software.amazon.jsii.Kernel.call(this, "property", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number getElite() { - return this.jsiiGet("elite", java.lang.Number.class); + return software.amazon.jsii.Kernel.get(this, "elite", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } } @@ -12685,7 +13771,7 @@ public class Multiply extends software.amazon.jsii.tests.calculator.BinaryOperat @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public @org.jetbrains.annotations.NotNull java.lang.String farewell() { - return this.jsiiCall("farewell", java.lang.String.class); + return software.amazon.jsii.Kernel.call(this, "farewell", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** @@ -12694,7 +13780,7 @@ public class Multiply extends software.amazon.jsii.tests.calculator.BinaryOperat @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public @org.jetbrains.annotations.NotNull java.lang.String goodbye() { - return this.jsiiCall("goodbye", java.lang.String.class); + return software.amazon.jsii.Kernel.call(this, "goodbye", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** @@ -12703,7 +13789,7 @@ public class Multiply extends software.amazon.jsii.tests.calculator.BinaryOperat @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public @org.jetbrains.annotations.NotNull java.lang.Number next() { - return this.jsiiCall("next", java.lang.Number.class); + return software.amazon.jsii.Kernel.call(this, "next", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** @@ -12712,7 +13798,7 @@ public class Multiply extends software.amazon.jsii.tests.calculator.BinaryOperat @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public @org.jetbrains.annotations.NotNull java.lang.String toString() { - return this.jsiiCall("toString", java.lang.String.class); + return software.amazon.jsii.Kernel.call(this, "toString", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** @@ -12721,7 +13807,7 @@ public class Multiply extends software.amazon.jsii.tests.calculator.BinaryOperat @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number getValue() { - return this.jsiiGet("value", java.lang.Number.class); + return software.amazon.jsii.Kernel.get(this, "value", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } } @@ -12761,7 +13847,7 @@ public class Negate extends software.amazon.jsii.tests.calculator.UnaryOperation @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public @org.jetbrains.annotations.NotNull java.lang.String farewell() { - return this.jsiiCall("farewell", java.lang.String.class); + return software.amazon.jsii.Kernel.call(this, "farewell", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** @@ -12770,7 +13856,7 @@ public class Negate extends software.amazon.jsii.tests.calculator.UnaryOperation @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public @org.jetbrains.annotations.NotNull java.lang.String goodbye() { - return this.jsiiCall("goodbye", java.lang.String.class); + return software.amazon.jsii.Kernel.call(this, "goodbye", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** @@ -12779,7 +13865,7 @@ public class Negate extends software.amazon.jsii.tests.calculator.UnaryOperation @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public @org.jetbrains.annotations.NotNull java.lang.String hello() { - return this.jsiiCall("hello", java.lang.String.class); + return software.amazon.jsii.Kernel.call(this, "hello", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** @@ -12788,7 +13874,7 @@ public class Negate extends software.amazon.jsii.tests.calculator.UnaryOperation @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public @org.jetbrains.annotations.NotNull java.lang.String toString() { - return this.jsiiCall("toString", java.lang.String.class); + return software.amazon.jsii.Kernel.call(this, "toString", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** @@ -12797,7 +13883,7 @@ public class Negate extends software.amazon.jsii.tests.calculator.UnaryOperation @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number getValue() { - return this.jsiiGet("value", java.lang.Number.class); + return software.amazon.jsii.Kernel.get(this, "value", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } } @@ -12825,7 +13911,7 @@ public class NestedClassInstance extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.custom_submodule_name.NestingClass.NestedClass makeInstance() { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.NestedClassInstance.class, "makeInstance", software.amazon.jsii.tests.calculator.custom_submodule_name.NestingClass.NestedClass.class); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.NestedClassInstance.class, "makeInstance", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.custom_submodule_name.NestingClass.NestedClass.class)); } } @@ -12889,6 +13975,7 @@ public interface NestedStruct extends software.amazon.jsii.JsiiSerializable { * An implementation for {@link NestedStruct} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements NestedStruct { private final java.lang.Number numberProp; @@ -12898,23 +13985,24 @@ public interface NestedStruct extends software.amazon.jsii.JsiiSerializable { */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.numberProp = this.jsiiGet("numberProp", java.lang.Number.class); + this.numberProp = software.amazon.jsii.Kernel.get(this, "numberProp", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ - private Jsii$Proxy(final java.lang.Number numberProp) { + protected Jsii$Proxy(final java.lang.Number numberProp) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.numberProp = java.util.Objects.requireNonNull(numberProp, "numberProp is required"); } @Override - public java.lang.Number getNumberProp() { + public final java.lang.Number getNumberProp() { return this.numberProp; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -12932,7 +14020,7 @@ public interface NestedStruct extends software.amazon.jsii.JsiiSerializable { } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -12942,7 +14030,7 @@ public interface NestedStruct extends software.amazon.jsii.JsiiSerializable { } @Override - public int hashCode() { + public final int hashCode() { int result = this.numberProp.hashCode(); return result; } @@ -12985,7 +14073,7 @@ public class NodeStandardLibrary extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String cryptoSha256() { - return this.jsiiCall("cryptoSha256", java.lang.String.class); + return software.amazon.jsii.Kernel.call(this, "cryptoSha256", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** @@ -12995,7 +14083,7 @@ public class NodeStandardLibrary extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String fsReadFile() { - return this.jsiiAsyncCall("fsReadFile", java.lang.String.class); + return software.amazon.jsii.Kernel.asyncCall(this, "fsReadFile", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** @@ -13005,7 +14093,7 @@ public class NodeStandardLibrary extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String fsReadFileSync() { - return this.jsiiCall("fsReadFileSync", java.lang.String.class); + return software.amazon.jsii.Kernel.call(this, "fsReadFileSync", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** @@ -13013,7 +14101,7 @@ public class NodeStandardLibrary extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getOsPlatform() { - return this.jsiiGet("osPlatform", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "osPlatform", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } } @@ -13062,14 +14150,14 @@ public class NullShouldBeTreatedAsUndefined extends software.amazon.jsii.JsiiObj */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void giveMeUndefined(final @org.jetbrains.annotations.Nullable java.lang.Object value) { - this.jsiiCall("giveMeUndefined", software.amazon.jsii.NativeType.VOID, new Object[] { value }); + software.amazon.jsii.Kernel.call(this, "giveMeUndefined", software.amazon.jsii.NativeType.VOID, new Object[] { value }); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void giveMeUndefined() { - this.jsiiCall("giveMeUndefined", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "giveMeUndefined", software.amazon.jsii.NativeType.VOID); } /** @@ -13077,28 +14165,28 @@ public class NullShouldBeTreatedAsUndefined extends software.amazon.jsii.JsiiObj */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void giveMeUndefinedInsideAnObject(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.NullShouldBeTreatedAsUndefinedData input) { - this.jsiiCall("giveMeUndefinedInsideAnObject", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(input, "input is required") }); + software.amazon.jsii.Kernel.call(this, "giveMeUndefinedInsideAnObject", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(input, "input is required") }); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void verifyPropertyIsUndefined() { - this.jsiiCall("verifyPropertyIsUndefined", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "verifyPropertyIsUndefined", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.Nullable java.lang.String getChangeMeToUndefined() { - return this.jsiiGet("changeMeToUndefined", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "changeMeToUndefined", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setChangeMeToUndefined(final @org.jetbrains.annotations.Nullable java.lang.String value) { - this.jsiiSet("changeMeToUndefined", value); + software.amazon.jsii.Kernel.set(this, "changeMeToUndefined", value); } } @@ -13181,6 +14269,7 @@ public interface NullShouldBeTreatedAsUndefinedData extends software.amazon.jsii * An implementation for {@link NullShouldBeTreatedAsUndefinedData} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements NullShouldBeTreatedAsUndefinedData { private final java.util.List arrayWithThreeElementsAndUndefinedAsSecondArgument; private final java.lang.Object thisShouldBeUndefined; @@ -13191,31 +14280,32 @@ public interface NullShouldBeTreatedAsUndefinedData extends software.amazon.jsii */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.arrayWithThreeElementsAndUndefinedAsSecondArgument = this.jsiiGet("arrayWithThreeElementsAndUndefinedAsSecondArgument", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class))); - this.thisShouldBeUndefined = this.jsiiGet("thisShouldBeUndefined", java.lang.Object.class); + this.arrayWithThreeElementsAndUndefinedAsSecondArgument = software.amazon.jsii.Kernel.get(this, "arrayWithThreeElementsAndUndefinedAsSecondArgument", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class))); + this.thisShouldBeUndefined = software.amazon.jsii.Kernel.get(this, "thisShouldBeUndefined", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ @SuppressWarnings("unchecked") - private Jsii$Proxy(final java.util.List arrayWithThreeElementsAndUndefinedAsSecondArgument, final java.lang.Object thisShouldBeUndefined) { + protected Jsii$Proxy(final java.util.List arrayWithThreeElementsAndUndefinedAsSecondArgument, final java.lang.Object thisShouldBeUndefined) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.arrayWithThreeElementsAndUndefinedAsSecondArgument = (java.util.List)java.util.Objects.requireNonNull(arrayWithThreeElementsAndUndefinedAsSecondArgument, "arrayWithThreeElementsAndUndefinedAsSecondArgument is required"); this.thisShouldBeUndefined = thisShouldBeUndefined; } @Override - public java.util.List getArrayWithThreeElementsAndUndefinedAsSecondArgument() { + public final java.util.List getArrayWithThreeElementsAndUndefinedAsSecondArgument() { return this.arrayWithThreeElementsAndUndefinedAsSecondArgument; } @Override - public java.lang.Object getThisShouldBeUndefined() { + public final java.lang.Object getThisShouldBeUndefined() { return this.thisShouldBeUndefined; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -13236,7 +14326,7 @@ public interface NullShouldBeTreatedAsUndefinedData extends software.amazon.jsii } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -13247,7 +14337,7 @@ public interface NullShouldBeTreatedAsUndefinedData extends software.amazon.jsii } @Override - public int hashCode() { + public final int hashCode() { int result = this.arrayWithThreeElementsAndUndefinedAsSecondArgument.hashCode(); result = 31 * result + (this.thisShouldBeUndefined != null ? this.thisShouldBeUndefined.hashCode() : 0); return result; @@ -13290,28 +14380,28 @@ public class NumberGenerator extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Boolean isSameGenerator(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.IRandomNumberGenerator gen) { - return this.jsiiCall("isSameGenerator", java.lang.Boolean.class, new Object[] { java.util.Objects.requireNonNull(gen, "gen is required") }); + return software.amazon.jsii.Kernel.call(this, "isSameGenerator", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class), new Object[] { java.util.Objects.requireNonNull(gen, "gen is required") }); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number nextTimes100() { - return this.jsiiCall("nextTimes100", java.lang.Number.class); + return software.amazon.jsii.Kernel.call(this, "nextTimes100", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.IRandomNumberGenerator getGenerator() { - return this.jsiiGet("generator", software.amazon.jsii.tests.calculator.IRandomNumberGenerator.class); + return software.amazon.jsii.Kernel.get(this, "generator", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.IRandomNumberGenerator.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setGenerator(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.IRandomNumberGenerator value) { - this.jsiiSet("generator", java.util.Objects.requireNonNull(value, "generator is required")); + software.amazon.jsii.Kernel.set(this, "generator", java.util.Objects.requireNonNull(value, "generator is required")); } } @@ -13351,7 +14441,7 @@ public class ObjectRefsInCollections extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) 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") }); + return software.amazon.jsii.Kernel.call(this, "sumFromArray", software.amazon.jsii.NativeType.forClass(java.lang.Number.class), new Object[] { java.util.Objects.requireNonNull(values, "values is required") }); } /** @@ -13361,7 +14451,7 @@ public class ObjectRefsInCollections extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) 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") }); + return software.amazon.jsii.Kernel.call(this, "sumFromMap", software.amazon.jsii.NativeType.forClass(java.lang.Number.class), new Object[] { java.util.Objects.requireNonNull(values, "values is required") }); } } @@ -13389,7 +14479,7 @@ public class ObjectWithPropertyProvider extends software.amazon.jsii.JsiiObject */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.IObjectWithProperty provide() { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.ObjectWithPropertyProvider.class, "provide", software.amazon.jsii.tests.calculator.IObjectWithProperty.class); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.ObjectWithPropertyProvider.class, "provide", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.IObjectWithProperty.class)); } } @@ -13401,7 +14491,8 @@ package software.amazon.jsii.tests.calculator; /** * (deprecated) Old class. *

- * @deprecated Use the new class + * @deprecated Use the new class or the old class whatever you want because + * whatever you like is always the best */ @javax.annotation.Generated(value = "jsii-pacmak") @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @@ -13431,7 +14522,7 @@ public class Old extends software.amazon.jsii.JsiiObject { @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated public void doAThing() { - this.jsiiCall("doAThing", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "doAThing", software.amazon.jsii.NativeType.VOID); } } @@ -13468,14 +14559,14 @@ public class OptionalArgumentInvoker extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void invokeWithOptional() { - this.jsiiCall("invokeWithOptional", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "invokeWithOptional", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void invokeWithoutOptional() { - this.jsiiCall("invokeWithoutOptional", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "invokeWithoutOptional", software.amazon.jsii.NativeType.VOID); } } @@ -13524,21 +14615,21 @@ public class OptionalConstructorArgument extends software.amazon.jsii.JsiiObject */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number getArg1() { - return this.jsiiGet("arg1", java.lang.Number.class); + return software.amazon.jsii.Kernel.get(this, "arg1", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getArg2() { - return this.jsiiGet("arg2", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "arg2", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.Nullable java.time.Instant getArg3() { - return this.jsiiGet("arg3", java.time.Instant.class); + return software.amazon.jsii.Kernel.get(this, "arg3", software.amazon.jsii.NativeType.forClass(java.time.Instant.class)); } } @@ -13603,6 +14694,7 @@ public interface OptionalStruct extends software.amazon.jsii.JsiiSerializable { * An implementation for {@link OptionalStruct} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements OptionalStruct { private final java.lang.String field; @@ -13612,23 +14704,24 @@ public interface OptionalStruct extends software.amazon.jsii.JsiiSerializable { */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.field = this.jsiiGet("field", java.lang.String.class); + this.field = software.amazon.jsii.Kernel.get(this, "field", software.amazon.jsii.NativeType.forClass(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 field) { + protected Jsii$Proxy(final java.lang.String field) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.field = field; } @Override - public java.lang.String getField() { + public final java.lang.String getField() { return this.field; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -13648,7 +14741,7 @@ public interface OptionalStruct extends software.amazon.jsii.JsiiSerializable { } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -13658,7 +14751,7 @@ public interface OptionalStruct extends software.amazon.jsii.JsiiSerializable { } @Override - public int hashCode() { + public final int hashCode() { int result = this.field != null ? this.field.hashCode() : 0; return result; } @@ -13706,14 +14799,14 @@ public class OptionalStructConsumer extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Boolean getParameterWasUndefined() { - return this.jsiiGet("parameterWasUndefined", java.lang.Boolean.class); + return software.amazon.jsii.Kernel.get(this, "parameterWasUndefined", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.Nullable java.lang.String getFieldValue() { - return this.jsiiGet("fieldValue", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "fieldValue", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** @@ -13797,42 +14890,42 @@ public class OverridableProtectedMember extends software.amazon.jsii.JsiiObject */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) protected @org.jetbrains.annotations.NotNull java.lang.String overrideMe() { - return this.jsiiCall("overrideMe", java.lang.String.class); + return software.amazon.jsii.Kernel.call(this, "overrideMe", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void switchModes() { - this.jsiiCall("switchModes", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "switchModes", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String valueFromProtected() { - return this.jsiiCall("valueFromProtected", java.lang.String.class); + return software.amazon.jsii.Kernel.call(this, "valueFromProtected", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) protected @org.jetbrains.annotations.NotNull java.lang.String getOverrideReadOnly() { - return this.jsiiGet("overrideReadOnly", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "overrideReadOnly", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) protected @org.jetbrains.annotations.NotNull java.lang.String getOverrideReadWrite() { - return this.jsiiGet("overrideReadWrite", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "overrideReadWrite", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) protected void setOverrideReadWrite(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiSet("overrideReadWrite", java.util.Objects.requireNonNull(value, "overrideReadWrite is required")); + software.amazon.jsii.Kernel.set(this, "overrideReadWrite", java.util.Objects.requireNonNull(value, "overrideReadWrite is required")); } } @@ -13869,7 +14962,7 @@ public class OverrideReturnsObject extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number test(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.IReturnsNumber obj) { - return this.jsiiCall("test", java.lang.Number.class, new Object[] { java.util.Objects.requireNonNull(obj, "obj is required") }); + return software.amazon.jsii.Kernel.call(this, "test", software.amazon.jsii.NativeType.forClass(java.lang.Number.class), new Object[] { java.util.Objects.requireNonNull(obj, "obj is required") }); } } @@ -13933,6 +15026,7 @@ public interface ParentStruct982 extends software.amazon.jsii.JsiiSerializable { * An implementation for {@link ParentStruct982} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ParentStruct982 { private final java.lang.String foo; @@ -13942,23 +15036,24 @@ public interface ParentStruct982 extends software.amazon.jsii.JsiiSerializable { */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.foo = this.jsiiGet("foo", java.lang.String.class); + this.foo = software.amazon.jsii.Kernel.get(this, "foo", software.amazon.jsii.NativeType.forClass(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 foo) { + protected Jsii$Proxy(final java.lang.String foo) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.foo = java.util.Objects.requireNonNull(foo, "foo is required"); } @Override - public java.lang.String getFoo() { + public final java.lang.String getFoo() { return this.foo; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -13976,7 +15071,7 @@ public interface ParentStruct982 extends software.amazon.jsii.JsiiSerializable { } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -13986,7 +15081,7 @@ public interface ParentStruct982 extends software.amazon.jsii.JsiiSerializable { } @Override - public int hashCode() { + public final int hashCode() { int result = this.foo.hashCode(); return result; } @@ -14032,7 +15127,8 @@ public abstract class PartiallyInitializedThisConsumer extends software.amazon.j /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.tests.calculator.PartiallyInitializedThisConsumer { + @software.amazon.jsii.Internal + private static final class Jsii$Proxy extends software.amazon.jsii.tests.calculator.PartiallyInitializedThisConsumer { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -14044,8 +15140,8 @@ public abstract class PartiallyInitializedThisConsumer extends software.amazon.j */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - public @org.jetbrains.annotations.NotNull java.lang.String consumePartiallyInitializedThis(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.ConstructorPassesThisOut obj, final @org.jetbrains.annotations.NotNull java.time.Instant dt, final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.AllTypesEnum ev) { - return this.jsiiCall("consumePartiallyInitializedThis", java.lang.String.class, new Object[] { java.util.Objects.requireNonNull(obj, "obj is required"), java.util.Objects.requireNonNull(dt, "dt is required"), java.util.Objects.requireNonNull(ev, "ev is required") }); + public final @org.jetbrains.annotations.NotNull java.lang.String consumePartiallyInitializedThis(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.ConstructorPassesThisOut obj, final @org.jetbrains.annotations.NotNull java.time.Instant dt, final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.AllTypesEnum ev) { + return software.amazon.jsii.Kernel.call(this, "consumePartiallyInitializedThis", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(obj, "obj is required"), java.util.Objects.requireNonNull(dt, "dt is required"), java.util.Objects.requireNonNull(ev, "ev is required") }); } } } @@ -14083,7 +15179,7 @@ public class Polymorphism extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String sayHello(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.IFriendly friendly) { - return this.jsiiCall("sayHello", java.lang.String.class, new Object[] { java.util.Objects.requireNonNull(friendly, "friendly is required") }); + return software.amazon.jsii.Kernel.call(this, "sayHello", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(friendly, "friendly is required") }); } } @@ -14125,7 +15221,7 @@ public class Power extends software.amazon.jsii.tests.calculator.composition.Com */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) 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); + return software.amazon.jsii.Kernel.get(this, "base", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.lib.NumericValue.class)); } /** @@ -14136,7 +15232,7 @@ public class Power extends software.amazon.jsii.tests.calculator.composition.Com @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) 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); + return software.amazon.jsii.Kernel.get(this, "expression", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.lib.NumericValue.class)); } /** @@ -14144,7 +15240,7 @@ public class Power extends software.amazon.jsii.tests.calculator.composition.Com */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) 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); + return software.amazon.jsii.Kernel.get(this, "pow", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.lib.NumericValue.class)); } } @@ -14181,14 +15277,14 @@ public class PropertyNamedProperty extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getProperty() { - return this.jsiiGet("property", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "property", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Boolean getYetAnoterOne() { - return this.jsiiGet("yetAnoterOne", java.lang.Boolean.class); + return software.amazon.jsii.Kernel.get(this, "yetAnoterOne", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); } } @@ -14224,7 +15320,7 @@ public class PublicClass extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void hello() { - this.jsiiCall("hello", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "hello", software.amazon.jsii.NativeType.VOID); } } @@ -14260,224 +15356,224 @@ public class PythonReservedWords extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void and() { - this.jsiiCall("and", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "and", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void as() { - this.jsiiCall("as", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "as", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doAssert() { - this.jsiiCall("assert", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "assert", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void async() { - this.jsiiCall("async", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "async", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void await() { - this.jsiiCall("await", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "await", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doBreak() { - this.jsiiCall("break", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "break", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doClass() { - this.jsiiCall("class", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "class", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doContinue() { - this.jsiiCall("continue", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "continue", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void def() { - this.jsiiCall("def", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "def", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void del() { - this.jsiiCall("del", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "del", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void elif() { - this.jsiiCall("elif", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "elif", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doElse() { - this.jsiiCall("else", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "else", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void except() { - this.jsiiCall("except", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "except", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doFinally() { - this.jsiiCall("finally", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "finally", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doFor() { - this.jsiiCall("for", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "for", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void from() { - this.jsiiCall("from", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "from", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void global() { - this.jsiiCall("global", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "global", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doIf() { - this.jsiiCall("if", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "if", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doImport() { - this.jsiiCall("import", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "import", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void in() { - this.jsiiCall("in", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "in", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void is() { - this.jsiiCall("is", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "is", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void lambda() { - this.jsiiCall("lambda", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "lambda", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void nonlocal() { - this.jsiiCall("nonlocal", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "nonlocal", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void not() { - this.jsiiCall("not", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "not", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void or() { - this.jsiiCall("or", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "or", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void pass() { - this.jsiiCall("pass", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "pass", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void raise() { - this.jsiiCall("raise", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "raise", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doReturn() { - this.jsiiCall("return", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "return", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doTry() { - this.jsiiCall("try", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "try", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void doWhile() { - this.jsiiCall("while", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "while", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void with() { - this.jsiiCall("with", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "with", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void yield() { - this.jsiiCall("yield", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "yield", software.amazon.jsii.NativeType.VOID); } } @@ -14514,7 +15610,7 @@ public class ReferenceEnumFromScopedPackage extends software.amazon.jsii.JsiiObj */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.Nullable software.amazon.jsii.tests.calculator.lib.EnumFromScopedModule loadFoo() { - return this.jsiiCall("loadFoo", software.amazon.jsii.tests.calculator.lib.EnumFromScopedModule.class); + return software.amazon.jsii.Kernel.call(this, "loadFoo", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.lib.EnumFromScopedModule.class)); } /** @@ -14522,21 +15618,21 @@ public class ReferenceEnumFromScopedPackage extends software.amazon.jsii.JsiiObj */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void saveFoo(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.EnumFromScopedModule value) { - this.jsiiCall("saveFoo", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(value, "value is required") }); + software.amazon.jsii.Kernel.call(this, "saveFoo", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(value, "value is required") }); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.Nullable software.amazon.jsii.tests.calculator.lib.EnumFromScopedModule getFoo() { - return this.jsiiGet("foo", software.amazon.jsii.tests.calculator.lib.EnumFromScopedModule.class); + return software.amazon.jsii.Kernel.get(this, "foo", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.lib.EnumFromScopedModule.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setFoo(final @org.jetbrains.annotations.Nullable software.amazon.jsii.tests.calculator.lib.EnumFromScopedModule value) { - this.jsiiSet("foo", value); + software.amazon.jsii.Kernel.set(this, "foo", value); } } @@ -14576,7 +15672,7 @@ public class ReturnsPrivateImplementationOfInterface extends software.amazon.jsi */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.IPrivatelyImplemented getPrivateImplementation() { - return this.jsiiGet("privateImplementation", software.amazon.jsii.tests.calculator.IPrivatelyImplemented.class); + return software.amazon.jsii.Kernel.get(this, "privateImplementation", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.IPrivatelyImplemented.class)); } } @@ -14663,6 +15759,7 @@ public interface RootStruct extends software.amazon.jsii.JsiiSerializable { * An implementation for {@link RootStruct} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements RootStruct { private final java.lang.String stringProp; private final software.amazon.jsii.tests.calculator.NestedStruct nestedStruct; @@ -14673,30 +15770,31 @@ public interface RootStruct extends software.amazon.jsii.JsiiSerializable { */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.stringProp = this.jsiiGet("stringProp", java.lang.String.class); - this.nestedStruct = this.jsiiGet("nestedStruct", software.amazon.jsii.tests.calculator.NestedStruct.class); + this.stringProp = software.amazon.jsii.Kernel.get(this, "stringProp", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + this.nestedStruct = software.amazon.jsii.Kernel.get(this, "nestedStruct", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.NestedStruct.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ - private Jsii$Proxy(final java.lang.String stringProp, final software.amazon.jsii.tests.calculator.NestedStruct nestedStruct) { + protected Jsii$Proxy(final java.lang.String stringProp, final software.amazon.jsii.tests.calculator.NestedStruct nestedStruct) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.stringProp = java.util.Objects.requireNonNull(stringProp, "stringProp is required"); this.nestedStruct = nestedStruct; } @Override - public java.lang.String getStringProp() { + public final java.lang.String getStringProp() { return this.stringProp; } @Override - public software.amazon.jsii.tests.calculator.NestedStruct getNestedStruct() { + public final software.amazon.jsii.tests.calculator.NestedStruct getNestedStruct() { return this.nestedStruct; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -14717,7 +15815,7 @@ public interface RootStruct extends software.amazon.jsii.JsiiSerializable { } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -14728,7 +15826,7 @@ public interface RootStruct extends software.amazon.jsii.JsiiSerializable { } @Override - public int hashCode() { + public final int hashCode() { int result = this.stringProp.hashCode(); result = 31 * result + (this.nestedStruct != null ? this.nestedStruct.hashCode() : 0); return result; @@ -14800,7 +15898,7 @@ public class RuntimeTypeChecking extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void methodWithDefaultedArguments(final @org.jetbrains.annotations.Nullable java.lang.Number arg1, final @org.jetbrains.annotations.Nullable java.lang.String arg2, final @org.jetbrains.annotations.Nullable java.time.Instant arg3) { - this.jsiiCall("methodWithDefaultedArguments", software.amazon.jsii.NativeType.VOID, new Object[] { arg1, arg2, arg3 }); + software.amazon.jsii.Kernel.call(this, "methodWithDefaultedArguments", software.amazon.jsii.NativeType.VOID, new Object[] { arg1, arg2, arg3 }); } /** @@ -14809,7 +15907,7 @@ public class RuntimeTypeChecking extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void methodWithDefaultedArguments(final @org.jetbrains.annotations.Nullable java.lang.Number arg1, final @org.jetbrains.annotations.Nullable java.lang.String arg2) { - this.jsiiCall("methodWithDefaultedArguments", software.amazon.jsii.NativeType.VOID, new Object[] { arg1, arg2 }); + software.amazon.jsii.Kernel.call(this, "methodWithDefaultedArguments", software.amazon.jsii.NativeType.VOID, new Object[] { arg1, arg2 }); } /** @@ -14817,14 +15915,14 @@ public class RuntimeTypeChecking extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void methodWithDefaultedArguments(final @org.jetbrains.annotations.Nullable java.lang.Number arg1) { - this.jsiiCall("methodWithDefaultedArguments", software.amazon.jsii.NativeType.VOID, new Object[] { arg1 }); + software.amazon.jsii.Kernel.call(this, "methodWithDefaultedArguments", software.amazon.jsii.NativeType.VOID, new Object[] { arg1 }); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void methodWithDefaultedArguments() { - this.jsiiCall("methodWithDefaultedArguments", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "methodWithDefaultedArguments", software.amazon.jsii.NativeType.VOID); } /** @@ -14832,14 +15930,14 @@ public class RuntimeTypeChecking extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void methodWithOptionalAnyArgument(final @org.jetbrains.annotations.Nullable java.lang.Object arg) { - this.jsiiCall("methodWithOptionalAnyArgument", software.amazon.jsii.NativeType.VOID, new Object[] { arg }); + software.amazon.jsii.Kernel.call(this, "methodWithOptionalAnyArgument", software.amazon.jsii.NativeType.VOID, new Object[] { arg }); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void methodWithOptionalAnyArgument() { - this.jsiiCall("methodWithOptionalAnyArgument", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "methodWithOptionalAnyArgument", software.amazon.jsii.NativeType.VOID); } /** @@ -14851,7 +15949,7 @@ public class RuntimeTypeChecking extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void methodWithOptionalArguments(final @org.jetbrains.annotations.NotNull java.lang.Number arg1, final @org.jetbrains.annotations.NotNull java.lang.String arg2, final @org.jetbrains.annotations.Nullable java.time.Instant arg3) { - this.jsiiCall("methodWithOptionalArguments", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(arg1, "arg1 is required"), java.util.Objects.requireNonNull(arg2, "arg2 is required"), arg3 }); + software.amazon.jsii.Kernel.call(this, "methodWithOptionalArguments", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(arg1, "arg1 is required"), java.util.Objects.requireNonNull(arg2, "arg2 is required"), arg3 }); } /** @@ -14862,7 +15960,7 @@ public class RuntimeTypeChecking extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void methodWithOptionalArguments(final @org.jetbrains.annotations.NotNull java.lang.Number arg1, final @org.jetbrains.annotations.NotNull java.lang.String arg2) { - this.jsiiCall("methodWithOptionalArguments", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(arg1, "arg1 is required"), java.util.Objects.requireNonNull(arg2, "arg2 is required") }); + software.amazon.jsii.Kernel.call(this, "methodWithOptionalArguments", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(arg1, "arg1 is required"), java.util.Objects.requireNonNull(arg2, "arg2 is required") }); } } @@ -14946,6 +16044,7 @@ public interface SecondLevelStruct extends software.amazon.jsii.JsiiSerializable * An implementation for {@link SecondLevelStruct} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements SecondLevelStruct { private final java.lang.String deeperRequiredProp; private final java.lang.String deeperOptionalProp; @@ -14956,30 +16055,31 @@ public interface SecondLevelStruct extends software.amazon.jsii.JsiiSerializable */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.deeperRequiredProp = this.jsiiGet("deeperRequiredProp", java.lang.String.class); - this.deeperOptionalProp = this.jsiiGet("deeperOptionalProp", java.lang.String.class); + this.deeperRequiredProp = software.amazon.jsii.Kernel.get(this, "deeperRequiredProp", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + this.deeperOptionalProp = software.amazon.jsii.Kernel.get(this, "deeperOptionalProp", software.amazon.jsii.NativeType.forClass(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 deeperRequiredProp, final java.lang.String deeperOptionalProp) { + protected Jsii$Proxy(final java.lang.String deeperRequiredProp, final java.lang.String deeperOptionalProp) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.deeperRequiredProp = java.util.Objects.requireNonNull(deeperRequiredProp, "deeperRequiredProp is required"); this.deeperOptionalProp = deeperOptionalProp; } @Override - public java.lang.String getDeeperRequiredProp() { + public final java.lang.String getDeeperRequiredProp() { return this.deeperRequiredProp; } @Override - public java.lang.String getDeeperOptionalProp() { + public final java.lang.String getDeeperOptionalProp() { return this.deeperOptionalProp; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -15000,7 +16100,7 @@ public interface SecondLevelStruct extends software.amazon.jsii.JsiiSerializable } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -15011,7 +16111,7 @@ public interface SecondLevelStruct extends software.amazon.jsii.JsiiSerializable } @Override - public int hashCode() { + public final int hashCode() { int result = this.deeperRequiredProp.hashCode(); result = 31 * result + (this.deeperOptionalProp != null ? this.deeperOptionalProp.hashCode() : 0); return result; @@ -15056,14 +16156,14 @@ public class SingleInstanceTwoTypes extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.InbetweenClass interface1() { - return this.jsiiCall("interface1", software.amazon.jsii.tests.calculator.InbetweenClass.class); + return software.amazon.jsii.Kernel.call(this, "interface1", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.InbetweenClass.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.IPublicInterface interface2() { - return this.jsiiCall("interface2", software.amazon.jsii.tests.calculator.IPublicInterface.class); + return software.amazon.jsii.Kernel.call(this, "interface2", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.IPublicInterface.class)); } } @@ -15095,7 +16195,7 @@ public class SingletonInt extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Boolean isSingletonInt(final @org.jetbrains.annotations.NotNull java.lang.Number value) { - return this.jsiiCall("isSingletonInt", java.lang.Boolean.class, new Object[] { java.util.Objects.requireNonNull(value, "value is required") }); + return software.amazon.jsii.Kernel.call(this, "isSingletonInt", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class), new Object[] { java.util.Objects.requireNonNull(value, "value is required") }); } } @@ -15146,7 +16246,7 @@ public class SingletonString extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Boolean isSingletonString(final @org.jetbrains.annotations.NotNull java.lang.String value) { - return this.jsiiCall("isSingletonString", java.lang.Boolean.class, new Object[] { java.util.Objects.requireNonNull(value, "value is required") }); + return software.amazon.jsii.Kernel.call(this, "isSingletonString", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class), new Object[] { java.util.Objects.requireNonNull(value, "value is required") }); } } @@ -15245,6 +16345,7 @@ public interface SmellyStruct extends software.amazon.jsii.JsiiSerializable { * An implementation for {@link SmellyStruct} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements SmellyStruct { private final java.lang.String property; private final java.lang.Boolean yetAnoterOne; @@ -15255,30 +16356,31 @@ public interface SmellyStruct extends software.amazon.jsii.JsiiSerializable { */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.property = this.jsiiGet("property", java.lang.String.class); - this.yetAnoterOne = this.jsiiGet("yetAnoterOne", java.lang.Boolean.class); + this.property = software.amazon.jsii.Kernel.get(this, "property", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + this.yetAnoterOne = software.amazon.jsii.Kernel.get(this, "yetAnoterOne", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ - private Jsii$Proxy(final java.lang.String property, final java.lang.Boolean yetAnoterOne) { + protected Jsii$Proxy(final java.lang.String property, final java.lang.Boolean yetAnoterOne) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.property = java.util.Objects.requireNonNull(property, "property is required"); this.yetAnoterOne = java.util.Objects.requireNonNull(yetAnoterOne, "yetAnoterOne is required"); } @Override - public java.lang.String getProperty() { + public final java.lang.String getProperty() { return this.property; } @Override - public java.lang.Boolean getYetAnoterOne() { + public final java.lang.Boolean getYetAnoterOne() { return this.yetAnoterOne; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -15297,7 +16399,7 @@ public interface SmellyStruct extends software.amazon.jsii.JsiiSerializable { } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -15308,7 +16410,7 @@ public interface SmellyStruct extends software.amazon.jsii.JsiiSerializable { } @Override - public int hashCode() { + public final int hashCode() { int result = this.property.hashCode(); result = 31 * result + (this.yetAnoterOne.hashCode()); return result; @@ -15348,14 +16450,14 @@ public class SomeTypeJsii976 extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.Object returnAnonymous() { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.SomeTypeJsii976.class, "returnAnonymous", java.lang.Object.class); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.SomeTypeJsii976.class, "returnAnonymous", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.IReturnJsii976 returnReturn() { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.SomeTypeJsii976.class, "returnReturn", software.amazon.jsii.tests.calculator.IReturnJsii976.class); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.SomeTypeJsii976.class, "returnReturn", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.IReturnJsii976.class)); } } @@ -15402,28 +16504,28 @@ public class StableClass extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void method() { - this.jsiiCall("method", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "method", software.amazon.jsii.NativeType.VOID); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getReadonlyProperty() { - return this.jsiiGet("readonlyProperty", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "readonlyProperty", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.Nullable java.lang.Number getMutableProperty() { - return this.jsiiGet("mutableProperty", java.lang.Number.class); + return software.amazon.jsii.Kernel.get(this, "mutableProperty", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setMutableProperty(final @org.jetbrains.annotations.Nullable java.lang.Number value) { - this.jsiiSet("mutableProperty", value); + software.amazon.jsii.Kernel.set(this, "mutableProperty", value); } } @@ -15507,6 +16609,7 @@ public interface StableStruct extends software.amazon.jsii.JsiiSerializable { * An implementation for {@link StableStruct} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements StableStruct { private final java.lang.String readonlyProperty; @@ -15516,23 +16619,24 @@ public interface StableStruct extends software.amazon.jsii.JsiiSerializable { */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.readonlyProperty = this.jsiiGet("readonlyProperty", java.lang.String.class); + this.readonlyProperty = software.amazon.jsii.Kernel.get(this, "readonlyProperty", software.amazon.jsii.NativeType.forClass(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 readonlyProperty) { + protected Jsii$Proxy(final java.lang.String readonlyProperty) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.readonlyProperty = java.util.Objects.requireNonNull(readonlyProperty, "readonlyProperty is required"); } @Override - public java.lang.String getReadonlyProperty() { + public final java.lang.String getReadonlyProperty() { return this.readonlyProperty; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -15550,7 +16654,7 @@ public interface StableStruct extends software.amazon.jsii.JsiiSerializable { } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -15560,7 +16664,7 @@ public interface StableStruct extends software.amazon.jsii.JsiiSerializable { } @Override - public int hashCode() { + public final int hashCode() { int result = this.readonlyProperty.hashCode(); return result; } @@ -15594,14 +16698,14 @@ public class StaticContext extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.Boolean canAccessStaticContext() { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.StaticContext.class, "canAccessStaticContext", java.lang.Boolean.class); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.StaticContext.class, "canAccessStaticContext", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.Boolean getStaticVariable() { - return software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.jsii.tests.calculator.StaticContext.class, "staticVariable", java.lang.Boolean.class); + return software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.jsii.tests.calculator.StaticContext.class, "staticVariable", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); } /** @@ -15614,6 +16718,89 @@ public class StaticContext extends software.amazon.jsii.JsiiObject { `; +exports[`Generated code for "jsii-calc": /java/src/main/java/software/amazon/jsii/tests/calculator/StaticHelloChild.java 1`] = ` +package software.amazon.jsii.tests.calculator; + +/** + */ +@javax.annotation.Generated(value = "jsii-pacmak") +@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) +@software.amazon.jsii.Jsii(module = software.amazon.jsii.tests.calculator.$Module.class, fqn = "jsii-calc.StaticHelloChild") +public class StaticHelloChild extends software.amazon.jsii.tests.calculator.StaticHelloParent { + + protected StaticHelloChild(final software.amazon.jsii.JsiiObjectRef objRef) { + super(objRef); + } + + protected StaticHelloChild(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { + super(initializationMode); + } + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public static void method() { + software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.StaticHelloChild.class, "method", software.amazon.jsii.NativeType.VOID); + } + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public static @org.jetbrains.annotations.NotNull java.lang.Number getProperty() { + return software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.jsii.tests.calculator.StaticHelloChild.class, "property", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); + } +} + +`; + +exports[`Generated code for "jsii-calc": /java/src/main/java/software/amazon/jsii/tests/calculator/StaticHelloParent.java 1`] = ` +package software.amazon.jsii.tests.calculator; + +/** + * Static methods that override parent class are technically overrides (the inheritance of statics is part of the ES6 specification), but certain other languages such as Java do not carry statics in the inheritance chain at all, so they cannot be overridden, only hidden. + *

+ * The difference is fairly minor (for typical use-cases, the end result is the + * same), however this has implications on what the generated code should look + * like. + */ +@javax.annotation.Generated(value = "jsii-pacmak") +@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) +@software.amazon.jsii.Jsii(module = software.amazon.jsii.tests.calculator.$Module.class, fqn = "jsii-calc.StaticHelloParent") +public class StaticHelloParent extends software.amazon.jsii.JsiiObject { + + protected StaticHelloParent(final software.amazon.jsii.JsiiObjectRef objRef) { + super(objRef); + } + + protected StaticHelloParent(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { + super(initializationMode); + } + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public StaticHelloParent() { + super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); + software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this); + } + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public static void method() { + software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.StaticHelloParent.class, "method", software.amazon.jsii.NativeType.VOID); + } + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public static @org.jetbrains.annotations.NotNull java.lang.Number getProperty() { + return software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.jsii.tests.calculator.StaticHelloParent.class, "property", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); + } +} + +`; + exports[`Generated code for "jsii-calc": /java/src/main/java/software/amazon/jsii/tests/calculator/Statics.java 1`] = ` package software.amazon.jsii.tests.calculator; @@ -15633,9 +16820,9 @@ public class Statics extends software.amazon.jsii.JsiiObject { } static { - BAR = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.jsii.tests.calculator.Statics.class, "BAR", java.lang.Number.class); - CONST_OBJ = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.jsii.tests.calculator.Statics.class, "ConstObj", software.amazon.jsii.tests.calculator.DoubleTrouble.class); - FOO = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.jsii.tests.calculator.Statics.class, "Foo", java.lang.String.class); + BAR = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.jsii.tests.calculator.Statics.class, "BAR", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); + CONST_OBJ = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.jsii.tests.calculator.Statics.class, "ConstObj", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.DoubleTrouble.class)); + FOO = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.jsii.tests.calculator.Statics.class, "Foo", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); ZOO_BAR = java.util.Collections.unmodifiableMap(software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.jsii.tests.calculator.Statics.class, "zooBar", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)))); } @@ -15655,14 +16842,14 @@ public class Statics extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.String staticMethod(final @org.jetbrains.annotations.NotNull java.lang.String name) { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.Statics.class, "staticMethod", java.lang.String.class, new Object[] { java.util.Objects.requireNonNull(name, "name is required") }); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.Statics.class, "staticMethod", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(name, "name is required") }); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String justMethod() { - return this.jsiiCall("justMethod", java.lang.String.class); + return software.amazon.jsii.Kernel.call(this, "justMethod", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** @@ -15695,7 +16882,7 @@ public class Statics extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.Statics getInstance() { - return software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.jsii.tests.calculator.Statics.class, "instance", software.amazon.jsii.tests.calculator.Statics.class); + return software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.jsii.tests.calculator.Statics.class, "instance", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.Statics.class)); } /** @@ -15712,7 +16899,7 @@ public class Statics extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.Number getNonConstStatic() { - return software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.jsii.tests.calculator.Statics.class, "nonConstStatic", java.lang.Number.class); + return software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.jsii.tests.calculator.Statics.class, "nonConstStatic", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** @@ -15726,7 +16913,7 @@ public class Statics extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getValue() { - return this.jsiiGet("value", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "value", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } } @@ -15787,14 +16974,14 @@ public class StripInternal extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getYouSeeMe() { - return this.jsiiGet("youSeeMe", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "youSeeMe", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setYouSeeMe(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiSet("youSeeMe", java.util.Objects.requireNonNull(value, "youSeeMe is required")); + software.amazon.jsii.Kernel.set(this, "youSeeMe", java.util.Objects.requireNonNull(value, "youSeeMe is required")); } } @@ -15896,6 +17083,7 @@ public interface StructA extends software.amazon.jsii.JsiiSerializable { * An implementation for {@link StructA} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements StructA { private final java.lang.String requiredString; private final java.lang.Number optionalNumber; @@ -15907,15 +17095,15 @@ public interface StructA extends software.amazon.jsii.JsiiSerializable { */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.requiredString = this.jsiiGet("requiredString", java.lang.String.class); - this.optionalNumber = this.jsiiGet("optionalNumber", java.lang.Number.class); - this.optionalString = this.jsiiGet("optionalString", java.lang.String.class); + this.requiredString = software.amazon.jsii.Kernel.get(this, "requiredString", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + this.optionalNumber = software.amazon.jsii.Kernel.get(this, "optionalNumber", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); + this.optionalString = software.amazon.jsii.Kernel.get(this, "optionalString", software.amazon.jsii.NativeType.forClass(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 requiredString, final java.lang.Number optionalNumber, final java.lang.String optionalString) { + protected Jsii$Proxy(final java.lang.String requiredString, final java.lang.Number optionalNumber, final java.lang.String optionalString) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.requiredString = java.util.Objects.requireNonNull(requiredString, "requiredString is required"); this.optionalNumber = optionalNumber; @@ -15923,21 +17111,22 @@ public interface StructA extends software.amazon.jsii.JsiiSerializable { } @Override - public java.lang.String getRequiredString() { + public final java.lang.String getRequiredString() { return this.requiredString; } @Override - public java.lang.Number getOptionalNumber() { + public final java.lang.Number getOptionalNumber() { return this.optionalNumber; } @Override - public java.lang.String getOptionalString() { + public final java.lang.String getOptionalString() { return this.optionalString; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -15961,7 +17150,7 @@ public interface StructA extends software.amazon.jsii.JsiiSerializable { } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -15973,7 +17162,7 @@ public interface StructA extends software.amazon.jsii.JsiiSerializable { } @Override - public int hashCode() { + public final int hashCode() { int result = this.requiredString.hashCode(); result = 31 * result + (this.optionalNumber != null ? this.optionalNumber.hashCode() : 0); result = 31 * result + (this.optionalString != null ? this.optionalString.hashCode() : 0); @@ -16080,6 +17269,7 @@ public interface StructB extends software.amazon.jsii.JsiiSerializable { * An implementation for {@link StructB} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements StructB { private final java.lang.String requiredString; private final java.lang.Boolean optionalBoolean; @@ -16091,15 +17281,15 @@ public interface StructB extends software.amazon.jsii.JsiiSerializable { */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.requiredString = this.jsiiGet("requiredString", java.lang.String.class); - this.optionalBoolean = this.jsiiGet("optionalBoolean", java.lang.Boolean.class); - this.optionalStructA = this.jsiiGet("optionalStructA", software.amazon.jsii.tests.calculator.StructA.class); + this.requiredString = software.amazon.jsii.Kernel.get(this, "requiredString", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + this.optionalBoolean = software.amazon.jsii.Kernel.get(this, "optionalBoolean", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); + this.optionalStructA = software.amazon.jsii.Kernel.get(this, "optionalStructA", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.StructA.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ - private Jsii$Proxy(final java.lang.String requiredString, final java.lang.Boolean optionalBoolean, final software.amazon.jsii.tests.calculator.StructA optionalStructA) { + protected Jsii$Proxy(final java.lang.String requiredString, final java.lang.Boolean optionalBoolean, final software.amazon.jsii.tests.calculator.StructA optionalStructA) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.requiredString = java.util.Objects.requireNonNull(requiredString, "requiredString is required"); this.optionalBoolean = optionalBoolean; @@ -16107,21 +17297,22 @@ public interface StructB extends software.amazon.jsii.JsiiSerializable { } @Override - public java.lang.String getRequiredString() { + public final java.lang.String getRequiredString() { return this.requiredString; } @Override - public java.lang.Boolean getOptionalBoolean() { + public final java.lang.Boolean getOptionalBoolean() { return this.optionalBoolean; } @Override - public software.amazon.jsii.tests.calculator.StructA getOptionalStructA() { + public final software.amazon.jsii.tests.calculator.StructA getOptionalStructA() { return this.optionalStructA; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -16145,7 +17336,7 @@ public interface StructB extends software.amazon.jsii.JsiiSerializable { } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -16157,7 +17348,7 @@ public interface StructB extends software.amazon.jsii.JsiiSerializable { } @Override - public int hashCode() { + public final int hashCode() { int result = this.requiredString.hashCode(); result = 31 * result + (this.optionalBoolean != null ? this.optionalBoolean.hashCode() : 0); result = 31 * result + (this.optionalStructA != null ? this.optionalStructA.hashCode() : 0); @@ -16247,6 +17438,7 @@ public interface StructParameterType extends software.amazon.jsii.JsiiSerializab * An implementation for {@link StructParameterType} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements StructParameterType { private final java.lang.String scope; private final java.lang.Boolean props; @@ -16257,30 +17449,31 @@ public interface StructParameterType extends software.amazon.jsii.JsiiSerializab */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.scope = this.jsiiGet("scope", java.lang.String.class); - this.props = this.jsiiGet("props", java.lang.Boolean.class); + this.scope = software.amazon.jsii.Kernel.get(this, "scope", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + this.props = software.amazon.jsii.Kernel.get(this, "props", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ - private Jsii$Proxy(final java.lang.String scope, final java.lang.Boolean props) { + protected Jsii$Proxy(final java.lang.String scope, final java.lang.Boolean props) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.scope = java.util.Objects.requireNonNull(scope, "scope is required"); this.props = props; } @Override - public java.lang.String getScope() { + public final java.lang.String getScope() { return this.scope; } @Override - public java.lang.Boolean getProps() { + public final java.lang.Boolean getProps() { return this.props; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -16301,7 +17494,7 @@ public interface StructParameterType extends software.amazon.jsii.JsiiSerializab } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -16312,7 +17505,7 @@ public interface StructParameterType extends software.amazon.jsii.JsiiSerializab } @Override - public int hashCode() { + public final int hashCode() { int result = this.scope.hashCode(); result = 31 * result + (this.props != null ? this.props.hashCode() : 0); return result; @@ -16355,7 +17548,7 @@ public class StructPassing extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.Number howManyVarArgsDidIPass(final @org.jetbrains.annotations.NotNull java.lang.Number _positional, final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.TopLevelStruct... inputs) { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.StructPassing.class, "howManyVarArgsDidIPass", java.lang.Number.class, java.util.stream.Stream.concat(java.util.Arrays.stream(new Object[] { java.util.Objects.requireNonNull(_positional, "_positional is required") }), java.util.Arrays.stream(inputs)).toArray(Object[]::new)); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.StructPassing.class, "howManyVarArgsDidIPass", software.amazon.jsii.NativeType.forClass(java.lang.Number.class), java.util.stream.Stream.concat(java.util.Arrays.stream(new Object[] { java.util.Objects.requireNonNull(_positional, "_positional is required") }), java.util.Arrays.stream(inputs)).toArray(Object[]::new)); } /** @@ -16364,7 +17557,7 @@ public class StructPassing extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.TopLevelStruct roundTrip(final @org.jetbrains.annotations.NotNull java.lang.Number _positional, final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.TopLevelStruct input) { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.StructPassing.class, "roundTrip", software.amazon.jsii.tests.calculator.TopLevelStruct.class, new Object[] { java.util.Objects.requireNonNull(_positional, "_positional is required"), java.util.Objects.requireNonNull(input, "input is required") }); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.StructPassing.class, "roundTrip", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.TopLevelStruct.class), new Object[] { java.util.Objects.requireNonNull(_positional, "_positional is required"), java.util.Objects.requireNonNull(input, "input is required") }); } } @@ -16393,7 +17586,7 @@ public class StructUnionConsumer extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.Boolean isStructA(final @org.jetbrains.annotations.NotNull java.lang.Object struct) { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.StructUnionConsumer.class, "isStructA", java.lang.Boolean.class, new Object[] { java.util.Objects.requireNonNull(struct, "struct is required") }); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.StructUnionConsumer.class, "isStructA", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class), new Object[] { java.util.Objects.requireNonNull(struct, "struct is required") }); } /** @@ -16401,7 +17594,7 @@ public class StructUnionConsumer extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.Boolean isStructB(final @org.jetbrains.annotations.NotNull java.lang.Object struct) { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.StructUnionConsumer.class, "isStructB", java.lang.Boolean.class, new Object[] { java.util.Objects.requireNonNull(struct, "struct is required") }); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.StructUnionConsumer.class, "isStructB", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class), new Object[] { java.util.Objects.requireNonNull(struct, "struct is required") }); } } @@ -16521,6 +17714,7 @@ public interface StructWithJavaReservedWords extends software.amazon.jsii.JsiiSe * An implementation for {@link StructWithJavaReservedWords} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements StructWithJavaReservedWords { private final java.lang.String defaultValue; private final java.lang.String assertValue; @@ -16533,16 +17727,16 @@ public interface StructWithJavaReservedWords extends software.amazon.jsii.JsiiSe */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.defaultValue = this.jsiiGet("default", java.lang.String.class); - this.assertValue = this.jsiiGet("assert", java.lang.String.class); - this.result = this.jsiiGet("result", java.lang.String.class); - this.that = this.jsiiGet("that", java.lang.String.class); + this.defaultValue = software.amazon.jsii.Kernel.get(this, "default", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + this.assertValue = software.amazon.jsii.Kernel.get(this, "assert", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + this.result = software.amazon.jsii.Kernel.get(this, "result", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + this.that = software.amazon.jsii.Kernel.get(this, "that", software.amazon.jsii.NativeType.forClass(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 defaultValue, final java.lang.String assertValue, final java.lang.String result, final java.lang.String that) { + protected Jsii$Proxy(final java.lang.String defaultValue, final java.lang.String assertValue, final java.lang.String result, final java.lang.String that) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.defaultValue = java.util.Objects.requireNonNull(defaultValue, "defaultValue is required"); this.assertValue = assertValue; @@ -16551,26 +17745,27 @@ public interface StructWithJavaReservedWords extends software.amazon.jsii.JsiiSe } @Override - public java.lang.String getDefaultValue() { + public final java.lang.String getDefaultValue() { return this.defaultValue; } @Override - public java.lang.String getAssertValue() { + public final java.lang.String getAssertValue() { return this.assertValue; } @Override - public java.lang.String getResult() { + public final java.lang.String getResult() { return this.result; } @Override - public java.lang.String getThat() { + public final java.lang.String getThat() { return this.that; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -16597,7 +17792,7 @@ public interface StructWithJavaReservedWords extends software.amazon.jsii.JsiiSe } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -16610,7 +17805,7 @@ public interface StructWithJavaReservedWords extends software.amazon.jsii.JsiiSe } @Override - public int hashCode() { + public final int hashCode() { int result = this.defaultValue.hashCode(); result = 31 * result + (this.assertValue != null ? this.assertValue.hashCode() : 0); result = 31 * result + (this.result != null ? this.result.hashCode() : 0); @@ -16657,7 +17852,7 @@ public class Sum extends software.amazon.jsii.tests.calculator.composition.Compo @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) 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); + return software.amazon.jsii.Kernel.get(this, "expression", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.lib.NumericValue.class)); } /** @@ -16665,7 +17860,7 @@ public class Sum extends software.amazon.jsii.tests.calculator.composition.Compo */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) 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)))); + return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "parts", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.lib.NumericValue.class)))); } /** @@ -16673,7 +17868,7 @@ public class Sum extends software.amazon.jsii.tests.calculator.composition.Compo */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setParts(final @org.jetbrains.annotations.NotNull java.util.List value) { - this.jsiiSet("parts", java.util.Objects.requireNonNull(value, "parts is required")); + software.amazon.jsii.Kernel.set(this, "parts", java.util.Objects.requireNonNull(value, "parts is required")); } } @@ -16715,14 +17910,14 @@ public class SupportsNiceJavaBuilder extends software.amazon.jsii.tests.calculat @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number getId() { - return this.jsiiGet("id", java.lang.Number.class); + return software.amazon.jsii.Kernel.get(this, "id", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.util.List getRest() { - return java.util.Collections.unmodifiableList(this.jsiiGet("rest", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)))); + return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "rest", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)))); } /** @@ -16892,6 +18087,7 @@ public interface SupportsNiceJavaBuilderProps extends software.amazon.jsii.JsiiS * An implementation for {@link SupportsNiceJavaBuilderProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements SupportsNiceJavaBuilderProps { private final java.lang.Number bar; private final java.lang.String id; @@ -16902,30 +18098,31 @@ public interface SupportsNiceJavaBuilderProps extends software.amazon.jsii.JsiiS */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.bar = this.jsiiGet("bar", java.lang.Number.class); - this.id = this.jsiiGet("id", java.lang.String.class); + this.bar = software.amazon.jsii.Kernel.get(this, "bar", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); + this.id = software.amazon.jsii.Kernel.get(this, "id", software.amazon.jsii.NativeType.forClass(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.Number bar, final java.lang.String id) { + protected Jsii$Proxy(final java.lang.Number bar, final java.lang.String id) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.bar = java.util.Objects.requireNonNull(bar, "bar is required"); this.id = id; } @Override - public java.lang.Number getBar() { + public final java.lang.Number getBar() { return this.bar; } @Override - public java.lang.String getId() { + public final java.lang.String getId() { return this.id; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -16946,7 +18143,7 @@ public interface SupportsNiceJavaBuilderProps extends software.amazon.jsii.JsiiS } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -16957,7 +18154,7 @@ public interface SupportsNiceJavaBuilderProps extends software.amazon.jsii.JsiiS } @Override - public int hashCode() { + public final int hashCode() { int result = this.bar.hashCode(); result = 31 * result + (this.id != null ? this.id.hashCode() : 0); return result; @@ -17000,7 +18197,7 @@ public class SupportsNiceJavaBuilderWithRequiredProps extends software.amazon.js */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number getBar() { - return this.jsiiGet("bar", java.lang.Number.class); + return software.amazon.jsii.Kernel.get(this, "bar", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** @@ -17008,14 +18205,14 @@ public class SupportsNiceJavaBuilderWithRequiredProps extends software.amazon.js */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number getId() { - return this.jsiiGet("id", java.lang.Number.class); + return software.amazon.jsii.Kernel.get(this, "id", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.Nullable java.lang.String getPropId() { - return this.jsiiGet("propId", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "propId", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** @@ -17112,14 +18309,14 @@ public class SyncVirtualMethods extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number callerIsAsync() { - return this.jsiiAsyncCall("callerIsAsync", java.lang.Number.class); + return software.amazon.jsii.Kernel.asyncCall(this, "callerIsAsync", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number callerIsMethod() { - return this.jsiiCall("callerIsMethod", java.lang.Number.class); + return software.amazon.jsii.Kernel.call(this, "callerIsMethod", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** @@ -17127,7 +18324,7 @@ public class SyncVirtualMethods extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void modifyOtherProperty(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiCall("modifyOtherProperty", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(value, "value is required") }); + software.amazon.jsii.Kernel.call(this, "modifyOtherProperty", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(value, "value is required") }); } /** @@ -17135,35 +18332,35 @@ public class SyncVirtualMethods extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void modifyValueOfTheProperty(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiCall("modifyValueOfTheProperty", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(value, "value is required") }); + software.amazon.jsii.Kernel.call(this, "modifyValueOfTheProperty", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(value, "value is required") }); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number readA() { - return this.jsiiCall("readA", java.lang.Number.class); + return software.amazon.jsii.Kernel.call(this, "readA", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String retrieveOtherProperty() { - return this.jsiiCall("retrieveOtherProperty", java.lang.String.class); + return software.amazon.jsii.Kernel.call(this, "retrieveOtherProperty", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String retrieveReadOnlyProperty() { - return this.jsiiCall("retrieveReadOnlyProperty", java.lang.String.class); + return software.amazon.jsii.Kernel.call(this, "retrieveReadOnlyProperty", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String retrieveValueOfTheProperty() { - return this.jsiiCall("retrieveValueOfTheProperty", java.lang.String.class); + return software.amazon.jsii.Kernel.call(this, "retrieveValueOfTheProperty", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** @@ -17171,7 +18368,7 @@ public class SyncVirtualMethods extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number virtualMethod(final @org.jetbrains.annotations.NotNull java.lang.Number n) { - return this.jsiiCall("virtualMethod", java.lang.Number.class, new Object[] { java.util.Objects.requireNonNull(n, "n is required") }); + return software.amazon.jsii.Kernel.call(this, "virtualMethod", software.amazon.jsii.NativeType.forClass(java.lang.Number.class), new Object[] { java.util.Objects.requireNonNull(n, "n is required") }); } /** @@ -17179,84 +18376,84 @@ public class SyncVirtualMethods extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void writeA(final @org.jetbrains.annotations.NotNull java.lang.Number value) { - this.jsiiCall("writeA", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(value, "value is required") }); + software.amazon.jsii.Kernel.call(this, "writeA", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(value, "value is required") }); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getReadonlyProperty() { - return this.jsiiGet("readonlyProperty", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "readonlyProperty", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number getA() { - return this.jsiiGet("a", java.lang.Number.class); + return software.amazon.jsii.Kernel.get(this, "a", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setA(final @org.jetbrains.annotations.NotNull java.lang.Number value) { - this.jsiiSet("a", java.util.Objects.requireNonNull(value, "a is required")); + software.amazon.jsii.Kernel.set(this, "a", java.util.Objects.requireNonNull(value, "a is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number getCallerIsProperty() { - return this.jsiiGet("callerIsProperty", java.lang.Number.class); + return software.amazon.jsii.Kernel.get(this, "callerIsProperty", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setCallerIsProperty(final @org.jetbrains.annotations.NotNull java.lang.Number value) { - this.jsiiSet("callerIsProperty", java.util.Objects.requireNonNull(value, "callerIsProperty is required")); + software.amazon.jsii.Kernel.set(this, "callerIsProperty", java.util.Objects.requireNonNull(value, "callerIsProperty is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getOtherProperty() { - return this.jsiiGet("otherProperty", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "otherProperty", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setOtherProperty(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiSet("otherProperty", java.util.Objects.requireNonNull(value, "otherProperty is required")); + software.amazon.jsii.Kernel.set(this, "otherProperty", java.util.Objects.requireNonNull(value, "otherProperty is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getTheProperty() { - return this.jsiiGet("theProperty", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "theProperty", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setTheProperty(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiSet("theProperty", java.util.Objects.requireNonNull(value, "theProperty is required")); + software.amazon.jsii.Kernel.set(this, "theProperty", java.util.Objects.requireNonNull(value, "theProperty is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getValueOfOtherProperty() { - return this.jsiiGet("valueOfOtherProperty", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "valueOfOtherProperty", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setValueOfOtherProperty(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiSet("valueOfOtherProperty", java.util.Objects.requireNonNull(value, "valueOfOtherProperty is required")); + software.amazon.jsii.Kernel.set(this, "valueOfOtherProperty", java.util.Objects.requireNonNull(value, "valueOfOtherProperty is required")); } } @@ -17292,7 +18489,7 @@ public class Thrower extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void throwError() { - this.jsiiCall("throwError", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "throwError", software.amazon.jsii.NativeType.VOID); } } @@ -17405,6 +18602,7 @@ public interface TopLevelStruct extends software.amazon.jsii.JsiiSerializable { * An implementation for {@link TopLevelStruct} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements TopLevelStruct { private final java.lang.String required; private final java.lang.Object secondLevel; @@ -17416,15 +18614,15 @@ public interface TopLevelStruct extends software.amazon.jsii.JsiiSerializable { */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.required = this.jsiiGet("required", java.lang.String.class); - this.secondLevel = this.jsiiGet("secondLevel", java.lang.Object.class); - this.optional = this.jsiiGet("optional", java.lang.String.class); + this.required = software.amazon.jsii.Kernel.get(this, "required", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + this.secondLevel = software.amazon.jsii.Kernel.get(this, "secondLevel", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); + this.optional = software.amazon.jsii.Kernel.get(this, "optional", software.amazon.jsii.NativeType.forClass(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 required, final java.lang.Object secondLevel, final java.lang.String optional) { + protected Jsii$Proxy(final java.lang.String required, final java.lang.Object secondLevel, final java.lang.String optional) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.required = java.util.Objects.requireNonNull(required, "required is required"); this.secondLevel = java.util.Objects.requireNonNull(secondLevel, "secondLevel is required"); @@ -17432,21 +18630,22 @@ public interface TopLevelStruct extends software.amazon.jsii.JsiiSerializable { } @Override - public java.lang.String getRequired() { + public final java.lang.String getRequired() { return this.required; } @Override - public java.lang.Object getSecondLevel() { + public final java.lang.Object getSecondLevel() { return this.secondLevel; } @Override - public java.lang.String getOptional() { + public final java.lang.String getOptional() { return this.optional; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -17468,7 +18667,7 @@ public interface TopLevelStruct extends software.amazon.jsii.JsiiSerializable { } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -17480,7 +18679,7 @@ public interface TopLevelStruct extends software.amazon.jsii.JsiiSerializable { } @Override - public int hashCode() { + public final int hashCode() { int result = this.required.hashCode(); result = 31 * result + (this.secondLevel.hashCode()); result = 31 * result + (this.optional != null ? this.optional.hashCode() : 0); @@ -17517,7 +18716,7 @@ public class UmaskCheck extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.Number mode() { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.UmaskCheck.class, "mode", java.lang.Number.class); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.UmaskCheck.class, "mode", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } } @@ -17555,13 +18754,14 @@ public abstract class UnaryOperation extends software.amazon.jsii.tests.calculat */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) 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); + return software.amazon.jsii.Kernel.get(this, "operand", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.lib.NumericValue.class)); } /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.tests.calculator.UnaryOperation { + @software.amazon.jsii.Internal + private static final class Jsii$Proxy extends software.amazon.jsii.tests.calculator.UnaryOperation { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -17572,8 +18772,8 @@ public abstract class UnaryOperation extends software.amazon.jsii.tests.calculat @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); + public final @org.jetbrains.annotations.NotNull java.lang.Number getValue() { + return software.amazon.jsii.Kernel.get(this, "value", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** @@ -17582,8 +18782,8 @@ public abstract class UnaryOperation extends software.amazon.jsii.tests.calculat @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated @Override - public @org.jetbrains.annotations.NotNull java.lang.String toString() { - return this.jsiiCall("toString", java.lang.String.class); + public final @org.jetbrains.annotations.NotNull java.lang.String toString() { + return software.amazon.jsii.Kernel.call(this, "toString", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } } } @@ -17699,6 +18899,7 @@ public interface UnionProperties extends software.amazon.jsii.JsiiSerializable { * An implementation for {@link UnionProperties} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements UnionProperties { private final java.lang.Object bar; private final java.lang.Object foo; @@ -17709,30 +18910,31 @@ public interface UnionProperties extends software.amazon.jsii.JsiiSerializable { */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.bar = this.jsiiGet("bar", java.lang.Object.class); - this.foo = this.jsiiGet("foo", java.lang.Object.class); + this.bar = software.amazon.jsii.Kernel.get(this, "bar", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); + this.foo = software.amazon.jsii.Kernel.get(this, "foo", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ - private Jsii$Proxy(final java.lang.Object bar, final java.lang.Object foo) { + protected Jsii$Proxy(final java.lang.Object bar, final java.lang.Object foo) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.bar = java.util.Objects.requireNonNull(bar, "bar is required"); this.foo = foo; } @Override - public java.lang.Object getBar() { + public final java.lang.Object getBar() { return this.bar; } @Override - public java.lang.Object getFoo() { + public final java.lang.Object getFoo() { return this.foo; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -17753,7 +18955,7 @@ public interface UnionProperties extends software.amazon.jsii.JsiiSerializable { } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -17764,7 +18966,7 @@ public interface UnionProperties extends software.amazon.jsii.JsiiSerializable { } @Override - public int hashCode() { + public final int hashCode() { int result = this.bar.hashCode(); result = 31 * result + (this.foo != null ? this.foo.hashCode() : 0); return result; @@ -17794,7 +18996,7 @@ public class UpcasingReflectable extends software.amazon.jsii.JsiiObject impleme } static { - REFLECTOR = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.jsii.tests.calculator.UpcasingReflectable.class, "reflector", software.amazon.jsii.tests.calculator.custom_submodule_name.Reflector.class); + REFLECTOR = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.jsii.tests.calculator.UpcasingReflectable.class, "reflector", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.custom_submodule_name.Reflector.class)); } /** @@ -17816,7 +19018,7 @@ public class UpcasingReflectable extends software.amazon.jsii.JsiiObject impleme @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.util.List getEntries() { - return java.util.Collections.unmodifiableList(this.jsiiGet("entries", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.custom_submodule_name.ReflectableEntry.class)))); + return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "entries", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.custom_submodule_name.ReflectableEntry.class)))); } } @@ -17852,7 +19054,7 @@ public class UseBundledDependency extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Object value() { - return this.jsiiCall("value", java.lang.Object.class); + return software.amazon.jsii.Kernel.call(this, "value", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); } } @@ -17889,7 +19091,7 @@ public class UseCalcBase extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.base.Base hello() { - return this.jsiiCall("hello", software.amazon.jsii.tests.calculator.base.Base.class); + return software.amazon.jsii.Kernel.call(this, "hello", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.base.Base.class)); } } @@ -17926,7 +19128,7 @@ public class UsesInterfaceWithProperties extends software.amazon.jsii.JsiiObject */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String justRead() { - return this.jsiiCall("justRead", java.lang.String.class); + return software.amazon.jsii.Kernel.call(this, "justRead", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** @@ -17934,7 +19136,7 @@ public class UsesInterfaceWithProperties extends software.amazon.jsii.JsiiObject */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String readStringAndNumber(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.IInterfaceWithPropertiesExtension ext) { - return this.jsiiCall("readStringAndNumber", java.lang.String.class, new Object[] { java.util.Objects.requireNonNull(ext, "ext is required") }); + return software.amazon.jsii.Kernel.call(this, "readStringAndNumber", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(ext, "ext is required") }); } /** @@ -17942,14 +19144,14 @@ public class UsesInterfaceWithProperties extends software.amazon.jsii.JsiiObject */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String writeAndRead(final @org.jetbrains.annotations.NotNull java.lang.String value) { - return this.jsiiCall("writeAndRead", java.lang.String.class, new Object[] { java.util.Objects.requireNonNull(value, "value is required") }); + return software.amazon.jsii.Kernel.call(this, "writeAndRead", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(value, "value is required") }); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.IInterfaceWithProperties getObj() { - return this.jsiiGet("obj", software.amazon.jsii.tests.calculator.IInterfaceWithProperties.class); + return software.amazon.jsii.Kernel.get(this, "obj", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.IInterfaceWithProperties.class)); } } @@ -17987,7 +19189,7 @@ public class VariadicInvoker extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.util.List asArray(final @org.jetbrains.annotations.NotNull java.lang.Number... values) { - return java.util.Collections.unmodifiableList(this.jsiiCall("asArray", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.Number.class)), java.util.Arrays.stream(values).toArray(Object[]::new))); + return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.call(this, "asArray", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.Number.class)), java.util.Arrays.stream(values).toArray(Object[]::new))); } } @@ -18026,7 +19228,7 @@ public class VariadicMethod extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.util.List asArray(final @org.jetbrains.annotations.NotNull java.lang.Number first, final @org.jetbrains.annotations.NotNull java.lang.Number... others) { - return java.util.Collections.unmodifiableList(this.jsiiCall("asArray", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.Number.class)), java.util.stream.Stream.concat(java.util.Arrays.stream(new Object[] { java.util.Objects.requireNonNull(first, "first is required") }), java.util.Arrays.stream(others)).toArray(Object[]::new))); + return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.call(this, "asArray", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.Number.class)), java.util.stream.Stream.concat(java.util.Arrays.stream(new Object[] { java.util.Objects.requireNonNull(first, "first is required") }), java.util.Arrays.stream(others)).toArray(Object[]::new))); } } @@ -18063,7 +19265,7 @@ public class VirtualMethodPlayground extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number overrideMeAsync(final @org.jetbrains.annotations.NotNull java.lang.Number index) { - return this.jsiiAsyncCall("overrideMeAsync", java.lang.Number.class, new Object[] { java.util.Objects.requireNonNull(index, "index is required") }); + return software.amazon.jsii.Kernel.asyncCall(this, "overrideMeAsync", software.amazon.jsii.NativeType.forClass(java.lang.Number.class), new Object[] { java.util.Objects.requireNonNull(index, "index is required") }); } /** @@ -18071,7 +19273,7 @@ public class VirtualMethodPlayground extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number overrideMeSync(final @org.jetbrains.annotations.NotNull java.lang.Number index) { - return this.jsiiCall("overrideMeSync", java.lang.Number.class, new Object[] { java.util.Objects.requireNonNull(index, "index is required") }); + return software.amazon.jsii.Kernel.call(this, "overrideMeSync", software.amazon.jsii.NativeType.forClass(java.lang.Number.class), new Object[] { java.util.Objects.requireNonNull(index, "index is required") }); } /** @@ -18079,7 +19281,7 @@ public class VirtualMethodPlayground extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number parallelSumAsync(final @org.jetbrains.annotations.NotNull java.lang.Number count) { - return this.jsiiAsyncCall("parallelSumAsync", java.lang.Number.class, new Object[] { java.util.Objects.requireNonNull(count, "count is required") }); + return software.amazon.jsii.Kernel.asyncCall(this, "parallelSumAsync", software.amazon.jsii.NativeType.forClass(java.lang.Number.class), new Object[] { java.util.Objects.requireNonNull(count, "count is required") }); } /** @@ -18087,7 +19289,7 @@ public class VirtualMethodPlayground extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number serialSumAsync(final @org.jetbrains.annotations.NotNull java.lang.Number count) { - return this.jsiiAsyncCall("serialSumAsync", java.lang.Number.class, new Object[] { java.util.Objects.requireNonNull(count, "count is required") }); + return software.amazon.jsii.Kernel.asyncCall(this, "serialSumAsync", software.amazon.jsii.NativeType.forClass(java.lang.Number.class), new Object[] { java.util.Objects.requireNonNull(count, "count is required") }); } /** @@ -18095,7 +19297,7 @@ public class VirtualMethodPlayground extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number sumSync(final @org.jetbrains.annotations.NotNull java.lang.Number count) { - return this.jsiiCall("sumSync", java.lang.Number.class, new Object[] { java.util.Objects.requireNonNull(count, "count is required") }); + return software.amazon.jsii.Kernel.call(this, "sumSync", software.amazon.jsii.NativeType.forClass(java.lang.Number.class), new Object[] { java.util.Objects.requireNonNull(count, "count is required") }); } } @@ -18138,7 +19340,7 @@ public abstract class VoidCallback extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void callMe() { - this.jsiiCall("callMe", software.amazon.jsii.NativeType.VOID); + software.amazon.jsii.Kernel.call(this, "callMe", software.amazon.jsii.NativeType.VOID); } /** @@ -18150,13 +19352,14 @@ public abstract class VoidCallback extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Boolean getMethodWasCalled() { - return this.jsiiGet("methodWasCalled", java.lang.Boolean.class); + return software.amazon.jsii.Kernel.get(this, "methodWasCalled", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); } /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.tests.calculator.VoidCallback { + @software.amazon.jsii.Internal + private static final class Jsii$Proxy extends software.amazon.jsii.tests.calculator.VoidCallback { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -18165,8 +19368,8 @@ public abstract class VoidCallback extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - protected void overrideMe() { - this.jsiiCall("overrideMe", software.amazon.jsii.NativeType.VOID); + protected final void overrideMe() { + software.amazon.jsii.Kernel.call(this, "overrideMe", software.amazon.jsii.NativeType.VOID); } } } @@ -18213,7 +19416,7 @@ public class WithPrivatePropertyInConstructor extends software.amazon.jsii.JsiiO */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Boolean getSuccess() { - return this.jsiiGet("success", java.lang.Boolean.class); + return software.amazon.jsii.Kernel.get(this, "success", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); } } @@ -18249,7 +19452,7 @@ public abstract class CompositeOperation extends software.amazon.jsii.tests.calc @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public @org.jetbrains.annotations.NotNull java.lang.String toString() { - return this.jsiiCall("toString", java.lang.String.class); + return software.amazon.jsii.Kernel.call(this, "toString", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** @@ -18266,7 +19469,7 @@ public abstract class CompositeOperation extends software.amazon.jsii.tests.calc @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.Number getValue() { - return this.jsiiGet("value", java.lang.Number.class); + return software.amazon.jsii.Kernel.get(this, "value", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** @@ -18274,7 +19477,7 @@ public abstract class CompositeOperation extends software.amazon.jsii.tests.calc */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.util.List getDecorationPostfixes() { - return java.util.Collections.unmodifiableList(this.jsiiGet("decorationPostfixes", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)))); + return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "decorationPostfixes", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)))); } /** @@ -18282,7 +19485,7 @@ public abstract class CompositeOperation extends software.amazon.jsii.tests.calc */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setDecorationPostfixes(final @org.jetbrains.annotations.NotNull java.util.List value) { - this.jsiiSet("decorationPostfixes", java.util.Objects.requireNonNull(value, "decorationPostfixes is required")); + software.amazon.jsii.Kernel.set(this, "decorationPostfixes", java.util.Objects.requireNonNull(value, "decorationPostfixes is required")); } /** @@ -18290,7 +19493,7 @@ public abstract class CompositeOperation extends software.amazon.jsii.tests.calc */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.util.List getDecorationPrefixes() { - return java.util.Collections.unmodifiableList(this.jsiiGet("decorationPrefixes", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)))); + return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "decorationPrefixes", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)))); } /** @@ -18298,7 +19501,7 @@ public abstract class CompositeOperation extends software.amazon.jsii.tests.calc */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setDecorationPrefixes(final @org.jetbrains.annotations.NotNull java.util.List value) { - this.jsiiSet("decorationPrefixes", java.util.Objects.requireNonNull(value, "decorationPrefixes is required")); + software.amazon.jsii.Kernel.set(this, "decorationPrefixes", java.util.Objects.requireNonNull(value, "decorationPrefixes is required")); } /** @@ -18306,7 +19509,7 @@ public abstract class CompositeOperation extends software.amazon.jsii.tests.calc */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.composition.CompositeOperation.CompositionStringStyle getStringStyle() { - return this.jsiiGet("stringStyle", software.amazon.jsii.tests.calculator.composition.CompositeOperation.CompositionStringStyle.class); + return software.amazon.jsii.Kernel.get(this, "stringStyle", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.composition.CompositeOperation.CompositionStringStyle.class)); } /** @@ -18314,7 +19517,7 @@ public abstract class CompositeOperation extends software.amazon.jsii.tests.calc */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setStringStyle(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.composition.CompositeOperation.CompositionStringStyle value) { - this.jsiiSet("stringStyle", java.util.Objects.requireNonNull(value, "stringStyle is required")); + software.amazon.jsii.Kernel.set(this, "stringStyle", java.util.Objects.requireNonNull(value, "stringStyle is required")); } /** * Style of .toString() output for CompositeOperation. @@ -18337,7 +19540,8 @@ public abstract class CompositeOperation extends software.amazon.jsii.tests.calc /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.tests.calculator.composition.CompositeOperation { + @software.amazon.jsii.Internal + private static final class Jsii$Proxy extends software.amazon.jsii.tests.calculator.composition.CompositeOperation { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -18349,28 +19553,8 @@ public abstract class CompositeOperation extends software.amazon.jsii.tests.calc */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - 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); - } - - /** - * (deprecated) 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); - } - - /** - * (deprecated) String representation of the value. - */ - @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) - @Deprecated - @Override - public @org.jetbrains.annotations.NotNull java.lang.String toString() { - return this.jsiiCall("toString", java.lang.String.class); + public final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.lib.NumericValue getExpression() { + return software.amazon.jsii.Kernel.get(this, "expression", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.lib.NumericValue.class)); } } } @@ -18407,14 +19591,14 @@ public class Base extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getProp() { - return this.jsiiGet("prop", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "prop", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setProp(final @org.jetbrains.annotations.NotNull java.lang.String value) { - this.jsiiSet("prop", java.util.Objects.requireNonNull(value, "prop is required")); + software.amazon.jsii.Kernel.set(this, "prop", java.util.Objects.requireNonNull(value, "prop is required")); } } @@ -18479,14 +19663,14 @@ public class Foo extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.Nullable java.lang.String getBar() { - return this.jsiiGet("bar", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "bar", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setBar(final @org.jetbrains.annotations.Nullable java.lang.String value) { - this.jsiiSet("bar", value); + software.amazon.jsii.Kernel.set(this, "bar", value); } } @@ -18549,6 +19733,7 @@ public interface Hello extends software.amazon.jsii.JsiiSerializable { * An implementation for {@link Hello} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements Hello { private final java.lang.Number foo; @@ -18558,23 +19743,24 @@ public interface Hello extends software.amazon.jsii.JsiiSerializable { */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.foo = this.jsiiGet("foo", java.lang.Number.class); + this.foo = software.amazon.jsii.Kernel.get(this, "foo", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ - private Jsii$Proxy(final java.lang.Number foo) { + protected Jsii$Proxy(final java.lang.Number foo) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.foo = java.util.Objects.requireNonNull(foo, "foo is required"); } @Override - public java.lang.Number getFoo() { + public final java.lang.Number getFoo() { return this.foo; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -18592,7 +19778,7 @@ public interface Hello extends software.amazon.jsii.JsiiSerializable { } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -18602,7 +19788,7 @@ public interface Hello extends software.amazon.jsii.JsiiSerializable { } @Override - public int hashCode() { + public final int hashCode() { int result = this.foo.hashCode(); return result; } @@ -18668,6 +19854,7 @@ public interface Hello extends software.amazon.jsii.JsiiSerializable { * An implementation for {@link Hello} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements Hello { private final java.lang.Number foo; @@ -18677,23 +19864,24 @@ public interface Hello extends software.amazon.jsii.JsiiSerializable { */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.foo = this.jsiiGet("foo", java.lang.Number.class); + this.foo = software.amazon.jsii.Kernel.get(this, "foo", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ - private Jsii$Proxy(final java.lang.Number foo) { + protected Jsii$Proxy(final java.lang.Number foo) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.foo = java.util.Objects.requireNonNull(foo, "foo is required"); } @Override - public java.lang.Number getFoo() { + public final java.lang.Number getFoo() { return this.foo; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -18711,7 +19899,7 @@ public interface Hello extends software.amazon.jsii.JsiiSerializable { } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -18721,7 +19909,7 @@ public interface Hello extends software.amazon.jsii.JsiiSerializable { } @Override - public int hashCode() { + public final int hashCode() { int result = this.foo.hashCode(); return result; } @@ -18797,14 +19985,14 @@ public class ClassWithSelf extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String method(final @org.jetbrains.annotations.NotNull java.lang.Number self) { - return this.jsiiCall("method", java.lang.String.class, new Object[] { java.util.Objects.requireNonNull(self, "self is required") }); + return software.amazon.jsii.Kernel.call(this, "method", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(self, "self is required") }); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getSelf() { - return this.jsiiGet("self", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "self", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } } @@ -18841,7 +20029,7 @@ public class ClassWithSelfKwarg extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.python_self.StructWithSelf getProps() { - return this.jsiiGet("props", software.amazon.jsii.tests.calculator.python_self.StructWithSelf.class); + return software.amazon.jsii.Kernel.get(this, "props", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.python_self.StructWithSelf.class)); } /** @@ -18908,7 +20096,8 @@ public interface IInterfaceWithSelf extends software.amazon.jsii.JsiiSerializabl /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.python_self.IInterfaceWithSelf { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.python_self.IInterfaceWithSelf.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -18918,8 +20107,24 @@ public interface IInterfaceWithSelf extends software.amazon.jsii.JsiiSerializabl */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override - public @org.jetbrains.annotations.NotNull java.lang.String method(final @org.jetbrains.annotations.NotNull java.lang.Number self) { - return this.jsiiCall("method", java.lang.String.class, new Object[] { java.util.Objects.requireNonNull(self, "self is required") }); + public final @org.jetbrains.annotations.NotNull java.lang.String method(final @org.jetbrains.annotations.NotNull java.lang.Number self) { + return software.amazon.jsii.Kernel.call(this, "method", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(self, "self is required") }); + } + } + + /** + * Internal default implementation for {@link IInterfaceWithSelf}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IInterfaceWithSelf { + + /** + * @param self This parameter is required. + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @Override + default @org.jetbrains.annotations.NotNull java.lang.String method(final @org.jetbrains.annotations.NotNull java.lang.Number self) { + return software.amazon.jsii.Kernel.call(this, "method", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(self, "self is required") }); } } } @@ -18983,6 +20188,7 @@ public interface StructWithSelf extends software.amazon.jsii.JsiiSerializable { * An implementation for {@link StructWithSelf} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements StructWithSelf { private final java.lang.String self; @@ -18992,23 +20198,24 @@ public interface StructWithSelf extends software.amazon.jsii.JsiiSerializable { */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.self = this.jsiiGet("self", java.lang.String.class); + this.self = software.amazon.jsii.Kernel.get(this, "self", software.amazon.jsii.NativeType.forClass(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 self) { + protected Jsii$Proxy(final java.lang.String self) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.self = java.util.Objects.requireNonNull(self, "self is required"); } @Override - public java.lang.String getSelf() { + public final java.lang.String getSelf() { return this.self; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -19026,7 +20233,7 @@ public interface StructWithSelf extends software.amazon.jsii.JsiiSerializable { } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -19036,7 +20243,7 @@ public interface StructWithSelf extends software.amazon.jsii.JsiiSerializable { } @Override - public int hashCode() { + public final int hashCode() { int result = this.self.hashCode(); return result; } @@ -19072,11 +20279,19 @@ public class MyClass extends software.amazon.jsii.JsiiObject implements software software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(props, "props is required") }); } + /** + * @param param This parameter is required. + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public @org.jetbrains.annotations.NotNull java.lang.String methodWithSpecialParam(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.submodule.param.SpecialParameter param) { + return software.amazon.jsii.Kernel.call(this, "methodWithSpecialParam", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(param, "param is required") }); + } + /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.submodule.child.Awesomeness getAwesomeness() { - return this.jsiiGet("awesomeness", software.amazon.jsii.tests.calculator.submodule.child.Awesomeness.class); + return software.amazon.jsii.Kernel.get(this, "awesomeness", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.submodule.child.Awesomeness.class)); } /** @@ -19084,35 +20299,35 @@ public class MyClass extends software.amazon.jsii.JsiiObject implements software @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getDefinedAt() { - return this.jsiiGet("definedAt", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "definedAt", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.submodule.child.Goodness getGoodness() { - return this.jsiiGet("goodness", software.amazon.jsii.tests.calculator.submodule.child.Goodness.class); + return software.amazon.jsii.Kernel.get(this, "goodness", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.submodule.child.Goodness.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.submodule.child.SomeStruct getProps() { - return this.jsiiGet("props", software.amazon.jsii.tests.calculator.submodule.child.SomeStruct.class); + return software.amazon.jsii.Kernel.get(this, "props", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.submodule.child.SomeStruct.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.Nullable software.amazon.jsii.tests.calculator.AllTypes getAllTypes() { - return this.jsiiGet("allTypes", software.amazon.jsii.tests.calculator.AllTypes.class); + return software.amazon.jsii.Kernel.get(this, "allTypes", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.AllTypes.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setAllTypes(final @org.jetbrains.annotations.Nullable software.amazon.jsii.tests.calculator.AllTypes value) { - this.jsiiSet("allTypes", value); + software.amazon.jsii.Kernel.set(this, "allTypes", value); } /** @@ -19216,6 +20431,7 @@ public interface MyClassReference extends software.amazon.jsii.JsiiSerializable * An implementation for {@link MyClassReference} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements MyClassReference { private final software.amazon.jsii.tests.calculator.submodule.MyClass reference; @@ -19225,23 +20441,24 @@ public interface MyClassReference extends software.amazon.jsii.JsiiSerializable */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.reference = this.jsiiGet("reference", software.amazon.jsii.tests.calculator.submodule.MyClass.class); + this.reference = software.amazon.jsii.Kernel.get(this, "reference", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.submodule.MyClass.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ - private Jsii$Proxy(final software.amazon.jsii.tests.calculator.submodule.MyClass reference) { + protected Jsii$Proxy(final software.amazon.jsii.tests.calculator.submodule.MyClass reference) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.reference = java.util.Objects.requireNonNull(reference, "reference is required"); } @Override - public software.amazon.jsii.tests.calculator.submodule.MyClass getReference() { + public final software.amazon.jsii.tests.calculator.submodule.MyClass getReference() { return this.reference; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -19259,7 +20476,7 @@ public interface MyClassReference extends software.amazon.jsii.JsiiSerializable } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -19269,7 +20486,7 @@ public interface MyClassReference extends software.amazon.jsii.JsiiSerializable } @Override - public int hashCode() { + public final int hashCode() { int result = this.reference.hashCode(); return result; } @@ -19343,7 +20560,7 @@ public class InnerClass extends software.amazon.jsii.JsiiObject { } static { - STATIC_PROP = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.jsii.tests.calculator.submodule.child.InnerClass.class, "staticProp", software.amazon.jsii.tests.calculator.submodule.child.SomeStruct.class); + STATIC_PROP = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.jsii.tests.calculator.submodule.child.InnerClass.class, "staticProp", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.submodule.child.SomeStruct.class)); } /** @@ -19433,6 +20650,7 @@ public interface KwargsProps extends software.amazon.jsii.JsiiSerializable, soft * An implementation for {@link KwargsProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements KwargsProps { private final java.lang.String extra; private final software.amazon.jsii.tests.calculator.submodule.child.SomeEnum prop; @@ -19443,30 +20661,31 @@ public interface KwargsProps extends software.amazon.jsii.JsiiSerializable, soft */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.extra = this.jsiiGet("extra", java.lang.String.class); - this.prop = this.jsiiGet("prop", software.amazon.jsii.tests.calculator.submodule.child.SomeEnum.class); + this.extra = software.amazon.jsii.Kernel.get(this, "extra", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + this.prop = software.amazon.jsii.Kernel.get(this, "prop", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.submodule.child.SomeEnum.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ - private Jsii$Proxy(final java.lang.String extra, final software.amazon.jsii.tests.calculator.submodule.child.SomeEnum prop) { + protected Jsii$Proxy(final java.lang.String extra, final software.amazon.jsii.tests.calculator.submodule.child.SomeEnum prop) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.extra = extra; this.prop = java.util.Objects.requireNonNull(prop, "prop is required"); } @Override - public java.lang.String getExtra() { + public final java.lang.String getExtra() { return this.extra; } @Override - public software.amazon.jsii.tests.calculator.submodule.child.SomeEnum getProp() { + public final software.amazon.jsii.tests.calculator.submodule.child.SomeEnum getProp() { return this.prop; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -19487,7 +20706,7 @@ public interface KwargsProps extends software.amazon.jsii.JsiiSerializable, soft } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -19498,7 +20717,7 @@ public interface KwargsProps extends software.amazon.jsii.JsiiSerializable, soft } @Override - public int hashCode() { + public final int hashCode() { int result = this.extra != null ? this.extra.hashCode() : 0; result = 31 * result + (this.prop.hashCode()); return result; @@ -19541,7 +20760,7 @@ public class OuterClass extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.submodule.child.InnerClass getInnerClass() { - return this.jsiiGet("innerClass", software.amazon.jsii.tests.calculator.submodule.child.InnerClass.class); + return software.amazon.jsii.Kernel.get(this, "innerClass", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.submodule.child.InnerClass.class)); } } @@ -19621,6 +20840,7 @@ public interface SomeStruct extends software.amazon.jsii.JsiiSerializable { * An implementation for {@link SomeStruct} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements SomeStruct { private final software.amazon.jsii.tests.calculator.submodule.child.SomeEnum prop; @@ -19630,23 +20850,24 @@ public interface SomeStruct extends software.amazon.jsii.JsiiSerializable { */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.prop = this.jsiiGet("prop", software.amazon.jsii.tests.calculator.submodule.child.SomeEnum.class); + this.prop = software.amazon.jsii.Kernel.get(this, "prop", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.submodule.child.SomeEnum.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ - private Jsii$Proxy(final software.amazon.jsii.tests.calculator.submodule.child.SomeEnum prop) { + protected Jsii$Proxy(final software.amazon.jsii.tests.calculator.submodule.child.SomeEnum prop) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.prop = java.util.Objects.requireNonNull(prop, "prop is required"); } @Override - public software.amazon.jsii.tests.calculator.submodule.child.SomeEnum getProp() { + public final software.amazon.jsii.tests.calculator.submodule.child.SomeEnum getProp() { return this.prop; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -19664,7 +20885,7 @@ public interface SomeStruct extends software.amazon.jsii.JsiiSerializable { } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -19674,7 +20895,7 @@ public interface SomeStruct extends software.amazon.jsii.JsiiSerializable { } @Override - public int hashCode() { + public final int hashCode() { int result = this.prop.hashCode(); return result; } @@ -19740,6 +20961,7 @@ public interface Structure extends software.amazon.jsii.JsiiSerializable { * An implementation for {@link Structure} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements Structure { private final java.lang.Boolean bool; @@ -19749,23 +20971,24 @@ public interface Structure extends software.amazon.jsii.JsiiSerializable { */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); - this.bool = this.jsiiGet("bool", java.lang.Boolean.class); + this.bool = software.amazon.jsii.Kernel.get(this, "bool", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ - private Jsii$Proxy(final java.lang.Boolean bool) { + protected Jsii$Proxy(final java.lang.Boolean bool) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.bool = java.util.Objects.requireNonNull(bool, "bool is required"); } @Override - public java.lang.Boolean getBool() { + public final java.lang.Boolean getBool() { return this.bool; } @Override + @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); @@ -19783,7 +21006,7 @@ public interface Structure extends software.amazon.jsii.JsiiSerializable { } @Override - public boolean equals(Object o) { + public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; @@ -19793,7 +21016,7 @@ public interface Structure extends software.amazon.jsii.JsiiSerializable { } @Override - public int hashCode() { + public final int hashCode() { int result = this.bool.hashCode(); return result; } @@ -19826,14 +21049,14 @@ public class Kwargs extends software.amazon.jsii.JsiiObject { */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.Boolean method(final @org.jetbrains.annotations.Nullable software.amazon.jsii.tests.calculator.submodule.child.KwargsProps props) { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.submodule.isolated.Kwargs.class, "method", java.lang.Boolean.class, new Object[] { props }); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.submodule.isolated.Kwargs.class, "method", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class), new Object[] { props }); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull java.lang.Boolean method() { - return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.submodule.isolated.Kwargs.class, "method", java.lang.Boolean.class); + return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.submodule.isolated.Kwargs.class, "method", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); } } @@ -19862,7 +21085,7 @@ public abstract class Namespaced extends software.amazon.jsii.JsiiObject impleme @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getDefinedAt() { - return this.jsiiGet("definedAt", java.lang.String.class); + return software.amazon.jsii.Kernel.get(this, "definedAt", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** @@ -19873,7 +21096,8 @@ public abstract class Namespaced extends software.amazon.jsii.JsiiObject impleme /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.tests.calculator.submodule.nested_submodule.Namespaced { + @software.amazon.jsii.Internal + private static final class Jsii$Proxy extends software.amazon.jsii.tests.calculator.submodule.nested_submodule.Namespaced implements software.amazon.jsii.tests.calculator.submodule.nested_submodule.deeply_nested.INamespaced.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -19882,16 +21106,8 @@ public abstract class Namespaced extends software.amazon.jsii.JsiiObject impleme */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.submodule.child.Goodness getGoodness() { - return this.jsiiGet("goodness", software.amazon.jsii.tests.calculator.submodule.child.Goodness.class); - } - - /** - */ - @Override - @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public @org.jetbrains.annotations.NotNull java.lang.String getDefinedAt() { - return this.jsiiGet("definedAt", java.lang.String.class); + public final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.submodule.child.Goodness getGoodness() { + return software.amazon.jsii.Kernel.get(this, "goodness", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.submodule.child.Goodness.class)); } } } @@ -19917,7 +21133,8 @@ public interface INamespaced extends software.amazon.jsii.JsiiSerializable { /** * A proxy class which represents a concrete javascript instance of this type. */ - final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.submodule.nested_submodule.deeply_nested.INamespaced { + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.submodule.nested_submodule.deeply_nested.INamespaced.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } @@ -19926,14 +21143,186 @@ public interface INamespaced extends software.amazon.jsii.JsiiSerializable { */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) - public @org.jetbrains.annotations.NotNull java.lang.String getDefinedAt() { - return this.jsiiGet("definedAt", java.lang.String.class); + public final @org.jetbrains.annotations.NotNull java.lang.String getDefinedAt() { + return software.amazon.jsii.Kernel.get(this, "definedAt", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + } + } + + /** + * Internal default implementation for {@link INamespaced}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends INamespaced { + + /** + */ + @Override + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + default @org.jetbrains.annotations.NotNull java.lang.String getDefinedAt() { + return software.amazon.jsii.Kernel.get(this, "definedAt", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + } + } +} + +`; + +exports[`Generated code for "jsii-calc": /java/src/main/java/software/amazon/jsii/tests/calculator/submodule/param/SpecialParameter.java 1`] = ` +package software.amazon.jsii.tests.calculator.submodule.param; + +/** + */ +@javax.annotation.Generated(value = "jsii-pacmak") +@software.amazon.jsii.Jsii(module = software.amazon.jsii.tests.calculator.$Module.class, fqn = "jsii-calc.submodule.param.SpecialParameter") +@software.amazon.jsii.Jsii.Proxy(SpecialParameter.Jsii$Proxy.class) +@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) +public interface SpecialParameter extends software.amazon.jsii.JsiiSerializable { + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @org.jetbrains.annotations.NotNull java.lang.String getValue(); + + /** + * @return a {@link Builder} of {@link SpecialParameter} + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + static Builder builder() { + return new Builder(); + } + /** + * A builder for {@link SpecialParameter} + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public static final class Builder implements software.amazon.jsii.Builder { + private java.lang.String value; + + /** + * Sets the value of {@link SpecialParameter#getValue} + * @param value the value to be set. This parameter is required. + * @return {@code this} + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public Builder value(java.lang.String value) { + this.value = value; + return this; + } + + /** + * Builds the configured instance. + * @return a new instance of {@link SpecialParameter} + * @throws NullPointerException if any required attribute was not provided + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @Override + public SpecialParameter build() { + return new Jsii$Proxy(value); + } + } + + /** + * An implementation for {@link SpecialParameter} + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @software.amazon.jsii.Internal + final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements SpecialParameter { + private final java.lang.String value; + + /** + * 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.value = software.amazon.jsii.Kernel.get(this, "value", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); + } + + /** + * Constructor that initializes the object based on literal property values passed by the {@link Builder}. + */ + protected Jsii$Proxy(final java.lang.String value) { + super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); + this.value = java.util.Objects.requireNonNull(value, "value is required"); + } + + @Override + public final java.lang.String getValue() { + return this.value; + } + + @Override + @software.amazon.jsii.Internal + public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { + final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; + final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); + + data.set("value", om.valueToTree(this.getValue())); + + final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); + struct.set("fqn", om.valueToTree("jsii-calc.submodule.param.SpecialParameter")); + struct.set("data", data); + + final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); + obj.set("$jsii.struct", struct); + + return obj; + } + + @Override + public final boolean equals(final Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + SpecialParameter.Jsii$Proxy that = (SpecialParameter.Jsii$Proxy) o; + + return this.value.equals(that.value); + } + + @Override + public final int hashCode() { + int result = this.value.hashCode(); + return result; } } } `; +exports[`Generated code for "jsii-calc": /java/src/main/java/software/amazon/jsii/tests/calculator/submodule/returnsparam/ReturnsSpecialParameter.java 1`] = ` +package software.amazon.jsii.tests.calculator.submodule.returnsparam; + +/** + */ +@javax.annotation.Generated(value = "jsii-pacmak") +@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) +@software.amazon.jsii.Jsii(module = software.amazon.jsii.tests.calculator.$Module.class, fqn = "jsii-calc.submodule.returnsparam.ReturnsSpecialParameter") +public class ReturnsSpecialParameter extends software.amazon.jsii.JsiiObject { + + protected ReturnsSpecialParameter(final software.amazon.jsii.JsiiObjectRef objRef) { + super(objRef); + } + + protected ReturnsSpecialParameter(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { + super(initializationMode); + } + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public ReturnsSpecialParameter() { + super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); + software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this); + } + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.submodule.param.SpecialParameter returnsSpecialParam() { + return software.amazon.jsii.Kernel.call(this, "returnsSpecialParam", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.submodule.param.SpecialParameter.class)); + } +} + +`; + exports[`Generated code for "jsii-calc": /java/src/main/resources/software/amazon/jsii/tests/calculator/$Module.txt 1`] = ` jsii-calc.AbstractClass=software.amazon.jsii.tests.calculator.AbstractClass jsii-calc.AbstractClassBase=software.amazon.jsii.tests.calculator.AbstractClassBase @@ -20115,6 +21504,8 @@ jsii-calc.StableClass=software.amazon.jsii.tests.calculator.StableClass jsii-calc.StableEnum=software.amazon.jsii.tests.calculator.StableEnum jsii-calc.StableStruct=software.amazon.jsii.tests.calculator.StableStruct jsii-calc.StaticContext=software.amazon.jsii.tests.calculator.StaticContext +jsii-calc.StaticHelloChild=software.amazon.jsii.tests.calculator.StaticHelloChild +jsii-calc.StaticHelloParent=software.amazon.jsii.tests.calculator.StaticHelloParent jsii-calc.Statics=software.amazon.jsii.tests.calculator.Statics jsii-calc.StringEnum=software.amazon.jsii.tests.calculator.StringEnum jsii-calc.StripInternal=software.amazon.jsii.tests.calculator.StripInternal @@ -20158,7 +21549,9 @@ jsii-calc.submodule.child.Structure=software.amazon.jsii.tests.calculator.submod jsii-calc.submodule.isolated.Kwargs=software.amazon.jsii.tests.calculator.submodule.isolated.Kwargs jsii-calc.submodule.nested_submodule.Namespaced=software.amazon.jsii.tests.calculator.submodule.nested_submodule.Namespaced jsii-calc.submodule.nested_submodule.deeplyNested.INamespaced=software.amazon.jsii.tests.calculator.submodule.nested_submodule.deeply_nested.INamespaced +jsii-calc.submodule.param.SpecialParameter=software.amazon.jsii.tests.calculator.submodule.param.SpecialParameter +jsii-calc.submodule.returnsparam.ReturnsSpecialParameter=software.amazon.jsii.tests.calculator.submodule.returnsparam.ReturnsSpecialParameter `; -exports[`Generated code for "jsii-calc": /java/src/main/resources/software/amazon/jsii/tests/calculator/jsii-calc@0.0.0.jsii.tgz 1`] = `java/src/main/resources/software/amazon/jsii/tests/calculator/jsii-calc@0.0.0.jsii.tgz is a tarball`; +exports[`Generated code for "jsii-calc": /java/src/main/resources/software/amazon/jsii/tests/calculator/jsii-calc@3.20.120.jsii.tgz 1`] = `java/src/main/resources/software/amazon/jsii/tests/calculator/jsii-calc@3.20.120.jsii.tgz is a tarball`; diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.ts.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.ts.snap index a68eb5cf0c..690b74944b 100644 --- a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.ts.snap +++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.ts.snap @@ -29,7 +29,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", "wheel~=0.34"] +requires = ["setuptools~=53.0.0", "wheel~=0.36.2"] build-backend = "setuptools.build_meta" `; @@ -71,9 +71,9 @@ kwargs = json.loads( }, "python_requires": ">=3.6", "install_requires": [ - "jsii>=0.0.0, <0.0.1", + "jsii<0.0.1", "publication>=0.0.3", - "scope.jsii-calc-base-of-base>=0.0.0, <0.0.1" + "scope.jsii-calc-base-of-base>=2.1.1, <3.0.0" ], "classifiers": [ "Intended Audience :: Developers", @@ -83,9 +83,11 @@ kwargs = json.loads( "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", "Typing :: Typed", "License :: OSI Approved" - ] + ], + "scripts": [] } """ ) @@ -115,10 +117,10 @@ import scope.jsii_calc_base_of_base class Base(metaclass=jsii.JSIIAbstractClass, jsii_type="@scope/jsii-calc-base.Base"): - """A base class.""" + '''A base class.''' @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_BaseProxy"]: return _BaseProxy def __init__(self) -> None: @@ -126,10 +128,10 @@ class Base(metaclass=jsii.JSIIAbstractClass, jsii_type="@scope/jsii-calc-base.Ba @jsii.member(jsii_name="typeName") def type_name(self) -> typing.Any: - """ + ''' :return: the name of the class (to verify native type names are created for derived classes). - """ - return jsii.invoke(self, "typeName", []) + ''' + return typing.cast(typing.Any, jsii.invoke(self, "typeName", [])) class _BaseProxy(Base): @@ -148,10 +150,10 @@ class BaseProps(scope.jsii_calc_base_of_base.VeryBaseProps): foo: scope.jsii_calc_base_of_base.Very, bar: builtins.str, ) -> None: - """ + ''' :param foo: - :param bar: - - """ + ''' self._values: typing.Dict[str, typing.Any] = { "foo": foo, "bar": bar, @@ -161,13 +163,13 @@ class BaseProps(scope.jsii_calc_base_of_base.VeryBaseProps): def foo(self) -> scope.jsii_calc_base_of_base.Very: result = self._values.get("foo") assert result is not None, "Required property 'foo' is missing" - return result + return typing.cast(scope.jsii_calc_base_of_base.Very, result) @builtins.property def bar(self) -> builtins.str: result = self._values.get("bar") assert result is not None, "Required property 'bar' is missing" - return result + return typing.cast(builtins.str, result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -187,7 +189,7 @@ class IBaseInterface( typing_extensions.Protocol, ): @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IBaseInterfaceProxy"]: return _IBaseInterfaceProxy @jsii.member(jsii_name="bar") @@ -196,19 +198,38 @@ class IBaseInterface( class _IBaseInterfaceProxy( - jsii.proxy_for(scope.jsii_calc_base_of_base.IVeryBaseInterface) # type: ignore + jsii.proxy_for(scope.jsii_calc_base_of_base.IVeryBaseInterface), # type: ignore[misc] ): __jsii_type__: typing.ClassVar[str] = "@scope/jsii-calc-base.IBaseInterface" @jsii.member(jsii_name="bar") def bar(self) -> None: - return jsii.invoke(self, "bar", []) + return typing.cast(None, jsii.invoke(self, "bar", [])) + + +class StaticConsumer( + metaclass=jsii.JSIIMeta, + jsii_type="@scope/jsii-calc-base.StaticConsumer", +): + '''Hides the transitive dependency of base-of-base.''' + + def __init__(self) -> None: + jsii.create(StaticConsumer, self, []) + + @jsii.member(jsii_name="consume") # type: ignore[misc] + @builtins.classmethod + def consume(cls, *args: typing.Any) -> None: + ''' + :param args: - + ''' + return typing.cast(None, jsii.sinvoke(cls, "consume", [*args])) __all__ = [ "Base", "BaseProps", "IBaseInterface", + "StaticConsumer", ] publication.publish() @@ -260,7 +281,7 @@ exports[`Generated code for "@scope/jsii-calc-base-of-base": / 1`] = ` โ”ฃโ” ๐Ÿ“„ __init__.py โ”ฃโ” ๐Ÿ“ _jsii โ”ƒ โ”ฃโ” ๐Ÿ“„ __init__.py - โ”ƒ โ”—โ” ๐Ÿ“„ jsii-calc-base-of-base@0.0.0.jsii.tgz + โ”ƒ โ”—โ” ๐Ÿ“„ jsii-calc-base-of-base@2.1.1.jsii.tgz โ”—โ” ๐Ÿ“„ py.typed `; @@ -276,7 +297,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", "wheel~=0.34"] +requires = ["setuptools~=53.0.0", "wheel~=0.36.2"] build-backend = "setuptools.build_meta" `; @@ -289,7 +310,7 @@ kwargs = json.loads( """ { "name": "scope.jsii-calc-base-of-base", - "version": "0.0.0", + "version": "2.1.1", "description": "An example transitive dependency for jsii-calc.", "license": "Apache-2.0", "url": "https://github.com/aws/jsii", @@ -310,7 +331,7 @@ kwargs = json.loads( ], "package_data": { "scope.jsii_calc_base_of_base._jsii": [ - "jsii-calc-base-of-base@0.0.0.jsii.tgz" + "jsii-calc-base-of-base@2.1.1.jsii.tgz" ], "scope.jsii_calc_base_of_base": [ "py.typed" @@ -318,7 +339,7 @@ kwargs = json.loads( }, "python_requires": ">=3.6", "install_requires": [ - "jsii>=0.0.0, <0.0.1", + "jsii<0.0.1", "publication>=0.0.3" ], "classifiers": [ @@ -329,9 +350,11 @@ kwargs = json.loads( "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", "Typing :: Typed", "License :: OSI Approved" - ] + ], + "scripts": [] } """ ) @@ -361,7 +384,7 @@ from ._jsii import * @jsii.interface(jsii_type="@scope/jsii-calc-base-of-base.IVeryBaseInterface") class IVeryBaseInterface(typing_extensions.Protocol): @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IVeryBaseInterfaceProxy"]: return _IVeryBaseInterfaceProxy @jsii.member(jsii_name="foo") @@ -374,37 +397,37 @@ class _IVeryBaseInterfaceProxy: @jsii.member(jsii_name="foo") def foo(self) -> None: - return jsii.invoke(self, "foo", []) + return typing.cast(None, jsii.invoke(self, "foo", [])) class StaticConsumer( metaclass=jsii.JSIIMeta, jsii_type="@scope/jsii-calc-base-of-base.StaticConsumer", ): - @jsii.member(jsii_name="consume") + @jsii.member(jsii_name="consume") # type: ignore[misc] @builtins.classmethod def consume(cls, *_args: typing.Any) -> None: - """ + ''' :param _args: - - """ - return jsii.sinvoke(cls, "consume", [*_args]) + ''' + return typing.cast(None, jsii.sinvoke(cls, "consume", [*_args])) class Very(metaclass=jsii.JSIIMeta, jsii_type="@scope/jsii-calc-base-of-base.Very"): - """(experimental) Something here. + '''(experimental) Something here. :stability: experimental - """ + ''' def __init__(self) -> None: jsii.create(Very, self, []) @jsii.member(jsii_name="hey") def hey(self) -> jsii.Number: - """ + ''' :stability: experimental - """ - return jsii.invoke(self, "hey", []) + ''' + return typing.cast(jsii.Number, jsii.invoke(self, "hey", [])) @jsii.data_type( @@ -414,9 +437,9 @@ class Very(metaclass=jsii.JSIIMeta, jsii_type="@scope/jsii-calc-base-of-base.Ver ) class VeryBaseProps: def __init__(self, *, foo: Very) -> None: - """ + ''' :param foo: - - """ + ''' self._values: typing.Dict[str, typing.Any] = { "foo": foo, } @@ -425,7 +448,7 @@ class VeryBaseProps: def foo(self) -> Very: result = self._values.get("foo") assert result is not None, "Required property 'foo' is missing" - return result + return typing.cast(Very, result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -463,9 +486,9 @@ import typing_extensions __jsii_assembly__ = jsii.JSIIAssembly.load( "@scope/jsii-calc-base-of-base", - "0.0.0", + "2.1.1", __name__[0:-6], - "jsii-calc-base-of-base@0.0.0.jsii.tgz", + "jsii-calc-base-of-base@2.1.1.jsii.tgz", ) __all__ = [ @@ -476,7 +499,7 @@ publication.publish() `; -exports[`Generated code for "@scope/jsii-calc-base-of-base": /python/src/scope/jsii_calc_base_of_base/_jsii/jsii-calc-base-of-base@0.0.0.jsii.tgz 1`] = `python/src/scope/jsii_calc_base_of_base/_jsii/jsii-calc-base-of-base@0.0.0.jsii.tgz is a tarball`; +exports[`Generated code for "@scope/jsii-calc-base-of-base": /python/src/scope/jsii_calc_base_of_base/_jsii/jsii-calc-base-of-base@2.1.1.jsii.tgz 1`] = `python/src/scope/jsii_calc_base_of_base/_jsii/jsii-calc-base-of-base@2.1.1.jsii.tgz is a tarball`; exports[`Generated code for "@scope/jsii-calc-base-of-base": /python/src/scope/jsii_calc_base_of_base/py.typed 1`] = ` @@ -514,7 +537,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", "wheel~=0.34"] +requires = ["setuptools~=53.0.0", "wheel~=0.36.2"] build-backend = "setuptools.build_meta" `; @@ -557,10 +580,10 @@ kwargs = json.loads( }, "python_requires": ">=3.6", "install_requires": [ - "jsii>=0.0.0, <0.0.1", + "jsii<0.0.1", "publication>=0.0.3", - "scope.jsii-calc-base-of-base>=0.0.0, <0.0.1", - "scope.jsii-calc-base>=0.0.0, <0.0.1" + "scope.jsii-calc-base-of-base>=2.1.1, <3.0.0", + "scope.jsii-calc-base<0.0.1" ], "classifiers": [ "Intended Audience :: Developers", @@ -570,10 +593,12 @@ kwargs = json.loads( "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", "Typing :: Typed", "Development Status :: 7 - Inactive", "License :: OSI Approved" - ] + ], + "scripts": [] } """ ) @@ -604,101 +629,101 @@ import scope.jsii_calc_base @jsii.enum(jsii_type="@scope/jsii-calc-lib.EnumFromScopedModule") class EnumFromScopedModule(enum.Enum): - """(deprecated) Check that enums from @scoped packages can be references. + '''(deprecated) Check that enums from @scoped packages can be references. See awslabs/jsii#138 :stability: deprecated - """ + ''' VALUE1 = "VALUE1" - """ + ''' :stability: deprecated - """ + ''' VALUE2 = "VALUE2" - """ + ''' :stability: deprecated - """ + ''' @jsii.interface(jsii_type="@scope/jsii-calc-lib.IDoublable") class IDoublable(typing_extensions.Protocol): - """(deprecated) The general contract for a concrete number. + '''(deprecated) The general contract for a concrete number. :stability: deprecated - """ + ''' @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IDoublableProxy"]: return _IDoublableProxy - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="doubleValue") def double_value(self) -> jsii.Number: - """ + ''' :stability: deprecated - """ + ''' ... class _IDoublableProxy: - """(deprecated) The general contract for a concrete number. + '''(deprecated) The general contract for a concrete number. :stability: deprecated - """ + ''' __jsii_type__: typing.ClassVar[str] = "@scope/jsii-calc-lib.IDoublable" - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="doubleValue") def double_value(self) -> jsii.Number: - """ + ''' :stability: deprecated - """ - return jsii.get(self, "doubleValue") + ''' + return typing.cast(jsii.Number, jsii.get(self, "doubleValue")) @jsii.interface(jsii_type="@scope/jsii-calc-lib.IFriendly") class IFriendly(typing_extensions.Protocol): - """(deprecated) Applies to classes that are considered friendly. + '''(deprecated) Applies to classes that are considered friendly. These classes can be greeted with a "hello" or "goodbye" blessing and they will respond back in a fun and friendly manner. :stability: deprecated - """ + ''' @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IFriendlyProxy"]: return _IFriendlyProxy @jsii.member(jsii_name="hello") def hello(self) -> builtins.str: - """(deprecated) Say hello! + '''(deprecated) Say hello! :stability: deprecated - """ + ''' ... class _IFriendlyProxy: - """(deprecated) Applies to classes that are considered friendly. + '''(deprecated) Applies to classes that are considered friendly. These classes can be greeted with a "hello" or "goodbye" blessing and they will respond back in a fun and friendly manner. :stability: deprecated - """ + ''' __jsii_type__: typing.ClassVar[str] = "@scope/jsii-calc-lib.IFriendly" @jsii.member(jsii_name="hello") def hello(self) -> builtins.str: - """(deprecated) Say hello! + '''(deprecated) Say hello! :stability: deprecated - """ - return jsii.invoke(self, "hello", []) + ''' + return typing.cast(builtins.str, jsii.invoke(self, "hello", [])) @jsii.interface(jsii_type="@scope/jsii-calc-lib.IThreeLevelsInterface") @@ -706,45 +731,45 @@ class IThreeLevelsInterface( scope.jsii_calc_base.IBaseInterface, typing_extensions.Protocol, ): - """(deprecated) Interface that inherits from packages 2 levels up the tree. + '''(deprecated) Interface that inherits from packages 2 levels up the tree. Their presence validates that .NET/Java/jsii-reflect can track all fields far enough up the tree. :stability: deprecated - """ + ''' @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IThreeLevelsInterfaceProxy"]: return _IThreeLevelsInterfaceProxy @jsii.member(jsii_name="baz") def baz(self) -> None: - """ + ''' :stability: deprecated - """ + ''' ... class _IThreeLevelsInterfaceProxy( - jsii.proxy_for(scope.jsii_calc_base.IBaseInterface) # type: ignore + jsii.proxy_for(scope.jsii_calc_base.IBaseInterface) # type: ignore[misc] ): - """(deprecated) Interface that inherits from packages 2 levels up the tree. + '''(deprecated) Interface that inherits from packages 2 levels up the tree. Their presence validates that .NET/Java/jsii-reflect can track all fields far enough up the tree. :stability: deprecated - """ + ''' __jsii_type__: typing.ClassVar[str] = "@scope/jsii-calc-lib.IThreeLevelsInterface" @jsii.member(jsii_name="baz") def baz(self) -> None: - """ + ''' :stability: deprecated - """ - return jsii.invoke(self, "baz", []) + ''' + return typing.cast(None, jsii.invoke(self, "baz", [])) @jsii.data_type( @@ -764,14 +789,14 @@ class MyFirstStruct: astring: builtins.str, first_optional: typing.Optional[typing.List[builtins.str]] = None, ) -> None: - """(deprecated) This is the first struct we have created in jsii. + '''(deprecated) This is the first struct we have created in jsii. :param anumber: (deprecated) An awesome number value. :param astring: (deprecated) A string value. :param first_optional: :stability: deprecated - """ + ''' self._values: typing.Dict[str, typing.Any] = { "anumber": anumber, "astring": astring, @@ -781,31 +806,31 @@ class MyFirstStruct: @builtins.property def anumber(self) -> jsii.Number: - """(deprecated) An awesome number value. + '''(deprecated) An awesome number value. :stability: deprecated - """ + ''' result = self._values.get("anumber") assert result is not None, "Required property 'anumber' is missing" - return result + return typing.cast(jsii.Number, result) @builtins.property def astring(self) -> builtins.str: - """(deprecated) A string value. + '''(deprecated) A string value. :stability: deprecated - """ + ''' result = self._values.get("astring") assert result is not None, "Required property 'astring' is missing" - return result + return typing.cast(builtins.str, result) @builtins.property def first_optional(self) -> typing.Optional[typing.List[builtins.str]]: - """ + ''' :stability: deprecated - """ + ''' result = self._values.get("first_optional") - return result + return typing.cast(typing.Optional[typing.List[builtins.str]], result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -824,13 +849,13 @@ class NumericValue( metaclass=jsii.JSIIAbstractClass, jsii_type="@scope/jsii-calc-lib.NumericValue", ): - """(deprecated) Abstract class which represents a numeric value. + '''(deprecated) Abstract class which represents a numeric value. :stability: deprecated - """ + ''' @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_NumericValueProxy"]: return _NumericValueProxy def __init__(self) -> None: @@ -838,34 +863,34 @@ class NumericValue( @jsii.member(jsii_name="toString") def to_string(self) -> builtins.str: - """(deprecated) String representation of the value. + '''(deprecated) String representation of the value. :stability: deprecated - """ - return jsii.invoke(self, "toString", []) + ''' + return typing.cast(builtins.str, jsii.invoke(self, "toString", [])) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="value") @abc.abstractmethod def value(self) -> jsii.Number: - """(deprecated) The value. + '''(deprecated) The value. :stability: deprecated - """ + ''' ... class _NumericValueProxy( - NumericValue, jsii.proxy_for(scope.jsii_calc_base.Base) # type: ignore + NumericValue, jsii.proxy_for(scope.jsii_calc_base.Base) # type: ignore[misc] ): - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="value") def value(self) -> jsii.Number: - """(deprecated) The value. + '''(deprecated) The value. :stability: deprecated - """ - return jsii.get(self, "value") + ''' + return typing.cast(jsii.Number, jsii.get(self, "value")) class Operation( @@ -873,38 +898,38 @@ class Operation( metaclass=jsii.JSIIAbstractClass, jsii_type="@scope/jsii-calc-lib.Operation", ): - """(deprecated) Represents an operation on values. + '''(deprecated) Represents an operation on values. :stability: deprecated - """ + ''' @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_OperationProxy"]: return _OperationProxy def __init__(self) -> None: jsii.create(Operation, self, []) - @jsii.member(jsii_name="toString") + @jsii.member(jsii_name="toString") # type: ignore[misc] @abc.abstractmethod def to_string(self) -> builtins.str: - """(deprecated) String representation of the value. + '''(deprecated) String representation of the value. :stability: deprecated - """ + ''' ... class _OperationProxy( - Operation, jsii.proxy_for(NumericValue) # type: ignore + Operation, jsii.proxy_for(NumericValue) # type: ignore[misc] ): @jsii.member(jsii_name="toString") def to_string(self) -> builtins.str: - """(deprecated) String representation of the value. + '''(deprecated) String representation of the value. :stability: deprecated - """ - return jsii.invoke(self, "toString", []) + ''' + return typing.cast(builtins.str, jsii.invoke(self, "toString", [])) @jsii.data_type( @@ -924,14 +949,14 @@ class StructWithOnlyOptionals: optional2: typing.Optional[jsii.Number] = None, optional3: typing.Optional[builtins.bool] = None, ) -> None: - """(deprecated) This is a struct with only optional properties. + '''(deprecated) This is a struct with only optional properties. :param optional1: (deprecated) The first optional! :param optional2: :param optional3: :stability: deprecated - """ + ''' self._values: typing.Dict[str, typing.Any] = {} if optional1 is not None: self._values["optional1"] = optional1 @@ -942,28 +967,28 @@ class StructWithOnlyOptionals: @builtins.property def optional1(self) -> typing.Optional[builtins.str]: - """(deprecated) The first optional! + '''(deprecated) The first optional! :stability: deprecated - """ + ''' result = self._values.get("optional1") - return result + return typing.cast(typing.Optional[builtins.str], result) @builtins.property def optional2(self) -> typing.Optional[jsii.Number]: - """ + ''' :stability: deprecated - """ + ''' result = self._values.get("optional2") - return result + return typing.cast(typing.Optional[jsii.Number], result) @builtins.property def optional3(self) -> typing.Optional[builtins.bool]: - """ + ''' :stability: deprecated - """ + ''' result = self._values.get("optional3") - return result + return typing.cast(typing.Optional[builtins.bool], result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -983,37 +1008,37 @@ class Number( metaclass=jsii.JSIIMeta, jsii_type="@scope/jsii-calc-lib.Number", ): - """(deprecated) Represents a concrete number. + '''(deprecated) Represents a concrete number. :stability: deprecated - """ + ''' def __init__(self, value: jsii.Number) -> None: - """(deprecated) Creates a Number object. + '''(deprecated) Creates a Number object. :param value: The number. :stability: deprecated - """ + ''' jsii.create(Number, self, [value]) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="doubleValue") def double_value(self) -> jsii.Number: - """(deprecated) The number multiplied by 2. + '''(deprecated) The number multiplied by 2. :stability: deprecated - """ - return jsii.get(self, "doubleValue") + ''' + return typing.cast(jsii.Number, jsii.get(self, "doubleValue")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="value") def value(self) -> jsii.Number: - """(deprecated) The number. + '''(deprecated) The number. :stability: deprecated - """ - return jsii.get(self, "value") + ''' + return typing.cast(jsii.Number, jsii.get(self, "value")) __all__ = [ @@ -1076,70 +1101,70 @@ from .._jsii import * @jsii.interface(jsii_type="@scope/jsii-calc-lib.submodule.IReflectable") class IReflectable(typing_extensions.Protocol): - """ + ''' :stability: deprecated - """ + ''' @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IReflectableProxy"]: return _IReflectableProxy - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="entries") def entries(self) -> typing.List["ReflectableEntry"]: - """ + ''' :stability: deprecated - """ + ''' ... class _IReflectableProxy: - """ + ''' :stability: deprecated - """ + ''' __jsii_type__: typing.ClassVar[str] = "@scope/jsii-calc-lib.submodule.IReflectable" - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="entries") def entries(self) -> typing.List["ReflectableEntry"]: - """ + ''' :stability: deprecated - """ - return jsii.get(self, "entries") + ''' + return typing.cast(typing.List["ReflectableEntry"], jsii.get(self, "entries")) class NestingClass( metaclass=jsii.JSIIMeta, jsii_type="@scope/jsii-calc-lib.submodule.NestingClass", ): - """(deprecated) This class is here to show we can use nested classes across module boundaries. + '''(deprecated) This class is here to show we can use nested classes across module boundaries. :stability: deprecated - """ + ''' class NestedClass( metaclass=jsii.JSIIMeta, jsii_type="@scope/jsii-calc-lib.submodule.NestingClass.NestedClass", ): - """(deprecated) This class is here to show we can use nested classes across module boundaries. + '''(deprecated) This class is here to show we can use nested classes across module boundaries. :stability: deprecated - """ + ''' def __init__(self) -> None: - """ + ''' :stability: deprecated - """ + ''' jsii.create(NestedClass, self, []) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="property") def property(self) -> builtins.str: - """ + ''' :stability: deprecated - """ - return jsii.get(self, "property") + ''' + return typing.cast(builtins.str, jsii.get(self, "property")) @jsii.data_type( jsii_type="@scope/jsii-calc-lib.submodule.NestingClass.NestedStruct", @@ -1148,26 +1173,26 @@ class NestingClass( ) class NestedStruct: def __init__(self, *, name: builtins.str) -> None: - """(deprecated) This is a struct, nested within a class. + '''(deprecated) This is a struct, nested within a class. Normal. :param name: :stability: deprecated - """ + ''' self._values: typing.Dict[str, typing.Any] = { "name": name, } @builtins.property def name(self) -> builtins.str: - """ + ''' :stability: deprecated - """ + ''' result = self._values.get("name") assert result is not None, "Required property 'name' is missing" - return result + return typing.cast(builtins.str, result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -1188,12 +1213,12 @@ class NestingClass( ) class ReflectableEntry: def __init__(self, *, key: builtins.str, value: typing.Any) -> None: - """ + ''' :param key: :param value: :stability: deprecated - """ + ''' self._values: typing.Dict[str, typing.Any] = { "key": key, "value": value, @@ -1201,21 +1226,21 @@ class ReflectableEntry: @builtins.property def key(self) -> builtins.str: - """ + ''' :stability: deprecated - """ + ''' result = self._values.get("key") assert result is not None, "Required property 'key' is missing" - return result + return typing.cast(builtins.str, result) @builtins.property def value(self) -> typing.Any: - """ + ''' :stability: deprecated - """ + ''' result = self._values.get("value") assert result is not None, "Required property 'value' is missing" - return result + return typing.cast(typing.Any, result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -1233,14 +1258,14 @@ class Reflector( metaclass=jsii.JSIIMeta, jsii_type="@scope/jsii-calc-lib.submodule.Reflector", ): - """ + ''' :stability: deprecated - """ + ''' def __init__(self) -> None: - """ + ''' :stability: deprecated - """ + ''' jsii.create(Reflector, self, []) @jsii.member(jsii_name="asMap") @@ -1248,12 +1273,12 @@ class Reflector( self, reflectable: IReflectable, ) -> typing.Mapping[builtins.str, typing.Any]: - """ + ''' :param reflectable: - :stability: deprecated - """ - return jsii.invoke(self, "asMap", [reflectable]) + ''' + return typing.cast(typing.Mapping[builtins.str, typing.Any], jsii.invoke(self, "asMap", [reflectable])) __all__ = [ @@ -1284,7 +1309,9 @@ exports[`Generated code for "jsii-calc": / 1`] = ` โ”ฃโ” ๐Ÿ“„ __init__.py โ”ฃโ” ๐Ÿ“ _jsii โ”ƒ โ”ฃโ” ๐Ÿ“„ __init__.py - โ”ƒ โ”—โ” ๐Ÿ“„ jsii-calc@0.0.0.jsii.tgz + โ”ƒ โ”ฃโ” ๐Ÿ“ bin + โ”ƒ โ”ƒ โ”—โ” ๐Ÿ“„ calc + โ”ƒ โ”—โ” ๐Ÿ“„ jsii-calc@3.20.120.jsii.tgz โ”ฃโ” ๐Ÿ“ composition โ”ƒ โ”—โ” ๐Ÿ“„ __init__.py โ”ฃโ” ๐Ÿ“ derived_class_has_no_properties @@ -1304,10 +1331,14 @@ exports[`Generated code for "jsii-calc": / 1`] = ` โ”ƒ โ”—โ” ๐Ÿ“„ __init__.py โ”ฃโ” ๐Ÿ“ isolated โ”ƒ โ”—โ” ๐Ÿ“„ __init__.py - โ”—โ” ๐Ÿ“ nested_submodule - โ”ฃโ” ๐Ÿ“„ __init__.py - โ”—โ” ๐Ÿ“ deeply_nested - โ”—โ” ๐Ÿ“„ __init__.py + โ”ฃโ” ๐Ÿ“ nested_submodule + โ”ƒ โ”ฃโ” ๐Ÿ“„ __init__.py + โ”ƒ โ”—โ” ๐Ÿ“ deeply_nested + โ”ƒ โ”—โ” ๐Ÿ“„ __init__.py + โ”ฃโ” ๐Ÿ“ param + โ”ƒ โ”—โ” ๐Ÿ“„ __init__.py + โ”—โ” ๐Ÿ“ returnsparam + โ”—โ” ๐Ÿ“„ __init__.py `; exports[`Generated code for "jsii-calc": /python/MANIFEST.in 1`] = ` @@ -1348,7 +1379,7 @@ foo = "bar" exports[`Generated code for "jsii-calc": /python/pyproject.toml 1`] = ` [build-system] -requires = ["setuptools~=49.3", "wheel~=0.34"] +requires = ["setuptools~=53.0.0", "wheel~=0.36.2"] build-backend = "setuptools.build_meta" `; @@ -1361,7 +1392,7 @@ kwargs = json.loads( """ { "name": "jsii-calc", - "version": "0.0.0", + "version": "3.20.120", "description": "A simple calcuator built on JSII.", "license": "Apache-2.0", "url": "https://github.com/aws/jsii", @@ -1389,11 +1420,13 @@ kwargs = json.loads( "jsii_calc.submodule.child", "jsii_calc.submodule.isolated", "jsii_calc.submodule.nested_submodule", - "jsii_calc.submodule.nested_submodule.deeply_nested" + "jsii_calc.submodule.nested_submodule.deeply_nested", + "jsii_calc.submodule.param", + "jsii_calc.submodule.returnsparam" ], "package_data": { "jsii_calc._jsii": [ - "jsii-calc@0.0.0.jsii.tgz" + "jsii-calc@3.20.120.jsii.tgz" ], "jsii_calc": [ "py.typed" @@ -1401,11 +1434,10 @@ kwargs = json.loads( }, "python_requires": ">=3.6", "install_requires": [ - "jsii>=0.0.0, <0.0.1", + "jsii<0.0.1", "publication>=0.0.3", - "scope.jsii-calc-base-of-base>=0.0.0, <0.0.1", - "scope.jsii-calc-base>=0.0.0, <0.0.1", - "scope.jsii-calc-lib>=0.0.0, <0.0.1" + "scope.jsii-calc-base<0.0.1", + "scope.jsii-calc-lib<0.0.1" ], "classifiers": [ "Intended Audience :: Developers", @@ -1415,10 +1447,14 @@ kwargs = json.loads( "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", "Typing :: Typed", "Development Status :: 5 - Production/Stable", "License :: OSI Approved", "Test :: Classifier :: Is Dummy" + ], + "scripts": [ + "src/jsii_calc/_jsii/bin/calc" ] } """ @@ -1433,7 +1469,7 @@ setuptools.setup(**kwargs) `; exports[`Generated code for "jsii-calc": /python/src/jsii_calc/__init__.py 1`] = ` -""" +''' # jsii Calculator This library is used to demonstrate and test the features of JSII @@ -1461,7 +1497,7 @@ calculator.add(10) # This is totes a magic comment in here, just you wait! foo = "bar" \`\`\` -""" +''' import abc import builtins import datetime @@ -1486,13 +1522,13 @@ class AbstractClassBase( jsii_type="jsii-calc.AbstractClassBase", ): @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_AbstractClassBaseProxy"]: return _AbstractClassBaseProxy def __init__(self) -> None: jsii.create(AbstractClassBase, self, []) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="abstractProperty") @abc.abstractmethod def abstract_property(self) -> builtins.str: @@ -1500,10 +1536,10 @@ class AbstractClassBase( class _AbstractClassBaseProxy(AbstractClassBase): - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="abstractProperty") def abstract_property(self) -> builtins.str: - return jsii.get(self, "abstractProperty") + return typing.cast(builtins.str, jsii.get(self, "abstractProperty")) class AbstractClassReturner( @@ -1515,54 +1551,54 @@ class AbstractClassReturner( @jsii.member(jsii_name="giveMeAbstract") def give_me_abstract(self) -> "AbstractClass": - return jsii.invoke(self, "giveMeAbstract", []) + return typing.cast("AbstractClass", jsii.invoke(self, "giveMeAbstract", [])) @jsii.member(jsii_name="giveMeInterface") def give_me_interface(self) -> "IInterfaceImplementedByAbstractClass": - return jsii.invoke(self, "giveMeInterface", []) + return typing.cast("IInterfaceImplementedByAbstractClass", jsii.invoke(self, "giveMeInterface", [])) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="returnAbstractFromProperty") def return_abstract_from_property(self) -> AbstractClassBase: - return jsii.get(self, "returnAbstractFromProperty") + return typing.cast(AbstractClassBase, jsii.get(self, "returnAbstractFromProperty")) class AbstractSuite( metaclass=jsii.JSIIAbstractClass, jsii_type="jsii-calc.AbstractSuite", ): - """Ensures abstract members implementations correctly register overrides in various languages.""" + '''Ensures abstract members implementations correctly register overrides in various languages.''' @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_AbstractSuiteProxy"]: return _AbstractSuiteProxy def __init__(self) -> None: jsii.create(AbstractSuite, self, []) - @jsii.member(jsii_name="someMethod") + @jsii.member(jsii_name="someMethod") # type: ignore[misc] @abc.abstractmethod def _some_method(self, str: builtins.str) -> builtins.str: - """ + ''' :param str: - - """ + ''' ... @jsii.member(jsii_name="workItAll") 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. + '''Sets \`\`seed\`\` to \`\`this.property\`\`, then calls \`\`someMethod\`\` with \`\`this.property\`\` and returns the result. :param seed: a \`\`string\`\`. - """ - return jsii.invoke(self, "workItAll", [seed]) + ''' + return typing.cast(builtins.str, jsii.invoke(self, "workItAll", [seed])) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="property") @abc.abstractmethod def _property(self) -> builtins.str: ... - @_property.setter # type: ignore + @_property.setter @abc.abstractmethod def _property(self, value: builtins.str) -> None: ... @@ -1571,234 +1607,234 @@ class AbstractSuite( class _AbstractSuiteProxy(AbstractSuite): @jsii.member(jsii_name="someMethod") def _some_method(self, str: builtins.str) -> builtins.str: - """ + ''' :param str: - - """ - return jsii.invoke(self, "someMethod", [str]) + ''' + return typing.cast(builtins.str, jsii.invoke(self, "someMethod", [str])) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="property") def _property(self) -> builtins.str: - return jsii.get(self, "property") + return typing.cast(builtins.str, jsii.get(self, "property")) - @_property.setter # type: ignore + @_property.setter def _property(self, value: builtins.str) -> None: jsii.set(self, "property", value) class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): - """This class includes property for all types supported by jsii. + '''This class includes property for all types supported by jsii. The setters will validate that the value set is of the expected type and throw otherwise. - """ + ''' def __init__(self) -> None: jsii.create(AllTypes, self, []) @jsii.member(jsii_name="anyIn") def any_in(self, inp: typing.Any) -> None: - """ + ''' :param inp: - - """ - return jsii.invoke(self, "anyIn", [inp]) + ''' + return typing.cast(None, jsii.invoke(self, "anyIn", [inp])) @jsii.member(jsii_name="anyOut") def any_out(self) -> typing.Any: - return jsii.invoke(self, "anyOut", []) + return typing.cast(typing.Any, jsii.invoke(self, "anyOut", [])) @jsii.member(jsii_name="enumMethod") def enum_method(self, value: "StringEnum") -> "StringEnum": - """ + ''' :param value: - - """ - return jsii.invoke(self, "enumMethod", [value]) + ''' + return typing.cast("StringEnum", jsii.invoke(self, "enumMethod", [value])) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="enumPropertyValue") def enum_property_value(self) -> jsii.Number: - return jsii.get(self, "enumPropertyValue") + return typing.cast(jsii.Number, jsii.get(self, "enumPropertyValue")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="anyArrayProperty") def any_array_property(self) -> typing.List[typing.Any]: - return jsii.get(self, "anyArrayProperty") + return typing.cast(typing.List[typing.Any], jsii.get(self, "anyArrayProperty")) - @any_array_property.setter # type: ignore + @any_array_property.setter def any_array_property(self, value: typing.List[typing.Any]) -> None: jsii.set(self, "anyArrayProperty", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="anyMapProperty") def any_map_property(self) -> typing.Mapping[builtins.str, typing.Any]: - return jsii.get(self, "anyMapProperty") + return typing.cast(typing.Mapping[builtins.str, typing.Any], jsii.get(self, "anyMapProperty")) - @any_map_property.setter # type: ignore + @any_map_property.setter def any_map_property(self, value: typing.Mapping[builtins.str, typing.Any]) -> None: jsii.set(self, "anyMapProperty", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="anyProperty") def any_property(self) -> typing.Any: - return jsii.get(self, "anyProperty") + return typing.cast(typing.Any, jsii.get(self, "anyProperty")) - @any_property.setter # type: ignore + @any_property.setter def any_property(self, value: typing.Any) -> None: jsii.set(self, "anyProperty", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="arrayProperty") def array_property(self) -> typing.List[builtins.str]: - return jsii.get(self, "arrayProperty") + return typing.cast(typing.List[builtins.str], jsii.get(self, "arrayProperty")) - @array_property.setter # type: ignore + @array_property.setter def array_property(self, value: typing.List[builtins.str]) -> None: jsii.set(self, "arrayProperty", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="booleanProperty") def boolean_property(self) -> builtins.bool: - return jsii.get(self, "booleanProperty") + return typing.cast(builtins.bool, jsii.get(self, "booleanProperty")) - @boolean_property.setter # type: ignore + @boolean_property.setter def boolean_property(self, value: builtins.bool) -> None: jsii.set(self, "booleanProperty", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="dateProperty") def date_property(self) -> datetime.datetime: - return jsii.get(self, "dateProperty") + return typing.cast(datetime.datetime, jsii.get(self, "dateProperty")) - @date_property.setter # type: ignore + @date_property.setter def date_property(self, value: datetime.datetime) -> None: jsii.set(self, "dateProperty", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="enumProperty") def enum_property(self) -> "AllTypesEnum": - return jsii.get(self, "enumProperty") + return typing.cast("AllTypesEnum", jsii.get(self, "enumProperty")) - @enum_property.setter # type: ignore + @enum_property.setter def enum_property(self, value: "AllTypesEnum") -> None: jsii.set(self, "enumProperty", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="jsonProperty") def json_property(self) -> typing.Mapping[typing.Any, typing.Any]: - return jsii.get(self, "jsonProperty") + return typing.cast(typing.Mapping[typing.Any, typing.Any], jsii.get(self, "jsonProperty")) - @json_property.setter # type: ignore + @json_property.setter def json_property(self, value: typing.Mapping[typing.Any, typing.Any]) -> None: jsii.set(self, "jsonProperty", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="mapProperty") def map_property(self) -> typing.Mapping[builtins.str, scope.jsii_calc_lib.Number]: - return jsii.get(self, "mapProperty") + return typing.cast(typing.Mapping[builtins.str, scope.jsii_calc_lib.Number], jsii.get(self, "mapProperty")) - @map_property.setter # type: ignore + @map_property.setter def map_property( self, value: typing.Mapping[builtins.str, scope.jsii_calc_lib.Number], ) -> None: jsii.set(self, "mapProperty", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="numberProperty") def number_property(self) -> jsii.Number: - return jsii.get(self, "numberProperty") + return typing.cast(jsii.Number, jsii.get(self, "numberProperty")) - @number_property.setter # type: ignore + @number_property.setter def number_property(self, value: jsii.Number) -> None: jsii.set(self, "numberProperty", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="stringProperty") def string_property(self) -> builtins.str: - return jsii.get(self, "stringProperty") + return typing.cast(builtins.str, jsii.get(self, "stringProperty")) - @string_property.setter # type: ignore + @string_property.setter def string_property(self, value: builtins.str) -> None: jsii.set(self, "stringProperty", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="unionArrayProperty") def union_array_property( self, ) -> typing.List[typing.Union[jsii.Number, scope.jsii_calc_lib.NumericValue]]: - return jsii.get(self, "unionArrayProperty") + return typing.cast(typing.List[typing.Union[jsii.Number, scope.jsii_calc_lib.NumericValue]], jsii.get(self, "unionArrayProperty")) - @union_array_property.setter # type: ignore + @union_array_property.setter def union_array_property( self, value: typing.List[typing.Union[jsii.Number, scope.jsii_calc_lib.NumericValue]], ) -> None: jsii.set(self, "unionArrayProperty", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="unionMapProperty") def union_map_property( self, ) -> typing.Mapping[builtins.str, typing.Union[builtins.str, jsii.Number, scope.jsii_calc_lib.Number]]: - return jsii.get(self, "unionMapProperty") + return typing.cast(typing.Mapping[builtins.str, typing.Union[builtins.str, jsii.Number, scope.jsii_calc_lib.Number]], jsii.get(self, "unionMapProperty")) - @union_map_property.setter # type: ignore + @union_map_property.setter def union_map_property( self, value: typing.Mapping[builtins.str, typing.Union[builtins.str, jsii.Number, scope.jsii_calc_lib.Number]], ) -> None: jsii.set(self, "unionMapProperty", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="unionProperty") def union_property( self, ) -> typing.Union[builtins.str, jsii.Number, "Multiply", scope.jsii_calc_lib.Number]: - return jsii.get(self, "unionProperty") + return typing.cast(typing.Union[builtins.str, jsii.Number, "Multiply", scope.jsii_calc_lib.Number], jsii.get(self, "unionProperty")) - @union_property.setter # type: ignore + @union_property.setter def union_property( self, value: typing.Union[builtins.str, jsii.Number, "Multiply", scope.jsii_calc_lib.Number], ) -> None: jsii.set(self, "unionProperty", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="unknownArrayProperty") def unknown_array_property(self) -> typing.List[typing.Any]: - return jsii.get(self, "unknownArrayProperty") + return typing.cast(typing.List[typing.Any], jsii.get(self, "unknownArrayProperty")) - @unknown_array_property.setter # type: ignore + @unknown_array_property.setter def unknown_array_property(self, value: typing.List[typing.Any]) -> None: jsii.set(self, "unknownArrayProperty", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="unknownMapProperty") def unknown_map_property(self) -> typing.Mapping[builtins.str, typing.Any]: - return jsii.get(self, "unknownMapProperty") + return typing.cast(typing.Mapping[builtins.str, typing.Any], jsii.get(self, "unknownMapProperty")) - @unknown_map_property.setter # type: ignore + @unknown_map_property.setter def unknown_map_property( self, value: typing.Mapping[builtins.str, typing.Any], ) -> None: jsii.set(self, "unknownMapProperty", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="unknownProperty") def unknown_property(self) -> typing.Any: - return jsii.get(self, "unknownProperty") + return typing.cast(typing.Any, jsii.get(self, "unknownProperty")) - @unknown_property.setter # type: ignore + @unknown_property.setter def unknown_property(self, value: typing.Any) -> None: jsii.set(self, "unknownProperty", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="optionalEnumValue") def optional_enum_value(self) -> typing.Optional["StringEnum"]: - return jsii.get(self, "optionalEnumValue") + return typing.cast(typing.Optional["StringEnum"], jsii.get(self, "optionalEnumValue")) - @optional_enum_value.setter # type: ignore + @optional_enum_value.setter def optional_enum_value(self, value: typing.Optional["StringEnum"]) -> None: jsii.set(self, "optionalEnumValue", value) @@ -1819,37 +1855,37 @@ class AllowedMethodNames( @jsii.member(jsii_name="getBar") def get_bar(self, _p1: builtins.str, _p2: jsii.Number) -> None: - """ + ''' :param _p1: - :param _p2: - - """ - return jsii.invoke(self, "getBar", [_p1, _p2]) + ''' + return typing.cast(None, jsii.invoke(self, "getBar", [_p1, _p2])) @jsii.member(jsii_name="getFoo") def get_foo(self, with_param: builtins.str) -> builtins.str: - """getXxx() is not allowed (see negatives), but getXxx(a, ...) is okay. + '''getXxx() is not allowed (see negatives), but getXxx(a, ...) is okay. :param with_param: - - """ - return jsii.invoke(self, "getFoo", [with_param]) + ''' + return typing.cast(builtins.str, jsii.invoke(self, "getFoo", [with_param])) @jsii.member(jsii_name="setBar") def set_bar(self, _x: builtins.str, _y: jsii.Number, _z: builtins.bool) -> None: - """ + ''' :param _x: - :param _y: - :param _z: - - """ - return jsii.invoke(self, "setBar", [_x, _y, _z]) + ''' + return typing.cast(None, jsii.invoke(self, "setBar", [_x, _y, _z])) @jsii.member(jsii_name="setFoo") def set_foo(self, _x: builtins.str, _y: jsii.Number) -> None: - """setFoo(x) is not allowed (see negatives), but setXxx(a, b, ...) is okay. + '''setFoo(x) is not allowed (see negatives), but setXxx(a, b, ...) is okay. :param _x: - :param _y: - - """ - return jsii.invoke(self, "setFoo", [_x, _y]) + ''' + return typing.cast(None, jsii.invoke(self, "setFoo", [_x, _y])) class AmbiguousParameters( @@ -1863,24 +1899,24 @@ class AmbiguousParameters( scope: builtins.str, props: typing.Optional[builtins.bool] = None, ) -> None: - """ + ''' :param scope_: - :param scope: :param props: - """ + ''' props_ = StructParameterType(scope=scope, props=props) jsii.create(AmbiguousParameters, self, [scope_, props_]) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="props") def props(self) -> "StructParameterType": - return jsii.get(self, "props") + return typing.cast("StructParameterType", jsii.get(self, "props")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="scope") def scope(self) -> "Bell": - return jsii.get(self, "scope") + return typing.cast("Bell", jsii.get(self, "scope")) class AsyncVirtualMethods( @@ -1892,37 +1928,37 @@ class AsyncVirtualMethods( @jsii.member(jsii_name="callMe") def call_me(self) -> jsii.Number: - return jsii.ainvoke(self, "callMe", []) + return typing.cast(jsii.Number, jsii.ainvoke(self, "callMe", [])) @jsii.member(jsii_name="callMe2") def call_me2(self) -> jsii.Number: - """Just calls "overrideMeToo".""" - return jsii.ainvoke(self, "callMe2", []) + '''Just calls "overrideMeToo".''' + return typing.cast(jsii.Number, jsii.ainvoke(self, "callMe2", [])) @jsii.member(jsii_name="callMeDoublePromise") def call_me_double_promise(self) -> jsii.Number: - """This method calls the "callMe" async method indirectly, which will then invoke a virtual method. + '''This method calls the "callMe" async method indirectly, which will then invoke a virtual method. This is a "double promise" situation, which means that callbacks are not going to be available immediate, but only after an "immediates" cycle. - """ - return jsii.ainvoke(self, "callMeDoublePromise", []) + ''' + return typing.cast(jsii.Number, jsii.ainvoke(self, "callMeDoublePromise", [])) @jsii.member(jsii_name="dontOverrideMe") def dont_override_me(self) -> jsii.Number: - return jsii.invoke(self, "dontOverrideMe", []) + return typing.cast(jsii.Number, jsii.invoke(self, "dontOverrideMe", [])) @jsii.member(jsii_name="overrideMe") def override_me(self, mult: jsii.Number) -> jsii.Number: - """ + ''' :param mult: - - """ - return jsii.ainvoke(self, "overrideMe", [mult]) + ''' + return typing.cast(jsii.Number, jsii.ainvoke(self, "overrideMe", [mult])) @jsii.member(jsii_name="overrideMeToo") def override_me_too(self) -> jsii.Number: - return jsii.ainvoke(self, "overrideMeToo", []) + return typing.cast(jsii.Number, jsii.ainvoke(self, "overrideMeToo", [])) class AugmentableClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AugmentableClass"): @@ -1931,11 +1967,11 @@ class AugmentableClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Augmentable @jsii.member(jsii_name="methodOne") def method_one(self) -> None: - return jsii.invoke(self, "methodOne", []) + return typing.cast(None, jsii.invoke(self, "methodOne", [])) @jsii.member(jsii_name="methodTwo") def method_two(self) -> None: - return jsii.invoke(self, "methodTwo", []) + return typing.cast(None, jsii.invoke(self, "methodTwo", [])) class BaseJsii976(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.BaseJsii976"): @@ -1949,10 +1985,10 @@ class BinaryOperation( metaclass=jsii.JSIIAbstractClass, jsii_type="jsii-calc.BinaryOperation", ): - """Represents an operation with two operands.""" + '''Represents an operation with two operands.''' @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_BinaryOperationProxy"]: return _BinaryOperationProxy def __init__( @@ -1960,33 +1996,33 @@ class BinaryOperation( lhs: scope.jsii_calc_lib.NumericValue, rhs: scope.jsii_calc_lib.NumericValue, ) -> None: - """Creates a BinaryOperation. + '''Creates a BinaryOperation. :param lhs: Left-hand side operand. :param rhs: Right-hand side operand. - """ + ''' jsii.create(BinaryOperation, self, [lhs, rhs]) @jsii.member(jsii_name="hello") def hello(self) -> builtins.str: - """(deprecated) Say hello!""" - return jsii.invoke(self, "hello", []) + '''(deprecated) Say hello!''' + return typing.cast(builtins.str, jsii.invoke(self, "hello", [])) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="lhs") def lhs(self) -> scope.jsii_calc_lib.NumericValue: - """Left-hand side operand.""" - return jsii.get(self, "lhs") + '''Left-hand side operand.''' + return typing.cast(scope.jsii_calc_lib.NumericValue, jsii.get(self, "lhs")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="rhs") def rhs(self) -> scope.jsii_calc_lib.NumericValue: - """Right-hand side operand.""" - return jsii.get(self, "rhs") + '''Right-hand side operand.''' + return typing.cast(scope.jsii_calc_lib.NumericValue, jsii.get(self, "rhs")) class _BinaryOperationProxy( - BinaryOperation, jsii.proxy_for(scope.jsii_calc_lib.Operation) # type: ignore + BinaryOperation, jsii.proxy_for(scope.jsii_calc_lib.Operation) # type: ignore[misc] ): pass @@ -1995,10 +2031,10 @@ class BurriedAnonymousObject( metaclass=jsii.JSIIAbstractClass, jsii_type="jsii-calc.BurriedAnonymousObject", ): - """See https://github.com/aws/aws-cdk/issues/7977.""" + '''See https://github.com/aws/aws-cdk/issues/7977.''' @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_BurriedAnonymousObjectProxy"]: return _BurriedAnonymousObjectProxy def __init__(self) -> None: @@ -2006,30 +2042,30 @@ class BurriedAnonymousObject( @jsii.member(jsii_name="check") def check(self) -> builtins.bool: - return jsii.invoke(self, "check", []) + return typing.cast(builtins.bool, jsii.invoke(self, "check", [])) - @jsii.member(jsii_name="giveItBack") + @jsii.member(jsii_name="giveItBack") # type: ignore[misc] @abc.abstractmethod def give_it_back(self, value: typing.Any) -> typing.Any: - """Implement this method and have it return it's parameter. + '''Implement this method and have it return it's parameter. :param value: the value that should be returned. :return: \`\`value\`\` - """ + ''' ... class _BurriedAnonymousObjectProxy(BurriedAnonymousObject): @jsii.member(jsii_name="giveItBack") def give_it_back(self, value: typing.Any) -> typing.Any: - """Implement this method and have it return it's parameter. + '''Implement this method and have it return it's parameter. :param value: the value that should be returned. :return: \`\`value\`\` - """ - return jsii.invoke(self, "giveItBack", [value]) + ''' + return typing.cast(typing.Any, jsii.invoke(self, "giveItBack", [value])) class Calculator( @@ -2037,7 +2073,7 @@ class Calculator( metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Calculator", ): - """A calculator which maintains a current value and allows adding operations. + '''A calculator which maintains a current value and allows adding operations. Here's how you use it:: @@ -2056,7 +2092,7 @@ class Calculator( calculator.add(5) calculator.mul(3) print(calculator.expression.value) - """ + ''' def __init__( self, @@ -2064,11 +2100,11 @@ class Calculator( initial_value: typing.Optional[jsii.Number] = None, maximum_value: typing.Optional[jsii.Number] = None, ) -> None: - """Creates a Calculator object. + '''Creates a Calculator object. :param initial_value: The initial value of the calculator. NOTE: Any number works here, it's fine. Default: 0 :param maximum_value: The maximum value the calculator can store. Default: none - """ + ''' props = CalculatorProps( initial_value=initial_value, maximum_value=maximum_value ) @@ -2077,87 +2113,87 @@ class Calculator( @jsii.member(jsii_name="add") def add(self, value: jsii.Number) -> None: - """Adds a number to the current value. + '''Adds a number to the current value. :param value: - - """ - return jsii.invoke(self, "add", [value]) + ''' + return typing.cast(None, jsii.invoke(self, "add", [value])) @jsii.member(jsii_name="mul") def mul(self, value: jsii.Number) -> None: - """Multiplies the current value by a number. + '''Multiplies the current value by a number. :param value: - - """ - return jsii.invoke(self, "mul", [value]) + ''' + return typing.cast(None, jsii.invoke(self, "mul", [value])) @jsii.member(jsii_name="neg") def neg(self) -> None: - """Negates the current value.""" - return jsii.invoke(self, "neg", []) + '''Negates the current value.''' + return typing.cast(None, jsii.invoke(self, "neg", [])) @jsii.member(jsii_name="pow") def pow(self, value: jsii.Number) -> None: - """Raises the current value by a power. + '''Raises the current value by a power. :param value: - - """ - return jsii.invoke(self, "pow", [value]) + ''' + return typing.cast(None, jsii.invoke(self, "pow", [value])) @jsii.member(jsii_name="readUnionValue") def read_union_value(self) -> jsii.Number: - """Returns teh value of the union property (if defined).""" - return jsii.invoke(self, "readUnionValue", []) + '''Returns teh value of the union property (if defined).''' + return typing.cast(jsii.Number, jsii.invoke(self, "readUnionValue", [])) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="expression") def expression(self) -> scope.jsii_calc_lib.NumericValue: - """Returns the expression.""" - return jsii.get(self, "expression") + '''Returns the expression.''' + return typing.cast(scope.jsii_calc_lib.NumericValue, jsii.get(self, "expression")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="operationsLog") def operations_log(self) -> typing.List[scope.jsii_calc_lib.NumericValue]: - """A log of all operations.""" - return jsii.get(self, "operationsLog") + '''A log of all operations.''' + return typing.cast(typing.List[scope.jsii_calc_lib.NumericValue], jsii.get(self, "operationsLog")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="operationsMap") def operations_map( self, ) -> typing.Mapping[builtins.str, typing.List[scope.jsii_calc_lib.NumericValue]]: - """A map of per operation name of all operations performed.""" - return jsii.get(self, "operationsMap") + '''A map of per operation name of all operations performed.''' + return typing.cast(typing.Mapping[builtins.str, typing.List[scope.jsii_calc_lib.NumericValue]], jsii.get(self, "operationsMap")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="curr") def curr(self) -> scope.jsii_calc_lib.NumericValue: - """The current value.""" - return jsii.get(self, "curr") + '''The current value.''' + return typing.cast(scope.jsii_calc_lib.NumericValue, jsii.get(self, "curr")) - @curr.setter # type: ignore + @curr.setter def curr(self, value: scope.jsii_calc_lib.NumericValue) -> None: jsii.set(self, "curr", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="maxValue") def max_value(self) -> typing.Optional[jsii.Number]: - """The maximum value allows in this calculator.""" - return jsii.get(self, "maxValue") + '''The maximum value allows in this calculator.''' + return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "maxValue")) - @max_value.setter # type: ignore + @max_value.setter def max_value(self, value: typing.Optional[jsii.Number]) -> None: jsii.set(self, "maxValue", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="unionProperty") def union_property( self, ) -> typing.Optional[typing.Union["Add", "Multiply", "Power"]]: - """Example of a property that accepts a union of types.""" - return jsii.get(self, "unionProperty") + '''Example of a property that accepts a union of types.''' + return typing.cast(typing.Optional[typing.Union["Add", "Multiply", "Power"]], jsii.get(self, "unionProperty")) - @union_property.setter # type: ignore + @union_property.setter def union_property( self, value: typing.Optional[typing.Union["Add", "Multiply", "Power"]], @@ -2177,11 +2213,11 @@ class CalculatorProps: initial_value: typing.Optional[jsii.Number] = None, maximum_value: typing.Optional[jsii.Number] = None, ) -> None: - """Properties for Calculator. + '''Properties for Calculator. :param initial_value: The initial value of the calculator. NOTE: Any number works here, it's fine. Default: 0 :param maximum_value: The maximum value the calculator can store. Default: none - """ + ''' self._values: typing.Dict[str, typing.Any] = {} if initial_value is not None: self._values["initial_value"] = initial_value @@ -2190,23 +2226,23 @@ class CalculatorProps: @builtins.property def initial_value(self) -> typing.Optional[jsii.Number]: - """The initial value of the calculator. + '''The initial value of the calculator. NOTE: Any number works here, it's fine. :default: 0 - """ + ''' result = self._values.get("initial_value") - return result + return typing.cast(typing.Optional[jsii.Number], result) @builtins.property def maximum_value(self) -> typing.Optional[jsii.Number]: - """The maximum value the calculator can store. + '''The maximum value the calculator can store. :default: none - """ + ''' result = self._values.get("maximum_value") - return result + return typing.cast(typing.Optional[jsii.Number], result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -2229,61 +2265,61 @@ class ClassWithCollections( map: typing.Mapping[builtins.str, builtins.str], array: typing.List[builtins.str], ) -> None: - """ + ''' :param map: - :param array: - - """ + ''' jsii.create(ClassWithCollections, self, [map, array]) - @jsii.member(jsii_name="createAList") + @jsii.member(jsii_name="createAList") # type: ignore[misc] @builtins.classmethod def create_a_list(cls) -> typing.List[builtins.str]: - return jsii.sinvoke(cls, "createAList", []) + return typing.cast(typing.List[builtins.str], jsii.sinvoke(cls, "createAList", [])) - @jsii.member(jsii_name="createAMap") + @jsii.member(jsii_name="createAMap") # type: ignore[misc] @builtins.classmethod def create_a_map(cls) -> typing.Mapping[builtins.str, builtins.str]: - return jsii.sinvoke(cls, "createAMap", []) + return typing.cast(typing.Mapping[builtins.str, builtins.str], jsii.sinvoke(cls, "createAMap", [])) - @jsii.python.classproperty # type: ignore + @jsii.python.classproperty # type: ignore[misc] @jsii.member(jsii_name="staticArray") def static_array(cls) -> typing.List[builtins.str]: - return jsii.sget(cls, "staticArray") + return typing.cast(typing.List[builtins.str], jsii.sget(cls, "staticArray")) - @static_array.setter # type: ignore + @static_array.setter # type: ignore[no-redef] def static_array(cls, value: typing.List[builtins.str]) -> None: jsii.sset(cls, "staticArray", value) - @jsii.python.classproperty # type: ignore + @jsii.python.classproperty # type: ignore[misc] @jsii.member(jsii_name="staticMap") def static_map(cls) -> typing.Mapping[builtins.str, builtins.str]: - return jsii.sget(cls, "staticMap") + return typing.cast(typing.Mapping[builtins.str, builtins.str], jsii.sget(cls, "staticMap")) - @static_map.setter # type: ignore + @static_map.setter # type: ignore[no-redef] def static_map(cls, value: typing.Mapping[builtins.str, builtins.str]) -> None: jsii.sset(cls, "staticMap", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="array") def array(self) -> typing.List[builtins.str]: - return jsii.get(self, "array") + return typing.cast(typing.List[builtins.str], jsii.get(self, "array")) - @array.setter # type: ignore + @array.setter def array(self, value: typing.List[builtins.str]) -> None: jsii.set(self, "array", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="map") def map(self) -> typing.Mapping[builtins.str, builtins.str]: - return jsii.get(self, "map") + return typing.cast(typing.Mapping[builtins.str, builtins.str], jsii.get(self, "map")) - @map.setter # type: ignore + @map.setter def map(self, value: typing.Mapping[builtins.str, builtins.str]) -> None: jsii.set(self, "map", value) class ClassWithDocs(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ClassWithDocs"): - """This class has docs. + '''This class has docs. The docs are great. They're a bunch of tags. @@ -2295,7 +2331,7 @@ class ClassWithDocs(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ClassWithDocs" # Example automatically generated. See https://github.com/aws/jsii/issues/826 def an_example(): pass - """ + ''' def __init__(self) -> None: jsii.create(ClassWithDocs, self, []) @@ -2306,22 +2342,22 @@ class ClassWithJavaReservedWords( jsii_type="jsii-calc.ClassWithJavaReservedWords", ): def __init__(self, int: builtins.str) -> None: - """ + ''' :param int: - - """ + ''' jsii.create(ClassWithJavaReservedWords, self, [int]) @jsii.member(jsii_name="import") def import_(self, assert_: builtins.str) -> builtins.str: - """ + ''' :param assert_: - - """ - return jsii.invoke(self, "import", [assert_]) + ''' + return typing.cast(builtins.str, jsii.invoke(self, "import", [assert_])) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="int") def int(self) -> builtins.str: - return jsii.get(self, "int") + return typing.cast(builtins.str, jsii.get(self, "int")) class ClassWithMutableObjectLiteralProperty( @@ -2331,12 +2367,12 @@ class ClassWithMutableObjectLiteralProperty( def __init__(self) -> None: jsii.create(ClassWithMutableObjectLiteralProperty, self, []) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="mutableObject") def mutable_object(self) -> "IMutableObjectLiteral": - return jsii.get(self, "mutableObject") + return typing.cast("IMutableObjectLiteral", jsii.get(self, "mutableObject")) - @mutable_object.setter # type: ignore + @mutable_object.setter def mutable_object(self, value: "IMutableObjectLiteral") -> None: jsii.set(self, "mutableObject", value) @@ -2345,29 +2381,29 @@ class ConfusingToJackson( metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ConfusingToJackson", ): - """This tries to confuse Jackson by having overloaded property setters. + '''This tries to confuse Jackson by having overloaded property setters. :see: https://github.com/aws/aws-cdk/issues/4080 - """ + ''' - @jsii.member(jsii_name="makeInstance") + @jsii.member(jsii_name="makeInstance") # type: ignore[misc] @builtins.classmethod def make_instance(cls) -> "ConfusingToJackson": - return jsii.sinvoke(cls, "makeInstance", []) + return typing.cast("ConfusingToJackson", jsii.sinvoke(cls, "makeInstance", [])) - @jsii.member(jsii_name="makeStructInstance") + @jsii.member(jsii_name="makeStructInstance") # type: ignore[misc] @builtins.classmethod def make_struct_instance(cls) -> "ConfusingToJacksonStruct": - return jsii.sinvoke(cls, "makeStructInstance", []) + return typing.cast("ConfusingToJacksonStruct", jsii.sinvoke(cls, "makeStructInstance", [])) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="unionProperty") def union_property( self, ) -> typing.Optional[typing.Union[scope.jsii_calc_lib.IFriendly, typing.List[typing.Union[scope.jsii_calc_lib.IFriendly, "AbstractClass"]]]]: - return jsii.get(self, "unionProperty") + return typing.cast(typing.Optional[typing.Union[scope.jsii_calc_lib.IFriendly, typing.List[typing.Union[scope.jsii_calc_lib.IFriendly, "AbstractClass"]]]], jsii.get(self, "unionProperty")) - @union_property.setter # type: ignore + @union_property.setter def union_property( self, value: typing.Optional[typing.Union[scope.jsii_calc_lib.IFriendly, typing.List[typing.Union[scope.jsii_calc_lib.IFriendly, "AbstractClass"]]]], @@ -2386,9 +2422,9 @@ class ConfusingToJacksonStruct: *, union_property: typing.Optional[typing.Union[scope.jsii_calc_lib.IFriendly, typing.List[typing.Union[scope.jsii_calc_lib.IFriendly, "AbstractClass"]]]] = None, ) -> None: - """ + ''' :param union_property: - """ + ''' self._values: typing.Dict[str, typing.Any] = {} if union_property is not None: self._values["union_property"] = union_property @@ -2398,7 +2434,7 @@ class ConfusingToJacksonStruct: self, ) -> typing.Optional[typing.Union[scope.jsii_calc_lib.IFriendly, typing.List[typing.Union[scope.jsii_calc_lib.IFriendly, "AbstractClass"]]]]: result = self._values.get("union_property") - return result + return typing.cast(typing.Optional[typing.Union[scope.jsii_calc_lib.IFriendly, typing.List[typing.Union[scope.jsii_calc_lib.IFriendly, "AbstractClass"]]]], result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -2417,9 +2453,9 @@ class ConstructorPassesThisOut( jsii_type="jsii-calc.ConstructorPassesThisOut", ): def __init__(self, consumer: "PartiallyInitializedThisConsumer") -> None: - """ + ''' :param consumer: - - """ + ''' jsii.create(ConstructorPassesThisOut, self, [consumer]) @@ -2427,40 +2463,40 @@ class Constructors(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Constructors"): def __init__(self) -> None: jsii.create(Constructors, self, []) - @jsii.member(jsii_name="hiddenInterface") + @jsii.member(jsii_name="hiddenInterface") # type: ignore[misc] @builtins.classmethod def hidden_interface(cls) -> "IPublicInterface": - return jsii.sinvoke(cls, "hiddenInterface", []) + return typing.cast("IPublicInterface", jsii.sinvoke(cls, "hiddenInterface", [])) - @jsii.member(jsii_name="hiddenInterfaces") + @jsii.member(jsii_name="hiddenInterfaces") # type: ignore[misc] @builtins.classmethod def hidden_interfaces(cls) -> typing.List["IPublicInterface"]: - return jsii.sinvoke(cls, "hiddenInterfaces", []) + return typing.cast(typing.List["IPublicInterface"], jsii.sinvoke(cls, "hiddenInterfaces", [])) - @jsii.member(jsii_name="hiddenSubInterfaces") + @jsii.member(jsii_name="hiddenSubInterfaces") # type: ignore[misc] @builtins.classmethod def hidden_sub_interfaces(cls) -> typing.List["IPublicInterface"]: - return jsii.sinvoke(cls, "hiddenSubInterfaces", []) + return typing.cast(typing.List["IPublicInterface"], jsii.sinvoke(cls, "hiddenSubInterfaces", [])) - @jsii.member(jsii_name="makeClass") + @jsii.member(jsii_name="makeClass") # type: ignore[misc] @builtins.classmethod def make_class(cls) -> "PublicClass": - return jsii.sinvoke(cls, "makeClass", []) + return typing.cast("PublicClass", jsii.sinvoke(cls, "makeClass", [])) - @jsii.member(jsii_name="makeInterface") + @jsii.member(jsii_name="makeInterface") # type: ignore[misc] @builtins.classmethod def make_interface(cls) -> "IPublicInterface": - return jsii.sinvoke(cls, "makeInterface", []) + return typing.cast("IPublicInterface", jsii.sinvoke(cls, "makeInterface", [])) - @jsii.member(jsii_name="makeInterface2") + @jsii.member(jsii_name="makeInterface2") # type: ignore[misc] @builtins.classmethod def make_interface2(cls) -> "IPublicInterface2": - return jsii.sinvoke(cls, "makeInterface2", []) + return typing.cast("IPublicInterface2", jsii.sinvoke(cls, "makeInterface2", [])) - @jsii.member(jsii_name="makeInterfaces") + @jsii.member(jsii_name="makeInterfaces") # type: ignore[misc] @builtins.classmethod def make_interfaces(cls) -> typing.List["IPublicInterface"]: - return jsii.sinvoke(cls, "makeInterfaces", []) + return typing.cast(typing.List["IPublicInterface"], jsii.sinvoke(cls, "makeInterfaces", [])) class ConsumePureInterface( @@ -2468,118 +2504,118 @@ class ConsumePureInterface( jsii_type="jsii-calc.ConsumePureInterface", ): def __init__(self, delegate: "IStructReturningDelegate") -> None: - """ + ''' :param delegate: - - """ + ''' jsii.create(ConsumePureInterface, self, [delegate]) @jsii.member(jsii_name="workItBaby") def work_it_baby(self) -> "StructB": - return jsii.invoke(self, "workItBaby", []) + return typing.cast("StructB", jsii.invoke(self, "workItBaby", [])) class ConsumerCanRingBell( metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ConsumerCanRingBell", ): - """Test calling back to consumers that implement interfaces. + '''Test calling back to consumers that implement interfaces. Check that if a JSII consumer implements IConsumerWithInterfaceParam, they can call the method on the argument that they're passed... - """ + ''' def __init__(self) -> None: jsii.create(ConsumerCanRingBell, self, []) - @jsii.member(jsii_name="staticImplementedByObjectLiteral") + @jsii.member(jsii_name="staticImplementedByObjectLiteral") # type: ignore[misc] @builtins.classmethod def static_implemented_by_object_literal( cls, ringer: "IBellRinger", ) -> builtins.bool: - """...if the interface is implemented using an object literal. + '''...if the interface is implemented using an object literal. Returns whether the bell was rung. :param ringer: - - """ - return jsii.sinvoke(cls, "staticImplementedByObjectLiteral", [ringer]) + ''' + return typing.cast(builtins.bool, jsii.sinvoke(cls, "staticImplementedByObjectLiteral", [ringer])) - @jsii.member(jsii_name="staticImplementedByPrivateClass") + @jsii.member(jsii_name="staticImplementedByPrivateClass") # type: ignore[misc] @builtins.classmethod def static_implemented_by_private_class( cls, ringer: "IBellRinger", ) -> builtins.bool: - """...if the interface is implemented using a private class. + '''...if the interface is implemented using a private class. Return whether the bell was rung. :param ringer: - - """ - return jsii.sinvoke(cls, "staticImplementedByPrivateClass", [ringer]) + ''' + return typing.cast(builtins.bool, jsii.sinvoke(cls, "staticImplementedByPrivateClass", [ringer])) - @jsii.member(jsii_name="staticImplementedByPublicClass") + @jsii.member(jsii_name="staticImplementedByPublicClass") # type: ignore[misc] @builtins.classmethod def static_implemented_by_public_class(cls, ringer: "IBellRinger") -> builtins.bool: - """...if the interface is implemented using a public class. + '''...if the interface is implemented using a public class. Return whether the bell was rung. :param ringer: - - """ - return jsii.sinvoke(cls, "staticImplementedByPublicClass", [ringer]) + ''' + return typing.cast(builtins.bool, jsii.sinvoke(cls, "staticImplementedByPublicClass", [ringer])) - @jsii.member(jsii_name="staticWhenTypedAsClass") + @jsii.member(jsii_name="staticWhenTypedAsClass") # type: ignore[misc] @builtins.classmethod def static_when_typed_as_class(cls, ringer: "IConcreteBellRinger") -> builtins.bool: - """If the parameter is a concrete class instead of an interface. + '''If the parameter is a concrete class instead of an interface. Return whether the bell was rung. :param ringer: - - """ - return jsii.sinvoke(cls, "staticWhenTypedAsClass", [ringer]) + ''' + return typing.cast(builtins.bool, jsii.sinvoke(cls, "staticWhenTypedAsClass", [ringer])) @jsii.member(jsii_name="implementedByObjectLiteral") def implemented_by_object_literal(self, ringer: "IBellRinger") -> builtins.bool: - """...if the interface is implemented using an object literal. + '''...if the interface is implemented using an object literal. Returns whether the bell was rung. :param ringer: - - """ - return jsii.invoke(self, "implementedByObjectLiteral", [ringer]) + ''' + return typing.cast(builtins.bool, jsii.invoke(self, "implementedByObjectLiteral", [ringer])) @jsii.member(jsii_name="implementedByPrivateClass") def implemented_by_private_class(self, ringer: "IBellRinger") -> builtins.bool: - """...if the interface is implemented using a private class. + '''...if the interface is implemented using a private class. Return whether the bell was rung. :param ringer: - - """ - return jsii.invoke(self, "implementedByPrivateClass", [ringer]) + ''' + return typing.cast(builtins.bool, jsii.invoke(self, "implementedByPrivateClass", [ringer])) @jsii.member(jsii_name="implementedByPublicClass") def implemented_by_public_class(self, ringer: "IBellRinger") -> builtins.bool: - """...if the interface is implemented using a public class. + '''...if the interface is implemented using a public class. Return whether the bell was rung. :param ringer: - - """ - return jsii.invoke(self, "implementedByPublicClass", [ringer]) + ''' + return typing.cast(builtins.bool, jsii.invoke(self, "implementedByPublicClass", [ringer])) @jsii.member(jsii_name="whenTypedAsClass") def when_typed_as_class(self, ringer: "IConcreteBellRinger") -> builtins.bool: - """If the parameter is a concrete class instead of an interface. + '''If the parameter is a concrete class instead of an interface. Return whether the bell was rung. :param ringer: - - """ - return jsii.invoke(self, "whenTypedAsClass", [ringer]) + ''' + return typing.cast(builtins.bool, jsii.invoke(self, "whenTypedAsClass", [ringer])) class ConsumersOfThisCrazyTypeSystem( @@ -2594,24 +2630,24 @@ class ConsumersOfThisCrazyTypeSystem( self, obj: "IAnotherPublicInterface", ) -> builtins.str: - """ + ''' :param obj: - - """ - return jsii.invoke(self, "consumeAnotherPublicInterface", [obj]) + ''' + return typing.cast(builtins.str, jsii.invoke(self, "consumeAnotherPublicInterface", [obj])) @jsii.member(jsii_name="consumeNonInternalInterface") def consume_non_internal_interface( self, obj: "INonInternalInterface", ) -> typing.Any: - """ + ''' :param obj: - - """ - return jsii.invoke(self, "consumeNonInternalInterface", [obj]) + ''' + return typing.cast(typing.Any, jsii.invoke(self, "consumeNonInternalInterface", [obj])) class DataRenderer(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DataRenderer"): - """Verifies proper type handling through dynamic overrides.""" + '''Verifies proper type handling through dynamic overrides.''' def __init__(self) -> None: jsii.create(DataRenderer, self, []) @@ -2624,33 +2660,33 @@ class DataRenderer(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DataRenderer"): astring: builtins.str, first_optional: typing.Optional[typing.List[builtins.str]] = None, ) -> builtins.str: - """ + ''' :param anumber: (deprecated) An awesome number value. :param astring: (deprecated) A string value. :param first_optional: - """ + ''' data = scope.jsii_calc_lib.MyFirstStruct( anumber=anumber, astring=astring, first_optional=first_optional ) - return jsii.invoke(self, "render", [data]) + return typing.cast(builtins.str, jsii.invoke(self, "render", [data])) @jsii.member(jsii_name="renderArbitrary") def render_arbitrary( self, data: typing.Mapping[builtins.str, typing.Any], ) -> builtins.str: - """ + ''' :param data: - - """ - return jsii.invoke(self, "renderArbitrary", [data]) + ''' + return typing.cast(builtins.str, jsii.invoke(self, "renderArbitrary", [data])) @jsii.member(jsii_name="renderMap") def render_map(self, map: typing.Mapping[builtins.str, typing.Any]) -> builtins.str: - """ + ''' :param map: - - """ - return jsii.invoke(self, "renderMap", [map]) + ''' + return typing.cast(builtins.str, jsii.invoke(self, "renderMap", [map])) class DefaultedConstructorArgument( @@ -2663,128 +2699,128 @@ class DefaultedConstructorArgument( arg2: typing.Optional[builtins.str] = None, arg3: typing.Optional[datetime.datetime] = None, ) -> None: - """ + ''' :param arg1: - :param arg2: - :param arg3: - - """ + ''' jsii.create(DefaultedConstructorArgument, self, [arg1, arg2, arg3]) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="arg1") def arg1(self) -> jsii.Number: - return jsii.get(self, "arg1") + return typing.cast(jsii.Number, jsii.get(self, "arg1")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="arg3") def arg3(self) -> datetime.datetime: - return jsii.get(self, "arg3") + return typing.cast(datetime.datetime, jsii.get(self, "arg3")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="arg2") def arg2(self) -> typing.Optional[builtins.str]: - return jsii.get(self, "arg2") + return typing.cast(typing.Optional[builtins.str], jsii.get(self, "arg2")) class Demonstrate982(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Demonstrate982"): - """1. + '''1. call #takeThis() -> An ObjectRef will be provisioned for the value (it'll be re-used!) 2. call #takeThisToo() -> The ObjectRef from before will need to be down-cased to the ParentStruct982 type - """ + ''' def __init__(self) -> None: jsii.create(Demonstrate982, self, []) - @jsii.member(jsii_name="takeThis") + @jsii.member(jsii_name="takeThis") # type: ignore[misc] @builtins.classmethod def take_this(cls) -> "ChildStruct982": - """It's dangerous to go alone!""" - return jsii.sinvoke(cls, "takeThis", []) + '''It's dangerous to go alone!''' + return typing.cast("ChildStruct982", jsii.sinvoke(cls, "takeThis", [])) - @jsii.member(jsii_name="takeThisToo") + @jsii.member(jsii_name="takeThisToo") # type: ignore[misc] @builtins.classmethod def take_this_too(cls) -> "ParentStruct982": - """It's dangerous to go alone!""" - return jsii.sinvoke(cls, "takeThisToo", []) + '''It's dangerous to go alone!''' + return typing.cast("ParentStruct982", jsii.sinvoke(cls, "takeThisToo", [])) class DeprecatedClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DeprecatedClass"): - """ + ''' :deprecated: a pretty boring class :stability: deprecated - """ + ''' def __init__( self, readonly_string: builtins.str, mutable_number: typing.Optional[jsii.Number] = None, ) -> None: - """ + ''' :param readonly_string: - :param mutable_number: - :deprecated: this constructor is "just" okay :stability: deprecated - """ + ''' jsii.create(DeprecatedClass, self, [readonly_string, mutable_number]) @jsii.member(jsii_name="method") def method(self) -> None: - """ + ''' :deprecated: it was a bad idea :stability: deprecated - """ - return jsii.invoke(self, "method", []) + ''' + return typing.cast(None, jsii.invoke(self, "method", [])) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="readonlyProperty") def readonly_property(self) -> builtins.str: - """ + ''' :deprecated: this is not always "wazoo", be ready to be disappointed :stability: deprecated - """ - return jsii.get(self, "readonlyProperty") + ''' + return typing.cast(builtins.str, jsii.get(self, "readonlyProperty")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: - """ + ''' :deprecated: shouldn't have been mutable :stability: deprecated - """ - return jsii.get(self, "mutableProperty") + ''' + return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "mutableProperty")) - @mutable_property.setter # type: ignore + @mutable_property.setter def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: jsii.set(self, "mutableProperty", value) @jsii.enum(jsii_type="jsii-calc.DeprecatedEnum") class DeprecatedEnum(enum.Enum): - """ + ''' :deprecated: your deprecated selection of bad options :stability: deprecated - """ + ''' OPTION_A = "OPTION_A" - """ + ''' :deprecated: option A is not great :stability: deprecated - """ + ''' OPTION_B = "OPTION_B" - """ + ''' :deprecated: option B is kinda bad, too :stability: deprecated - """ + ''' @jsii.data_type( @@ -2794,27 +2830,27 @@ class DeprecatedEnum(enum.Enum): ) class DeprecatedStruct: def __init__(self, *, readonly_property: builtins.str) -> None: - """ + ''' :param readonly_property: :deprecated: it just wraps a string :stability: deprecated - """ + ''' self._values: typing.Dict[str, typing.Any] = { "readonly_property": readonly_property, } @builtins.property def readonly_property(self) -> builtins.str: - """ + ''' :deprecated: well, yeah :stability: deprecated - """ + ''' result = self._values.get("readonly_property") assert result is not None, "Required property 'readonly_property' is missing" - return result + return typing.cast(builtins.str, result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -2857,7 +2893,7 @@ class DerivedStruct(scope.jsii_calc_lib.MyFirstStruct): optional_any: typing.Any = None, optional_array: typing.Optional[typing.List[builtins.str]] = None, ) -> None: - """A struct which derives from another struct. + '''A struct which derives from another struct. :param anumber: (deprecated) An awesome number value. :param astring: (deprecated) A string value. @@ -2868,7 +2904,7 @@ class DerivedStruct(scope.jsii_calc_lib.MyFirstStruct): :param another_optional: This is optional. :param optional_any: :param optional_array: - """ + ''' self._values: typing.Dict[str, typing.Any] = { "anumber": anumber, "astring": astring, @@ -2887,68 +2923,68 @@ class DerivedStruct(scope.jsii_calc_lib.MyFirstStruct): @builtins.property def anumber(self) -> jsii.Number: - """(deprecated) An awesome number value. + '''(deprecated) An awesome number value. :stability: deprecated - """ + ''' result = self._values.get("anumber") assert result is not None, "Required property 'anumber' is missing" - return result + return typing.cast(jsii.Number, result) @builtins.property def astring(self) -> builtins.str: - """(deprecated) A string value. + '''(deprecated) A string value. :stability: deprecated - """ + ''' result = self._values.get("astring") assert result is not None, "Required property 'astring' is missing" - return result + return typing.cast(builtins.str, result) @builtins.property def first_optional(self) -> typing.Optional[typing.List[builtins.str]]: - """ + ''' :stability: deprecated - """ + ''' result = self._values.get("first_optional") - return result + return typing.cast(typing.Optional[typing.List[builtins.str]], result) @builtins.property def another_required(self) -> datetime.datetime: result = self._values.get("another_required") assert result is not None, "Required property 'another_required' is missing" - return result + return typing.cast(datetime.datetime, result) @builtins.property def bool(self) -> builtins.bool: result = self._values.get("bool") assert result is not None, "Required property 'bool' is missing" - return result + return typing.cast(builtins.bool, result) @builtins.property def non_primitive(self) -> "DoubleTrouble": - """An example of a non primitive property.""" + '''An example of a non primitive property.''' result = self._values.get("non_primitive") assert result is not None, "Required property 'non_primitive' is missing" - return result + return typing.cast("DoubleTrouble", result) @builtins.property def another_optional( self, ) -> typing.Optional[typing.Mapping[builtins.str, scope.jsii_calc_lib.NumericValue]]: - """This is optional.""" + '''This is optional.''' result = self._values.get("another_optional") - return result + return typing.cast(typing.Optional[typing.Mapping[builtins.str, scope.jsii_calc_lib.NumericValue]], result) @builtins.property def optional_any(self) -> typing.Any: result = self._values.get("optional_any") - return result + return typing.cast(typing.Any, result) @builtins.property def optional_array(self) -> typing.Optional[typing.List[builtins.str]]: result = self._values.get("optional_array") - return result + return typing.cast(typing.Optional[typing.List[builtins.str]], result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -2969,9 +3005,9 @@ class DerivedStruct(scope.jsii_calc_lib.MyFirstStruct): ) class DiamondInheritanceBaseLevelStruct: def __init__(self, *, base_level_property: builtins.str) -> None: - """ + ''' :param base_level_property: - """ + ''' self._values: typing.Dict[str, typing.Any] = { "base_level_property": base_level_property, } @@ -2980,7 +3016,7 @@ class DiamondInheritanceBaseLevelStruct: def base_level_property(self) -> builtins.str: result = self._values.get("base_level_property") assert result is not None, "Required property 'base_level_property' is missing" - return result + return typing.cast(builtins.str, result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -3009,10 +3045,10 @@ class DiamondInheritanceFirstMidLevelStruct(DiamondInheritanceBaseLevelStruct): base_level_property: builtins.str, first_mid_level_property: builtins.str, ) -> None: - """ + ''' :param base_level_property: :param first_mid_level_property: - """ + ''' self._values: typing.Dict[str, typing.Any] = { "base_level_property": base_level_property, "first_mid_level_property": first_mid_level_property, @@ -3022,13 +3058,13 @@ class DiamondInheritanceFirstMidLevelStruct(DiamondInheritanceBaseLevelStruct): def base_level_property(self) -> builtins.str: result = self._values.get("base_level_property") assert result is not None, "Required property 'base_level_property' is missing" - return result + return typing.cast(builtins.str, result) @builtins.property def first_mid_level_property(self) -> builtins.str: result = self._values.get("first_mid_level_property") assert result is not None, "Required property 'first_mid_level_property' is missing" - return result + return typing.cast(builtins.str, result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -3057,10 +3093,10 @@ class DiamondInheritanceSecondMidLevelStruct(DiamondInheritanceBaseLevelStruct): base_level_property: builtins.str, second_mid_level_property: builtins.str, ) -> None: - """ + ''' :param base_level_property: :param second_mid_level_property: - """ + ''' self._values: typing.Dict[str, typing.Any] = { "base_level_property": base_level_property, "second_mid_level_property": second_mid_level_property, @@ -3070,13 +3106,13 @@ class DiamondInheritanceSecondMidLevelStruct(DiamondInheritanceBaseLevelStruct): def base_level_property(self) -> builtins.str: result = self._values.get("base_level_property") assert result is not None, "Required property 'base_level_property' is missing" - return result + return typing.cast(builtins.str, result) @builtins.property def second_mid_level_property(self) -> builtins.str: result = self._values.get("second_mid_level_property") assert result is not None, "Required property 'second_mid_level_property' is missing" - return result + return typing.cast(builtins.str, result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -3114,12 +3150,12 @@ class DiamondInheritanceTopLevelStruct( second_mid_level_property: builtins.str, top_level_property: builtins.str, ) -> None: - """ + ''' :param base_level_property: :param first_mid_level_property: :param second_mid_level_property: :param top_level_property: - """ + ''' self._values: typing.Dict[str, typing.Any] = { "base_level_property": base_level_property, "first_mid_level_property": first_mid_level_property, @@ -3131,25 +3167,25 @@ class DiamondInheritanceTopLevelStruct( def base_level_property(self) -> builtins.str: result = self._values.get("base_level_property") assert result is not None, "Required property 'base_level_property' is missing" - return result + return typing.cast(builtins.str, result) @builtins.property def first_mid_level_property(self) -> builtins.str: result = self._values.get("first_mid_level_property") assert result is not None, "Required property 'first_mid_level_property' is missing" - return result + return typing.cast(builtins.str, result) @builtins.property def second_mid_level_property(self) -> builtins.str: result = self._values.get("second_mid_level_property") assert result is not None, "Required property 'second_mid_level_property' is missing" - return result + return typing.cast(builtins.str, result) @builtins.property def top_level_property(self) -> builtins.str: result = self._values.get("top_level_property") assert result is not None, "Required property 'top_level_property' is missing" - return result + return typing.cast(builtins.str, result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -3167,28 +3203,28 @@ class DisappointingCollectionSource( metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DisappointingCollectionSource", ): - """Verifies that null/undefined can be returned for optional collections. + '''Verifies that null/undefined can be returned for optional collections. This source of collections is disappointing - it'll always give you nothing :( - """ + ''' - @jsii.python.classproperty # type: ignore + @jsii.python.classproperty # type: ignore[misc] @jsii.member(jsii_name="maybeList") def MAYBE_LIST(cls) -> typing.Optional[typing.List[builtins.str]]: - """Some List of strings, maybe? + '''Some List of strings, maybe? (Nah, just a billion dollars mistake!) - """ - return jsii.sget(cls, "maybeList") + ''' + return typing.cast(typing.Optional[typing.List[builtins.str]], jsii.sget(cls, "maybeList")) - @jsii.python.classproperty # type: ignore + @jsii.python.classproperty # type: ignore[misc] @jsii.member(jsii_name="maybeMap") def MAYBE_MAP(cls) -> typing.Optional[typing.Mapping[builtins.str, jsii.Number]]: - """Some Map of strings to numbers, maybe? + '''Some Map of strings to numbers, maybe? (Nah, just a billion dollars mistake!) - """ - return jsii.sget(cls, "maybeMap") + ''' + return typing.cast(typing.Optional[typing.Mapping[builtins.str, jsii.Number]], jsii.sget(cls, "maybeMap")) class DoNotOverridePrivates( @@ -3200,25 +3236,25 @@ class DoNotOverridePrivates( @jsii.member(jsii_name="changePrivatePropertyValue") def change_private_property_value(self, new_value: builtins.str) -> None: - """ + ''' :param new_value: - - """ - return jsii.invoke(self, "changePrivatePropertyValue", [new_value]) + ''' + return typing.cast(None, jsii.invoke(self, "changePrivatePropertyValue", [new_value])) @jsii.member(jsii_name="privateMethodValue") def private_method_value(self) -> builtins.str: - return jsii.invoke(self, "privateMethodValue", []) + return typing.cast(builtins.str, jsii.invoke(self, "privateMethodValue", [])) @jsii.member(jsii_name="privatePropertyValue") def private_property_value(self) -> builtins.str: - return jsii.invoke(self, "privatePropertyValue", []) + return typing.cast(builtins.str, jsii.invoke(self, "privatePropertyValue", [])) class DoNotRecognizeAnyAsOptional( metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DoNotRecognizeAnyAsOptional", ): - """jsii#284: do not recognize "any" as an optional argument.""" + '''jsii#284: do not recognize "any" as an optional argument.''' def __init__(self) -> None: jsii.create(DoNotRecognizeAnyAsOptional, self, []) @@ -3230,48 +3266,61 @@ class DoNotRecognizeAnyAsOptional( _optional_any: typing.Any = None, _optional_string: typing.Optional[builtins.str] = None, ) -> None: - """ + ''' :param _required_any: - :param _optional_any: - :param _optional_string: - - """ - return jsii.invoke(self, "method", [_required_any, _optional_any, _optional_string]) + ''' + return typing.cast(None, jsii.invoke(self, "method", [_required_any, _optional_any, _optional_string])) class DocumentedClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DocumentedClass"): - """Here's the first line of the TSDoc comment. + '''Here's the first line of the TSDoc comment. This is the meat of the TSDoc comment. It may contain multiple lines and multiple paragraphs. Multiple paragraphs are separated by an empty line. - """ + + Example:: + + # Example automatically generated. See https://github.com/aws/jsii/issues/826 + x = 12 + 44 + s1 = "string" + s2 = """string + with new newlines"""# see https://github.com/aws/jsii/issues/2569 + s3 = """string + with + new lines""" + ''' def __init__(self) -> None: jsii.create(DocumentedClass, self, []) @jsii.member(jsii_name="greet") def greet(self, *, name: typing.Optional[builtins.str] = None) -> jsii.Number: - """Greet the indicated person. + '''Greet the indicated person. - This will print out a friendly greeting intended for - the indicated person. + This will print out a friendly greeting intended for the indicated person. :param name: The name of the greetee. Default: world - :return: A number that everyone knows very well - """ + :return: + + A number that everyone knows very well and represents the answer + to the ultimate question + ''' greetee = Greetee(name=name) - return jsii.invoke(self, "greet", [greetee]) + return typing.cast(jsii.Number, jsii.invoke(self, "greet", [greetee])) @jsii.member(jsii_name="hola") def hola(self) -> None: - """(experimental) Say ยกHola! + '''(experimental) Say ยกHola! :stability: experimental - """ - return jsii.invoke(self, "hola", []) + ''' + return typing.cast(None, jsii.invoke(self, "hola", [])) class DontComplainAboutVariadicAfterOptional( @@ -3287,40 +3336,40 @@ class DontComplainAboutVariadicAfterOptional( optional: typing.Optional[builtins.str] = None, *things: builtins.str, ) -> builtins.str: - """ + ''' :param optional: - :param things: - - """ - return jsii.invoke(self, "optionalAndVariadic", [optional, *things]) + ''' + return typing.cast(builtins.str, 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.""" + '''Ensures we can override a dynamic property that was inherited.''' def __init__(self, value_store: builtins.str) -> None: - """ + ''' :param value_store: - - """ + ''' jsii.create(DynamicPropertyBearer, self, [value_store]) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="dynamicProperty") def dynamic_property(self) -> builtins.str: - return jsii.get(self, "dynamicProperty") + return typing.cast(builtins.str, jsii.get(self, "dynamicProperty")) - @dynamic_property.setter # type: ignore + @dynamic_property.setter def dynamic_property(self, value: builtins.str) -> None: jsii.set(self, "dynamicProperty", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="valueStore") def value_store(self) -> builtins.str: - return jsii.get(self, "valueStore") + return typing.cast(builtins.str, jsii.get(self, "valueStore")) - @value_store.setter # type: ignore + @value_store.setter def value_store(self, value: builtins.str) -> None: jsii.set(self, "valueStore", value) @@ -3331,83 +3380,83 @@ class DynamicPropertyBearerChild( jsii_type="jsii-calc.DynamicPropertyBearerChild", ): def __init__(self, original_value: builtins.str) -> None: - """ + ''' :param original_value: - - """ + ''' 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. + '''Sets \`\`this.dynamicProperty\`\` to the new value, and returns the old value. :param new_value: the new value to be set. :return: the old value that was set. - """ - return jsii.invoke(self, "overrideValue", [new_value]) + ''' + return typing.cast(builtins.str, jsii.invoke(self, "overrideValue", [new_value])) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="originalValue") def original_value(self) -> builtins.str: - return jsii.get(self, "originalValue") + return typing.cast(builtins.str, jsii.get(self, "originalValue")) class Entropy(metaclass=jsii.JSIIAbstractClass, jsii_type="jsii-calc.Entropy"): - """This class is used to validate that serialization and deserialization does not interpret ISO-8601-formatted timestampts to the native date/time object, as the jsii protocol has a $jsii$date wrapper for this purpose (node's JSON parsing does *NOT* detect dates automatically in this way, so host libraries should not either).""" + '''This class is used to validate that serialization and deserialization does not interpret ISO-8601-formatted timestampts to the native date/time object, as the jsii protocol has a $jsii$date wrapper for this purpose (node's JSON parsing does *NOT* detect dates automatically in this way, so host libraries should not either).''' @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_EntropyProxy"]: return _EntropyProxy def __init__(self, clock: "IWallClock") -> None: - """Creates a new instance of Entropy. + '''Creates a new instance of Entropy. :param clock: your implementation of \`\`WallClock\`\`. - """ + ''' jsii.create(Entropy, self, [clock]) @jsii.member(jsii_name="increase") def increase(self) -> builtins.str: - """Increases entropy by consuming time from the clock (yes, this is a long shot, please don't judge). + '''Increases entropy by consuming time from the clock (yes, this is a long shot, please don't judge). :return: the time from the \`\`WallClock\`\`. - """ - return jsii.invoke(self, "increase", []) + ''' + return typing.cast(builtins.str, jsii.invoke(self, "increase", [])) - @jsii.member(jsii_name="repeat") + @jsii.member(jsii_name="repeat") # type: ignore[misc] @abc.abstractmethod def repeat(self, word: builtins.str) -> builtins.str: - """Implement this method such that it returns \`\`word\`\`. + '''Implement this method such that it returns \`\`word\`\`. :param word: the value to return. :return: \`\`word\`\`. - """ + ''' ... class _EntropyProxy(Entropy): @jsii.member(jsii_name="repeat") def repeat(self, word: builtins.str) -> builtins.str: - """Implement this method such that it returns \`\`word\`\`. + '''Implement this method such that it returns \`\`word\`\`. :param word: the value to return. :return: \`\`word\`\`. - """ - return jsii.invoke(self, "repeat", [word]) + ''' + return typing.cast(builtins.str, jsii.invoke(self, "repeat", [word])) class EnumDispenser(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.EnumDispenser"): - @jsii.member(jsii_name="randomIntegerLikeEnum") + @jsii.member(jsii_name="randomIntegerLikeEnum") # type: ignore[misc] @builtins.classmethod def random_integer_like_enum(cls) -> AllTypesEnum: - return jsii.sinvoke(cls, "randomIntegerLikeEnum", []) + return typing.cast(AllTypesEnum, jsii.sinvoke(cls, "randomIntegerLikeEnum", [])) - @jsii.member(jsii_name="randomStringLikeEnum") + @jsii.member(jsii_name="randomStringLikeEnum") # type: ignore[misc] @builtins.classmethod def random_string_like_enum(cls) -> "StringEnum": - return jsii.sinvoke(cls, "randomStringLikeEnum", []) + return typing.cast("StringEnum", jsii.sinvoke(cls, "randomStringLikeEnum", [])) class EraseUndefinedHashValues( @@ -3417,34 +3466,34 @@ class EraseUndefinedHashValues( def __init__(self) -> None: jsii.create(EraseUndefinedHashValues, self, []) - @jsii.member(jsii_name="doesKeyExist") + @jsii.member(jsii_name="doesKeyExist") # type: ignore[misc] @builtins.classmethod def does_key_exist( cls, opts: "EraseUndefinedHashValuesOptions", key: builtins.str, ) -> builtins.bool: - """Returns \`\`true\`\` if \`\`key\`\` is defined in \`\`opts\`\`. + '''Returns \`\`true\`\` if \`\`key\`\` is defined in \`\`opts\`\`. Used to check that undefined/null hash values are being erased when sending values from native code to JS. :param opts: - :param key: - - """ - return jsii.sinvoke(cls, "doesKeyExist", [opts, key]) + ''' + return typing.cast(builtins.bool, jsii.sinvoke(cls, "doesKeyExist", [opts, key])) - @jsii.member(jsii_name="prop1IsNull") + @jsii.member(jsii_name="prop1IsNull") # type: ignore[misc] @builtins.classmethod def prop1_is_null(cls) -> typing.Mapping[builtins.str, typing.Any]: - """We expect "prop1" to be erased.""" - return jsii.sinvoke(cls, "prop1IsNull", []) + '''We expect "prop1" to be erased.''' + return typing.cast(typing.Mapping[builtins.str, typing.Any], jsii.sinvoke(cls, "prop1IsNull", [])) - @jsii.member(jsii_name="prop2IsUndefined") + @jsii.member(jsii_name="prop2IsUndefined") # type: ignore[misc] @builtins.classmethod def prop2_is_undefined(cls) -> typing.Mapping[builtins.str, typing.Any]: - """We expect "prop2" to be erased.""" - return jsii.sinvoke(cls, "prop2IsUndefined", []) + '''We expect "prop2" to be erased.''' + return typing.cast(typing.Mapping[builtins.str, typing.Any], jsii.sinvoke(cls, "prop2IsUndefined", [])) @jsii.data_type( @@ -3459,10 +3508,10 @@ class EraseUndefinedHashValuesOptions: option1: typing.Optional[builtins.str] = None, option2: typing.Optional[builtins.str] = None, ) -> None: - """ + ''' :param option1: :param option2: - """ + ''' self._values: typing.Dict[str, typing.Any] = {} if option1 is not None: self._values["option1"] = option1 @@ -3472,12 +3521,12 @@ class EraseUndefinedHashValuesOptions: @builtins.property def option1(self) -> typing.Optional[builtins.str]: result = self._values.get("option1") - return result + return typing.cast(typing.Optional[builtins.str], result) @builtins.property def option2(self) -> typing.Optional[builtins.str]: result = self._values.get("option2") - return result + return typing.cast(typing.Optional[builtins.str], result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -3495,65 +3544,65 @@ class ExperimentalClass( metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ExperimentalClass", ): - """ + ''' :stability: experimental - """ + ''' def __init__( self, readonly_string: builtins.str, mutable_number: typing.Optional[jsii.Number] = None, ) -> None: - """ + ''' :param readonly_string: - :param mutable_number: - :stability: experimental - """ + ''' jsii.create(ExperimentalClass, self, [readonly_string, mutable_number]) @jsii.member(jsii_name="method") def method(self) -> None: - """ + ''' :stability: experimental - """ - return jsii.invoke(self, "method", []) + ''' + return typing.cast(None, jsii.invoke(self, "method", [])) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="readonlyProperty") def readonly_property(self) -> builtins.str: - """ + ''' :stability: experimental - """ - return jsii.get(self, "readonlyProperty") + ''' + return typing.cast(builtins.str, jsii.get(self, "readonlyProperty")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: - """ + ''' :stability: experimental - """ - return jsii.get(self, "mutableProperty") + ''' + return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "mutableProperty")) - @mutable_property.setter # type: ignore + @mutable_property.setter def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: jsii.set(self, "mutableProperty", value) @jsii.enum(jsii_type="jsii-calc.ExperimentalEnum") class ExperimentalEnum(enum.Enum): - """ + ''' :stability: experimental - """ + ''' OPTION_A = "OPTION_A" - """ + ''' :stability: experimental - """ + ''' OPTION_B = "OPTION_B" - """ + ''' :stability: experimental - """ + ''' @jsii.data_type( @@ -3563,23 +3612,23 @@ class ExperimentalEnum(enum.Enum): ) class ExperimentalStruct: def __init__(self, *, readonly_property: builtins.str) -> None: - """ + ''' :param readonly_property: :stability: experimental - """ + ''' self._values: typing.Dict[str, typing.Any] = { "readonly_property": readonly_property, } @builtins.property def readonly_property(self) -> builtins.str: - """ + ''' :stability: experimental - """ + ''' result = self._values.get("readonly_property") assert result is not None, "Required property 'readonly_property' is missing" - return result + return typing.cast(builtins.str, result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -3598,15 +3647,15 @@ class ExportedBaseClass( jsii_type="jsii-calc.ExportedBaseClass", ): def __init__(self, success: builtins.bool) -> None: - """ + ''' :param success: - - """ + ''' jsii.create(ExportedBaseClass, self, [success]) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="success") def success(self) -> builtins.bool: - return jsii.get(self, "success") + return typing.cast(builtins.bool, jsii.get(self, "success")) @jsii.data_type( @@ -3616,10 +3665,10 @@ class ExportedBaseClass( ) class ExtendsInternalInterface: def __init__(self, *, boom: builtins.bool, prop: builtins.str) -> None: - """ + ''' :param boom: :param prop: - """ + ''' self._values: typing.Dict[str, typing.Any] = { "boom": boom, "prop": prop, @@ -3629,13 +3678,13 @@ class ExtendsInternalInterface: def boom(self) -> builtins.bool: result = self._values.get("boom") assert result is not None, "Required property 'boom' is missing" - return result + return typing.cast(builtins.bool, result) @builtins.property def prop(self) -> builtins.str: result = self._values.get("prop") assert result is not None, "Required property 'prop' is missing" - return result + return typing.cast(builtins.str, result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -3650,65 +3699,65 @@ class ExtendsInternalInterface: class ExternalClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ExternalClass"): - """ + ''' :external: true - """ + ''' def __init__( self, readonly_string: builtins.str, mutable_number: typing.Optional[jsii.Number] = None, ) -> None: - """ + ''' :param readonly_string: - :param mutable_number: - :external: true - """ + ''' jsii.create(ExternalClass, self, [readonly_string, mutable_number]) @jsii.member(jsii_name="method") def method(self) -> None: - """ + ''' :external: true - """ - return jsii.invoke(self, "method", []) + ''' + return typing.cast(None, jsii.invoke(self, "method", [])) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="readonlyProperty") def readonly_property(self) -> builtins.str: - """ + ''' :external: true - """ - return jsii.get(self, "readonlyProperty") + ''' + return typing.cast(builtins.str, jsii.get(self, "readonlyProperty")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: - """ + ''' :external: true - """ - return jsii.get(self, "mutableProperty") + ''' + return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "mutableProperty")) - @mutable_property.setter # type: ignore + @mutable_property.setter def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: jsii.set(self, "mutableProperty", value) @jsii.enum(jsii_type="jsii-calc.ExternalEnum") class ExternalEnum(enum.Enum): - """ + ''' :external: true - """ + ''' OPTION_A = "OPTION_A" - """ + ''' :external: true - """ + ''' OPTION_B = "OPTION_B" - """ + ''' :external: true - """ + ''' @jsii.data_type( @@ -3718,23 +3767,23 @@ class ExternalEnum(enum.Enum): ) class ExternalStruct: def __init__(self, *, readonly_property: builtins.str) -> None: - """ + ''' :param readonly_property: :external: true - """ + ''' self._values: typing.Dict[str, typing.Any] = { "readonly_property": readonly_property, } @builtins.property def readonly_property(self) -> builtins.str: - """ + ''' :external: true - """ + ''' result = self._values.get("readonly_property") assert result is not None, "Required property 'readonly_property' is missing" - return result + return typing.cast(builtins.str, result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -3766,7 +3815,7 @@ class GiveMeStructs(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.GiveMeStructs" 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. + '''Accepts a struct of type DerivedStruct and returns a struct of type FirstStruct. :param another_required: :param bool: @@ -3777,7 +3826,7 @@ class GiveMeStructs(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.GiveMeStructs" :param anumber: (deprecated) An awesome number value. :param astring: (deprecated) A string value. :param first_optional: - """ + ''' derived = DerivedStruct( another_required=another_required, bool=bool, @@ -3790,7 +3839,7 @@ class GiveMeStructs(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.GiveMeStructs" first_optional=first_optional, ) - return jsii.invoke(self, "derivedToFirst", [derived]) + return typing.cast(scope.jsii_calc_lib.MyFirstStruct, jsii.invoke(self, "derivedToFirst", [derived])) @jsii.member(jsii_name="readDerivedNonPrimitive") def read_derived_non_primitive( @@ -3806,7 +3855,7 @@ class GiveMeStructs(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.GiveMeStructs" astring: builtins.str, first_optional: typing.Optional[typing.List[builtins.str]] = None, ) -> "DoubleTrouble": - """Returns the boolean from a DerivedStruct struct. + '''Returns the boolean from a DerivedStruct struct. :param another_required: :param bool: @@ -3817,7 +3866,7 @@ class GiveMeStructs(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.GiveMeStructs" :param anumber: (deprecated) An awesome number value. :param astring: (deprecated) A string value. :param first_optional: - """ + ''' derived = DerivedStruct( another_required=another_required, bool=bool, @@ -3830,7 +3879,7 @@ class GiveMeStructs(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.GiveMeStructs" first_optional=first_optional, ) - return jsii.invoke(self, "readDerivedNonPrimitive", [derived]) + return typing.cast("DoubleTrouble", jsii.invoke(self, "readDerivedNonPrimitive", [derived])) @jsii.member(jsii_name="readFirstNumber") def read_first_number( @@ -3840,22 +3889,22 @@ class GiveMeStructs(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.GiveMeStructs" astring: builtins.str, first_optional: typing.Optional[typing.List[builtins.str]] = None, ) -> jsii.Number: - """Returns the "anumber" from a MyFirstStruct struct; + '''Returns the "anumber" from a MyFirstStruct struct; :param anumber: (deprecated) An awesome number value. :param astring: (deprecated) A string value. :param first_optional: - """ + ''' first = scope.jsii_calc_lib.MyFirstStruct( anumber=anumber, astring=astring, first_optional=first_optional ) - return jsii.invoke(self, "readFirstNumber", [first]) + return typing.cast(jsii.Number, jsii.invoke(self, "readFirstNumber", [first])) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="structLiteral") def struct_literal(self) -> scope.jsii_calc_lib.StructWithOnlyOptionals: - return jsii.get(self, "structLiteral") + return typing.cast(scope.jsii_calc_lib.StructWithOnlyOptionals, jsii.get(self, "structLiteral")) @jsii.data_type( @@ -3865,22 +3914,22 @@ class GiveMeStructs(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.GiveMeStructs" ) class Greetee: def __init__(self, *, name: typing.Optional[builtins.str] = None) -> None: - """These are some arguments you can pass to a method. + '''These are some arguments you can pass to a method. :param name: The name of the greetee. Default: world - """ + ''' self._values: typing.Dict[str, typing.Any] = {} if name is not None: self._values["name"] = name @builtins.property def name(self) -> typing.Optional[builtins.str]: - """The name of the greetee. + '''The name of the greetee. :default: world - """ + ''' result = self._values.get("name") - return result + return typing.cast(typing.Optional[builtins.str], result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -3903,18 +3952,18 @@ class GreetingAugmenter( @jsii.member(jsii_name="betterGreeting") def better_greeting(self, friendly: scope.jsii_calc_lib.IFriendly) -> builtins.str: - """ + ''' :param friendly: - - """ - return jsii.invoke(self, "betterGreeting", [friendly]) + ''' + return typing.cast(builtins.str, jsii.invoke(self, "betterGreeting", [friendly])) @jsii.interface(jsii_type="jsii-calc.IAnonymousImplementationProvider") class IAnonymousImplementationProvider(typing_extensions.Protocol): - """We can return an anonymous interface implementation from an override without losing the interface declarations.""" + '''We can return an anonymous interface implementation from an override without losing the interface declarations.''' @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IAnonymousImplementationProviderProxy"]: return _IAnonymousImplementationProviderProxy @jsii.member(jsii_name="provideAsClass") @@ -3927,26 +3976,26 @@ class IAnonymousImplementationProvider(typing_extensions.Protocol): class _IAnonymousImplementationProviderProxy: - """We can return an anonymous interface implementation from an override without losing the interface declarations.""" + '''We can return an anonymous interface implementation from an override without losing the interface declarations.''' __jsii_type__: typing.ClassVar[str] = "jsii-calc.IAnonymousImplementationProvider" @jsii.member(jsii_name="provideAsClass") def provide_as_class(self) -> "Implementation": - return jsii.invoke(self, "provideAsClass", []) + return typing.cast("Implementation", jsii.invoke(self, "provideAsClass", [])) @jsii.member(jsii_name="provideAsInterface") def provide_as_interface(self) -> "IAnonymouslyImplementMe": - return jsii.invoke(self, "provideAsInterface", []) + return typing.cast("IAnonymouslyImplementMe", jsii.invoke(self, "provideAsInterface", [])) @jsii.interface(jsii_type="jsii-calc.IAnonymouslyImplementMe") class IAnonymouslyImplementMe(typing_extensions.Protocol): @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IAnonymouslyImplementMeProxy"]: return _IAnonymouslyImplementMeProxy - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="value") def value(self) -> jsii.Number: ... @@ -3959,28 +4008,28 @@ class IAnonymouslyImplementMe(typing_extensions.Protocol): class _IAnonymouslyImplementMeProxy: __jsii_type__: typing.ClassVar[str] = "jsii-calc.IAnonymouslyImplementMe" - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="value") def value(self) -> jsii.Number: - return jsii.get(self, "value") + return typing.cast(jsii.Number, jsii.get(self, "value")) @jsii.member(jsii_name="verb") def verb(self) -> builtins.str: - return jsii.invoke(self, "verb", []) + return typing.cast(builtins.str, jsii.invoke(self, "verb", [])) @jsii.interface(jsii_type="jsii-calc.IAnotherPublicInterface") class IAnotherPublicInterface(typing_extensions.Protocol): @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IAnotherPublicInterfaceProxy"]: return _IAnotherPublicInterfaceProxy - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="a") def a(self) -> builtins.str: ... - @a.setter # type: ignore + @a.setter def a(self, value: builtins.str) -> None: ... @@ -3988,12 +4037,12 @@ class IAnotherPublicInterface(typing_extensions.Protocol): class _IAnotherPublicInterfaceProxy: __jsii_type__: typing.ClassVar[str] = "jsii-calc.IAnotherPublicInterface" - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="a") def a(self) -> builtins.str: - return jsii.get(self, "a") + return typing.cast(builtins.str, jsii.get(self, "a")) - @a.setter # type: ignore + @a.setter def a(self, value: builtins.str) -> None: jsii.set(self, "a", value) @@ -4001,7 +4050,7 @@ class _IAnotherPublicInterfaceProxy: @jsii.interface(jsii_type="jsii-calc.IBell") class IBell(typing_extensions.Protocol): @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IBellProxy"]: return _IBellProxy @jsii.member(jsii_name="ring") @@ -4014,210 +4063,210 @@ class _IBellProxy: @jsii.member(jsii_name="ring") def ring(self) -> None: - return jsii.invoke(self, "ring", []) + return typing.cast(None, jsii.invoke(self, "ring", [])) @jsii.interface(jsii_type="jsii-calc.IBellRinger") class IBellRinger(typing_extensions.Protocol): - """Takes the object parameter as an interface.""" + '''Takes the object parameter as an interface.''' @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IBellRingerProxy"]: return _IBellRingerProxy @jsii.member(jsii_name="yourTurn") def your_turn(self, bell: IBell) -> None: - """ + ''' :param bell: - - """ + ''' ... class _IBellRingerProxy: - """Takes the object parameter as an interface.""" + '''Takes the object parameter as an interface.''' __jsii_type__: typing.ClassVar[str] = "jsii-calc.IBellRinger" @jsii.member(jsii_name="yourTurn") def your_turn(self, bell: IBell) -> None: - """ + ''' :param bell: - - """ - return jsii.invoke(self, "yourTurn", [bell]) + ''' + return typing.cast(None, jsii.invoke(self, "yourTurn", [bell])) @jsii.interface(jsii_type="jsii-calc.IConcreteBellRinger") class IConcreteBellRinger(typing_extensions.Protocol): - """Takes the object parameter as a calss.""" + '''Takes the object parameter as a calss.''' @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IConcreteBellRingerProxy"]: return _IConcreteBellRingerProxy @jsii.member(jsii_name="yourTurn") def your_turn(self, bell: "Bell") -> None: - """ + ''' :param bell: - - """ + ''' ... class _IConcreteBellRingerProxy: - """Takes the object parameter as a calss.""" + '''Takes the object parameter as a calss.''' __jsii_type__: typing.ClassVar[str] = "jsii-calc.IConcreteBellRinger" @jsii.member(jsii_name="yourTurn") def your_turn(self, bell: "Bell") -> None: - """ + ''' :param bell: - - """ - return jsii.invoke(self, "yourTurn", [bell]) + ''' + return typing.cast(None, jsii.invoke(self, "yourTurn", [bell])) @jsii.interface(jsii_type="jsii-calc.IDeprecatedInterface") class IDeprecatedInterface(typing_extensions.Protocol): - """ + ''' :deprecated: useless interface :stability: deprecated - """ + ''' @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IDeprecatedInterfaceProxy"]: return _IDeprecatedInterfaceProxy - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: - """ + ''' :deprecated: could be better :stability: deprecated - """ + ''' ... - @mutable_property.setter # type: ignore + @mutable_property.setter def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: ... @jsii.member(jsii_name="method") def method(self) -> None: - """ + ''' :deprecated: services no purpose :stability: deprecated - """ + ''' ... class _IDeprecatedInterfaceProxy: - """ + ''' :deprecated: useless interface :stability: deprecated - """ + ''' __jsii_type__: typing.ClassVar[str] = "jsii-calc.IDeprecatedInterface" - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: - """ + ''' :deprecated: could be better :stability: deprecated - """ - return jsii.get(self, "mutableProperty") + ''' + return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "mutableProperty")) - @mutable_property.setter # type: ignore + @mutable_property.setter def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: jsii.set(self, "mutableProperty", value) @jsii.member(jsii_name="method") def method(self) -> None: - """ + ''' :deprecated: services no purpose :stability: deprecated - """ - return jsii.invoke(self, "method", []) + ''' + return typing.cast(None, jsii.invoke(self, "method", [])) @jsii.interface(jsii_type="jsii-calc.IExperimentalInterface") class IExperimentalInterface(typing_extensions.Protocol): - """ + ''' :stability: experimental - """ + ''' @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IExperimentalInterfaceProxy"]: return _IExperimentalInterfaceProxy - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: - """ + ''' :stability: experimental - """ + ''' ... - @mutable_property.setter # type: ignore + @mutable_property.setter def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: ... @jsii.member(jsii_name="method") def method(self) -> None: - """ + ''' :stability: experimental - """ + ''' ... class _IExperimentalInterfaceProxy: - """ + ''' :stability: experimental - """ + ''' __jsii_type__: typing.ClassVar[str] = "jsii-calc.IExperimentalInterface" - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: - """ + ''' :stability: experimental - """ - return jsii.get(self, "mutableProperty") + ''' + return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "mutableProperty")) - @mutable_property.setter # type: ignore + @mutable_property.setter def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: jsii.set(self, "mutableProperty", value) @jsii.member(jsii_name="method") def method(self) -> None: - """ + ''' :stability: experimental - """ - return jsii.invoke(self, "method", []) + ''' + return typing.cast(None, jsii.invoke(self, "method", [])) @jsii.interface(jsii_type="jsii-calc.IExtendsPrivateInterface") class IExtendsPrivateInterface(typing_extensions.Protocol): @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IExtendsPrivateInterfaceProxy"]: return _IExtendsPrivateInterfaceProxy - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="moreThings") def more_things(self) -> typing.List[builtins.str]: ... - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="private") def private(self) -> builtins.str: ... - @private.setter # type: ignore + @private.setter def private(self, value: builtins.str) -> None: ... @@ -4225,150 +4274,150 @@ class IExtendsPrivateInterface(typing_extensions.Protocol): class _IExtendsPrivateInterfaceProxy: __jsii_type__: typing.ClassVar[str] = "jsii-calc.IExtendsPrivateInterface" - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="moreThings") def more_things(self) -> typing.List[builtins.str]: - return jsii.get(self, "moreThings") + return typing.cast(typing.List[builtins.str], jsii.get(self, "moreThings")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="private") def private(self) -> builtins.str: - return jsii.get(self, "private") + return typing.cast(builtins.str, jsii.get(self, "private")) - @private.setter # type: ignore + @private.setter def private(self, value: builtins.str) -> None: jsii.set(self, "private", value) @jsii.interface(jsii_type="jsii-calc.IExternalInterface") class IExternalInterface(typing_extensions.Protocol): - """ + ''' :external: true - """ + ''' @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IExternalInterfaceProxy"]: return _IExternalInterfaceProxy - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: - """ + ''' :external: true - """ + ''' ... - @mutable_property.setter # type: ignore + @mutable_property.setter def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: ... @jsii.member(jsii_name="method") def method(self) -> None: - """ + ''' :external: true - """ + ''' ... class _IExternalInterfaceProxy: - """ + ''' :external: true - """ + ''' __jsii_type__: typing.ClassVar[str] = "jsii-calc.IExternalInterface" - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: - """ + ''' :external: true - """ - return jsii.get(self, "mutableProperty") + ''' + return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "mutableProperty")) - @mutable_property.setter # type: ignore + @mutable_property.setter def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: jsii.set(self, "mutableProperty", value) @jsii.member(jsii_name="method") def method(self) -> None: - """ + ''' :external: true - """ - return jsii.invoke(self, "method", []) + ''' + return typing.cast(None, jsii.invoke(self, "method", [])) @jsii.interface(jsii_type="jsii-calc.IFriendlier") class IFriendlier(scope.jsii_calc_lib.IFriendly, typing_extensions.Protocol): - """Even friendlier classes can implement this interface.""" + '''Even friendlier classes can implement this interface.''' @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IFriendlierProxy"]: return _IFriendlierProxy @jsii.member(jsii_name="farewell") def farewell(self) -> builtins.str: - """Say farewell.""" + '''Say farewell.''' ... @jsii.member(jsii_name="goodbye") def goodbye(self) -> builtins.str: - """Say goodbye. + '''Say goodbye. :return: A goodbye blessing. - """ + ''' ... class _IFriendlierProxy( - jsii.proxy_for(scope.jsii_calc_lib.IFriendly) # type: ignore + jsii.proxy_for(scope.jsii_calc_lib.IFriendly) # type: ignore[misc] ): - """Even friendlier classes can implement this interface.""" + '''Even friendlier classes can implement this interface.''' __jsii_type__: typing.ClassVar[str] = "jsii-calc.IFriendlier" @jsii.member(jsii_name="farewell") def farewell(self) -> builtins.str: - """Say farewell.""" - return jsii.invoke(self, "farewell", []) + '''Say farewell.''' + return typing.cast(builtins.str, jsii.invoke(self, "farewell", [])) @jsii.member(jsii_name="goodbye") def goodbye(self) -> builtins.str: - """Say goodbye. + '''Say goodbye. :return: A goodbye blessing. - """ - return jsii.invoke(self, "goodbye", []) + ''' + return typing.cast(builtins.str, jsii.invoke(self, "goodbye", [])) @jsii.interface(jsii_type="jsii-calc.IInterfaceImplementedByAbstractClass") class IInterfaceImplementedByAbstractClass(typing_extensions.Protocol): - """awslabs/jsii#220 Abstract return type.""" + '''awslabs/jsii#220 Abstract return type.''' @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IInterfaceImplementedByAbstractClassProxy"]: return _IInterfaceImplementedByAbstractClassProxy - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="propFromInterface") def prop_from_interface(self) -> builtins.str: ... class _IInterfaceImplementedByAbstractClassProxy: - """awslabs/jsii#220 Abstract return type.""" + '''awslabs/jsii#220 Abstract return type.''' __jsii_type__: typing.ClassVar[str] = "jsii-calc.IInterfaceImplementedByAbstractClass" - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="propFromInterface") def prop_from_interface(self) -> builtins.str: - return jsii.get(self, "propFromInterface") + return typing.cast(builtins.str, jsii.get(self, "propFromInterface")) @jsii.interface(jsii_type="jsii-calc.IInterfaceWithInternal") class IInterfaceWithInternal(typing_extensions.Protocol): @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IInterfaceWithInternalProxy"]: return _IInterfaceWithInternalProxy @jsii.member(jsii_name="visible") @@ -4381,16 +4430,16 @@ class _IInterfaceWithInternalProxy: @jsii.member(jsii_name="visible") def visible(self) -> None: - return jsii.invoke(self, "visible", []) + return typing.cast(None, jsii.invoke(self, "visible", [])) @jsii.interface(jsii_type="jsii-calc.IInterfaceWithMethods") class IInterfaceWithMethods(typing_extensions.Protocol): @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IInterfaceWithMethodsProxy"]: return _IInterfaceWithMethodsProxy - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="value") def value(self) -> builtins.str: ... @@ -4403,22 +4452,22 @@ class IInterfaceWithMethods(typing_extensions.Protocol): class _IInterfaceWithMethodsProxy: __jsii_type__: typing.ClassVar[str] = "jsii-calc.IInterfaceWithMethods" - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="value") def value(self) -> builtins.str: - return jsii.get(self, "value") + return typing.cast(builtins.str, jsii.get(self, "value")) @jsii.member(jsii_name="doThings") def do_things(self) -> None: - return jsii.invoke(self, "doThings", []) + return typing.cast(None, jsii.invoke(self, "doThings", [])) @jsii.interface(jsii_type="jsii-calc.IInterfaceWithOptionalMethodArguments") class IInterfaceWithOptionalMethodArguments(typing_extensions.Protocol): - """awslabs/jsii#175 Interface proxies (and builders) do not respect optional arguments in methods.""" + '''awslabs/jsii#175 Interface proxies (and builders) do not respect optional arguments in methods.''' @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IInterfaceWithOptionalMethodArgumentsProxy"]: return _IInterfaceWithOptionalMethodArgumentsProxy @jsii.member(jsii_name="hello") @@ -4427,15 +4476,15 @@ class IInterfaceWithOptionalMethodArguments(typing_extensions.Protocol): arg1: builtins.str, arg2: typing.Optional[jsii.Number] = None, ) -> None: - """ + ''' :param arg1: - :param arg2: - - """ + ''' ... class _IInterfaceWithOptionalMethodArgumentsProxy: - """awslabs/jsii#175 Interface proxies (and builders) do not respect optional arguments in methods.""" + '''awslabs/jsii#175 Interface proxies (and builders) do not respect optional arguments in methods.''' __jsii_type__: typing.ClassVar[str] = "jsii-calc.IInterfaceWithOptionalMethodArguments" @@ -4445,30 +4494,30 @@ class _IInterfaceWithOptionalMethodArgumentsProxy: arg1: builtins.str, arg2: typing.Optional[jsii.Number] = None, ) -> None: - """ + ''' :param arg1: - :param arg2: - - """ - return jsii.invoke(self, "hello", [arg1, arg2]) + ''' + return typing.cast(None, jsii.invoke(self, "hello", [arg1, arg2])) @jsii.interface(jsii_type="jsii-calc.IInterfaceWithProperties") class IInterfaceWithProperties(typing_extensions.Protocol): @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IInterfaceWithPropertiesProxy"]: return _IInterfaceWithPropertiesProxy - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="readOnlyString") def read_only_string(self) -> builtins.str: ... - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="readWriteString") def read_write_string(self) -> builtins.str: ... - @read_write_string.setter # type: ignore + @read_write_string.setter def read_write_string(self, value: builtins.str) -> None: ... @@ -4476,17 +4525,17 @@ class IInterfaceWithProperties(typing_extensions.Protocol): class _IInterfaceWithPropertiesProxy: __jsii_type__: typing.ClassVar[str] = "jsii-calc.IInterfaceWithProperties" - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="readOnlyString") def read_only_string(self) -> builtins.str: - return jsii.get(self, "readOnlyString") + return typing.cast(builtins.str, jsii.get(self, "readOnlyString")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="readWriteString") def read_write_string(self) -> builtins.str: - return jsii.get(self, "readWriteString") + return typing.cast(builtins.str, jsii.get(self, "readWriteString")) - @read_write_string.setter # type: ignore + @read_write_string.setter def read_write_string(self, value: builtins.str) -> None: jsii.set(self, "readWriteString", value) @@ -4497,30 +4546,30 @@ class IInterfaceWithPropertiesExtension( typing_extensions.Protocol, ): @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IInterfaceWithPropertiesExtensionProxy"]: return _IInterfaceWithPropertiesExtensionProxy - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="foo") def foo(self) -> jsii.Number: ... - @foo.setter # type: ignore + @foo.setter def foo(self, value: jsii.Number) -> None: ... class _IInterfaceWithPropertiesExtensionProxy( - jsii.proxy_for(IInterfaceWithProperties) # type: ignore + jsii.proxy_for(IInterfaceWithProperties) # type: ignore[misc] ): __jsii_type__: typing.ClassVar[str] = "jsii-calc.IInterfaceWithPropertiesExtension" - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="foo") def foo(self) -> jsii.Number: - return jsii.get(self, "foo") + return typing.cast(jsii.Number, jsii.get(self, "foo")) - @foo.setter # type: ignore + @foo.setter def foo(self, value: jsii.Number) -> None: jsii.set(self, "foo", value) @@ -4528,10 +4577,10 @@ class _IInterfaceWithPropertiesExtensionProxy( @jsii.interface(jsii_type="jsii-calc.IJSII417PublicBaseOfBase") class IJSII417PublicBaseOfBase(typing_extensions.Protocol): @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IJSII417PublicBaseOfBaseProxy"]: return _IJSII417PublicBaseOfBaseProxy - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="hasRoot") def has_root(self) -> builtins.bool: ... @@ -4544,20 +4593,20 @@ class IJSII417PublicBaseOfBase(typing_extensions.Protocol): class _IJSII417PublicBaseOfBaseProxy: __jsii_type__: typing.ClassVar[str] = "jsii-calc.IJSII417PublicBaseOfBase" - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="hasRoot") def has_root(self) -> builtins.bool: - return jsii.get(self, "hasRoot") + return typing.cast(builtins.bool, jsii.get(self, "hasRoot")) @jsii.member(jsii_name="foo") def foo(self) -> None: - return jsii.invoke(self, "foo", []) + return typing.cast(None, jsii.invoke(self, "foo", [])) @jsii.interface(jsii_type="jsii-calc.IJsii487External") class IJsii487External(typing_extensions.Protocol): @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IJsii487ExternalProxy"]: return _IJsii487ExternalProxy @@ -4569,7 +4618,7 @@ class _IJsii487ExternalProxy: @jsii.interface(jsii_type="jsii-calc.IJsii487External2") class IJsii487External2(typing_extensions.Protocol): @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IJsii487External2Proxy"]: return _IJsii487External2Proxy @@ -4581,7 +4630,7 @@ class _IJsii487External2Proxy: @jsii.interface(jsii_type="jsii-calc.IJsii496") class IJsii496(typing_extensions.Protocol): @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IJsii496Proxy"]: return _IJsii496Proxy @@ -4593,15 +4642,15 @@ class _IJsii496Proxy: @jsii.interface(jsii_type="jsii-calc.IMutableObjectLiteral") class IMutableObjectLiteral(typing_extensions.Protocol): @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IMutableObjectLiteralProxy"]: return _IMutableObjectLiteralProxy - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="value") def value(self) -> builtins.str: ... - @value.setter # type: ignore + @value.setter def value(self, value: builtins.str) -> None: ... @@ -4609,12 +4658,12 @@ class IMutableObjectLiteral(typing_extensions.Protocol): class _IMutableObjectLiteralProxy: __jsii_type__: typing.ClassVar[str] = "jsii-calc.IMutableObjectLiteral" - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="value") def value(self) -> builtins.str: - return jsii.get(self, "value") + return typing.cast(builtins.str, jsii.get(self, "value")) - @value.setter # type: ignore + @value.setter def value(self, value: builtins.str) -> None: jsii.set(self, "value", value) @@ -4622,66 +4671,66 @@ class _IMutableObjectLiteralProxy: @jsii.interface(jsii_type="jsii-calc.INonInternalInterface") class INonInternalInterface(IAnotherPublicInterface, typing_extensions.Protocol): @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_INonInternalInterfaceProxy"]: return _INonInternalInterfaceProxy - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="b") def b(self) -> builtins.str: ... - @b.setter # type: ignore + @b.setter def b(self, value: builtins.str) -> None: ... - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="c") def c(self) -> builtins.str: ... - @c.setter # type: ignore + @c.setter def c(self, value: builtins.str) -> None: ... class _INonInternalInterfaceProxy( - jsii.proxy_for(IAnotherPublicInterface) # type: ignore + jsii.proxy_for(IAnotherPublicInterface) # type: ignore[misc] ): __jsii_type__: typing.ClassVar[str] = "jsii-calc.INonInternalInterface" - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="b") def b(self) -> builtins.str: - return jsii.get(self, "b") + return typing.cast(builtins.str, jsii.get(self, "b")) - @b.setter # type: ignore + @b.setter def b(self, value: builtins.str) -> None: jsii.set(self, "b", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="c") def c(self) -> builtins.str: - return jsii.get(self, "c") + return typing.cast(builtins.str, jsii.get(self, "c")) - @c.setter # type: ignore + @c.setter def c(self, value: builtins.str) -> None: jsii.set(self, "c", value) @jsii.interface(jsii_type="jsii-calc.IObjectWithProperty") class IObjectWithProperty(typing_extensions.Protocol): - """Make sure that setters are properly called on objects with interfaces.""" + '''Make sure that setters are properly called on objects with interfaces.''' @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IObjectWithPropertyProxy"]: return _IObjectWithPropertyProxy - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="property") def property(self) -> builtins.str: ... - @property.setter # type: ignore + @property.setter def property(self, value: builtins.str) -> None: ... @@ -4691,30 +4740,30 @@ class IObjectWithProperty(typing_extensions.Protocol): class _IObjectWithPropertyProxy: - """Make sure that setters are properly called on objects with interfaces.""" + '''Make sure that setters are properly called on objects with interfaces.''' __jsii_type__: typing.ClassVar[str] = "jsii-calc.IObjectWithProperty" - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="property") def property(self) -> builtins.str: - return jsii.get(self, "property") + return typing.cast(builtins.str, jsii.get(self, "property")) - @property.setter # type: ignore + @property.setter def property(self, value: builtins.str) -> None: jsii.set(self, "property", value) @jsii.member(jsii_name="wasSet") def was_set(self) -> builtins.bool: - return jsii.invoke(self, "wasSet", []) + return typing.cast(builtins.bool, jsii.invoke(self, "wasSet", [])) @jsii.interface(jsii_type="jsii-calc.IOptionalMethod") class IOptionalMethod(typing_extensions.Protocol): - """Checks that optional result from interface method code generates correctly.""" + '''Checks that optional result from interface method code generates correctly.''' @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IOptionalMethodProxy"]: return _IOptionalMethodProxy @jsii.member(jsii_name="optional") @@ -4723,22 +4772,22 @@ class IOptionalMethod(typing_extensions.Protocol): class _IOptionalMethodProxy: - """Checks that optional result from interface method code generates correctly.""" + '''Checks that optional result from interface method code generates correctly.''' __jsii_type__: typing.ClassVar[str] = "jsii-calc.IOptionalMethod" @jsii.member(jsii_name="optional") def optional(self) -> typing.Optional[builtins.str]: - return jsii.invoke(self, "optional", []) + return typing.cast(typing.Optional[builtins.str], jsii.invoke(self, "optional", [])) @jsii.interface(jsii_type="jsii-calc.IPrivatelyImplemented") class IPrivatelyImplemented(typing_extensions.Protocol): @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IPrivatelyImplementedProxy"]: return _IPrivatelyImplementedProxy - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="success") def success(self) -> builtins.bool: ... @@ -4747,16 +4796,16 @@ class IPrivatelyImplemented(typing_extensions.Protocol): class _IPrivatelyImplementedProxy: __jsii_type__: typing.ClassVar[str] = "jsii-calc.IPrivatelyImplemented" - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="success") def success(self) -> builtins.bool: - return jsii.get(self, "success") + return typing.cast(builtins.bool, jsii.get(self, "success")) @jsii.interface(jsii_type="jsii-calc.IPublicInterface") class IPublicInterface(typing_extensions.Protocol): @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IPublicInterfaceProxy"]: return _IPublicInterfaceProxy @jsii.member(jsii_name="bye") @@ -4769,13 +4818,13 @@ class _IPublicInterfaceProxy: @jsii.member(jsii_name="bye") def bye(self) -> builtins.str: - return jsii.invoke(self, "bye", []) + return typing.cast(builtins.str, jsii.invoke(self, "bye", [])) @jsii.interface(jsii_type="jsii-calc.IPublicInterface2") class IPublicInterface2(typing_extensions.Protocol): @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IPublicInterface2Proxy"]: return _IPublicInterface2Proxy @jsii.member(jsii_name="ciao") @@ -4788,72 +4837,72 @@ class _IPublicInterface2Proxy: @jsii.member(jsii_name="ciao") def ciao(self) -> builtins.str: - return jsii.invoke(self, "ciao", []) + return typing.cast(builtins.str, jsii.invoke(self, "ciao", [])) @jsii.interface(jsii_type="jsii-calc.IRandomNumberGenerator") class IRandomNumberGenerator(typing_extensions.Protocol): - """Generates random numbers.""" + '''Generates random numbers.''' @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IRandomNumberGeneratorProxy"]: return _IRandomNumberGeneratorProxy @jsii.member(jsii_name="next") def next(self) -> jsii.Number: - """Returns another random number. + '''Returns another random number. :return: A random number. - """ + ''' ... class _IRandomNumberGeneratorProxy: - """Generates random numbers.""" + '''Generates random numbers.''' __jsii_type__: typing.ClassVar[str] = "jsii-calc.IRandomNumberGenerator" @jsii.member(jsii_name="next") def next(self) -> jsii.Number: - """Returns another random number. + '''Returns another random number. :return: A random number. - """ - return jsii.invoke(self, "next", []) + ''' + return typing.cast(jsii.Number, jsii.invoke(self, "next", [])) @jsii.interface(jsii_type="jsii-calc.IReturnJsii976") class IReturnJsii976(typing_extensions.Protocol): - """Returns a subclass of a known class which implements an interface.""" + '''Returns a subclass of a known class which implements an interface.''' @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IReturnJsii976Proxy"]: return _IReturnJsii976Proxy - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="foo") def foo(self) -> jsii.Number: ... class _IReturnJsii976Proxy: - """Returns a subclass of a known class which implements an interface.""" + '''Returns a subclass of a known class which implements an interface.''' __jsii_type__: typing.ClassVar[str] = "jsii-calc.IReturnJsii976" - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="foo") def foo(self) -> jsii.Number: - return jsii.get(self, "foo") + return typing.cast(jsii.Number, jsii.get(self, "foo")) @jsii.interface(jsii_type="jsii-calc.IReturnsNumber") class IReturnsNumber(typing_extensions.Protocol): @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IReturnsNumberProxy"]: return _IReturnsNumberProxy - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="numberProp") def number_prop(self) -> scope.jsii_calc_lib.Number: ... @@ -4866,28 +4915,28 @@ class IReturnsNumber(typing_extensions.Protocol): class _IReturnsNumberProxy: __jsii_type__: typing.ClassVar[str] = "jsii-calc.IReturnsNumber" - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="numberProp") def number_prop(self) -> scope.jsii_calc_lib.Number: - return jsii.get(self, "numberProp") + return typing.cast(scope.jsii_calc_lib.Number, jsii.get(self, "numberProp")) @jsii.member(jsii_name="obtainNumber") def obtain_number(self) -> scope.jsii_calc_lib.IDoublable: - return jsii.invoke(self, "obtainNumber", []) + return typing.cast(scope.jsii_calc_lib.IDoublable, jsii.invoke(self, "obtainNumber", [])) @jsii.interface(jsii_type="jsii-calc.IStableInterface") class IStableInterface(typing_extensions.Protocol): @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IStableInterfaceProxy"]: return _IStableInterfaceProxy - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: ... - @mutable_property.setter # type: ignore + @mutable_property.setter def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: ... @@ -4899,26 +4948,26 @@ class IStableInterface(typing_extensions.Protocol): class _IStableInterfaceProxy: __jsii_type__: typing.ClassVar[str] = "jsii-calc.IStableInterface" - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: - return jsii.get(self, "mutableProperty") + return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "mutableProperty")) - @mutable_property.setter # type: ignore + @mutable_property.setter def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: jsii.set(self, "mutableProperty", value) @jsii.member(jsii_name="method") def method(self) -> None: - return jsii.invoke(self, "method", []) + return typing.cast(None, jsii.invoke(self, "method", [])) @jsii.interface(jsii_type="jsii-calc.IStructReturningDelegate") class IStructReturningDelegate(typing_extensions.Protocol): - """Verifies that a "pure" implementation of an interface works correctly.""" + '''Verifies that a "pure" implementation of an interface works correctly.''' @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IStructReturningDelegateProxy"]: return _IStructReturningDelegateProxy @jsii.member(jsii_name="returnStruct") @@ -4927,38 +4976,38 @@ class IStructReturningDelegate(typing_extensions.Protocol): class _IStructReturningDelegateProxy: - """Verifies that a "pure" implementation of an interface works correctly.""" + '''Verifies that a "pure" implementation of an interface works correctly.''' __jsii_type__: typing.ClassVar[str] = "jsii-calc.IStructReturningDelegate" @jsii.member(jsii_name="returnStruct") def return_struct(self) -> "StructB": - return jsii.invoke(self, "returnStruct", []) + return typing.cast("StructB", jsii.invoke(self, "returnStruct", [])) @jsii.interface(jsii_type="jsii-calc.IWallClock") class IWallClock(typing_extensions.Protocol): - """Implement this interface.""" + '''Implement this interface.''' @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IWallClockProxy"]: return _IWallClockProxy @jsii.member(jsii_name="iso8601Now") def iso8601_now(self) -> builtins.str: - """Returns the current time, formatted as an ISO-8601 string.""" + '''Returns the current time, formatted as an ISO-8601 string.''' ... class _IWallClockProxy: - """Implement this interface.""" + '''Implement this interface.''' __jsii_type__: typing.ClassVar[str] = "jsii-calc.IWallClock" @jsii.member(jsii_name="iso8601Now") def iso8601_now(self) -> builtins.str: - """Returns the current time, formatted as an ISO-8601 string.""" - return jsii.invoke(self, "iso8601Now", []) + '''Returns the current time, formatted as an ISO-8601 string.''' + return typing.cast(builtins.str, jsii.invoke(self, "iso8601Now", [])) class ImplementInternalInterface( @@ -4968,12 +5017,12 @@ class ImplementInternalInterface( def __init__(self) -> None: jsii.create(ImplementInternalInterface, self, []) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="prop") def prop(self) -> builtins.str: - return jsii.get(self, "prop") + return typing.cast(builtins.str, jsii.get(self, "prop")) - @prop.setter # type: ignore + @prop.setter def prop(self, value: builtins.str) -> None: jsii.set(self, "prop", value) @@ -4982,10 +5031,10 @@ class Implementation(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Implementatio def __init__(self) -> None: jsii.create(Implementation, self, []) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="value") def value(self) -> jsii.Number: - return jsii.get(self, "value") + return typing.cast(jsii.Number, jsii.get(self, "value")) @jsii.implements(IInterfaceWithInternal) @@ -4998,7 +5047,7 @@ class ImplementsInterfaceWithInternal( @jsii.member(jsii_name="visible") def visible(self) -> None: - return jsii.invoke(self, "visible", []) + return typing.cast(None, jsii.invoke(self, "visible", [])) class ImplementsInterfaceWithInternalSubclass( @@ -5017,12 +5066,12 @@ class ImplementsPrivateInterface( def __init__(self) -> None: jsii.create(ImplementsPrivateInterface, self, []) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="private") def private(self) -> builtins.str: - return jsii.get(self, "private") + return typing.cast(builtins.str, jsii.get(self, "private")) - @private.setter # type: ignore + @private.setter def private(self, value: builtins.str) -> None: jsii.set(self, "private", value) @@ -5040,11 +5089,11 @@ class ImplictBaseOfBase(scope.jsii_calc_base.BaseProps): bar: builtins.str, goo: datetime.datetime, ) -> None: - """ + ''' :param foo: - :param bar: - :param goo: - """ + ''' self._values: typing.Dict[str, typing.Any] = { "foo": foo, "bar": bar, @@ -5055,19 +5104,19 @@ class ImplictBaseOfBase(scope.jsii_calc_base.BaseProps): def foo(self) -> scope.jsii_calc_base_of_base.Very: result = self._values.get("foo") assert result is not None, "Required property 'foo' is missing" - return result + return typing.cast(scope.jsii_calc_base_of_base.Very, result) @builtins.property def bar(self) -> builtins.str: result = self._values.get("bar") assert result is not None, "Required property 'bar' is missing" - return result + return typing.cast(builtins.str, result) @builtins.property def goo(self) -> datetime.datetime: result = self._values.get("goo") assert result is not None, "Required property 'goo' is missing" - return result + return typing.cast(datetime.datetime, result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -5085,56 +5134,56 @@ class InterfaceCollections( metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.InterfaceCollections", ): - """Verifies that collections of interfaces or structs are correctly handled. + '''Verifies that collections of interfaces or structs are correctly handled. See: https://github.com/aws/jsii/issues/1196 - """ + ''' - @jsii.member(jsii_name="listOfInterfaces") + @jsii.member(jsii_name="listOfInterfaces") # type: ignore[misc] @builtins.classmethod def list_of_interfaces(cls) -> typing.List[IBell]: - return jsii.sinvoke(cls, "listOfInterfaces", []) + return typing.cast(typing.List[IBell], jsii.sinvoke(cls, "listOfInterfaces", [])) - @jsii.member(jsii_name="listOfStructs") + @jsii.member(jsii_name="listOfStructs") # type: ignore[misc] @builtins.classmethod def list_of_structs(cls) -> typing.List["StructA"]: - return jsii.sinvoke(cls, "listOfStructs", []) + return typing.cast(typing.List["StructA"], jsii.sinvoke(cls, "listOfStructs", [])) - @jsii.member(jsii_name="mapOfInterfaces") + @jsii.member(jsii_name="mapOfInterfaces") # type: ignore[misc] @builtins.classmethod def map_of_interfaces(cls) -> typing.Mapping[builtins.str, IBell]: - return jsii.sinvoke(cls, "mapOfInterfaces", []) + return typing.cast(typing.Mapping[builtins.str, IBell], jsii.sinvoke(cls, "mapOfInterfaces", [])) - @jsii.member(jsii_name="mapOfStructs") + @jsii.member(jsii_name="mapOfStructs") # type: ignore[misc] @builtins.classmethod def map_of_structs(cls) -> typing.Mapping[builtins.str, "StructA"]: - return jsii.sinvoke(cls, "mapOfStructs", []) + return typing.cast(typing.Mapping[builtins.str, "StructA"], jsii.sinvoke(cls, "mapOfStructs", [])) class InterfacesMaker(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.InterfacesMaker"): - """We can return arrays of interfaces See aws/aws-cdk#2362.""" + '''We can return arrays of interfaces See aws/aws-cdk#2362.''' - @jsii.member(jsii_name="makeInterfaces") + @jsii.member(jsii_name="makeInterfaces") # type: ignore[misc] @builtins.classmethod def make_interfaces( cls, count: jsii.Number, ) -> typing.List[scope.jsii_calc_lib.IDoublable]: - """ + ''' :param count: - - """ - return jsii.sinvoke(cls, "makeInterfaces", [count]) + ''' + return typing.cast(typing.List[scope.jsii_calc_lib.IDoublable], jsii.sinvoke(cls, "makeInterfaces", [count])) class Isomorphism(metaclass=jsii.JSIIAbstractClass, jsii_type="jsii-calc.Isomorphism"): - """Checks the "same instance" isomorphism is preserved within the constructor. + '''Checks the "same instance" isomorphism is preserved within the constructor. Create a subclass of this, and assert that \`\`this.myself()\`\` actually returns \`\`this\`\` from within the constructor. - """ + ''' @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IsomorphismProxy"]: return _IsomorphismProxy def __init__(self) -> None: @@ -5142,7 +5191,7 @@ class Isomorphism(metaclass=jsii.JSIIAbstractClass, jsii_type="jsii-calc.Isomorp @jsii.member(jsii_name="myself") def myself(self) -> "Isomorphism": - return jsii.invoke(self, "myself", []) + return typing.cast("Isomorphism", jsii.invoke(self, "myself", [])) class _IsomorphismProxy(Isomorphism): @@ -5156,19 +5205,19 @@ class JSII417PublicBaseOfBase( def __init__(self) -> None: jsii.create(JSII417PublicBaseOfBase, self, []) - @jsii.member(jsii_name="makeInstance") + @jsii.member(jsii_name="makeInstance") # type: ignore[misc] @builtins.classmethod def make_instance(cls) -> "JSII417PublicBaseOfBase": - return jsii.sinvoke(cls, "makeInstance", []) + return typing.cast("JSII417PublicBaseOfBase", jsii.sinvoke(cls, "makeInstance", [])) @jsii.member(jsii_name="foo") def foo(self) -> None: - return jsii.invoke(self, "foo", []) + return typing.cast(None, jsii.invoke(self, "foo", [])) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="hasRoot") def has_root(self) -> builtins.bool: - return jsii.get(self, "hasRoot") + return typing.cast(builtins.bool, jsii.get(self, "hasRoot")) class JSObjectLiteralForInterface( @@ -5180,11 +5229,11 @@ class JSObjectLiteralForInterface( @jsii.member(jsii_name="giveMeFriendly") def give_me_friendly(self) -> scope.jsii_calc_lib.IFriendly: - return jsii.invoke(self, "giveMeFriendly", []) + return typing.cast(scope.jsii_calc_lib.IFriendly, jsii.invoke(self, "giveMeFriendly", [])) @jsii.member(jsii_name="giveMeFriendlyGenerator") def give_me_friendly_generator(self) -> "IFriendlyRandomGenerator": - return jsii.invoke(self, "giveMeFriendlyGenerator", []) + return typing.cast("IFriendlyRandomGenerator", jsii.invoke(self, "giveMeFriendlyGenerator", [])) class JSObjectLiteralToNative( @@ -5196,7 +5245,7 @@ class JSObjectLiteralToNative( @jsii.member(jsii_name="returnLiteral") def return_literal(self) -> "JSObjectLiteralToNativeClass": - return jsii.invoke(self, "returnLiteral", []) + return typing.cast("JSObjectLiteralToNativeClass", jsii.invoke(self, "returnLiteral", [])) class JSObjectLiteralToNativeClass( @@ -5206,21 +5255,21 @@ class JSObjectLiteralToNativeClass( def __init__(self) -> None: jsii.create(JSObjectLiteralToNativeClass, self, []) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="propA") def prop_a(self) -> builtins.str: - return jsii.get(self, "propA") + return typing.cast(builtins.str, jsii.get(self, "propA")) - @prop_a.setter # type: ignore + @prop_a.setter def prop_a(self, value: builtins.str) -> None: jsii.set(self, "propA", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="propB") def prop_b(self) -> jsii.Number: - return jsii.get(self, "propB") + return typing.cast(jsii.Number, jsii.get(self, "propB")) - @prop_b.setter # type: ignore + @prop_b.setter def prop_b(self, value: jsii.Number) -> None: jsii.set(self, "propB", value) @@ -5234,218 +5283,218 @@ class JavaReservedWords( @jsii.member(jsii_name="abstract") def abstract(self) -> None: - return jsii.invoke(self, "abstract", []) + return typing.cast(None, jsii.invoke(self, "abstract", [])) @jsii.member(jsii_name="assert") def assert_(self) -> None: - return jsii.invoke(self, "assert", []) + return typing.cast(None, jsii.invoke(self, "assert", [])) @jsii.member(jsii_name="boolean") def boolean(self) -> None: - return jsii.invoke(self, "boolean", []) + return typing.cast(None, jsii.invoke(self, "boolean", [])) @jsii.member(jsii_name="break") def break_(self) -> None: - return jsii.invoke(self, "break", []) + return typing.cast(None, jsii.invoke(self, "break", [])) @jsii.member(jsii_name="byte") def byte(self) -> None: - return jsii.invoke(self, "byte", []) + return typing.cast(None, jsii.invoke(self, "byte", [])) @jsii.member(jsii_name="case") def case(self) -> None: - return jsii.invoke(self, "case", []) + return typing.cast(None, jsii.invoke(self, "case", [])) @jsii.member(jsii_name="catch") def catch(self) -> None: - return jsii.invoke(self, "catch", []) + return typing.cast(None, jsii.invoke(self, "catch", [])) @jsii.member(jsii_name="char") def char(self) -> None: - return jsii.invoke(self, "char", []) + return typing.cast(None, jsii.invoke(self, "char", [])) @jsii.member(jsii_name="class") def class_(self) -> None: - return jsii.invoke(self, "class", []) + return typing.cast(None, jsii.invoke(self, "class", [])) @jsii.member(jsii_name="const") def const(self) -> None: - return jsii.invoke(self, "const", []) + return typing.cast(None, jsii.invoke(self, "const", [])) @jsii.member(jsii_name="continue") def continue_(self) -> None: - return jsii.invoke(self, "continue", []) + return typing.cast(None, jsii.invoke(self, "continue", [])) @jsii.member(jsii_name="default") def default(self) -> None: - return jsii.invoke(self, "default", []) + return typing.cast(None, jsii.invoke(self, "default", [])) @jsii.member(jsii_name="do") def do(self) -> None: - return jsii.invoke(self, "do", []) + return typing.cast(None, jsii.invoke(self, "do", [])) @jsii.member(jsii_name="double") def double(self) -> None: - return jsii.invoke(self, "double", []) + return typing.cast(None, jsii.invoke(self, "double", [])) @jsii.member(jsii_name="else") def else_(self) -> None: - return jsii.invoke(self, "else", []) + return typing.cast(None, jsii.invoke(self, "else", [])) @jsii.member(jsii_name="enum") def enum(self) -> None: - return jsii.invoke(self, "enum", []) + return typing.cast(None, jsii.invoke(self, "enum", [])) @jsii.member(jsii_name="extends") def extends(self) -> None: - return jsii.invoke(self, "extends", []) + return typing.cast(None, jsii.invoke(self, "extends", [])) @jsii.member(jsii_name="false") def false(self) -> None: - return jsii.invoke(self, "false", []) + return typing.cast(None, jsii.invoke(self, "false", [])) @jsii.member(jsii_name="final") def final(self) -> None: - return jsii.invoke(self, "final", []) + return typing.cast(None, jsii.invoke(self, "final", [])) @jsii.member(jsii_name="finally") def finally_(self) -> None: - return jsii.invoke(self, "finally", []) + return typing.cast(None, jsii.invoke(self, "finally", [])) @jsii.member(jsii_name="float") def float(self) -> None: - return jsii.invoke(self, "float", []) + return typing.cast(None, jsii.invoke(self, "float", [])) @jsii.member(jsii_name="for") def for_(self) -> None: - return jsii.invoke(self, "for", []) + return typing.cast(None, jsii.invoke(self, "for", [])) @jsii.member(jsii_name="goto") def goto(self) -> None: - return jsii.invoke(self, "goto", []) + return typing.cast(None, jsii.invoke(self, "goto", [])) @jsii.member(jsii_name="if") def if_(self) -> None: - return jsii.invoke(self, "if", []) + return typing.cast(None, jsii.invoke(self, "if", [])) @jsii.member(jsii_name="implements") def implements(self) -> None: - return jsii.invoke(self, "implements", []) + return typing.cast(None, jsii.invoke(self, "implements", [])) @jsii.member(jsii_name="import") def import_(self) -> None: - return jsii.invoke(self, "import", []) + return typing.cast(None, jsii.invoke(self, "import", [])) @jsii.member(jsii_name="instanceof") def instanceof(self) -> None: - return jsii.invoke(self, "instanceof", []) + return typing.cast(None, jsii.invoke(self, "instanceof", [])) @jsii.member(jsii_name="int") def int(self) -> None: - return jsii.invoke(self, "int", []) + return typing.cast(None, jsii.invoke(self, "int", [])) @jsii.member(jsii_name="interface") def interface(self) -> None: - return jsii.invoke(self, "interface", []) + return typing.cast(None, jsii.invoke(self, "interface", [])) @jsii.member(jsii_name="long") def long(self) -> None: - return jsii.invoke(self, "long", []) + return typing.cast(None, jsii.invoke(self, "long", [])) @jsii.member(jsii_name="native") def native(self) -> None: - return jsii.invoke(self, "native", []) + return typing.cast(None, jsii.invoke(self, "native", [])) @jsii.member(jsii_name="new") def new(self) -> None: - return jsii.invoke(self, "new", []) + return typing.cast(None, jsii.invoke(self, "new", [])) @jsii.member(jsii_name="null") def null(self) -> None: - return jsii.invoke(self, "null", []) + return typing.cast(None, jsii.invoke(self, "null", [])) @jsii.member(jsii_name="package") def package(self) -> None: - return jsii.invoke(self, "package", []) + return typing.cast(None, jsii.invoke(self, "package", [])) @jsii.member(jsii_name="private") def private(self) -> None: - return jsii.invoke(self, "private", []) + return typing.cast(None, jsii.invoke(self, "private", [])) @jsii.member(jsii_name="protected") def protected(self) -> None: - return jsii.invoke(self, "protected", []) + return typing.cast(None, jsii.invoke(self, "protected", [])) @jsii.member(jsii_name="public") def public(self) -> None: - return jsii.invoke(self, "public", []) + return typing.cast(None, jsii.invoke(self, "public", [])) @jsii.member(jsii_name="return") def return_(self) -> None: - return jsii.invoke(self, "return", []) + return typing.cast(None, jsii.invoke(self, "return", [])) @jsii.member(jsii_name="short") def short(self) -> None: - return jsii.invoke(self, "short", []) + return typing.cast(None, jsii.invoke(self, "short", [])) @jsii.member(jsii_name="static") def static(self) -> None: - return jsii.invoke(self, "static", []) + return typing.cast(None, jsii.invoke(self, "static", [])) @jsii.member(jsii_name="strictfp") def strictfp(self) -> None: - return jsii.invoke(self, "strictfp", []) + return typing.cast(None, jsii.invoke(self, "strictfp", [])) @jsii.member(jsii_name="super") def super(self) -> None: - return jsii.invoke(self, "super", []) + return typing.cast(None, jsii.invoke(self, "super", [])) @jsii.member(jsii_name="switch") def switch(self) -> None: - return jsii.invoke(self, "switch", []) + return typing.cast(None, jsii.invoke(self, "switch", [])) @jsii.member(jsii_name="synchronized") def synchronized(self) -> None: - return jsii.invoke(self, "synchronized", []) + return typing.cast(None, jsii.invoke(self, "synchronized", [])) @jsii.member(jsii_name="this") def this(self) -> None: - return jsii.invoke(self, "this", []) + return typing.cast(None, jsii.invoke(self, "this", [])) @jsii.member(jsii_name="throw") def throw(self) -> None: - return jsii.invoke(self, "throw", []) + return typing.cast(None, jsii.invoke(self, "throw", [])) @jsii.member(jsii_name="throws") def throws(self) -> None: - return jsii.invoke(self, "throws", []) + return typing.cast(None, jsii.invoke(self, "throws", [])) @jsii.member(jsii_name="transient") def transient(self) -> None: - return jsii.invoke(self, "transient", []) + return typing.cast(None, jsii.invoke(self, "transient", [])) @jsii.member(jsii_name="true") def true(self) -> None: - return jsii.invoke(self, "true", []) + return typing.cast(None, jsii.invoke(self, "true", [])) @jsii.member(jsii_name="try") def try_(self) -> None: - return jsii.invoke(self, "try", []) + return typing.cast(None, jsii.invoke(self, "try", [])) @jsii.member(jsii_name="void") def void(self) -> None: - return jsii.invoke(self, "void", []) + return typing.cast(None, jsii.invoke(self, "void", [])) @jsii.member(jsii_name="volatile") def volatile(self) -> None: - return jsii.invoke(self, "volatile", []) + return typing.cast(None, jsii.invoke(self, "volatile", [])) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="while") def while_(self) -> builtins.str: - return jsii.get(self, "while") + return typing.cast(builtins.str, jsii.get(self, "while")) - @while_.setter # type: ignore + @while_.setter def while_(self, value: builtins.str) -> None: jsii.set(self, "while", value) @@ -5463,113 +5512,113 @@ class Jsii496Derived(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Jsii496Derive class JsiiAgent(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.JsiiAgent"): - """Host runtime version should be set via JSII_AGENT.""" + '''Host runtime version should be set via JSII_AGENT.''' def __init__(self) -> None: jsii.create(JsiiAgent, self, []) - @jsii.python.classproperty # type: ignore + @jsii.python.classproperty # type: ignore[misc] @jsii.member(jsii_name="value") def value(cls) -> typing.Optional[builtins.str]: - """Returns the value of the JSII_AGENT environment variable.""" - return jsii.sget(cls, "value") + '''Returns the value of the JSII_AGENT environment variable.''' + return typing.cast(typing.Optional[builtins.str], jsii.sget(cls, "value")) class JsonFormatter(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.JsonFormatter"): - """Make sure structs are un-decorated on the way in. + '''Make sure structs are un-decorated on the way in. :see: https://github.com/aws/aws-cdk/issues/5066 - """ + ''' - @jsii.member(jsii_name="anyArray") + @jsii.member(jsii_name="anyArray") # type: ignore[misc] @builtins.classmethod def any_array(cls) -> typing.Any: - return jsii.sinvoke(cls, "anyArray", []) + return typing.cast(typing.Any, jsii.sinvoke(cls, "anyArray", [])) - @jsii.member(jsii_name="anyBooleanFalse") + @jsii.member(jsii_name="anyBooleanFalse") # type: ignore[misc] @builtins.classmethod def any_boolean_false(cls) -> typing.Any: - return jsii.sinvoke(cls, "anyBooleanFalse", []) + return typing.cast(typing.Any, jsii.sinvoke(cls, "anyBooleanFalse", [])) - @jsii.member(jsii_name="anyBooleanTrue") + @jsii.member(jsii_name="anyBooleanTrue") # type: ignore[misc] @builtins.classmethod def any_boolean_true(cls) -> typing.Any: - return jsii.sinvoke(cls, "anyBooleanTrue", []) + return typing.cast(typing.Any, jsii.sinvoke(cls, "anyBooleanTrue", [])) - @jsii.member(jsii_name="anyDate") + @jsii.member(jsii_name="anyDate") # type: ignore[misc] @builtins.classmethod def any_date(cls) -> typing.Any: - return jsii.sinvoke(cls, "anyDate", []) + return typing.cast(typing.Any, jsii.sinvoke(cls, "anyDate", [])) - @jsii.member(jsii_name="anyEmptyString") + @jsii.member(jsii_name="anyEmptyString") # type: ignore[misc] @builtins.classmethod def any_empty_string(cls) -> typing.Any: - return jsii.sinvoke(cls, "anyEmptyString", []) + return typing.cast(typing.Any, jsii.sinvoke(cls, "anyEmptyString", [])) - @jsii.member(jsii_name="anyFunction") + @jsii.member(jsii_name="anyFunction") # type: ignore[misc] @builtins.classmethod def any_function(cls) -> typing.Any: - return jsii.sinvoke(cls, "anyFunction", []) + return typing.cast(typing.Any, jsii.sinvoke(cls, "anyFunction", [])) - @jsii.member(jsii_name="anyHash") + @jsii.member(jsii_name="anyHash") # type: ignore[misc] @builtins.classmethod def any_hash(cls) -> typing.Any: - return jsii.sinvoke(cls, "anyHash", []) + return typing.cast(typing.Any, jsii.sinvoke(cls, "anyHash", [])) - @jsii.member(jsii_name="anyNull") + @jsii.member(jsii_name="anyNull") # type: ignore[misc] @builtins.classmethod def any_null(cls) -> typing.Any: - return jsii.sinvoke(cls, "anyNull", []) + return typing.cast(typing.Any, jsii.sinvoke(cls, "anyNull", [])) - @jsii.member(jsii_name="anyNumber") + @jsii.member(jsii_name="anyNumber") # type: ignore[misc] @builtins.classmethod def any_number(cls) -> typing.Any: - return jsii.sinvoke(cls, "anyNumber", []) + return typing.cast(typing.Any, jsii.sinvoke(cls, "anyNumber", [])) - @jsii.member(jsii_name="anyRef") + @jsii.member(jsii_name="anyRef") # type: ignore[misc] @builtins.classmethod def any_ref(cls) -> typing.Any: - return jsii.sinvoke(cls, "anyRef", []) + return typing.cast(typing.Any, jsii.sinvoke(cls, "anyRef", [])) - @jsii.member(jsii_name="anyString") + @jsii.member(jsii_name="anyString") # type: ignore[misc] @builtins.classmethod def any_string(cls) -> typing.Any: - return jsii.sinvoke(cls, "anyString", []) + return typing.cast(typing.Any, jsii.sinvoke(cls, "anyString", [])) - @jsii.member(jsii_name="anyUndefined") + @jsii.member(jsii_name="anyUndefined") # type: ignore[misc] @builtins.classmethod def any_undefined(cls) -> typing.Any: - return jsii.sinvoke(cls, "anyUndefined", []) + return typing.cast(typing.Any, jsii.sinvoke(cls, "anyUndefined", [])) - @jsii.member(jsii_name="anyZero") + @jsii.member(jsii_name="anyZero") # type: ignore[misc] @builtins.classmethod def any_zero(cls) -> typing.Any: - return jsii.sinvoke(cls, "anyZero", []) + return typing.cast(typing.Any, jsii.sinvoke(cls, "anyZero", [])) - @jsii.member(jsii_name="stringify") + @jsii.member(jsii_name="stringify") # type: ignore[misc] @builtins.classmethod def stringify(cls, value: typing.Any = None) -> typing.Optional[builtins.str]: - """ + ''' :param value: - - """ - return jsii.sinvoke(cls, "stringify", [value]) + ''' + return typing.cast(typing.Optional[builtins.str], jsii.sinvoke(cls, "stringify", [value])) class LevelOne(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.LevelOne"): - """Validates that nested classes get correct code generation for the occasional forward reference.""" + '''Validates that nested classes get correct code generation for the occasional forward reference.''' def __init__(self, *, prop: "LevelOne.PropProperty") -> None: - """ + ''' :param prop: - """ + ''' props = LevelOneProps(prop=prop) jsii.create(LevelOne, self, [props]) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="props") def props(self) -> "LevelOneProps": - return jsii.get(self, "props") + return typing.cast("LevelOneProps", jsii.get(self, "props")) @jsii.data_type( jsii_type="jsii-calc.LevelOne.PropBooleanValue", @@ -5578,9 +5627,9 @@ class LevelOne(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.LevelOne"): ) class PropBooleanValue: def __init__(self, *, value: builtins.bool) -> None: - """ + ''' :param value: - """ + ''' self._values: typing.Dict[str, typing.Any] = { "value": value, } @@ -5589,7 +5638,7 @@ class LevelOne(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.LevelOne"): def value(self) -> builtins.bool: result = self._values.get("value") assert result is not None, "Required property 'value' is missing" - return result + return typing.cast(builtins.bool, result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -5609,9 +5658,9 @@ class LevelOne(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.LevelOne"): ) class PropProperty: def __init__(self, *, prop: "LevelOne.PropBooleanValue") -> None: - """ + ''' :param prop: - """ + ''' if isinstance(prop, dict): prop = PropBooleanValue(**prop) self._values: typing.Dict[str, typing.Any] = { @@ -5622,7 +5671,7 @@ class LevelOne(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.LevelOne"): def prop(self) -> "LevelOne.PropBooleanValue": result = self._values.get("prop") assert result is not None, "Required property 'prop' is missing" - return result + return typing.cast("LevelOne.PropBooleanValue", result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -5643,9 +5692,9 @@ class LevelOne(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.LevelOne"): ) class LevelOneProps: def __init__(self, *, prop: LevelOne.PropProperty) -> None: - """ + ''' :param prop: - """ + ''' if isinstance(prop, dict): prop = LevelOne.PropProperty(**prop) self._values: typing.Dict[str, typing.Any] = { @@ -5656,7 +5705,7 @@ class LevelOneProps: def prop(self) -> LevelOne.PropProperty: result = self._values.get("prop") assert result is not None, "Required property 'prop' is missing" - return result + return typing.cast(LevelOne.PropProperty, result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -5691,14 +5740,14 @@ class LoadBalancedFargateServiceProps: 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. + '''jsii#298: show default values in sphinx documentation, and respect newlines. :param container_port: The container port of the application load balancer attached to your Fargate service. Corresponds to container port mapping. Default: 80 :param cpu: The number of cpu units used by the task. Valid values, which determines your range of valid values for the memory parameter: 256 (.25 vCPU) - Available memory values: 0.5GB, 1GB, 2GB 512 (.5 vCPU) - Available memory values: 1GB, 2GB, 3GB, 4GB 1024 (1 vCPU) - Available memory values: 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB 2048 (2 vCPU) - Available memory values: Between 4GB and 16GB in 1GB increments 4096 (4 vCPU) - Available memory values: Between 8GB and 30GB in 1GB increments This default is set in the underlying FargateTaskDefinition construct. Default: 256 :param memory_mib: The amount (in MiB) of memory used by the task. This field is required and you must use one of the following values, which determines your range of valid values for the cpu parameter: 0.5GB, 1GB, 2GB - Available cpu values: 256 (.25 vCPU) 1GB, 2GB, 3GB, 4GB - Available cpu values: 512 (.5 vCPU) 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB - Available cpu values: 1024 (1 vCPU) Between 4GB and 16GB in 1GB increments - Available cpu values: 2048 (2 vCPU) Between 8GB and 30GB in 1GB increments - Available cpu values: 4096 (4 vCPU) This default is set in the underlying FargateTaskDefinition construct. Default: 512 :param public_load_balancer: Determines whether the Application Load Balancer will be internet-facing. Default: true :param public_tasks: Determines whether your Fargate Service will be assigned a public IP address. Default: false - """ + ''' self._values: typing.Dict[str, typing.Any] = {} if container_port is not None: self._values["container_port"] = container_port @@ -5713,18 +5762,18 @@ class LoadBalancedFargateServiceProps: @builtins.property def container_port(self) -> typing.Optional[jsii.Number]: - """The container port of the application load balancer attached to your Fargate service. + '''The container port of the application load balancer attached to your Fargate service. Corresponds to container port mapping. :default: 80 - """ + ''' result = self._values.get("container_port") - return result + return typing.cast(typing.Optional[jsii.Number], result) @builtins.property def cpu(self) -> typing.Optional[builtins.str]: - """The number of cpu units used by the task. + '''The number of cpu units used by the task. Valid values, which determines your range of valid values for the memory parameter: 256 (.25 vCPU) - Available memory values: 0.5GB, 1GB, 2GB @@ -5736,13 +5785,13 @@ class LoadBalancedFargateServiceProps: This default is set in the underlying FargateTaskDefinition construct. :default: 256 - """ + ''' result = self._values.get("cpu") - return result + return typing.cast(typing.Optional[builtins.str], result) @builtins.property def memory_mib(self) -> typing.Optional[builtins.str]: - """The amount (in MiB) of memory used by the task. + '''The amount (in MiB) of memory used by the task. This field is required and you must use one of the following values, which determines your range of valid values for the cpu parameter: @@ -5760,27 +5809,27 @@ class LoadBalancedFargateServiceProps: This default is set in the underlying FargateTaskDefinition construct. :default: 512 - """ + ''' result = self._values.get("memory_mib") - return result + return typing.cast(typing.Optional[builtins.str], result) @builtins.property def public_load_balancer(self) -> typing.Optional[builtins.bool]: - """Determines whether the Application Load Balancer will be internet-facing. + '''Determines whether the Application Load Balancer will be internet-facing. :default: true - """ + ''' result = self._values.get("public_load_balancer") - return result + return typing.cast(typing.Optional[builtins.bool], result) @builtins.property def public_tasks(self) -> typing.Optional[builtins.bool]: - """Determines whether your Fargate Service will be assigned a public IP address. + '''Determines whether your Fargate Service will be assigned a public IP address. :default: false - """ + ''' result = self._values.get("public_tasks") - return result + return typing.cast(typing.Optional[builtins.bool], result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -5803,12 +5852,12 @@ class MethodNamedProperty( @jsii.member(jsii_name="property") def property(self) -> builtins.str: - return jsii.invoke(self, "property", []) + return typing.cast(builtins.str, jsii.invoke(self, "property", [])) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="elite") def elite(self) -> jsii.Number: - return jsii.get(self, "elite") + return typing.cast(jsii.Number, jsii.get(self, "elite")) @jsii.implements(IFriendlier, IRandomNumberGenerator) @@ -5817,57 +5866,57 @@ class Multiply( metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Multiply", ): - """The "*" binary operation.""" + '''The "*" binary operation.''' def __init__( self, lhs: scope.jsii_calc_lib.NumericValue, rhs: scope.jsii_calc_lib.NumericValue, ) -> None: - """Creates a BinaryOperation. + '''Creates a BinaryOperation. :param lhs: Left-hand side operand. :param rhs: Right-hand side operand. - """ + ''' jsii.create(Multiply, self, [lhs, rhs]) @jsii.member(jsii_name="farewell") def farewell(self) -> builtins.str: - """Say farewell.""" - return jsii.invoke(self, "farewell", []) + '''Say farewell.''' + return typing.cast(builtins.str, jsii.invoke(self, "farewell", [])) @jsii.member(jsii_name="goodbye") def goodbye(self) -> builtins.str: - """Say goodbye.""" - return jsii.invoke(self, "goodbye", []) + '''Say goodbye.''' + return typing.cast(builtins.str, jsii.invoke(self, "goodbye", [])) @jsii.member(jsii_name="next") def next(self) -> jsii.Number: - """Returns another random number.""" - return jsii.invoke(self, "next", []) + '''Returns another random number.''' + return typing.cast(jsii.Number, jsii.invoke(self, "next", [])) @jsii.member(jsii_name="toString") def to_string(self) -> builtins.str: - """(deprecated) String representation of the value.""" - return jsii.invoke(self, "toString", []) + '''(deprecated) String representation of the value.''' + return typing.cast(builtins.str, jsii.invoke(self, "toString", [])) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="value") def value(self) -> jsii.Number: - """(deprecated) The value.""" - return jsii.get(self, "value") + '''(deprecated) The value.''' + return typing.cast(jsii.Number, jsii.get(self, "value")) class NestedClassInstance( metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.NestedClassInstance", ): - @jsii.member(jsii_name="makeInstance") + @jsii.member(jsii_name="makeInstance") # type: ignore[misc] @builtins.classmethod def make_instance( cls, ) -> scope.jsii_calc_lib.custom_submodule_name.NestingClass.NestedClass: - return jsii.sinvoke(cls, "makeInstance", []) + return typing.cast(scope.jsii_calc_lib.custom_submodule_name.NestingClass.NestedClass, jsii.sinvoke(cls, "makeInstance", [])) @jsii.data_type( @@ -5877,19 +5926,19 @@ class NestedClassInstance( ) class NestedStruct: def __init__(self, *, number_prop: jsii.Number) -> None: - """ + ''' :param number_prop: When provided, must be > 0. - """ + ''' self._values: typing.Dict[str, typing.Any] = { "number_prop": number_prop, } @builtins.property def number_prop(self) -> jsii.Number: - """When provided, must be > 0.""" + '''When provided, must be > 0.''' result = self._values.get("number_prop") assert result is not None, "Required property 'number_prop' is missing" - return result + return typing.cast(jsii.Number, result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -5907,61 +5956,61 @@ class NodeStandardLibrary( metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.NodeStandardLibrary", ): - """Test fixture to verify that jsii modules can use the node standard library.""" + '''Test fixture to verify that jsii modules can use the node standard library.''' def __init__(self) -> None: jsii.create(NodeStandardLibrary, self, []) @jsii.member(jsii_name="cryptoSha256") def crypto_sha256(self) -> builtins.str: - """Uses node.js "crypto" module to calculate sha256 of a string. + '''Uses node.js "crypto" module to calculate sha256 of a string. :return: "6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50" - """ - return jsii.invoke(self, "cryptoSha256", []) + ''' + return typing.cast(builtins.str, jsii.invoke(self, "cryptoSha256", [])) @jsii.member(jsii_name="fsReadFile") def fs_read_file(self) -> builtins.str: - """Reads a local resource file (resource.txt) asynchronously. + '''Reads a local resource file (resource.txt) asynchronously. :return: "Hello, resource!" - """ - return jsii.ainvoke(self, "fsReadFile", []) + ''' + return typing.cast(builtins.str, jsii.ainvoke(self, "fsReadFile", [])) @jsii.member(jsii_name="fsReadFileSync") def fs_read_file_sync(self) -> builtins.str: - """Sync version of fsReadFile. + '''Sync version of fsReadFile. :return: "Hello, resource! SYNC!" - """ - return jsii.invoke(self, "fsReadFileSync", []) + ''' + return typing.cast(builtins.str, jsii.invoke(self, "fsReadFileSync", [])) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="osPlatform") def os_platform(self) -> builtins.str: - """Returns the current os.platform() from the "os" node module.""" - return jsii.get(self, "osPlatform") + '''Returns the current os.platform() from the "os" node module.''' + return typing.cast(builtins.str, jsii.get(self, "osPlatform")) class NullShouldBeTreatedAsUndefined( metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.NullShouldBeTreatedAsUndefined", ): - """jsii#282, aws-cdk#157: null should be treated as "undefined".""" + '''jsii#282, aws-cdk#157: null should be treated as "undefined".''' def __init__(self, _param1: builtins.str, optional: typing.Any = None) -> None: - """ + ''' :param _param1: - :param optional: - - """ + ''' jsii.create(NullShouldBeTreatedAsUndefined, self, [_param1, optional]) @jsii.member(jsii_name="giveMeUndefined") def give_me_undefined(self, value: typing.Any = None) -> None: - """ + ''' :param value: - - """ - return jsii.invoke(self, "giveMeUndefined", [value]) + ''' + return typing.cast(None, jsii.invoke(self, "giveMeUndefined", [value])) @jsii.member(jsii_name="giveMeUndefinedInsideAnObject") def give_me_undefined_inside_an_object( @@ -5970,27 +6019,27 @@ class NullShouldBeTreatedAsUndefined( array_with_three_elements_and_undefined_as_second_argument: typing.List[typing.Any], this_should_be_undefined: typing.Any = None, ) -> None: - """ + ''' :param array_with_three_elements_and_undefined_as_second_argument: :param this_should_be_undefined: - """ + ''' input = NullShouldBeTreatedAsUndefinedData( array_with_three_elements_and_undefined_as_second_argument=array_with_three_elements_and_undefined_as_second_argument, this_should_be_undefined=this_should_be_undefined, ) - return jsii.invoke(self, "giveMeUndefinedInsideAnObject", [input]) + return typing.cast(None, jsii.invoke(self, "giveMeUndefinedInsideAnObject", [input])) @jsii.member(jsii_name="verifyPropertyIsUndefined") def verify_property_is_undefined(self) -> None: - return jsii.invoke(self, "verifyPropertyIsUndefined", []) + return typing.cast(None, jsii.invoke(self, "verifyPropertyIsUndefined", [])) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="changeMeToUndefined") def change_me_to_undefined(self) -> typing.Optional[builtins.str]: - return jsii.get(self, "changeMeToUndefined") + return typing.cast(typing.Optional[builtins.str], jsii.get(self, "changeMeToUndefined")) - @change_me_to_undefined.setter # type: ignore + @change_me_to_undefined.setter def change_me_to_undefined(self, value: typing.Optional[builtins.str]) -> None: jsii.set(self, "changeMeToUndefined", value) @@ -6010,10 +6059,10 @@ class NullShouldBeTreatedAsUndefinedData: array_with_three_elements_and_undefined_as_second_argument: typing.List[typing.Any], this_should_be_undefined: typing.Any = None, ) -> None: - """ + ''' :param array_with_three_elements_and_undefined_as_second_argument: :param this_should_be_undefined: - """ + ''' 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, } @@ -6026,12 +6075,12 @@ class NullShouldBeTreatedAsUndefinedData: ) -> typing.List[typing.Any]: 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 + return typing.cast(typing.List[typing.Any], result) @builtins.property def this_should_be_undefined(self) -> typing.Any: result = self._values.get("this_should_be_undefined") - return result + return typing.cast(typing.Any, result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -6046,31 +6095,31 @@ class NullShouldBeTreatedAsUndefinedData: class NumberGenerator(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.NumberGenerator"): - """This allows us to test that a reference can be stored for objects that implement interfaces.""" + '''This allows us to test that a reference can be stored for objects that implement interfaces.''' def __init__(self, generator: IRandomNumberGenerator) -> None: - """ + ''' :param generator: - - """ + ''' jsii.create(NumberGenerator, self, [generator]) @jsii.member(jsii_name="isSameGenerator") def is_same_generator(self, gen: IRandomNumberGenerator) -> builtins.bool: - """ + ''' :param gen: - - """ - return jsii.invoke(self, "isSameGenerator", [gen]) + ''' + return typing.cast(builtins.bool, jsii.invoke(self, "isSameGenerator", [gen])) @jsii.member(jsii_name="nextTimes100") def next_times100(self) -> jsii.Number: - return jsii.invoke(self, "nextTimes100", []) + return typing.cast(jsii.Number, jsii.invoke(self, "nextTimes100", [])) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="generator") def generator(self) -> IRandomNumberGenerator: - return jsii.get(self, "generator") + return typing.cast(IRandomNumberGenerator, jsii.get(self, "generator")) - @generator.setter # type: ignore + @generator.setter def generator(self, value: IRandomNumberGenerator) -> None: jsii.set(self, "generator", value) @@ -6079,7 +6128,7 @@ class ObjectRefsInCollections( metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ObjectRefsInCollections", ): - """Verify that object references can be passed inside collections.""" + '''Verify that object references can be passed inside collections.''' def __init__(self) -> None: jsii.create(ObjectRefsInCollections, self, []) @@ -6089,52 +6138,55 @@ class ObjectRefsInCollections( self, values: typing.List[scope.jsii_calc_lib.NumericValue], ) -> jsii.Number: - """Returns the sum of all values. + '''Returns the sum of all values. :param values: - - """ - return jsii.invoke(self, "sumFromArray", [values]) + ''' + return typing.cast(jsii.Number, jsii.invoke(self, "sumFromArray", [values])) @jsii.member(jsii_name="sumFromMap") def sum_from_map( self, values: typing.Mapping[builtins.str, scope.jsii_calc_lib.NumericValue], ) -> jsii.Number: - """Returns the sum of all values in a map. + '''Returns the sum of all values in a map. :param values: - - """ - return jsii.invoke(self, "sumFromMap", [values]) + ''' + return typing.cast(jsii.Number, jsii.invoke(self, "sumFromMap", [values])) class ObjectWithPropertyProvider( metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ObjectWithPropertyProvider", ): - @jsii.member(jsii_name="provide") + @jsii.member(jsii_name="provide") # type: ignore[misc] @builtins.classmethod def provide(cls) -> IObjectWithProperty: - return jsii.sinvoke(cls, "provide", []) + return typing.cast(IObjectWithProperty, jsii.sinvoke(cls, "provide", [])) class Old(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Old"): - """(deprecated) Old class. + '''(deprecated) Old class. - :deprecated: Use the new class + :deprecated: + + Use the new class or the old class whatever you want because + whatever you like is always the best :stability: deprecated - """ + ''' def __init__(self) -> None: jsii.create(Old, self, []) @jsii.member(jsii_name="doAThing") def do_a_thing(self) -> None: - """(deprecated) Doo wop that thing. + '''(deprecated) Doo wop that thing. :stability: deprecated - """ - return jsii.invoke(self, "doAThing", []) + ''' + return typing.cast(None, jsii.invoke(self, "doAThing", [])) class OptionalArgumentInvoker( @@ -6142,18 +6194,18 @@ class OptionalArgumentInvoker( jsii_type="jsii-calc.OptionalArgumentInvoker", ): def __init__(self, delegate: IInterfaceWithOptionalMethodArguments) -> None: - """ + ''' :param delegate: - - """ + ''' jsii.create(OptionalArgumentInvoker, self, [delegate]) @jsii.member(jsii_name="invokeWithOptional") def invoke_with_optional(self) -> None: - return jsii.invoke(self, "invokeWithOptional", []) + return typing.cast(None, jsii.invoke(self, "invokeWithOptional", [])) @jsii.member(jsii_name="invokeWithoutOptional") def invoke_without_optional(self) -> None: - return jsii.invoke(self, "invokeWithoutOptional", []) + return typing.cast(None, jsii.invoke(self, "invokeWithoutOptional", [])) class OptionalConstructorArgument( @@ -6166,27 +6218,27 @@ class OptionalConstructorArgument( arg2: builtins.str, arg3: typing.Optional[datetime.datetime] = None, ) -> None: - """ + ''' :param arg1: - :param arg2: - :param arg3: - - """ + ''' jsii.create(OptionalConstructorArgument, self, [arg1, arg2, arg3]) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="arg1") def arg1(self) -> jsii.Number: - return jsii.get(self, "arg1") + return typing.cast(jsii.Number, jsii.get(self, "arg1")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="arg2") def arg2(self) -> builtins.str: - return jsii.get(self, "arg2") + return typing.cast(builtins.str, jsii.get(self, "arg2")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="arg3") def arg3(self) -> typing.Optional[datetime.datetime]: - return jsii.get(self, "arg3") + return typing.cast(typing.Optional[datetime.datetime], jsii.get(self, "arg3")) @jsii.data_type( @@ -6196,9 +6248,9 @@ class OptionalConstructorArgument( ) class OptionalStruct: def __init__(self, *, field: typing.Optional[builtins.str] = None) -> None: - """ + ''' :param field: - """ + ''' self._values: typing.Dict[str, typing.Any] = {} if field is not None: self._values["field"] = field @@ -6206,7 +6258,7 @@ class OptionalStruct: @builtins.property def field(self) -> typing.Optional[builtins.str]: result = self._values.get("field") - return result + return typing.cast(typing.Optional[builtins.str], result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -6225,58 +6277,58 @@ class OptionalStructConsumer( jsii_type="jsii-calc.OptionalStructConsumer", ): def __init__(self, *, field: typing.Optional[builtins.str] = None) -> None: - """ + ''' :param field: - """ + ''' optional_struct = OptionalStruct(field=field) jsii.create(OptionalStructConsumer, self, [optional_struct]) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="parameterWasUndefined") def parameter_was_undefined(self) -> builtins.bool: - return jsii.get(self, "parameterWasUndefined") + return typing.cast(builtins.bool, jsii.get(self, "parameterWasUndefined")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="fieldValue") def field_value(self) -> typing.Optional[builtins.str]: - return jsii.get(self, "fieldValue") + return typing.cast(typing.Optional[builtins.str], jsii.get(self, "fieldValue")) class OverridableProtectedMember( metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.OverridableProtectedMember", ): - """ + ''' :see: https://github.com/aws/jsii/issues/903 - """ + ''' def __init__(self) -> None: jsii.create(OverridableProtectedMember, self, []) @jsii.member(jsii_name="overrideMe") def _override_me(self) -> builtins.str: - return jsii.invoke(self, "overrideMe", []) + return typing.cast(builtins.str, jsii.invoke(self, "overrideMe", [])) @jsii.member(jsii_name="switchModes") def switch_modes(self) -> None: - return jsii.invoke(self, "switchModes", []) + return typing.cast(None, jsii.invoke(self, "switchModes", [])) @jsii.member(jsii_name="valueFromProtected") def value_from_protected(self) -> builtins.str: - return jsii.invoke(self, "valueFromProtected", []) + return typing.cast(builtins.str, jsii.invoke(self, "valueFromProtected", [])) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="overrideReadOnly") def _override_read_only(self) -> builtins.str: - return jsii.get(self, "overrideReadOnly") + return typing.cast(builtins.str, jsii.get(self, "overrideReadOnly")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="overrideReadWrite") def _override_read_write(self) -> builtins.str: - return jsii.get(self, "overrideReadWrite") + return typing.cast(builtins.str, jsii.get(self, "overrideReadWrite")) - @_override_read_write.setter # type: ignore + @_override_read_write.setter def _override_read_write(self, value: builtins.str) -> None: jsii.set(self, "overrideReadWrite", value) @@ -6290,10 +6342,10 @@ class OverrideReturnsObject( @jsii.member(jsii_name="test") def test(self, obj: IReturnsNumber) -> jsii.Number: - """ + ''' :param obj: - - """ - return jsii.invoke(self, "test", [obj]) + ''' + return typing.cast(jsii.Number, jsii.invoke(self, "test", [obj])) @jsii.data_type( @@ -6303,10 +6355,10 @@ class OverrideReturnsObject( ) class ParentStruct982: def __init__(self, *, foo: builtins.str) -> None: - """https://github.com/aws/jsii/issues/982. + '''https://github.com/aws/jsii/issues/982. :param foo: - """ + ''' self._values: typing.Dict[str, typing.Any] = { "foo": foo, } @@ -6315,7 +6367,7 @@ class ParentStruct982: def foo(self) -> builtins.str: result = self._values.get("foo") assert result is not None, "Required property 'foo' is missing" - return result + return typing.cast(builtins.str, result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -6334,13 +6386,13 @@ class PartiallyInitializedThisConsumer( jsii_type="jsii-calc.PartiallyInitializedThisConsumer", ): @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_PartiallyInitializedThisConsumerProxy"]: return _PartiallyInitializedThisConsumerProxy def __init__(self) -> None: jsii.create(PartiallyInitializedThisConsumer, self, []) - @jsii.member(jsii_name="consumePartiallyInitializedThis") + @jsii.member(jsii_name="consumePartiallyInitializedThis") # type: ignore[misc] @abc.abstractmethod def consume_partially_initialized_this( self, @@ -6348,11 +6400,11 @@ class PartiallyInitializedThisConsumer( dt: datetime.datetime, ev: AllTypesEnum, ) -> builtins.str: - """ + ''' :param obj: - :param dt: - :param ev: - - """ + ''' ... @@ -6364,12 +6416,12 @@ class _PartiallyInitializedThisConsumerProxy(PartiallyInitializedThisConsumer): dt: datetime.datetime, ev: AllTypesEnum, ) -> builtins.str: - """ + ''' :param obj: - :param dt: - :param ev: - - """ - return jsii.invoke(self, "consumePartiallyInitializedThis", [obj, dt, ev]) + ''' + return typing.cast(builtins.str, jsii.invoke(self, "consumePartiallyInitializedThis", [obj, dt, ev])) class Polymorphism(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Polymorphism"): @@ -6378,10 +6430,10 @@ class Polymorphism(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Polymorphism"): @jsii.member(jsii_name="sayHello") def say_hello(self, friendly: scope.jsii_calc_lib.IFriendly) -> builtins.str: - """ + ''' :param friendly: - - """ - return jsii.invoke(self, "sayHello", [friendly]) + ''' + return typing.cast(builtins.str, jsii.invoke(self, "sayHello", [friendly])) class Power( @@ -6389,60 +6441,60 @@ class Power( metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Power", ): - """The power operation.""" + '''The power operation.''' def __init__( self, base: scope.jsii_calc_lib.NumericValue, pow: scope.jsii_calc_lib.NumericValue, ) -> None: - """Creates a Power operation. + '''Creates a Power operation. :param base: The base of the power. :param pow: The number of times to multiply. - """ + ''' jsii.create(Power, self, [base, pow]) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="base") def base(self) -> scope.jsii_calc_lib.NumericValue: - """The base of the power.""" - return jsii.get(self, "base") + '''The base of the power.''' + return typing.cast(scope.jsii_calc_lib.NumericValue, jsii.get(self, "base")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="expression") def expression(self) -> scope.jsii_calc_lib.NumericValue: - """The expression that this operation consists of. + '''The expression that this operation consists of. Must be implemented by derived classes. - """ - return jsii.get(self, "expression") + ''' + return typing.cast(scope.jsii_calc_lib.NumericValue, jsii.get(self, "expression")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="pow") def pow(self) -> scope.jsii_calc_lib.NumericValue: - """The number of times to multiply.""" - return jsii.get(self, "pow") + '''The number of times to multiply.''' + return typing.cast(scope.jsii_calc_lib.NumericValue, jsii.get(self, "pow")) class 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.""" + '''Reproduction for https://github.com/aws/jsii/issues/1113 Where a method or property named "property" would result in impossible to load Python code.''' def __init__(self) -> None: jsii.create(PropertyNamedProperty, self, []) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="property") def property(self) -> builtins.str: - return jsii.get(self, "property") + return typing.cast(builtins.str, jsii.get(self, "property")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="yetAnoterOne") def yet_anoter_one(self) -> builtins.bool: - return jsii.get(self, "yetAnoterOne") + return typing.cast(builtins.bool, jsii.get(self, "yetAnoterOne")) class PublicClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.PublicClass"): @@ -6451,7 +6503,7 @@ class PublicClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.PublicClass"): @jsii.member(jsii_name="hello") def hello(self) -> None: - return jsii.invoke(self, "hello", []) + return typing.cast(None, jsii.invoke(self, "hello", [])) class PythonReservedWords( @@ -6463,159 +6515,159 @@ class PythonReservedWords( @jsii.member(jsii_name="and") def and_(self) -> None: - return jsii.invoke(self, "and", []) + return typing.cast(None, jsii.invoke(self, "and", [])) @jsii.member(jsii_name="as") def as_(self) -> None: - return jsii.invoke(self, "as", []) + return typing.cast(None, jsii.invoke(self, "as", [])) @jsii.member(jsii_name="assert") def assert_(self) -> None: - return jsii.invoke(self, "assert", []) + return typing.cast(None, jsii.invoke(self, "assert", [])) @jsii.member(jsii_name="async") def async_(self) -> None: - return jsii.invoke(self, "async", []) + return typing.cast(None, jsii.invoke(self, "async", [])) @jsii.member(jsii_name="await") def await_(self) -> None: - return jsii.invoke(self, "await", []) + return typing.cast(None, jsii.invoke(self, "await", [])) @jsii.member(jsii_name="break") def break_(self) -> None: - return jsii.invoke(self, "break", []) + return typing.cast(None, jsii.invoke(self, "break", [])) @jsii.member(jsii_name="class") def class_(self) -> None: - return jsii.invoke(self, "class", []) + return typing.cast(None, jsii.invoke(self, "class", [])) @jsii.member(jsii_name="continue") def continue_(self) -> None: - return jsii.invoke(self, "continue", []) + return typing.cast(None, jsii.invoke(self, "continue", [])) @jsii.member(jsii_name="def") def def_(self) -> None: - return jsii.invoke(self, "def", []) + return typing.cast(None, jsii.invoke(self, "def", [])) @jsii.member(jsii_name="del") def del_(self) -> None: - return jsii.invoke(self, "del", []) + return typing.cast(None, jsii.invoke(self, "del", [])) @jsii.member(jsii_name="elif") def elif_(self) -> None: - return jsii.invoke(self, "elif", []) + return typing.cast(None, jsii.invoke(self, "elif", [])) @jsii.member(jsii_name="else") def else_(self) -> None: - return jsii.invoke(self, "else", []) + return typing.cast(None, jsii.invoke(self, "else", [])) @jsii.member(jsii_name="except") def except_(self) -> None: - return jsii.invoke(self, "except", []) + return typing.cast(None, jsii.invoke(self, "except", [])) @jsii.member(jsii_name="finally") def finally_(self) -> None: - return jsii.invoke(self, "finally", []) + return typing.cast(None, jsii.invoke(self, "finally", [])) @jsii.member(jsii_name="for") def for_(self) -> None: - return jsii.invoke(self, "for", []) + return typing.cast(None, jsii.invoke(self, "for", [])) @jsii.member(jsii_name="from") def from_(self) -> None: - return jsii.invoke(self, "from", []) + return typing.cast(None, jsii.invoke(self, "from", [])) @jsii.member(jsii_name="global") def global_(self) -> None: - return jsii.invoke(self, "global", []) + return typing.cast(None, jsii.invoke(self, "global", [])) @jsii.member(jsii_name="if") def if_(self) -> None: - return jsii.invoke(self, "if", []) + return typing.cast(None, jsii.invoke(self, "if", [])) @jsii.member(jsii_name="import") def import_(self) -> None: - return jsii.invoke(self, "import", []) + return typing.cast(None, jsii.invoke(self, "import", [])) @jsii.member(jsii_name="in") def in_(self) -> None: - return jsii.invoke(self, "in", []) + return typing.cast(None, jsii.invoke(self, "in", [])) @jsii.member(jsii_name="is") def is_(self) -> None: - return jsii.invoke(self, "is", []) + return typing.cast(None, jsii.invoke(self, "is", [])) @jsii.member(jsii_name="lambda") def lambda_(self) -> None: - return jsii.invoke(self, "lambda", []) + return typing.cast(None, jsii.invoke(self, "lambda", [])) @jsii.member(jsii_name="nonlocal") def nonlocal_(self) -> None: - return jsii.invoke(self, "nonlocal", []) + return typing.cast(None, jsii.invoke(self, "nonlocal", [])) @jsii.member(jsii_name="not") def not_(self) -> None: - return jsii.invoke(self, "not", []) + return typing.cast(None, jsii.invoke(self, "not", [])) @jsii.member(jsii_name="or") def or_(self) -> None: - return jsii.invoke(self, "or", []) + return typing.cast(None, jsii.invoke(self, "or", [])) @jsii.member(jsii_name="pass") def pass_(self) -> None: - return jsii.invoke(self, "pass", []) + return typing.cast(None, jsii.invoke(self, "pass", [])) @jsii.member(jsii_name="raise") def raise_(self) -> None: - return jsii.invoke(self, "raise", []) + return typing.cast(None, jsii.invoke(self, "raise", [])) @jsii.member(jsii_name="return") def return_(self) -> None: - return jsii.invoke(self, "return", []) + return typing.cast(None, jsii.invoke(self, "return", [])) @jsii.member(jsii_name="try") def try_(self) -> None: - return jsii.invoke(self, "try", []) + return typing.cast(None, jsii.invoke(self, "try", [])) @jsii.member(jsii_name="while") def while_(self) -> None: - return jsii.invoke(self, "while", []) + return typing.cast(None, jsii.invoke(self, "while", [])) @jsii.member(jsii_name="with") def with_(self) -> None: - return jsii.invoke(self, "with", []) + return typing.cast(None, jsii.invoke(self, "with", [])) @jsii.member(jsii_name="yield") def yield_(self) -> None: - return jsii.invoke(self, "yield", []) + return typing.cast(None, jsii.invoke(self, "yield", [])) class ReferenceEnumFromScopedPackage( metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ReferenceEnumFromScopedPackage", ): - """See awslabs/jsii#138.""" + '''See awslabs/jsii#138.''' def __init__(self) -> None: jsii.create(ReferenceEnumFromScopedPackage, self, []) @jsii.member(jsii_name="loadFoo") def load_foo(self) -> typing.Optional[scope.jsii_calc_lib.EnumFromScopedModule]: - return jsii.invoke(self, "loadFoo", []) + return typing.cast(typing.Optional[scope.jsii_calc_lib.EnumFromScopedModule], jsii.invoke(self, "loadFoo", [])) @jsii.member(jsii_name="saveFoo") def save_foo(self, value: scope.jsii_calc_lib.EnumFromScopedModule) -> None: - """ + ''' :param value: - - """ - return jsii.invoke(self, "saveFoo", [value]) + ''' + return typing.cast(None, jsii.invoke(self, "saveFoo", [value])) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="foo") def foo(self) -> typing.Optional[scope.jsii_calc_lib.EnumFromScopedModule]: - return jsii.get(self, "foo") + return typing.cast(typing.Optional[scope.jsii_calc_lib.EnumFromScopedModule], jsii.get(self, "foo")) - @foo.setter # type: ignore + @foo.setter def foo( self, value: typing.Optional[scope.jsii_calc_lib.EnumFromScopedModule], @@ -6627,20 +6679,20 @@ class ReturnsPrivateImplementationOfInterface( metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ReturnsPrivateImplementationOfInterface", ): - """Helps ensure the JSII kernel & runtime cooperate correctly when an un-exported instance of a class is returned with a declared type that is an exported interface, and the instance inherits from an exported class. + '''Helps ensure the JSII kernel & runtime cooperate correctly when an un-exported instance of a class is returned with a declared type that is an exported interface, and the instance inherits from an exported class. :return: an instance of an un-exported class that extends \`\`ExportedBaseClass\`\`, declared as \`\`IPrivatelyImplemented\`\`. :see: https://github.com/aws/jsii/issues/320 - """ + ''' def __init__(self) -> None: jsii.create(ReturnsPrivateImplementationOfInterface, self, []) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="privateImplementation") def private_implementation(self) -> IPrivatelyImplemented: - return jsii.get(self, "privateImplementation") + return typing.cast(IPrivatelyImplemented, jsii.get(self, "privateImplementation")) @jsii.data_type( @@ -6655,14 +6707,14 @@ class RootStruct: 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. + '''This is here to check that we can pass a nested struct into a kwargs by specifying it as an in-line dictionary. This is cheating with the (current) declared types, but this is the "more idiomatic" way for Pythonists. :param string_prop: May not be empty. :param nested_struct: - """ + ''' if isinstance(nested_struct, dict): nested_struct = NestedStruct(**nested_struct) self._values: typing.Dict[str, typing.Any] = { @@ -6673,15 +6725,15 @@ class RootStruct: @builtins.property def string_prop(self) -> builtins.str: - """May not be empty.""" + '''May not be empty.''' result = self._values.get("string_prop") assert result is not None, "Required property 'string_prop' is missing" - return result + return typing.cast(builtins.str, result) @builtins.property def nested_struct(self) -> typing.Optional[NestedStruct]: result = self._values.get("nested_struct") - return result + return typing.cast(typing.Optional[NestedStruct], result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -6699,7 +6751,7 @@ class RootStructValidator( metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.RootStructValidator", ): - @jsii.member(jsii_name="validate") + @jsii.member(jsii_name="validate") # type: ignore[misc] @builtins.classmethod def validate( cls, @@ -6707,13 +6759,13 @@ class RootStructValidator( string_prop: builtins.str, nested_struct: typing.Optional[NestedStruct] = None, ) -> None: - """ + ''' :param string_prop: May not be empty. :param nested_struct: - """ + ''' struct = RootStruct(string_prop=string_prop, nested_struct=nested_struct) - return jsii.sinvoke(cls, "validate", [struct]) + return typing.cast(None, jsii.sinvoke(cls, "validate", [struct])) class RuntimeTypeChecking( @@ -6730,19 +6782,19 @@ class RuntimeTypeChecking( arg2: typing.Optional[builtins.str] = None, arg3: typing.Optional[datetime.datetime] = None, ) -> None: - """ + ''' :param arg1: - :param arg2: - :param arg3: - - """ - return jsii.invoke(self, "methodWithDefaultedArguments", [arg1, arg2, arg3]) + ''' + return typing.cast(None, jsii.invoke(self, "methodWithDefaultedArguments", [arg1, arg2, arg3])) @jsii.member(jsii_name="methodWithOptionalAnyArgument") def method_with_optional_any_argument(self, arg: typing.Any = None) -> None: - """ + ''' :param arg: - - """ - return jsii.invoke(self, "methodWithOptionalAnyArgument", [arg]) + ''' + return typing.cast(None, jsii.invoke(self, "methodWithOptionalAnyArgument", [arg])) @jsii.member(jsii_name="methodWithOptionalArguments") def method_with_optional_arguments( @@ -6751,13 +6803,13 @@ class RuntimeTypeChecking( arg2: builtins.str, arg3: typing.Optional[datetime.datetime] = None, ) -> None: - """Used to verify verification of number of method arguments. + '''Used to verify verification of number of method arguments. :param arg1: - :param arg2: - :param arg3: - - """ - return jsii.invoke(self, "methodWithOptionalArguments", [arg1, arg2, arg3]) + ''' + return typing.cast(None, jsii.invoke(self, "methodWithOptionalArguments", [arg1, arg2, arg3])) @jsii.data_type( @@ -6775,10 +6827,10 @@ class SecondLevelStruct: deeper_required_prop: builtins.str, deeper_optional_prop: typing.Optional[builtins.str] = None, ) -> None: - """ + ''' :param deeper_required_prop: It's long and required. :param deeper_optional_prop: It's long, but you'll almost never pass it. - """ + ''' self._values: typing.Dict[str, typing.Any] = { "deeper_required_prop": deeper_required_prop, } @@ -6787,16 +6839,16 @@ class SecondLevelStruct: @builtins.property def deeper_required_prop(self) -> builtins.str: - """It's long and required.""" + '''It's long and required.''' result = self._values.get("deeper_required_prop") assert result is not None, "Required property 'deeper_required_prop' is missing" - return result + return typing.cast(builtins.str, result) @builtins.property def deeper_optional_prop(self) -> typing.Optional[builtins.str]: - """It's long, but you'll almost never pass it.""" + '''It's long, but you'll almost never pass it.''' result = self._values.get("deeper_optional_prop") - return result + return typing.cast(typing.Optional[builtins.str], result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -6814,67 +6866,67 @@ class SingleInstanceTwoTypes( metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.SingleInstanceTwoTypes", ): - """Test that a single instance can be returned under two different FQNs. + '''Test that a single instance can be returned under two different FQNs. JSII clients can instantiate 2 different strongly-typed wrappers for the same object. Unfortunately, this will break object equality, but if we didn't do this it would break runtime type checks in the JVM or CLR. - """ + ''' def __init__(self) -> None: jsii.create(SingleInstanceTwoTypes, self, []) @jsii.member(jsii_name="interface1") def interface1(self) -> "InbetweenClass": - return jsii.invoke(self, "interface1", []) + return typing.cast("InbetweenClass", jsii.invoke(self, "interface1", [])) @jsii.member(jsii_name="interface2") def interface2(self) -> IPublicInterface: - return jsii.invoke(self, "interface2", []) + return typing.cast(IPublicInterface, jsii.invoke(self, "interface2", [])) class SingletonInt(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.SingletonInt"): - """Verifies that singleton enums are handled correctly. + '''Verifies that singleton enums are handled correctly. https://github.com/aws/jsii/issues/231 - """ + ''' @jsii.member(jsii_name="isSingletonInt") def is_singleton_int(self, value: jsii.Number) -> builtins.bool: - """ + ''' :param value: - - """ - return jsii.invoke(self, "isSingletonInt", [value]) + ''' + return typing.cast(builtins.bool, jsii.invoke(self, "isSingletonInt", [value])) @jsii.enum(jsii_type="jsii-calc.SingletonIntEnum") class SingletonIntEnum(enum.Enum): - """A singleton integer.""" + '''A singleton integer.''' SINGLETON_INT = "SINGLETON_INT" - """Elite!""" + '''Elite!''' class SingletonString(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.SingletonString"): - """Verifies that singleton enums are handled correctly. + '''Verifies that singleton enums are handled correctly. https://github.com/aws/jsii/issues/231 - """ + ''' @jsii.member(jsii_name="isSingletonString") def is_singleton_string(self, value: builtins.str) -> builtins.bool: - """ + ''' :param value: - - """ - return jsii.invoke(self, "isSingletonString", [value]) + ''' + return typing.cast(builtins.bool, jsii.invoke(self, "isSingletonString", [value])) @jsii.enum(jsii_type="jsii-calc.SingletonStringEnum") class SingletonStringEnum(enum.Enum): - """A singleton string.""" + '''A singleton string.''' SINGLETON_STRING = "SINGLETON_STRING" - """1337.""" + '''1337.''' @jsii.data_type( @@ -6889,10 +6941,10 @@ class SmellyStruct: property: builtins.str, yet_anoter_one: builtins.bool, ) -> None: - """ + ''' :param property: :param yet_anoter_one: - """ + ''' self._values: typing.Dict[str, typing.Any] = { "property": property, "yet_anoter_one": yet_anoter_one, @@ -6902,13 +6954,13 @@ class SmellyStruct: def property(self) -> builtins.str: result = self._values.get("property") assert result is not None, "Required property 'property' is missing" - return result + return typing.cast(builtins.str, result) @builtins.property def yet_anoter_one(self) -> builtins.bool: result = self._values.get("yet_anoter_one") assert result is not None, "Required property 'yet_anoter_one' is missing" - return result + return typing.cast(builtins.bool, result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -6926,15 +6978,15 @@ class SomeTypeJsii976(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.SomeTypeJsii def __init__(self) -> None: jsii.create(SomeTypeJsii976, self, []) - @jsii.member(jsii_name="returnAnonymous") + @jsii.member(jsii_name="returnAnonymous") # type: ignore[misc] @builtins.classmethod def return_anonymous(cls) -> typing.Any: - return jsii.sinvoke(cls, "returnAnonymous", []) + return typing.cast(typing.Any, jsii.sinvoke(cls, "returnAnonymous", [])) - @jsii.member(jsii_name="returnReturn") + @jsii.member(jsii_name="returnReturn") # type: ignore[misc] @builtins.classmethod def return_return(cls) -> IReturnJsii976: - return jsii.sinvoke(cls, "returnReturn", []) + return typing.cast(IReturnJsii976, jsii.sinvoke(cls, "returnReturn", [])) class StableClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.StableClass"): @@ -6943,27 +6995,27 @@ class StableClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.StableClass"): readonly_string: builtins.str, mutable_number: typing.Optional[jsii.Number] = None, ) -> None: - """ + ''' :param readonly_string: - :param mutable_number: - - """ + ''' jsii.create(StableClass, self, [readonly_string, mutable_number]) @jsii.member(jsii_name="method") def method(self) -> None: - return jsii.invoke(self, "method", []) + return typing.cast(None, jsii.invoke(self, "method", [])) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="readonlyProperty") def readonly_property(self) -> builtins.str: - return jsii.get(self, "readonlyProperty") + return typing.cast(builtins.str, jsii.get(self, "readonlyProperty")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: - return jsii.get(self, "mutableProperty") + return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "mutableProperty")) - @mutable_property.setter # type: ignore + @mutable_property.setter def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: jsii.set(self, "mutableProperty", value) @@ -6981,9 +7033,9 @@ class StableEnum(enum.Enum): ) class StableStruct: def __init__(self, *, readonly_property: builtins.str) -> None: - """ + ''' :param readonly_property: - """ + ''' self._values: typing.Dict[str, typing.Any] = { "readonly_property": readonly_property, } @@ -6992,7 +7044,7 @@ class StableStruct: 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 + return typing.cast(builtins.str, result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -7007,95 +7059,120 @@ class StableStruct: class StaticContext(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.StaticContext"): - """This is used to validate the ability to use \`\`this\`\` from within a static context. + '''This is used to validate the ability to use \`\`this\`\` from within a static context. https://github.com/awslabs/aws-cdk/issues/2304 - """ + ''' - @jsii.member(jsii_name="canAccessStaticContext") + @jsii.member(jsii_name="canAccessStaticContext") # type: ignore[misc] @builtins.classmethod def can_access_static_context(cls) -> builtins.bool: - return jsii.sinvoke(cls, "canAccessStaticContext", []) + return typing.cast(builtins.bool, jsii.sinvoke(cls, "canAccessStaticContext", [])) - @jsii.python.classproperty # type: ignore + @jsii.python.classproperty # type: ignore[misc] @jsii.member(jsii_name="staticVariable") def static_variable(cls) -> builtins.bool: - return jsii.sget(cls, "staticVariable") + return typing.cast(builtins.bool, jsii.sget(cls, "staticVariable")) - @static_variable.setter # type: ignore + @static_variable.setter # type: ignore[no-redef] def static_variable(cls, value: builtins.bool) -> None: jsii.sset(cls, "staticVariable", value) +class StaticHelloParent( + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.StaticHelloParent", +): + '''Static methods that override parent class are technically overrides (the inheritance of statics is part of the ES6 specification), but certain other languages such as Java do not carry statics in the inheritance chain at all, so they cannot be overridden, only hidden. + + The difference is fairly minor (for typical use-cases, the end result is the + same), however this has implications on what the generated code should look + like. + ''' + + def __init__(self) -> None: + jsii.create(StaticHelloParent, self, []) + + @jsii.member(jsii_name="method") # type: ignore[misc] + @builtins.classmethod + def method(cls) -> None: + return typing.cast(None, jsii.sinvoke(cls, "method", [])) + + @jsii.python.classproperty # type: ignore[misc] + @jsii.member(jsii_name="property") + def property(cls) -> jsii.Number: + return typing.cast(jsii.Number, jsii.sget(cls, "property")) + + class Statics(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Statics"): def __init__(self, value: builtins.str) -> None: - """ + ''' :param value: - - """ + ''' jsii.create(Statics, self, [value]) - @jsii.member(jsii_name="staticMethod") + @jsii.member(jsii_name="staticMethod") # type: ignore[misc] @builtins.classmethod def static_method(cls, name: builtins.str) -> builtins.str: - """Jsdocs for static method. + '''Jsdocs for static method. :param name: The name of the person to say hello to. - """ - return jsii.sinvoke(cls, "staticMethod", [name]) + ''' + return typing.cast(builtins.str, jsii.sinvoke(cls, "staticMethod", [name])) @jsii.member(jsii_name="justMethod") def just_method(self) -> builtins.str: - return jsii.invoke(self, "justMethod", []) + return typing.cast(builtins.str, jsii.invoke(self, "justMethod", [])) - @jsii.python.classproperty # type: ignore + @jsii.python.classproperty # type: ignore[misc] @jsii.member(jsii_name="BAR") def BAR(cls) -> jsii.Number: - """Constants may also use all-caps.""" - return jsii.sget(cls, "BAR") + '''Constants may also use all-caps.''' + return typing.cast(jsii.Number, jsii.sget(cls, "BAR")) - @jsii.python.classproperty # type: ignore + @jsii.python.classproperty # type: ignore[misc] @jsii.member(jsii_name="ConstObj") def CONST_OBJ(cls) -> "DoubleTrouble": - return jsii.sget(cls, "ConstObj") + return typing.cast("DoubleTrouble", jsii.sget(cls, "ConstObj")) - @jsii.python.classproperty # type: ignore + @jsii.python.classproperty # type: ignore[misc] @jsii.member(jsii_name="Foo") def FOO(cls) -> builtins.str: - """Jsdocs for static property.""" - return jsii.sget(cls, "Foo") + '''Jsdocs for static property.''' + return typing.cast(builtins.str, jsii.sget(cls, "Foo")) - @jsii.python.classproperty # type: ignore + @jsii.python.classproperty # type: ignore[misc] @jsii.member(jsii_name="zooBar") def ZOO_BAR(cls) -> typing.Mapping[builtins.str, builtins.str]: - """Constants can also use camelCase.""" - return jsii.sget(cls, "zooBar") + '''Constants can also use camelCase.''' + return typing.cast(typing.Mapping[builtins.str, builtins.str], jsii.sget(cls, "zooBar")) - @jsii.python.classproperty # type: ignore + @jsii.python.classproperty # type: ignore[misc] @jsii.member(jsii_name="instance") def instance(cls) -> "Statics": - """Jsdocs for static getter. + '''Jsdocs for static getter. Jsdocs for static setter. - """ - return jsii.sget(cls, "instance") + ''' + return typing.cast("Statics", jsii.sget(cls, "instance")) - @instance.setter # type: ignore + @instance.setter # type: ignore[no-redef] def instance(cls, value: "Statics") -> None: jsii.sset(cls, "instance", value) - @jsii.python.classproperty # type: ignore + @jsii.python.classproperty # type: ignore[misc] @jsii.member(jsii_name="nonConstStatic") def non_const_static(cls) -> jsii.Number: - return jsii.sget(cls, "nonConstStatic") + return typing.cast(jsii.Number, jsii.sget(cls, "nonConstStatic")) - @non_const_static.setter # type: ignore + @non_const_static.setter # type: ignore[no-redef] def non_const_static(cls, value: jsii.Number) -> None: jsii.sset(cls, "nonConstStatic", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="value") def value(self) -> builtins.str: - return jsii.get(self, "value") + return typing.cast(builtins.str, jsii.get(self, "value")) @jsii.enum(jsii_type="jsii-calc.StringEnum") @@ -7109,12 +7186,12 @@ class StripInternal(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.StripInternal" def __init__(self) -> None: jsii.create(StripInternal, self, []) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="youSeeMe") def you_see_me(self) -> builtins.str: - return jsii.get(self, "youSeeMe") + return typing.cast(builtins.str, jsii.get(self, "youSeeMe")) - @you_see_me.setter # type: ignore + @you_see_me.setter def you_see_me(self, value: builtins.str) -> None: jsii.set(self, "youSeeMe", value) @@ -7136,12 +7213,12 @@ class StructA: optional_number: typing.Optional[jsii.Number] = None, optional_string: typing.Optional[builtins.str] = None, ) -> None: - """We can serialize and deserialize structs without silently ignoring optional fields. + '''We can serialize and deserialize structs without silently ignoring optional fields. :param required_string: :param optional_number: :param optional_string: - """ + ''' self._values: typing.Dict[str, typing.Any] = { "required_string": required_string, } @@ -7154,17 +7231,17 @@ class StructA: def required_string(self) -> builtins.str: result = self._values.get("required_string") assert result is not None, "Required property 'required_string' is missing" - return result + return typing.cast(builtins.str, result) @builtins.property def optional_number(self) -> typing.Optional[jsii.Number]: result = self._values.get("optional_number") - return result + return typing.cast(typing.Optional[jsii.Number], result) @builtins.property def optional_string(self) -> typing.Optional[builtins.str]: result = self._values.get("optional_string") - return result + return typing.cast(typing.Optional[builtins.str], result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -7195,12 +7272,12 @@ class StructB: 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. + '''This intentionally overlaps with StructA (where only requiredString is provided) to test htat the kernel properly disambiguates those. :param required_string: :param optional_boolean: :param optional_struct_a: - """ + ''' if isinstance(optional_struct_a, dict): optional_struct_a = StructA(**optional_struct_a) self._values: typing.Dict[str, typing.Any] = { @@ -7215,17 +7292,17 @@ class StructB: def required_string(self) -> builtins.str: result = self._values.get("required_string") assert result is not None, "Required property 'required_string' is missing" - return result + return typing.cast(builtins.str, result) @builtins.property def optional_boolean(self) -> typing.Optional[builtins.bool]: result = self._values.get("optional_boolean") - return result + return typing.cast(typing.Optional[builtins.bool], result) @builtins.property def optional_struct_a(self) -> typing.Optional[StructA]: result = self._values.get("optional_struct_a") - return result + return typing.cast(typing.Optional[StructA], result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -7251,13 +7328,13 @@ class StructParameterType: 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. + '''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 :param scope: :param props: - """ + ''' self._values: typing.Dict[str, typing.Any] = { "scope": scope, } @@ -7268,12 +7345,12 @@ class StructParameterType: def scope(self) -> builtins.str: result = self._values.get("scope") assert result is not None, "Required property 'scope' is missing" - return result + return typing.cast(builtins.str, result) @builtins.property def props(self) -> typing.Optional[builtins.bool]: result = self._values.get("props") - return result + return typing.cast(typing.Optional[builtins.bool], result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -7288,25 +7365,25 @@ class StructParameterType: class StructPassing(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.StructPassing"): - """Just because we can.""" + '''Just because we can.''' def __init__(self) -> None: jsii.create(StructPassing, self, []) - @jsii.member(jsii_name="howManyVarArgsDidIPass") + @jsii.member(jsii_name="howManyVarArgsDidIPass") # type: ignore[misc] @builtins.classmethod def how_many_var_args_did_i_pass( cls, _positional: jsii.Number, *inputs: "TopLevelStruct", ) -> jsii.Number: - """ + ''' :param _positional: - :param inputs: - - """ - return jsii.sinvoke(cls, "howManyVarArgsDidIPass", [_positional, *inputs]) + ''' + return typing.cast(jsii.Number, jsii.sinvoke(cls, "howManyVarArgsDidIPass", [_positional, *inputs])) - @jsii.member(jsii_name="roundTrip") + @jsii.member(jsii_name="roundTrip") # type: ignore[misc] @builtins.classmethod def round_trip( cls, @@ -7316,38 +7393,38 @@ class StructPassing(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.StructPassing" second_level: typing.Union[jsii.Number, SecondLevelStruct], optional: typing.Optional[builtins.str] = None, ) -> "TopLevelStruct": - """ + ''' :param _positional: - :param required: This is a required field. :param second_level: A union to really stress test our serialization. :param optional: You don't have to pass this. - """ + ''' input = TopLevelStruct( required=required, second_level=second_level, optional=optional ) - return jsii.sinvoke(cls, "roundTrip", [_positional, input]) + return typing.cast("TopLevelStruct", jsii.sinvoke(cls, "roundTrip", [_positional, input])) class StructUnionConsumer( metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.StructUnionConsumer", ): - @jsii.member(jsii_name="isStructA") + @jsii.member(jsii_name="isStructA") # type: ignore[misc] @builtins.classmethod def is_struct_a(cls, struct: typing.Union[StructA, StructB]) -> builtins.bool: - """ + ''' :param struct: - - """ - return jsii.sinvoke(cls, "isStructA", [struct]) + ''' + return typing.cast(builtins.bool, jsii.sinvoke(cls, "isStructA", [struct])) - @jsii.member(jsii_name="isStructB") + @jsii.member(jsii_name="isStructB") # type: ignore[misc] @builtins.classmethod def is_struct_b(cls, struct: typing.Union[StructA, StructB]) -> builtins.bool: - """ + ''' :param struct: - - """ - return jsii.sinvoke(cls, "isStructB", [struct]) + ''' + return typing.cast(builtins.bool, jsii.sinvoke(cls, "isStructB", [struct])) @jsii.data_type( @@ -7369,12 +7446,12 @@ class StructWithJavaReservedWords: result: typing.Optional[builtins.str] = None, that: typing.Optional[builtins.str] = None, ) -> None: - """ + ''' :param default: :param assert_: :param result: :param that: - """ + ''' self._values: typing.Dict[str, typing.Any] = { "default": default, } @@ -7389,22 +7466,22 @@ class StructWithJavaReservedWords: def default(self) -> builtins.str: result = self._values.get("default") assert result is not None, "Required property 'default' is missing" - return result + return typing.cast(builtins.str, result) @builtins.property def assert_(self) -> typing.Optional[builtins.str]: result = self._values.get("assert_") - return result + return typing.cast(typing.Optional[builtins.str], result) @builtins.property def result(self) -> typing.Optional[builtins.str]: result = self._values.get("result") - return result + return typing.cast(typing.Optional[builtins.str], result) @builtins.property def that(self) -> typing.Optional[builtins.str]: result = self._values.get("that") - return result + return typing.cast(typing.Optional[builtins.str], result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -7423,27 +7500,27 @@ class Sum( metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Sum", ): - """An operation that sums multiple values.""" + '''An operation that sums multiple values.''' def __init__(self) -> None: jsii.create(Sum, self, []) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="expression") def expression(self) -> scope.jsii_calc_lib.NumericValue: - """The expression that this operation consists of. + '''The expression that this operation consists of. Must be implemented by derived classes. - """ - return jsii.get(self, "expression") + ''' + return typing.cast(scope.jsii_calc_lib.NumericValue, jsii.get(self, "expression")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="parts") def parts(self) -> typing.List[scope.jsii_calc_lib.NumericValue]: - """The parts to sum.""" - return jsii.get(self, "parts") + '''The parts to sum.''' + return typing.cast(typing.List[scope.jsii_calc_lib.NumericValue], jsii.get(self, "parts")) - @parts.setter # type: ignore + @parts.setter def parts(self, value: typing.List[scope.jsii_calc_lib.NumericValue]) -> None: jsii.set(self, "parts", value) @@ -7460,10 +7537,10 @@ class SupportsNiceJavaBuilderProps: 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. - """ + ''' self._values: typing.Dict[str, typing.Any] = { "bar": bar, } @@ -7472,19 +7549,19 @@ class SupportsNiceJavaBuilderProps: @builtins.property def bar(self) -> jsii.Number: - """Some number, like 42.""" + '''Some number, like 42.''' result = self._values.get("bar") assert result is not None, "Required property 'bar' is missing" - return result + return typing.cast(jsii.Number, result) @builtins.property 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\`\`. + '''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. - """ + ''' result = self._values.get("id") - return result + return typing.cast(typing.Optional[builtins.str], result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -7502,7 +7579,7 @@ class SupportsNiceJavaBuilderWithRequiredProps( metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.SupportsNiceJavaBuilderWithRequiredProps", ): - """We can generate fancy builders in Java for classes which take a mix of positional & struct parameters.""" + '''We can generate fancy builders in Java for classes which take a mix of positional & struct parameters.''' def __init__( self, @@ -7511,30 +7588,30 @@ class SupportsNiceJavaBuilderWithRequiredProps( bar: jsii.Number, id: typing.Optional[builtins.str] = None, ) -> None: - """ + ''' :param id_: some identifier of your choice. :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. - """ + ''' props = SupportsNiceJavaBuilderProps(bar=bar, id=id) jsii.create(SupportsNiceJavaBuilderWithRequiredProps, self, [id_, props]) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="bar") def bar(self) -> jsii.Number: - return jsii.get(self, "bar") + return typing.cast(jsii.Number, jsii.get(self, "bar")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="id") def id(self) -> jsii.Number: - """some identifier of your choice.""" - return jsii.get(self, "id") + '''some identifier of your choice.''' + return typing.cast(jsii.Number, jsii.get(self, "id")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="propId") def prop_id(self) -> typing.Optional[builtins.str]: - return jsii.get(self, "propId") + return typing.cast(typing.Optional[builtins.str], jsii.get(self, "propId")) class SyncVirtualMethods( @@ -7546,103 +7623,103 @@ class SyncVirtualMethods( @jsii.member(jsii_name="callerIsAsync") def caller_is_async(self) -> jsii.Number: - return jsii.ainvoke(self, "callerIsAsync", []) + return typing.cast(jsii.Number, jsii.ainvoke(self, "callerIsAsync", [])) @jsii.member(jsii_name="callerIsMethod") def caller_is_method(self) -> jsii.Number: - return jsii.invoke(self, "callerIsMethod", []) + return typing.cast(jsii.Number, jsii.invoke(self, "callerIsMethod", [])) @jsii.member(jsii_name="modifyOtherProperty") def modify_other_property(self, value: builtins.str) -> None: - """ + ''' :param value: - - """ - return jsii.invoke(self, "modifyOtherProperty", [value]) + ''' + return typing.cast(None, jsii.invoke(self, "modifyOtherProperty", [value])) @jsii.member(jsii_name="modifyValueOfTheProperty") def modify_value_of_the_property(self, value: builtins.str) -> None: - """ + ''' :param value: - - """ - return jsii.invoke(self, "modifyValueOfTheProperty", [value]) + ''' + return typing.cast(None, jsii.invoke(self, "modifyValueOfTheProperty", [value])) @jsii.member(jsii_name="readA") def read_a(self) -> jsii.Number: - return jsii.invoke(self, "readA", []) + return typing.cast(jsii.Number, jsii.invoke(self, "readA", [])) @jsii.member(jsii_name="retrieveOtherProperty") def retrieve_other_property(self) -> builtins.str: - return jsii.invoke(self, "retrieveOtherProperty", []) + return typing.cast(builtins.str, jsii.invoke(self, "retrieveOtherProperty", [])) @jsii.member(jsii_name="retrieveReadOnlyProperty") def retrieve_read_only_property(self) -> builtins.str: - return jsii.invoke(self, "retrieveReadOnlyProperty", []) + return typing.cast(builtins.str, jsii.invoke(self, "retrieveReadOnlyProperty", [])) @jsii.member(jsii_name="retrieveValueOfTheProperty") def retrieve_value_of_the_property(self) -> builtins.str: - return jsii.invoke(self, "retrieveValueOfTheProperty", []) + return typing.cast(builtins.str, jsii.invoke(self, "retrieveValueOfTheProperty", [])) @jsii.member(jsii_name="virtualMethod") def virtual_method(self, n: jsii.Number) -> jsii.Number: - """ + ''' :param n: - - """ - return jsii.invoke(self, "virtualMethod", [n]) + ''' + return typing.cast(jsii.Number, jsii.invoke(self, "virtualMethod", [n])) @jsii.member(jsii_name="writeA") def write_a(self, value: jsii.Number) -> None: - """ + ''' :param value: - - """ - return jsii.invoke(self, "writeA", [value]) + ''' + return typing.cast(None, jsii.invoke(self, "writeA", [value])) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="readonlyProperty") def readonly_property(self) -> builtins.str: - return jsii.get(self, "readonlyProperty") + return typing.cast(builtins.str, jsii.get(self, "readonlyProperty")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="a") def a(self) -> jsii.Number: - return jsii.get(self, "a") + return typing.cast(jsii.Number, jsii.get(self, "a")) - @a.setter # type: ignore + @a.setter def a(self, value: jsii.Number) -> None: jsii.set(self, "a", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="callerIsProperty") def caller_is_property(self) -> jsii.Number: - return jsii.get(self, "callerIsProperty") + return typing.cast(jsii.Number, jsii.get(self, "callerIsProperty")) - @caller_is_property.setter # type: ignore + @caller_is_property.setter def caller_is_property(self, value: jsii.Number) -> None: jsii.set(self, "callerIsProperty", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="otherProperty") def other_property(self) -> builtins.str: - return jsii.get(self, "otherProperty") + return typing.cast(builtins.str, jsii.get(self, "otherProperty")) - @other_property.setter # type: ignore + @other_property.setter def other_property(self, value: builtins.str) -> None: jsii.set(self, "otherProperty", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="theProperty") def the_property(self) -> builtins.str: - return jsii.get(self, "theProperty") + return typing.cast(builtins.str, jsii.get(self, "theProperty")) - @the_property.setter # type: ignore + @the_property.setter def the_property(self, value: builtins.str) -> None: jsii.set(self, "theProperty", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="valueOfOtherProperty") def value_of_other_property(self) -> builtins.str: - return jsii.get(self, "valueOfOtherProperty") + return typing.cast(builtins.str, jsii.get(self, "valueOfOtherProperty")) - @value_of_other_property.setter # type: ignore + @value_of_other_property.setter def value_of_other_property(self, value: builtins.str) -> None: jsii.set(self, "valueOfOtherProperty", value) @@ -7653,7 +7730,7 @@ class Thrower(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Thrower"): @jsii.member(jsii_name="throwError") def throw_error(self) -> None: - return jsii.invoke(self, "throwError", []) + return typing.cast(None, jsii.invoke(self, "throwError", [])) @jsii.data_type( @@ -7673,11 +7750,11 @@ class TopLevelStruct: second_level: typing.Union[jsii.Number, SecondLevelStruct], optional: typing.Optional[builtins.str] = None, ) -> None: - """ + ''' :param required: This is a required field. :param second_level: A union to really stress test our serialization. :param optional: You don't have to pass this. - """ + ''' self._values: typing.Dict[str, typing.Any] = { "required": required, "second_level": second_level, @@ -7687,23 +7764,23 @@ class TopLevelStruct: @builtins.property def required(self) -> builtins.str: - """This is a required field.""" + '''This is a required field.''' result = self._values.get("required") assert result is not None, "Required property 'required' is missing" - return result + return typing.cast(builtins.str, result) @builtins.property def second_level(self) -> typing.Union[jsii.Number, SecondLevelStruct]: - """A union to really stress test our serialization.""" + '''A union to really stress test our serialization.''' result = self._values.get("second_level") assert result is not None, "Required property 'second_level' is missing" - return result + return typing.cast(typing.Union[jsii.Number, SecondLevelStruct], result) @builtins.property def optional(self) -> typing.Optional[builtins.str]: - """You don't have to pass this.""" + '''You don't have to pass this.''' result = self._values.get("optional") - return result + return typing.cast(typing.Optional[builtins.str], result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -7718,16 +7795,16 @@ class TopLevelStruct: class UmaskCheck(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.UmaskCheck"): - """Checks the current file permissions are cool (no funky UMASK down-scoping happened). + '''Checks the current file permissions are cool (no funky UMASK down-scoping happened). :see: https://github.com/aws/jsii/issues/1765 - """ + ''' - @jsii.member(jsii_name="mode") + @jsii.member(jsii_name="mode") # type: ignore[misc] @builtins.classmethod def mode(cls) -> jsii.Number: - """This should return 0o644 (-rw-r--r--).""" - return jsii.sinvoke(cls, "mode", []) + '''This should return 0o644 (-rw-r--r--).''' + return typing.cast(jsii.Number, jsii.sinvoke(cls, "mode", [])) class UnaryOperation( @@ -7735,26 +7812,26 @@ class UnaryOperation( metaclass=jsii.JSIIAbstractClass, jsii_type="jsii-calc.UnaryOperation", ): - """An operation on a single operand.""" + '''An operation on a single operand.''' @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_UnaryOperationProxy"]: return _UnaryOperationProxy def __init__(self, operand: scope.jsii_calc_lib.NumericValue) -> None: - """ + ''' :param operand: - - """ + ''' jsii.create(UnaryOperation, self, [operand]) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="operand") def operand(self) -> scope.jsii_calc_lib.NumericValue: - return jsii.get(self, "operand") + return typing.cast(scope.jsii_calc_lib.NumericValue, jsii.get(self, "operand")) class _UnaryOperationProxy( - UnaryOperation, jsii.proxy_for(scope.jsii_calc_lib.Operation) # type: ignore + UnaryOperation, jsii.proxy_for(scope.jsii_calc_lib.Operation) # type: ignore[misc] ): pass @@ -7771,10 +7848,10 @@ class UnionProperties: bar: typing.Union[builtins.str, jsii.Number, AllTypes], foo: typing.Optional[typing.Union[builtins.str, jsii.Number]] = None, ) -> None: - """ + ''' :param bar: :param foo: - """ + ''' self._values: typing.Dict[str, typing.Any] = { "bar": bar, } @@ -7785,12 +7862,12 @@ class UnionProperties: def bar(self) -> typing.Union[builtins.str, jsii.Number, AllTypes]: result = self._values.get("bar") assert result is not None, "Required property 'bar' is missing" - return result + return typing.cast(typing.Union[builtins.str, jsii.Number, AllTypes], result) @builtins.property def foo(self) -> typing.Optional[typing.Union[builtins.str, jsii.Number]]: result = self._values.get("foo") - return result + return typing.cast(typing.Optional[typing.Union[builtins.str, jsii.Number]], result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -7809,25 +7886,25 @@ class UpcasingReflectable( metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.UpcasingReflectable", ): - """Ensures submodule-imported types from dependencies can be used correctly.""" + '''Ensures submodule-imported types from dependencies can be used correctly.''' def __init__(self, delegate: typing.Mapping[builtins.str, typing.Any]) -> None: - """ + ''' :param delegate: - - """ + ''' jsii.create(UpcasingReflectable, self, [delegate]) - @jsii.python.classproperty # type: ignore + @jsii.python.classproperty # type: ignore[misc] @jsii.member(jsii_name="reflector") def REFLECTOR(cls) -> scope.jsii_calc_lib.custom_submodule_name.Reflector: - return jsii.sget(cls, "reflector") + return typing.cast(scope.jsii_calc_lib.custom_submodule_name.Reflector, jsii.sget(cls, "reflector")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="entries") def entries( self, ) -> typing.List[scope.jsii_calc_lib.custom_submodule_name.ReflectableEntry]: - return jsii.get(self, "entries") + return typing.cast(typing.List[scope.jsii_calc_lib.custom_submodule_name.ReflectableEntry], jsii.get(self, "entries")) class UseBundledDependency( @@ -7839,18 +7916,18 @@ class UseBundledDependency( @jsii.member(jsii_name="value") def value(self) -> typing.Any: - return jsii.invoke(self, "value", []) + return typing.cast(typing.Any, jsii.invoke(self, "value", [])) class UseCalcBase(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.UseCalcBase"): - """Depend on a type from jsii-calc-base as a test for awslabs/jsii#128.""" + '''Depend on a type from jsii-calc-base as a test for awslabs/jsii#128.''' def __init__(self) -> None: jsii.create(UseCalcBase, self, []) @jsii.member(jsii_name="hello") def hello(self) -> scope.jsii_calc_base.Base: - return jsii.invoke(self, "hello", []) + return typing.cast(scope.jsii_calc_base.Base, jsii.invoke(self, "hello", [])) class UsesInterfaceWithProperties( @@ -7858,58 +7935,58 @@ class UsesInterfaceWithProperties( jsii_type="jsii-calc.UsesInterfaceWithProperties", ): def __init__(self, obj: IInterfaceWithProperties) -> None: - """ + ''' :param obj: - - """ + ''' jsii.create(UsesInterfaceWithProperties, self, [obj]) @jsii.member(jsii_name="justRead") def just_read(self) -> builtins.str: - return jsii.invoke(self, "justRead", []) + return typing.cast(builtins.str, jsii.invoke(self, "justRead", [])) @jsii.member(jsii_name="readStringAndNumber") def read_string_and_number( self, ext: IInterfaceWithPropertiesExtension, ) -> builtins.str: - """ + ''' :param ext: - - """ - return jsii.invoke(self, "readStringAndNumber", [ext]) + ''' + return typing.cast(builtins.str, jsii.invoke(self, "readStringAndNumber", [ext])) @jsii.member(jsii_name="writeAndRead") def write_and_read(self, value: builtins.str) -> builtins.str: - """ + ''' :param value: - - """ - return jsii.invoke(self, "writeAndRead", [value]) + ''' + return typing.cast(builtins.str, jsii.invoke(self, "writeAndRead", [value])) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="obj") def obj(self) -> IInterfaceWithProperties: - return jsii.get(self, "obj") + return typing.cast(IInterfaceWithProperties, jsii.get(self, "obj")) class VariadicInvoker(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.VariadicInvoker"): def __init__(self, method: "VariadicMethod") -> None: - """ + ''' :param method: - - """ + ''' jsii.create(VariadicInvoker, self, [method]) @jsii.member(jsii_name="asArray") def as_array(self, *values: jsii.Number) -> typing.List[jsii.Number]: - """ + ''' :param values: - - """ - return jsii.invoke(self, "asArray", [*values]) + ''' + return typing.cast(typing.List[jsii.Number], jsii.invoke(self, "asArray", [*values])) class VariadicMethod(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.VariadicMethod"): def __init__(self, *prefix: jsii.Number) -> None: - """ + ''' :param prefix: a prefix that will be use for all values returned by \`\`#asArray\`\`. - """ + ''' jsii.create(VariadicMethod, self, [*prefix]) @jsii.member(jsii_name="asArray") @@ -7918,11 +7995,11 @@ class VariadicMethod(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.VariadicMetho 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). :param others: other elements to be included in the array. - """ - return jsii.invoke(self, "asArray", [first, *others]) + ''' + return typing.cast(typing.List[jsii.Number], jsii.invoke(self, "asArray", [first, *others])) class VirtualMethodPlayground( @@ -7934,53 +8011,53 @@ class VirtualMethodPlayground( @jsii.member(jsii_name="overrideMeAsync") def override_me_async(self, index: jsii.Number) -> jsii.Number: - """ + ''' :param index: - - """ - return jsii.ainvoke(self, "overrideMeAsync", [index]) + ''' + return typing.cast(jsii.Number, jsii.ainvoke(self, "overrideMeAsync", [index])) @jsii.member(jsii_name="overrideMeSync") def override_me_sync(self, index: jsii.Number) -> jsii.Number: - """ + ''' :param index: - - """ - return jsii.invoke(self, "overrideMeSync", [index]) + ''' + return typing.cast(jsii.Number, jsii.invoke(self, "overrideMeSync", [index])) @jsii.member(jsii_name="parallelSumAsync") def parallel_sum_async(self, count: jsii.Number) -> jsii.Number: - """ + ''' :param count: - - """ - return jsii.ainvoke(self, "parallelSumAsync", [count]) + ''' + return typing.cast(jsii.Number, jsii.ainvoke(self, "parallelSumAsync", [count])) @jsii.member(jsii_name="serialSumAsync") def serial_sum_async(self, count: jsii.Number) -> jsii.Number: - """ + ''' :param count: - - """ - return jsii.ainvoke(self, "serialSumAsync", [count]) + ''' + return typing.cast(jsii.Number, jsii.ainvoke(self, "serialSumAsync", [count])) @jsii.member(jsii_name="sumSync") def sum_sync(self, count: jsii.Number) -> jsii.Number: - """ + ''' :param count: - - """ - return jsii.invoke(self, "sumSync", [count]) + ''' + return typing.cast(jsii.Number, jsii.invoke(self, "sumSync", [count])) class VoidCallback( metaclass=jsii.JSIIAbstractClass, jsii_type="jsii-calc.VoidCallback", ): - """This test is used to validate the runtimes can return correctly from a void callback. + '''This test is used to validate the runtimes can return correctly from a void callback. - Implement \`\`overrideMe\`\` (method does not have to do anything). - Invoke \`\`callMe\`\` - Verify that \`\`methodWasCalled\`\` is \`\`true\`\`. - """ + ''' @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_VoidCallbackProxy"]: return _VoidCallbackProxy def __init__(self) -> None: @@ -7988,41 +8065,41 @@ class VoidCallback( @jsii.member(jsii_name="callMe") def call_me(self) -> None: - return jsii.invoke(self, "callMe", []) + return typing.cast(None, jsii.invoke(self, "callMe", [])) - @jsii.member(jsii_name="overrideMe") + @jsii.member(jsii_name="overrideMe") # type: ignore[misc] @abc.abstractmethod def _override_me(self) -> None: ... - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="methodWasCalled") def method_was_called(self) -> builtins.bool: - return jsii.get(self, "methodWasCalled") + return typing.cast(builtins.bool, jsii.get(self, "methodWasCalled")) class _VoidCallbackProxy(VoidCallback): @jsii.member(jsii_name="overrideMe") def _override_me(self) -> None: - return jsii.invoke(self, "overrideMe", []) + return typing.cast(None, jsii.invoke(self, "overrideMe", [])) class WithPrivatePropertyInConstructor( metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.WithPrivatePropertyInConstructor", ): - """Verifies that private property declarations in constructor arguments are hidden.""" + '''Verifies that private property declarations in constructor arguments are hidden.''' def __init__(self, private_field: typing.Optional[builtins.str] = None) -> None: - """ + ''' :param private_field: - - """ + ''' jsii.create(WithPrivatePropertyInConstructor, self, [private_field]) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="success") def success(self) -> builtins.bool: - return jsii.get(self, "success") + return typing.cast(builtins.bool, jsii.get(self, "success")) @jsii.implements(IInterfaceImplementedByAbstractClass) @@ -8032,66 +8109,66 @@ class AbstractClass( jsii_type="jsii-calc.AbstractClass", ): @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_AbstractClassProxy"]: return _AbstractClassProxy def __init__(self) -> None: jsii.create(AbstractClass, self, []) - @jsii.member(jsii_name="abstractMethod") + @jsii.member(jsii_name="abstractMethod") # type: ignore[misc] @abc.abstractmethod def abstract_method(self, name: builtins.str) -> builtins.str: - """ + ''' :param name: - - """ + ''' ... @jsii.member(jsii_name="nonAbstractMethod") def non_abstract_method(self) -> jsii.Number: - return jsii.invoke(self, "nonAbstractMethod", []) + return typing.cast(jsii.Number, jsii.invoke(self, "nonAbstractMethod", [])) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="propFromInterface") def prop_from_interface(self) -> builtins.str: - return jsii.get(self, "propFromInterface") + return typing.cast(builtins.str, jsii.get(self, "propFromInterface")) class _AbstractClassProxy( - AbstractClass, jsii.proxy_for(AbstractClassBase) # type: ignore + AbstractClass, jsii.proxy_for(AbstractClassBase) # type: ignore[misc] ): @jsii.member(jsii_name="abstractMethod") def abstract_method(self, name: builtins.str) -> builtins.str: - """ + ''' :param name: - - """ - return jsii.invoke(self, "abstractMethod", [name]) + ''' + return typing.cast(builtins.str, jsii.invoke(self, "abstractMethod", [name])) class Add(BinaryOperation, metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Add"): - """The "+" binary operation.""" + '''The "+" binary operation.''' def __init__( self, lhs: scope.jsii_calc_lib.NumericValue, rhs: scope.jsii_calc_lib.NumericValue, ) -> None: - """Creates a BinaryOperation. + '''Creates a BinaryOperation. :param lhs: Left-hand side operand. :param rhs: Right-hand side operand. - """ + ''' jsii.create(Add, self, [lhs, rhs]) @jsii.member(jsii_name="toString") def to_string(self) -> builtins.str: - """(deprecated) String representation of the value.""" - return jsii.invoke(self, "toString", []) + '''(deprecated) String representation of the value.''' + return typing.cast(builtins.str, jsii.invoke(self, "toString", [])) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="value") def value(self) -> jsii.Number: - """(deprecated) The value.""" - return jsii.get(self, "value") + '''(deprecated) The value.''' + return typing.cast(jsii.Number, jsii.get(self, "value")) @jsii.implements(IAnonymousImplementationProvider) @@ -8104,11 +8181,11 @@ class AnonymousImplementationProvider( @jsii.member(jsii_name="provideAsClass") def provide_as_class(self) -> Implementation: - return jsii.invoke(self, "provideAsClass", []) + return typing.cast(Implementation, jsii.invoke(self, "provideAsClass", [])) @jsii.member(jsii_name="provideAsInterface") def provide_as_interface(self) -> IAnonymouslyImplementMe: - return jsii.invoke(self, "provideAsInterface", []) + return typing.cast(IAnonymouslyImplementMe, jsii.invoke(self, "provideAsInterface", [])) @jsii.implements(IBell) @@ -8118,14 +8195,14 @@ class Bell(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Bell"): @jsii.member(jsii_name="ring") def ring(self) -> None: - return jsii.invoke(self, "ring", []) + return typing.cast(None, jsii.invoke(self, "ring", [])) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="rung") def rung(self) -> builtins.bool: - return jsii.get(self, "rung") + return typing.cast(builtins.bool, jsii.get(self, "rung")) - @rung.setter # type: ignore + @rung.setter def rung(self, value: builtins.bool) -> None: jsii.set(self, "rung", value) @@ -8137,10 +8214,10 @@ class Bell(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Bell"): ) class ChildStruct982(ParentStruct982): def __init__(self, *, foo: builtins.str, bar: jsii.Number) -> None: - """ + ''' :param foo: :param bar: - """ + ''' self._values: typing.Dict[str, typing.Any] = { "foo": foo, "bar": bar, @@ -8150,13 +8227,13 @@ class ChildStruct982(ParentStruct982): def foo(self) -> builtins.str: result = self._values.get("foo") assert result is not None, "Required property 'foo' is missing" - return result + return typing.cast(builtins.str, result) @builtins.property def bar(self) -> jsii.Number: result = self._values.get("bar") assert result is not None, "Required property 'bar' is missing" - return result + return typing.cast(jsii.Number, result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -8178,39 +8255,39 @@ class ClassThatImplementsTheInternalInterface( def __init__(self) -> None: jsii.create(ClassThatImplementsTheInternalInterface, self, []) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="a") def a(self) -> builtins.str: - return jsii.get(self, "a") + return typing.cast(builtins.str, jsii.get(self, "a")) - @a.setter # type: ignore + @a.setter def a(self, value: builtins.str) -> None: jsii.set(self, "a", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="b") def b(self) -> builtins.str: - return jsii.get(self, "b") + return typing.cast(builtins.str, jsii.get(self, "b")) - @b.setter # type: ignore + @b.setter def b(self, value: builtins.str) -> None: jsii.set(self, "b", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="c") def c(self) -> builtins.str: - return jsii.get(self, "c") + return typing.cast(builtins.str, jsii.get(self, "c")) - @c.setter # type: ignore + @c.setter def c(self, value: builtins.str) -> None: jsii.set(self, "c", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="d") def d(self) -> builtins.str: - return jsii.get(self, "d") + return typing.cast(builtins.str, jsii.get(self, "d")) - @d.setter # type: ignore + @d.setter def d(self, value: builtins.str) -> None: jsii.set(self, "d", value) @@ -8223,39 +8300,39 @@ class ClassThatImplementsThePrivateInterface( def __init__(self) -> None: jsii.create(ClassThatImplementsThePrivateInterface, self, []) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="a") def a(self) -> builtins.str: - return jsii.get(self, "a") + return typing.cast(builtins.str, jsii.get(self, "a")) - @a.setter # type: ignore + @a.setter def a(self, value: builtins.str) -> None: jsii.set(self, "a", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="b") def b(self) -> builtins.str: - return jsii.get(self, "b") + return typing.cast(builtins.str, jsii.get(self, "b")) - @b.setter # type: ignore + @b.setter def b(self, value: builtins.str) -> None: jsii.set(self, "b", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="c") def c(self) -> builtins.str: - return jsii.get(self, "c") + return typing.cast(builtins.str, jsii.get(self, "c")) - @c.setter # type: ignore + @c.setter def c(self, value: builtins.str) -> None: jsii.set(self, "c", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="e") def e(self) -> builtins.str: - return jsii.get(self, "e") + return typing.cast(builtins.str, jsii.get(self, "e")) - @e.setter # type: ignore + @e.setter def e(self, value: builtins.str) -> None: jsii.set(self, "e", value) @@ -8265,32 +8342,32 @@ class ClassWithPrivateConstructorAndAutomaticProperties( metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ClassWithPrivateConstructorAndAutomaticProperties", ): - """Class that implements interface properties automatically, but using a private constructor.""" + '''Class that implements interface properties automatically, but using a private constructor.''' - @jsii.member(jsii_name="create") + @jsii.member(jsii_name="create") # type: ignore[misc] @builtins.classmethod def create( cls, read_only_string: builtins.str, read_write_string: builtins.str, ) -> "ClassWithPrivateConstructorAndAutomaticProperties": - """ + ''' :param read_only_string: - :param read_write_string: - - """ - return jsii.sinvoke(cls, "create", [read_only_string, read_write_string]) + ''' + return typing.cast("ClassWithPrivateConstructorAndAutomaticProperties", jsii.sinvoke(cls, "create", [read_only_string, read_write_string])) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="readOnlyString") def read_only_string(self) -> builtins.str: - return jsii.get(self, "readOnlyString") + return typing.cast(builtins.str, jsii.get(self, "readOnlyString")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="readWriteString") def read_write_string(self) -> builtins.str: - return jsii.get(self, "readWriteString") + return typing.cast(builtins.str, jsii.get(self, "readWriteString")) - @read_write_string.setter # type: ignore + @read_write_string.setter def read_write_string(self, value: builtins.str) -> None: jsii.set(self, "readWriteString", value) @@ -8302,13 +8379,13 @@ class IFriendlyRandomGenerator( typing_extensions.Protocol, ): @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IFriendlyRandomGeneratorProxy"]: return _IFriendlyRandomGeneratorProxy class _IFriendlyRandomGeneratorProxy( - jsii.proxy_for(IRandomNumberGenerator), # type: ignore - jsii.proxy_for(scope.jsii_calc_lib.IFriendly), # type: ignore + jsii.proxy_for(IRandomNumberGenerator), # type: ignore[misc] + jsii.proxy_for(scope.jsii_calc_lib.IFriendly), # type: ignore[misc] ): __jsii_type__: typing.ClassVar[str] = "jsii-calc.IFriendlyRandomGenerator" pass @@ -8319,38 +8396,38 @@ 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.""" + '''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.''' @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IInterfaceThatShouldNotBeADataTypeProxy"]: return _IInterfaceThatShouldNotBeADataTypeProxy - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="otherValue") def other_value(self) -> builtins.str: ... class _IInterfaceThatShouldNotBeADataTypeProxy( - jsii.proxy_for(IInterfaceWithMethods) # type: ignore + jsii.proxy_for(IInterfaceWithMethods) # type: ignore[misc] ): - """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.""" + '''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.''' __jsii_type__: typing.ClassVar[str] = "jsii-calc.IInterfaceThatShouldNotBeADataType" - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="otherValue") def other_value(self) -> builtins.str: - return jsii.get(self, "otherValue") + return typing.cast(builtins.str, jsii.get(self, "otherValue")) @jsii.interface(jsii_type="jsii-calc.IJSII417Derived") class IJSII417Derived(IJSII417PublicBaseOfBase, typing_extensions.Protocol): @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IJSII417DerivedProxy"]: return _IJSII417DerivedProxy - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="property") def property(self) -> builtins.str: ... @@ -8365,22 +8442,22 @@ class IJSII417Derived(IJSII417PublicBaseOfBase, typing_extensions.Protocol): class _IJSII417DerivedProxy( - jsii.proxy_for(IJSII417PublicBaseOfBase) # type: ignore + jsii.proxy_for(IJSII417PublicBaseOfBase) # type: ignore[misc] ): __jsii_type__: typing.ClassVar[str] = "jsii-calc.IJSII417Derived" - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="property") def property(self) -> builtins.str: - return jsii.get(self, "property") + return typing.cast(builtins.str, jsii.get(self, "property")) @jsii.member(jsii_name="bar") def bar(self) -> None: - return jsii.invoke(self, "bar", []) + return typing.cast(None, jsii.invoke(self, "bar", [])) @jsii.member(jsii_name="baz") def baz(self) -> None: - return jsii.invoke(self, "baz", []) + return typing.cast(None, jsii.invoke(self, "baz", [])) @jsii.implements(IPublicInterface2) @@ -8394,7 +8471,7 @@ class InbetweenClass( @jsii.member(jsii_name="ciao") def ciao(self) -> builtins.str: - return jsii.invoke(self, "ciao", []) + return typing.cast(builtins.str, jsii.invoke(self, "ciao", [])) class JSII417Derived( @@ -8403,60 +8480,76 @@ class JSII417Derived( jsii_type="jsii-calc.JSII417Derived", ): def __init__(self, property: builtins.str) -> None: - """ + ''' :param property: - - """ + ''' jsii.create(JSII417Derived, self, [property]) @jsii.member(jsii_name="bar") def bar(self) -> None: - return jsii.invoke(self, "bar", []) + return typing.cast(None, jsii.invoke(self, "bar", [])) @jsii.member(jsii_name="baz") def baz(self) -> None: - return jsii.invoke(self, "baz", []) + return typing.cast(None, jsii.invoke(self, "baz", [])) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="property") def _property(self) -> builtins.str: - return jsii.get(self, "property") + return typing.cast(builtins.str, jsii.get(self, "property")) @jsii.implements(IFriendlier) class Negate(UnaryOperation, metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Negate"): - """The negation operation ("-value").""" + '''The negation operation ("-value").''' def __init__(self, operand: scope.jsii_calc_lib.NumericValue) -> None: - """ + ''' :param operand: - - """ + ''' jsii.create(Negate, self, [operand]) @jsii.member(jsii_name="farewell") def farewell(self) -> builtins.str: - """Say farewell.""" - return jsii.invoke(self, "farewell", []) + '''Say farewell.''' + return typing.cast(builtins.str, jsii.invoke(self, "farewell", [])) @jsii.member(jsii_name="goodbye") def goodbye(self) -> builtins.str: - """Say goodbye.""" - return jsii.invoke(self, "goodbye", []) + '''Say goodbye.''' + return typing.cast(builtins.str, jsii.invoke(self, "goodbye", [])) @jsii.member(jsii_name="hello") def hello(self) -> builtins.str: - """(deprecated) Say hello!""" - return jsii.invoke(self, "hello", []) + '''(deprecated) Say hello!''' + return typing.cast(builtins.str, jsii.invoke(self, "hello", [])) @jsii.member(jsii_name="toString") def to_string(self) -> builtins.str: - """(deprecated) String representation of the value.""" - return jsii.invoke(self, "toString", []) + '''(deprecated) String representation of the value.''' + return typing.cast(builtins.str, jsii.invoke(self, "toString", [])) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="value") def value(self) -> jsii.Number: - """(deprecated) The value.""" - return jsii.get(self, "value") + '''(deprecated) The value.''' + return typing.cast(jsii.Number, jsii.get(self, "value")) + + +class StaticHelloChild( + StaticHelloParent, + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.StaticHelloChild", +): + @jsii.member(jsii_name="method") # type: ignore[misc] + @builtins.classmethod + def method(cls) -> None: + return typing.cast(None, jsii.sinvoke(cls, "method", [])) + + @jsii.python.classproperty # type: ignore[misc] + @jsii.member(jsii_name="property") + def property(cls) -> jsii.Number: + return typing.cast(jsii.Number, jsii.sget(cls, "property")) class SupportsNiceJavaBuilder( @@ -8471,24 +8564,24 @@ class SupportsNiceJavaBuilder( props: typing.Optional[SupportsNiceJavaBuilderProps] = None, *rest: builtins.str, ) -> None: - """ + ''' :param id: some identifier. :param default_bar: the default value of \`\`bar\`\`. :param props: some props once can provide. :param rest: a variadic continuation. - """ + ''' jsii.create(SupportsNiceJavaBuilder, self, [id, default_bar, props, *rest]) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="id") def id(self) -> jsii.Number: - """some identifier.""" - return jsii.get(self, "id") + '''some identifier.''' + return typing.cast(jsii.Number, jsii.get(self, "id")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="rest") def rest(self) -> typing.List[builtins.str]: - return jsii.get(self, "rest") + return typing.cast(typing.List[builtins.str], jsii.get(self, "rest")) @jsii.implements(IFriendlyRandomGenerator) @@ -8498,13 +8591,13 @@ class DoubleTrouble(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DoubleTrouble" @jsii.member(jsii_name="hello") def hello(self) -> builtins.str: - """(deprecated) Say hello!""" - return jsii.invoke(self, "hello", []) + '''(deprecated) Say hello!''' + return typing.cast(builtins.str, jsii.invoke(self, "hello", [])) @jsii.member(jsii_name="next") def next(self) -> jsii.Number: - """Returns another random number.""" - return jsii.invoke(self, "next", []) + '''Returns another random number.''' + return typing.cast(jsii.Number, jsii.invoke(self, "next", [])) __all__ = [ @@ -8677,6 +8770,8 @@ __all__ = [ "StableEnum", "StableStruct", "StaticContext", + "StaticHelloChild", + "StaticHelloParent", "Statics", "StringEnum", "StripInternal", @@ -8723,11 +8818,10 @@ import publication import typing_extensions import scope.jsii_calc_base._jsii -import scope.jsii_calc_base_of_base._jsii import scope.jsii_calc_lib._jsii __jsii_assembly__ = jsii.JSIIAssembly.load( - "jsii-calc", "0.0.0", __name__[0:-6], "jsii-calc@0.0.0.jsii.tgz" + "jsii-calc", "3.20.120", __name__[0:-6], "jsii-calc@3.20.120.jsii.tgz" ) __all__ = [ @@ -8738,7 +8832,21 @@ publication.publish() `; -exports[`Generated code for "jsii-calc": /python/src/jsii_calc/_jsii/jsii-calc@0.0.0.jsii.tgz 1`] = `python/src/jsii_calc/_jsii/jsii-calc@0.0.0.jsii.tgz is a tarball`; +exports[`Generated code for "jsii-calc": /python/src/jsii_calc/_jsii/bin/calc 1`] = ` +#!/usr/bin/env python + +import jsii +import sys + +__jsii_assembly__ = jsii.JSIIAssembly.load( + "jsii-calc", "3.20.120", "jsii_calc", "jsii-calc@3.20.120.jsii.tgz" +) + +__jsii_assembly__.invokeBinScript("jsii-calc", "calc", sys.argv[1:]) + +`; + +exports[`Generated code for "jsii-calc": /python/src/jsii_calc/_jsii/jsii-calc@3.20.120.jsii.tgz 1`] = `python/src/jsii_calc/_jsii/jsii-calc@3.20.120.jsii.tgz is a tarball`; exports[`Generated code for "jsii-calc": /python/src/jsii_calc/composition/__init__.py 1`] = ` import abc @@ -8761,10 +8869,10 @@ class CompositeOperation( metaclass=jsii.JSIIAbstractClass, jsii_type="jsii-calc.composition.CompositeOperation", ): - """Abstract operation composed from an expression of other operations.""" + '''Abstract operation composed from an expression of other operations.''' @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_CompositeOperationProxy"]: return _CompositeOperationProxy def __init__(self) -> None: @@ -8772,52 +8880,52 @@ class CompositeOperation( @jsii.member(jsii_name="toString") def to_string(self) -> builtins.str: - """(deprecated) String representation of the value.""" - return jsii.invoke(self, "toString", []) + '''(deprecated) String representation of the value.''' + return typing.cast(builtins.str, jsii.invoke(self, "toString", [])) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="expression") @abc.abstractmethod def expression(self) -> scope.jsii_calc_lib.NumericValue: - """The expression that this operation consists of. + '''The expression that this operation consists of. Must be implemented by derived classes. - """ + ''' ... - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="value") def value(self) -> jsii.Number: - """(deprecated) The value.""" - return jsii.get(self, "value") + '''(deprecated) The value.''' + return typing.cast(jsii.Number, jsii.get(self, "value")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="decorationPostfixes") def decoration_postfixes(self) -> typing.List[builtins.str]: - """A set of postfixes to include in a decorated .toString().""" - return jsii.get(self, "decorationPostfixes") + '''A set of postfixes to include in a decorated .toString().''' + return typing.cast(typing.List[builtins.str], jsii.get(self, "decorationPostfixes")) - @decoration_postfixes.setter # type: ignore + @decoration_postfixes.setter def decoration_postfixes(self, value: typing.List[builtins.str]) -> None: jsii.set(self, "decorationPostfixes", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="decorationPrefixes") def decoration_prefixes(self) -> typing.List[builtins.str]: - """A set of prefixes to include in a decorated .toString().""" - return jsii.get(self, "decorationPrefixes") + '''A set of prefixes to include in a decorated .toString().''' + return typing.cast(typing.List[builtins.str], jsii.get(self, "decorationPrefixes")) - @decoration_prefixes.setter # type: ignore + @decoration_prefixes.setter def decoration_prefixes(self, value: typing.List[builtins.str]) -> None: jsii.set(self, "decorationPrefixes", value) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="stringStyle") def string_style(self) -> "CompositeOperation.CompositionStringStyle": - """The .toString() style.""" - return jsii.get(self, "stringStyle") + '''The .toString() style.''' + return typing.cast("CompositeOperation.CompositionStringStyle", jsii.get(self, "stringStyle")) - @string_style.setter # type: ignore + @string_style.setter def string_style(self, value: "CompositeOperation.CompositionStringStyle") -> None: jsii.set(self, "stringStyle", value) @@ -8825,25 +8933,26 @@ class CompositeOperation( jsii_type="jsii-calc.composition.CompositeOperation.CompositionStringStyle" ) class CompositionStringStyle(enum.Enum): - """Style of .toString() output for CompositeOperation.""" + '''Style of .toString() output for CompositeOperation.''' NORMAL = "NORMAL" - """Normal string expression.""" + '''Normal string expression.''' DECORATED = "DECORATED" - """Decorated string expression.""" + '''Decorated string expression.''' class _CompositeOperationProxy( - CompositeOperation, jsii.proxy_for(scope.jsii_calc_lib.Operation) # type: ignore + CompositeOperation, + jsii.proxy_for(scope.jsii_calc_lib.Operation), # type: ignore[misc] ): - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="expression") def expression(self) -> scope.jsii_calc_lib.NumericValue: - """The expression that this operation consists of. + '''The expression that this operation consists of. Must be implemented by derived classes. - """ - return jsii.get(self, "expression") + ''' + return typing.cast(scope.jsii_calc_lib.NumericValue, jsii.get(self, "expression")) __all__ = [ @@ -8875,12 +8984,12 @@ class Base( def __init__(self) -> None: jsii.create(Base, self, []) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="prop") def prop(self) -> builtins.str: - return jsii.get(self, "prop") + return typing.cast(builtins.str, jsii.get(self, "prop")) - @prop.setter # type: ignore + @prop.setter def prop(self, value: builtins.str) -> None: jsii.set(self, "prop", value) @@ -8924,12 +9033,12 @@ class Foo( def __init__(self) -> None: jsii.create(Foo, self, []) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="bar") def bar(self) -> typing.Optional[builtins.str]: - return jsii.get(self, "bar") + return typing.cast(typing.Optional[builtins.str], jsii.get(self, "bar")) - @bar.setter # type: ignore + @bar.setter def bar(self, value: typing.Optional[builtins.str]) -> None: jsii.set(self, "bar", value) @@ -8941,9 +9050,9 @@ class Foo( ) class Hello: def __init__(self, *, foo: jsii.Number) -> None: - """ + ''' :param foo: - """ + ''' self._values: typing.Dict[str, typing.Any] = { "foo": foo, } @@ -8952,7 +9061,7 @@ class Hello: def foo(self) -> jsii.Number: result = self._values.get("foo") assert result is not None, "Required property 'foo' is missing" - return result + return typing.cast(jsii.Number, result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -8996,9 +9105,9 @@ from .._jsii import * ) class Hello: def __init__(self, *, foo: jsii.Number) -> None: - """ + ''' :param foo: - """ + ''' self._values: typing.Dict[str, typing.Any] = { "foo": foo, } @@ -9007,7 +9116,7 @@ class Hello: def foo(self) -> jsii.Number: result = self._values.get("foo") assert result is not None, "Required property 'foo' is missing" - return result + return typing.cast(jsii.Number, result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -9053,22 +9162,22 @@ class ClassWithSelf( jsii_type="jsii-calc.PythonSelf.ClassWithSelf", ): def __init__(self_, self: builtins.str) -> None: - """ + ''' :param self: - - """ + ''' jsii.create(ClassWithSelf, self_, [self]) @jsii.member(jsii_name="method") def method(self_, self: jsii.Number) -> builtins.str: - """ + ''' :param self: - - """ - return jsii.invoke(self_, "method", [self]) + ''' + return typing.cast(builtins.str, jsii.invoke(self_, "method", [self])) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="self") def self(self) -> builtins.str: - return jsii.get(self, "self") + return typing.cast(builtins.str, jsii.get(self, "self")) class ClassWithSelfKwarg( @@ -9076,30 +9185,30 @@ class ClassWithSelfKwarg( jsii_type="jsii-calc.PythonSelf.ClassWithSelfKwarg", ): def __init__(self_, *, self: builtins.str) -> None: - """ + ''' :param self: - """ + ''' props = StructWithSelf(self=self) jsii.create(ClassWithSelfKwarg, self_, [props]) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="props") def props(self) -> "StructWithSelf": - return jsii.get(self, "props") + return typing.cast("StructWithSelf", jsii.get(self, "props")) @jsii.interface(jsii_type="jsii-calc.PythonSelf.IInterfaceWithSelf") class IInterfaceWithSelf(typing_extensions.Protocol): @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_IInterfaceWithSelfProxy"]: return _IInterfaceWithSelfProxy @jsii.member(jsii_name="method") def method(self_, self: jsii.Number) -> builtins.str: - """ + ''' :param self: - - """ + ''' ... @@ -9108,10 +9217,10 @@ class _IInterfaceWithSelfProxy: @jsii.member(jsii_name="method") def method(self_, self: jsii.Number) -> builtins.str: - """ + ''' :param self: - - """ - return jsii.invoke(self_, "method", [self]) + ''' + return typing.cast(builtins.str, jsii.invoke(self_, "method", [self])) @jsii.data_type( @@ -9121,9 +9230,9 @@ class _IInterfaceWithSelfProxy: ) class StructWithSelf: def __init__(self_, *, self: builtins.str) -> None: - """ + ''' :param self: - """ + ''' self_._values: typing.Dict[str, typing.Any] = { "self": self, } @@ -9132,7 +9241,7 @@ class StructWithSelf: def self(self) -> builtins.str: result = self._values.get("self") assert result is not None, "Required property 'self' is missing" - return result + return typing.cast(builtins.str, result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -9178,44 +9287,54 @@ from .child import ( SomeStruct as _SomeStruct_91627123, ) from .nested_submodule.deeply_nested import INamespaced as _INamespaced_e2f386ad +from .param import SpecialParameter as _SpecialParameter_5bbf34a2 @jsii.implements(_INamespaced_e2f386ad) class MyClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.submodule.MyClass"): def __init__(self, *, prop: _SomeEnum_b2e41d92) -> None: - """ + ''' :param prop: - """ + ''' props = _SomeStruct_91627123(prop=prop) jsii.create(MyClass, self, [props]) - @builtins.property # type: ignore + @jsii.member(jsii_name="methodWithSpecialParam") + def method_with_special_param(self, *, value: builtins.str) -> builtins.str: + ''' + :param value: + ''' + param = _SpecialParameter_5bbf34a2(value=value) + + return typing.cast(builtins.str, jsii.invoke(self, "methodWithSpecialParam", [param])) + + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="awesomeness") def awesomeness(self) -> _Awesomeness_d37a24df: - return jsii.get(self, "awesomeness") + return typing.cast(_Awesomeness_d37a24df, jsii.get(self, "awesomeness")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="definedAt") def defined_at(self) -> builtins.str: - return jsii.get(self, "definedAt") + return typing.cast(builtins.str, jsii.get(self, "definedAt")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="goodness") def goodness(self) -> _Goodness_2df26737: - return jsii.get(self, "goodness") + return typing.cast(_Goodness_2df26737, jsii.get(self, "goodness")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="props") def props(self) -> _SomeStruct_91627123: - return jsii.get(self, "props") + return typing.cast(_SomeStruct_91627123, jsii.get(self, "props")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="allTypes") def all_types(self) -> typing.Optional[_AllTypes_b08307c5]: - return jsii.get(self, "allTypes") + return typing.cast(typing.Optional[_AllTypes_b08307c5], jsii.get(self, "allTypes")) - @all_types.setter # type: ignore + @all_types.setter def all_types(self, value: typing.Optional[_AllTypes_b08307c5]) -> None: jsii.set(self, "allTypes", value) @@ -9251,9 +9370,9 @@ from .. import MyClass as _MyClass_a2fdc0b6 ) class MyClassReference: def __init__(self, *, reference: _MyClass_a2fdc0b6) -> None: - """ + ''' :param reference: - """ + ''' self._values: typing.Dict[str, typing.Any] = { "reference": reference, } @@ -9262,7 +9381,7 @@ class MyClassReference: def reference(self) -> _MyClass_a2fdc0b6: result = self._values.get("reference") assert result is not None, "Required property 'reference' is missing" - return result + return typing.cast(_MyClass_a2fdc0b6, result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -9301,17 +9420,17 @@ from ..._jsii import * @jsii.enum(jsii_type="jsii-calc.submodule.child.Awesomeness") class Awesomeness(enum.Enum): AWESOME = "AWESOME" - """It was awesome!""" + '''It was awesome!''' @jsii.enum(jsii_type="jsii-calc.submodule.child.Goodness") class Goodness(enum.Enum): PRETTY_GOOD = "PRETTY_GOOD" - """It's pretty good.""" + '''It's pretty good.''' REALLY_GOOD = "REALLY_GOOD" - """It's really good.""" + '''It's really good.''' AMAZINGLY_GOOD = "AMAZINGLY_GOOD" - """It's amazingly good.""" + '''It's amazingly good.''' class InnerClass( @@ -9321,28 +9440,28 @@ class InnerClass( def __init__(self) -> None: jsii.create(InnerClass, self, []) - @jsii.python.classproperty # type: ignore + @jsii.python.classproperty # type: ignore[misc] @jsii.member(jsii_name="staticProp") def STATIC_PROP(cls) -> "SomeStruct": - return jsii.sget(cls, "staticProp") + return typing.cast("SomeStruct", jsii.sget(cls, "staticProp")) class OuterClass( metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.submodule.child.OuterClass", ): - """Checks that classes can self-reference during initialization. + '''Checks that classes can self-reference during initialization. :see: : https://github.com/aws/jsii/pull/1706 - """ + ''' def __init__(self) -> None: jsii.create(OuterClass, self, []) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="innerClass") def inner_class(self) -> InnerClass: - return jsii.get(self, "innerClass") + return typing.cast(InnerClass, jsii.get(self, "innerClass")) @jsii.enum(jsii_type="jsii-calc.submodule.child.SomeEnum") @@ -9357,9 +9476,9 @@ class SomeEnum(enum.Enum): ) class SomeStruct: def __init__(self, *, prop: SomeEnum) -> None: - """ + ''' :param prop: - """ + ''' self._values: typing.Dict[str, typing.Any] = { "prop": prop, } @@ -9368,7 +9487,7 @@ class SomeStruct: def prop(self) -> SomeEnum: result = self._values.get("prop") assert result is not None, "Required property 'prop' is missing" - return result + return typing.cast(SomeEnum, result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -9389,9 +9508,9 @@ class SomeStruct: ) class Structure: def __init__(self, *, bool: builtins.bool) -> None: - """ + ''' :param bool: - """ + ''' self._values: typing.Dict[str, typing.Any] = { "bool": bool, } @@ -9400,7 +9519,7 @@ class Structure: def bool(self) -> builtins.bool: result = self._values.get("bool") assert result is not None, "Required property 'bool' is missing" - return result + return typing.cast(builtins.bool, result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -9426,10 +9545,10 @@ class KwargsProps(SomeStruct): prop: SomeEnum, extra: typing.Optional[builtins.str] = None, ) -> None: - """ + ''' :param prop: :param extra: - """ + ''' self._values: typing.Dict[str, typing.Any] = { "prop": prop, } @@ -9440,12 +9559,12 @@ class KwargsProps(SomeStruct): def prop(self) -> SomeEnum: result = self._values.get("prop") assert result is not None, "Required property 'prop' is missing" - return result + return typing.cast(SomeEnum, result) @builtins.property def extra(self) -> typing.Optional[builtins.str]: result = self._values.get("extra") - return result + return typing.cast(typing.Optional[builtins.str], result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values @@ -9493,9 +9612,9 @@ from ..child import ( class Kwargs(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.submodule.isolated.Kwargs"): - """Ensures imports are correctly registered for kwargs lifted properties from super-structs.""" + '''Ensures imports are correctly registered for kwargs lifted properties from super-structs.''' - @jsii.member(jsii_name="method") + @jsii.member(jsii_name="method") # type: ignore[misc] @builtins.classmethod def method( cls, @@ -9503,13 +9622,13 @@ class Kwargs(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.submodule.isolated.Kw extra: typing.Optional[builtins.str] = None, prop: _SomeEnum_b2e41d92, ) -> builtins.bool: - """ + ''' :param extra: :param prop: - """ + ''' props = _KwargsProps_c7855dcf(extra=extra, prop=prop) - return jsii.sinvoke(cls, "method", [props]) + return typing.cast(builtins.bool, jsii.sinvoke(cls, "method", [props])) __all__ = [ @@ -9543,15 +9662,15 @@ class Namespaced( jsii_type="jsii-calc.submodule.nested_submodule.Namespaced", ): @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_NamespacedProxy"]: return _NamespacedProxy - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="definedAt") def defined_at(self) -> builtins.str: - return jsii.get(self, "definedAt") + return typing.cast(builtins.str, jsii.get(self, "definedAt")) - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="goodness") @abc.abstractmethod def goodness(self) -> _Goodness_2df26737: @@ -9559,10 +9678,10 @@ class Namespaced( class _NamespacedProxy(Namespaced): - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="goodness") def goodness(self) -> _Goodness_2df26737: - return jsii.get(self, "goodness") + return typing.cast(_Goodness_2df26737, jsii.get(self, "goodness")) __all__ = [ @@ -9592,10 +9711,10 @@ from ...._jsii import * ) class INamespaced(typing_extensions.Protocol): @builtins.staticmethod - def __jsii_proxy_class__(): + def __jsii_proxy_class__() -> typing.Type["_INamespacedProxy"]: return _INamespacedProxy - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="definedAt") def defined_at(self) -> builtins.str: ... @@ -9604,10 +9723,10 @@ class INamespaced(typing_extensions.Protocol): class _INamespacedProxy: __jsii_type__: typing.ClassVar[str] = "jsii-calc.submodule.nested_submodule.deeplyNested.INamespaced" - @builtins.property # type: ignore + @builtins.property # type: ignore[misc] @jsii.member(jsii_name="definedAt") def defined_at(self) -> builtins.str: - return jsii.get(self, "definedAt") + return typing.cast(builtins.str, jsii.get(self, "definedAt")) __all__ = [ @@ -9617,3 +9736,93 @@ __all__ = [ publication.publish() `; + +exports[`Generated code for "jsii-calc": /python/src/jsii_calc/submodule/param/__init__.py 1`] = ` +import abc +import builtins +import datetime +import enum +import typing + +import jsii +import publication +import typing_extensions + +from ..._jsii import * + + +@jsii.data_type( + jsii_type="jsii-calc.submodule.param.SpecialParameter", + jsii_struct_bases=[], + name_mapping={"value": "value"}, +) +class SpecialParameter: + def __init__(self, *, value: builtins.str) -> None: + ''' + :param value: + ''' + self._values: typing.Dict[str, typing.Any] = { + "value": value, + } + + @builtins.property + def value(self) -> builtins.str: + result = self._values.get("value") + assert result is not None, "Required property 'value' is missing" + return typing.cast(builtins.str, result) + + def __eq__(self, rhs: typing.Any) -> builtins.bool: + return isinstance(rhs, self.__class__) and rhs._values == self._values + + def __ne__(self, rhs: typing.Any) -> builtins.bool: + return not (rhs == self) + + def __repr__(self) -> str: + return "SpecialParameter(%s)" % ", ".join( + k + "=" + repr(v) for k, v in self._values.items() + ) + + +__all__ = [ + "SpecialParameter", +] + +publication.publish() + +`; + +exports[`Generated code for "jsii-calc": /python/src/jsii_calc/submodule/returnsparam/__init__.py 1`] = ` +import abc +import builtins +import datetime +import enum +import typing + +import jsii +import publication +import typing_extensions + +from ..._jsii import * + +from ..param import SpecialParameter as _SpecialParameter_5bbf34a2 + + +class ReturnsSpecialParameter( + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.submodule.returnsparam.ReturnsSpecialParameter", +): + def __init__(self) -> None: + jsii.create(ReturnsSpecialParameter, self, []) + + @jsii.member(jsii_name="returnsSpecialParam") + def returns_special_param(self) -> _SpecialParameter_5bbf34a2: + return typing.cast(_SpecialParameter_5bbf34a2, jsii.invoke(self, "returnsSpecialParam", [])) + + +__all__ = [ + "ReturnsSpecialParameter", +] + +publication.publish() + +`; diff --git a/packages/jsii-pacmak/test/generated-code/all-targets-tested.test.ts b/packages/jsii-pacmak/test/generated-code/all-targets-tested.test.ts index c9b3146bfe..2cc9732828 100644 --- a/packages/jsii-pacmak/test/generated-code/all-targets-tested.test.ts +++ b/packages/jsii-pacmak/test/generated-code/all-targets-tested.test.ts @@ -1,19 +1,20 @@ import { pathExists, readFile } from 'fs-extra'; import { join, relative, resolve } from 'path'; -import { ALL_BUILDERS } from '../../lib/targets'; + +import { TargetName } from '../../lib/targets'; const packageRoot = resolve(__dirname, '..', '..'); describe('target is tested', () => { - for (const targetName of Object.keys(ALL_BUILDERS)) { - if (targetName === 'js') { + for (const [key, targetName] of Object.entries(TargetName)) { + if (targetName === TargetName.JAVASCRIPT) { // We don't test this one because it's just a tarball continue; } const testFileName = `target-${targetName}.test.ts`; const testFilePath = join(__dirname, testFileName); - test(`${targetName} at ${relative( + test(`TargetName.${key} at ${relative( packageRoot, testFilePath, )}`, async () => { @@ -25,9 +26,10 @@ describe('target is tested', () => { ).resolves.toMatch( new RegExp( [ + "import \\{ TargetName \\} from '\\.\\./\\.\\./lib/targets';", "import \\{ verifyGeneratedCodeFor \\} from '\\./harness';", '', - `verifyGeneratedCodeFor\\('${targetName}'(?:, [0-9_]+)?\\);`, + `verifyGeneratedCodeFor\\(TargetName.${key}(?:, [0-9_]+)?\\);`, ].join('\\n'), ), ); diff --git a/packages/jsii-pacmak/test/generated-code/harness.ts b/packages/jsii-pacmak/test/generated-code/harness.ts index 0c21aea552..dda21ce3a5 100644 --- a/packages/jsii-pacmak/test/generated-code/harness.ts +++ b/packages/jsii-pacmak/test/generated-code/harness.ts @@ -2,15 +2,14 @@ import * as fs from 'fs-extra'; import * as os from 'os'; import * as path from 'path'; import * as process from 'process'; -import { TargetName } from '../../lib/targets'; -import { shell } from '../../lib/util'; -const PACMAK_CLI = path.resolve(__dirname, '..', '..', 'bin', 'jsii-pacmak'); +import { pacmak, TargetName } from '../../lib'; +import { shell } from '../../lib/util'; const FILE = Symbol('file'); const MISSING = Symbol('missing'); const TARBALL = Symbol('tarball'); -const TREE = Symbol('tree'); +export const TREE = Symbol('tree'); // Custom serializers so we can see the source without escape sequences expect.addSnapshotSerializer({ @@ -68,15 +67,15 @@ export function verifyGeneratedCodeFor( expect({ [TREE]: checkTree(outDir) }).toMatchSnapshot('/'); - if (targetName !== 'python') { + if (targetName !== TargetName.PYTHON) { return Promise.resolve(); } - return runMypy(path.join(outDir, 'python')); + return runMypy(path.join(outDir, targetName)); }); } } -function checkTree( +export function checkTree( file: string, root: string = file, ): TreeStructure | undefined { @@ -132,20 +131,13 @@ async function runPacmak( outdir: string, ): Promise { return expect( - shell( - process.execPath, - [ - ...process.execArgv, - JSON.stringify(PACMAK_CLI), - `--code-only`, - `--no-fingerprint`, - `--outdir=${JSON.stringify(outdir)}`, - `--target=${JSON.stringify(targetName)}`, - '--', - JSON.stringify(root), - ], - { cwd: root }, - ), + pacmak({ + codeOnly: true, + fingerprint: false, + inputDirectories: [root], + outputDirectory: outdir, + targets: [targetName], + }), ).resolves.not.toThrowError(); } @@ -184,7 +176,8 @@ async function runMypy(pythonRoot: string): Promise { 'pip', 'install', '--no-input', - '"mypy>=0.782"', + '-r', + path.resolve(__dirname, 'requirements-dev.txt'), // Note: this resolution is a little ugly, but it's there to avoid creating a dependency cycle JSON.stringify( path.resolve( @@ -203,10 +196,24 @@ async function runMypy(pythonRoot: string): Promise { [ '-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! + // We may not have the package's dependencies in scope. Let's just ignore that for now. + '--ignore-missing-imports', + // Output in readable form, with source excerpts and problem markers + '--pretty', + // Show the "standard" error codes to make it easier to google around + '--show-error-codes', + // Enable all optional checks -- let's be pedantic about everything! (except what we disable next) + '--strict', + // Ignore extraneous "# type: ignore" comments, they're too hard to avoid. + '--no-warn-unused-ignores', + // Ignore miscellaneous errors, typically due to unsupported stuff + '--disable-error-code=misc', + // Allow references to nested types within their nesting parent (this cannot statically type-check, as sub-types + // could override the nested one, so mypy does not even try). + // For more info => https://github.com/python/mypy/issues/8482 + '--disable-error-code=name-defined', + // Ignore subclassing types that did not resolve because we don't have dependencies + '--allow-subclassing-any', JSON.stringify(pythonRoot), ], { env }, diff --git a/packages/jsii-pacmak/test/generated-code/prerelease-identifiers.test.ts b/packages/jsii-pacmak/test/generated-code/prerelease-identifiers.test.ts new file mode 100644 index 0000000000..a65ae3d7eb --- /dev/null +++ b/packages/jsii-pacmak/test/generated-code/prerelease-identifiers.test.ts @@ -0,0 +1,160 @@ +import { Assembly, SchemaVersion, SPEC_FILE_NAME } from '@jsii/spec'; +import { toPascalCase } from 'codemaker'; +import * as fs from 'fs-extra'; +import { tmpdir } from 'os'; +import { join } from 'path'; + +import { pacmak } from '../../lib'; +import { checkTree, TREE } from './harness'; + +for (const prerelease of ['4.5.6-pre.1337', '2.0.0-rc.42']) { + test(`foo@1.2.3 depends on bar@^${prerelease}`, async () => { + const outDir = await fs.mkdtemp( + join(tmpdir(), 'jsii-pacmak.prerelease-identifiers.test.output.'), + ); + + try { + await mockSourceDirectory('1.2.3', { bar: `^${prerelease}` }, (source) => + pacmak({ + codeOnly: true, + force: true, + fingerprint: false, + inputDirectories: [source], + outputDirectory: outDir, + }), + ); + + expect({ [TREE]: checkTree(outDir) }).toMatchSnapshot('/'); + } finally { + await fs.remove(outDir); + } + }); + + test(`foo@${prerelease}`, async () => { + const outDir = await fs.mkdtemp( + join(tmpdir(), 'jsii-pacmak.prerelease-identifiers.test.output.'), + ); + + try { + await mockSourceDirectory(prerelease, undefined, (source) => + pacmak({ + codeOnly: true, + force: true, + fingerprint: false, + inputDirectories: [source], + outputDirectory: outDir, + }), + ); + + expect({ [TREE]: checkTree(outDir) }).toMatchSnapshot('/'); + } finally { + await fs.remove(outDir); + } + }); +} + +//#region Test Helpers + +async function mockSourceDirectory( + version: string, + dependencies: { readonly [name: string]: string } | undefined, + cb: (source: string) => Promise, +): Promise { + const dir = await fs.mkdtemp( + join(tmpdir(), 'jsii-pacmak.prerelease-identifiers.test.input.'), + ); + try { + const assembly = mockAssembly('foo', version, dependencies); + await fs.writeJson(join(dir, SPEC_FILE_NAME), assembly, { spaces: 2 }); + await fs.writeJson( + join(dir, 'package.json'), + { + jsii: { + outdir: 'dist', + targets: assembly.targets, + }, + license: assembly.license, + name: assembly.name, + peerDependencies: assembly.dependencies, + version: assembly.version, + }, + { spaces: 2 }, + ); + + /* eslint-disable no-await-in-loop */ + for (const [name, version] of Object.entries(assembly.dependencies ?? {})) { + const pkgDir = join(dir, 'node_modules', name); + await fs.mkdirp(pkgDir); + const assembly = mockAssembly(name, version.replace(/^[^\d]/, '')); + await fs.writeJson(join(pkgDir, SPEC_FILE_NAME), assembly, { spaces: 2 }); + await fs.writeJson( + join(pkgDir, 'package.json'), + { + jsii: { + outdir: 'dist', + targets: assembly.targets, + }, + license: assembly.license, + name: assembly.name, + version: assembly.version, + }, + { spaces: 2 }, + ); + } + /* eslint-enable no-await-in-loop */ + + return await cb(dir); + } finally { + await fs.remove(dir); + } +} + +function mockAssembly( + name: string, + version: string, + dependencies?: { readonly [name: string]: string }, +): Assembly { + return { + author: { name: 'Test', roles: ['test'] }, + dependencies, + dependencyClosure: + dependencies && + Object.keys(dependencies).reduce( + (closure, name) => ({ + ...closure, + [name]: { targets: targetsOf(name) }, + }), + {}, + ), + description: `Test assembly: ${name}`, + fingerprint: '', + homepage: `https://test.nope/${name}`, + jsiiVersion: '1337.42.1337', + license: 'UNLICENSED', + name, + repository: { type: 'git', url: `${name}.nope.git` }, + schema: SchemaVersion.LATEST, + targets: targetsOf(name), + version, + }; + + function targetsOf(name: string): Assembly['targets'] { + return { + dotnet: { + namespace: `Com.Acme.${toPascalCase(name)}`, + packageId: `Com.Acme.${toPascalCase(name)}`, + }, + go: {}, + java: { + maven: { groupId: 'com.acme', artifactId: name }, + package: `com.acme.${name}`, + }, + python: { + distName: name, + module: name, + }, + }; + } +} + +//#endregion diff --git a/packages/jsii-pacmak/test/generated-code/requirements-dev.txt b/packages/jsii-pacmak/test/generated-code/requirements-dev.txt new file mode 100644 index 0000000000..94048918fd --- /dev/null +++ b/packages/jsii-pacmak/test/generated-code/requirements-dev.txt @@ -0,0 +1 @@ +mypy==0.800 diff --git a/packages/jsii-pacmak/test/generated-code/target-dotnet.test.ts b/packages/jsii-pacmak/test/generated-code/target-dotnet.test.ts index d883d443d6..b741819970 100644 --- a/packages/jsii-pacmak/test/generated-code/target-dotnet.test.ts +++ b/packages/jsii-pacmak/test/generated-code/target-dotnet.test.ts @@ -1,3 +1,4 @@ +import { TargetName } from '../../lib/targets'; import { verifyGeneratedCodeFor } from './harness'; -verifyGeneratedCodeFor('dotnet'); +verifyGeneratedCodeFor(TargetName.DOTNET); diff --git a/packages/jsii-pacmak/test/generated-code/target-go.test.ts b/packages/jsii-pacmak/test/generated-code/target-go.test.ts index b3a1be6d79..c987a8dbfa 100644 --- a/packages/jsii-pacmak/test/generated-code/target-go.test.ts +++ b/packages/jsii-pacmak/test/generated-code/target-go.test.ts @@ -1,3 +1,4 @@ +import { TargetName } from '../../lib/targets'; import { verifyGeneratedCodeFor } from './harness'; -verifyGeneratedCodeFor('go'); +verifyGeneratedCodeFor(TargetName.GO); diff --git a/packages/jsii-pacmak/test/generated-code/target-java.test.ts b/packages/jsii-pacmak/test/generated-code/target-java.test.ts index d553d95384..922a2f6d33 100644 --- a/packages/jsii-pacmak/test/generated-code/target-java.test.ts +++ b/packages/jsii-pacmak/test/generated-code/target-java.test.ts @@ -1,3 +1,4 @@ +import { TargetName } from '../../lib/targets'; import { verifyGeneratedCodeFor } from './harness'; -verifyGeneratedCodeFor('java'); +verifyGeneratedCodeFor(TargetName.JAVA); diff --git a/packages/jsii-pacmak/test/generated-code/target-python.test.ts b/packages/jsii-pacmak/test/generated-code/target-python.test.ts index 7d0a637d28..9d35bc728d 100644 --- a/packages/jsii-pacmak/test/generated-code/target-python.test.ts +++ b/packages/jsii-pacmak/test/generated-code/target-python.test.ts @@ -1,3 +1,4 @@ +import { TargetName } from '../../lib/targets'; import { verifyGeneratedCodeFor } from './harness'; -verifyGeneratedCodeFor('python', 120_000); +verifyGeneratedCodeFor(TargetName.PYTHON, 120_000); diff --git a/packages/jsii-pacmak/test/npm-modules.test.ts b/packages/jsii-pacmak/test/npm-modules.test.ts index e7bf234cce..7cbccc227b 100644 --- a/packages/jsii-pacmak/test/npm-modules.test.ts +++ b/packages/jsii-pacmak/test/npm-modules.test.ts @@ -1,67 +1,83 @@ -import * as mockfs from 'mock-fs'; +import { mkdirp, mkdtemp, remove, writeJson } from 'fs-extra'; +import { tmpdir } from 'os'; +import { join } from 'path'; + import { findJsiiModules } from '../lib/npm-modules'; describe(findJsiiModules, () => { - afterEach((done) => { - mockfs.restore(); - done(); - }); + let workDir = tmpdir(); - // Increase the timeout - those are crazy slow on CI/CI for some reason. - jest.setTimeout(30_000); + beforeEach(() => + mkdtemp(join(tmpdir(), 'jsii-pacmak.npm-modules.test.')).then((dir) => { + workDir = dir; + }), + ); + + afterEach(async () => { + // Be extra cautious to avoid deleting this we shouldn't delete... + if (workDir !== tmpdir()) { + await remove(workDir); + } + }); test('is sorted topologically', async () => { - mockfs({ - '/packageA/package.json': JSON.stringify({ - name: 'packageA', - jsii: { - outdir: 'dist', - targets: { - python: {}, - }, + await mkdirp(join(workDir, 'packageA')); + await writeJson(join(workDir, 'packageA', 'package.json'), { + name: 'packageA', + jsii: { + outdir: 'dist', + targets: { + python: {}, }, - dependencies: { - packageB: '*', - }, - }), - '/packageB/package.json': JSON.stringify({ - name: 'packageB', - jsii: { - outdir: 'dist', - targets: { - python: {}, - }, + }, + dependencies: { + packageB: '*', + }, + }); + await mkdirp(join(workDir, 'packageB')); + await writeJson(join(workDir, 'packageB', 'package.json'), { + name: 'packageB', + jsii: { + outdir: 'dist', + targets: { + python: {}, }, - }), + }, }); - const mods = await findJsiiModules(['/packageA', '/packageB'], false); + const mods = await findJsiiModules( + [join(workDir, 'packageA'), join(workDir, 'packageB')], + false, + ); expect(mods.map((m) => m.name)).toEqual(['packageB', 'packageA']); }); test('without deps loads packages in given order', async () => { - mockfs({ - '/packageA/package.json': JSON.stringify({ - name: 'packageA', - jsii: { - outdir: 'dist', - targets: { - python: {}, - }, + await mkdirp(join(workDir, 'packageA')); + await writeJson(join(workDir, 'packageA', 'package.json'), { + name: 'packageA', + jsii: { + outdir: 'dist', + targets: { + python: {}, }, - }), - '/packageB/package.json': JSON.stringify({ - name: 'packageB', - jsii: { - outdir: 'dist', - targets: { - python: {}, - }, + }, + }); + await mkdirp(join(workDir, 'packageB')); + await writeJson(join(workDir, 'packageB', 'package.json'), { + name: 'packageB', + jsii: { + outdir: 'dist', + targets: { + python: {}, }, - }), + }, }); - const mods = await findJsiiModules(['/packageA', '/packageB'], false); + const mods = await findJsiiModules( + [join(workDir, 'packageA'), join(workDir, 'packageB')], + false, + ); expect(mods.map((m) => m.name)).toEqual(['packageA', 'packageB']); }); }); diff --git a/packages/jsii-pacmak/test/python.test.ts b/packages/jsii-pacmak/test/python.test.ts index 24a46d15d5..d1cfbf1d2b 100644 --- a/packages/jsii-pacmak/test/python.test.ts +++ b/packages/jsii-pacmak/test/python.test.ts @@ -113,6 +113,23 @@ test('list with multiline text', () => { ); }); +test('escape character escaping', () => { + converts( + [ + String.raw`For example, if you specify "\N", BigQuery interprets "\N" as a null value`, + String.raw`Single slash \\`, // markdown parses the escape even if ts doesn't + String.raw`Double slash \\\\`, + String.raw`Triple slash \\\\\\`, + ], + [ + String.raw`For example, if you specify "\\N", BigQuery interprets "\\N" as a null value`, + String.raw`Single slash \\`, + String.raw`Double slash \\\\`, + String.raw`Triple slash \\\\\\`, + ], + ); +}); + function converts(input: string[], output: string[]) { const converted = md2rst(input.join('\n')); 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 434ae86e30..e4bc575ff3 100644 --- a/packages/jsii-pacmak/test/targets/python/type-name.test.ts +++ b/packages/jsii-pacmak/test/targets/python/type-name.test.ts @@ -6,6 +6,7 @@ import { SchemaVersion, TypeReference, } from '@jsii/spec'; + import { toTypeName, NamingContext, diff --git a/packages/jsii-pacmak/test/targets/version-utils.test.ts b/packages/jsii-pacmak/test/targets/version-utils.test.ts index 13a73cee2a..0be8b9b615 100644 --- a/packages/jsii-pacmak/test/targets/version-utils.test.ts +++ b/packages/jsii-pacmak/test/targets/version-utils.test.ts @@ -1,7 +1,9 @@ +import { TargetName } from '../../lib/targets'; import { toMavenVersionRange, toNuGetVersionRange, toPythonVersionRange, + toReleaseVersion, } from '../../lib/targets/version-utils'; const examples: Record< @@ -44,30 +46,30 @@ const examples: Record< // Less usual ranges '>0.1.2': { - maven: '(0.1.2,]', - nuget: '(0.1.2,]', + maven: '(0.1.2,)', + nuget: '(0.1.2,)', python: '>0.1.2', }, '>=0.1.2': { - maven: '[0.1.2,]', - nuget: '[0.1.2,]', + maven: '[0.1.2,)', + nuget: '[0.1.2,)', python: '>=0.1.2', }, '<0.1.2': { - maven: '[,0.1.2)', - nuget: '[,0.1.2)', + maven: '(,0.1.2)', + nuget: '(,0.1.2)', python: '<0.1.2', }, '<=0.1.2': { - maven: '[,0.1.2]', - nuget: '[,0.1.2]', + maven: '(,0.1.2]', + nuget: '(,0.1.2]', python: '<=0.1.2', }, // Somewhat unusual ranges '*': { - maven: '[0.0.0,]', - nuget: '[0.0.0,]', + maven: '[0.0.0,)', + nuget: '[0.0.0,)', python: '>=0.0.0', }, '1.2.*': { @@ -102,3 +104,60 @@ describe(toPythonVersionRange, () => { expect(toPythonVersionRange(semver)).toEqual(python)); } }); + +describe(toReleaseVersion, () => { + type Expectations = { readonly [K in TargetName]: string | RegExp }; + const examples: Record = { + '1.2.3': { + dotnet: '1.2.3', + go: '1.2.3', + java: '1.2.3', + js: '1.2.3', + python: '1.2.3', + }, + '1.2.3-pre': { + dotnet: '1.2.3-pre', + go: '1.2.3-pre', + java: '1.2.3-pre', + js: '1.2.3-pre', + python: /Unable to map prerelease identifier \(in: 1\.2\.3-pre\) components to python: \[ 'pre' \]/, + }, + '1.2.3-alpha.1337': { + dotnet: '1.2.3-alpha.1337', + go: '1.2.3-alpha.1337', + java: '1.2.3-alpha.1337', + js: '1.2.3-alpha.1337', + python: '1.2.3.a1337', + }, + '1.2.3-beta.42': { + dotnet: '1.2.3-beta.42', + go: '1.2.3-beta.42', + java: '1.2.3-beta.42', + js: '1.2.3-beta.42', + python: '1.2.3.b42', + }, + '1.2.3-rc.9': { + dotnet: '1.2.3-rc.9', + go: '1.2.3-rc.9', + java: '1.2.3-rc.9', + js: '1.2.3-rc.9', + python: '1.2.3.rc9', + }, + }; + + for (const [version, targets] of Object.entries(examples)) { + test(`"${version}" translations`, () => { + for (const [target, expectedResult] of Object.entries(targets)) { + if (typeof expectedResult === 'string') { + expect(toReleaseVersion(version, target as TargetName)).toBe( + expectedResult, + ); + } else { + expect(() => toReleaseVersion(version, target as TargetName)).toThrow( + expectedResult, + ); + } + } + }); + } +}); diff --git a/packages/jsii-pacmak/tsconfig.json b/packages/jsii-pacmak/tsconfig.json index 1029356f75..b1f81b544d 100644 --- a/packages/jsii-pacmak/tsconfig.json +++ b/packages/jsii-pacmak/tsconfig.json @@ -3,10 +3,11 @@ "include": [ "**/*.ts" ], + "exclude": ["jest.config.ts"], "references": [ { "path": "../@jsii/spec" }, { "path": "../codemaker" }, { "path": "../jsii-rosetta" }, - { "path": "../jsii-reflect" } - ] + { "path": "../jsii-reflect" }, + ], } diff --git a/packages/jsii-reflect/bin/jsii-tree.ts b/packages/jsii-reflect/bin/jsii-tree.ts index e5a9f26713..8cd8fd3559 100644 --- a/packages/jsii-reflect/bin/jsii-tree.ts +++ b/packages/jsii-reflect/bin/jsii-tree.ts @@ -1,5 +1,6 @@ import * as colors from 'colors/safe'; import * as yargs from 'yargs'; + import { TypeSystem, TypeSystemTree } from '../lib'; async function main() { diff --git a/packages/jsii-reflect/jest.config.ts b/packages/jsii-reflect/jest.config.ts new file mode 100644 index 0000000000..623c3a4854 --- /dev/null +++ b/packages/jsii-reflect/jest.config.ts @@ -0,0 +1,10 @@ +import { overriddenConfig } from '../../jest.config'; + +export default overriddenConfig({ + coverageThreshold: { + global: { + branches: 39, + statements: 54, + }, + }, +}); diff --git a/packages/jsii-reflect/lib/assembly.ts b/packages/jsii-reflect/lib/assembly.ts index 11fc26f5c4..08f3361258 100644 --- a/packages/jsii-reflect/lib/assembly.ts +++ b/packages/jsii-reflect/lib/assembly.ts @@ -1,9 +1,10 @@ import * as jsii from '@jsii/spec'; + import { ClassType } from './class'; import { Dependency } from './dependency'; import { EnumType } from './enum'; -import { ModuleLike } from './module-like'; import { InterfaceType } from './interface'; +import { ModuleLike } from './module-like'; import { Submodule } from './submodule'; import { Type } from './type'; import { TypeSystem } from './type-system'; @@ -28,6 +29,13 @@ export class Assembly extends ModuleLike { return this.spec.schema; } + /** + * The version of the jsii compiler that was used to produce this Assembly. + */ + public get jsiiVersion(): string { + return this.spec.jsiiVersion; + } + /** * The name of the assembly */ @@ -143,17 +151,22 @@ export class Assembly extends ModuleLike { return this.spec.readme; } + /** + * Return the those submodules nested directly under the assembly + */ public get submodules(): readonly Submodule[] { - const { submodules } = this._types; - return Object.values(submodules); + const { submodules } = this._analyzeTypes(); + return Object.entries(submodules) + .filter(([name, _]) => name.split('.').length === 2) + .map(([_, submodule]) => submodule); } /** - * All types in the assembly + * Return all submodules, even those transtively nested */ - public get types(): readonly Type[] { - const { types } = this._types; - return Object.values(types); + public get allSubmodules(): readonly Submodule[] { + const { submodules } = this._analyzeTypes(); + return Object.values(submodules); } public findType(fqn: string) { @@ -174,6 +187,17 @@ export class Assembly extends ModuleLike { jsii.validateAssembly(this.spec); } + protected get submoduleMap(): Readonly> { + return this._analyzeTypes().submodules; + } + + /** + * All types in the root of the assembly + */ + protected get typeMap(): Readonly> { + return this._analyzeTypes().types; + } + private get _dependencies() { if (!this._dependencyCache) { this._dependencyCache = {}; @@ -191,21 +215,14 @@ export class Assembly extends ModuleLike { return this._dependencyCache; } - private get _types() { + private _analyzeTypes() { if (!this._typeCache || !this._submoduleCache) { this._typeCache = {}; - const submodules: { [fullName: string]: SubmoduleMap } = {}; + const submoduleBuilders = this.discoverSubmodules(); const ts = this.spec.types ?? {}; - for (const fqn of Object.keys(ts)) { - const typeSpec = ts[fqn]; - - let submodule = typeSpec.namespace; - while (submodule != null && `${this.spec.name}.${submodule}` in ts) { - submodule = ts[`${this.spec.name}.${submodule}`].namespace; - } - + for (const [fqn, typeSpec] of Object.entries(ts)) { let type: Type; switch (typeSpec.kind) { case jsii.TypeKind.Class: @@ -224,53 +241,116 @@ export class Assembly extends ModuleLike { throw new Error('Unknown type kind'); } + // Find containing submodule (potentially through containing nested classes, + // which DO count as namespaces but don't count as modules) + let submodule = typeSpec.namespace; + while (submodule != null && `${this.spec.name}.${submodule}` in ts) { + submodule = ts[`${this.spec.name}.${submodule}`].namespace; + } + if (submodule != null) { - const [root, ...parts] = submodule.split('.'); - let container = (submodules[root] = submodules[root] ?? { - submodules: {}, - types: [], - }); - for (const part of parts) { - container = container.submodules[part] = container.submodules[ - part - ] ?? { submodules: {}, types: [] }; - } - container.types.push(type); + const moduleName = `${this.spec.name}.${submodule}`; + submoduleBuilders[moduleName].addType(type); } else { this._typeCache[fqn] = type; } } - this._submoduleCache = {}; - for (const [name, map] of Object.entries(submodules)) { - this._submoduleCache[name] = makeSubmodule( - this.system, - map, - `${this.name}.${name}`, - ); - } + this._submoduleCache = mapValues(submoduleBuilders, (b) => b.build()); } - return { types: this._typeCache, submodules: this._submoduleCache }; } + + /** + * Return a builder for all submodules in this assembly (so that we can + * add types into the objects). + */ + private discoverSubmodules(): Record { + const system = this.system; + + const ret: Record = {}; + for (const [submoduleName, submoduleSpec] of Object.entries( + this.spec.submodules ?? {}, + )) { + ret[submoduleName] = new SubmoduleBuilder( + system, + submoduleSpec, + submoduleName, + ret, + ); + } + return ret; + } } -interface SubmoduleMap { - readonly submodules: { [fullName: string]: SubmoduleMap }; - readonly types: Type[]; +/** + * Mutable Submodule builder + * + * Allows adding Types before the submodule is frozen to a Submodule class. + * + * Takes a reference to the full map of submodule builders, so that come time + * to translate + */ +class SubmoduleBuilder { + private readonly types: Record = {}; + + private _built?: Submodule; + + public constructor( + private readonly system: TypeSystem, + private readonly spec: jsii.Submodule, + private readonly fullName: string, + private readonly allModuleBuilders: Record, + ) {} + + /** + * Whether this submodule is a direct child of another submodule + */ + public isChildOf(other: SubmoduleBuilder) { + return ( + this.fullName.startsWith(`${other.fullName}.`) && + this.fullName.split('.').length === other.fullName.split('.').length + 1 + ); + } + + public build(): Submodule { + if (!this._built) { + this._built = new Submodule( + this.system, + this.spec, + this.fullName, + mapValues(this.findSubmoduleBuilders(), (b) => b.build()), + this.types, + ); + } + return this._built; + } + + /** + * Return all the builders from the map that are nested underneath ourselves. + */ + private findSubmoduleBuilders() { + const ret: Record = {}; + for (const [k, child] of Object.entries(this.allModuleBuilders)) { + if (child.isChildOf(this)) { + ret[k] = child; + } + } + return ret; + } + + public addType(type: Type) { + this.types[type.fqn] = type; + } } -function makeSubmodule( - system: TypeSystem, - map: SubmoduleMap, - fullName: string, -): Submodule { - return new Submodule( - system, - fullName, - Object.entries(map.submodules).map(([name, subMap]) => - makeSubmodule(system, subMap, `${fullName}.${name}`), - ), - map.types, - ); +function mapValues( + xs: Record, + fn: (x: A) => B, +): Record { + const ret: Record = {}; + for (const [k, v] of Object.entries(xs)) { + ret[k] = fn(v); + } + return ret; } diff --git a/packages/jsii-reflect/lib/callable.ts b/packages/jsii-reflect/lib/callable.ts index ad8f18b81a..57ff6e13ea 100644 --- a/packages/jsii-reflect/lib/callable.ts +++ b/packages/jsii-reflect/lib/callable.ts @@ -1,10 +1,14 @@ import * as jsii from '@jsii/spec'; + import { Assembly } from './assembly'; import { Docs, Documentable } from './docs'; import { Overridable } from './overridable'; import { Parameter } from './parameter'; -import { SourceLocatable } from './source'; -import { locationInRepository, SourceLocation } from './source'; +import { + SourceLocatable, + locationInRepository, + SourceLocation, +} from './source'; import { Type } from './type'; import { MemberKind, TypeMember } from './type-member'; import { TypeSystem } from './type-system'; diff --git a/packages/jsii-reflect/lib/class.ts b/packages/jsii-reflect/lib/class.ts index 47ffe04d9c..4fad84e320 100644 --- a/packages/jsii-reflect/lib/class.ts +++ b/packages/jsii-reflect/lib/class.ts @@ -1,4 +1,5 @@ import * as jsii from '@jsii/spec'; + import { Assembly } from './assembly'; import { Initializer } from './initializer'; import { InterfaceType } from './interface'; diff --git a/packages/jsii-reflect/lib/docs.ts b/packages/jsii-reflect/lib/docs.ts index cc84e01a5b..fa8a185030 100644 --- a/packages/jsii-reflect/lib/docs.ts +++ b/packages/jsii-reflect/lib/docs.ts @@ -1,5 +1,6 @@ import * as jsii from '@jsii/spec'; import { Stability } from '@jsii/spec'; + import { TypeSystem } from './type-system'; export interface Documentable { diff --git a/packages/jsii-reflect/lib/enum.ts b/packages/jsii-reflect/lib/enum.ts index 167df22f8b..ac9c6bbd64 100644 --- a/packages/jsii-reflect/lib/enum.ts +++ b/packages/jsii-reflect/lib/enum.ts @@ -1,4 +1,5 @@ import * as jsii from '@jsii/spec'; + import { Assembly } from './assembly'; import { Docs, Documentable } from './docs'; import { Type } from './type'; diff --git a/packages/jsii-reflect/lib/interface.ts b/packages/jsii-reflect/lib/interface.ts index 7bc1331a90..f3e0c9f4b1 100644 --- a/packages/jsii-reflect/lib/interface.ts +++ b/packages/jsii-reflect/lib/interface.ts @@ -1,4 +1,5 @@ import * as jsii from '@jsii/spec'; + import { Assembly } from './assembly'; import { Method } from './method'; import { Property } from './property'; diff --git a/packages/jsii-reflect/lib/method.ts b/packages/jsii-reflect/lib/method.ts index ebd7eaabb0..b3fdcbd542 100644 --- a/packages/jsii-reflect/lib/method.ts +++ b/packages/jsii-reflect/lib/method.ts @@ -1,4 +1,5 @@ import * as jsii from '@jsii/spec'; + import { Assembly } from './assembly'; import { Callable } from './callable'; import { Documentable } from './docs'; diff --git a/packages/jsii-reflect/lib/module-like.ts b/packages/jsii-reflect/lib/module-like.ts index 03f9150eb7..0ba8315320 100644 --- a/packages/jsii-reflect/lib/module-like.ts +++ b/packages/jsii-reflect/lib/module-like.ts @@ -1,3 +1,5 @@ +import * as jsii from '@jsii/spec'; + import { ClassType } from './class'; import { EnumType } from './enum'; import { InterfaceType } from './interface'; @@ -7,11 +9,28 @@ import { TypeSystem } from './type-system'; export abstract class ModuleLike { public declare abstract readonly fqn: string; - public declare abstract readonly submodules: readonly Submodule[]; - public declare abstract readonly types: readonly Type[]; + + /** + * A map of target name to configuration, which is used when generating packages for + * various languages. + */ + public declare abstract readonly targets?: jsii.AssemblyTargets; + public declare abstract readonly readme?: jsii.ReadMe; + + protected declare abstract readonly submoduleMap: Readonly< + Record + >; + protected declare abstract readonly typeMap: Readonly>; protected constructor(public readonly system: TypeSystem) {} + public get submodules(): readonly Submodule[] { + return Object.values(this.submoduleMap); + } + public get types(): readonly Type[] { + return Object.values(this.typeMap); + } + public get classes(): readonly ClassType[] { return this.types .filter((t) => t instanceof ClassType) @@ -31,7 +50,7 @@ export abstract class ModuleLike { } public tryFindType(fqn: string): Type | undefined { - const ownType = this.types.find((type) => type.fqn === fqn); + const ownType = this.typeMap[fqn]; if (ownType != null) { return ownType; } @@ -40,8 +59,12 @@ export abstract class ModuleLike { return undefined; } - const [subName] = fqn.slice(this.fqn.length + 1).split('.'); - const sub = this.submodules.find((sub) => sub.name === subName); + const myFqnLength = this.fqn.split('.').length; + const subFqn = fqn + .split('.') + .slice(0, myFqnLength + 1) + .join('.'); + const sub = this.submoduleMap[subFqn]; return sub?.tryFindType(fqn); } } diff --git a/packages/jsii-reflect/lib/optional-value.ts b/packages/jsii-reflect/lib/optional-value.ts index 313e6d8323..ecbac20044 100644 --- a/packages/jsii-reflect/lib/optional-value.ts +++ b/packages/jsii-reflect/lib/optional-value.ts @@ -1,4 +1,5 @@ import * as jsii from '@jsii/spec'; + import { TypeReference } from './type-ref'; import { TypeSystem } from './type-system'; diff --git a/packages/jsii-reflect/lib/parameter.ts b/packages/jsii-reflect/lib/parameter.ts index 90a0923cb7..79da2371b1 100644 --- a/packages/jsii-reflect/lib/parameter.ts +++ b/packages/jsii-reflect/lib/parameter.ts @@ -1,4 +1,5 @@ import * as jsii from '@jsii/spec'; + import { Callable } from './callable'; import { Docs, Documentable } from './docs'; import { OptionalValue } from './optional-value'; diff --git a/packages/jsii-reflect/lib/property.ts b/packages/jsii-reflect/lib/property.ts index 952f233762..cb4f7ae179 100644 --- a/packages/jsii-reflect/lib/property.ts +++ b/packages/jsii-reflect/lib/property.ts @@ -1,4 +1,5 @@ import * as jsii from '@jsii/spec'; + import { Assembly } from './assembly'; import { Docs, Documentable } from './docs'; import { OptionalValue } from './optional-value'; diff --git a/packages/jsii-reflect/lib/reference-type.ts b/packages/jsii-reflect/lib/reference-type.ts index 41ef6b2b3d..c75db42551 100644 --- a/packages/jsii-reflect/lib/reference-type.ts +++ b/packages/jsii-reflect/lib/reference-type.ts @@ -1,4 +1,5 @@ import * as jsii from '@jsii/spec'; + import { Assembly } from './assembly'; import { InterfaceType } from './interface'; import { Method } from './method'; diff --git a/packages/jsii-reflect/lib/submodule.ts b/packages/jsii-reflect/lib/submodule.ts index 07b183edf9..56d84d4feb 100644 --- a/packages/jsii-reflect/lib/submodule.ts +++ b/packages/jsii-reflect/lib/submodule.ts @@ -1,3 +1,5 @@ +import * as jsii from '@jsii/spec'; + import { ModuleLike } from './module-like'; import { Type } from './type'; import { TypeSystem } from './type-system'; @@ -10,12 +12,28 @@ export class Submodule extends ModuleLike { public constructor( system: TypeSystem, + public readonly spec: jsii.Submodule, public readonly fqn: string, - public readonly submodules: readonly Submodule[], - public readonly types: readonly Type[], + protected readonly submoduleMap: Readonly>, + protected readonly typeMap: Readonly>, ) { super(system); this.name = fqn.split('.').pop()!; } + + /** + * A map of target name to configuration, which is used when generating packages for + * various languages. + */ + public get targets() { + return this.spec.targets; + } + + /** + * The top-level readme document for this assembly (if any). + */ + public get readme() { + return this.spec.readme; + } } diff --git a/packages/jsii-reflect/lib/tree.ts b/packages/jsii-reflect/lib/tree.ts index 63ed8d7c36..4e8a976eca 100644 --- a/packages/jsii-reflect/lib/tree.ts +++ b/packages/jsii-reflect/lib/tree.ts @@ -1,6 +1,7 @@ -import * as colors from 'colors/safe'; import { Stability } from '@jsii/spec'; +import * as colors from 'colors/safe'; import { AsciiTree } from 'oo-ascii-tree'; + import { Assembly } from './assembly'; import { ClassType } from './class'; import { Dependency } from './dependency'; @@ -12,8 +13,8 @@ import { Method } from './method'; import { OptionalValue } from './optional-value'; import { Parameter } from './parameter'; import { Property } from './property'; -import { TypeSystem } from './type-system'; import { Submodule } from './submodule'; +import { TypeSystem } from './type-system'; export interface TypeSystemTreeOptions { /** @@ -411,20 +412,22 @@ function describeStability( thing: Documentable, options: TypeSystemTreeOptions, ) { - if (!options.stabilities) { + if (!options.stabilities || thing.docs.stability == null) { return ''; } switch (thing.docs.stability) { case Stability.Stable: return ` (${colors.green('stable')})`; + case Stability.External: + return ` (${colors.green('external')})`; case Stability.Experimental: return ` (${colors.yellow('experimental')})`; case Stability.Deprecated: return ` (${colors.red('deprecated')})`; + default: + return ''; } - - return ''; } function maybeStatic(mem: Property | Method) { diff --git a/packages/jsii-reflect/lib/type-ref.ts b/packages/jsii-reflect/lib/type-ref.ts index 57a5bab8ea..55d1a57c0e 100644 --- a/packages/jsii-reflect/lib/type-ref.ts +++ b/packages/jsii-reflect/lib/type-ref.ts @@ -1,4 +1,5 @@ import * as jsii from '@jsii/spec'; + import { Type } from './type'; import { TypeSystem } from './type-system'; diff --git a/packages/jsii-reflect/lib/type-system.ts b/packages/jsii-reflect/lib/type-system.ts index bcfd740ef8..988e3018df 100644 --- a/packages/jsii-reflect/lib/type-system.ts +++ b/packages/jsii-reflect/lib/type-system.ts @@ -1,7 +1,8 @@ -import * as fs from 'fs'; import * as jsii from '@jsii/spec'; +import * as fs from 'fs'; import * as path from 'path'; import { promisify } from 'util'; + import { Assembly } from './assembly'; import { ClassType } from './class'; import { EnumType } from './enum'; diff --git a/packages/jsii-reflect/lib/type.ts b/packages/jsii-reflect/lib/type.ts index cb94c6dcd8..3a3441f236 100644 --- a/packages/jsii-reflect/lib/type.ts +++ b/packages/jsii-reflect/lib/type.ts @@ -1,4 +1,5 @@ import * as jsii from '@jsii/spec'; + import { Assembly } from './assembly'; import { ClassType } from './class'; import { Docs, Documentable } from './docs'; @@ -9,8 +10,8 @@ import { SourceLocatable, SourceLocation, } from './source'; -import { TypeSystem } from './type-system'; import { TypeReference } from './type-ref'; +import { TypeSystem } from './type-system'; export abstract class Type implements Documentable, SourceLocatable { public constructor( diff --git a/packages/jsii-reflect/package.json b/packages/jsii-reflect/package.json index 3c932bf645..9627a6ae2e 100644 --- a/packages/jsii-reflect/package.json +++ b/packages/jsii-reflect/package.json @@ -36,44 +36,22 @@ "dependencies": { "@jsii/spec": "^0.0.0", "colors": "^1.4.0", - "fs-extra": "^9.0.1", + "fs-extra": "^9.1.0", "oo-ascii-tree": "^0.0.0", - "yargs": "^16.0.3" + "yargs": "^16.2.0" }, "devDependencies": { "@scope/jsii-calc-lib": "^0.0.0", "@types/fs-extra": "^8.1.1", - "@types/jest": "^26.0.14", - "@types/node": "^10.17.39", - "@types/yargs": "^15.0.7", - "eslint": "^7.11.0", - "jest": "^26.5.2", + "@types/jest": "^26.0.20", + "@types/node": "^10.17.51", + "@types/yargs": "^16.0.0", + "eslint": "^7.19.0", + "jest": "^26.6.3", "jsii": "^0.0.0", "jsii-build-tools": "^0.0.0", - "jsii-calc": "^0.0.0", - "prettier": "^2.1.2", - "typescript": "~3.9.7" - }, - "jest": { - "collectCoverage": true, - "collectCoverageFrom": [ - "**/bin/**/*.js", - "**/lib/**/*.js" - ], - "coverageReporters": [ - "lcov", - "text" - ], - "coverageThreshold": { - "global": { - "branches": 30, - "statements": 45 - } - }, - "errorOnDeprecated": true, - "testEnvironment": "node", - "testMatch": [ - "**/?(*.)+(spec|test).js" - ] + "jsii-calc": "^3.20.120", + "prettier": "^2.2.1", + "typescript": "~3.9.9" } } diff --git a/packages/jsii-reflect/test/__snapshots__/jsii-tree.test.js.snap b/packages/jsii-reflect/test/__snapshots__/jsii-tree.test.ts.snap similarity index 96% rename from packages/jsii-reflect/test/__snapshots__/jsii-tree.test.js.snap rename to packages/jsii-reflect/test/__snapshots__/jsii-tree.test.ts.snap index 57f2deed58..c3bd857f99 100644 --- a/packages/jsii-reflect/test/__snapshots__/jsii-tree.test.js.snap +++ b/packages/jsii-reflect/test/__snapshots__/jsii-tree.test.ts.snap @@ -5,7 +5,6 @@ exports[`jsii-tree --all 1`] = ` โ”œโ”€โ”ฌ jsii-calc โ”‚ โ”œโ”€โ”ฌ dependencies โ”‚ โ”‚ โ”œโ”€โ”€ @scope/jsii-calc-base - โ”‚ โ”‚ โ”œโ”€โ”€ @scope/jsii-calc-base-of-base โ”‚ โ”‚ โ””โ”€โ”€ @scope/jsii-calc-lib โ”‚ โ”œโ”€โ”ฌ submodules โ”‚ โ”‚ โ”œโ”€โ”ฌ DerivedClassHasNoProperties @@ -167,27 +166,42 @@ exports[`jsii-tree --all 1`] = ` โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ props โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: boolean - โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ nested_submodule - โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ submodules - โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ deeplyNested - โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types - โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ interface INamespaced (stable) - โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ members - โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ definedAt property (stable) - โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract - โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable - โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ nested_submodule + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ submodules + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ deeplyNested + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ interface INamespaced (stable) + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ definedAt property (stable) + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ class Namespaced (stable) + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ interfaces: INamespaced + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ definedAt property (stable) + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ goodness property (stable) + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.submodule.child.Goodness + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ param + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ interface SpecialParameter (stable) + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ value property (stable) + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ returnsparam โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types - โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ class Namespaced (stable) - โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ interfaces: INamespaced + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ class ReturnsSpecialParameter (stable) โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ members - โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ definedAt property (stable) - โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable - โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string - โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ goodness property (stable) - โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract - โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable - โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.submodule.child.Goodness + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ () initializer (stable) + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ returnsSpecialParam() method (stable) + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: jsii-calc.submodule.param.SpecialParameter โ”‚ โ”‚ โ””โ”€โ”ฌ types โ”‚ โ”‚ โ””โ”€โ”ฌ class MyClass (stable) โ”‚ โ”‚ โ”œโ”€โ”€ interfaces: INamespaced @@ -196,6 +210,11 @@ exports[`jsii-tree --all 1`] = ` โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ props โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.submodule.child.SomeStruct + โ”‚ โ”‚ โ”œโ”€โ”ฌ methodWithSpecialParam(param) method (stable) + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ param + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.submodule.param.SpecialParameter + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string โ”‚ โ”‚ โ”œโ”€โ”ฌ awesomeness property (stable) โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.submodule.child.Awesomeness @@ -1644,6 +1663,26 @@ exports[`jsii-tree --all 1`] = ` โ”‚ โ”‚ โ””โ”€โ”ฌ static staticVariable property (stable) โ”‚ โ”‚ โ”œโ”€โ”€ static โ”‚ โ”‚ โ””โ”€โ”€ type: boolean + โ”‚ โ”œโ”€โ”ฌ class StaticHelloChild (stable) + โ”‚ โ”‚ โ”œโ”€โ”€ base: StaticHelloParent + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ static method() method (stable) + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ””โ”€โ”ฌ static property property (stable) + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”œโ”€โ”ฌ class StaticHelloParent (stable) + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer (stable) + โ”‚ โ”‚ โ”œโ”€โ”ฌ static method() method (stable) + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ””โ”€โ”ฌ static property property (stable) + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ””โ”€โ”€ type: number โ”‚ โ”œโ”€โ”ฌ class Statics (stable) โ”‚ โ”‚ โ””โ”€โ”ฌ members โ”‚ โ”‚ โ”œโ”€โ”ฌ (value) initializer (stable) @@ -1692,10 +1731,10 @@ exports[`jsii-tree --all 1`] = ` โ”‚ โ”‚ โ”œโ”€โ”€ () initializer (stable) โ”‚ โ”‚ โ””โ”€โ”ฌ youSeeMe property (stable) โ”‚ โ”‚ โ””โ”€โ”€ type: string - โ”‚ โ”œโ”€โ”ฌ class StructPassing + โ”‚ โ”œโ”€โ”ฌ class StructPassing (external) โ”‚ โ”‚ โ””โ”€โ”ฌ members - โ”‚ โ”‚ โ”œโ”€โ”€ () initializer - โ”‚ โ”‚ โ”œโ”€โ”ฌ static howManyVarArgsDidIPass(_positional,inputs) method + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer (external) + โ”‚ โ”‚ โ”œโ”€โ”ฌ static howManyVarArgsDidIPass(_positional,inputs) method (external) โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ variadic โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters @@ -1705,7 +1744,7 @@ exports[`jsii-tree --all 1`] = ` โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ type: jsii-calc.TopLevelStruct โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ variadic โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: number - โ”‚ โ”‚ โ””โ”€โ”ฌ static roundTrip(_positional,input) method + โ”‚ โ”‚ โ””โ”€โ”ฌ static roundTrip(_positional,input) method (external) โ”‚ โ”‚ โ”œโ”€โ”€ static โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ _positional @@ -2585,6 +2624,17 @@ exports[`jsii-tree --all 1`] = ` โ”‚ โ”‚ โ”œโ”€โ”€ () initializer โ”‚ โ”‚ โ””โ”€โ”ฌ typeName() method โ”‚ โ”‚ โ””โ”€โ”€ returns: any + โ”‚ โ”œโ”€โ”ฌ class StaticConsumer + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ””โ”€โ”ฌ static consume(args) method + โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”œโ”€โ”€ variadic + โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ args + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ type: any + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ variadic + โ”‚ โ”‚ โ””โ”€โ”€ returns: void โ”‚ โ”œโ”€โ”ฌ interface BaseProps โ”‚ โ”‚ โ”œโ”€โ”ฌ interfaces โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ VeryBaseProps @@ -2804,14 +2854,20 @@ exports[`jsii-tree --inheritance 1`] = ` โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ isolated โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ class Kwargs - โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ nested_submodule - โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ submodules - โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ deeplyNested - โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types - โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ interface INamespaced + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ nested_submodule + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ submodules + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ deeplyNested + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ interface INamespaced + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ class Namespaced + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ interfaces: INamespaced + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ param + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ interface SpecialParameter + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ returnsparam โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types - โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ class Namespaced - โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ interfaces: INamespaced + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ class ReturnsSpecialParameter โ”‚ โ”‚ โ””โ”€โ”ฌ types โ”‚ โ”‚ โ””โ”€โ”ฌ class MyClass โ”‚ โ”‚ โ””โ”€โ”€ interfaces: INamespaced @@ -2941,6 +2997,9 @@ exports[`jsii-tree --inheritance 1`] = ` โ”‚ โ”œโ”€โ”€ class SomeTypeJsii976 โ”‚ โ”œโ”€โ”€ class StableClass โ”‚ โ”œโ”€โ”€ class StaticContext + โ”‚ โ”œโ”€โ”ฌ class StaticHelloChild + โ”‚ โ”‚ โ””โ”€โ”€ base: StaticHelloParent + โ”‚ โ”œโ”€โ”€ class StaticHelloParent โ”‚ โ”œโ”€โ”€ class Statics โ”‚ โ”œโ”€โ”€ class StripInternal โ”‚ โ”œโ”€โ”€ class StructPassing @@ -3073,6 +3132,7 @@ exports[`jsii-tree --inheritance 1`] = ` โ”œโ”€โ”ฌ @scope/jsii-calc-base โ”‚ โ””โ”€โ”ฌ types โ”‚ โ”œโ”€โ”€ class Base + โ”‚ โ”œโ”€โ”€ class StaticConsumer โ”‚ โ”œโ”€โ”ฌ interface BaseProps โ”‚ โ”‚ โ””โ”€โ”ฌ interfaces โ”‚ โ”‚ โ””โ”€โ”€ VeryBaseProps @@ -3211,22 +3271,34 @@ exports[`jsii-tree --members 1`] = ` โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ class Kwargs โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ members โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ static method(props) method - โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ nested_submodule - โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ submodules - โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ deeplyNested - โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types - โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ interface INamespaced - โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ members - โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ definedAt property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ nested_submodule + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ submodules + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ deeplyNested + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ interface INamespaced + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ definedAt property + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ class Namespaced + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ definedAt property + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ goodness property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ param + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ interface SpecialParameter + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ value property + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ returnsparam โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types - โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ class Namespaced + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ class ReturnsSpecialParameter โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ members - โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ definedAt property - โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ goodness property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returnsSpecialParam() method โ”‚ โ”‚ โ””โ”€โ”ฌ types โ”‚ โ”‚ โ””โ”€โ”ฌ class MyClass โ”‚ โ”‚ โ””โ”€โ”ฌ members โ”‚ โ”‚ โ”œโ”€โ”€ (props) initializer + โ”‚ โ”‚ โ”œโ”€โ”€ methodWithSpecialParam(param) method โ”‚ โ”‚ โ”œโ”€โ”€ awesomeness property โ”‚ โ”‚ โ”œโ”€โ”€ definedAt property โ”‚ โ”‚ โ”œโ”€โ”€ goodness property @@ -3865,6 +3937,15 @@ exports[`jsii-tree --members 1`] = ` โ”‚ โ”‚ โ””โ”€โ”ฌ members โ”‚ โ”‚ โ”œโ”€โ”€ static canAccessStaticContext() method โ”‚ โ”‚ โ””โ”€โ”€ static staticVariable property + โ”‚ โ”œโ”€โ”ฌ class StaticHelloChild + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ static method() method + โ”‚ โ”‚ โ””โ”€โ”€ static property property + โ”‚ โ”œโ”€โ”ฌ class StaticHelloParent + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”€ static method() method + โ”‚ โ”‚ โ””โ”€โ”€ static property property โ”‚ โ”œโ”€โ”ฌ class Statics โ”‚ โ”‚ โ””โ”€โ”ฌ members โ”‚ โ”‚ โ”œโ”€โ”€ (value) initializer @@ -4265,6 +4346,10 @@ exports[`jsii-tree --members 1`] = ` โ”‚ โ”‚ โ””โ”€โ”ฌ members โ”‚ โ”‚ โ”œโ”€โ”€ () initializer โ”‚ โ”‚ โ””โ”€โ”€ typeName() method + โ”‚ โ”œโ”€โ”ฌ class StaticConsumer + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ””โ”€โ”€ static consume(args) method โ”‚ โ”œโ”€โ”ฌ interface BaseProps โ”‚ โ”‚ โ””โ”€โ”ฌ members โ”‚ โ”‚ โ””โ”€โ”€ bar property @@ -4364,9 +4449,11 @@ exports[`jsii-tree --signatures 1`] = ` โ”‚ โ”œโ”€โ”€ back_references โ”‚ โ”œโ”€โ”€ child โ”‚ โ”œโ”€โ”€ isolated - โ”‚ โ””โ”€โ”ฌ nested_submodule - โ”‚ โ””โ”€โ”ฌ submodules - โ”‚ โ””โ”€โ”€ deeplyNested + โ”‚ โ”œโ”€โ”ฌ nested_submodule + โ”‚ โ”‚ โ””โ”€โ”ฌ submodules + โ”‚ โ”‚ โ””โ”€โ”€ deeplyNested + โ”‚ โ”œโ”€โ”€ param + โ”‚ โ””โ”€โ”€ returnsparam โ”œโ”€โ”€ @scope/jsii-calc-base โ”œโ”€โ”€ @scope/jsii-calc-base-of-base โ””โ”€โ”ฌ @scope/jsii-calc-lib @@ -4418,13 +4505,19 @@ exports[`jsii-tree --types 1`] = ` โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ isolated โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ class Kwargs - โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ nested_submodule - โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ submodules - โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ deeplyNested - โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types - โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ interface INamespaced + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ nested_submodule + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ submodules + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ deeplyNested + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ interface INamespaced + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ class Namespaced + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ param + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ interface SpecialParameter + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ returnsparam โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types - โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ class Namespaced + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ class ReturnsSpecialParameter โ”‚ โ”‚ โ””โ”€โ”ฌ types โ”‚ โ”‚ โ””โ”€โ”€ class MyClass โ”‚ โ””โ”€โ”ฌ types @@ -4528,6 +4621,8 @@ exports[`jsii-tree --types 1`] = ` โ”‚ โ”œโ”€โ”€ class SomeTypeJsii976 โ”‚ โ”œโ”€โ”€ class StableClass โ”‚ โ”œโ”€โ”€ class StaticContext + โ”‚ โ”œโ”€โ”€ class StaticHelloChild + โ”‚ โ”œโ”€โ”€ class StaticHelloParent โ”‚ โ”œโ”€โ”€ class Statics โ”‚ โ”œโ”€โ”€ class StripInternal โ”‚ โ”œโ”€โ”€ class StructPassing @@ -4630,6 +4725,7 @@ exports[`jsii-tree --types 1`] = ` โ”œโ”€โ”ฌ @scope/jsii-calc-base โ”‚ โ””โ”€โ”ฌ types โ”‚ โ”œโ”€โ”€ class Base + โ”‚ โ”œโ”€โ”€ class StaticConsumer โ”‚ โ”œโ”€โ”€ interface BaseProps โ”‚ โ””โ”€โ”€ interface IBaseInterface โ”œโ”€โ”ฌ @scope/jsii-calc-base-of-base @@ -4675,9 +4771,11 @@ exports[`jsii-tree 1`] = ` โ”‚ โ”œโ”€โ”€ back_references โ”‚ โ”œโ”€โ”€ child โ”‚ โ”œโ”€โ”€ isolated - โ”‚ โ””โ”€โ”ฌ nested_submodule - โ”‚ โ””โ”€โ”ฌ submodules - โ”‚ โ””โ”€โ”€ deeplyNested + โ”‚ โ”œโ”€โ”ฌ nested_submodule + โ”‚ โ”‚ โ””โ”€โ”ฌ submodules + โ”‚ โ”‚ โ””โ”€โ”€ deeplyNested + โ”‚ โ”œโ”€โ”€ param + โ”‚ โ””โ”€โ”€ returnsparam โ”œโ”€โ”€ @scope/jsii-calc-base โ”œโ”€โ”€ @scope/jsii-calc-base-of-base โ””โ”€โ”ฌ @scope/jsii-calc-lib diff --git a/packages/jsii-reflect/test/__snapshots__/tree.test.ts.snap b/packages/jsii-reflect/test/__snapshots__/tree.test.ts.snap new file mode 100644 index 0000000000..d9751a15c6 --- /dev/null +++ b/packages/jsii-reflect/test/__snapshots__/tree.test.ts.snap @@ -0,0 +1,3211 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`defaults 1`] = ` +"assemblies + โ”œโ”€โ”ฌ jsii-calc + โ”‚ โ””โ”€โ”ฌ submodules + โ”‚ โ”œโ”€โ”€ DerivedClassHasNoProperties + โ”‚ โ”œโ”€โ”€ InterfaceInNamespaceIncludesClasses + โ”‚ โ”œโ”€โ”€ InterfaceInNamespaceOnlyInterface + โ”‚ โ”œโ”€โ”€ PythonSelf + โ”‚ โ”œโ”€โ”€ composition + โ”‚ โ””โ”€โ”ฌ submodule + โ”‚ โ””โ”€โ”ฌ submodules + โ”‚ โ”œโ”€โ”€ back_references + โ”‚ โ”œโ”€โ”€ child + โ”‚ โ”œโ”€โ”€ isolated + โ”‚ โ”œโ”€โ”ฌ nested_submodule + โ”‚ โ”‚ โ””โ”€โ”ฌ submodules + โ”‚ โ”‚ โ””โ”€โ”€ deeplyNested + โ”‚ โ”œโ”€โ”€ param + โ”‚ โ””โ”€โ”€ returnsparam + โ”œโ”€โ”€ @scope/jsii-calc-base + โ”œโ”€โ”€ @scope/jsii-calc-base-of-base + โ””โ”€โ”ฌ @scope/jsii-calc-lib + โ””โ”€โ”ฌ submodules + โ””โ”€โ”€ submodule +" +`; + +exports[`inheritance 1`] = ` +"assemblies + โ”œโ”€โ”ฌ jsii-calc + โ”‚ โ””โ”€โ”ฌ submodules + โ”‚ โ”œโ”€โ”€ DerivedClassHasNoProperties + โ”‚ โ”œโ”€โ”€ InterfaceInNamespaceIncludesClasses + โ”‚ โ”œโ”€โ”€ InterfaceInNamespaceOnlyInterface + โ”‚ โ”œโ”€โ”€ PythonSelf + โ”‚ โ”œโ”€โ”€ composition + โ”‚ โ””โ”€โ”ฌ submodule + โ”‚ โ””โ”€โ”ฌ submodules + โ”‚ โ”œโ”€โ”€ back_references + โ”‚ โ”œโ”€โ”€ child + โ”‚ โ”œโ”€โ”€ isolated + โ”‚ โ”œโ”€โ”ฌ nested_submodule + โ”‚ โ”‚ โ””โ”€โ”ฌ submodules + โ”‚ โ”‚ โ””โ”€โ”€ deeplyNested + โ”‚ โ”œโ”€โ”€ param + โ”‚ โ””โ”€โ”€ returnsparam + โ”œโ”€โ”€ @scope/jsii-calc-base + โ”œโ”€โ”€ @scope/jsii-calc-base-of-base + โ””โ”€โ”ฌ @scope/jsii-calc-lib + โ””โ”€โ”ฌ submodules + โ””โ”€โ”€ submodule +" +`; + +exports[`members 1`] = ` +"assemblies + โ”œโ”€โ”ฌ jsii-calc + โ”‚ โ””โ”€โ”ฌ submodules + โ”‚ โ”œโ”€โ”€ DerivedClassHasNoProperties + โ”‚ โ”œโ”€โ”€ InterfaceInNamespaceIncludesClasses + โ”‚ โ”œโ”€โ”€ InterfaceInNamespaceOnlyInterface + โ”‚ โ”œโ”€โ”€ PythonSelf + โ”‚ โ”œโ”€โ”€ composition + โ”‚ โ””โ”€โ”ฌ submodule + โ”‚ โ””โ”€โ”ฌ submodules + โ”‚ โ”œโ”€โ”€ back_references + โ”‚ โ”œโ”€โ”€ child + โ”‚ โ”œโ”€โ”€ isolated + โ”‚ โ”œโ”€โ”ฌ nested_submodule + โ”‚ โ”‚ โ””โ”€โ”ฌ submodules + โ”‚ โ”‚ โ””โ”€โ”€ deeplyNested + โ”‚ โ”œโ”€โ”€ param + โ”‚ โ””โ”€โ”€ returnsparam + โ”œโ”€โ”€ @scope/jsii-calc-base + โ”œโ”€โ”€ @scope/jsii-calc-base-of-base + โ””โ”€โ”ฌ @scope/jsii-calc-lib + โ””โ”€โ”ฌ submodules + โ””โ”€โ”€ submodule +" +`; + +exports[`showAll 1`] = ` +"assemblies + โ”œโ”€โ”ฌ jsii-calc + โ”‚ โ”œโ”€โ”ฌ dependencies + โ”‚ โ”‚ โ”œโ”€โ”€ @scope/jsii-calc-base + โ”‚ โ”‚ โ””โ”€โ”€ @scope/jsii-calc-lib + โ”‚ โ”œโ”€โ”ฌ submodules + โ”‚ โ”‚ โ”œโ”€โ”ฌ DerivedClassHasNoProperties + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ class Base + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ prop property + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ class Derived + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ base: Base + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ InterfaceInNamespaceIncludesClasses + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ class Foo + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ bar property + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ interface Hello + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ foo property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ”œโ”€โ”ฌ InterfaceInNamespaceOnlyInterface + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ interface Hello + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ foo property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ”œโ”€โ”ฌ PythonSelf + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ class ClassWithSelf + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ (self) initializer + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ self + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ method(self) method + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ self + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ self property + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ class ClassWithSelfKwarg + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ (props) initializer + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ props + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.PythonSelf.StructWithSelf + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ props property + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.PythonSelf.StructWithSelf + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ interface IInterfaceWithSelf + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ method(self) method + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ self + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ interface StructWithSelf + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ self property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ composition + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ class CompositeOperation + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ base: Operation + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ toString() method + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ expression property + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: @scope/jsii-calc-lib.NumericValue + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ value property + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ decorationPostfixes property + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Array + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ decorationPrefixes property + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Array + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ stringStyle property + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.composition.CompositeOperation.CompositionStringStyle + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ enum CompositionStringStyle + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ NORMAL + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ DECORATED + โ”‚ โ”‚ โ””โ”€โ”ฌ submodule + โ”‚ โ”‚ โ”œโ”€โ”ฌ submodules + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ back_references + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ interface MyClassReference + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ reference property + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.submodule.MyClass + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ child + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ class InnerClass + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ static staticProp property + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ const + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.submodule.child.SomeStruct + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ class OuterClass + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ innerClass property + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.submodule.child.InnerClass + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ interface KwargsProps + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ interfaces + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ SomeStruct + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ extra property + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ interface SomeStruct + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ prop property + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.submodule.child.SomeEnum + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ interface Structure + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ bool property + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: boolean + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ enum Awesomeness + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ AWESOME + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ enum Goodness + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ PRETTY_GOOD + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ REALLY_GOOD + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ AMAZINGLY_GOOD + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ enum SomeEnum + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ SOME + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ isolated + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ class Kwargs + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ static method(props) method + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ props + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: boolean + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ nested_submodule + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ submodules + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ deeplyNested + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ interface INamespaced + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ definedAt property + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ class Namespaced + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ interfaces: INamespaced + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ definedAt property + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ goodness property + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.submodule.child.Goodness + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ param + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ interface SpecialParameter + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ value property + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ returnsparam + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ class ReturnsSpecialParameter + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ returnsSpecialParam() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: jsii-calc.submodule.param.SpecialParameter + โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ””โ”€โ”ฌ class MyClass + โ”‚ โ”‚ โ”œโ”€โ”€ interfaces: INamespaced + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (props) initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ props + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.submodule.child.SomeStruct + โ”‚ โ”‚ โ”œโ”€โ”ฌ methodWithSpecialParam(param) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ param + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.submodule.param.SpecialParameter + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ awesomeness property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.submodule.child.Awesomeness + โ”‚ โ”‚ โ”œโ”€โ”ฌ definedAt property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ goodness property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.submodule.child.Goodness + โ”‚ โ”‚ โ”œโ”€โ”ฌ props property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.submodule.child.SomeStruct + โ”‚ โ”‚ โ””โ”€โ”ฌ allTypes property + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”œโ”€โ”ฌ class AbstractClass + โ”‚ โ”‚ โ”œโ”€โ”€ base: AbstractClassBase + โ”‚ โ”‚ โ”œโ”€โ”€ interfaces: IInterfaceImplementedByAbstractClass + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ abstractMethod(name) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ name + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ nonAbstractMethod() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: number + โ”‚ โ”‚ โ””โ”€โ”ฌ propFromInterface property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ class AbstractClassBase + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ””โ”€โ”ฌ abstractProperty property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ class AbstractClassReturner + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ giveMeAbstract() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: jsii-calc.AbstractClass + โ”‚ โ”‚ โ”œโ”€โ”ฌ giveMeInterface() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: jsii-calc.IInterfaceImplementedByAbstractClass + โ”‚ โ”‚ โ””โ”€โ”ฌ returnAbstractFromProperty property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.AbstractClassBase + โ”‚ โ”œโ”€โ”ฌ class AbstractSuite + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ someMethod(str) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ protected + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ str + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ workItAll(seed) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ seed + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ””โ”€โ”ฌ property property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ protected + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ class Add + โ”‚ โ”‚ โ”œโ”€โ”€ base: BinaryOperation + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (lhs,rhs) initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ lhs + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: @scope/jsii-calc-lib.NumericValue + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ rhs + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: @scope/jsii-calc-lib.NumericValue + โ”‚ โ”‚ โ”œโ”€โ”ฌ toString() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ””โ”€โ”ฌ value property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”œโ”€โ”ฌ class AllTypes + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ anyIn(inp) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ inp + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: any + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ anyOut() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: any + โ”‚ โ”‚ โ”œโ”€โ”ฌ enumMethod(value) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ value + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.StringEnum + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: jsii-calc.StringEnum + โ”‚ โ”‚ โ”œโ”€โ”ฌ enumPropertyValue property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ”œโ”€โ”ฌ anyArrayProperty property + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Array + โ”‚ โ”‚ โ”œโ”€โ”ฌ anyMapProperty property + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Map any> + โ”‚ โ”‚ โ”œโ”€โ”ฌ anyProperty property + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: any + โ”‚ โ”‚ โ”œโ”€โ”ฌ arrayProperty property + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Array + โ”‚ โ”‚ โ”œโ”€โ”ฌ booleanProperty property + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: boolean + โ”‚ โ”‚ โ”œโ”€โ”ฌ dateProperty property + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: date + โ”‚ โ”‚ โ”œโ”€โ”ฌ enumProperty property + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.AllTypesEnum + โ”‚ โ”‚ โ”œโ”€โ”ฌ jsonProperty property + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: json + โ”‚ โ”‚ โ”œโ”€โ”ฌ mapProperty property + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Map @scope/jsii-calc-lib.Number> + โ”‚ โ”‚ โ”œโ”€โ”ฌ numberProperty property + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ”œโ”€โ”ฌ stringProperty property + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ unionArrayProperty property + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Array + โ”‚ โ”‚ โ”œโ”€โ”ฌ unionMapProperty property + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Map string | number | @scope/jsii-calc-lib.Number> + โ”‚ โ”‚ โ”œโ”€โ”ฌ unionProperty property + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string | number | jsii-calc.Multiply | @scope/jsii-calc-lib.Number + โ”‚ โ”‚ โ”œโ”€โ”ฌ unknownArrayProperty property + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Array + โ”‚ โ”‚ โ”œโ”€โ”ฌ unknownMapProperty property + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Map any> + โ”‚ โ”‚ โ”œโ”€โ”ฌ unknownProperty property + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: any + โ”‚ โ”‚ โ””โ”€โ”ฌ optionalEnumValue property + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”œโ”€โ”ฌ class AllowedMethodNames + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ getBar(_p1,_p2) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ _p1 + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ _p2 + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ getFoo(withParam) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ withParam + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ setBar(_x,_y,_z) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ _x + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ _y + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ _z + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: boolean + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ””โ”€โ”ฌ setFoo(_x,_y) method + โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ _x + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ _y + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”œโ”€โ”ฌ class AmbiguousParameters + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (scope,props) initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ scope + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.Bell + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ props + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.StructParameterType + โ”‚ โ”‚ โ”œโ”€โ”ฌ props property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.StructParameterType + โ”‚ โ”‚ โ””โ”€โ”ฌ scope property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.Bell + โ”‚ โ”œโ”€โ”ฌ class AnonymousImplementationProvider + โ”‚ โ”‚ โ”œโ”€โ”€ interfaces: IAnonymousImplementationProvider + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ provideAsClass() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: jsii-calc.Implementation + โ”‚ โ”‚ โ””โ”€โ”ฌ provideAsInterface() method + โ”‚ โ”‚ โ””โ”€โ”€ returns: jsii-calc.IAnonymouslyImplementMe + โ”‚ โ”œโ”€โ”ฌ class AsyncVirtualMethods + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ callMe() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: Promise + โ”‚ โ”‚ โ”œโ”€โ”ฌ callMe2() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: Promise + โ”‚ โ”‚ โ”œโ”€โ”ฌ callMeDoublePromise() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: Promise + โ”‚ โ”‚ โ”œโ”€โ”ฌ dontOverrideMe() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: number + โ”‚ โ”‚ โ”œโ”€โ”ฌ overrideMe(mult) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ mult + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: Promise + โ”‚ โ”‚ โ””โ”€โ”ฌ overrideMeToo() method + โ”‚ โ”‚ โ””โ”€โ”€ returns: Promise + โ”‚ โ”œโ”€โ”ฌ class AugmentableClass + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ methodOne() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ””โ”€โ”ฌ methodTwo() method + โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”œโ”€โ”ฌ class BaseJsii976 + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”€ () initializer + โ”‚ โ”œโ”€โ”ฌ class Bell + โ”‚ โ”‚ โ”œโ”€โ”€ interfaces: IBell + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ ring() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ””โ”€โ”ฌ rung property + โ”‚ โ”‚ โ””โ”€โ”€ type: boolean + โ”‚ โ”œโ”€โ”ฌ class BinaryOperation + โ”‚ โ”‚ โ”œโ”€โ”€ base: Operation + โ”‚ โ”‚ โ”œโ”€โ”€ interfaces: IFriendly + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (lhs,rhs) initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ lhs + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: @scope/jsii-calc-lib.NumericValue + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ rhs + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: @scope/jsii-calc-lib.NumericValue + โ”‚ โ”‚ โ”œโ”€โ”ฌ hello() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ lhs property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: @scope/jsii-calc-lib.NumericValue + โ”‚ โ”‚ โ””โ”€โ”ฌ rhs property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: @scope/jsii-calc-lib.NumericValue + โ”‚ โ”œโ”€โ”ฌ class BurriedAnonymousObject + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ check() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: boolean + โ”‚ โ”‚ โ””โ”€โ”ฌ giveItBack(value) method + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ value + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: any + โ”‚ โ”‚ โ””โ”€โ”€ returns: any + โ”‚ โ”œโ”€โ”ฌ class Calculator + โ”‚ โ”‚ โ”œโ”€โ”€ base: CompositeOperation + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (props) initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ props + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ”œโ”€โ”ฌ add(value) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ value + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ mul(value) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ value + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ neg() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ pow(value) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ value + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ readUnionValue() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: number + โ”‚ โ”‚ โ”œโ”€โ”ฌ expression property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: @scope/jsii-calc-lib.NumericValue + โ”‚ โ”‚ โ”œโ”€โ”ฌ operationsLog property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Array<@scope/jsii-calc-lib.NumericValue> + โ”‚ โ”‚ โ”œโ”€โ”ฌ operationsMap property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Map Array<@scope/jsii-calc-lib.NumericValue>> + โ”‚ โ”‚ โ”œโ”€โ”ฌ curr property + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: @scope/jsii-calc-lib.NumericValue + โ”‚ โ”‚ โ”œโ”€โ”ฌ maxValue property + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ””โ”€โ”ฌ unionProperty property + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”œโ”€โ”ฌ class ClassThatImplementsTheInternalInterface + โ”‚ โ”‚ โ”œโ”€โ”€ interfaces: INonInternalInterface + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ a property + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ b property + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ c property + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ””โ”€โ”ฌ d property + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ class ClassThatImplementsThePrivateInterface + โ”‚ โ”‚ โ”œโ”€โ”€ interfaces: INonInternalInterface + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ a property + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ b property + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ c property + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ””โ”€โ”ฌ e property + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ class ClassWithCollections + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (map,array) initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ map + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Map string> + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ array + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Array + โ”‚ โ”‚ โ”œโ”€โ”ฌ static createAList() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: Array + โ”‚ โ”‚ โ”œโ”€โ”ฌ static createAMap() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: Map string> + โ”‚ โ”‚ โ”œโ”€โ”ฌ static staticArray property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Array + โ”‚ โ”‚ โ”œโ”€โ”ฌ static staticMap property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Map string> + โ”‚ โ”‚ โ”œโ”€โ”ฌ array property + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Array + โ”‚ โ”‚ โ””โ”€โ”ฌ map property + โ”‚ โ”‚ โ””โ”€โ”€ type: Map string> + โ”‚ โ”œโ”€โ”ฌ class ClassWithDocs + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”€ () initializer + โ”‚ โ”œโ”€โ”ฌ class ClassWithJavaReservedWords + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (int) initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ int + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ import(assert) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ assert + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ””โ”€โ”ฌ int property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ class ClassWithMutableObjectLiteralProperty + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ””โ”€โ”ฌ mutableObject property + โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.IMutableObjectLiteral + โ”‚ โ”œโ”€โ”ฌ class ClassWithPrivateConstructorAndAutomaticProperties + โ”‚ โ”‚ โ”œโ”€โ”€ interfaces: IInterfaceWithProperties + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ static create(readOnlyString,readWriteString) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ readOnlyString + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ readWriteString + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: jsii-calc.ClassWithPrivateConstructorAndAutomaticProperties + โ”‚ โ”‚ โ”œโ”€โ”ฌ readOnlyString property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ””โ”€โ”ฌ readWriteString property + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ class ConfusingToJackson + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ static makeInstance() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: jsii-calc.ConfusingToJackson + โ”‚ โ”‚ โ”œโ”€โ”ฌ static makeStructInstance() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: jsii-calc.ConfusingToJacksonStruct + โ”‚ โ”‚ โ””โ”€โ”ฌ unionProperty property + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional<@scope/jsii-calc-lib.IFriendly | Array<@scope/jsii-calc-lib.IFriendly | jsii-calc.AbstractClass>> + โ”‚ โ”œโ”€โ”ฌ class ConstructorPassesThisOut + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ (consumer) initializer + โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ””โ”€โ”ฌ consumer + โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.PartiallyInitializedThisConsumer + โ”‚ โ”œโ”€โ”ฌ class Constructors + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ static hiddenInterface() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: jsii-calc.IPublicInterface + โ”‚ โ”‚ โ”œโ”€โ”ฌ static hiddenInterfaces() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: Array + โ”‚ โ”‚ โ”œโ”€โ”ฌ static hiddenSubInterfaces() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: Array + โ”‚ โ”‚ โ”œโ”€โ”ฌ static makeClass() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: jsii-calc.PublicClass + โ”‚ โ”‚ โ”œโ”€โ”ฌ static makeInterface() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: jsii-calc.IPublicInterface + โ”‚ โ”‚ โ”œโ”€โ”ฌ static makeInterface2() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: jsii-calc.IPublicInterface2 + โ”‚ โ”‚ โ””โ”€โ”ฌ static makeInterfaces() method + โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ””โ”€โ”€ returns: Array + โ”‚ โ”œโ”€โ”ฌ class ConsumePureInterface + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (delegate) initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ delegate + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.IStructReturningDelegate + โ”‚ โ”‚ โ””โ”€โ”ฌ workItBaby() method + โ”‚ โ”‚ โ””โ”€โ”€ returns: jsii-calc.StructB + โ”‚ โ”œโ”€โ”ฌ class ConsumerCanRingBell + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ static staticImplementedByObjectLiteral(ringer) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ ringer + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.IBellRinger + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: boolean + โ”‚ โ”‚ โ”œโ”€โ”ฌ static staticImplementedByPrivateClass(ringer) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ ringer + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.IBellRinger + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: boolean + โ”‚ โ”‚ โ”œโ”€โ”ฌ static staticImplementedByPublicClass(ringer) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ ringer + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.IBellRinger + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: boolean + โ”‚ โ”‚ โ”œโ”€โ”ฌ static staticWhenTypedAsClass(ringer) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ ringer + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.IConcreteBellRinger + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: boolean + โ”‚ โ”‚ โ”œโ”€โ”ฌ implementedByObjectLiteral(ringer) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ ringer + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.IBellRinger + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: boolean + โ”‚ โ”‚ โ”œโ”€โ”ฌ implementedByPrivateClass(ringer) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ ringer + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.IBellRinger + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: boolean + โ”‚ โ”‚ โ”œโ”€โ”ฌ implementedByPublicClass(ringer) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ ringer + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.IBellRinger + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: boolean + โ”‚ โ”‚ โ””โ”€โ”ฌ whenTypedAsClass(ringer) method + โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ ringer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.IConcreteBellRinger + โ”‚ โ”‚ โ””โ”€โ”€ returns: boolean + โ”‚ โ”œโ”€โ”ฌ class ConsumersOfThisCrazyTypeSystem + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ consumeAnotherPublicInterface(obj) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ obj + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.IAnotherPublicInterface + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ””โ”€โ”ฌ consumeNonInternalInterface(obj) method + โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ obj + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.INonInternalInterface + โ”‚ โ”‚ โ””โ”€โ”€ returns: any + โ”‚ โ”œโ”€โ”ฌ class DataRenderer + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ render(data) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ data + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional<@scope/jsii-calc-lib.MyFirstStruct> + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ renderArbitrary(data) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ data + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Map any> + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ””โ”€โ”ฌ renderMap(map) method + โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ map + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Map any> + โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”œโ”€โ”ฌ class DefaultedConstructorArgument + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (arg1,arg2,arg3) initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ arg1 + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ arg2 + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ arg3 + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ”œโ”€โ”ฌ arg1 property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ”œโ”€โ”ฌ arg3 property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: date + โ”‚ โ”‚ โ””โ”€โ”ฌ arg2 property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”œโ”€โ”ฌ class Demonstrate982 + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ static takeThis() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: jsii-calc.ChildStruct982 + โ”‚ โ”‚ โ””โ”€โ”ฌ static takeThisToo() method + โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ””โ”€โ”€ returns: jsii-calc.ParentStruct982 + โ”‚ โ”œโ”€โ”ฌ class DeprecatedClass + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (readonlyString,mutableNumber) initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ readonlyString + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ mutableNumber + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ”œโ”€โ”ฌ method() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ readonlyProperty property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ””โ”€โ”ฌ mutableProperty property + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”œโ”€โ”ฌ class DisappointingCollectionSource + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ static maybeList property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ const + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional> + โ”‚ โ”‚ โ””โ”€โ”ฌ static maybeMap property + โ”‚ โ”‚ โ”œโ”€โ”€ const + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional number>> + โ”‚ โ”œโ”€โ”ฌ class DoNotOverridePrivates + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ changePrivatePropertyValue(newValue) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ newValue + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ privateMethodValue() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ””โ”€โ”ฌ privatePropertyValue() method + โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”œโ”€โ”ฌ class DoNotRecognizeAnyAsOptional + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ””โ”€โ”ฌ method(_requiredAny,_optionalAny,_optionalString) method + โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ _requiredAny + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: any + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ _optionalAny + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: any + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ _optionalString + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”œโ”€โ”ฌ class DocumentedClass + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ greet(greetee) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ greetee + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: number + โ”‚ โ”‚ โ””โ”€โ”ฌ hola() method + โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”œโ”€โ”ฌ class DontComplainAboutVariadicAfterOptional + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ””โ”€โ”ฌ optionalAndVariadic(optional,things) method + โ”‚ โ”‚ โ”œโ”€โ”€ variadic + โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ optional + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ things + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ variadic + โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”œโ”€โ”ฌ class DoubleTrouble + โ”‚ โ”‚ โ”œโ”€โ”€ interfaces: IFriendlyRandomGenerator + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ hello() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ””โ”€โ”ฌ next() method + โ”‚ โ”‚ โ””โ”€โ”€ returns: number + โ”‚ โ”œโ”€โ”ฌ class DynamicPropertyBearer + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (valueStore) initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ valueStore + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ dynamicProperty property + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ””โ”€โ”ฌ valueStore property + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ class DynamicPropertyBearerChild + โ”‚ โ”‚ โ”œโ”€โ”€ base: DynamicPropertyBearer + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (originalValue) initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ originalValue + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ overrideValue(newValue) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ newValue + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ””โ”€โ”ฌ originalValue property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ class Entropy + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (clock) initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ clock + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.IWallClock + โ”‚ โ”‚ โ”œโ”€โ”ฌ increase() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ””โ”€โ”ฌ repeat(word) method + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ word + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”œโ”€โ”ฌ class EnumDispenser + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ static randomIntegerLikeEnum() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: jsii-calc.AllTypesEnum + โ”‚ โ”‚ โ””โ”€โ”ฌ static randomStringLikeEnum() method + โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ””โ”€โ”€ returns: jsii-calc.StringEnum + โ”‚ โ”œโ”€โ”ฌ class EraseUndefinedHashValues + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ static doesKeyExist(opts,key) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ opts + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.EraseUndefinedHashValuesOptions + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ key + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: boolean + โ”‚ โ”‚ โ”œโ”€โ”ฌ static prop1IsNull() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: Map any> + โ”‚ โ”‚ โ””โ”€โ”ฌ static prop2IsUndefined() method + โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ””โ”€โ”€ returns: Map any> + โ”‚ โ”œโ”€โ”ฌ class ExperimentalClass + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (readonlyString,mutableNumber) initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ readonlyString + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ mutableNumber + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ”œโ”€โ”ฌ method() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ readonlyProperty property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ””โ”€โ”ฌ mutableProperty property + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”œโ”€โ”ฌ class ExportedBaseClass + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (success) initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ success + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: boolean + โ”‚ โ”‚ โ””โ”€โ”ฌ success property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: boolean + โ”‚ โ”œโ”€โ”ฌ class ExternalClass + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (readonlyString,mutableNumber) initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ readonlyString + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ mutableNumber + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ”œโ”€โ”ฌ method() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ readonlyProperty property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ””โ”€โ”ฌ mutableProperty property + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”œโ”€โ”ฌ class GiveMeStructs + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ derivedToFirst(derived) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ derived + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.DerivedStruct + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: @scope/jsii-calc-lib.MyFirstStruct + โ”‚ โ”‚ โ”œโ”€โ”ฌ readDerivedNonPrimitive(derived) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ derived + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.DerivedStruct + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: jsii-calc.DoubleTrouble + โ”‚ โ”‚ โ”œโ”€โ”ฌ readFirstNumber(first) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ first + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: @scope/jsii-calc-lib.MyFirstStruct + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: number + โ”‚ โ”‚ โ””โ”€โ”ฌ structLiteral property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: @scope/jsii-calc-lib.StructWithOnlyOptionals + โ”‚ โ”œโ”€โ”ฌ class GreetingAugmenter + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ””โ”€โ”ฌ betterGreeting(friendly) method + โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ friendly + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: @scope/jsii-calc-lib.IFriendly + โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”œโ”€โ”ฌ class ImplementInternalInterface + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ””โ”€โ”ฌ prop property + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ class Implementation + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ””โ”€โ”ฌ value property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”œโ”€โ”ฌ class ImplementsInterfaceWithInternal + โ”‚ โ”‚ โ”œโ”€โ”€ interfaces: IInterfaceWithInternal + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ””โ”€โ”ฌ visible() method + โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”œโ”€โ”ฌ class ImplementsInterfaceWithInternalSubclass + โ”‚ โ”‚ โ”œโ”€โ”€ base: ImplementsInterfaceWithInternal + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”€ () initializer + โ”‚ โ”œโ”€โ”ฌ class ImplementsPrivateInterface + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ””โ”€โ”ฌ private property + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ class InbetweenClass + โ”‚ โ”‚ โ”œโ”€โ”€ base: PublicClass + โ”‚ โ”‚ โ”œโ”€โ”€ interfaces: IPublicInterface2 + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ””โ”€โ”ฌ ciao() method + โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”œโ”€โ”ฌ class InterfaceCollections + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ static listOfInterfaces() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: Array + โ”‚ โ”‚ โ”œโ”€โ”ฌ static listOfStructs() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: Array + โ”‚ โ”‚ โ”œโ”€โ”ฌ static mapOfInterfaces() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: Map jsii-calc.IBell> + โ”‚ โ”‚ โ””โ”€โ”ฌ static mapOfStructs() method + โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ””โ”€โ”€ returns: Map jsii-calc.StructA> + โ”‚ โ”œโ”€โ”ฌ class InterfacesMaker + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ static makeInterfaces(count) method + โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ count + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ””โ”€โ”€ returns: Array<@scope/jsii-calc-lib.IDoublable> + โ”‚ โ”œโ”€โ”ฌ class Isomorphism + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ””โ”€โ”ฌ myself() method + โ”‚ โ”‚ โ””โ”€โ”€ returns: jsii-calc.Isomorphism + โ”‚ โ”œโ”€โ”ฌ class JSII417Derived + โ”‚ โ”‚ โ”œโ”€โ”€ base: JSII417PublicBaseOfBase + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (property) initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ property + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ bar() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ baz() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ””โ”€โ”ฌ property property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”œโ”€โ”€ protected + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ class JSII417PublicBaseOfBase + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ static makeInstance() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: jsii-calc.JSII417PublicBaseOfBase + โ”‚ โ”‚ โ”œโ”€โ”ฌ foo() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ””โ”€โ”ฌ hasRoot property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: boolean + โ”‚ โ”œโ”€โ”ฌ class JSObjectLiteralForInterface + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ giveMeFriendly() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: @scope/jsii-calc-lib.IFriendly + โ”‚ โ”‚ โ””โ”€โ”ฌ giveMeFriendlyGenerator() method + โ”‚ โ”‚ โ””โ”€โ”€ returns: jsii-calc.IFriendlyRandomGenerator + โ”‚ โ”œโ”€โ”ฌ class JSObjectLiteralToNative + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ””โ”€โ”ฌ returnLiteral() method + โ”‚ โ”‚ โ””โ”€โ”€ returns: jsii-calc.JSObjectLiteralToNativeClass + โ”‚ โ”œโ”€โ”ฌ class JSObjectLiteralToNativeClass + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ propA property + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ””โ”€โ”ฌ propB property + โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”œโ”€โ”ฌ class JavaReservedWords + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ abstract() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ assert() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ boolean() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ break() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ byte() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ case() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ catch() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ char() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ class() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ const() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ continue() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ default() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ do() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ double() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ else() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ enum() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ extends() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ false() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ final() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ finally() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ float() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ for() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ goto() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ if() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ implements() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ import() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ instanceof() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ int() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ interface() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ long() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ native() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ new() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ null() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ package() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ private() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ protected() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ public() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ return() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ short() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ static() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ strictfp() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ super() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ switch() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ synchronized() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ this() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ throw() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ throws() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ transient() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ true() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ try() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ void() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ volatile() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ””โ”€โ”ฌ while property + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ class Jsii487Derived + โ”‚ โ”‚ โ”œโ”€โ”€ interfaces: IJsii487External2,IJsii487External + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”€ () initializer + โ”‚ โ”œโ”€โ”ฌ class Jsii496Derived + โ”‚ โ”‚ โ”œโ”€โ”€ interfaces: IJsii496 + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”€ () initializer + โ”‚ โ”œโ”€โ”ฌ class JsiiAgent + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ””โ”€โ”ฌ static value property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”œโ”€โ”ฌ class JsonFormatter + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ static anyArray() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: any + โ”‚ โ”‚ โ”œโ”€โ”ฌ static anyBooleanFalse() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: any + โ”‚ โ”‚ โ”œโ”€โ”ฌ static anyBooleanTrue() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: any + โ”‚ โ”‚ โ”œโ”€โ”ฌ static anyDate() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: any + โ”‚ โ”‚ โ”œโ”€โ”ฌ static anyEmptyString() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: any + โ”‚ โ”‚ โ”œโ”€โ”ฌ static anyFunction() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: any + โ”‚ โ”‚ โ”œโ”€โ”ฌ static anyHash() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: any + โ”‚ โ”‚ โ”œโ”€โ”ฌ static anyNull() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: any + โ”‚ โ”‚ โ”œโ”€โ”ฌ static anyNumber() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: any + โ”‚ โ”‚ โ”œโ”€โ”ฌ static anyRef() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: any + โ”‚ โ”‚ โ”œโ”€โ”ฌ static anyString() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: any + โ”‚ โ”‚ โ”œโ”€โ”ฌ static anyUndefined() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: any + โ”‚ โ”‚ โ”œโ”€โ”ฌ static anyZero() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: any + โ”‚ โ”‚ โ””โ”€โ”ฌ static stringify(value) method + โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ value + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: any + โ”‚ โ”‚ โ””โ”€โ”€ returns: Optional + โ”‚ โ”œโ”€โ”ฌ class LevelOne + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (props) initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ props + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.LevelOneProps + โ”‚ โ”‚ โ””โ”€โ”ฌ props property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.LevelOneProps + โ”‚ โ”œโ”€โ”ฌ class MethodNamedProperty + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ property() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ””โ”€โ”ฌ elite property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”œโ”€โ”ฌ class Multiply + โ”‚ โ”‚ โ”œโ”€โ”€ base: BinaryOperation + โ”‚ โ”‚ โ”œโ”€โ”€ interfaces: IFriendlier,IRandomNumberGenerator + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (lhs,rhs) initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ lhs + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: @scope/jsii-calc-lib.NumericValue + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ rhs + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: @scope/jsii-calc-lib.NumericValue + โ”‚ โ”‚ โ”œโ”€โ”ฌ farewell() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ goodbye() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ next() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: number + โ”‚ โ”‚ โ”œโ”€โ”ฌ toString() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ””โ”€โ”ฌ value property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”œโ”€โ”ฌ class Negate + โ”‚ โ”‚ โ”œโ”€โ”€ base: UnaryOperation + โ”‚ โ”‚ โ”œโ”€โ”€ interfaces: IFriendlier + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (operand) initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ operand + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: @scope/jsii-calc-lib.NumericValue + โ”‚ โ”‚ โ”œโ”€โ”ฌ farewell() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ goodbye() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ hello() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ toString() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ””โ”€โ”ฌ value property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”œโ”€โ”ฌ class NestedClassInstance + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ static makeInstance() method + โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ””โ”€โ”€ returns: @scope/jsii-calc-lib.submodule.NestingClass.NestedClass + โ”‚ โ”œโ”€โ”ฌ class NodeStandardLibrary + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ cryptoSha256() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ fsReadFile() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: Promise + โ”‚ โ”‚ โ”œโ”€โ”ฌ fsReadFileSync() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ””โ”€โ”ฌ osPlatform property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ class NullShouldBeTreatedAsUndefined + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (_param1,optional) initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ _param1 + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ optional + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: any + โ”‚ โ”‚ โ”œโ”€โ”ฌ giveMeUndefined(value) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ value + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: any + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ giveMeUndefinedInsideAnObject(input) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ input + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.NullShouldBeTreatedAsUndefinedData + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ verifyPropertyIsUndefined() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ””โ”€โ”ฌ changeMeToUndefined property + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”œโ”€โ”ฌ class NumberGenerator + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (generator) initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ generator + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.IRandomNumberGenerator + โ”‚ โ”‚ โ”œโ”€โ”ฌ isSameGenerator(gen) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ gen + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.IRandomNumberGenerator + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: boolean + โ”‚ โ”‚ โ”œโ”€โ”ฌ nextTimes100() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: number + โ”‚ โ”‚ โ””โ”€โ”ฌ generator property + โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.IRandomNumberGenerator + โ”‚ โ”œโ”€โ”ฌ class ObjectRefsInCollections + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ sumFromArray(values) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ values + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Array<@scope/jsii-calc-lib.NumericValue> + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: number + โ”‚ โ”‚ โ””โ”€โ”ฌ sumFromMap(values) method + โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ values + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Map @scope/jsii-calc-lib.NumericValue> + โ”‚ โ”‚ โ””โ”€โ”€ returns: number + โ”‚ โ”œโ”€โ”ฌ class ObjectWithPropertyProvider + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ static provide() method + โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ””โ”€โ”€ returns: jsii-calc.IObjectWithProperty + โ”‚ โ”œโ”€โ”ฌ class Old + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ””โ”€โ”ฌ doAThing() method + โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”œโ”€โ”ฌ class OptionalArgumentInvoker + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (delegate) initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ delegate + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.IInterfaceWithOptionalMethodArguments + โ”‚ โ”‚ โ”œโ”€โ”ฌ invokeWithOptional() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ””โ”€โ”ฌ invokeWithoutOptional() method + โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”œโ”€โ”ฌ class OptionalConstructorArgument + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (arg1,arg2,arg3) initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ arg1 + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ arg2 + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ arg3 + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ”œโ”€โ”ฌ arg1 property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ”œโ”€โ”ฌ arg2 property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ””โ”€โ”ฌ arg3 property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”œโ”€โ”ฌ class OptionalStructConsumer + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (optionalStruct) initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ optionalStruct + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ”œโ”€โ”ฌ parameterWasUndefined property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: boolean + โ”‚ โ”‚ โ””โ”€โ”ฌ fieldValue property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”œโ”€โ”ฌ class OverridableProtectedMember + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ overrideMe() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ protected + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ switchModes() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ valueFromProtected() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ overrideReadOnly property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ protected + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ””โ”€โ”ฌ overrideReadWrite property + โ”‚ โ”‚ โ”œโ”€โ”€ protected + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ class OverrideReturnsObject + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ””โ”€โ”ฌ test(obj) method + โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ obj + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.IReturnsNumber + โ”‚ โ”‚ โ””โ”€โ”€ returns: number + โ”‚ โ”œโ”€โ”ฌ class PartiallyInitializedThisConsumer + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ””โ”€โ”ฌ consumePartiallyInitializedThis(obj,dt,ev) method + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ obj + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.ConstructorPassesThisOut + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ dt + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: date + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ ev + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.AllTypesEnum + โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”œโ”€โ”ฌ class Polymorphism + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ””โ”€โ”ฌ sayHello(friendly) method + โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ friendly + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: @scope/jsii-calc-lib.IFriendly + โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”œโ”€โ”ฌ class Power + โ”‚ โ”‚ โ”œโ”€โ”€ base: CompositeOperation + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (base,pow) initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ base + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: @scope/jsii-calc-lib.NumericValue + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ pow + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: @scope/jsii-calc-lib.NumericValue + โ”‚ โ”‚ โ”œโ”€โ”ฌ base property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: @scope/jsii-calc-lib.NumericValue + โ”‚ โ”‚ โ”œโ”€โ”ฌ expression property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: @scope/jsii-calc-lib.NumericValue + โ”‚ โ”‚ โ””โ”€โ”ฌ pow property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: @scope/jsii-calc-lib.NumericValue + โ”‚ โ”œโ”€โ”ฌ class PropertyNamedProperty + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ property property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ””โ”€โ”ฌ yetAnoterOne property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: boolean + โ”‚ โ”œโ”€โ”ฌ class PublicClass + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ””โ”€โ”ฌ hello() method + โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”œโ”€โ”ฌ class PythonReservedWords + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ and() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ as() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ assert() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ async() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ await() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ break() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ class() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ continue() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ def() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ del() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ elif() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ else() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ except() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ finally() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ for() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ from() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ global() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ if() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ import() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ in() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ is() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ lambda() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ nonlocal() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ not() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ or() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ pass() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ raise() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ return() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ try() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ while() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ with() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ””โ”€โ”ฌ yield() method + โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”œโ”€โ”ฌ class ReferenceEnumFromScopedPackage + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ loadFoo() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: Optional<@scope/jsii-calc-lib.EnumFromScopedModule> + โ”‚ โ”‚ โ”œโ”€โ”ฌ saveFoo(value) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ value + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: @scope/jsii-calc-lib.EnumFromScopedModule + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ””โ”€โ”ฌ foo property + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional<@scope/jsii-calc-lib.EnumFromScopedModule> + โ”‚ โ”œโ”€โ”ฌ class ReturnsPrivateImplementationOfInterface + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ””โ”€โ”ฌ privateImplementation property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.IPrivatelyImplemented + โ”‚ โ”œโ”€โ”ฌ class RootStructValidator + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ static validate(struct) method + โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ struct + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.RootStruct + โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”œโ”€โ”ฌ class RuntimeTypeChecking + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ methodWithDefaultedArguments(arg1,arg2,arg3) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ arg1 + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ arg2 + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ arg3 + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ methodWithOptionalAnyArgument(arg) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ arg + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: any + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ””โ”€โ”ฌ methodWithOptionalArguments(arg1,arg2,arg3) method + โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ arg1 + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ arg2 + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ arg3 + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”œโ”€โ”ฌ class SingleInstanceTwoTypes + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ interface1() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: jsii-calc.InbetweenClass + โ”‚ โ”‚ โ””โ”€โ”ฌ interface2() method + โ”‚ โ”‚ โ””โ”€โ”€ returns: jsii-calc.IPublicInterface + โ”‚ โ”œโ”€โ”ฌ class SingletonInt + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ isSingletonInt(value) method + โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ value + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ””โ”€โ”€ returns: boolean + โ”‚ โ”œโ”€โ”ฌ class SingletonString + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ isSingletonString(value) method + โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ value + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ””โ”€โ”€ returns: boolean + โ”‚ โ”œโ”€โ”ฌ class SomeTypeJsii976 + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ static returnAnonymous() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: any + โ”‚ โ”‚ โ””โ”€โ”ฌ static returnReturn() method + โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ””โ”€โ”€ returns: jsii-calc.IReturnJsii976 + โ”‚ โ”œโ”€โ”ฌ class StableClass + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (readonlyString,mutableNumber) initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ readonlyString + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ mutableNumber + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ”œโ”€โ”ฌ method() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ readonlyProperty property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ””โ”€โ”ฌ mutableProperty property + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”œโ”€โ”ฌ class StaticContext + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ static canAccessStaticContext() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: boolean + โ”‚ โ”‚ โ””โ”€โ”ฌ static staticVariable property + โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ””โ”€โ”€ type: boolean + โ”‚ โ”œโ”€โ”ฌ class StaticHelloChild + โ”‚ โ”‚ โ”œโ”€โ”€ base: StaticHelloParent + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ static method() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ””โ”€โ”ฌ static property property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”œโ”€โ”ฌ class StaticHelloParent + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ static method() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ””โ”€โ”ฌ static property property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”œโ”€โ”ฌ class Statics + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (value) initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ value + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ static staticMethod(name) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ name + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ justMethod() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ static BAR property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ const + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ”œโ”€โ”ฌ static ConstObj property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ const + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.DoubleTrouble + โ”‚ โ”‚ โ”œโ”€โ”ฌ static Foo property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ const + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ static zooBar property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ const + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Map string> + โ”‚ โ”‚ โ”œโ”€โ”ฌ static instance property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.Statics + โ”‚ โ”‚ โ”œโ”€โ”ฌ static nonConstStatic property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ””โ”€โ”ฌ value property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ class StripInternal + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ””โ”€โ”ฌ youSeeMe property + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ class StructPassing + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ static howManyVarArgsDidIPass(_positional,inputs) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ variadic + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ _positional + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ inputs + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ type: jsii-calc.TopLevelStruct + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ variadic + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: number + โ”‚ โ”‚ โ””โ”€โ”ฌ static roundTrip(_positional,input) method + โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ _positional + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ input + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.TopLevelStruct + โ”‚ โ”‚ โ””โ”€โ”€ returns: jsii-calc.TopLevelStruct + โ”‚ โ”œโ”€โ”ฌ class StructUnionConsumer + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ static isStructA(struct) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ struct + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.StructA | jsii-calc.StructB + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: boolean + โ”‚ โ”‚ โ””โ”€โ”ฌ static isStructB(struct) method + โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ struct + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.StructA | jsii-calc.StructB + โ”‚ โ”‚ โ””โ”€โ”€ returns: boolean + โ”‚ โ”œโ”€โ”ฌ class Sum + โ”‚ โ”‚ โ”œโ”€โ”€ base: CompositeOperation + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ expression property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: @scope/jsii-calc-lib.NumericValue + โ”‚ โ”‚ โ””โ”€โ”ฌ parts property + โ”‚ โ”‚ โ””โ”€โ”€ type: Array<@scope/jsii-calc-lib.NumericValue> + โ”‚ โ”œโ”€โ”ฌ class SupportsNiceJavaBuilder + โ”‚ โ”‚ โ”œโ”€โ”€ base: SupportsNiceJavaBuilderWithRequiredProps + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (id,defaultBar,props,rest) initializer + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ variadic + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ id + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ defaultBar + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ props + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ rest + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ variadic + โ”‚ โ”‚ โ”œโ”€โ”ฌ id property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ””โ”€โ”ฌ rest property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: Array + โ”‚ โ”œโ”€โ”ฌ class SupportsNiceJavaBuilderWithRequiredProps + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (id,props) initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ id + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ props + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.SupportsNiceJavaBuilderProps + โ”‚ โ”‚ โ”œโ”€โ”ฌ bar property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ”œโ”€โ”ฌ id property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ””โ”€โ”ฌ propId property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”œโ”€โ”ฌ class SyncVirtualMethods + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ callerIsAsync() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: Promise + โ”‚ โ”‚ โ”œโ”€โ”ฌ callerIsMethod() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: number + โ”‚ โ”‚ โ”œโ”€โ”ฌ modifyOtherProperty(value) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ value + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ modifyValueOfTheProperty(value) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ value + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ readA() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: number + โ”‚ โ”‚ โ”œโ”€โ”ฌ retrieveOtherProperty() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ retrieveReadOnlyProperty() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ retrieveValueOfTheProperty() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ virtualMethod(n) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ n + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: number + โ”‚ โ”‚ โ”œโ”€โ”ฌ writeA(value) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ value + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ readonlyProperty property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ a property + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ”œโ”€โ”ฌ callerIsProperty property + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ”œโ”€โ”ฌ otherProperty property + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ theProperty property + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ””โ”€โ”ฌ valueOfOtherProperty property + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ class Thrower + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ””โ”€โ”ฌ throwError() method + โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”œโ”€โ”ฌ class UmaskCheck + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ static mode() method + โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ””โ”€โ”€ returns: number + โ”‚ โ”œโ”€โ”ฌ class UnaryOperation + โ”‚ โ”‚ โ”œโ”€โ”€ base: Operation + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (operand) initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ operand + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: @scope/jsii-calc-lib.NumericValue + โ”‚ โ”‚ โ””โ”€โ”ฌ operand property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: @scope/jsii-calc-lib.NumericValue + โ”‚ โ”œโ”€โ”ฌ class UpcasingReflectable + โ”‚ โ”‚ โ”œโ”€โ”€ interfaces: IReflectable + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (delegate) initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ delegate + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Map any> + โ”‚ โ”‚ โ”œโ”€โ”ฌ static reflector property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ const + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: @scope/jsii-calc-lib.submodule.Reflector + โ”‚ โ”‚ โ””โ”€โ”ฌ entries property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: Array<@scope/jsii-calc-lib.submodule.ReflectableEntry> + โ”‚ โ”œโ”€โ”ฌ class UseBundledDependency + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ””โ”€โ”ฌ value() method + โ”‚ โ”‚ โ””โ”€โ”€ returns: any + โ”‚ โ”œโ”€โ”ฌ class UseCalcBase + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ””โ”€โ”ฌ hello() method + โ”‚ โ”‚ โ””โ”€โ”€ returns: @scope/jsii-calc-base.Base + โ”‚ โ”œโ”€โ”ฌ class UsesInterfaceWithProperties + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (obj) initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ obj + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.IInterfaceWithProperties + โ”‚ โ”‚ โ”œโ”€โ”ฌ justRead() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ readStringAndNumber(ext) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ ext + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.IInterfaceWithPropertiesExtension + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ writeAndRead(value) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ value + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ””โ”€โ”ฌ obj property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.IInterfaceWithProperties + โ”‚ โ”œโ”€โ”ฌ class VariadicInvoker + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (method) initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.VariadicMethod + โ”‚ โ”‚ โ””โ”€โ”ฌ asArray(values) method + โ”‚ โ”‚ โ”œโ”€โ”€ variadic + โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ values + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ type: number + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ variadic + โ”‚ โ”‚ โ””โ”€โ”€ returns: Array + โ”‚ โ”œโ”€โ”ฌ class VariadicMethod + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (prefix) initializer + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ variadic + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ prefix + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ type: number + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ variadic + โ”‚ โ”‚ โ””โ”€โ”ฌ asArray(first,others) method + โ”‚ โ”‚ โ”œโ”€โ”€ variadic + โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ first + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ others + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ type: number + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ variadic + โ”‚ โ”‚ โ””โ”€โ”€ returns: Array + โ”‚ โ”œโ”€โ”ฌ class VirtualMethodPlayground + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ overrideMeAsync(index) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ index + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: Promise + โ”‚ โ”‚ โ”œโ”€โ”ฌ overrideMeSync(index) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ index + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: number + โ”‚ โ”‚ โ”œโ”€โ”ฌ parallelSumAsync(count) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ count + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: Promise + โ”‚ โ”‚ โ”œโ”€โ”ฌ serialSumAsync(count) method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ count + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: Promise + โ”‚ โ”‚ โ””โ”€โ”ฌ sumSync(count) method + โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ count + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ””โ”€โ”€ returns: number + โ”‚ โ”œโ”€โ”ฌ class VoidCallback + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ”œโ”€โ”ฌ callMe() method + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ overrideMe() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ protected + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ””โ”€โ”ฌ methodWasCalled property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: boolean + โ”‚ โ”œโ”€โ”ฌ class WithPrivatePropertyInConstructor + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ (privateField) initializer + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ privateField + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ””โ”€โ”ฌ success property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: boolean + โ”‚ โ”œโ”€โ”ฌ interface CalculatorProps + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ initialValue property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ””โ”€โ”ฌ maximumValue property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”œโ”€โ”ฌ interface ChildStruct982 + โ”‚ โ”‚ โ”œโ”€โ”ฌ interfaces + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ ParentStruct982 + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ bar property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”œโ”€โ”ฌ interface ConfusingToJacksonStruct + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ unionProperty property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional<@scope/jsii-calc-lib.IFriendly | Array<@scope/jsii-calc-lib.IFriendly | jsii-calc.AbstractClass>> + โ”‚ โ”œโ”€โ”ฌ interface DeprecatedStruct + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ readonlyProperty property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ interface DerivedStruct + โ”‚ โ”‚ โ”œโ”€โ”ฌ interfaces + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ MyFirstStruct + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ anotherRequired property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: date + โ”‚ โ”‚ โ”œโ”€โ”ฌ bool property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: boolean + โ”‚ โ”‚ โ”œโ”€โ”ฌ nonPrimitive property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.DoubleTrouble + โ”‚ โ”‚ โ”œโ”€โ”ฌ anotherOptional property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional @scope/jsii-calc-lib.NumericValue>> + โ”‚ โ”‚ โ”œโ”€โ”ฌ optionalAny property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: any + โ”‚ โ”‚ โ””โ”€โ”ฌ optionalArray property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional> + โ”‚ โ”œโ”€โ”ฌ interface DiamondInheritanceBaseLevelStruct + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ baseLevelProperty property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ interface DiamondInheritanceFirstMidLevelStruct + โ”‚ โ”‚ โ”œโ”€โ”ฌ interfaces + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ DiamondInheritanceBaseLevelStruct + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ firstMidLevelProperty property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ interface DiamondInheritanceSecondMidLevelStruct + โ”‚ โ”‚ โ”œโ”€โ”ฌ interfaces + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ DiamondInheritanceBaseLevelStruct + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ secondMidLevelProperty property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ interface DiamondInheritanceTopLevelStruct + โ”‚ โ”‚ โ”œโ”€โ”ฌ interfaces + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ DiamondInheritanceFirstMidLevelStruct + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ DiamondInheritanceSecondMidLevelStruct + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ topLevelProperty property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ interface EraseUndefinedHashValuesOptions + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ option1 property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ””โ”€โ”ฌ option2 property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”œโ”€โ”ฌ interface ExperimentalStruct + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ readonlyProperty property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ interface ExtendsInternalInterface + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ boom property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: boolean + โ”‚ โ”‚ โ””โ”€โ”ฌ prop property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ interface ExternalStruct + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ readonlyProperty property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ interface Greetee + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ name property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”œโ”€โ”ฌ interface IAnonymousImplementationProvider + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ provideAsClass() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: jsii-calc.Implementation + โ”‚ โ”‚ โ””โ”€โ”ฌ provideAsInterface() method + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ””โ”€โ”€ returns: jsii-calc.IAnonymouslyImplementMe + โ”‚ โ”œโ”€โ”ฌ interface IAnonymouslyImplementMe + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ verb() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ””โ”€โ”ฌ value property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”œโ”€โ”ฌ interface IAnotherPublicInterface + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ a property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ interface IBell + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ ring() method + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”œโ”€โ”ฌ interface IBellRinger + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ yourTurn(bell) method + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ bell + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.IBell + โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”œโ”€โ”ฌ interface IConcreteBellRinger + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ yourTurn(bell) method + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ bell + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.Bell + โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”œโ”€โ”ฌ interface IDeprecatedInterface + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ method() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ””โ”€โ”ฌ mutableProperty property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”œโ”€โ”ฌ interface IExperimentalInterface + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ method() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ””โ”€โ”ฌ mutableProperty property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”œโ”€โ”ฌ interface IExtendsPrivateInterface + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ moreThings property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Array + โ”‚ โ”‚ โ””โ”€โ”ฌ private property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ interface IExternalInterface + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ method() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ””โ”€โ”ฌ mutableProperty property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”œโ”€โ”ฌ interface IFriendlier + โ”‚ โ”‚ โ”œโ”€โ”ฌ interfaces + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ IFriendly + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ farewell() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”‚ โ””โ”€โ”ฌ goodbye() method + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”œโ”€โ”ฌ interface IFriendlyRandomGenerator + โ”‚ โ”‚ โ”œโ”€โ”ฌ interfaces + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ IRandomNumberGenerator + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ IFriendly + โ”‚ โ”‚ โ””โ”€โ”€ members + โ”‚ โ”œโ”€โ”ฌ interface IInterfaceImplementedByAbstractClass + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ propFromInterface property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ interface IInterfaceThatShouldNotBeADataType + โ”‚ โ”‚ โ”œโ”€โ”ฌ interfaces + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ IInterfaceWithMethods + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ otherValue property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ interface IInterfaceWithInternal + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ visible() method + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”œโ”€โ”ฌ interface IInterfaceWithMethods + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ doThings() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ””โ”€โ”ฌ value property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ interface IInterfaceWithOptionalMethodArguments + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ hello(arg1,arg2) method + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ arg1 + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ arg2 + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”œโ”€โ”ฌ interface IInterfaceWithProperties + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ readOnlyString property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ””โ”€โ”ฌ readWriteString property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ interface IInterfaceWithPropertiesExtension + โ”‚ โ”‚ โ”œโ”€โ”ฌ interfaces + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ IInterfaceWithProperties + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ foo property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”œโ”€โ”ฌ interface IJSII417Derived + โ”‚ โ”‚ โ”œโ”€โ”ฌ interfaces + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ IJSII417PublicBaseOfBase + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ bar() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ”œโ”€โ”ฌ baz() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ””โ”€โ”ฌ property property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ interface IJSII417PublicBaseOfBase + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ foo() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ””โ”€โ”ฌ hasRoot property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: boolean + โ”‚ โ”œโ”€โ”ฌ interface IJsii487External + โ”‚ โ”‚ โ””โ”€โ”€ members + โ”‚ โ”œโ”€โ”ฌ interface IJsii487External2 + โ”‚ โ”‚ โ””โ”€โ”€ members + โ”‚ โ”œโ”€โ”ฌ interface IJsii496 + โ”‚ โ”‚ โ””โ”€โ”€ members + โ”‚ โ”œโ”€โ”ฌ interface IMutableObjectLiteral + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ value property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ interface INonInternalInterface + โ”‚ โ”‚ โ”œโ”€โ”ฌ interfaces + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ IAnotherPublicInterface + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ b property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ””โ”€โ”ฌ c property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ interface IObjectWithProperty + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ wasSet() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: boolean + โ”‚ โ”‚ โ””โ”€โ”ฌ property property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ interface IOptionalMethod + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ optional() method + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ””โ”€โ”€ returns: Optional + โ”‚ โ”œโ”€โ”ฌ interface IPrivatelyImplemented + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ success property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: boolean + โ”‚ โ”œโ”€โ”ฌ interface IPublicInterface + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ bye() method + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”œโ”€โ”ฌ interface IPublicInterface2 + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ ciao() method + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”œโ”€โ”ฌ interface IRandomNumberGenerator + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ next() method + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ””โ”€โ”€ returns: number + โ”‚ โ”œโ”€โ”ฌ interface IReturnJsii976 + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ foo property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”œโ”€โ”ฌ interface IReturnsNumber + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ obtainNumber() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: @scope/jsii-calc-lib.IDoublable + โ”‚ โ”‚ โ””โ”€โ”ฌ numberProp property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: @scope/jsii-calc-lib.Number + โ”‚ โ”œโ”€โ”ฌ interface IStableInterface + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ method() method + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”‚ โ””โ”€โ”ฌ mutableProperty property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”œโ”€โ”ฌ interface IStructReturningDelegate + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ returnStruct() method + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ””โ”€โ”€ returns: jsii-calc.StructB + โ”‚ โ”œโ”€โ”ฌ interface IWallClock + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ iso8601Now() method + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ”œโ”€โ”ฌ interface ImplictBaseOfBase + โ”‚ โ”‚ โ”œโ”€โ”ฌ interfaces + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ BaseProps + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ goo property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: date + โ”‚ โ”œโ”€โ”ฌ interface PropBooleanValue + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ value property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: boolean + โ”‚ โ”œโ”€โ”ฌ interface PropProperty + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ prop property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.LevelOne.PropBooleanValue + โ”‚ โ”œโ”€โ”ฌ interface LevelOneProps + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ prop property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: jsii-calc.LevelOne.PropProperty + โ”‚ โ”œโ”€โ”ฌ interface LoadBalancedFargateServiceProps + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ containerPort property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ”œโ”€โ”ฌ cpu property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ”œโ”€โ”ฌ memoryMiB property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ”œโ”€โ”ฌ publicLoadBalancer property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ””โ”€โ”ฌ publicTasks property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”œโ”€โ”ฌ interface NestedStruct + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ numberProp property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”œโ”€โ”ฌ interface NullShouldBeTreatedAsUndefinedData + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ arrayWithThreeElementsAndUndefinedAsSecondArgument property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Array + โ”‚ โ”‚ โ””โ”€โ”ฌ thisShouldBeUndefined property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: any + โ”‚ โ”œโ”€โ”ฌ interface OptionalStruct + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ field property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”œโ”€โ”ฌ interface ParentStruct982 + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ foo property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ interface RootStruct + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ stringProp property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ””โ”€โ”ฌ nestedStruct property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”œโ”€โ”ฌ interface SecondLevelStruct + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ deeperRequiredProp property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ””โ”€โ”ฌ deeperOptionalProp property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”œโ”€โ”ฌ interface SmellyStruct + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ property property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ””โ”€โ”ฌ yetAnoterOne property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: boolean + โ”‚ โ”œโ”€โ”ฌ interface StableStruct + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ readonlyProperty property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ interface StructA + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ requiredString property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ optionalNumber property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ””โ”€โ”ฌ optionalString property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”œโ”€โ”ฌ interface StructB + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ requiredString property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ optionalBoolean property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ””โ”€โ”ฌ optionalStructA property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”œโ”€โ”ฌ interface StructParameterType + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ scope property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ””โ”€โ”ฌ props property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”œโ”€โ”ฌ interface StructWithJavaReservedWords + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ default property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ assert property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ”œโ”€โ”ฌ result property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”‚ โ””โ”€โ”ฌ that property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”œโ”€โ”ฌ interface SupportsNiceJavaBuilderProps + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ bar property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”‚ โ””โ”€โ”ฌ id property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”œโ”€โ”ฌ interface TopLevelStruct + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ required property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”‚ โ”œโ”€โ”ฌ secondLevel property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: number | jsii-calc.SecondLevelStruct + โ”‚ โ”‚ โ””โ”€โ”ฌ optional property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”œโ”€โ”ฌ interface UnionProperties + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”ฌ bar property + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: string | number | jsii-calc.AllTypes + โ”‚ โ”‚ โ””โ”€โ”ฌ foo property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”œโ”€โ”ฌ enum AllTypesEnum + โ”‚ โ”‚ โ”œโ”€โ”€ MY_ENUM_VALUE + โ”‚ โ”‚ โ”œโ”€โ”€ YOUR_ENUM_VALUE + โ”‚ โ”‚ โ””โ”€โ”€ THIS_IS_GREAT + โ”‚ โ”œโ”€โ”ฌ enum DeprecatedEnum + โ”‚ โ”‚ โ”œโ”€โ”€ OPTION_A + โ”‚ โ”‚ โ””โ”€โ”€ OPTION_B + โ”‚ โ”œโ”€โ”ฌ enum ExperimentalEnum + โ”‚ โ”‚ โ”œโ”€โ”€ OPTION_A + โ”‚ โ”‚ โ””โ”€โ”€ OPTION_B + โ”‚ โ”œโ”€โ”ฌ enum ExternalEnum + โ”‚ โ”‚ โ”œโ”€โ”€ OPTION_A + โ”‚ โ”‚ โ””โ”€โ”€ OPTION_B + โ”‚ โ”œโ”€โ”ฌ enum SingletonIntEnum + โ”‚ โ”‚ โ””โ”€โ”€ SINGLETON_INT + โ”‚ โ”œโ”€โ”ฌ enum SingletonStringEnum + โ”‚ โ”‚ โ””โ”€โ”€ SINGLETON_STRING + โ”‚ โ”œโ”€โ”ฌ enum StableEnum + โ”‚ โ”‚ โ”œโ”€โ”€ OPTION_A + โ”‚ โ”‚ โ””โ”€โ”€ OPTION_B + โ”‚ โ””โ”€โ”ฌ enum StringEnum + โ”‚ โ”œโ”€โ”€ A + โ”‚ โ”œโ”€โ”€ B + โ”‚ โ””โ”€โ”€ C + โ”œโ”€โ”ฌ @scope/jsii-calc-base + โ”‚ โ”œโ”€โ”ฌ dependencies + โ”‚ โ”‚ โ””โ”€โ”€ @scope/jsii-calc-base-of-base + โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”œโ”€โ”ฌ class Base + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ””โ”€โ”ฌ typeName() method + โ”‚ โ”‚ โ””โ”€โ”€ returns: any + โ”‚ โ”œโ”€โ”ฌ class StaticConsumer + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ””โ”€โ”ฌ static consume(args) method + โ”‚ โ”‚ โ”œโ”€โ”€ static + โ”‚ โ”‚ โ”œโ”€โ”€ variadic + โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ args + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ type: any + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ variadic + โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ”œโ”€โ”ฌ interface BaseProps + โ”‚ โ”‚ โ”œโ”€โ”ฌ interfaces + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ VeryBaseProps + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ bar property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ””โ”€โ”ฌ interface IBaseInterface + โ”‚ โ”œโ”€โ”ฌ interfaces + โ”‚ โ”‚ โ””โ”€โ”€ IVeryBaseInterface + โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ””โ”€โ”ฌ bar() method + โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ””โ”€โ”€ 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 + โ”‚ โ”‚ โ””โ”€โ”ฌ hey() method + โ”‚ โ”‚ โ””โ”€โ”€ returns: number + โ”‚ โ”œโ”€โ”ฌ interface IVeryBaseInterface + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ foo() method + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ””โ”€โ”€ returns: void + โ”‚ โ””โ”€โ”ฌ interface VeryBaseProps + โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ””โ”€โ”ฌ foo property + โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ””โ”€โ”€ type: @scope/jsii-calc-base-of-base.Very + โ””โ”€โ”ฌ @scope/jsii-calc-lib + โ”œโ”€โ”ฌ dependencies + โ”‚ โ”œโ”€โ”€ @scope/jsii-calc-base + โ”‚ โ””โ”€โ”€ @scope/jsii-calc-base-of-base + โ”œโ”€โ”ฌ submodules + โ”‚ โ””โ”€โ”ฌ submodule + โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”œโ”€โ”ฌ class NestingClass + โ”‚ โ”‚ โ””โ”€โ”€ members + โ”‚ โ”œโ”€โ”ฌ class NestedClass + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ””โ”€โ”ฌ property property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ”œโ”€โ”ฌ class Reflector + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”‚ โ””โ”€โ”ฌ asMap(reflectable) method + โ”‚ โ”‚ โ”œโ”€โ”ฌ parameters + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ reflectable + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ type: @scope/jsii-calc-lib.submodule.IReflectable + โ”‚ โ”‚ โ””โ”€โ”€ returns: Map any> + โ”‚ โ”œโ”€โ”ฌ interface IReflectable + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ entries property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: Array<@scope/jsii-calc-lib.submodule.ReflectableEntry> + โ”‚ โ”œโ”€โ”ฌ interface NestedStruct + โ”‚ โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”‚ โ””โ”€โ”ฌ name property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ””โ”€โ”ฌ interface ReflectableEntry + โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”œโ”€โ”ฌ key property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ””โ”€โ”ฌ value property + โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ””โ”€โ”€ type: any + โ””โ”€โ”ฌ types + โ”œโ”€โ”ฌ class Number + โ”‚ โ”œโ”€โ”€ base: NumericValue + โ”‚ โ”œโ”€โ”€ interfaces: IDoublable + โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”œโ”€โ”ฌ (value) initializer + โ”‚ โ”‚ โ””โ”€โ”ฌ parameters + โ”‚ โ”‚ โ””โ”€โ”ฌ value + โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”œโ”€โ”ฌ doubleValue property + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ””โ”€โ”ฌ value property + โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ””โ”€โ”€ type: number + โ”œโ”€โ”ฌ class NumericValue + โ”‚ โ”œโ”€โ”€ base: Base + โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ”œโ”€โ”ฌ toString() method + โ”‚ โ”‚ โ””โ”€โ”€ returns: string + โ”‚ โ””โ”€โ”ฌ value property + โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ””โ”€โ”€ type: number + โ”œโ”€โ”ฌ class Operation + โ”‚ โ”œโ”€โ”€ base: NumericValue + โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”œโ”€โ”€ () initializer + โ”‚ โ””โ”€โ”ฌ toString() method + โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ””โ”€โ”€ returns: string + โ”œโ”€โ”ฌ interface IDoublable + โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ””โ”€โ”ฌ doubleValue property + โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ””โ”€โ”€ type: number + โ”œโ”€โ”ฌ interface IFriendly + โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ””โ”€โ”ฌ hello() method + โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ””โ”€โ”€ returns: string + โ”œโ”€โ”ฌ interface IThreeLevelsInterface + โ”‚ โ”œโ”€โ”ฌ interfaces + โ”‚ โ”‚ โ””โ”€โ”€ IBaseInterface + โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ””โ”€โ”ฌ baz() method + โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ””โ”€โ”€ returns: void + โ”œโ”€โ”ฌ interface MyFirstStruct + โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”œโ”€โ”ฌ anumber property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: number + โ”‚ โ”œโ”€โ”ฌ astring property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: string + โ”‚ โ””โ”€โ”ฌ firstOptional property + โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ””โ”€โ”€ type: Optional> + โ”œโ”€โ”ฌ interface StructWithOnlyOptionals + โ”‚ โ””โ”€โ”ฌ members + โ”‚ โ”œโ”€โ”ฌ optional1 property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ”œโ”€โ”ฌ optional2 property + โ”‚ โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ”‚ โ””โ”€โ”€ type: Optional + โ”‚ โ””โ”€โ”ฌ optional3 property + โ”‚ โ”œโ”€โ”€ abstract + โ”‚ โ”œโ”€โ”€ immutable + โ”‚ โ””โ”€โ”€ type: Optional + โ””โ”€โ”ฌ enum EnumFromScopedModule + โ”œโ”€โ”€ VALUE1 + โ””โ”€โ”€ VALUE2 +" +`; + +exports[`signatures 1`] = ` +"assemblies + โ”œโ”€โ”ฌ jsii-calc + โ”‚ โ””โ”€โ”ฌ submodules + โ”‚ โ”œโ”€โ”€ DerivedClassHasNoProperties + โ”‚ โ”œโ”€โ”€ InterfaceInNamespaceIncludesClasses + โ”‚ โ”œโ”€โ”€ InterfaceInNamespaceOnlyInterface + โ”‚ โ”œโ”€โ”€ PythonSelf + โ”‚ โ”œโ”€โ”€ composition + โ”‚ โ””โ”€โ”ฌ submodule + โ”‚ โ””โ”€โ”ฌ submodules + โ”‚ โ”œโ”€โ”€ back_references + โ”‚ โ”œโ”€โ”€ child + โ”‚ โ”œโ”€โ”€ isolated + โ”‚ โ”œโ”€โ”ฌ nested_submodule + โ”‚ โ”‚ โ””โ”€โ”ฌ submodules + โ”‚ โ”‚ โ””โ”€โ”€ deeplyNested + โ”‚ โ”œโ”€โ”€ param + โ”‚ โ””โ”€โ”€ returnsparam + โ”œโ”€โ”€ @scope/jsii-calc-base + โ”œโ”€โ”€ @scope/jsii-calc-base-of-base + โ””โ”€โ”ฌ @scope/jsii-calc-lib + โ””โ”€โ”ฌ submodules + โ””โ”€โ”€ submodule +" +`; + +exports[`types 1`] = ` +"assemblies + โ”œโ”€โ”ฌ jsii-calc + โ”‚ โ”œโ”€โ”ฌ submodules + โ”‚ โ”‚ โ”œโ”€โ”ฌ DerivedClassHasNoProperties + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ class Base + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ class Derived + โ”‚ โ”‚ โ”œโ”€โ”ฌ InterfaceInNamespaceIncludesClasses + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ class Foo + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ interface Hello + โ”‚ โ”‚ โ”œโ”€โ”ฌ InterfaceInNamespaceOnlyInterface + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ interface Hello + โ”‚ โ”‚ โ”œโ”€โ”ฌ PythonSelf + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ class ClassWithSelf + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ class ClassWithSelfKwarg + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ interface IInterfaceWithSelf + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ interface StructWithSelf + โ”‚ โ”‚ โ”œโ”€โ”ฌ composition + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ class CompositeOperation + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ enum CompositionStringStyle + โ”‚ โ”‚ โ””โ”€โ”ฌ submodule + โ”‚ โ”‚ โ”œโ”€โ”ฌ submodules + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ back_references + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ interface MyClassReference + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ child + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ class InnerClass + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ class OuterClass + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ interface KwargsProps + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ interface SomeStruct + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ interface Structure + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ enum Awesomeness + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ enum Goodness + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ enum SomeEnum + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ isolated + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ class Kwargs + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ nested_submodule + โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ submodules + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ deeplyNested + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ interface INamespaced + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ class Namespaced + โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌ param + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ interface SpecialParameter + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ returnsparam + โ”‚ โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ class ReturnsSpecialParameter + โ”‚ โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”‚ โ””โ”€โ”€ class MyClass + โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”œโ”€โ”€ class AbstractClass + โ”‚ โ”œโ”€โ”€ class AbstractClassBase + โ”‚ โ”œโ”€โ”€ class AbstractClassReturner + โ”‚ โ”œโ”€โ”€ class AbstractSuite + โ”‚ โ”œโ”€โ”€ class Add + โ”‚ โ”œโ”€โ”€ class AllTypes + โ”‚ โ”œโ”€โ”€ class AllowedMethodNames + โ”‚ โ”œโ”€โ”€ class AmbiguousParameters + โ”‚ โ”œโ”€โ”€ class AnonymousImplementationProvider + โ”‚ โ”œโ”€โ”€ class AsyncVirtualMethods + โ”‚ โ”œโ”€โ”€ class AugmentableClass + โ”‚ โ”œโ”€โ”€ class BaseJsii976 + โ”‚ โ”œโ”€โ”€ class Bell + โ”‚ โ”œโ”€โ”€ class BinaryOperation + โ”‚ โ”œโ”€โ”€ class BurriedAnonymousObject + โ”‚ โ”œโ”€โ”€ class Calculator + โ”‚ โ”œโ”€โ”€ class ClassThatImplementsTheInternalInterface + โ”‚ โ”œโ”€โ”€ class ClassThatImplementsThePrivateInterface + โ”‚ โ”œโ”€โ”€ class ClassWithCollections + โ”‚ โ”œโ”€โ”€ class ClassWithDocs + โ”‚ โ”œโ”€โ”€ class ClassWithJavaReservedWords + โ”‚ โ”œโ”€โ”€ class ClassWithMutableObjectLiteralProperty + โ”‚ โ”œโ”€โ”€ class ClassWithPrivateConstructorAndAutomaticProperties + โ”‚ โ”œโ”€โ”€ class ConfusingToJackson + โ”‚ โ”œโ”€โ”€ class ConstructorPassesThisOut + โ”‚ โ”œโ”€โ”€ class Constructors + โ”‚ โ”œโ”€โ”€ class ConsumePureInterface + โ”‚ โ”œโ”€โ”€ class ConsumerCanRingBell + โ”‚ โ”œโ”€โ”€ class ConsumersOfThisCrazyTypeSystem + โ”‚ โ”œโ”€โ”€ class DataRenderer + โ”‚ โ”œโ”€โ”€ class DefaultedConstructorArgument + โ”‚ โ”œโ”€โ”€ class Demonstrate982 + โ”‚ โ”œโ”€โ”€ class DeprecatedClass + โ”‚ โ”œโ”€โ”€ class DisappointingCollectionSource + โ”‚ โ”œโ”€โ”€ class DoNotOverridePrivates + โ”‚ โ”œโ”€โ”€ class DoNotRecognizeAnyAsOptional + โ”‚ โ”œโ”€โ”€ class DocumentedClass + โ”‚ โ”œโ”€โ”€ class DontComplainAboutVariadicAfterOptional + โ”‚ โ”œโ”€โ”€ class DoubleTrouble + โ”‚ โ”œโ”€โ”€ class DynamicPropertyBearer + โ”‚ โ”œโ”€โ”€ class DynamicPropertyBearerChild + โ”‚ โ”œโ”€โ”€ class Entropy + โ”‚ โ”œโ”€โ”€ class EnumDispenser + โ”‚ โ”œโ”€โ”€ class EraseUndefinedHashValues + โ”‚ โ”œโ”€โ”€ class ExperimentalClass + โ”‚ โ”œโ”€โ”€ class ExportedBaseClass + โ”‚ โ”œโ”€โ”€ class ExternalClass + โ”‚ โ”œโ”€โ”€ class GiveMeStructs + โ”‚ โ”œโ”€โ”€ class GreetingAugmenter + โ”‚ โ”œโ”€โ”€ class ImplementInternalInterface + โ”‚ โ”œโ”€โ”€ class Implementation + โ”‚ โ”œโ”€โ”€ class ImplementsInterfaceWithInternal + โ”‚ โ”œโ”€โ”€ class ImplementsInterfaceWithInternalSubclass + โ”‚ โ”œโ”€โ”€ class ImplementsPrivateInterface + โ”‚ โ”œโ”€โ”€ class InbetweenClass + โ”‚ โ”œโ”€โ”€ class InterfaceCollections + โ”‚ โ”œโ”€โ”€ class InterfacesMaker + โ”‚ โ”œโ”€โ”€ class Isomorphism + โ”‚ โ”œโ”€โ”€ class JSII417Derived + โ”‚ โ”œโ”€โ”€ class JSII417PublicBaseOfBase + โ”‚ โ”œโ”€โ”€ class JSObjectLiteralForInterface + โ”‚ โ”œโ”€โ”€ class JSObjectLiteralToNative + โ”‚ โ”œโ”€โ”€ class JSObjectLiteralToNativeClass + โ”‚ โ”œโ”€โ”€ class JavaReservedWords + โ”‚ โ”œโ”€โ”€ class Jsii487Derived + โ”‚ โ”œโ”€โ”€ class Jsii496Derived + โ”‚ โ”œโ”€โ”€ class JsiiAgent + โ”‚ โ”œโ”€โ”€ class JsonFormatter + โ”‚ โ”œโ”€โ”€ class LevelOne + โ”‚ โ”œโ”€โ”€ class MethodNamedProperty + โ”‚ โ”œโ”€โ”€ class Multiply + โ”‚ โ”œโ”€โ”€ class Negate + โ”‚ โ”œโ”€โ”€ class NestedClassInstance + โ”‚ โ”œโ”€โ”€ class NodeStandardLibrary + โ”‚ โ”œโ”€โ”€ class NullShouldBeTreatedAsUndefined + โ”‚ โ”œโ”€โ”€ class NumberGenerator + โ”‚ โ”œโ”€โ”€ class ObjectRefsInCollections + โ”‚ โ”œโ”€โ”€ class ObjectWithPropertyProvider + โ”‚ โ”œโ”€โ”€ class Old + โ”‚ โ”œโ”€โ”€ class OptionalArgumentInvoker + โ”‚ โ”œโ”€โ”€ class OptionalConstructorArgument + โ”‚ โ”œโ”€โ”€ class OptionalStructConsumer + โ”‚ โ”œโ”€โ”€ class OverridableProtectedMember + โ”‚ โ”œโ”€โ”€ class OverrideReturnsObject + โ”‚ โ”œโ”€โ”€ class PartiallyInitializedThisConsumer + โ”‚ โ”œโ”€โ”€ class Polymorphism + โ”‚ โ”œโ”€โ”€ class Power + โ”‚ โ”œโ”€โ”€ class PropertyNamedProperty + โ”‚ โ”œโ”€โ”€ class PublicClass + โ”‚ โ”œโ”€โ”€ class PythonReservedWords + โ”‚ โ”œโ”€โ”€ class ReferenceEnumFromScopedPackage + โ”‚ โ”œโ”€โ”€ class ReturnsPrivateImplementationOfInterface + โ”‚ โ”œโ”€โ”€ class RootStructValidator + โ”‚ โ”œโ”€โ”€ class RuntimeTypeChecking + โ”‚ โ”œโ”€โ”€ class SingleInstanceTwoTypes + โ”‚ โ”œโ”€โ”€ class SingletonInt + โ”‚ โ”œโ”€โ”€ class SingletonString + โ”‚ โ”œโ”€โ”€ class SomeTypeJsii976 + โ”‚ โ”œโ”€โ”€ class StableClass + โ”‚ โ”œโ”€โ”€ class StaticContext + โ”‚ โ”œโ”€โ”€ class StaticHelloChild + โ”‚ โ”œโ”€โ”€ class StaticHelloParent + โ”‚ โ”œโ”€โ”€ class Statics + โ”‚ โ”œโ”€โ”€ class StripInternal + โ”‚ โ”œโ”€โ”€ class StructPassing + โ”‚ โ”œโ”€โ”€ class StructUnionConsumer + โ”‚ โ”œโ”€โ”€ class Sum + โ”‚ โ”œโ”€โ”€ class SupportsNiceJavaBuilder + โ”‚ โ”œโ”€โ”€ class SupportsNiceJavaBuilderWithRequiredProps + โ”‚ โ”œโ”€โ”€ class SyncVirtualMethods + โ”‚ โ”œโ”€โ”€ class Thrower + โ”‚ โ”œโ”€โ”€ class UmaskCheck + โ”‚ โ”œโ”€โ”€ class UnaryOperation + โ”‚ โ”œโ”€โ”€ class UpcasingReflectable + โ”‚ โ”œโ”€โ”€ class UseBundledDependency + โ”‚ โ”œโ”€โ”€ class UseCalcBase + โ”‚ โ”œโ”€โ”€ class UsesInterfaceWithProperties + โ”‚ โ”œโ”€โ”€ class VariadicInvoker + โ”‚ โ”œโ”€โ”€ class VariadicMethod + โ”‚ โ”œโ”€โ”€ class VirtualMethodPlayground + โ”‚ โ”œโ”€โ”€ class VoidCallback + โ”‚ โ”œโ”€โ”€ class WithPrivatePropertyInConstructor + โ”‚ โ”œโ”€โ”€ interface CalculatorProps + โ”‚ โ”œโ”€โ”€ interface ChildStruct982 + โ”‚ โ”œโ”€โ”€ interface ConfusingToJacksonStruct + โ”‚ โ”œโ”€โ”€ interface DeprecatedStruct + โ”‚ โ”œโ”€โ”€ interface DerivedStruct + โ”‚ โ”œโ”€โ”€ interface DiamondInheritanceBaseLevelStruct + โ”‚ โ”œโ”€โ”€ interface DiamondInheritanceFirstMidLevelStruct + โ”‚ โ”œโ”€โ”€ interface DiamondInheritanceSecondMidLevelStruct + โ”‚ โ”œโ”€โ”€ interface DiamondInheritanceTopLevelStruct + โ”‚ โ”œโ”€โ”€ interface EraseUndefinedHashValuesOptions + โ”‚ โ”œโ”€โ”€ interface ExperimentalStruct + โ”‚ โ”œโ”€โ”€ interface ExtendsInternalInterface + โ”‚ โ”œโ”€โ”€ interface ExternalStruct + โ”‚ โ”œโ”€โ”€ interface Greetee + โ”‚ โ”œโ”€โ”€ interface IAnonymousImplementationProvider + โ”‚ โ”œโ”€โ”€ interface IAnonymouslyImplementMe + โ”‚ โ”œโ”€โ”€ interface IAnotherPublicInterface + โ”‚ โ”œโ”€โ”€ interface IBell + โ”‚ โ”œโ”€โ”€ interface IBellRinger + โ”‚ โ”œโ”€โ”€ interface IConcreteBellRinger + โ”‚ โ”œโ”€โ”€ interface IDeprecatedInterface + โ”‚ โ”œโ”€โ”€ interface IExperimentalInterface + โ”‚ โ”œโ”€โ”€ interface IExtendsPrivateInterface + โ”‚ โ”œโ”€โ”€ interface IExternalInterface + โ”‚ โ”œโ”€โ”€ interface IFriendlier + โ”‚ โ”œโ”€โ”€ interface IFriendlyRandomGenerator + โ”‚ โ”œโ”€โ”€ interface IInterfaceImplementedByAbstractClass + โ”‚ โ”œโ”€โ”€ interface IInterfaceThatShouldNotBeADataType + โ”‚ โ”œโ”€โ”€ interface IInterfaceWithInternal + โ”‚ โ”œโ”€โ”€ interface IInterfaceWithMethods + โ”‚ โ”œโ”€โ”€ interface IInterfaceWithOptionalMethodArguments + โ”‚ โ”œโ”€โ”€ interface IInterfaceWithProperties + โ”‚ โ”œโ”€โ”€ interface IInterfaceWithPropertiesExtension + โ”‚ โ”œโ”€โ”€ interface IJSII417Derived + โ”‚ โ”œโ”€โ”€ interface IJSII417PublicBaseOfBase + โ”‚ โ”œโ”€โ”€ interface IJsii487External + โ”‚ โ”œโ”€โ”€ interface IJsii487External2 + โ”‚ โ”œโ”€โ”€ interface IJsii496 + โ”‚ โ”œโ”€โ”€ interface IMutableObjectLiteral + โ”‚ โ”œโ”€โ”€ interface INonInternalInterface + โ”‚ โ”œโ”€โ”€ interface IObjectWithProperty + โ”‚ โ”œโ”€โ”€ interface IOptionalMethod + โ”‚ โ”œโ”€โ”€ interface IPrivatelyImplemented + โ”‚ โ”œโ”€โ”€ interface IPublicInterface + โ”‚ โ”œโ”€โ”€ interface IPublicInterface2 + โ”‚ โ”œโ”€โ”€ interface IRandomNumberGenerator + โ”‚ โ”œโ”€โ”€ interface IReturnJsii976 + โ”‚ โ”œโ”€โ”€ interface IReturnsNumber + โ”‚ โ”œโ”€โ”€ interface IStableInterface + โ”‚ โ”œโ”€โ”€ interface IStructReturningDelegate + โ”‚ โ”œโ”€โ”€ interface IWallClock + โ”‚ โ”œโ”€โ”€ interface ImplictBaseOfBase + โ”‚ โ”œโ”€โ”€ interface PropBooleanValue + โ”‚ โ”œโ”€โ”€ interface PropProperty + โ”‚ โ”œโ”€โ”€ interface LevelOneProps + โ”‚ โ”œโ”€โ”€ interface LoadBalancedFargateServiceProps + โ”‚ โ”œโ”€โ”€ interface NestedStruct + โ”‚ โ”œโ”€โ”€ interface NullShouldBeTreatedAsUndefinedData + โ”‚ โ”œโ”€โ”€ interface OptionalStruct + โ”‚ โ”œโ”€โ”€ interface ParentStruct982 + โ”‚ โ”œโ”€โ”€ interface RootStruct + โ”‚ โ”œโ”€โ”€ interface SecondLevelStruct + โ”‚ โ”œโ”€โ”€ interface SmellyStruct + โ”‚ โ”œโ”€โ”€ interface StableStruct + โ”‚ โ”œโ”€โ”€ interface StructA + โ”‚ โ”œโ”€โ”€ interface StructB + โ”‚ โ”œโ”€โ”€ interface StructParameterType + โ”‚ โ”œโ”€โ”€ interface StructWithJavaReservedWords + โ”‚ โ”œโ”€โ”€ interface SupportsNiceJavaBuilderProps + โ”‚ โ”œโ”€โ”€ interface TopLevelStruct + โ”‚ โ”œโ”€โ”€ interface UnionProperties + โ”‚ โ”œโ”€โ”€ enum AllTypesEnum + โ”‚ โ”œโ”€โ”€ enum DeprecatedEnum + โ”‚ โ”œโ”€โ”€ enum ExperimentalEnum + โ”‚ โ”œโ”€โ”€ enum ExternalEnum + โ”‚ โ”œโ”€โ”€ enum SingletonIntEnum + โ”‚ โ”œโ”€โ”€ enum SingletonStringEnum + โ”‚ โ”œโ”€โ”€ enum StableEnum + โ”‚ โ””โ”€โ”€ enum StringEnum + โ”œโ”€โ”ฌ @scope/jsii-calc-base + โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”œโ”€โ”€ class Base + โ”‚ โ”œโ”€โ”€ class StaticConsumer + โ”‚ โ”œโ”€โ”€ interface BaseProps + โ”‚ โ””โ”€โ”€ interface IBaseInterface + โ”œโ”€โ”ฌ @scope/jsii-calc-base-of-base + โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”œโ”€โ”€ class StaticConsumer + โ”‚ โ”œโ”€โ”€ class Very + โ”‚ โ”œโ”€โ”€ interface IVeryBaseInterface + โ”‚ โ””โ”€โ”€ interface VeryBaseProps + โ””โ”€โ”ฌ @scope/jsii-calc-lib + โ”œโ”€โ”ฌ submodules + โ”‚ โ””โ”€โ”ฌ submodule + โ”‚ โ””โ”€โ”ฌ types + โ”‚ โ”œโ”€โ”€ class NestingClass + โ”‚ โ”œโ”€โ”€ class NestedClass + โ”‚ โ”œโ”€โ”€ class Reflector + โ”‚ โ”œโ”€โ”€ interface IReflectable + โ”‚ โ”œโ”€โ”€ interface NestedStruct + โ”‚ โ””โ”€โ”€ interface ReflectableEntry + โ””โ”€โ”ฌ types + โ”œโ”€โ”€ class Number + โ”œโ”€โ”€ class NumericValue + โ”œโ”€โ”€ class Operation + โ”œโ”€โ”€ interface IDoublable + โ”œโ”€โ”€ interface IFriendly + โ”œโ”€โ”€ interface IThreeLevelsInterface + โ”œโ”€โ”€ interface MyFirstStruct + โ”œโ”€โ”€ interface StructWithOnlyOptionals + โ””โ”€โ”€ enum EnumFromScopedModule +" +`; diff --git a/packages/jsii-reflect/test/__snapshots__/type-system.test.js.snap b/packages/jsii-reflect/test/__snapshots__/type-system.test.ts.snap similarity index 97% rename from packages/jsii-reflect/test/__snapshots__/type-system.test.js.snap rename to packages/jsii-reflect/test/__snapshots__/type-system.test.ts.snap index 315b769a2d..592faa8acb 100644 --- a/packages/jsii-reflect/test/__snapshots__/type-system.test.js.snap +++ b/packages/jsii-reflect/test/__snapshots__/type-system.test.ts.snap @@ -14,6 +14,7 @@ Array [ "@scope/jsii-calc-base-of-base.StaticConsumer", "@scope/jsii-calc-base-of-base.Very", "@scope/jsii-calc-base.Base", + "@scope/jsii-calc-base.StaticConsumer", "@scope/jsii-calc-lib.Number", "@scope/jsii-calc-lib.NumericValue", "@scope/jsii-calc-lib.Operation", @@ -125,6 +126,8 @@ Array [ "jsii-calc.SomeTypeJsii976", "jsii-calc.StableClass", "jsii-calc.StaticContext", + "jsii-calc.StaticHelloChild", + "jsii-calc.StaticHelloParent", "jsii-calc.Statics", "jsii-calc.StripInternal", "jsii-calc.StructPassing", @@ -151,6 +154,7 @@ Array [ "jsii-calc.submodule.child.OuterClass", "jsii-calc.submodule.isolated.Kwargs", "jsii-calc.submodule.nested_submodule.Namespaced", + "jsii-calc.submodule.returnsparam.ReturnsSpecialParameter", ] `; diff --git a/packages/jsii-reflect/test/independent.test.ts b/packages/jsii-reflect/test/independent.test.ts index 2a42042fe7..14f5822f36 100644 --- a/packages/jsii-reflect/test/independent.test.ts +++ b/packages/jsii-reflect/test/independent.test.ts @@ -1,4 +1,5 @@ import { PackageInfo, sourceToAssemblyHelper } from 'jsii'; + import * as reflect from '../lib'; test('get full github source location for a class or method', async () => { @@ -18,6 +19,10 @@ test('get full github source location for a class or method', async () => { const klass = assembly.findType('testpkg.Foo'); expect(klass.isClassType).toBeTruthy(); + expect(reflect.repositoryUrl(klass, 'main')).toBe( + 'https://github.com/aws/jsii/blob/main/some/sub/dir/index.ts#L1', + ); + expect(reflect.repositoryUrl(klass)).toBe( 'https://github.com/aws/jsii/blob/master/some/sub/dir/index.ts#L1', ); diff --git a/packages/jsii-reflect/test/tree.test.ts b/packages/jsii-reflect/test/tree.test.ts new file mode 100644 index 0000000000..6c28171755 --- /dev/null +++ b/packages/jsii-reflect/test/tree.test.ts @@ -0,0 +1,80 @@ +import { Printer } from 'oo-ascii-tree'; +import { dirname } from 'path'; + +import { TypeSystemTree } from '../lib/tree'; +import { TypeSystem } from '../lib/type-system'; + +const typeSystem = new TypeSystem(); + +beforeAll(() => + typeSystem.loadModule(dirname(require.resolve('jsii-calc/package.json'))), +); + +test('defaults', () => { + const stream = new StringWriter(); + new TypeSystemTree(typeSystem, { colors: false }).printTree(stream); + expect(stream.stringContent).toMatchSnapshot(); +}); + +test('showAll', () => { + const stream = new StringWriter(); + new TypeSystemTree(typeSystem, { colors: false, showAll: true }).printTree( + stream, + ); + expect(stream.stringContent).toMatchSnapshot(); +}); + +test('types', () => { + const stream = new StringWriter(); + new TypeSystemTree(typeSystem, { colors: false, types: true }).printTree( + stream, + ); + expect(stream.stringContent).toMatchSnapshot(); +}); + +test('members', () => { + const stream = new StringWriter(); + new TypeSystemTree(typeSystem, { colors: false, members: true }).printTree( + stream, + ); + expect(stream.stringContent).toMatchSnapshot(); +}); + +test('inheritance', () => { + const stream = new StringWriter(); + new TypeSystemTree(typeSystem, { + colors: false, + inheritance: true, + }).printTree(stream); + expect(stream.stringContent).toMatchSnapshot(); +}); + +test('signatures', () => { + const stream = new StringWriter(); + new TypeSystemTree(typeSystem, { colors: false, signatures: true }).printTree( + stream, + ); + expect(stream.stringContent).toMatchSnapshot(); +}); + +class StringWriter implements Printer { + private buffer: Buffer = Buffer.alloc(0); + + public write(buffer: Buffer | string, cb?: () => void): boolean; + public write(str: string, encoding?: string, cb?: () => void): boolean; + public write( + chunk: Buffer | string, + _encoding?: string | (() => void), + cb?: () => void, + ): boolean { + this.buffer = Buffer.concat([this.buffer, Buffer.from(chunk)]); + if (cb != null) { + cb(); + } + return true; + } + + public get stringContent(): string { + return this.buffer.toString('utf-8'); + } +} diff --git a/packages/jsii-reflect/test/type-system.test.ts b/packages/jsii-reflect/test/type-system.test.ts index e3e04a7567..57d361a3d2 100644 --- a/packages/jsii-reflect/test/type-system.test.ts +++ b/packages/jsii-reflect/test/type-system.test.ts @@ -1,6 +1,7 @@ import * as spec from '@jsii/spec'; import { Stability } from '@jsii/spec'; import * as path from 'path'; + import { TypeSystem } from '../lib'; import { typeSystemFromSource } from './util'; @@ -181,6 +182,27 @@ describe('@deprecated', () => { }); }); +/** + * This test is actually testing the combination of `jsii`, `jsii-calc` and `jsii-reflect`. + */ +test('Submodules can have a README', () => { + const jsiiCalc = typesys.findAssembly('jsii-calc'); + + const submodule = jsiiCalc.submodules.find( + (m) => m.fqn === 'jsii-calc.submodule', + ); + const isolated = submodule?.submodules.find( + (m) => m.fqn === 'jsii-calc.submodule.isolated', + ); + + expect(submodule?.readme?.markdown).toMatch( + /This is the readme.*jsii-calc.submodule/, + ); + expect(isolated?.readme?.markdown).toMatch( + /This is the readme.*jsii-calc.submodule.isolated/, + ); +}); + test('overridden member knows about both parent types', async () => { const ts = await typeSystemFromSource(` export class Foo { diff --git a/packages/jsii-reflect/test/util.ts b/packages/jsii-reflect/test/util.ts index d89bcf7900..0ceda68ff4 100644 --- a/packages/jsii-reflect/test/util.ts +++ b/packages/jsii-reflect/test/util.ts @@ -1,4 +1,5 @@ import { sourceToAssemblyHelper } from 'jsii/lib/helpers'; + import { Assembly, TypeSystem } from '../lib'; export async function typeSystemFromSource(source: string) { diff --git a/packages/jsii-reflect/tsconfig.json b/packages/jsii-reflect/tsconfig.json index 869dde14b6..0f4eb61227 100644 --- a/packages/jsii-reflect/tsconfig.json +++ b/packages/jsii-reflect/tsconfig.json @@ -1,9 +1,10 @@ { "extends": "../../tsconfig-base", "include": ["**/*.ts"], + "exclude": ["jest.config.ts"], "references": [ { "path": "../jsii" }, { "path": "../@jsii/spec" }, - { "path": "../oo-ascii-tree" } + { "path": "../oo-ascii-tree" }, ] } diff --git a/packages/jsii-rosetta/README.md b/packages/jsii-rosetta/README.md index d6e541102a..6c242b4864 100644 --- a/packages/jsii-rosetta/README.md +++ b/packages/jsii-rosetta/README.md @@ -1,82 +1,95 @@ # jsii-rosetta: a transpiler for code samples -Utility to transcribe example code snippets from TypeScript to other -jsii languages. +Utility to transcribe example code snippets from TypeScript to other jsii languages. -Has knowledge about jsii language translation conventions to do the -translations. Only supports a limited set of TypeScript language features. +Has knowledge about jsii language translation conventions to do the translations. Only supports a limited set of +TypeScript language features. ## Compilability -The translator can translate both code that completely compiles and typechecks, -as well as code that doesn't. +The translator can translate both code that completely compiles and typechecks, as well as code that doesn't. -In case of non-compiling samples the translations will be based off of -grammatical parsing only. This has the downside that we do not have the type -information available to the exact right thing in all instances. +In case of non-compiling samples the translations will be based off of grammatical parsing only. This has the downside +that we do not have the type information available to the exact right thing in all instances. If the samples don't compile or don't have full type information: - No way to declare typed variables for Java and C#. -- Can only "see" the fields of structs as far as they are declared in the same - snippet. Inherited fields or structs declared not in the same snippet are - invisible. -- When we explode a struct parameter into keyword parameters and we pass it on - to another callable, we can't know which keyword arguments the called function - actually takes so we just pass all of them (might be too many). -- When structs contain nested structs, Python and other languages need to know - the types of these fields to generate the right calls. -- Object literals are used both to represent structs as well as to represent - dictionaries, and without type information it's impossible to determine - which is which. +- Can only "see" the fields of structs as far as they are declared in the same snippet. Inherited fields or structs + declared not in the same snippet are invisible. +- When we explode a struct parameter into keyword parameters and we pass it on to another callable, we can't know which + keyword arguments the called function actually takes so we just pass all of them (might be too many). +- When structs contain nested structs, Python and other languages need to know the types of these fields to generate the + right calls. +- Object literals are used both to represent structs as well as to represent dictionaries, and without type information + it's impossible to determine which is which. + +### Enforcing Compilability + +Package owners can enable enforcement of compiling code sample by setting the `jsii.rosetta.strict` assembly metadata +entry to `true`: + +```js +/// package.json +{ + // ... + "jsii": { + // ... + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } + // ... + }, + // ... +} +``` + +This effectively enables the `--strict` option (which is equivalent to setting `--compile` and `--fail`, causing +`jsii-rosetta` to exit in error if any code sample fails to compile) when translating code samples from the assembly. ## Hiding code from samples -In order to make examples compile, boilerplate code may need to be added -that detracts from the example at hand (such as variable declarations -and imports). +In order to make examples compile, boilerplate code may need to be added that detracts from the example at hand (such as +variable declarations and imports). -This package supports hiding parts of the original source after -translation. +This package supports hiding parts of the original source after translation. To mark special locations in the source tree, we can use one of three mechanisms: -* Use a `void` expression statement to mark statement locations in the AST. -* Use the `comma` operator combined with a `void` expression to mark expression - locations in the AST. -* Use special directive comments (`/// !hide`, `/// !show`) to mark locations - that span AST nodes. This is less reliable (because the source location of - translated syntax sometimes will have to be estimated) but the only option if - you want to mark non-contiguous nodes (such as hide part of a class - declaration but show statements inside the constructor). +- Use a `void` expression statement to mark statement locations in the AST. +- Use the `comma` operator combined with a `void` expression to mark expression locations in the AST. +- Use special directive comments (`/// !hide`, `/// !show`) to mark locations that span AST nodes. This is less reliable + (because the source location of translated syntax sometimes will have to be estimated) but the only option if you want + to mark non-contiguous nodes (such as hide part of a class declaration but show statements inside the constructor). -The `void` expression keyword and or the `comma` operator feature are -little-used JavaScript features that are reliably parsed by TypeScript and do -not affect the semantics of the application in which they appear (so the program -executes the same with or without them). +The `void` expression keyword and or the `comma` operator feature are little-used JavaScript features that are reliably +parsed by TypeScript and do not affect the semantics of the application in which they appear (so the program executes +the same with or without them). -A handy mnemonic for this feature is that you can use it to "send your -code into the void". +A handy mnemonic for this feature is that you can use it to "send your code into the void". ### Hiding statements Statement hiding looks like this: ```ts -before(); // will be shown +before(); // will be shown -void 0; // start hiding (the argument to 'void' doesn't matter) -middle(); // will not be shown +void 0; // start hiding (the argument to 'void' doesn't matter) +middle(); // will not be shown void 'show'; // stop hiding -after(); // will be shown again +after(); // will be shown again ``` ### Hiding expressions -For hiding expressions, we use `comma` expressions to attach a `void` -statement to an expression value without changing the meaning of the -code. +For hiding expressions, we use `comma` expressions to attach a `void` statement to an expression value without changing +the meaning of the code. Example: @@ -118,30 +131,28 @@ after(); ## Fixtures -To avoid having to repeat common setup every time, code samples can use -"fixtures": a source template where the example is inserted. A fixture -must contain the text `/// here` and may look like this: +To avoid having to repeat common setup every time, code samples can use "fixtures": a source template where the example +is inserted. A fixture must contain the text `/// here` and may look like this: ```ts const module = require('@some/dependency'); class MyClass { - constructor() { - const obj = new MyObject(); + constructor() { + const obj = new MyObject(); - /// here - } + /// here + } } ``` -The example will be inserted at the location marked as `/// here` and -will have access to `module`, `obj` and `this`. +The example will be inserted at the location marked as `/// here` and will have access to `module`, `obj` and `this`. +Any `import` statements found in the example will automatically be hoisted at the top of the fixture, where they are +guaranteed to be syntactically valid. -The default file loaded as a fixture is called `rosetta/default.ts-fixture` -in the package directory (if it exists). +The default file loaded as a fixture is called `rosetta/default.ts-fixture` in the package directory (if it exists). -Examples can request an alternative fixture by specifying a `fixture` parameter -as part of the code block fence: +Examples can request an alternative fixture by specifying a `fixture` parameter as part of the code block fence: ` ` `ts fixture=some-fixture ... @@ -150,23 +161,18 @@ Or opt out of using the default fixture by specifying `nofixture`. ## Build integration -Because we want to control the compilation environment when compiling examples, -extracting and compiling all samples can be run as an external build step in a -monorepo. This allows you to set up an environment with all desired packages and +Because we want to control the compilation environment when compiling examples, extracting and compiling all samples can +be run as an external build step in a monorepo. This allows you to set up an environment with all desired packages and compile all samples in one go. -The `jsii-rosetta extract` command will take one or more jsii assemblies, -extract the snippets from them, will try to compile them with respect to a -given home directory, and finally store all translations in something called -a "tablet" (which is a lookup map from the original snippet to all of its -translations). +The `jsii-rosetta extract` command will take one or more jsii assemblies, extract the snippets from them, will try to +compile them with respect to a given home directory, and finally store all translations in something called a "tablet" +(which is a lookup map from the original snippet to all of its translations). -A translation tablet will automatically be used by `jsii-pacmak` if present, so -it can subsitute the translated examples into the converted source code when -writing out the converted code. When not given a tablet, `jsii-pacmak` can still -live-convert samples, but you will not have the fine control over the -compilation environment that you would have if you were to use the `extract` -command. +A translation tablet will automatically be used by `jsii-pacmak` if present, so it can subsitute the translated examples +into the converted source code when writing out the converted code. When not given a tablet, `jsii-pacmak` can still +live-convert samples, but you will not have the fine control over the compilation environment that you would have if you +were to use the `extract` command. Works like this: @@ -175,18 +181,15 @@ $ jsii-rosetta extract --compile $(find . -name .jsii) --directory some/dir $ jsii-pacmak --samples-tablet .jsii-samples.tbl ``` -(The `extract` command is the default and may be omitted, but if you're passing -assembliess as arguments you should terminate the option list by passing `--`). +(The `extract` command is the default and may be omitted, but if you're passing assembliess as arguments you should +terminate the option list by passing `--`). ### Running in parallel -Since TypeScript compilation takes a lot of time, much time can be gained -by using the CPUs in your system effectively. `jsii-rosetta extract` will -run the compilations in parallel if support for NodeJS Worker Threads is -detected. +Since TypeScript compilation takes a lot of time, much time can be gained by using the CPUs in your system effectively. +`jsii-rosetta extract` will run the compilations in parallel if support for NodeJS Worker Threads is detected. -Worker threads are enabled by default on NodeJS 12.x, and can be enabled on -NodeJS 10.x by using a flag: +Worker threads are enabled by default on NodeJS 12.x, and can be enabled on NodeJS 10.x by using a flag: ``` $ node --experimental-worker /path/to/jsii-rosetta extract ... diff --git a/packages/jsii-rosetta/bin/jsii-rosetta.ts b/packages/jsii-rosetta/bin/jsii-rosetta.ts index 7f22ad1920..173585d811 100644 --- a/packages/jsii-rosetta/bin/jsii-rosetta.ts +++ b/packages/jsii-rosetta/bin/jsii-rosetta.ts @@ -1,17 +1,18 @@ import * as fs from 'fs-extra'; +import * as path from 'path'; import * as yargs from 'yargs'; + import { TranslateResult, DEFAULT_TABLET_NAME, translateTypeScript, } from '../lib'; +import { translateMarkdown } from '../lib/commands/convert'; +import { extractSnippets } from '../lib/commands/extract'; +import { readTablet } from '../lib/commands/read'; import { PythonVisitor } from '../lib/languages/python'; import { VisualizeAstVisitor } from '../lib/languages/visualize'; -import { extractSnippets } from '../lib/commands/extract'; import * as logging from '../lib/logging'; -import * as path from 'path'; -import { readTablet } from '../lib/commands/read'; -import { translateMarkdown } from '../lib/commands/convert'; import { File, printDiagnostics, isErrorDiagnostic } from '../lib/util'; function main() { @@ -107,8 +108,28 @@ function main() { type: 'boolean', describe: 'Fail if there are compilation errors', default: false, + }) + .option('validate-assemblies', { + type: 'boolean', + describe: + 'Whether to validate loaded assemblies or not (this can be slow)', + default: false, + }) + .option('strict', { + alias: 'S', + type: 'boolean', + describe: + 'Require all code samples compile, and fail if one does not. Strict mode always enables --compile and --fail', + default: false, }), wrapHandler(async (args) => { + // `--strict` is short for `--compile --fail`, and we'll override those even if they're set to `false`, such as + // using `--no-(compile|fail)`, because yargs does not quite give us a better option that does not hurt CX. + if (args.strict) { + args.compile = args.c = true; + args.fail = args.f = true; + } + // Easiest way to get a fixed working directory (for sources) in is to // chdir, since underneath the in-memory layer we're using a regular TS // compilerhost. Have to make all file references absolute before we chdir @@ -124,7 +145,8 @@ function main() { const result = await extractSnippets(absAssemblies, { outputFile: absOutput, - includeCompilerDiagnostics: args.compile, + includeCompilerDiagnostics: !!args.compile, + validateAssemblies: args['validate-assemblies'], only: args.include, }); @@ -136,8 +158,12 @@ function main() { ); } - if (result.diagnostics.some(isErrorDiagnostic) && args.fail) { - process.exit(1); + if ( + result.diagnostics.some((diag) => + isErrorDiagnostic(diag, { onlyStrict: !args.fail }), + ) + ) { + process.exitCode = 1; } }), ) @@ -164,6 +190,42 @@ function main() { await readTablet(args.TABLET, args.KEY, args.LANGUAGE); }), ) + .command( + 'configure-strict [PACKAGE]', + "Enables strict mode for a package's assembly", + (command) => + command.positional('PACKAGE', { + type: 'string', + describe: 'The path to the package to configure', + required: false, + default: '.', + normalize: true, + }), + wrapHandler(async (args) => { + const packageJsonPath = (await fs.stat(args.PACKAGE)).isDirectory() + ? path.join(args.PACKAGE, 'package.json') + : args.PACKAGE; + const packageJson = await fs.readJson(packageJsonPath); + if (packageJson.jsii == null) { + console.error( + `The package in ${args.PACKAGE} does not have a jsii configuration! You can set it up using jsii-config.`, + ); + process.exitCode = 1; + return Promise.resolve(); + } + if (packageJson.jsii.metadata?.jsii?.rosetta?.strict) { + // Nothing to do - it's already configured, so we assert idempotent success! + return Promise.resolve(); + } + const md = (packageJson.jsii.metadata = + packageJson.jsii.metadata ?? {}); + const mdJsii = (md.jsii = md.jsii ?? {}); + const mdRosetta = (mdJsii.rosetta = mdJsii.rosetta ?? {}); + mdRosetta.strict = true; + + return fs.writeJson(packageJsonPath, packageJson, { spaces: 2 }); + }), + ) .demandCommand() .help() .strict() // Error on wrong command @@ -240,7 +302,11 @@ function renderResult(result: TranslateResult) { if (result.diagnostics.length > 0) { printDiagnostics(result.diagnostics, process.stderr); - if (result.diagnostics.some(isErrorDiagnostic)) { + if ( + result.diagnostics.some((diag) => + isErrorDiagnostic(diag, { onlyStrict: false }), + ) + ) { process.exit(1); } } diff --git a/packages/jsii-rosetta/jest.config.ts b/packages/jsii-rosetta/jest.config.ts new file mode 100644 index 0000000000..e37577d92f --- /dev/null +++ b/packages/jsii-rosetta/jest.config.ts @@ -0,0 +1,3 @@ +import config from '../../jest.config'; + +export default config; diff --git a/packages/jsii-rosetta/lib/commands/convert.ts b/packages/jsii-rosetta/lib/commands/convert.ts index 91dcd2fef9..6bcdae41e3 100644 --- a/packages/jsii-rosetta/lib/commands/convert.ts +++ b/packages/jsii-rosetta/lib/commands/convert.ts @@ -1,36 +1,45 @@ +import { transformMarkdown } from '../markdown/markdown'; +import { MarkdownRenderer } from '../markdown/markdown-renderer'; +import { ReplaceTypeScriptTransform } from '../markdown/replace-typescript-transform'; import { AstHandler, AstRendererOptions } from '../renderer'; import { TranslateResult, Translator } from '../translate'; -import { MarkdownRenderer } from '../markdown/markdown-renderer'; -import { transformMarkdown } from '../markdown/markdown'; import { File } from '../util'; -import { ReplaceTypeScriptTransform } from '../markdown/replace-typescript-transform'; export interface TranslateMarkdownOptions extends AstRendererOptions { /** * What language to put in the returned markdown blocks */ languageIdentifier?: string; + + /** + * Whether to operate in `strict` mode or not. + */ + strict?: boolean; } export function translateMarkdown( markdown: File, visitor: AstHandler, - options: TranslateMarkdownOptions = {}, + opts: TranslateMarkdownOptions = {}, ): TranslateResult { const translator = new Translator(false); const translatedMarkdown = transformMarkdown( markdown.contents, new MarkdownRenderer(), - new ReplaceTypeScriptTransform(markdown.fileName, (tsSnippet) => { - const translated = translator - .translatorFor(tsSnippet) - .renderUsing(visitor); - return { - language: options.languageIdentifier ?? '', - source: translated, - }; - }), + new ReplaceTypeScriptTransform( + markdown.fileName, + opts.strict ?? false, + (tsSnippet) => { + const translated = translator + .translatorFor(tsSnippet) + .renderUsing(visitor); + return { + language: opts.languageIdentifier ?? '', + source: translated, + }; + }, + ), ); return { diff --git a/packages/jsii-rosetta/lib/commands/extract.ts b/packages/jsii-rosetta/lib/commands/extract.ts index 5459536241..0e767b3609 100644 --- a/packages/jsii-rosetta/lib/commands/extract.ts +++ b/packages/jsii-rosetta/lib/commands/extract.ts @@ -1,13 +1,14 @@ -import { loadAssemblies, allTypeScriptSnippets } from '../jsii/assemblies'; -import * as logging from '../logging'; import * as os from 'os'; import * as path from 'path'; import * as ts from 'typescript'; + +import { loadAssemblies, allTypeScriptSnippets } from '../jsii/assemblies'; +import * as logging from '../logging'; +import { TypeScriptSnippet } from '../snippet'; +import { snippetKey } from '../tablets/key'; import { LanguageTablet, TranslatedSnippet } from '../tablets/tablets'; import { Translator } from '../translate'; -import { TypeScriptSnippet } from '../snippet'; import { divideEvenly } from '../util'; -import { snippetKey } from '../tablets/key'; export interface ExtractResult { diagnostics: ts.Diagnostic[]; @@ -17,6 +18,7 @@ export interface ExtractResult { export interface ExtractOptions { outputFile: string; includeCompilerDiagnostics: boolean; + validateAssemblies: boolean; only?: string[]; } @@ -27,10 +29,13 @@ export async function extractSnippets( assemblyLocations: string[], options: ExtractOptions, ): Promise { - const only = options.only || []; + const only = options.only ?? []; logging.info(`Loading ${assemblyLocations.length} assemblies`); - const assemblies = await loadAssemblies(assemblyLocations); + const assemblies = await loadAssemblies( + assemblyLocations, + options.validateAssemblies, + ); let snippets = allTypeScriptSnippets(assemblies); if (only.length > 0) { @@ -94,7 +99,7 @@ async function translateAll( try { const worker = await import('worker_threads'); - return workerBasedTranslateAll( + return await workerBasedTranslateAll( worker, snippets, includeCompilerDiagnostics, diff --git a/packages/jsii-rosetta/lib/commands/extract_worker.ts b/packages/jsii-rosetta/lib/commands/extract_worker.ts index 4e556808a8..d351df9d31 100644 --- a/packages/jsii-rosetta/lib/commands/extract_worker.ts +++ b/packages/jsii-rosetta/lib/commands/extract_worker.ts @@ -1,11 +1,12 @@ /** * Pool worker for extract.ts */ -import { TypeScriptSnippet } from '../snippet'; import * as ts from 'typescript'; -import { singleThreadedTranslateAll } from './extract'; import * as worker from 'worker_threads'; + +import { TypeScriptSnippet } from '../snippet'; import { TranslatedSnippetSchema } from '../tablets/schema'; +import { singleThreadedTranslateAll } from './extract'; export interface TranslateRequest { includeCompilerDiagnostics: boolean; diff --git a/packages/jsii-rosetta/lib/commands/read.ts b/packages/jsii-rosetta/lib/commands/read.ts index 5a99aba775..8b5268b30f 100644 --- a/packages/jsii-rosetta/lib/commands/read.ts +++ b/packages/jsii-rosetta/lib/commands/read.ts @@ -1,9 +1,9 @@ +import { TargetLanguage } from '../languages'; import { LanguageTablet, TranslatedSnippet, Translation, } from '../tablets/tablets'; -import { TargetLanguage } from '../languages'; export async function readTablet( tabletFile: string, diff --git a/packages/jsii-rosetta/lib/fixtures.ts b/packages/jsii-rosetta/lib/fixtures.ts index 83ed3d5d7e..837e987349 100644 --- a/packages/jsii-rosetta/lib/fixtures.ts +++ b/packages/jsii-rosetta/lib/fixtures.ts @@ -1,5 +1,12 @@ import * as fs from 'fs-extra'; import * as path from 'path'; +import { + createSourceFile, + ScriptKind, + ScriptTarget, + SyntaxKind, +} from 'typescript'; + import { TypeScriptSnippet, SnippetParameters } from './snippet'; /** @@ -74,10 +81,71 @@ function loadAndSubFixture( encoding: 'utf-8', }); - const subRegex = /\/\/\/ here/i; + const subRegex = /[/]{3}[ \t]*here[ \t]*$/im; if (!subRegex.test(fixtureContents)) { throw new Error(`Fixture does not contain '/// here': ${fixtureFileName}`); } - return fixtureContents.replace(subRegex, `/// !show\n${source}\n/// !hide`); + const { imports, statements } = sidelineImports(source); + const show = '/// !show'; + const hide = '/// !hide'; + + const result = fixtureContents.replace( + subRegex, + [ + '// Code snippet begins after !show marker below', + show, + statements, + hide, + '// Code snippet ended before !hide marker above', + ].join('\n'), + ); + + return imports + ? [ + '// Hoisted imports begin after !show marker below', + show, + imports, + hide, + '// Hoisted imports ended before !hide marker above', + result, + ].join('\n') + : result; +} + +/** + * When embedding code fragments in a fixture, "import" statements must be + * hoisted up to the top of the resulting document, as TypeScript only allows + * those to be present in the top-level context of an ESM. + * + * @param source a block of TypeScript source + * + * @returns an object containing the import statements on one end, and the rest + * on the other hand. + */ +function sidelineImports( + source: string, +): { imports: string; statements: string } { + let imports = ''; + let statements = ''; + + const sourceFile = createSourceFile( + 'index.ts', + source, + ScriptTarget.Latest, + true, + ScriptKind.TS, + ); + for (const statement of sourceFile.statements) { + switch (statement.kind) { + case SyntaxKind.ImportDeclaration: + case SyntaxKind.ImportEqualsDeclaration: + imports += statement.getFullText(sourceFile); + break; + default: + statements += statement.getFullText(sourceFile); + } + } + + return { imports, statements }; } diff --git a/packages/jsii-rosetta/lib/index.ts b/packages/jsii-rosetta/lib/index.ts index 8576ed0412..428e2f272f 100644 --- a/packages/jsii-rosetta/lib/index.ts +++ b/packages/jsii-rosetta/lib/index.ts @@ -1,8 +1,10 @@ export * from './translate'; export { renderTree } from './o-tree'; +export { CSharpVisitor } from './languages/csharp'; export { JavaVisitor } from './languages/java'; export { PythonVisitor } from './languages/python'; export * from './tablets/tablets'; export * from './rosetta'; export * from './snippet'; export * from './markdown'; +export * from './strict'; diff --git a/packages/jsii-rosetta/lib/jsii/assemblies.ts b/packages/jsii-rosetta/lib/jsii/assemblies.ts index b0fa14104c..7221a8772e 100644 --- a/packages/jsii-rosetta/lib/jsii/assemblies.ts +++ b/packages/jsii-rosetta/lib/jsii/assemblies.ts @@ -1,14 +1,16 @@ import * as spec from '@jsii/spec'; import * as fs from 'fs-extra'; import * as path from 'path'; + +import { fixturize } from '../fixtures'; +import { extractTypescriptSnippetsFromMarkdown } from '../markdown/extract-snippets'; import { TypeScriptSnippet, typeScriptSnippetFromSource, updateParameters, SnippetParameters, } from '../snippet'; -import { extractTypescriptSnippetsFromMarkdown } from '../markdown/extract-snippets'; -import { fixturize } from '../fixtures'; +import { enforcesStrictMode } from '../strict'; export interface LoadedAssembly { assembly: spec.Assembly; @@ -18,28 +20,32 @@ export interface LoadedAssembly { /** * Load assemblies by filename or directory */ -export async function loadAssemblies(assemblyLocations: string[]) { - const ret: LoadedAssembly[] = []; - for (const loc of assemblyLocations) { - const stat = await fs.stat(loc); // eslint-disable-line no-await-in-loop +export async function loadAssemblies( + assemblyLocations: readonly string[], + validateAssemblies: boolean, +): Promise { + return Promise.all(assemblyLocations.map(loadAssembly)); + + async function loadAssembly(location: string): Promise { + const stat = await fs.stat(location); if (stat.isDirectory()) { - ret.push({ - assembly: await loadAssemblyFromFile(path.join(loc, '.jsii')), // eslint-disable-line no-await-in-loop - directory: loc, - }); - } else { - ret.push({ - assembly: await loadAssemblyFromFile(loc), // eslint-disable-line no-await-in-loop - directory: path.dirname(loc), - }); + return loadAssembly(path.join(location, '.jsii')); } + return { + assembly: await loadAssemblyFromFile(location, validateAssemblies), + directory: path.dirname(location), + }; } - return ret; } -async function loadAssemblyFromFile(filename: string) { +async function loadAssemblyFromFile( + filename: string, + validate: boolean, +): Promise { const contents = await fs.readJSON(filename, { encoding: 'utf-8' }); - return spec.validateAssembly(contents); + return validate + ? spec.validateAssembly(contents) + : (contents as spec.Assembly); } export type AssemblySnippetSource = @@ -115,16 +121,17 @@ function removeSlashes(x: string) { } export function* allTypeScriptSnippets( - assemblies: Array<{ assembly: spec.Assembly; directory: string }>, + assemblies: readonly LoadedAssembly[], ): IterableIterator { - for (const assembly of assemblies) { - for (const source of allSnippetSources(assembly.assembly)) { + for (const { assembly, directory } of assemblies) { + const strict = enforcesStrictMode(assembly); + for (const source of allSnippetSources(assembly)) { switch (source.type) { case 'literal': const snippet = updateParameters( - typeScriptSnippetFromSource(source.source, source.where), + typeScriptSnippetFromSource(source.source, source.where, strict), { - [SnippetParameters.$PROJECT_DIRECTORY]: assembly.directory, + [SnippetParameters.$PROJECT_DIRECTORY]: directory, }, ); yield fixturize(snippet); @@ -133,9 +140,10 @@ export function* allTypeScriptSnippets( for (const snippet of extractTypescriptSnippetsFromMarkdown( source.markdown, source.where, + strict, )) { const withDirectory = updateParameters(snippet, { - [SnippetParameters.$PROJECT_DIRECTORY]: assembly.directory, + [SnippetParameters.$PROJECT_DIRECTORY]: directory, }); yield fixturize(withDirectory); } diff --git a/packages/jsii-rosetta/lib/jsii/jsii-utils.ts b/packages/jsii-rosetta/lib/jsii/jsii-utils.ts index 3a9704e4ec..dd641fd305 100644 --- a/packages/jsii-rosetta/lib/jsii/jsii-utils.ts +++ b/packages/jsii-rosetta/lib/jsii/jsii-utils.ts @@ -1,4 +1,5 @@ import * as ts from 'typescript'; + import { AstRenderer } from '../renderer'; import { typeContainsUndefined } from '../typescript/types'; diff --git a/packages/jsii-rosetta/lib/languages/csharp.ts b/packages/jsii-rosetta/lib/languages/csharp.ts index 0b27df59b6..88e1bf8baf 100644 --- a/packages/jsii-rosetta/lib/languages/csharp.ts +++ b/packages/jsii-rosetta/lib/languages/csharp.ts @@ -1,16 +1,8 @@ import * as ts from 'typescript'; -import { DefaultVisitor } from './default'; -import { AstRenderer, nimpl } from '../renderer'; + +import { jsiiTargetParam } from '../jsii/packages'; import { OTree, NO_SYNTAX } from '../o-tree'; -import { - typeWithoutUndefinedUnion, - builtInTypeName, - typeContainsUndefined, - parameterAcceptsUndefined, - mapElementType, - inferMapElementType, -} from '../typescript/types'; -import { flat, partition, setExtend } from '../util'; +import { AstRenderer, nimpl } from '../renderer'; import { matchAst, nodeOfType, @@ -21,7 +13,16 @@ import { privatePropertyNames, } from '../typescript/ast-utils'; import { ImportStatement } from '../typescript/imports'; -import { jsiiTargetParam } from '../jsii/packages'; +import { + typeWithoutUndefinedUnion, + builtInTypeName, + typeContainsUndefined, + parameterAcceptsUndefined, + mapElementType, + inferMapElementType, +} from '../typescript/types'; +import { flat, partition, setExtend } from '../util'; +import { DefaultVisitor } from './default'; interface CSharpLanguageContext { /** @@ -108,7 +109,7 @@ export class CSharpVisitor extends DefaultVisitor { } public identifier( - node: ts.Identifier | ts.StringLiteral, + node: ts.Identifier | ts.StringLiteral | ts.NoSubstitutionTemplateLiteral, renderer: CSharpRenderer, ) { let text = node.text; @@ -217,7 +218,7 @@ export class CSharpVisitor extends DefaultVisitor { opts: { isConstructor?: boolean } = {}, ): OTree { const methodName = opts.isConstructor - ? renderer.currentContext.currentClassName || 'MyClass' + ? renderer.currentContext.currentClassName ?? 'MyClass' : renderer.updateContext({ propertyOrMethod: true }).convert(node.name); const returnType = opts.isConstructor ? '' @@ -338,12 +339,16 @@ export class CSharpVisitor extends DefaultVisitor { } public stringLiteral( - node: ts.StringLiteral, + node: ts.StringLiteral | ts.NoSubstitutionTemplateLiteral, renderer: CSharpRenderer, ): OTree { if (renderer.currentContext.stringAsIdentifier) { return this.identifier(node, renderer); } + if (node.text.includes('\n')) { + // Multi-line string literals (@"string") in C# do not do escaping. Only " needs to be doubled. + return new OTree(['@"', node.text.replace(/"/g, '""'), '"']); + } return new OTree([JSON.stringify(node.text)]); } @@ -611,7 +616,7 @@ export class CSharpVisitor extends DefaultVisitor { renderer .updateContext({ propertyOrMethod: false, - identifierAsString: true, + identifierAsString: !ts.isComputedPropertyName(key), }) .convert(key), ', ', @@ -739,19 +744,32 @@ export class CSharpVisitor extends DefaultVisitor { node: ts.TemplateExpression, context: CSharpRenderer, ): OTree { - const parts = ['$"']; + // If this is a multi-line string literal, we need not quote much, as @"string" literals in C# + // do not perform any quoting. The literal quotes in the text however must be doubled. + const isMultiLine = + !!node.head.rawText?.includes('\n') || + node.templateSpans.some((span) => span.literal.rawText?.includes('\n')); + + const parts = new Array(); if (node.head.rawText) { - parts.push(quoteStringLiteral(node.head.rawText)); + parts.push( + isMultiLine + ? node.head.rawText.replace(/"/g, '""') + : quoteStringLiteral(node.head.rawText), + ); } for (const span of node.templateSpans) { parts.push(`{${context.textOf(span.expression)}}`); if (span.literal.rawText) { - parts.push(quoteStringLiteral(span.literal.rawText)); + parts.push( + isMultiLine + ? span.literal.rawText.replace(/"/g, '""') + : quoteStringLiteral(span.literal.rawText), + ); } } - parts.push('"'); - return new OTree([parts.join('')]); + return new OTree([isMultiLine ? '$@"' : '$"', ...parts, '"']); } protected argumentList( @@ -840,7 +858,7 @@ export class CSharpVisitor extends DefaultVisitor { renderer: CSharpRenderer, ) { const heritage = flat( - Array.from(node.heritageClauses || []).map((h) => Array.from(h.types)), + Array.from(node.heritageClauses ?? []).map((h) => Array.from(h.types)), ).map((t) => renderer.convert(t.expression)); return heritage.length > 0 diff --git a/packages/jsii-rosetta/lib/languages/default.ts b/packages/jsii-rosetta/lib/languages/default.ts index 9ec75fb2dc..802aa63e8c 100644 --- a/packages/jsii-rosetta/lib/languages/default.ts +++ b/packages/jsii-rosetta/lib/languages/default.ts @@ -1,10 +1,12 @@ import * as ts from 'typescript'; -import { AstRenderer, AstHandler, nimpl, CommentSyntax } from '../renderer'; + +import { isStructInterface, isStructType } from '../jsii/jsii-utils'; import { OTree, NO_SYNTAX } from '../o-tree'; +import { AstRenderer, AstHandler, nimpl, CommentSyntax } from '../renderer'; +import { voidExpressionString } from '../typescript/ast-utils'; import { ImportStatement } from '../typescript/imports'; -import { isStructInterface, isStructType } from '../jsii/jsii-utils'; import { mapElementType, typeWithoutUndefinedUnion } from '../typescript/types'; -import { voidExpressionString } from '../typescript/ast-utils'; + import { TargetLanguage } from '.'; /** @@ -44,15 +46,8 @@ export abstract class DefaultVisitor implements AstHandler { } public stringLiteral( - node: ts.StringLiteral, - _children: AstRenderer, - ): OTree { - return new OTree([JSON.stringify(node.text)]); - } - - public noSubstitutionTemplateLiteral( - node: ts.NoSubstitutionTemplateLiteral, - _context: AstRenderer, + node: ts.StringLiteral | ts.NoSubstitutionTemplateLiteral, + _renderer: AstRenderer, ): OTree { return new OTree([JSON.stringify(node.text)]); } @@ -321,6 +316,13 @@ export abstract class DefaultVisitor implements AstHandler { return this.notImplemented(node, context); } + public computedPropertyName( + node: ts.Expression, + context: AstRenderer, + ): OTree { + return context.convert(node); + } + public methodDeclaration( node: ts.MethodDeclaration, context: AstRenderer, diff --git a/packages/jsii-rosetta/lib/languages/index.ts b/packages/jsii-rosetta/lib/languages/index.ts index 18b3de5ea0..5e6759529f 100644 --- a/packages/jsii-rosetta/lib/languages/index.ts +++ b/packages/jsii-rosetta/lib/languages/index.ts @@ -1,7 +1,7 @@ -import { PythonVisitor } from './python'; import { AstHandler } from '../renderer'; import { CSharpVisitor } from './csharp'; import { JavaVisitor } from './java'; +import { PythonVisitor } from './python'; export type TargetLanguage = 'python' | 'csharp' | 'java'; export type VisitorFactory = () => AstHandler; diff --git a/packages/jsii-rosetta/lib/languages/java.ts b/packages/jsii-rosetta/lib/languages/java.ts index cbe9e78bea..ea0bef5328 100644 --- a/packages/jsii-rosetta/lib/languages/java.ts +++ b/packages/jsii-rosetta/lib/languages/java.ts @@ -1,12 +1,9 @@ import * as ts from 'typescript'; -import { DefaultVisitor } from './default'; -import { AstRenderer } from '../renderer'; + +import { isStructType } from '../jsii/jsii-utils'; +import { jsiiTargetParam } from '../jsii/packages'; import { OTree, NO_SYNTAX } from '../o-tree'; -import { - builtInTypeName, - mapElementType, - typeWithoutUndefinedUnion, -} from '../typescript/types'; +import { AstRenderer } from '../renderer'; import { isReadOnly, matchAst, @@ -15,8 +12,12 @@ import { visibility, } from '../typescript/ast-utils'; import { ImportStatement } from '../typescript/imports'; -import { jsiiTargetParam } from '../jsii/packages'; -import { isStructType } from '../jsii/jsii-utils'; +import { + builtInTypeName, + mapElementType, + typeWithoutUndefinedUnion, +} from '../typescript/types'; +import { DefaultVisitor } from './default'; interface JavaContext { /** @@ -71,6 +72,15 @@ interface JavaContext { * @default false */ readonly stringLiteralAsIdentifier?: boolean; + + /** + * Used to denote that a type is being rendered in a position where a generic + * type parameter is expected, so only reference types are valid (not + * primitives). + * + * @default false + */ + readonly requiresReferenceType?: boolean; } /** @@ -341,16 +351,17 @@ export class JavaVisitor extends DefaultVisitor { (node.initializer && renderer.typeOfExpression(node.initializer)); const renderedType = type - ? this.renderType(node, type, renderer, 'var') - : 'var'; + ? this.renderType(node, type, renderer, 'Object') + : 'Object'; return new OTree( [ renderedType, ' ', renderer.convert(node.name), - ' = ', - renderer.convert(node.initializer), + ...(node.initializer + ? [' = ', renderer.convert(node.initializer)] + : []), ';', ], [], @@ -442,23 +453,43 @@ export class JavaVisitor extends DefaultVisitor { node: ts.TemplateExpression, renderer: JavaRenderer, ): OTree { - const result = new Array(); - let first = true; + let template = ''; + const parameters = new Array(); if (node.head.rawText) { - result.push(`"${quoteStringLiteral(node.head.rawText)}"`); - first = false; + template += node.head.rawText; } for (const span of node.templateSpans) { - result.push(`${first ? '' : ' + '}${renderer.textOf(span.expression)}`); - first = false; + template += '%s'; + parameters.push( + renderer + .updateContext({ + convertPropertyToGetter: true, + identifierAsString: false, + }) + .convert(span.expression), + ); if (span.literal.rawText) { - result.push(` + "${quoteStringLiteral(span.literal.rawText)}"`); + template += span.literal.rawText; } } - return new OTree(result); + if (parameters.length === 0) { + return new OTree([JSON.stringify(quoteStringLiteral(template))]); + } + + return new OTree([ + 'String.format(', + `"${quoteStringLiteral(template) + // Java does not have multiline string literals, so we must replace literal newlines with %n + .replace(/\n/g, '%n')}"`, + ...parameters.reduce( + (list, element) => list.concat(', ', element), + new Array(), + ), + ')', + ]); } public asExpression(node: ts.AsExpression, renderer: JavaRenderer): OTree { @@ -648,14 +679,19 @@ export class JavaVisitor extends DefaultVisitor { return new OTree(parts); } - public stringLiteral(node: ts.StringLiteral, renderer: JavaRenderer): OTree { - return renderer.currentContext.stringLiteralAsIdentifier - ? this.identifier(node, renderer) - : super.stringLiteral(node, renderer); + public stringLiteral( + node: ts.StringLiteral | ts.NoSubstitutionTemplateLiteral, + renderer: JavaRenderer, + ): OTree { + if (renderer.currentContext.stringLiteralAsIdentifier) { + return this.identifier(node, renderer); + } + // Java does not have multiline string literals, so we must replace literal newlines with \n + return new OTree([JSON.stringify(node.text).replace(/\n/g, '\\n')]); } public identifier( - node: ts.Identifier | ts.StringLiteral, + node: ts.Identifier | ts.StringLiteral | ts.NoSubstitutionTemplateLiteral, renderer: JavaRenderer, ): OTree { const nodeText = node.text; @@ -693,7 +729,11 @@ export class JavaVisitor extends DefaultVisitor { return new OTree( [], [ - renderer.updateContext({ identifierAsString: true }).convert(name), + renderer + .updateContext({ + identifierAsString: !ts.isComputedPropertyName(name), + }) + .convert(name), ', ', renderer.updateContext({ inKeyValueList: false }).convert(initializer), ], @@ -793,7 +833,7 @@ export class JavaVisitor extends DefaultVisitor { heritageKeyword: ts.SyntaxKind, outputKeyword: string, ): Array { - const heritageClause = (node.heritageClauses || []).find( + const heritageClause = (node.heritageClauses ?? []).find( (hc) => hc.token === heritageKeyword, ); const superTypes = heritageClause @@ -810,7 +850,7 @@ export class JavaVisitor extends DefaultVisitor { fallback?: string, ): string { fallback = - fallback || + fallback ?? (typeNode ? lastElement(renderer.textOf(typeNode).split('.')) // remove any namespace prefixes : 'Object'); @@ -850,7 +890,7 @@ export class JavaVisitor extends DefaultVisitor { return `Map`; } @@ -869,10 +909,14 @@ export class JavaVisitor extends DefaultVisitor { } switch (typeScriptBuiltInType) { + case 'boolean': + return renderer.currentContext.requiresReferenceType + ? 'Boolean' + : 'boolean'; + case 'number': + return 'Number'; case 'string': return 'String'; - case 'number': - return 'int'; case 'any': return 'Object'; default: diff --git a/packages/jsii-rosetta/lib/languages/python.ts b/packages/jsii-rosetta/lib/languages/python.ts index 682aa60586..f058af97e5 100644 --- a/packages/jsii-rosetta/lib/languages/python.ts +++ b/packages/jsii-rosetta/lib/languages/python.ts @@ -1,12 +1,14 @@ import * as ts from 'typescript'; -import { AstRenderer, nimpl, CommentSyntax } from '../renderer'; + import { isStructType, propertiesOfStruct, StructProperty, structPropertyAcceptsUndefined, } from '../jsii/jsii-utils'; +import { jsiiTargetParam } from '../jsii/packages'; import { NO_SYNTAX, OTree, renderTree } from '../o-tree'; +import { AstRenderer, nimpl, CommentSyntax } from '../renderer'; import { matchAst, nodeOfType, @@ -15,10 +17,9 @@ import { quoteStringLiteral, } from '../typescript/ast-utils'; import { ImportStatement } from '../typescript/imports'; +import { parameterAcceptsUndefined } from '../typescript/types'; import { startsWithUppercase, flat } from '../util'; import { DefaultVisitor } from './default'; -import { jsiiTargetParam } from '../jsii/packages'; -import { parameterAcceptsUndefined } from '../typescript/types'; interface StructVar { variableName: string; @@ -497,13 +498,9 @@ export class PythonVisitor extends DefaultVisitor { node: ts.PropertyAssignment, context: PythonVisitorContext, ): OTree { - let before = '"'; - let mid = '": '; - - if (context.currentContext.renderObjectLiteralAsKeywords) { - before = ''; - mid = '='; - } + const mid = context.currentContext.renderObjectLiteralAsKeywords + ? '=' + : ': '; // node.name is either an identifier or a string literal. The string literal // needs to be converted differently. @@ -516,9 +513,16 @@ export class PythonVisitor extends DefaultVisitor { }, ); + // If this isn't a computed property, we must quote the key (unless it's rendered as a keyword) + if ( + !context.currentContext.renderObjectLiteralAsKeywords && + !ts.isComputedPropertyName(node.name) + ) { + name = new OTree(['"', name, '"']); + } + return new OTree( [ - before, name, mid, context @@ -696,11 +700,30 @@ export class PythonVisitor extends DefaultVisitor { return context.convert(node.expression); } + public stringLiteral( + node: ts.StringLiteral | ts.NoSubstitutionTemplateLiteral, + _context: PythonVisitorContext, + ): OTree { + const rawText = node.text; + if (rawText.includes('\n')) { + return new OTree([ + '"""', + rawText + // Escape all occurrences of back-slash once more + .replace(/\\/g, '\\\\') + // Escape only the first one in triple-quotes + .replace(/"""/g, '\\"""'), + '"""', + ]); + } + return new OTree([JSON.stringify(rawText)]); + } + public templateExpression( node: ts.TemplateExpression, context: PythonVisitorContext, ): OTree { - const parts = ['f"']; + const parts = new Array(); if (node.head.rawText) { parts.push(quoteStringLiteral(node.head.rawText)); } @@ -710,9 +733,10 @@ export class PythonVisitor extends DefaultVisitor { parts.push(quoteStringLiteral(span.literal.rawText)); } } - parts.push('"'); - return new OTree([parts.join('')]); + const quote = parts.some((part) => part.includes('\n')) ? '"""' : '"'; + + return new OTree([`f${quote}`, ...parts, quote]); } public maskingVoidExpression( diff --git a/packages/jsii-rosetta/lib/languages/visualize.ts b/packages/jsii-rosetta/lib/languages/visualize.ts index d47f38faeb..027b3b17ce 100644 --- a/packages/jsii-rosetta/lib/languages/visualize.ts +++ b/packages/jsii-rosetta/lib/languages/visualize.ts @@ -1,6 +1,7 @@ import * as ts from 'typescript'; -import { AstRenderer, AstHandler, nimpl, CommentSyntax } from '../renderer'; + import { OTree } from '../o-tree'; +import { AstRenderer, AstHandler, nimpl, CommentSyntax } from '../renderer'; import { ImportStatement } from '../typescript/imports'; export class VisualizeAstVisitor implements AstHandler { @@ -40,7 +41,7 @@ export class VisualizeAstVisitor implements AstHandler { } public stringLiteral( - node: ts.StringLiteral, + node: ts.StringLiteral | ts.NoSubstitutionTemplateLiteral, children: AstRenderer, ): OTree { return this.defaultNode('stringLiteral', node, children); @@ -191,6 +192,13 @@ export class VisualizeAstVisitor implements AstHandler { return this.defaultNode('propertyDeclaration', node, context); } + public computedPropertyName( + node: ts.Expression, + context: AstRenderer, + ): OTree { + return this.defaultNode('computedPropertyName', node, context); + } + public methodDeclaration( node: ts.MethodDeclaration, context: AstRenderer, @@ -282,13 +290,6 @@ export class VisualizeAstVisitor implements AstHandler { return this.defaultNode('maskingVoidExpression', node, context); } - public noSubstitutionTemplateLiteral( - node: ts.NoSubstitutionTemplateLiteral, - context: AstRenderer, - ): OTree { - return this.defaultNode('noSubstitutionTemplateLiteral', node, context); - } - private defaultNode( handlerName: string, node: ts.Node, diff --git a/packages/jsii-rosetta/lib/markdown/extract-snippets.ts b/packages/jsii-rosetta/lib/markdown/extract-snippets.ts index 50748073d6..8a7816a091 100644 --- a/packages/jsii-rosetta/lib/markdown/extract-snippets.ts +++ b/packages/jsii-rosetta/lib/markdown/extract-snippets.ts @@ -1,4 +1,5 @@ import * as cm from 'commonmark'; + import { visitCommonMarkTree } from '../markdown/markdown'; import { TypeScriptSnippet } from '../snippet'; import { ReplaceTypeScriptTransform } from './replace-typescript-transform'; @@ -11,6 +12,7 @@ export type TypeScriptReplacer = ( export function extractTypescriptSnippetsFromMarkdown( markdown: string, wherePrefix: string, + strict: boolean, ): TypeScriptSnippet[] { const parser = new cm.Parser(); const doc = parser.parse(markdown); @@ -19,7 +21,7 @@ export function extractTypescriptSnippetsFromMarkdown( visitCommonMarkTree( doc, - new ReplaceTypeScriptTransform(wherePrefix, (ts) => { + new ReplaceTypeScriptTransform(wherePrefix, strict, (ts) => { ret.push(ts); return undefined; }), diff --git a/packages/jsii-rosetta/lib/markdown/index.ts b/packages/jsii-rosetta/lib/markdown/index.ts index ff82684dc3..4bad3744b6 100644 --- a/packages/jsii-rosetta/lib/markdown/index.ts +++ b/packages/jsii-rosetta/lib/markdown/index.ts @@ -1,7 +1,7 @@ -import { transformMarkdown } from './markdown'; import { JavaDocRenderer } from './javadoc-renderer'; -import { CSharpXmlCommentRenderer } from './xml-comment-renderer'; +import { transformMarkdown } from './markdown'; import { StructureRenderer } from './structure-renderer'; +import { CSharpXmlCommentRenderer } from './xml-comment-renderer'; /** * All the visitors in this module expose CommonMark types in their API diff --git a/packages/jsii-rosetta/lib/markdown/javadoc-renderer.ts b/packages/jsii-rosetta/lib/markdown/javadoc-renderer.ts index 6206781280..0b91aaedaa 100644 --- a/packages/jsii-rosetta/lib/markdown/javadoc-renderer.ts +++ b/packages/jsii-rosetta/lib/markdown/javadoc-renderer.ts @@ -1,4 +1,6 @@ import * as cm from 'commonmark'; + +import { makeJavaEscaper } from './escapes'; import { RendererContext } from './markdown'; import { MarkdownRenderer, @@ -7,7 +9,6 @@ import { stripTrailingWhitespace, stripPara, } from './markdown-renderer'; -import { makeJavaEscaper } from './escapes'; const ESCAPE = makeJavaEscaper(); diff --git a/packages/jsii-rosetta/lib/markdown/markdown-renderer.ts b/packages/jsii-rosetta/lib/markdown/markdown-renderer.ts index a9c6388840..77aef8d652 100644 --- a/packages/jsii-rosetta/lib/markdown/markdown-renderer.ts +++ b/packages/jsii-rosetta/lib/markdown/markdown-renderer.ts @@ -1,4 +1,5 @@ import * as cm from 'commonmark'; + import { cmNodeChildren, CommonMarkRenderer, diff --git a/packages/jsii-rosetta/lib/markdown/replace-code-renderer.ts b/packages/jsii-rosetta/lib/markdown/replace-code-renderer.ts index 2945c18211..09031cee18 100644 --- a/packages/jsii-rosetta/lib/markdown/replace-code-renderer.ts +++ b/packages/jsii-rosetta/lib/markdown/replace-code-renderer.ts @@ -1,4 +1,5 @@ import * as cm from 'commonmark'; + import { CommonMarkVisitor } from './markdown'; import { CodeBlock } from './types'; diff --git a/packages/jsii-rosetta/lib/markdown/replace-typescript-transform.ts b/packages/jsii-rosetta/lib/markdown/replace-typescript-transform.ts index 27222e47fd..8e00997944 100644 --- a/packages/jsii-rosetta/lib/markdown/replace-typescript-transform.ts +++ b/packages/jsii-rosetta/lib/markdown/replace-typescript-transform.ts @@ -1,9 +1,9 @@ -import { ReplaceCodeTransform } from './replace-code-renderer'; import { TypeScriptSnippet, typeScriptSnippetFromSource, parseKeyValueList, } from '../snippet'; +import { ReplaceCodeTransform } from './replace-code-renderer'; import { CodeBlock } from './types'; export type TypeScriptReplacer = ( @@ -16,7 +16,11 @@ export type TypeScriptReplacer = ( export class ReplaceTypeScriptTransform extends ReplaceCodeTransform { private readonly wherePrefix: string; - public constructor(wherePrefix: string, replacer: TypeScriptReplacer) { + public constructor( + wherePrefix: string, + strict: boolean, + replacer: TypeScriptReplacer, + ) { let count = 0; super((block) => { const languageParts = block.language ? block.language.split(' ') : []; @@ -28,10 +32,11 @@ export class ReplaceTypeScriptTransform extends ReplaceCodeTransform { const tsSnippet = typeScriptSnippetFromSource( block.source, this.addSnippetNumber(count), + strict, parseKeyValueList(languageParts.slice(1)), ); - return replacer(tsSnippet) || block; + return replacer(tsSnippet) ?? block; }); this.wherePrefix = wherePrefix; diff --git a/packages/jsii-rosetta/lib/markdown/structure-renderer.ts b/packages/jsii-rosetta/lib/markdown/structure-renderer.ts index 51291389bd..501597dbb0 100644 --- a/packages/jsii-rosetta/lib/markdown/structure-renderer.ts +++ b/packages/jsii-rosetta/lib/markdown/structure-renderer.ts @@ -1,4 +1,5 @@ import * as cm from 'commonmark'; + import { CommonMarkRenderer, prefixLines, RendererContext } from './markdown'; /** diff --git a/packages/jsii-rosetta/lib/markdown/xml-comment-renderer.ts b/packages/jsii-rosetta/lib/markdown/xml-comment-renderer.ts index 22ead8afc8..3cb3f927e2 100644 --- a/packages/jsii-rosetta/lib/markdown/xml-comment-renderer.ts +++ b/packages/jsii-rosetta/lib/markdown/xml-comment-renderer.ts @@ -1,7 +1,8 @@ import * as cm from 'commonmark'; + +import { makeXmlEscaper } from './escapes'; import { prefixLines, RendererContext } from './markdown'; import { MarkdownRenderer, para, stripPara } from './markdown-renderer'; -import { makeXmlEscaper } from './escapes'; const ESCAPE = makeXmlEscaper(); diff --git a/packages/jsii-rosetta/lib/o-tree.ts b/packages/jsii-rosetta/lib/o-tree.ts index ee3014b4d4..583d3c92fa 100644 --- a/packages/jsii-rosetta/lib/o-tree.ts +++ b/packages/jsii-rosetta/lib/o-tree.ts @@ -91,7 +91,7 @@ export class OTree implements OTree { } const popIndent = sink.requestIndentChange( - meVisible ? this.options.indent || 0 : 0, + meVisible ? this.options.indent ?? 0 : 0, ); let mark = sink.mark(); for (const child of this.children ?? []) { diff --git a/packages/jsii-rosetta/lib/renderer.ts b/packages/jsii-rosetta/lib/renderer.ts index b8c2067b9a..5b432f8a6b 100644 --- a/packages/jsii-rosetta/lib/renderer.ts +++ b/packages/jsii-rosetta/lib/renderer.ts @@ -1,4 +1,6 @@ import * as ts from 'typescript'; + +import { TargetLanguage } from './languages'; import { NO_SYNTAX, OTree, UnknownSyntax, Span } from './o-tree'; import { commentRangeFromTextRange, @@ -13,7 +15,6 @@ import { analyzeImportEquals, ImportStatement, } from './typescript/imports'; -import { TargetLanguage } from './languages'; /** * Render a TypeScript AST to some other representation (encoded in OTrees) @@ -159,7 +160,7 @@ export class AstRenderer { */ public typeOfExpression(node: ts.Expression): ts.Type { return ( - this.typeChecker.getContextualType(node) || + this.typeChecker.getContextualType(node) ?? this.typeChecker.getTypeAtLocation(node) ); } @@ -261,7 +262,7 @@ export class AstRenderer { this, ); } - if (ts.isStringLiteral(tree)) { + if (ts.isStringLiteral(tree) || ts.isNoSubstitutionTemplateLiteral(tree)) { return visitor.stringLiteral(tree, this); } if (ts.isFunctionDeclaration(tree)) { @@ -294,9 +295,6 @@ export class AstRenderer { if (ts.isExpressionStatement(tree)) { return visitor.expressionStatement(tree, this); } - if (ts.isNoSubstitutionTemplateLiteral(tree)) { - return visitor.noSubstitutionTemplateLiteral(tree, this); - } if (ts.isToken(tree)) { return visitor.token(tree, this); } @@ -339,6 +337,9 @@ export class AstRenderer { if (ts.isPropertyDeclaration(tree)) { return visitor.propertyDeclaration(tree, this); } + if (ts.isComputedPropertyName(tree)) { + return visitor.computedPropertyName(tree.expression, this); + } if (ts.isMethodDeclaration(tree)) { return visitor.methodDeclaration(tree, this); } @@ -414,38 +415,40 @@ export class AstRenderer { const precede: OTree[] = []; for (const range of leadingRanges) { + let trivia: OTree | undefined = undefined; switch (range.type) { case 'other': - precede.push( - new OTree( - [ - repeatNewlines( - this.sourceFile.text.substring(range.pos, range.end), - ), - ], - [], - { - renderOnce: `ws-${range.pos}`, - }, - ), + trivia = new OTree( + [ + repeatNewlines( + this.sourceFile.text.substring(range.pos, range.end), + ), + ], + [], + { + renderOnce: `ws-${range.pos}`, + }, ); break; case 'linecomment': case 'blockcomment': - precede.push( - this.handler.commentRange( - commentSyntaxFromCommentRange( - commentRangeFromTextRange(range), - this, - ), + trivia = this.handler.commentRange( + commentSyntaxFromCommentRange( + commentRangeFromTextRange(range), this, ), + this, ); break; case 'directive': break; } + if (trivia != null) { + // Set spans on comments to make sure their visibility is toggled correctly. + trivia.setSpan(range.pos, range.end); + precede.push(trivia); + } } // FIXME: No trailing comments for now, they're too tricky @@ -474,7 +477,10 @@ export interface AstHandler { sourceFile(node: ts.SourceFile, context: AstRenderer): OTree; commentRange(node: CommentSyntax, context: AstRenderer): OTree; importStatement(node: ImportStatement, context: AstRenderer): OTree; - stringLiteral(node: ts.StringLiteral, children: AstRenderer): OTree; + stringLiteral( + node: ts.StringLiteral | ts.NoSubstitutionTemplateLiteral, + children: AstRenderer, + ): OTree; functionDeclaration( node: ts.FunctionDeclaration, children: AstRenderer, @@ -538,6 +544,7 @@ export interface AstHandler { node: ts.PropertyDeclaration, context: AstRenderer, ): OTree; + computedPropertyName(node: ts.Expression, context: AstRenderer): OTree; methodDeclaration(node: ts.MethodDeclaration, context: AstRenderer): OTree; interfaceDeclaration( node: ts.InterfaceDeclaration, @@ -565,10 +572,6 @@ export interface AstHandler { node: ts.VoidExpression, context: AstRenderer, ): OTree; - noSubstitutionTemplateLiteral( - node: ts.NoSubstitutionTemplateLiteral, - context: AstRenderer, - ): OTree; // Not a node, called when we recognize a spread element/assignment that is only // '...' and nothing else. diff --git a/packages/jsii-rosetta/lib/rosetta.ts b/packages/jsii-rosetta/lib/rosetta.ts index ff82560a52..ffb9385505 100644 --- a/packages/jsii-rosetta/lib/rosetta.ts +++ b/packages/jsii-rosetta/lib/rosetta.ts @@ -1,21 +1,22 @@ +import * as spec from '@jsii/spec'; import * as fs from 'fs-extra'; import * as path from 'path'; -import * as spec from '@jsii/spec'; -import { - DEFAULT_TABLET_NAME, - LanguageTablet, - Translation, -} from './tablets/tablets'; +import { isError } from 'util'; + import { allTypeScriptSnippets } from './jsii/assemblies'; import { TargetLanguage } from './languages'; -import { Translator } from './translate'; -import { isError } from 'util'; import { transformMarkdown } from './markdown/markdown'; import { MarkdownRenderer } from './markdown/markdown-renderer'; +import { ReplaceTypeScriptTransform } from './markdown/replace-typescript-transform'; import { CodeBlock } from './markdown/types'; import { TypeScriptSnippet } from './snippet'; +import { + DEFAULT_TABLET_NAME, + LanguageTablet, + Translation, +} from './tablets/tablets'; +import { Translator } from './translate'; import { printDiagnostics } from './util'; -import { ReplaceTypeScriptTransform } from './markdown/replace-typescript-transform'; export interface RosettaOptions { /** @@ -156,12 +157,13 @@ export class Rosetta { public translateSnippetsInMarkdown( markdown: string, targetLang: TargetLanguage, + strict: boolean, translationToCodeBlock: (x: Translation) => CodeBlock = id, ): string { return transformMarkdown( markdown, new MarkdownRenderer(), - new ReplaceTypeScriptTransform('markdown', (tsSnip) => { + new ReplaceTypeScriptTransform('markdown', strict, (tsSnip) => { const translated = this.translateSnippet(tsSnip, targetLang); if (!translated) { return undefined; diff --git a/packages/jsii-rosetta/lib/snippet.ts b/packages/jsii-rosetta/lib/snippet.ts index 0686132570..e9f0951f8e 100644 --- a/packages/jsii-rosetta/lib/snippet.ts +++ b/packages/jsii-rosetta/lib/snippet.ts @@ -21,6 +21,13 @@ export interface TypeScriptSnippet { * Parameters for the conversion */ readonly parameters?: Record; + + /** + * Whether this snippet must be processed as if `--strict` was always supplied. + * + * @default false + */ + readonly strict?: boolean; } /** @@ -31,8 +38,9 @@ export interface TypeScriptSnippet { export function typeScriptSnippetFromSource( typeScriptSource: string, where: string, + strict: boolean, parameters: Record = {}, -) { +): TypeScriptSnippet { const [source, sourceParameters] = parametersFromSourceDirectives( typeScriptSource, ); @@ -40,6 +48,7 @@ export function typeScriptSnippetFromSource( visibleSource: source.trimRight(), where, parameters: Object.assign({}, parameters, sourceParameters), + strict, }; } @@ -57,7 +66,7 @@ export function updateParameters( * Get the complete (compilable) source of a snippet */ export function completeSource(snippet: TypeScriptSnippet) { - return snippet.completeSource || snippet.visibleSource; + return snippet.completeSource ?? snippet.visibleSource; } /** @@ -66,16 +75,16 @@ export function completeSource(snippet: TypeScriptSnippet) { function parametersFromSourceDirectives( source: string, ): [string, Record] { - const [firstLine, rest] = source.split('\n', 2); + const [firstLine, ...rest] = source.split('\n'); // Also extract parameters from an initial line starting with '/// ' (getting rid of that line). - const m = /\/\/\/(.*)$/.exec(firstLine); + const m = /[/]{3}(.*)$/.exec(firstLine); if (m) { const paramClauses = m[1] .trim() .split(' ') .map((s) => s.trim()) .filter((s) => s !== ''); - return [rest, parseKeyValueList(paramClauses)]; + return [rest.join('\n'), parseKeyValueList(paramClauses)]; } return [source, {}]; diff --git a/packages/jsii-rosetta/lib/strict.ts b/packages/jsii-rosetta/lib/strict.ts new file mode 100644 index 0000000000..4a9df8af37 --- /dev/null +++ b/packages/jsii-rosetta/lib/strict.ts @@ -0,0 +1,5 @@ +import { Assembly } from '@jsii/spec'; + +export function enforcesStrictMode(assembly: Assembly): boolean { + return !!assembly.metadata?.jsii?.rosetta?.strict; +} diff --git a/packages/jsii-rosetta/lib/tablets/key.ts b/packages/jsii-rosetta/lib/tablets/key.ts index 88db4a5b3d..09a5a7fe6e 100644 --- a/packages/jsii-rosetta/lib/tablets/key.ts +++ b/packages/jsii-rosetta/lib/tablets/key.ts @@ -1,4 +1,5 @@ import * as crypto from 'crypto'; + import { TypeScriptSnippet } from '../snippet'; /** diff --git a/packages/jsii-rosetta/lib/tablets/tablets.ts b/packages/jsii-rosetta/lib/tablets/tablets.ts index a0ebe46207..248c367b29 100644 --- a/packages/jsii-rosetta/lib/tablets/tablets.ts +++ b/packages/jsii-rosetta/lib/tablets/tablets.ts @@ -1,14 +1,15 @@ import * as fs from 'fs-extra'; import * as path from 'path'; + +import { TargetLanguage } from '../languages'; +import { TypeScriptSnippet } from '../snippet'; +import { snippetKey } from './key'; import { TabletSchema, TranslatedSnippetSchema, TranslationSchema, ORIGINAL_SNIPPET_KEY, } from './schema'; -import { snippetKey } from './key'; -import { TargetLanguage } from '../languages'; -import { TypeScriptSnippet } from '../snippet'; // eslint-disable-next-line @typescript-eslint/no-require-imports,@typescript-eslint/no-var-requires const TOOL_VERSION = require('../../package.json').version; diff --git a/packages/jsii-rosetta/lib/translate.ts b/packages/jsii-rosetta/lib/translate.ts index 332aeddec9..20142ba337 100644 --- a/packages/jsii-rosetta/lib/translate.ts +++ b/packages/jsii-rosetta/lib/translate.ts @@ -1,22 +1,23 @@ -import * as logging from './logging'; import * as ts from 'typescript'; import { inspect } from 'util'; -import { AstRenderer, AstHandler, AstRendererOptions } from './renderer'; -import { renderTree, Span, spanContains } from './o-tree'; -import { - TypeScriptCompiler, - CompilationResult, -} from './typescript/ts-compiler'; -import { TranslatedSnippet } from './tablets/tablets'; + import { TARGET_LANGUAGES, TargetLanguage } from './languages'; -import { calculateVisibleSpans } from './typescript/ast-utils'; -import { File } from './util'; +import * as logging from './logging'; +import { renderTree, Span, spanContains } from './o-tree'; +import { AstRenderer, AstHandler, AstRendererOptions } from './renderer'; import { TypeScriptSnippet, completeSource, SnippetParameters, } from './snippet'; import { snippetKey } from './tablets/key'; +import { TranslatedSnippet } from './tablets/tablets'; +import { calculateVisibleSpans } from './typescript/ast-utils'; +import { + TypeScriptCompiler, + CompilationResult, +} from './typescript/ts-compiler'; +import { annotateStrictDiagnostic, File } from './util'; export function translateTypeScript( source: File, @@ -43,7 +44,8 @@ export function translateTypeScript( */ export class Translator { private readonly compiler = new TypeScriptCompiler(); - public readonly diagnostics: ts.Diagnostic[] = []; + // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility + #diagnostics: readonly ts.Diagnostic[] = []; public constructor(private readonly includeCompilerDiagnostics: boolean) {} @@ -68,11 +70,17 @@ export class Translator { snippet.addTranslatedSource(lang, translated); } - this.diagnostics.push(...translator.diagnostics); + this.#diagnostics = ts.sortAndDeduplicateDiagnostics( + this.#diagnostics.concat(translator.diagnostics), + ); return snippet; } + public get diagnostics(): readonly ts.Diagnostic[] { + return Array.from(this.#diagnostics); + } + /** * Return the snippet translator for the given snippet * @@ -106,7 +114,7 @@ export interface SnippetTranslatorOptions extends AstRendererOptions { export interface TranslateResult { translation: string; - diagnostics: ts.Diagnostic[]; + diagnostics: readonly ts.Diagnostic[]; } /** @@ -122,7 +130,7 @@ export class SnippetTranslator { snippet: TypeScriptSnippet, private readonly options: SnippetTranslatorOptions = {}, ) { - const compiler = options.compiler || new TypeScriptCompiler(); + const compiler = options.compiler ?? new TypeScriptCompiler(); const source = completeSource(snippet); const fakeCurrentDirectory = @@ -137,14 +145,19 @@ export class SnippetTranslator { this.visibleSpans = calculateVisibleSpans(source); // This makes it about 5x slower, so only do it on demand - if (options.includeCompilerDiagnostics) { + if (options.includeCompilerDiagnostics || snippet.strict) { const program = this.compilation.program; - this.compileDiagnostics.push( + const diagnostics = [ ...program.getGlobalDiagnostics(), - ...program.getSyntacticDiagnostics(), - ...program.getDeclarationDiagnostics(), - ...program.getSemanticDiagnostics(), - ); + ...program.getSyntacticDiagnostics(this.compilation.rootFile), + ...program.getDeclarationDiagnostics(this.compilation.rootFile), + ...program.getSemanticDiagnostics(this.compilation.rootFile), + ]; + if (snippet.strict) { + // In a strict assembly, so we'll need to brand all diagnostics here... + diagnostics.forEach(annotateStrictDiagnostic); + } + this.compileDiagnostics.push(...diagnostics); } } @@ -162,8 +175,10 @@ export class SnippetTranslator { return renderTree(converted, { visibleSpans: this.visibleSpans }); } - public get diagnostics() { - return [...this.compileDiagnostics, ...this.translateDiagnostics]; + public get diagnostics(): readonly ts.Diagnostic[] { + return ts.sortAndDeduplicateDiagnostics( + this.compileDiagnostics.concat(this.translateDiagnostics), + ); } } @@ -171,7 +186,7 @@ export class SnippetTranslator { * Hide diagnostics that are rosetta-sourced if they are reported against a non-visible span */ function filterVisibleDiagnostics( - diags: ts.Diagnostic[], + diags: readonly ts.Diagnostic[], visibleSpans: Span[], ): ts.Diagnostic[] { return diags.filter( diff --git a/packages/jsii-rosetta/lib/typescript/ast-utils.ts b/packages/jsii-rosetta/lib/typescript/ast-utils.ts index 03472c5b07..641bcf3013 100644 --- a/packages/jsii-rosetta/lib/typescript/ast-utils.ts +++ b/packages/jsii-rosetta/lib/typescript/ast-utils.ts @@ -1,4 +1,5 @@ import * as ts from 'typescript'; + import { Span } from '../o-tree'; import { AstRenderer } from '../renderer'; @@ -13,7 +14,7 @@ export function calculateVisibleSpans(source: string): Span[] { } export function calculateMarkedSpans(source: string): MarkedSpan[] { - const regEx = /\/\/\/ (.*)(\r?\n)?$/gm; + const regEx = /[/]{3}[ \t]*(!(?:show|hide))[ \t]*$/gm; const ret = new Array(); let match; @@ -37,7 +38,7 @@ export function calculateMarkedSpans(source: string): MarkedSpan[] { } // Add the remainder under the last visibility - ret.push({ start: spanStart || 0, end: source.length, visible }); + ret.push({ start: spanStart ?? 0, end: source.length, visible }); // Filter empty spans and return return ret.filter((s) => s.start !== s.end); @@ -55,7 +56,7 @@ export function stripCommentMarkers(comment: string, multiline: boolean) { .replace(/^[ \t]*\*[ \t]?/gm, ''); // Strip "* " from start of line } // The text *must* start with '//' - return comment.replace(/^\/\/[ \t]?/gm, ''); + return comment.replace(/^[/]{2}[ \t]?/gm, ''); } export function stringFromLiteral(expr: ts.Expression) { @@ -132,7 +133,7 @@ export function nodeOfType< const capturing = typeof syntaxKindOrCaptureName === 'string'; // Determine which overload we're in (SyntaxKind is a number) const realNext = - (capturing ? children : (nodeTypeOrChildren as AstMatcher)) || DONE; + (capturing ? children : (nodeTypeOrChildren as AstMatcher)) ?? DONE; const realCapture = capturing ? (syntaxKindOrCaptureName as N) : undefined; const realSyntaxKind = capturing ? nodeTypeOrChildren @@ -163,7 +164,7 @@ export function anyNode(children: AstMatcher): AstMatcher; export function anyNode( children?: AstMatcher, ): AstMatcher | AstMatcher { - const realNext = children || DONE; + const realNext = children ?? DONE; return (nodes) => { for (const node of nodes ?? []) { const m = realNext(nodeChildren(node)); @@ -183,7 +184,7 @@ export function allOfType( ): AstMatcher<{ [key in N]: Array }> { type ArrayType = Array; type ReturnType = { [key in N]: ArrayType }; - const realNext = children || DONE; + const realNext = children ?? DONE; return (nodes) => { let ret: ReturnType | undefined; diff --git a/packages/jsii-rosetta/lib/typescript/imports.ts b/packages/jsii-rosetta/lib/typescript/imports.ts index 4bd70ba83d..0c872562e4 100644 --- a/packages/jsii-rosetta/lib/typescript/imports.ts +++ b/packages/jsii-rosetta/lib/typescript/imports.ts @@ -1,4 +1,5 @@ import * as ts from 'typescript'; + import { AstRenderer } from '../renderer'; import { allOfType, diff --git a/packages/jsii-rosetta/lib/typescript/ts-compiler.ts b/packages/jsii-rosetta/lib/typescript/ts-compiler.ts index 8b21a2c005..774cace8c9 100644 --- a/packages/jsii-rosetta/lib/typescript/ts-compiler.ts +++ b/packages/jsii-rosetta/lib/typescript/ts-compiler.ts @@ -1,11 +1,10 @@ import * as ts from 'typescript'; export class TypeScriptCompiler { - private readonly realHost: ts.CompilerHost; - - public constructor() { - this.realHost = ts.createCompilerHost(STANDARD_COMPILER_OPTIONS, true); - } + private readonly realHost = ts.createCompilerHost( + STANDARD_COMPILER_OPTIONS, + true, + ); public createInMemoryCompilerHost( sourcePath: string, @@ -20,16 +19,13 @@ export class TypeScriptCompiler { ); return { + ...realHost, fileExists: (filePath) => filePath === sourcePath || realHost.fileExists(filePath), - directoryExists: realHost.directoryExists?.bind(realHost), - getCurrentDirectory: () => - currentDirectory || realHost.getCurrentDirectory(), - getDirectories: realHost.getDirectories?.bind(realHost), - getCanonicalFileName: (fileName) => - realHost.getCanonicalFileName(fileName), - getNewLine: realHost.getNewLine.bind(realHost), - getDefaultLibFileName: realHost.getDefaultLibFileName.bind(realHost), + getCurrentDirectory: + currentDirectory != null + ? () => currentDirectory + : realHost.getCurrentDirectory, getSourceFile: ( fileName, languageVersion, @@ -46,10 +42,7 @@ export class TypeScriptCompiler { ), readFile: (filePath) => filePath === sourcePath ? sourceContents : realHost.readFile(filePath), - useCaseSensitiveFileNames: () => realHost.useCaseSensitiveFileNames(), - writeFile(_fileName, _data) { - /* nothing */ - }, + writeFile: () => void undefined, }; } diff --git a/packages/jsii-rosetta/lib/typescript/types.ts b/packages/jsii-rosetta/lib/typescript/types.ts index 9ad4f316db..32ed14347a 100644 --- a/packages/jsii-rosetta/lib/typescript/types.ts +++ b/packages/jsii-rosetta/lib/typescript/types.ts @@ -1,4 +1,5 @@ import * as ts from 'typescript'; + import { AstRenderer } from '../renderer'; /** @@ -19,9 +20,11 @@ export function typeWithoutUndefinedUnion( return remaining[0]; } -export function builtInTypeName(type: ts.Type): string | undefined { - const map: { [k: number]: string } = { +type BuiltInType = 'any' | 'boolean' | 'number' | 'string'; +export function builtInTypeName(type: ts.Type): BuiltInType | undefined { + const map: { readonly [k: number]: BuiltInType } = { [ts.TypeFlags.Any]: 'any', + [ts.TypeFlags.Unknown]: 'any', [ts.TypeFlags.Boolean]: 'boolean', [ts.TypeFlags.Number]: 'number', [ts.TypeFlags.String]: 'string', @@ -83,7 +86,7 @@ export function mapElementType( } return undefined; }); - return typeIfSame(initializerTypes); + return typeIfSame([...initializerTypes, type.getStringIndexType()]); } } diff --git a/packages/jsii-rosetta/lib/util.ts b/packages/jsii-rosetta/lib/util.ts index 7015b1b12f..b2e326ae01 100644 --- a/packages/jsii-rosetta/lib/util.ts +++ b/packages/jsii-rosetta/lib/util.ts @@ -10,10 +10,12 @@ export interface File { } export function printDiagnostics( - diags: ts.Diagnostic[], + diags: readonly ts.Diagnostic[], stream: NodeJS.WritableStream, ) { - diags.forEach((d) => printDiagnostic(d, stream)); + for (const diag of diags) { + printDiagnostic(diag, stream); + } } export function printDiagnostic( @@ -36,8 +38,28 @@ export function printDiagnostic( stream.write(message); } -export function isErrorDiagnostic(diag: ts.Diagnostic) { - return diag.category === ts.DiagnosticCategory.Error; +const StrictBrand = Symbol('strict'); +interface MaybeStrictDiagnostic { + readonly [StrictBrand]?: boolean; +} + +export function annotateStrictDiagnostic(diag: ts.Diagnostic) { + Object.defineProperty(diag, StrictBrand, { + configurable: false, + enumerable: false, + value: true, + writable: false, + }); +} + +export function isErrorDiagnostic( + diag: ts.Diagnostic, + { onlyStrict }: { readonly onlyStrict: boolean }, +): boolean { + return ( + diag.category === ts.DiagnosticCategory.Error && + (!onlyStrict || !!(diag as MaybeStrictDiagnostic)[StrictBrand]) + ); } /** diff --git a/packages/jsii-rosetta/package.json b/packages/jsii-rosetta/package.json index d3d28e34dc..d26cce3f5f 100644 --- a/packages/jsii-rosetta/package.json +++ b/packages/jsii-rosetta/package.json @@ -18,47 +18,25 @@ "devDependencies": { "@types/commonmark": "^0.27.4", "@types/fs-extra": "^8.1.1", - "@types/jest": "^26.0.14", + "@types/jest": "^26.0.20", "@types/mock-fs": "^4.13.0", - "@types/node": "^10.17.39", - "@types/yargs": "^15.0.7", - "eslint": "^7.11.0", - "jest": "^26.5.2", + "@types/node": "^10.17.51", + "@types/yargs": "^16.0.0", + "eslint": "^7.19.0", + "jest": "^26.6.3", "jsii": "^0.0.0", "jsii-build-tools": "^0.0.0", "memory-streams": "^0.1.3", "mock-fs": "^4.13.0", - "prettier": "^2.1.2" + "prettier": "^2.2.1" }, "dependencies": { "@jsii/spec": "^0.0.0", - "commonmark": "^0.29.2", - "fs-extra": "^9.0.1", - "typescript": "~3.9.7", - "xmldom": "^0.3.0", - "yargs": "^16.0.3" - }, - "jest": { - "moduleFileExtensions": [ - "js" - ], - "collectCoverageFrom": [ - "lib/**/*.js" - ], - "collectCoverage": true, - "coverageReporters": [ - "json", - "lcov", - "text", - "clover", - "html" - ], - "coverageThreshold": { - "global": { - "branches": 70, - "statements": 70 - } - } + "commonmark": "^0.29.3", + "fs-extra": "^9.1.0", + "typescript": "~3.9.9", + "xmldom": "^0.4.0", + "yargs": "^16.2.0" }, "license": "Apache-2.0", "author": { diff --git a/packages/jsii-rosetta/test/jsii/assemblies.test.ts b/packages/jsii-rosetta/test/jsii/assemblies.test.ts index e27044cb8c..4cfd0d2983 100644 --- a/packages/jsii-rosetta/test/jsii/assemblies.test.ts +++ b/packages/jsii-rosetta/test/jsii/assemblies.test.ts @@ -1,8 +1,10 @@ -import * as mockfs from 'mock-fs'; import * as spec from '@jsii/spec'; -import { allTypeScriptSnippets } from '../../lib/jsii/assemblies'; +import * as mockfs from 'mock-fs'; import * as path from 'path'; + +import { allTypeScriptSnippets } from '../../lib/jsii/assemblies'; import { SnippetParameters } from '../../lib/snippet'; +import { fakeAssembly } from './fake-assembly'; test('Extract snippet from README', () => { const snippets = Array.from( @@ -80,11 +82,20 @@ test('Snippet can include fixture', () => { ); expect(snippets[0].visibleSource).toEqual('someExample();'); - expect(snippets[0].completeSource).toEqual( - ['// This is a fixture', '/// !show', 'someExample();', '/// !hide'].join( - '\n', - ), - ); + expect(snippets[0].completeSource).toMatchInlineSnapshot(` + "// This is a fixture + + // This is a wrapper so that \`import\` statements are invalid if included in + // the code example that'll be inlined at the \`here\` marker. + (function () { + // Code snippet begins after !show marker below + /// !show + someExample(); + /// !hide + // Code snippet ended before !hide marker above + })() + " + `); }); test('Use fixture from example', () => { @@ -109,9 +120,73 @@ test('Use fixture from example', () => { ]), ); + expect(snippets[0].completeSource).toMatchInlineSnapshot(` + "// This is a fixture + + // This is a wrapper so that \`import\` statements are invalid if included in + // the code example that'll be inlined at the \`here\` marker. + (function () { + // Code snippet begins after !show marker below + /// !show + someExample(); + /// !hide + // Code snippet ended before !hide marker above + })() + " + `); expect(snippets[0].visibleSource).toEqual('someExample();'); - expect(snippets[0].completeSource).toEqual( - ['// This is a fixture', '/// !show', 'someExample();', '/// !hide'].join( +}); + +test('Fixture allows use of import statements', () => { + const snippets = Array.from( + allTypeScriptSnippets([ + { + assembly: fakeAssembly({ + types: { + 'asm.MyType': { + kind: spec.TypeKind.Class, + assembly: 'asm', + fqn: 'asm.MyType', + name: 'MyType', + docs: { + example: [ + '/// fixture=explicit', + 'import { exit } from "process";', + 'someExample();', + 'exit(0);', + ].join('\n'), + }, + }, + }, + }), + directory: path.join(__dirname, 'fixtures'), + }, + ]), + ); + + expect(snippets[0].completeSource).toMatchInlineSnapshot(` + "// Hoisted imports begin after !show marker below + /// !show + import { exit } from \\"process\\"; + /// !hide + // Hoisted imports ended before !hide marker above + // This is a fixture + + // This is a wrapper so that \`import\` statements are invalid if included in + // the code example that'll be inlined at the \`here\` marker. + (function () { + // Code snippet begins after !show marker below + /// !show + + someExample(); + exit(0); + /// !hide + // Code snippet ended before !hide marker above + })() + " + `); + expect(snippets[0].visibleSource).toEqual( + ['import { exit } from "process";', 'someExample();', 'exit(0);'].join( '\n', ), ); @@ -151,21 +226,3 @@ test('Backwards compatibility with literate integ tests', () => { mockfs.restore(); } }); - -export function fakeAssembly(parts: Partial): spec.Assembly { - return Object.assign( - { - schema: spec.SchemaVersion.LATEST, - name: '', - description: '', - homepage: '', - repository: { directory: '', type: '', url: '' }, - author: { email: '', name: '', organization: false, roles: [], url: '' }, - fingerprint: '', - version: '', - jsiiVersion: '', - license: '', - }, - parts, - ); -} diff --git a/packages/jsii-rosetta/test/jsii/fake-assembly.ts b/packages/jsii-rosetta/test/jsii/fake-assembly.ts new file mode 100644 index 0000000000..09dcf022f3 --- /dev/null +++ b/packages/jsii-rosetta/test/jsii/fake-assembly.ts @@ -0,0 +1,17 @@ +import { Assembly, SchemaVersion } from '@jsii/spec'; + +export function fakeAssembly(parts: Partial): Assembly { + return { + schema: SchemaVersion.LATEST, + name: 'test-assembly', + description: 'A fake assembly used for tests', + homepage: '', + repository: { directory: '', type: '', url: '' }, + author: { email: '', name: '', organization: false, roles: [], url: '' }, + fingerprint: '', + version: '0.0.0-use.local', + jsiiVersion: '0.0.0-use.local', + license: 'UNLICENSED', + ...parts, + }; +} diff --git a/packages/jsii-rosetta/test/jsii/fixtures/rosetta/explicit.ts-fixture b/packages/jsii-rosetta/test/jsii/fixtures/rosetta/explicit.ts-fixture index d87a43e2f4..be7f3187fd 100644 --- a/packages/jsii-rosetta/test/jsii/fixtures/rosetta/explicit.ts-fixture +++ b/packages/jsii-rosetta/test/jsii/fixtures/rosetta/explicit.ts-fixture @@ -1,2 +1,7 @@ // This is a fixture -/// here \ No newline at end of file + +// This is a wrapper so that `import` statements are invalid if included in +// the code example that'll be inlined at the `here` marker. +(function () { + /// here +})() diff --git a/packages/jsii-rosetta/test/rosetta.test.ts b/packages/jsii-rosetta/test/rosetta.test.ts index 1a6ee4d3bf..c9bcb7e920 100644 --- a/packages/jsii-rosetta/test/rosetta.test.ts +++ b/packages/jsii-rosetta/test/rosetta.test.ts @@ -1,3 +1,5 @@ +import * as mockfs from 'mock-fs'; + import { Rosetta, LanguageTablet, @@ -5,9 +7,8 @@ import { TypeScriptSnippet, DEFAULT_TABLET_NAME, } from '../lib'; -import * as mockfs from 'mock-fs'; import { TargetLanguage } from '../lib/languages'; -import { fakeAssembly } from './jsii/assemblies.test'; +import { fakeAssembly } from './jsii/fake-assembly'; const SAMPLE_CODE: TypeScriptSnippet = { visibleSource: 'callThisFunction();', @@ -91,6 +92,7 @@ test('Rosetta object can do translation and annotation of snippets in MarkDown', 'That was it, thank you for your attention.', ].join('\n'), 'python', + false, (trans) => { return { ...trans, diff --git a/packages/jsii-rosetta/test/translations.test.ts b/packages/jsii-rosetta/test/translations.test.ts index 9f24abf346..ec5619067b 100644 --- a/packages/jsii-rosetta/test/translations.test.ts +++ b/packages/jsii-rosetta/test/translations.test.ts @@ -1,9 +1,10 @@ import * as fs from 'fs-extra'; import * as path from 'path'; + import { JavaVisitor, PythonVisitor, SnippetTranslator } from '../lib'; -import { AstHandler } from '../lib/renderer'; -import { VisualizeAstVisitor } from '../lib/languages/visualize'; import { CSharpVisitor } from '../lib/languages/csharp'; +import { VisualizeAstVisitor } from '../lib/languages/visualize'; +import { AstHandler } from '../lib/renderer'; // This iterates through all subdirectories of this directory, // and creates a Jest test for each, by translating the TypeScript file it finds there, @@ -47,71 +48,60 @@ const SUPPORTED_LANGUAGES = new Array( }, ); -/** - * Automatically setup tests from source files found in the directory - */ -function makeTests() { - const translationsRoot = path.join(__dirname, 'translations'); - const typeScriptTests = allFiles(translationsRoot) - .filter((f) => f.endsWith('.ts') && !f.endsWith('.d.ts')) - .filter((f) => !f.endsWith('.test.ts')); // Exclude self and other jest tests in this dir - - typeScriptTests.forEach((typeScriptTest) => { - describe(`Translating ${path.relative( - translationsRoot, - typeScriptTest, - )}`, () => { - const typeScriptSource = fs.readFileSync(typeScriptTest, { - encoding: 'utf-8', - }); +const translationsRoot = path.join(__dirname, 'translations'); +const typeScriptTests = allFiles(translationsRoot) + .filter((f) => f.endsWith('.ts') && !f.endsWith('.d.ts')) + .filter((f) => !f.endsWith('.test.ts')); // Exclude self and other jest tests in this dir + +for (const typeScriptTest of typeScriptTests) { + describe(`Translating ${path.relative( + translationsRoot, + typeScriptTest, + )}`, () => { + const typeScriptSource = fs.readFileSync(typeScriptTest, { + encoding: 'utf-8', + }); - let translator: SnippetTranslator; - let anyFailed = false; - beforeAll(() => { - translator = new SnippetTranslator({ - visibleSource: typeScriptSource, - where: typeScriptTest, - }); - }); - afterAll(() => { - // Print the AST for tests that failed (to help debugging) - if (anyFailed && translator) { - const vis = translator.renderUsing(new VisualizeAstVisitor(true)); - console.log(`${vis}\n`); - } - translator = undefined as any; // Need this to properly release memory + let translator: SnippetTranslator; + let anyFailed = false; + beforeAll(() => { + translator = new SnippetTranslator({ + visibleSource: typeScriptSource, + where: typeScriptTest, }); + }); - SUPPORTED_LANGUAGES.forEach((supportedLanguage) => { - const languageFile = replaceExtension( - typeScriptTest, - supportedLanguage.extension, - ); - - // Use 'test.skip' if the file doesn't exist so that we can clearly see it's missing. - const testConstructor = fs.existsSync(languageFile) ? test : test.skip; - - testConstructor(`to ${supportedLanguage.name}`, () => { - const expected = fs.readFileSync(languageFile, { encoding: 'utf-8' }); - try { - const translation = translator.renderUsing( - supportedLanguage.visitor, - ); - expect(stripEmptyLines(translation)).toEqual( - stripEmptyLines(stripCommonWhitespace(expected)), - ); - } catch (e) { - anyFailed = true; - throw e; - } - }); - }); + afterAll(() => { + // Print the AST for tests that failed (to help debugging) + if (anyFailed && translator) { + const vis = translator.renderUsing(new VisualizeAstVisitor(true)); + console.log(`${vis}\n`); + } + translator = undefined as any; // Need this to properly release memory }); + + for (const { name, extension, visitor } of SUPPORTED_LANGUAGES) { + const languageFile = replaceExtension(typeScriptTest, extension); + + // Use 'test.skip' if the file doesn't exist so that we can clearly see it's missing. + const testConstructor = fs.existsSync(languageFile) ? test : test.skip; + + testConstructor(`to ${name}`, () => { + const expected = fs.readFileSync(languageFile, { encoding: 'utf-8' }); + try { + const translation = translator.renderUsing(visitor); + expect(stripEmptyLines(translation)).toEqual( + stripEmptyLines(stripCommonWhitespace(expected)), + ); + } catch (e) { + anyFailed = true; + throw e; + } + }); + } }); } -makeTests(); - function allFiles(root: string) { const ret: string[] = []; recurse(root); diff --git a/packages/jsii-rosetta/test/translations/calls/shorthand_property.java b/packages/jsii-rosetta/test/translations/calls/shorthand_property.java index 32e91fafb4..2a3319fafb 100644 --- a/packages/jsii-rosetta/test/translations/calls/shorthand_property.java +++ b/packages/jsii-rosetta/test/translations/calls/shorthand_property.java @@ -1,2 +1,2 @@ String foo = "hello"; -callFunction(Map.of("foo", foo)); \ No newline at end of file +callFunction(Map.of("foo", foo)); diff --git a/packages/jsii-rosetta/test/translations/calls/will_type_deep_structs_directly_if_type_info_is_available.java b/packages/jsii-rosetta/test/translations/calls/will_type_deep_structs_directly_if_type_info_is_available.java index ede4c61ed5..4e918ed56a 100644 --- a/packages/jsii-rosetta/test/translations/calls/will_type_deep_structs_directly_if_type_info_is_available.java +++ b/packages/jsii-rosetta/test/translations/calls/will_type_deep_structs_directly_if_type_info_is_available.java @@ -1,30 +1,30 @@ public class BaseDeeperStruct { - private int a; - public int getA() { + private Number a; + public Number getA() { return this.a; } - public BaseDeeperStruct a(int a) { + public BaseDeeperStruct a(Number a) { this.a = a; return this; } } public class DeeperStruct extends BaseDeeperStruct { - private int b; - public int getB() { + private Number b; + public Number getB() { return this.b; } - public DeeperStruct b(int b) { + public DeeperStruct b(Number b) { this.b = b; return this; } } public class OuterStruct { - private int foo; - public int getFoo() { + private Number foo; + public Number getFoo() { return this.foo; } - public OuterStruct foo(int foo) { + public OuterStruct foo(Number foo) { this.foo = foo; return this; } @@ -38,7 +38,7 @@ public OuterStruct deeper(DeeperStruct deeper) { } } -public void foo(int x, OuterStruct outer) { +public void foo(Number x, OuterStruct outer) { } foo(25, new OuterStruct().foo(3).deeper(new DeeperStruct() diff --git a/packages/jsii-rosetta/test/translations/classes/class_with_props_argument.java b/packages/jsii-rosetta/test/translations/classes/class_with_props_argument.java index ac863ad0bc..2a1e928c21 100644 --- a/packages/jsii-rosetta/test/translations/classes/class_with_props_argument.java +++ b/packages/jsii-rosetta/test/translations/classes/class_with_props_argument.java @@ -7,11 +7,11 @@ public MyClassProps prop1(String prop1) { this.prop1 = prop1; return this; } - private int prop2; - public int getProp2() { + private Number prop2; + public Number getProp2() { return this.prop2; } - public MyClassProps prop2(int prop2) { + public MyClassProps prop2(Number prop2) { this.prop2 = prop2; return this; } diff --git a/packages/jsii-rosetta/test/translations/classes/constructor_with_optional_params.java b/packages/jsii-rosetta/test/translations/classes/constructor_with_optional_params.java index 07a6dbbe8e..db3fccb012 100644 --- a/packages/jsii-rosetta/test/translations/classes/constructor_with_optional_params.java +++ b/packages/jsii-rosetta/test/translations/classes/constructor_with_optional_params.java @@ -7,6 +7,6 @@ public A(String a) { this(a, 3); } - public A(String a, int b) { + public A(String a, Number b) { } } diff --git a/packages/jsii-rosetta/test/translations/expressions/as_expression.java b/packages/jsii-rosetta/test/translations/expressions/as_expression.java index d61c0c41c8..a33f2d9a3a 100644 --- a/packages/jsii-rosetta/test/translations/expressions/as_expression.java +++ b/packages/jsii-rosetta/test/translations/expressions/as_expression.java @@ -1 +1 @@ -System.out.println((int)3); +System.out.println((Number)3); diff --git a/packages/jsii-rosetta/test/translations/expressions/computed_key.cs b/packages/jsii-rosetta/test/translations/expressions/computed_key.cs new file mode 100644 index 0000000000..c967d3aa6b --- /dev/null +++ b/packages/jsii-rosetta/test/translations/expressions/computed_key.cs @@ -0,0 +1,4 @@ +string y = "WHY?"; + +IDictionary x = new Dictionary { { $"key-{y}", "value" } }; +IDictionary z = new Dictionary { { y, true } }; diff --git a/packages/jsii-rosetta/test/translations/expressions/computed_key.java b/packages/jsii-rosetta/test/translations/expressions/computed_key.java new file mode 100644 index 0000000000..1aa7664779 --- /dev/null +++ b/packages/jsii-rosetta/test/translations/expressions/computed_key.java @@ -0,0 +1,4 @@ +String y = "WHY?"; + +Map x = Map.of(String.format("key-%s", y), "value"); +Map z = Map.of(y, true); diff --git a/packages/jsii-rosetta/test/translations/expressions/computed_key.py b/packages/jsii-rosetta/test/translations/expressions/computed_key.py new file mode 100644 index 0000000000..6e60171ea6 --- /dev/null +++ b/packages/jsii-rosetta/test/translations/expressions/computed_key.py @@ -0,0 +1,4 @@ +y = "WHY?" + +x = {f"key-{y}": "value"} +z = {y: True} diff --git a/packages/jsii-rosetta/test/translations/expressions/computed_key.ts b/packages/jsii-rosetta/test/translations/expressions/computed_key.ts new file mode 100644 index 0000000000..5e53df9866 --- /dev/null +++ b/packages/jsii-rosetta/test/translations/expressions/computed_key.ts @@ -0,0 +1,4 @@ +const y = 'WHY?'; + +const x = { [`key-${y}`]: 'value' }; +const z = { [y]: true }; diff --git a/packages/jsii-rosetta/test/translations/expressions/string_interpolation.cs b/packages/jsii-rosetta/test/translations/expressions/string_interpolation.cs index 4d5e78ac30..0a9840046f 100644 --- a/packages/jsii-rosetta/test/translations/expressions/string_interpolation.cs +++ b/packages/jsii-rosetta/test/translations/expressions/string_interpolation.cs @@ -1,3 +1,10 @@ string x = "world"; string y = "well"; -Console.WriteLine($"Hello, {x}, it works {y}!"); \ No newline at end of file +Console.WriteLine($"Hello, {x}, it works {y}!"); + +// And now a multi-line expression +Console.WriteLine($@" +Hello, {x}. + +It works {y}! +"); diff --git a/packages/jsii-rosetta/test/translations/expressions/string_interpolation.java b/packages/jsii-rosetta/test/translations/expressions/string_interpolation.java index 3756a2eb3f..5b44bc5aec 100644 --- a/packages/jsii-rosetta/test/translations/expressions/string_interpolation.java +++ b/packages/jsii-rosetta/test/translations/expressions/string_interpolation.java @@ -1,3 +1,6 @@ String x = "world"; String y = "well"; -System.out.println("Hello, " + x + ", it works " + y + "!"); +System.out.println(String.format("Hello, %s, it works %s!", x, y)); + +// And now a multi-line expression +System.out.println(String.format("%nHello, %s.%n%nIt works %s!%n", x, y)); diff --git a/packages/jsii-rosetta/test/translations/expressions/string_interpolation.py b/packages/jsii-rosetta/test/translations/expressions/string_interpolation.py index 82840ad68d..c03cb7263f 100644 --- a/packages/jsii-rosetta/test/translations/expressions/string_interpolation.py +++ b/packages/jsii-rosetta/test/translations/expressions/string_interpolation.py @@ -1,3 +1,10 @@ x = "world" y = "well" -print(f"Hello, {x}, it works {y}!") \ No newline at end of file +print(f"Hello, {x}, it works {y}!") + +# And now a multi-line expression +print(f""" +Hello, {x}. + +It works {y}! +""") diff --git a/packages/jsii-rosetta/test/translations/expressions/string_interpolation.ts b/packages/jsii-rosetta/test/translations/expressions/string_interpolation.ts index 0954225c8d..e2e5ae239f 100644 --- a/packages/jsii-rosetta/test/translations/expressions/string_interpolation.ts +++ b/packages/jsii-rosetta/test/translations/expressions/string_interpolation.ts @@ -1,3 +1,10 @@ -const x = "world"; -const y = "well"; -console.log(`Hello, ${x}, it works ${y}!`); \ No newline at end of file +const x = 'world'; +const y = 'well'; +console.log(`Hello, ${x}, it works ${y}!`); + +// And now a multi-line expression +console.log(` +Hello, ${x}. + +It works ${y}! +`); diff --git a/packages/jsii-rosetta/test/translations/expressions/string_literal.cs b/packages/jsii-rosetta/test/translations/expressions/string_literal.cs new file mode 100644 index 0000000000..64c5ebc69d --- /dev/null +++ b/packages/jsii-rosetta/test/translations/expressions/string_literal.cs @@ -0,0 +1,9 @@ +string literal = @" +This si a multiline string literal. + +""It's cool!"". + +YEAH BABY!! + +Litteral \n right here (not a newline!) +"; diff --git a/packages/jsii-rosetta/test/translations/expressions/string_literal.java b/packages/jsii-rosetta/test/translations/expressions/string_literal.java new file mode 100644 index 0000000000..d81e09e1e9 --- /dev/null +++ b/packages/jsii-rosetta/test/translations/expressions/string_literal.java @@ -0,0 +1 @@ +String literal = "\nThis si a multiline string literal.\n\n\"It's cool!\".\n\nYEAH BABY!!\n\nLitteral \\n right here (not a newline!)\n"; diff --git a/packages/jsii-rosetta/test/translations/expressions/string_literal.py b/packages/jsii-rosetta/test/translations/expressions/string_literal.py new file mode 100644 index 0000000000..b9f43b8966 --- /dev/null +++ b/packages/jsii-rosetta/test/translations/expressions/string_literal.py @@ -0,0 +1,9 @@ +literal = """ +This si a multiline string literal. + +"It's cool!". + +YEAH BABY!! + +Litteral \\n right here (not a newline!) +""" diff --git a/packages/jsii-rosetta/test/translations/expressions/string_literal.ts b/packages/jsii-rosetta/test/translations/expressions/string_literal.ts new file mode 100644 index 0000000000..ebff58a601 --- /dev/null +++ b/packages/jsii-rosetta/test/translations/expressions/string_literal.ts @@ -0,0 +1,9 @@ +const literal = ` +This si a multiline string literal. + +"It's cool!". + +YEAH BABY!! + +Litteral \\n right here (not a newline!) +`; diff --git a/packages/jsii-rosetta/test/translations/structs/var_new_class_unknown_struct.java b/packages/jsii-rosetta/test/translations/structs/var_new_class_unknown_struct.java index e4b7c7b990..0a7551955e 100644 --- a/packages/jsii-rosetta/test/translations/structs/var_new_class_unknown_struct.java +++ b/packages/jsii-rosetta/test/translations/structs/var_new_class_unknown_struct.java @@ -1,3 +1,3 @@ -var vpc = Vpc.Builder.create(this, "Something") +Object vpc = Vpc.Builder.create(this, "Something") .argument(5) .build(); diff --git a/packages/jsii-rosetta/tsconfig.json b/packages/jsii-rosetta/tsconfig.json index 377744f992..b03e964995 100644 --- a/packages/jsii-rosetta/tsconfig.json +++ b/packages/jsii-rosetta/tsconfig.json @@ -5,10 +5,11 @@ ], "exclude": [ "examples", - "test/translations/**/*.ts" + "test/translations/**/*.ts", + "jest.config.ts", ], "references": [ { "path": "../jsii" }, - { "path": "../@jsii/spec" } - ] + { "path": "../@jsii/spec" }, + ], } diff --git a/packages/jsii/bin/jsii.ts b/packages/jsii/bin/jsii.ts index cece38eb48..c34d8fe6ee 100644 --- a/packages/jsii/bin/jsii.ts +++ b/packages/jsii/bin/jsii.ts @@ -2,7 +2,9 @@ import * as log4js from 'log4js'; import * as path from 'path'; import * as process from 'process'; import * as yargs from 'yargs'; + import { Compiler } from '../lib/compiler'; +import { configureCategories } from '../lib/jsii-diagnostic'; import { loadProjectInfo } from '../lib/project-info'; import * as utils from '../lib/utils'; import { VERSION } from '../lib/version'; @@ -13,39 +15,59 @@ const warningTypes = Object.keys(enabledWarnings); (async () => { const argv = yargs .env('JSII') - .option('watch', { - alias: 'w', - type: 'boolean', - desc: 'Watch for file changes and recompile automatically', - }) + .command( + ['$0 [PROJECT_ROOT]', 'compile [PROJECT_ROOT]'], + 'Compiles a jsii/TypeScript project', + (argv) => + argv + .positional('PROJECT_ROOT', { + type: 'string', + desc: 'The root of the project to be compiled', + default: '.', + normalize: true, + }) + .option('watch', { + alias: 'w', + type: 'boolean', + desc: 'Watch for file changes and recompile automatically', + }) + .option('project-references', { + alias: 'r', + type: 'boolean', + desc: + 'Generate TypeScript project references (also [package.json].jsii.projectReferences)', + }) + .option('fix-peer-dependencies', { + type: 'boolean', + default: true, + desc: + 'Automatically add missing entries in the peerDependencies section of package.json', + }) + .options('fail-on-warnings', { + alias: 'Werr', + type: 'boolean', + desc: 'Treat warnings as errors', + }) + .option('silence-warnings', { + type: 'array', + default: [], + desc: `List of warnings to silence (warnings: ${warningTypes.join( + ',', + )})`, + }) + .option('strip-deprecated', { + type: 'boolean', + default: false, + desc: + '[EXPERIMENTAL] Hides all @deprecated members from the API (implementations remain)', + }), + ) .option('verbose', { alias: 'v', type: 'count', desc: 'Increase the verbosity of output', global: true, }) - .option('project-references', { - alias: 'r', - type: 'boolean', - desc: - 'Generate TypeScript project references (also [package.json].jsii.projectReferences)', - }) - .option('fix-peer-dependencies', { - type: 'boolean', - default: true, - desc: - 'Automatically add missing entries in the peerDependencies section of package.json', - }) - .options('fail-on-warnings', { - alias: 'Werr', - type: 'boolean', - desc: 'Treat warnings as errors', - }) - .option('silence-warnings', { - type: 'array', - default: [], - desc: `List of warnings to silence (warnings: ${warningTypes.join(',')})`, - }) .help() .version( // eslint-disable-next-line @typescript-eslint/no-require-imports,@typescript-eslint/no-var-requires @@ -55,7 +77,7 @@ const warningTypes = Object.keys(enabledWarnings); _configureLog4js(argv.verbose); const projectRoot = path.normalize( - path.resolve(process.cwd(), argv._[0] ?? '.'), + path.resolve(process.cwd(), argv.PROJECT_ROOT), ); const projectInfo = await loadProjectInfo(projectRoot, { @@ -75,10 +97,13 @@ const warningTypes = Object.keys(enabledWarnings); enabledWarnings[key] = false; } + configureCategories(projectInfo.diagnostics ?? {}); + const compiler = new Compiler({ projectInfo, projectReferences: argv['project-references'], failOnWarnings: argv['fail-on-warnings'], + stripDeprecated: argv['strip-deprecated'], }); const result = argv.watch ? compiler.watch() : compiler.emit(); diff --git a/packages/jsii/generate.sh b/packages/jsii/generate.sh index 0c1810cd6b..b88f4cb27b 100644 --- a/packages/jsii/generate.sh +++ b/packages/jsii/generate.sh @@ -9,12 +9,14 @@ if [ -z "${commit}" ]; then suffix="@dev" fi +VERSION=$(node -p "require('./package.json').version.replace(/\\+[0-9a-f]+\$/, '')") + cat > lib/version.ts <(); + + /** + * Submodule information + * + * Contains submodule information for all namespaces that have been seen + * across all assemblies (this and dependencies). + * + * Filtered to local submodules only at time of writing the assembly out to disk. + */ private readonly _submodules = new Map(); /** @@ -54,7 +69,12 @@ export class Assembler implements Emitter { public readonly projectInfo: ProjectInfo, public readonly program: ts.Program, public readonly stdlib: string, + options: AssemblerOptions = {}, ) { + if (options.stripDeprecated) { + this.deprecatedRemover = new DeprecatedRemover(this._typeChecker); + } + const dts = projectInfo.types; let mainFile = dts.replace(/\.d\.ts(x?)$/, '.ts$1'); @@ -74,6 +94,17 @@ export class Assembler implements Emitter { } this.mainFile = path.resolve(projectInfo.projectRoot, mainFile); + this.runtimeTypeInfoInjector = new RuntimeTypeInfoInjector( + projectInfo.version, + ); + } + + public get customTransformers(): ts.CustomTransformers { + return combinedTransformers( + this.deprecatedRemover?.customTransformers ?? {}, + this.runtimeTypeInfoInjector.makeTransformers(), + this.commentReplacer.makeTransformers(), + ); } private get _typeChecker(): ts.TypeChecker { @@ -174,10 +205,10 @@ export class Assembler implements Emitter { schema: spec.SchemaVersion.LATEST, name: this.projectInfo.name, version: this.projectInfo.version, - description: this.projectInfo.description || this.projectInfo.name, + description: this.projectInfo.description ?? this.projectInfo.name, license: this.projectInfo.license, keywords: this.projectInfo.keywords, - homepage: this.projectInfo.homepage || this.projectInfo.repository.url, + homepage: this.projectInfo.homepage ?? this.projectInfo.repository.url, author: this.projectInfo.author, contributors: this.projectInfo.contributors && [ ...this.projectInfo.contributors, @@ -192,17 +223,20 @@ export class Assembler implements Emitter { ), bundled: this.projectInfo.bundleDependencies, types: this._types, - submodules: noEmptyDict( - toSubmoduleDeclarations(this._submodules.values()), - ), + submodules: noEmptyDict(toSubmoduleDeclarations(this.mySubmodules())), targets: this.projectInfo.targets, metadata: this.projectInfo.metadata, docs, readme, jsiiVersion, + bin: this.projectInfo.bin, fingerprint: '', }; + if (this.deprecatedRemover) { + this._diagnostics.push(...this.deprecatedRemover.removeFrom(assembly)); + } + const validator = new Validator(this.projectInfo, assembly); const validationResult = await validator.emit(); if (!validationResult.emitSkipped) { @@ -535,6 +569,14 @@ export class Assembler implements Emitter { return; } if (ts.isModuleDeclaration(declaration)) { + // Looks like: + // + // export some_namespace { + // ... + // } + // + // No way to configure targets + const { fqn, fqnResolutionPrefix } = await qualifiedNameOf.call( this, symbol, @@ -616,11 +658,13 @@ export class Assembler implements Emitter { symbol, ); const targets = await loadSubmoduleTargetConfig(sourceFile.fileName); + const readme = await loadSubmoduleReadMe(sourceFile.fileName); this._submodules.set(symbol, { fqn, fqnResolutionPrefix, targets, + readme, locationInModule: this.declarationLocation(declaration), }); await this._addToSubmodule(symbol, sourceModule, packageRoot); @@ -662,6 +706,31 @@ export class Assembler implements Emitter { const data = await fs.readJson(jsiirc); return data.targets; } + + /** + * Load the README for the given submodule + * + * If the submodule is loaded from a complete directory (determined by the 'main' + * file ending in `index.[d.]ts`, then we load `README.md` in that same directory. + * + * If the submodule is loaded from a file, like `mymodule.[d.]ts`, we will load + * `mymodule.README.md`. + */ + async function loadSubmoduleReadMe( + submoduleMain: string, + ): Promise { + const fileBase = path.basename(submoduleMain).replace(/(\.d)?\.ts$/, ''); + const readMeName = + fileBase === 'index' ? `README.md` : `${fileBase}.README.md`; + const fullPath = path.join(path.dirname(submoduleMain), readMeName); + + if (!(await fs.pathExists(fullPath))) { + return undefined; + } + return { + markdown: await fs.readFile(fullPath, { encoding: 'utf-8' }), + }; + } } /** @@ -697,8 +766,7 @@ export class Assembler implements Emitter { this._diagnostics.push( JsiiDiagnostic.JSII_3003_SYMBOL_IS_EXPORTED_TWICE.create( - (symbol.valueDeclaration as { name?: ts.Node }).name ?? - symbol.valueDeclaration, + _nameOrDeclarationNode(symbol), refs[0].name, refs[1].name, ) @@ -829,6 +897,9 @@ export class Assembler implements Emitter { this._typeChecker.getTypeAtLocation(node), context, ); + if (jsiiType) { + this.registerExportedClassFqn(node, jsiiType.fqn); + } } else if (ts.isInterfaceDeclaration(node) && _isExported(node)) { // export interface Name { ... } this._validateHeritageClauses(node.heritageClauses); @@ -876,7 +947,10 @@ export class Assembler implements Emitter { return allTypes; } else { this._diagnostics.push( - JsiiDiagnostic.JSII_9998_UNSUPORTED_NODE.create(node, node.kind), + JsiiDiagnostic.JSII_9998_UNSUPPORTED_NODE.create( + ts.getNameOfDeclaration(node) ?? node, + node.kind, + ), ); } @@ -899,13 +973,10 @@ export class Assembler implements Emitter { (name) => `${this.projectInfo.name}.${name}` === jsiiType!.fqn, ); if (colliding != null) { - const submoduleDecl = - submodule.valueDeclaration ?? submodule.declarations[0]; - const submoduleDeclName = - (submoduleDecl as { name?: ts.Node }).name ?? submoduleDecl; + const submoduleDeclName = _nameOrDeclarationNode(submodule); this._diagnostics.push( JsiiDiagnostic.JSII_5011_SUBMODULE_NAME_CONFLICT.create( - (node as { name?: ts.Node }).name ?? node, + ts.getNameOfDeclaration(node) ?? node, submodule.name, jsiiType.name, candidates, @@ -941,7 +1012,7 @@ export class Assembler implements Emitter { if (nestedType.namespace !== nestedContext.namespace.join('.')) { this._diagnostics.push( JsiiDiagnostic.JSII_5012_NAMESPACE_IN_TYPE.create( - (node as { name?: ts.Node }).name ?? node, + ts.getNameOfDeclaration(node) ?? node, jsiiType.fqn, nestedType.namespace!, ), @@ -962,6 +1033,12 @@ export class Assembler implements Emitter { for (const clause of clauses) { for (const node of clause.types) { const parentType = this._typeChecker.getTypeAtLocation(node); + if (parentType.symbol == null) { + // The parent type won't have a symbol if it's an "error type" inserted by the type checker when the original + // code contains a compilation error. In such cases, the TypeScript compiler will already have reported about + // the incoherent declarations, so we'll just not re-validate it there (we'd fail anyway). + continue; + } // For some reason, we cannot trust parentType.isClassOrInterface() const badDecl = parentType.symbol.declarations.find( (decl) => @@ -1077,14 +1154,18 @@ export class Assembler implements Emitter { type.symbol.name }`; - const jsiiType: spec.ClassType = { - assembly: this.projectInfo.name, - fqn, - kind: spec.TypeKind.Class, - name: type.symbol.name, - namespace: ctx.namespace.length > 0 ? ctx.namespace.join('.') : undefined, - docs: this._visitDocumentation(type.symbol, ctx), - }; + const jsiiType: spec.ClassType = bindings.setClassRelatedNode( + { + assembly: this.projectInfo.name, + fqn, + kind: spec.TypeKind.Class, + name: type.symbol.name, + namespace: + ctx.namespace.length > 0 ? ctx.namespace.join('.') : undefined, + docs: this._visitDocumentation(type.symbol, ctx), + }, + type.symbol.valueDeclaration as ts.ClassDeclaration, + ); if (_isAbstract(type.symbol, jsiiType)) { jsiiType.abstract = true; @@ -1167,7 +1248,7 @@ export class Assembler implements Emitter { continue; } else if (clause.token !== ts.SyntaxKind.ImplementsKeyword) { this._diagnostics.push( - JsiiDiagnostic.JSII_9998_UNSUPORTED_NODE.create( + JsiiDiagnostic.JSII_9998_UNSUPPORTED_NODE.create( clause, `Ignoring ${ts.SyntaxKind[clause.token]} heritage clause`, ), @@ -1240,10 +1321,18 @@ export class Assembler implements Emitter { } for (const memberDecl of classDecl.members) { - // The "??" is to get to the __constructor symbol (getSymbolAtLocation wouldn't work there..) - const member = - this._typeChecker.getSymbolAtLocation(memberDecl.name!) ?? - ((memberDecl as any).symbol as ts.Symbol); + if (ts.isSemicolonClassElement(memberDecl)) { + this._diagnostics.push( + JsiiDiagnostic.JSII_9996_UNNECESSARY_TOKEN.create(memberDecl), + ); + continue; + } + + const member: ts.Symbol = ts.isConstructorDeclaration(memberDecl) + ? (memberDecl as any).symbol + : this._typeChecker.getSymbolAtLocation( + ts.getNameOfDeclaration(memberDecl)!, + )!; if ( !(declaringType.symbol.getDeclarations() ?? []).find( @@ -1288,8 +1377,8 @@ export class Assembler implements Emitter { ); } else { this._diagnostics.push( - JsiiDiagnostic.JSII_9998_UNSUPORTED_NODE.create( - memberDecl, + JsiiDiagnostic.JSII_9998_UNSUPPORTED_NODE.create( + ts.getNameOfDeclaration(memberDecl) ?? memberDecl, memberDecl.kind, ), ); @@ -1503,7 +1592,7 @@ export class Assembler implements Emitter { */ private _isPrivateOrInternal( symbol: ts.Symbol, - validateDeclaration?: ts.Declaration & { name?: ts.Node }, + validateDeclaration?: ts.Declaration, ): boolean { const hasInternalJsDocTag = _hasInternalJsDocTag(symbol); const hasUnderscorePrefix = @@ -1527,7 +1616,7 @@ export class Assembler implements Emitter { if (!hasUnderscorePrefix) { this._diagnostics.push( JsiiDiagnostic.JSII_8005_INTERNAL_UNDERSCORE.create( - validateDeclaration.name ?? validateDeclaration, + ts.getNameOfDeclaration(validateDeclaration) ?? validateDeclaration, symbol.name, ), ); @@ -1536,7 +1625,7 @@ export class Assembler implements Emitter { if (!hasInternalJsDocTag) { this._diagnostics.push( JsiiDiagnostic.JSII_8006_UNDERSCORE_INTERNAL.create( - validateDeclaration.name ?? validateDeclaration, + ts.getNameOfDeclaration(validateDeclaration) ?? validateDeclaration, symbol.name, ), ); @@ -1591,21 +1680,25 @@ export class Assembler implements Emitter { const typeContext = ctx.replaceStability(docs?.stability); const members = type.isUnion() ? type.types : [type]; - const jsiiType: spec.EnumType = { - assembly: this.projectInfo.name, - fqn: `${[this.projectInfo.name, ...ctx.namespace].join('.')}.${ - symbol.name - }`, - kind: spec.TypeKind.Enum, - members: members.map((m) => { - const docs = this._visitDocumentation(m.symbol, typeContext); - this.overrideDocComment(m.symbol, docs); - return { name: m.symbol.name, docs }; - }), - name: symbol.name, - namespace: ctx.namespace.length > 0 ? ctx.namespace.join('.') : undefined, - docs, - }; + const jsiiType: spec.EnumType = bindings.setEnumRelatedNode( + { + assembly: this.projectInfo.name, + fqn: `${[this.projectInfo.name, ...ctx.namespace].join('.')}.${ + symbol.name + }`, + kind: spec.TypeKind.Enum, + members: members.map((m) => { + const docs = this._visitDocumentation(m.symbol, typeContext); + this.overrideDocComment(m.symbol, docs); + return { name: m.symbol.name, docs }; + }), + name: symbol.name, + namespace: + ctx.namespace.length > 0 ? ctx.namespace.join('.') : undefined, + docs, + }, + decl as ts.EnumDeclaration, + ); this.overrideDocComment(type.getSymbol(), jsiiType?.docs); @@ -1685,14 +1778,18 @@ export class Assembler implements Emitter { type.symbol.name }`; - const jsiiType: spec.InterfaceType = { - assembly: this.projectInfo.name, - fqn, - kind: spec.TypeKind.Interface, - name: type.symbol.name, - namespace: ctx.namespace.length > 0 ? ctx.namespace.join('.') : undefined, - docs: this._visitDocumentation(type.symbol, ctx), - }; + const jsiiType: spec.InterfaceType = bindings.setInterfaceRelatedNode( + { + assembly: this.projectInfo.name, + fqn, + kind: spec.TypeKind.Interface, + name: type.symbol.name, + namespace: + ctx.namespace.length > 0 ? ctx.namespace.join('.') : undefined, + docs: this._visitDocumentation(type.symbol, ctx), + }, + type.symbol.declarations[0] as ts.InterfaceDeclaration, + ); const { interfaces, erasedBases } = await this._processBaseInterfaces( fqn, @@ -1745,11 +1842,10 @@ export class Assembler implements Emitter { type.symbol.declarations[0]) as ts.InterfaceDeclaration, ); } else { - const declaration = member.valueDeclaration ?? member.declarations[0]; this._diagnostics.push( - JsiiDiagnostic.JSII_9998_UNSUPORTED_NODE.create( - declaration, - declaration.kind, + JsiiDiagnostic.JSII_9998_UNSUPPORTED_NODE.create( + _nameOrDeclarationNode(member), + (member.valueDeclaration ?? member.declarations[0]).kind, ), ); } @@ -1781,7 +1877,7 @@ export class Assembler implements Emitter { if (!jsiiType.datatype && !interfaceName) { this._diagnostics.push( JsiiDiagnostic.JSII_8007_BEHAVIORAL_INTERFACE_NAME.create( - (declaration as { name?: ts.Node }).name ?? declaration, + ts.getNameOfDeclaration(declaration) ?? declaration, jsiiType.name, ), ); @@ -1797,11 +1893,9 @@ export class Assembler implements Emitter { for (const prop of jsiiType.properties ?? []) { if (!prop.immutable) { const p = type.getProperty(prop.name)!; - 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, + _nameOrDeclarationNode(p), p.name, jsiiType, ), @@ -1935,23 +2029,27 @@ export class Assembler implements Emitter { ); const returnType = signature.getReturnType(); - const method: spec.Method = { - abstract: _isAbstract(symbol, type) || undefined, - name: symbol.name, - parameters: parameters.length > 0 ? parameters : undefined, - protected: _isProtected(symbol) || undefined, - returns: _isVoid(returnType) - ? undefined - : await this._optionalValue( - returnType, - declaration.name, - 'return type', - ), - async: _isPromise(returnType) || undefined, - static: _isStatic(symbol) || undefined, - locationInModule: this.declarationLocation(declaration), - }; - method.variadic = method.parameters?.some((p) => !!p.variadic) || undefined; + const method: spec.Method = bindings.setMethodRelatedNode( + { + abstract: _isAbstract(symbol, type) || undefined, + name: symbol.name, + parameters: parameters.length > 0 ? parameters : undefined, + protected: _isProtected(symbol) || undefined, + returns: _isVoid(returnType) + ? undefined + : await this._optionalValue( + returnType, + declaration.name, + 'return type', + ), + async: _isPromise(returnType) || undefined, + static: _isStatic(symbol) || undefined, + locationInModule: this.declarationLocation(declaration), + }, + declaration, + ); + method.variadic = + method.parameters?.some((p) => !!p.variadic) === true ? true : undefined; this._verifyConsecutiveOptionals(declaration, method.parameters); @@ -2019,8 +2117,7 @@ export class Assembler implements Emitter { if (reservingLanguages) { this._diagnostics.push( JsiiDiagnostic.JSII_5018_RESERVED_WORD.create( - ts.getNameOfDeclaration(symbol.valueDeclaration) || - symbol.valueDeclaration, + _nameOrDeclarationNode(symbol), symbol.name, reservingLanguages, ), @@ -2084,18 +2181,21 @@ export class Assembler implements Emitter { this._warnAboutReservedWords(symbol); - const property: spec.Property = { - ...(await this._optionalValue( - this._typeChecker.getTypeOfSymbolAtLocation(symbol, signature), - signature.name, - 'property type', - )), - abstract: _isAbstract(symbol, type) || undefined, - name: symbol.name, - protected: _isProtected(symbol) || undefined, - static: _isStatic(symbol) || undefined, - locationInModule: this.declarationLocation(signature), - }; + const property: spec.Property = bindings.setPropertyRelatedNode( + { + ...(await this._optionalValue( + this._typeChecker.getTypeOfSymbolAtLocation(symbol, signature), + signature.name, + 'property type', + )), + abstract: _isAbstract(symbol, type) || undefined, + name: symbol.name, + protected: _isProtected(symbol) || undefined, + static: _isStatic(symbol) || undefined, + locationInModule: this.declarationLocation(signature), + }, + signature, + ); if (ts.isGetAccessor(signature)) { const decls = symbol.getDeclarations() ?? []; @@ -2151,15 +2251,18 @@ export class Assembler implements Emitter { this._warnAboutReservedWords(paramSymbol); - const parameter: spec.Parameter = { - ...(await this._optionalValue( - this._typeChecker.getTypeAtLocation(paramDeclaration), - paramDeclaration.name, - 'parameter type', - )), - name: paramSymbol.name, - variadic: paramDeclaration.dotDotDotToken && true, - }; + const parameter: spec.Parameter = bindings.setParameterRelatedNode( + { + ...(await this._optionalValue( + this._typeChecker.getTypeAtLocation(paramDeclaration), + paramDeclaration.name, + 'parameter type', + )), + name: paramSymbol.name, + variadic: paramDeclaration.dotDotDotToken && true, + }, + paramDeclaration, + ); if (parameter.variadic && spec.isCollectionTypeReference(parameter.type)) { // TypeScript types variadic parameters as an array, but JSII uses the item-type instead. @@ -2480,6 +2583,14 @@ export class Assembler implements Emitter { } } + /** + * Updates the runtime type info with the fully-qualified name for the current class definition. + * Used by the runtime type info injector to add this information to the compiled file. + */ + private registerExportedClassFqn(clazz: ts.ClassDeclaration, fqn: string) { + this.runtimeTypeInfoInjector.registerClassFqn(clazz, fqn); + } + /** * From the given JSIIDocs, re-render the TSDoc comment for the Node * @@ -2496,8 +2607,8 @@ export class Assembler implements Emitter { */ private overrideDocComment( symbol?: ts.Symbol, - docs?: Docs, - parameters?: Record, + docs?: spec.Docs, + parameters?: Record, ) { if (!docs || !symbol) { return; @@ -2528,7 +2639,7 @@ export class Assembler implements Emitter { * We put the "(experimental)"/"(deprecated)" status into the doc * comment summary, so that it's presented front and center. */ - private docCommentDocs(docs: Readonly): Docs { + private docCommentDocs(docs: Readonly): spec.Docs { // Modify the summary if this API element has a special stability if (docs.stability === spec.Stability.Experimental && docs.summary) { return { @@ -2544,6 +2655,25 @@ export class Assembler implements Emitter { } return docs; } + + /** + * Return only those submodules from the submodules list that are submodules inside this + * assembly. + */ + private mySubmodules() { + return Array.from(this._submodules.values()).filter((m) => + m.fqn.startsWith(`${this.projectInfo.name}.`), + ); + } +} + +export interface AssemblerOptions { + /** + * Whether to remove `@deprecated` members from the generated assembly. + * + * @default false + */ + readonly stripDeprecated?: boolean; } interface SubmoduleSpec { @@ -2568,6 +2698,11 @@ interface SubmoduleSpec { * Any customized configuration for the currentl submodule. */ readonly targets?: spec.AssemblyTargets; + + /** + * Readme for this submodule (if found) + */ + readonly readme?: spec.ReadMe; } function _fingerprint(assembly: spec.Assembly): spec.Assembly { @@ -2864,7 +2999,7 @@ function toDependencyClosure( } function toSubmoduleDeclarations( - submodules: IterableIterator, + submodules: Iterable, ): spec.Assembly['submodules'] { const result: spec.Assembly['submodules'] = {}; @@ -2872,6 +3007,7 @@ function toSubmoduleDeclarations( result[submodule.fqn] = { locationInModule: submodule.locationInModule, targets: submodule.targets, + readme: submodule.readme, }; } @@ -3026,8 +3162,10 @@ async function findPackageInfo(fromDir: string): Promise { return findPackageInfo(parent); } -function paramDocs(params?: Parameter[]): Record { - const ret: Record = {}; +function paramDocs( + params?: readonly spec.Parameter[], +): Record { + const ret: Record = {}; for (const param of params ?? []) { if (param.docs) { ret[param.name] = param.docs; @@ -3048,6 +3186,19 @@ function _isThisType(type: ts.Type, typeChecker: ts.TypeChecker): boolean { return typeChecker.typeToTypeNode(type)?.kind === ts.SyntaxKind.ThisKeyword; } +/** + * Gets the name node for a given symbol; or it's first declaration if no name can be found. This is + * intended for use in placing problem markers on the right location. + * + * @param symbol the symbol for which the name node is needed. + * + * @returns the name node for the symbol, or the symbol's first declaration. + */ +function _nameOrDeclarationNode(symbol: ts.Symbol): ts.Node { + const declaration = symbol.valueDeclaration ?? symbol.declarations[0]; + return ts.getNameOfDeclaration(declaration) ?? declaration; +} + /** * A location where a type can be used. */ diff --git a/packages/jsii/lib/compiler.ts b/packages/jsii/lib/compiler.ts index 25b5b0bef7..49b1162927 100644 --- a/packages/jsii/lib/compiler.ts +++ b/packages/jsii/lib/compiler.ts @@ -4,8 +4,10 @@ import * as fs from 'fs-extra'; import * as log4js from 'log4js'; import * as path from 'path'; import * as ts from 'typescript'; + import { Assembler } from './assembler'; import { Emitter } from './emitter'; +import { JsiiDiagnostic } from './jsii-diagnostic'; import { ProjectInfo } from './project-info'; import * as utils from './utils'; @@ -14,6 +16,7 @@ const BASE_COMPILER_OPTIONS: ts.CompilerOptions = { charset: 'utf8', declaration: true, experimentalDecorators: true, + incremental: true, inlineSourceMap: true, inlineSources: true, lib: ['lib.es2018.d.ts'], @@ -30,7 +33,7 @@ const BASE_COMPILER_OPTIONS: ts.CompilerOptions = { strict: true, strictNullChecks: true, strictPropertyInitialization: true, - stripInternal: true, + stripInternal: false, target: ts.ScriptTarget.ES2018, }; @@ -47,6 +50,8 @@ export interface CompilerOptions { projectReferences?: boolean; /** Whether to fail when a warning is emitted */ failOnWarnings?: boolean; + /** Whether to strip deprecated members from emitted artifacts */ + stripDeprecated?: boolean; } export interface TypescriptConfig { @@ -201,7 +206,7 @@ export class Compiler implements Emitter { }, // Make the references absolute for the compiler projectReferences: tsconf.references?.map((ref) => ({ - path: path.resolve(ref.path), + path: path.resolve(path.dirname(this.configPath), ref.path), })), host: this.compilerHost, }); @@ -228,7 +233,9 @@ export class Compiler implements Emitter { // Do the "Assembler" part first because we need some of the analysis done in there // to post-process the AST - const assembler = new Assembler(this.options.projectInfo, program, stdlib); + const assembler = new Assembler(this.options.projectInfo, program, stdlib, { + stripDeprecated: this.options.stripDeprecated, + }); try { const assmEmit = await assembler.emit(); @@ -245,18 +252,20 @@ export class Compiler implements Emitter { diagnostics.push(...assmEmit.diagnostics); } catch (e) { - LOG.error(`Error during type model analysis: ${e}\n${e.stack}`); + diagnostics.push( + JsiiDiagnostic.JSII_9997_UNKNOWN_ERROR.createDetached(e), + ); hasErrors = true; } // Do the emit, but add in transformers which are going to replace real // comments with synthetic ones. const emit = program.emit( - undefined, - undefined, - undefined, - undefined, - assembler.commentReplacer.makeTransformers(), + undefined, // targetSourceFile + undefined, // writeFile + undefined, // cancellationToken + undefined, // emitOnlyDtsFiles + assembler.customTransformers, ); diagnostics.push(...emit.diagnostics); @@ -284,12 +293,8 @@ export class Compiler implements Emitter { */ private async buildTypeScriptConfig() { let references: string[] | undefined; - let composite: boolean | undefined; - let incremental: boolean | undefined; if (this.projectReferences) { references = await this.findProjectReferences(); - composite = true; - incremental = true; } const pi = this.options.projectInfo; @@ -298,10 +303,13 @@ export class Compiler implements Emitter { compilerOptions: { ...pi.tsc, ...BASE_COMPILER_OPTIONS, - composite, - incremental, + // Enable composite mode if project references are enabled + composite: this.projectReferences, // When incremental, configure a tsbuildinfo file - tsBuildInfoFile: incremental ? './tsconfig.tsbuildinfo' : undefined, + tsBuildInfoFile: path.join( + pi.tsc?.outDir ?? '.', + 'tsconfig.tsbuildinfo', + ), }, include: [ pi.tsc?.rootDir != null @@ -436,8 +444,10 @@ export class Compiler implements Emitter { continue; } - // eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports - const tsconfig = require(tsconfigFile); + const { config: tsconfig } = ts.readConfigFile( + tsconfigFile, + ts.sys.readFile, + ); // Add references to any TypeScript package we find that is 'composite' enabled. // Make it relative. diff --git a/packages/jsii/lib/docs.ts b/packages/jsii/lib/docs.ts index d5d92430b8..aaa7ca511f 100644 --- a/packages/jsii/lib/docs.ts +++ b/packages/jsii/lib/docs.ts @@ -104,6 +104,8 @@ export function renderSymbolDocumentation( case spec.Stability.External: tag('external', ''); break; + default: + tag('stability', docs.stability); } for (const [k, v] of Object.entries(docs.custom ?? {})) { diff --git a/packages/jsii/lib/helpers.ts b/packages/jsii/lib/helpers.ts index 16e7add970..54778c05e7 100644 --- a/packages/jsii/lib/helpers.ts +++ b/packages/jsii/lib/helpers.ts @@ -6,13 +6,15 @@ * well put it in one reusable place. */ -import * as fs from 'fs-extra'; import * as spec from '@jsii/spec'; +import * as fs from 'fs-extra'; import * as os from 'os'; import * as path from 'path'; import { DiagnosticCategory } from 'typescript'; -import { Compiler } from './compiler'; + +import { Compiler, CompilerOptions } from './compiler'; import { loadProjectInfo, ProjectInfo } from './project-info'; +import { formatDiagnostic } from './utils'; /** * Compile a piece of source and return the JSII assembly for it @@ -51,6 +53,7 @@ export interface HelperCompilationResult { export async function compileJsiiForTest( source: string | { 'index.ts': string; [name: string]: string }, cb?: (obj: PackageInfo) => void, + compilerOptions?: Omit, ): Promise { if (typeof source === 'string') { source = { 'index.ts': source }; @@ -60,12 +63,15 @@ export async function compileJsiiForTest( // I guess we could make an in-memory compiler host but that seems like work... return inTempDir(async () => { await Promise.all( - Object.entries(source).map(([fileName, content]) => - fs.writeFile(fileName, content, { encoding: 'utf-8' }), - ), + Object.entries(source).map(async ([fileName, content]) => { + await fs.mkdirp(path.dirname(fileName)); + return fs.writeFile(fileName, content, { encoding: 'utf-8' }); + }), ); + const projectInfo = await makeProjectInfo('index.ts', cb); const compiler = new Compiler({ - projectInfo: await makeProjectInfo('index.ts', cb), + projectInfo, + ...compilerOptions, }); const emitResult = await compiler.emit(); @@ -73,10 +79,10 @@ export async function compileJsiiForTest( (d) => d.category === DiagnosticCategory.Error, ); for (const error of errors) { - console.error(error.messageText); + console.error(formatDiagnostic(error, projectInfo.projectRoot)); // logDiagnostic() doesn't work out of the box, so console.error() it is. } - if (errors.length > 0) { + if (errors.length > 0 || emitResult.emitSkipped) { throw new Error('There were compiler errors'); } const assembly = await fs.readJSON('.jsii', { encoding: 'utf-8' }); diff --git a/packages/jsii/lib/jsii-diagnostic.ts b/packages/jsii/lib/jsii-diagnostic.ts index 3d22f9ada0..d923f59064 100644 --- a/packages/jsii/lib/jsii-diagnostic.ts +++ b/packages/jsii/lib/jsii-diagnostic.ts @@ -1,6 +1,7 @@ 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'; /** @@ -707,7 +708,7 @@ export class JsiiDiagnostic implements ts.Diagnostic { 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").`, + `Unable to resolve type "${reference}". It may be @internal or not exported from the module's entry point (as configured in "package.json" as "main").`, name: 'miscellaneous/unresolveable-type', }); @@ -725,7 +726,20 @@ export class JsiiDiagnostic implements ts.Diagnostic { name: 'miscellaneous/unable-to-compute-signature', }); - public static readonly JSII_9998_UNSUPORTED_NODE = Code.message({ + public static readonly JSII_9996_UNNECESSARY_TOKEN = Code.message({ + code: 9996, + formatter: () => 'Unnecessary token, consider removing it', + name: 'miscellaneous/unnecessary-token', + }); + + public static readonly JSII_9997_UNKNOWN_ERROR = Code.error({ + code: 9997, + formatter: (error: Error) => + `Unknown error: ${error.message} -- ${error.stack}`, + name: 'miscellaneous/unknown-error', + }); + + public static readonly JSII_9998_UNSUPPORTED_NODE = Code.message({ code: 9998, formatter: (kindOrMessage: ts.SyntaxKind | string) => typeof kindOrMessage === 'string' @@ -763,9 +777,7 @@ export class JsiiDiagnostic implements ts.Diagnostic { public readonly start: number | undefined; public readonly length: number | undefined; - public readonly relatedInformation = new Array< - ts.DiagnosticRelatedInformation - >(); + public readonly relatedInformation = new Array(); /** * Creates a new `JsiiDiagnostic` with the provided properties. @@ -802,3 +814,28 @@ export class JsiiDiagnostic implements ts.Diagnostic { export type DiagnosticMessageFormatter = ( ...args: any[] ) => JsiiDiagnostic['messageText']; + +export function configureCategories(records: { + [code: string]: ts.DiagnosticCategory; +}) { + for (const [code, category] of Object.entries(records)) { + const diagCode = Code.lookup(diagnosticCode(code)); + if (!diagCode) { + throw new Error(`Unrecognized diagnostic code '${code}'`); + } + diagCode.category = category; + } +} + +function diagnosticCode(str: string): string | number { + if (str.toLowerCase().startsWith('jsii')) { + const re = /^JSII(\d+)$/i.exec(str); + if (re) { + return parseInt(re[1], 10); + } + throw new Error( + `Invalid diagnostic code ${str}. A number must follow code that starts with 'JSII'`, + ); + } + return str; +} diff --git a/packages/jsii/lib/node-bindings.ts b/packages/jsii/lib/node-bindings.ts new file mode 100644 index 0000000000..dbb45e3046 --- /dev/null +++ b/packages/jsii/lib/node-bindings.ts @@ -0,0 +1,110 @@ +import * as spec from '@jsii/spec'; +import * as ts from 'typescript'; + +/** + * This module provides typed method that can be used to access TypeScript Nodes + * that are externally related to jsii assembly entities. This is backed by a + * `WeakMap` so that attached metadata can be garbage collected once the note + * they have been related to is no longer reachable. + * + * Methods have distinctive names based on the assembly node type they work with + * because of how TypeScript does structural - and not nominal - type checking, + * maling it impossible to use function overrides without having small + * interfaces excessively match all types (e.g: spec.EnumMember is largely + * equivalent to "anything that has a name"). + */ +const STORAGE = new WeakMap(); + +//#region Attaching nodes + +const setter = (object: T, node: ts.Node): T => { + STORAGE.set(object, node); + return object; +}; + +export const setClassRelatedNode: ( + object: spec.ClassType, + node: ts.ClassDeclaration, +) => spec.ClassType = setter; + +export const setEnumRelatedNode: ( + object: spec.EnumType, + node: ts.EnumDeclaration, +) => spec.EnumType = setter; + +export const setInterfaceRelatedNode: ( + object: spec.InterfaceType, + node: ts.InterfaceDeclaration, +) => spec.InterfaceType = setter; + +export const setMethodRelatedNode: < + T extends ts.MethodDeclaration | ts.MethodSignature +>( + object: spec.Method, + node: T, +) => spec.Method = setter; + +export const setParameterRelatedNode: ( + object: spec.Parameter, + node: ts.ParameterDeclaration, +) => spec.Parameter = setter; + +export const setPropertyRelatedNode: ( + object: spec.Property, + node: + | ts.AccessorDeclaration + | ts.ParameterPropertyDeclaration + | ts.PropertyDeclaration + | ts.PropertySignature, +) => spec.Parameter = setter; + +//#endregion + +//#region Inspecting attached nodes + +export function getRelatedNode( + object: any, +): T | undefined { + return STORAGE.get(object) as T; +} + +export const getClassRelatedNode: ( + object: spec.ClassType, +) => ts.ClassDeclaration | undefined = getRelatedNode; + +export const getClassOrInterfaceRelatedNode: ( + object: spec.ClassType | spec.InterfaceType, +) => ts.ClassDeclaration | ts.InterfaceDeclaration | undefined = getRelatedNode; + +export const getEnumRelatedNode: ( + object: spec.EnumType, +) => ts.EnumDeclaration | undefined = getRelatedNode; + +export const getInterfaceRelatedNode: ( + object: spec.InterfaceType, +) => ts.InterfaceDeclaration | undefined = getRelatedNode; + +export const getMethodRelatedNode: ( + object: spec.Method, +) => ts.MethodDeclaration | ts.MethodSignature | undefined = STORAGE.get.bind( + STORAGE, +) as any; + +export const getParameterRelatedNode: ( + object: spec.Parameter, +) => + | ts.AccessorDeclaration + | ts.ParameterPropertyDeclaration + | ts.PropertyDeclaration + | ts.PropertySignature + | undefined = getRelatedNode; + +export const getTypeRelatedNode: ( + object: spec.Type, +) => + | ts.ClassDeclaration + | ts.EnumDeclaration + | ts.InterfaceDeclaration + | undefined = getRelatedNode; + +//#endregion diff --git a/packages/jsii/lib/project-info.ts b/packages/jsii/lib/project-info.ts index e347e1412c..6d97aa3fb5 100644 --- a/packages/jsii/lib/project-info.ts +++ b/packages/jsii/lib/project-info.ts @@ -1,9 +1,11 @@ -import * as fs from 'fs-extra'; import * as spec from '@jsii/spec'; +import * as fs from 'fs-extra'; import * as log4js from 'log4js'; import * as path from 'path'; import * as semver from 'semver'; import { intersect } from 'semver-intersect'; +import * as ts from 'typescript'; + import { parsePerson, parseRepository } from './utils'; // eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports @@ -43,12 +45,14 @@ export interface ProjectInfo { readonly targets: spec.AssemblyTargets; readonly metadata?: { [key: string]: any }; readonly jsiiVersionFormat: 'short' | 'full'; + readonly diagnostics?: { readonly [code: string]: ts.DiagnosticCategory }; readonly description?: string; readonly homepage?: string; readonly contributors?: readonly spec.Person[]; readonly excludeTypescript: string[]; readonly projectReferences?: boolean; readonly tsc?: TSCompilerOptions; + readonly bin?: { readonly [name: string]: string }; } export async function loadProjectInfo( @@ -123,20 +127,35 @@ export async function loadProjectInfo( } const transitiveAssemblies: { [name: string]: spec.Assembly } = {}; + const assemblyCache = new Map(); const dependencies = await _loadDependencies( pkg.dependencies, projectRoot, transitiveAssemblies, + assemblyCache, new Set(Object.keys(bundleDependencies ?? {})), ); const peerDependencies = await _loadDependencies( pkg.peerDependencies, projectRoot, transitiveAssemblies, + assemblyCache, ); const transitiveDependencies = Object.values(transitiveAssemblies); + const metadata = mergeMetadata( + { + jsii: { + pacmak: { + // When `true`, `jsii-pacmak` will use the `Jsii$Default` implementation in code generation even for dependencies. + hasDefaultInterfaces: true, + }, + }, + }, + pkg.jsii?.metadata, + ); + return { projectRoot, packageJson: pkg, @@ -187,7 +206,7 @@ export async function loadProjectInfo( ).targets, js: { npm: pkg.name }, }, - metadata: pkg.jsii?.metadata, + metadata, jsiiVersionFormat: _validateVersionFormat(pkg.jsii.versionFormat ?? 'full'), description: pkg.description, @@ -202,6 +221,8 @@ export async function loadProjectInfo( outDir: pkg.jsii?.tsc?.outDir, rootDir: pkg.jsii?.tsc?.rootDir, }, + bin: pkg.bin, + diagnostics: _loadDiagnostics(pkg.jsii?.diagnostics), }; } @@ -222,6 +243,7 @@ async function _loadDependencies( dependencies: { [name: string]: string } | undefined, searchPath: string, transitiveAssemblies: { [name: string]: spec.Assembly }, + assemblyCache: Map, bundled = new Set(), ): Promise<{ [name: string]: string }> { if (!dependencies) { @@ -245,7 +267,7 @@ async function _loadDependencies( const pkg = _tryResolveAssembly(name, localPackage, searchPath); LOG.debug(`Resolved dependency ${name} to ${pkg}`); // eslint-disable-next-line no-await-in-loop - const assm = await loadAndValidateAssembly(pkg); + const assm = await loadAndValidateAssembly(pkg, assemblyCache); if (!semver.satisfies(assm.version, version)) { throw new Error( `Declared dependency on version ${versionString} of ${name}, but version ${assm.version} was found`, @@ -259,28 +281,32 @@ async function _loadDependencies( const pkgDir = path.dirname(pkg); if (assm.dependencies) { // eslint-disable-next-line no-await-in-loop - await _loadDependencies(assm.dependencies, pkgDir, transitiveAssemblies); + await _loadDependencies( + assm.dependencies, + pkgDir, + transitiveAssemblies, + assemblyCache, + ); } } return packageVersions; } -const ASSEMBLY_CACHE = new Map(); - /** * Load a JSII filename and validate it; cached to avoid redundant loads of the same JSII assembly */ async function loadAndValidateAssembly( jsiiFileName: string, + cache: Map, ): Promise { - if (!ASSEMBLY_CACHE.has(jsiiFileName)) { + if (!cache.has(jsiiFileName)) { try { - ASSEMBLY_CACHE.set(jsiiFileName, await fs.readJson(jsiiFileName)); + cache.set(jsiiFileName, await fs.readJson(jsiiFileName)); } catch (e) { throw new Error(`Error loading ${jsiiFileName}: ${e}`); } } - return ASSEMBLY_CACHE.get(jsiiFileName)!; + return cache.get(jsiiFileName)!; } function _required(value: T, message: string): T { @@ -409,3 +435,80 @@ function _resolveVersion( localPackage, }; } + +/** + * Merges two metadata blocks together. + * + * @param base the base values + * @param user the user-supplied values, which can override the `base` values + * + * @returns the merged metadata block + */ +function mergeMetadata( + base: NonNullable, + user: ProjectInfo['metadata'], +): ProjectInfo['metadata'] { + if (user == null) { + return base; + } + return mergeObjects(base, user); + + function mergeObjects( + base: Record, + override: Record, + ): Record { + const result: Record = {}; + const allKeys = Array.from( + new Set([...Object.keys(base), ...Object.keys(override)]), + ).sort(); + for (const key of allKeys) { + const baseValue = base[key]; + const overrideValue = override[key]; + + if (typeof baseValue === 'object' && typeof overrideValue === 'object') { + if (overrideValue != null) { + result[key] = mergeObjects(baseValue, overrideValue); + } + } else { + result[key] = overrideValue ?? baseValue; + } + } + return result; + } +} + +function _loadDiagnostics(entries?: { + [key: string]: string; +}): + | { + [key: string]: ts.DiagnosticCategory; + } + | undefined { + if (entries === undefined || Object.keys(entries).length === 0) { + return undefined; + } + const result: { [key: string]: ts.DiagnosticCategory } = {}; + for (const code of Object.keys(entries)) { + let category: ts.DiagnosticCategory; + switch (entries[code].trim().toLowerCase()) { + case 'error': + category = ts.DiagnosticCategory.Error; + break; + case 'warning': + category = ts.DiagnosticCategory.Warning; + break; + case 'suggestion': + category = ts.DiagnosticCategory.Suggestion; + break; + case 'message': + category = ts.DiagnosticCategory.Message; + break; + default: + throw new Error( + `Invalid category '${entries[code]}' for code '${code}'`, + ); + } + result[code] = category; + } + return result; +} diff --git a/packages/jsii/lib/reserved-words.ts b/packages/jsii/lib/reserved-words.ts index da3371a3f4..c4d6b82bf8 100644 --- a/packages/jsii/lib/reserved-words.ts +++ b/packages/jsii/lib/reserved-words.ts @@ -9,6 +9,10 @@ export function isReservedName(name: string): string[] | undefined { if (PYTHON_RESERVED.has(name)) { reserved.push('Python'); } + + if (GO_RESERVED.has(name)) { + reserved.push('Go'); + } return reserved.length > 0 ? reserved : undefined; } @@ -184,3 +188,71 @@ export const PYTHON_RESERVED = new Set([ 'raise', 'self', ]); + +export const GO_RESERVED = new Set([ + 'break', + 'case', + 'chan', + 'const', + 'continue', + 'default', + 'defer', + 'else', + 'fallthrough', + 'for', + 'func', + 'go', + 'goto', + 'if', + 'import', + 'interface', + 'map', + 'package', + 'range', + 'return', + 'select', + 'struct', + 'switch', + 'type', + 'var', + // constants + 'true', + 'false', + 'iota', + 'nil', + // types + 'int', + 'int8', + 'int16', + 'int32', + 'int64', + 'uint', + 'uint8', + 'uint16', + 'uint32', + 'uint64', + 'uintptr', + 'float32', + 'float64', + 'complex128', + 'complex64', + 'bool', + 'rune', + 'byte', + 'string', + 'error', + // functions + 'make', + 'len', + 'cap', + 'new', + 'append', + 'copy', + 'close', + 'delete', + 'complex', + 'real', + 'imag', + 'panic', + 'recover', +]); diff --git a/packages/jsii/lib/transforms/deprecated-remover.ts b/packages/jsii/lib/transforms/deprecated-remover.ts new file mode 100644 index 0000000000..b3f14649ef --- /dev/null +++ b/packages/jsii/lib/transforms/deprecated-remover.ts @@ -0,0 +1,872 @@ +import { + Assembly, + ClassType, + Initializer, + InterfaceType, + isClassOrInterfaceType, + isClassType, + isCollectionTypeReference, + isEnumType, + isMethod, + isNamedTypeReference, + isPrimitiveTypeReference, + Method, + Parameter, + Property, + Stability, + TypeReference, +} from '@jsii/spec'; +import { basename, dirname, relative } from 'path'; +import * as ts from 'typescript'; + +import { JsiiDiagnostic } from '../jsii-diagnostic'; +import * as bindings from '../node-bindings'; + +export class DeprecatedRemover { + private readonly transformations = new Array(); + + public constructor(private readonly typeChecker: ts.TypeChecker) {} + + /** + * Obtains the configuration for the TypeScript transform(s) that will remove + * `@deprecated` members from the generated declarations (`.d.ts`) files. It + * will leverage information accumulated during `#removeFrom(Assembly)` in + * order to apply corrections to inheritance chains, ensuring a valid output + * is produced. + */ + public get customTransformers(): ts.CustomTransformers { + return { + afterDeclarations: [ + (context) => { + const transformer = new DeprecationRemovalTransformer( + this.typeChecker, + context, + this.transformations, + ); + return transformer.transform.bind(transformer); + }, + ], + }; + } + + /** + * Removes all `@deprecated` API elements from the provided assembly, and + * records the operations needed in order to fix the inheritance chains that + * mix `@deprecated` and non-`@deprecated` types. + * + * @param assembly the assembly to be modified. + * + * @returns diagnostic messages produced when validating no remaining API + * makes use of a `@deprecated` type that was removed. + */ + public removeFrom(assembly: Assembly): readonly JsiiDiagnostic[] { + if (assembly.types == null) { + return []; + } + + const strippedFqns = new Set(); + const replaceWithClass = new Map(); + const replaceWithInterfaces = new Map(); + + // Find all types that will be stripped out + for (const [fqn, typeInfo] of Object.entries(assembly.types)) { + if (typeInfo.docs?.stability === Stability.Deprecated) { + strippedFqns.add(fqn); + if (isClassType(typeInfo) && typeInfo.base != null) { + replaceWithClass.set(fqn, typeInfo.base); + } + if (isClassOrInterfaceType(typeInfo) && typeInfo.interfaces != null) { + replaceWithInterfaces.set(fqn, typeInfo.interfaces); + } + } + } + + for (const [fqn, typeInfo] of Object.entries(assembly.types)) { + // Ignore `@deprecated` types + if (strippedFqns.has(fqn)) { + continue; + } + + // Enums cannot have references to `@deprecated` types + if (isEnumType(typeInfo)) { + continue; + } + + // For classes, we erase `@deprecated` base classes, replacing as needed + const additionalInterfaces = new Set(); + if ( + isClassType(typeInfo) && + typeInfo.base != null && + strippedFqns.has(typeInfo.base) + ) { + while (typeInfo.base != null && strippedFqns.has(typeInfo.base)) { + const oldBase = assembly.types[typeInfo.base] as ClassType; + oldBase.interfaces?.forEach((fqn) => additionalInterfaces.add(fqn)); + typeInfo.base = replaceWithClass.get(typeInfo.base); + } + this.transformations.push( + typeInfo.base != null + ? Transformation.replaceBaseClass( + this.typeChecker, + bindings.getClassRelatedNode(typeInfo)!, + typeInfo.base in assembly.types + ? bindings.getClassRelatedNode( + assembly.types[typeInfo.base] as ClassType, + ) ?? typeInfo.base + : typeInfo.base, + ) + : Transformation.removeBaseClass( + this.typeChecker, + bindings.getClassRelatedNode(typeInfo)!, + ), + ); + } + + // Be defensive in case we add other kinds in the future + if (!isClassOrInterfaceType(typeInfo)) { + throw new Error( + `Unhandled type encountered! ${JSON.stringify(typeInfo, null, 2)}`, + ); + } + + // Strip all `@deprecated` interfaces from the inheritance tree, replacing as needed + if ( + typeInfo.interfaces?.some((fqn) => strippedFqns.has(fqn)) || + additionalInterfaces.size > 0 + ) { + const originalSet = new Set(typeInfo.interfaces ?? []); + const newSet = new Set(); + + const candidates = Array.from( + new Set([...originalSet, ...additionalInterfaces]), + ); + while (candidates.length > 0) { + const fqn = candidates.pop()!; + if (!strippedFqns.has(fqn)) { + newSet.add(fqn); + if (!originalSet.has(fqn)) { + this.transformations.push( + Transformation.addInterface( + this.typeChecker, + bindings.getClassOrInterfaceRelatedNode(typeInfo)!, + fqn in assembly.types + ? bindings.getInterfaceRelatedNode( + assembly.types[fqn] as InterfaceType, + ) ?? fqn + : fqn, + ), + ); + } + continue; + } + if (originalSet.has(fqn)) { + this.transformations.push( + Transformation.removeInterface( + this.typeChecker, + bindings.getClassOrInterfaceRelatedNode(typeInfo)!, + bindings.getInterfaceRelatedNode( + assembly.types[fqn] as InterfaceType, + )!, + ), + ); + } + const replacement = replaceWithInterfaces.get(fqn); + if (replacement != null) { + candidates.push(...replacement); + } + } + + typeInfo.interfaces = + newSet.size > 0 ? Array.from(newSet).sort() : undefined; + } + + // Drop all `@deprecated` members, and remove "overrides" from stripped types + typeInfo.methods = typeInfo?.methods + ?.filter((meth) => meth.docs?.stability !== Stability.Deprecated) + ?.map((meth) => + meth.overrides != null && strippedFqns.has(meth.overrides) + ? { ...meth, overrides: undefined } + : meth, + ); + typeInfo.properties = typeInfo?.properties + ?.filter((prop) => prop.docs?.stability !== Stability.Deprecated) + ?.map((prop) => + prop.overrides != null && strippedFqns.has(prop.overrides) + ? { ...prop, overrides: undefined } + : prop, + ); + } + + const diagnostics = this.findLeftoverUseOfDeprecatedAPIs( + assembly, + strippedFqns, + ); + + // Remove all `@deprecated` types, after we did everything, so we could + // still access the related nodes from the assembly object. + for (const fqn of strippedFqns) { + delete assembly.types[fqn]; + } + + return diagnostics; + } + + private findLeftoverUseOfDeprecatedAPIs( + assembly: Assembly, + strippedFqns: Set, + ): readonly JsiiDiagnostic[] { + if (assembly.types == null) { + return []; + } + + const result = new Array(); + + for (const type of Object.values(assembly.types)) { + if (isEnumType(type) || strippedFqns.has(type.fqn)) { + continue; + } + if (isClassType(type) && type.initializer) { + result.push( + ...this.verifyCallable(assembly, strippedFqns, type.initializer), + ); + } + type.methods?.forEach((method) => + result.push(...this.verifyCallable(assembly, strippedFqns, method)), + ); + type.properties?.forEach((property) => + result.push(...this.verifyProperty(assembly, strippedFqns, property)), + ); + } + + return result; + } + + private verifyCallable( + assembly: Assembly, + strippedFqns: ReadonlySet, + method: Method | Initializer, + ): readonly JsiiDiagnostic[] { + const diagnostics = new Array(); + const deprecatedReturnFqn = + isMethod(method) && + method.returns && + this.tryFindReference(method.returns.type, strippedFqns); + if (deprecatedReturnFqn) { + diagnostics.push( + this.makeDiagnostic(deprecatedReturnFqn, 'Method', method, assembly), + ); + } + + if (method.parameters) { + for (const parameter of method.parameters) { + const deprecatedTypeFqn = this.tryFindReference( + parameter.type, + strippedFqns, + ); + if (deprecatedTypeFqn) { + diagnostics.push( + this.makeDiagnostic( + deprecatedTypeFqn, + 'Parameter', + parameter, + assembly, + ), + ); + } + } + } + return diagnostics; + } + + private verifyProperty( + assembly: Assembly, + strippedFqns: ReadonlySet, + property: Property, + ): readonly JsiiDiagnostic[] { + const deprecatedTypeFqn = this.tryFindReference( + property.type, + strippedFqns, + ); + if (deprecatedTypeFqn) { + return [ + this.makeDiagnostic(deprecatedTypeFqn, 'Property', property, assembly), + ]; + } + return []; + } + + /** + * Determines whether a `TypeReference` contains an FQN within a given set. + * + * @param ref the tested `TypeReference`. + * @param fqns the set of FQNs that are being searched for. + * + * @returns the first FQN that was identified. + */ + private tryFindReference( + ref: TypeReference, + fqns: ReadonlySet, + ): string | undefined { + if (isNamedTypeReference(ref)) { + return fqns.has(ref.fqn) ? ref.fqn : undefined; + } + if (isPrimitiveTypeReference(ref)) { + return undefined; + } + if (isCollectionTypeReference(ref)) { + return this.tryFindReference(ref.collection.elementtype, fqns); + } + return ref.union.types + .map((type) => this.tryFindReference(type, fqns)) + .find((ref) => ref != null); + } + + private makeDiagnostic( + fqn: string, + messagePrefix: 'Method', + context: Method | Initializer, + assembly: Assembly, + ): JsiiDiagnostic; + private makeDiagnostic( + fqn: string, + messagePrefix: 'Parameter', + context: Parameter, + assembly: Assembly, + ): JsiiDiagnostic; + private makeDiagnostic( + fqn: string, + messagePrefix: 'Property', + context: Property, + assembly: Assembly, + ): JsiiDiagnostic; + private makeDiagnostic( + fqn: string, + messagePrefix: 'Method' | 'Property' | 'Parameter', + context: Method | Initializer | Parameter | Property, + assembly: Assembly, + ): JsiiDiagnostic { + const node = bindings.getRelatedNode< + | ts.AccessorDeclaration + | ts.MethodDeclaration + | ts.MethodSignature + | ts.ParameterDeclaration + | ts.PropertyDeclaration + | ts.PropertySignature + >(context); + const diagnostic = JsiiDiagnostic.JSII_3999_INCOHERENT_TYPE_MODEL.create( + node?.type ?? node!, + `${messagePrefix} has @deprecated type ${fqn}, and it is erased by --strip-deprecated.`, + ); + + const typeInfo = assembly.types?.[fqn]; + const typeNode = typeInfo && bindings.getTypeRelatedNode(typeInfo); + if (typeNode == null) { + return diagnostic; + } + return diagnostic.addRelatedInformation( + ts.getNameOfDeclaration(typeNode) ?? typeNode, + `The @deprecated type is declared here`, + ); + } +} + +class Transformation { + public static addInterface( + typeChecker: ts.TypeChecker, + node: ts.ClassDeclaration | ts.InterfaceDeclaration, + iface: ts.InterfaceDeclaration | string, + ) { + return new Transformation(typeChecker, node, (declaration) => { + if ( + !ts.isClassDeclaration(declaration) && + !ts.isInterfaceDeclaration(declaration) + ) { + throw new Error( + `Expected a ClassDeclaration or InterfaceDeclaration, found a ${ + ts.SyntaxKind[declaration.kind] + }`, + ); + } + + const { + typeExpression: newInterface, + syntheticImport, + } = Transformation.typeReference(iface, declaration, typeChecker); + if (ts.isClassDeclaration(declaration)) { + return { + node: ts.updateClassDeclaration( + declaration, + declaration.decorators, + declaration.modifiers, + declaration.name, + declaration.typeParameters, + addInterfaceTo( + ts.SyntaxKind.ImplementsKeyword, + declaration.heritageClauses, + ), + declaration.members, + ), + syntheticImport, + }; + } + return { + node: ts.updateInterfaceDeclaration( + declaration, + declaration.decorators, + declaration.modifiers, + declaration.name, + declaration.typeParameters, + addInterfaceTo( + ts.SyntaxKind.ExtendsKeyword, + declaration.heritageClauses, + ), + declaration.members, + ), + syntheticImport, + }; + + function addInterfaceTo( + token: ts.HeritageClause['token'], + clauses: readonly ts.HeritageClause[] = [], + ): ts.HeritageClause[] { + const existingClause = clauses.find((clause) => clause.token === token); + if (existingClause == null) { + return [...clauses, ts.createHeritageClause(token, [newInterface])]; + } + return [ + ...clauses.filter((clause) => clause !== existingClause), + ts.updateHeritageClause(existingClause, [ + ...existingClause.types, + newInterface, + ]), + ]; + } + }); + } + + public static replaceBaseClass( + typeChecker: ts.TypeChecker, + node: ts.ClassDeclaration, + baseClass: ts.ClassDeclaration | string, + ) { + return new Transformation(typeChecker, node, (declaration) => { + if (!ts.isClassDeclaration(declaration)) { + throw new Error( + `Expected a ClassDeclaration, found a ${ + ts.SyntaxKind[declaration.kind] + }`, + ); + } + const { + typeExpression: newBaseClass, + syntheticImport, + } = Transformation.typeReference(baseClass, declaration, typeChecker); + const existingClause = declaration.heritageClauses?.find( + (clause) => clause.token === ts.SyntaxKind.ExtendsKeyword, + ); + return { + node: ts.updateClassDeclaration( + declaration, + declaration.decorators, + declaration.modifiers, + declaration.name, + declaration.typeParameters, + [ + ...(declaration.heritageClauses ?? []).filter( + (clause) => clause !== existingClause, + ), + existingClause + ? ts.updateHeritageClause(existingClause, [newBaseClass]) + : ts.createHeritageClause(ts.SyntaxKind.ExtendsKeyword, [ + newBaseClass, + ]), + ], + declaration.members, + ), + syntheticImports: syntheticImport && [syntheticImport], + }; + }); + } + + public static removeBaseClass( + typeChecker: ts.TypeChecker, + node: ts.ClassDeclaration, + ) { + return new Transformation(typeChecker, node, (declaration) => { + if (!ts.isClassDeclaration(declaration)) { + throw new Error( + `Expected a ClassDeclaration, found a ${ + ts.SyntaxKind[declaration.kind] + }`, + ); + } + return { + node: ts.updateClassDeclaration( + declaration, + declaration.decorators, + declaration.modifiers, + declaration.name, + declaration.typeParameters, + declaration.heritageClauses?.filter( + (clause) => clause.token !== ts.SyntaxKind.ExtendsKeyword, + ), + declaration.members, + ), + }; + }); + } + + public static removeInterface( + typeChecker: ts.TypeChecker, + node: ts.ClassDeclaration | ts.InterfaceDeclaration, + iface: ts.InterfaceDeclaration, + ) { + const ifaceName = Transformation.fullyQualifiedName(typeChecker, iface)!; + + return new Transformation(typeChecker, node, (declaration) => { + if (ts.isClassDeclaration(declaration)) { + return { + node: ts.updateClassDeclaration( + declaration, + declaration.decorators, + declaration.modifiers, + declaration.name, + declaration.typeParameters, + removeInterfaceHeritage(declaration.heritageClauses), + declaration.members, + ), + }; + } else if (ts.isInterfaceDeclaration(declaration)) { + return { + node: ts.updateInterfaceDeclaration( + declaration, + declaration.decorators, + declaration.modifiers, + declaration.name, + declaration.typeParameters, + removeInterfaceHeritage(declaration.heritageClauses), + declaration.members, + ), + }; + } + throw new Error( + `Expected a ClassDeclaration or InterfaceDeclaration, found a ${ + ts.SyntaxKind[declaration.kind] + }`, + ); + }); + + function removeInterfaceHeritage( + clauses: readonly ts.HeritageClause[] | undefined, + ): ts.HeritageClause[] | undefined { + if (clauses == null) { + return clauses; + } + return clauses + .map((clause) => { + const types = clause.types.filter( + (type) => + Transformation.fullyQualifiedName( + typeChecker, + type.expression, + ) !== ifaceName, + ); + if (types.length === clause.types.length) { + // Means the interface was only transitively present... + return clause; + } + if (types.length === 0) { + return undefined; + } + return ts.updateHeritageClause(clause, types); + }) + .filter((clause) => clause != null) as ts.HeritageClause[]; + } + } + + private static fullyQualifiedName( + typeChecker: ts.TypeChecker, + node: ts.Node, + ): string | undefined { + const symbol = typeChecker.getSymbolAtLocation( + ts.getNameOfDeclaration(node as ts.Declaration) ?? node, + ); + return symbol && typeChecker.getFullyQualifiedName(symbol); + } + + private static typeReference( + type: ts.ClassDeclaration | ts.InterfaceDeclaration | string, + context: ts.ClassDeclaration | ts.InterfaceDeclaration, + typeChecker: ts.TypeChecker, + ): { + typeExpression: ts.ExpressionWithTypeArguments; + syntheticImport?: ts.ImportDeclaration; + } { + context = ts.getOriginalNode(context) as any; + + const [, contextSource] = /^"([^"]+)"\..*$/.exec( + typeChecker.getFullyQualifiedName( + typeChecker.getSymbolAtLocation(ts.getNameOfDeclaration(context)!)!, + ), + )!; + + let expression: ts.Expression; + let syntheticImport: ts.ImportDeclaration | undefined; + + if (typeof type === 'string') { + const [root, ...tail] = type.split('.'); + const syntheticImportName = ts.createUniqueName(root); + syntheticImport = ts.createImportDeclaration( + undefined /* decorators */, + undefined /* modifiers */, + ts.createImportClause( + undefined, + ts.createNamespaceImport(syntheticImportName), + ), + ts.createStringLiteral(root), + ); + expression = tail.reduce( + (curr, elt) => ts.createPropertyAccess(curr, elt), + syntheticImportName as ts.Expression, + ); + } else { + const [, typeSource, qualifiedName] = /^"([^"]+)"\.(.*)$/.exec( + typeChecker.getFullyQualifiedName( + typeChecker.getSymbolAtLocation(ts.getNameOfDeclaration(type)!)!, + ), + )!; + + if (typeSource === contextSource) { + const [root, ...tail] = qualifiedName.split('.'); + expression = tail.reduce( + (curr, elt) => ts.createPropertyAccess(curr, elt), + ts.createIdentifier(root) as ts.Expression, + ); + } else { + const syntheticImportName = ts.createUniqueName(basename(typeSource)); + syntheticImport = ts.createImportDeclaration( + undefined /* decorators */, + undefined /* modifiers */, + ts.createImportClause( + undefined, + ts.createNamespaceImport(syntheticImportName), + ), + ts.createStringLiteral( + `./${relative(dirname(contextSource), typeSource)}`, + ), + ); + expression = qualifiedName + .split('.') + .reduce( + (curr, elt) => ts.createPropertyAccess(curr, elt), + syntheticImportName as ts.Expression, + ); + } + } + + return { + typeExpression: ts.createExpressionWithTypeArguments( + undefined, + expression, + ), + syntheticImport, + }; + } + + private readonly nodeName: string; + + private constructor( + private readonly typeChecker: ts.TypeChecker, + node: ts.Declaration, + public readonly apply: ( + this: Transformation, + node: ts.Node, + ) => { node: ts.Node; syntheticImport?: ts.ImportDeclaration }, + ) { + this.nodeName = Transformation.fullyQualifiedName(typeChecker, node)!; + } + + public targets(node: ts.Declaration) { + return ( + this.nodeName === + Transformation.fullyQualifiedName(this.typeChecker, node) + ); + } +} + +class DeprecationRemovalTransformer { + /** + * A list of SyntaxKinds for which it is not necessary to evaluate children, + * since they are never of interest to this transform. This opens up a wee + * optimization, which is particularly useful when trying to troubleshoot the + * transform in a debugger (saves a TON of time stepping into useless nodes + * then). + */ + private static readonly IGNORE_CHILDREN: ReadonlySet = new Set( + [ + ts.SyntaxKind.Constructor, + ts.SyntaxKind.FunctionDeclaration, + ts.SyntaxKind.GetAccessor, + ts.SyntaxKind.MethodDeclaration, + ts.SyntaxKind.MethodSignature, + ts.SyntaxKind.PropertySignature, + ts.SyntaxKind.PropertyDeclaration, + ts.SyntaxKind.SetAccessor, + ts.SyntaxKind.VariableDeclaration, + ], + ); + + private syntheticImports = new Array(); + + public constructor( + private readonly typeChecker: ts.TypeChecker, + private readonly context: ts.TransformationContext, + private readonly transformations: readonly Transformation[], + ) {} + + public transform(node: T): T { + let result = this.visitEachChild(node); + + // If there are any synthetic imports, add them to the source file + if (ts.isSourceFile(result) && this.syntheticImports.length > 0) { + result = ts.updateSourceFileNode( + result, + [...this.syntheticImports, ...result.statements], + result.isDeclarationFile, + result.referencedFiles, + result.typeReferenceDirectives, + result.hasNoDefaultLib, + result.libReferenceDirectives, + ) as any; + this.syntheticImports = new Array(); + } + + return result; + } + + private visitEachChild(node: T): T { + return ts.visitEachChild(node, this.visitor.bind(this), this.context); + } + + private visitor(node: T): ts.VisitResult { + if (this.isDeprecated(node)) { + // Removing deprecated members by substituting "nothing" to them + return undefined; + } + + if (ts.isClassDeclaration(node) || ts.isInterfaceDeclaration(node)) { + for (const transformation of this.transformations) { + // ๐Ÿ‘‡ as any because the assignment below confuses type checker + if (transformation.targets(node as any)) { + const { + node: transformedNode, + syntheticImport, + } = transformation.apply(node); + node = transformedNode as any; + if (syntheticImport) { + this.syntheticImports.push(syntheticImport); + } + } + } + } + + // Remove named imports of `@deprecated` members from the source... + if ( + ts.isImportDeclaration(node) && + node.importClause && + node.importClause.namedBindings && + ts.isNamedImports(node.importClause.namedBindings) + ) { + const filteredElements = node.importClause.namedBindings.elements.filter( + (element) => { + // This symbol is local (it's declaration points back to the named import) + const symbol = this.typeChecker.getSymbolAtLocation(element.name); + const exportedSymbol = + // This "resolves" the imported type, so we can get to it's declaration(s) + symbol && this.typeChecker.getDeclaredTypeOfSymbol(symbol)?.symbol; + return !exportedSymbol?.declarations.some((decl) => + this.isDeprecated(decl), + ); + }, + ); + if ( + filteredElements.length !== + node.importClause.namedBindings.elements.length + ) { + return ts.updateImportDeclaration( + node, + node.decorators, + node.modifiers, + node.importClause.name != null || filteredElements.length > 0 + ? ts.updateImportClause( + node.importClause, + node.importClause.name, + ts.updateNamedImports( + node.importClause.namedBindings, + filteredElements, + ), + node.importClause.isTypeOnly, + ) + : undefined, + node.moduleSpecifier, + ) as any; + } + + return node; + } + + // Replace "export ... from ..." places that no longer export anything + // with an "import from ...", so side effects are preserved. + if (ts.isExportDeclaration(node) && node.moduleSpecifier) { + const symbol = this.typeChecker.getSymbolAtLocation(node.moduleSpecifier); + const moduleExports = + symbol && + this.typeChecker + .getExportsOfModule(symbol) + ?.filter( + (sym) => !sym.declarations.some((decl) => this.isDeprecated(decl)), + ); + if ( + (node.exportClause == null || + ts.isNamespaceExport(node.exportClause)) && + moduleExports?.length === 0 + ) { + return ts.createImportDeclaration( + undefined /* decorators */, + undefined /* modifiers */, + undefined /* importClause */, + node.moduleSpecifier, + ) as any; + } + + if (node.exportClause != null && moduleExports) { + const bindings = node.exportClause as ts.NamedExports; + const exportedNames = new Set(moduleExports.map((sym) => sym.name)); + const filteredElements = bindings.elements?.filter((elt) => + exportedNames.has(elt.name.text), + ); + if (filteredElements?.length !== bindings.elements?.length) { + return ts.updateExportDeclaration( + node, + node.decorators, + node.modifiers, + ts.updateNamedExports(bindings, filteredElements), + node.moduleSpecifier, + node.isTypeOnly, + ) as any; + } + } + } + + return DeprecationRemovalTransformer.IGNORE_CHILDREN.has(node.kind) + ? node + : this.visitEachChild(node); + } + + private isDeprecated(node: ts.Node): boolean { + const original = ts.getOriginalNode(node); + return ts + .getJSDocTags(original) + .some((tag) => tag.tagName.text === 'deprecated'); + } +} diff --git a/packages/jsii/lib/transforms/runtime-info.ts b/packages/jsii/lib/transforms/runtime-info.ts new file mode 100644 index 0000000000..d980b14e0f --- /dev/null +++ b/packages/jsii/lib/transforms/runtime-info.ts @@ -0,0 +1,144 @@ +import * as ts from 'typescript'; + +/** + * Provides a TransformerFactory to annotate classes with runtime information + * (e.g., fully-qualified name, version). + * + * It does this by first inserting this definition at the top of each source file: + * ``` + * var JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); + * ``` + * + * Then, for each class that has registered runtime information during assembly, + * insert a static member to the class with its fqn and version: + * ``` + * private static readonly [JSII_RTTI_SYMBOL_1] = { fqn: "ModuleName.ClassName", version: "1.2.3" } + * ``` + */ +export class RuntimeTypeInfoInjector { + private readonly fqnsByClass = new Map(); + + public constructor(private readonly version: string) {} + + /** + * Register the fully-qualified name (fqn) of a class with its ClassDeclaration. + * Only ClassDeclarations with registered fqns will be annotated. + */ + public registerClassFqn(clazz: ts.ClassDeclaration, fqn: string) { + this.fqnsByClass.set(clazz, fqn); + } + + /** + * Return the set of Transformers to be used in TSC's program.emit() + */ + public makeTransformers(): ts.CustomTransformers { + return { + before: [this.runtimeTypeTransformer()], + }; + } + + public runtimeTypeTransformer(): ts.TransformerFactory { + return (context) => { + return (sourceFile) => { + const rttiSymbolIdentifier = ts.createUniqueName('JSII_RTTI_SYMBOL'); + + let classesAnnotated = false; + const visitor = (node: ts.Node): ts.Node => { + if (ts.isClassDeclaration(node)) { + const fqn = this.getClassFqn(node); + if (fqn) { + classesAnnotated = true; + return this.addRuntimeInfoToClass( + node, + fqn, + rttiSymbolIdentifier, + ); + } + } + return ts.visitEachChild(node, visitor, context); + }; + + // Visit the source file, annotating the classes. + let annotatedSourceFile = ts.visitNode(sourceFile, visitor); + + // Only add the symbol definition if it's actually used. + if (classesAnnotated) { + const rttiSymbol = ts.createCall( + ts.createPropertyAccess( + ts.createIdentifier('Symbol'), + ts.createIdentifier('for'), + ), + undefined, + [ts.createStringLiteral('jsii.rtti')], + ); + const rttiSymbolDeclaration = ts.createVariableDeclaration( + rttiSymbolIdentifier, + undefined, + rttiSymbol, + ); + const variableDeclaration = ts.createVariableStatement( + [], + ts.createVariableDeclarationList( + [rttiSymbolDeclaration], + ts.NodeFlags.Const, + ), + ); + + annotatedSourceFile = ts.updateSourceFileNode(annotatedSourceFile, [ + variableDeclaration, + ...annotatedSourceFile.statements, + ]); + } + + return annotatedSourceFile; + }; + }; + } + + /** Used instead of direct access to the map to faciliate testing. */ + protected getClassFqn(clazz: ts.ClassDeclaration): string | undefined { + return this.fqnsByClass.get(clazz); + } + + /** + * If the ClassDeclaration has an associated fully-qualified name registered, + * will append a static property to the class with the fqn and version. + */ + private addRuntimeInfoToClass( + node: ts.ClassDeclaration, + fqn: string, + rttiSymbol: ts.Identifier, + ): ts.ClassDeclaration { + const runtimeInfo = ts.createObjectLiteral([ + ts.createPropertyAssignment( + ts.createIdentifier('fqn'), + ts.createStringLiteral(fqn), + ), + ts.createPropertyAssignment( + ts.createIdentifier('version'), + ts.createStringLiteral(this.version), + ), + ]); + const runtimeProperty = ts.createProperty( + undefined, + ts.createModifiersFromModifierFlags( + ts.ModifierFlags.Private | + ts.ModifierFlags.Static | + ts.ModifierFlags.Readonly, + ), + ts.createComputedPropertyName(rttiSymbol), + undefined, + undefined, + runtimeInfo, + ); + return ts.updateClassDeclaration( + node, + node.decorators, + node.modifiers, + node.name, + node.typeParameters, + node.heritageClauses, + [runtimeProperty, ...node.members], + ); + } +} diff --git a/packages/jsii/lib/ts-comment-replacer.ts b/packages/jsii/lib/transforms/ts-comment-replacer.ts similarity index 97% rename from packages/jsii/lib/ts-comment-replacer.ts rename to packages/jsii/lib/transforms/ts-comment-replacer.ts index d0b45feb30..3d4dae885c 100644 --- a/packages/jsii/lib/ts-comment-replacer.ts +++ b/packages/jsii/lib/transforms/ts-comment-replacer.ts @@ -95,11 +95,9 @@ export class TsCommentReplacer { const lines = text.trim().split('\n'); // eslint-disable-next-line prettier/prettier - const commentContents = [ - '*\n', - ...lines.map((l) => ` * ${l}\n`), - ` `, - ].join(''); + const commentContents = ['*\n', ...lines.map((l) => ` * ${l}\n`), ` `].join( + '', + ); ts.addSyntheticLeadingComment( node, diff --git a/packages/jsii/lib/transforms/utils.ts b/packages/jsii/lib/transforms/utils.ts new file mode 100644 index 0000000000..43f1302651 --- /dev/null +++ b/packages/jsii/lib/transforms/utils.ts @@ -0,0 +1,40 @@ +import { CustomTransformers } from 'typescript'; + +/** + * Combines a collection of `CustomTransformers` configurations into a single + * one, preserving the order of arguments. + * + * @param transformers the list of transformers to combine. + * + * @returns the combined transformer. + */ +export function combinedTransformers( + ...transformers: readonly CustomTransformers[] +): CustomTransformers { + // Note the ! below are just to stop the type checker from seeing undefined as + // a value for the whole map-filter-reduce chain, as this would require heavy + // syntax that is not desirable. The filter step removes the `undefined`. + return { + before: transformers + .map((transformer) => transformer.before!) + .filter((transform) => transform != null) + .reduce( + (acc, elt) => (acc ? [...acc, ...elt] : elt), + undefined as CustomTransformers['before'], + ), + after: transformers + .map((transformer) => transformer.after!) + .filter((transform) => transform != null) + .reduce( + (acc, elt) => (acc ? [...acc, ...elt] : elt), + undefined as CustomTransformers['after'], + ), + afterDeclarations: transformers + .map((transformer) => transformer.afterDeclarations!) + .filter((transform) => transform != null) + .reduce( + (acc, elt) => (acc ? [...acc, ...elt] : elt), + undefined as CustomTransformers['afterDeclarations'], + ), + }; +} diff --git a/packages/jsii/lib/utils.ts b/packages/jsii/lib/utils.ts index cd190c0017..0ca4622e54 100644 --- a/packages/jsii/lib/utils.ts +++ b/packages/jsii/lib/utils.ts @@ -36,16 +36,16 @@ export function diagnosticsLogger( } return logger.warn.bind(logger); case ts.DiagnosticCategory.Message: - if (!logger.isInfoEnabled()) { + if (!logger.isDebugEnabled()) { return undefined; } - return logger.info.bind(logger); + return logger.debug.bind(logger); case ts.DiagnosticCategory.Suggestion: default: - if (!logger.isDebugEnabled()) { + if (!logger.isTraceEnabled()) { return undefined; } - return logger.debug.bind(logger); + return logger.trace.bind(logger); } } diff --git a/packages/jsii/lib/validator.ts b/packages/jsii/lib/validator.ts index 2092126065..993ad6dc74 100644 --- a/packages/jsii/lib/validator.ts +++ b/packages/jsii/lib/validator.ts @@ -1,13 +1,13 @@ -import * as Case from 'case'; import * as spec from '@jsii/spec'; +import * as Case from 'case'; +// eslint-disable-next-line @typescript-eslint/no-require-imports +import deepEqual = require('deep-equal'); import * as ts from 'typescript'; + import { Emitter } from './emitter'; import { JsiiDiagnostic } from './jsii-diagnostic'; import { ProjectInfo } from './project-info'; -// eslint-disable-next-line @typescript-eslint/no-require-imports -import deepEqual = require('deep-equal'); - export class Validator implements Emitter { public static VALIDATIONS: ValidationFunction[] = _defaultValidations(); diff --git a/packages/jsii/package.json b/packages/jsii/package.json index 45b4a2f827..a69d66cd9f 100644 --- a/packages/jsii/package.json +++ b/packages/jsii/package.json @@ -37,59 +37,31 @@ "@jsii/spec": "^0.0.0", "case": "^1.6.3", "colors": "^1.4.0", - "deep-equal": "^2.0.4", - "fs-extra": "^9.0.1", + "deep-equal": "^2.0.5", + "fs-extra": "^9.1.0", "log4js": "^6.3.0", - "semver": "^7.3.2", + "semver": "^7.3.4", "semver-intersect": "^1.4.0", "sort-json": "^2.0.0", - "spdx-license-list": "^6.3.0", - "typescript": "~3.9.7", - "yargs": "^16.0.3" + "spdx-license-list": "^6.4.0", + "typescript": "~3.9.9", + "yargs": "^16.2.0" }, "devDependencies": { "@types/clone": "^2.1.0", "@types/deep-equal": "^1.0.1", "@types/fs-extra": "^8.1.1", - "@types/jest": "^26.0.14", - "@types/jest-expect-message": "^1.0.2", - "@types/node": "^10.17.39", + "@types/jest": "^26.0.20", + "@types/jest-expect-message": "^1.0.3", + "@types/node": "^10.17.51", "@types/semver": "^7.3.4", - "@types/yargs": "^15.0.7", + "@types/yargs": "^16.0.0", "clone": "^2.1.2", - "eslint": "^7.11.0", - "jest": "^26.5.2", + "eslint": "^7.19.0", + "jest": "^26.6.3", "jest-expect-message": "^1.0.2", "jsii-build-tools": "^0.0.0", - "prettier": "^2.1.2", - "ts-jest": "^26.4.1" - }, - "jest": { - "collectCoverage": true, - "collectCoverageFrom": [ - "**/bin/**/*.js", - "**/lib/**/*.js" - ], - "coverageReporters": [ - "lcov", - "text" - ], - "coverageThreshold": { - "global": { - "branches": 70, - "statements": 75 - } - }, - "errorOnDeprecated": true, - "setupFilesAfterEnv": [ - "jest-expect-message" - ], - "testEnvironment": "node", - "testMatch": [ - "**/?(*.)+(spec|test).ts" - ], - "transform": { - "\\.tsx?$": "ts-jest" - } + "prettier": "^2.2.1", + "ts-jest": "^26.5.1" } } diff --git a/packages/jsii/test/__snapshots__/negatives.test.ts.snap b/packages/jsii/test/__snapshots__/negatives.test.ts.snap index 93bc3c7ce1..86abaab964 100644 --- a/packages/jsii/test/__snapshots__/negatives.test.ts.snap +++ b/packages/jsii/test/__snapshots__/negatives.test.ts.snap @@ -619,6 +619,56 @@ error JSII8002: Method and property (unless they are static readonly) names must `; +exports[`stripped-deprecated 1`] = ` +neg.stripped-deprecated.ts:11:25 - error JSII3999: Parameter has @deprecated type jsii.DeprecatedInterface, and it is erased by --strip-deprecated. + +11 public bad(parameter: DeprecatedInterface): DeprecatedInterface { + ~~~~~~~~~~~~~~~~~~~ + + neg.stripped-deprecated.ts:4:18 + 4 export interface DeprecatedInterface {} + ~~~~~~~~~~~~~~~~~~~ + The @deprecated type is declared here +neg.stripped-deprecated.ts:11:47 - error JSII3999: Method has @deprecated type jsii.DeprecatedInterface, and it is erased by --strip-deprecated. + +11 public bad(parameter: DeprecatedInterface): DeprecatedInterface { + ~~~~~~~~~~~~~~~~~~~ + + neg.stripped-deprecated.ts:4:18 + 4 export interface DeprecatedInterface {} + ~~~~~~~~~~~~~~~~~~~ + The @deprecated type is declared here +neg.stripped-deprecated.ts:7:17 - error JSII3999: Property has @deprecated type jsii.DeprecatedInterface, and it is erased by --strip-deprecated. + +7 public ouch?: DeprecatedInterface; + ~~~~~~~~~~~~~~~~~~~ + + neg.stripped-deprecated.ts:4:18 + 4 export interface DeprecatedInterface {} + ~~~~~~~~~~~~~~~~~~~ + The @deprecated type is declared here +neg.stripped-deprecated.ts:9:42 - error JSII3999: Parameter has @deprecated type jsii.DeprecatedInterface, and it is erased by --strip-deprecated. + +9 public constructor(public readonly no: DeprecatedInterface) {} + ~~~~~~~~~~~~~~~~~~~ + + neg.stripped-deprecated.ts:4:18 + 4 export interface DeprecatedInterface {} + ~~~~~~~~~~~~~~~~~~~ + The @deprecated type is declared here +neg.stripped-deprecated.ts:9:42 - error JSII3999: Property has @deprecated type jsii.DeprecatedInterface, and it is erased by --strip-deprecated. + +9 public constructor(public readonly no: DeprecatedInterface) {} + ~~~~~~~~~~~~~~~~~~~ + + neg.stripped-deprecated.ts:4:18 + 4 export interface DeprecatedInterface {} + ~~~~~~~~~~~~~~~~~~~ + The @deprecated type is declared here +error JSII3000: Exported APIs cannot use un-exported type "jsii.DeprecatedInterface" + +`; + exports[`struct-extends-interface 1`] = ` neg.struct-extends-interface.ts:6:18 - error JSII8007: Interface contains behavior. Rename "Struct" to "IStruct" diff --git a/packages/jsii/test/compiler.test.ts b/packages/jsii/test/compiler.test.ts index 537641de6c..858637e90a 100644 --- a/packages/jsii/test/compiler.test.ts +++ b/packages/jsii/test/compiler.test.ts @@ -1,6 +1,7 @@ import { mkdtemp, remove, writeFile, readFile } from 'fs-extra'; import { tmpdir } from 'os'; import { join } from 'path'; + import { Compiler } from '../lib/compiler'; import { ProjectInfo } from '../lib/project-info'; @@ -27,7 +28,7 @@ describe(Compiler, () => { let firstCompilation = true; let onWatchClosed: () => void; let onWatchFailed: (err: Error) => void; - const watchClosed = new Promise((ok, ko) => { + const watchClosed = new Promise((ok, ko) => { onWatchClosed = ok; onWatchFailed = ko; }); diff --git a/packages/jsii/test/deprecated-remover.test.ts b/packages/jsii/test/deprecated-remover.test.ts new file mode 100644 index 0000000000..109509daf2 --- /dev/null +++ b/packages/jsii/test/deprecated-remover.test.ts @@ -0,0 +1,161 @@ +import { compileJsiiForTest } from '../lib'; + +const DEPRECATED = '/** @deprecated stripped */'; + +test('produces correct output', async () => { + const result = await compileJsiiForTest( + { + 'index.ts': ` + export * from './deprecated'; + export * from './retained'; + export { Deprecated, GrandChild, Retained } from './mixed'; + `, + 'deprecated.ts': ` + ${DEPRECATED} + export interface IDeprecatedInterface {} + ${DEPRECATED} + export class DeprecatedClass {} + `, + 'retained.ts': ` + export interface IRetainedInterface {} + export class RetainedClass {} + `, + 'mixed.ts': ` + import { IRetainedInterface } from './retained'; + + export abstract class Retained { + ${DEPRECATED} + readonly deprecated = 1337; + readonly retained = 'YEAH'; + } + ${DEPRECATED} + export class Deprecated extends Retained implements IRetainedInterface {} + export class GrandChild extends Deprecated { + public retainedMethod(): void {} + ${DEPRECATED} + public deprecatedMethod(): void {} + } + `, + }, + undefined /* callback */, + { stripDeprecated: true }, + ); + expect(result.assembly.types).toMatchInlineSnapshot(` + Object { + "testpkg.GrandChild": Object { + "assembly": "testpkg", + "base": "testpkg.Retained", + "fqn": "testpkg.GrandChild", + "initializer": Object {}, + "interfaces": Array [ + "testpkg.IRetainedInterface", + ], + "kind": "class", + "locationInModule": Object { + "filename": "mixed.ts", + "line": 11, + }, + "methods": Array [ + Object { + "locationInModule": Object { + "filename": "mixed.ts", + "line": 12, + }, + "name": "retainedMethod", + }, + ], + "name": "GrandChild", + }, + "testpkg.IRetainedInterface": Object { + "assembly": "testpkg", + "fqn": "testpkg.IRetainedInterface", + "kind": "interface", + "locationInModule": Object { + "filename": "retained.ts", + "line": 2, + }, + "name": "IRetainedInterface", + }, + "testpkg.Retained": Object { + "abstract": true, + "assembly": "testpkg", + "fqn": "testpkg.Retained", + "initializer": Object {}, + "kind": "class", + "locationInModule": Object { + "filename": "mixed.ts", + "line": 4, + }, + "name": "Retained", + "properties": Array [ + Object { + "immutable": true, + "locationInModule": Object { + "filename": "mixed.ts", + "line": 7, + }, + "name": "retained", + "type": Object { + "primitive": "string", + }, + }, + ], + }, + "testpkg.RetainedClass": Object { + "assembly": "testpkg", + "fqn": "testpkg.RetainedClass", + "initializer": Object {}, + "kind": "class", + "locationInModule": Object { + "filename": "retained.ts", + "line": 3, + }, + "name": "RetainedClass", + }, + } + `); + expect( + Object.entries(result.files) + .filter(([name]) => name.endsWith('.d.ts')) + .map(([name, content]) => { + const separator = '/'.repeat(name.length + 8); + return `${separator}\n/// ${name} ///\n${content}${separator}\n`; + }) + .join('\n\n'), + ).toMatchInlineSnapshot(` + "////////////////// + /// index.d.ts /// + import './deprecated'; + export * from './retained'; + export { GrandChild, Retained } from './mixed'; + ////////////////// + + + /////////////////////// + /// deprecated.d.ts /// + /////////////////////// + + + ///////////////////// + /// retained.d.ts /// + export interface IRetainedInterface { + } + export declare class RetainedClass { + } + ///////////////////// + + + ////////////////// + /// mixed.d.ts /// + import * as retained_1 from \\"./retained\\"; + import { IRetainedInterface } from './retained'; + export declare abstract class Retained { + readonly retained = \\"YEAH\\"; + } + export declare class GrandChild extends Retained implements retained_1.IRetainedInterface { + retainedMethod(): void; + } + ////////////////// + " + `); +}); diff --git a/packages/jsii/test/docs.test.ts b/packages/jsii/test/docs.test.ts index e9b14ac4b7..07654f4fc7 100644 --- a/packages/jsii/test/docs.test.ts +++ b/packages/jsii/test/docs.test.ts @@ -1,5 +1,6 @@ import * as spec from '@jsii/spec'; import { Stability } from '@jsii/spec'; + import { sourceToAssemblyHelper as compile, compileJsiiForTest } from '../lib'; import { renderSymbolDocumentation } from '../lib/docs'; diff --git a/packages/jsii/test/jsii-diagnostic.test.ts b/packages/jsii/test/jsii-diagnostic.test.ts new file mode 100644 index 0000000000..a83e3c1211 --- /dev/null +++ b/packages/jsii/test/jsii-diagnostic.test.ts @@ -0,0 +1,57 @@ +import { DiagnosticCategory } from 'typescript'; + +import { Code, configureCategories } from '../lib/jsii-diagnostic'; + +describe('jsii diagnostics', () => { + describe('configureCategories', () => { + beforeEach(() => { + const code = Code.lookup(1)!; + code.category = DiagnosticCategory.Suggestion; + }); + + test('diagnostic by name', () => { + configureCategories({ + 'metadata/package-json-missing-description': DiagnosticCategory.Error, + }); + expect(Code.lookup(1)!.category).toEqual(DiagnosticCategory.Error); + }); + + test('diagnostic by code', () => { + configureCategories({ + JSII1: DiagnosticCategory.Error, + }); + expect(Code.lookup(1)!.category).toEqual(DiagnosticCategory.Error); + }); + + test('diagnostic by code zero prefixed', () => { + configureCategories({ + JSII001: DiagnosticCategory.Error, + }); + expect(Code.lookup(1)!.category).toEqual(DiagnosticCategory.Error); + }); + + test('invalid diagnostic code - NaN', () => { + expect(() => { + configureCategories({ + JSIIPP: DiagnosticCategory.Error, + }); + }).toThrow(/number must follow code/); + }); + + test('invalid diagnostic code - number', () => { + expect(() => { + configureCategories({ + JSII77778888: DiagnosticCategory.Error, + }); + }).toThrow(/Unrecognized diagnostic code/); + }); + + test('invalid diagnostic code - string', () => { + expect(() => { + configureCategories({ + 'invalid/does-not-exist': DiagnosticCategory.Error, + }); + }).toThrow(/Unrecognized diagnostic code/); + }); + }); +}); diff --git a/packages/jsii/test/negatives.test.ts b/packages/jsii/test/negatives.test.ts index c50cb71354..a53d3b5f44 100644 --- a/packages/jsii/test/negatives.test.ts +++ b/packages/jsii/test/negatives.test.ts @@ -1,6 +1,7 @@ import * as fs from 'fs-extra'; 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'; @@ -24,10 +25,15 @@ for (const source of fs.readdirSync(SOURCE_DIR)) { test( source.replace(/neg\.(.+)\.ts/, '$1'), async () => { - const { strict } = await _getPragmas(filePath); + const { strict, stripDeprecated } = await _getPragmas(filePath); + + // Change in dir, so relative paths are processed correctly. + process.chdir(SOURCE_DIR); + const compiler = new Compiler({ projectInfo: _makeProjectInfo(source), failOnWarnings: strict, + stripDeprecated, }); const emitResult = await compiler.emit(path.join(SOURCE_DIR, source)); @@ -63,6 +69,7 @@ for (const source of fs.readdirSync(SOURCE_DIR)) { promises.push( fs.remove(path.join(SOURCE_DIR, '.jsii')), fs.remove(path.join(SOURCE_DIR, 'tsconfig.json')), + fs.remove(path.join(SOURCE_DIR, '.build')), ); return Promise.all(promises); }), @@ -73,19 +80,26 @@ for (const source of fs.readdirSync(SOURCE_DIR)) { } const STRICT_MARKER = '///!STRICT!'; -async function _getPragmas(file: string): Promise<{ strict: boolean }> { +const STRIP_DEPRECATED_MARKER = '///!STRIP_DEPRECATED!'; +async function _getPragmas( + file: string, +): Promise<{ strict: boolean; stripDeprecated: boolean }> { const data = await fs.readFile(file, { encoding: 'utf8' }); const lines = data.split('\n'); const strict = lines.some((line) => line.startsWith(STRICT_MARKER)); - return { strict }; + const stripDeprecated = lines.some((line) => + line.startsWith(STRIP_DEPRECATED_MARKER), + ); + return { strict, stripDeprecated }; } function _makeProjectInfo(types: string): ProjectInfo { + const outDir = '.build'; return { projectRoot: SOURCE_DIR, packageJson: undefined, - types, - main: types.replace(/(?:\.d)?\.ts(x?)/, '.js$1'), + types: path.join(outDir, types.replace(/\.d\.ts(x?)/, '.d.ts$1')), + main: path.join(outDir, types.replace(/(?:\.d)?\.ts(x?)/, '.js$1')), name: 'jsii', // That's what package.json would tell if we look up... version: '0.0.1', jsiiVersionFormat: 'short', @@ -98,5 +112,6 @@ function _makeProjectInfo(types: string): ProjectInfo { bundleDependencies: {}, targets: {}, excludeTypescript: [], + tsc: { outDir }, }; } diff --git a/packages/jsii/test/negatives/neg.stripped-deprecated.ts b/packages/jsii/test/negatives/neg.stripped-deprecated.ts new file mode 100644 index 0000000000..d3a95b5fee --- /dev/null +++ b/packages/jsii/test/negatives/neg.stripped-deprecated.ts @@ -0,0 +1,14 @@ +///!STRIP_DEPRECATED! + +/** @deprecated just don't use this! */ +export interface DeprecatedInterface {} + +export class LeftoverUsage { + public ouch?: DeprecatedInterface; + + public constructor(public readonly no: DeprecatedInterface) {} + + public bad(parameter: DeprecatedInterface): DeprecatedInterface { + return parameter; + } +} diff --git a/packages/jsii/test/project-info.test.ts b/packages/jsii/test/project-info.test.ts index 9a05f32c96..26269a8edb 100644 --- a/packages/jsii/test/project-info.test.ts +++ b/packages/jsii/test/project-info.test.ts @@ -1,8 +1,10 @@ +import * as spec from '@jsii/spec'; import * as clone from 'clone'; import * as fs from 'fs-extra'; -import * as spec from '@jsii/spec'; import * as os from 'os'; import * as path from 'path'; +import * as ts from 'typescript'; + import { loadProjectInfo } from '../lib/project-info'; import { VERSION } from '../lib/version'; @@ -202,6 +204,58 @@ describe('loadProjectInfo', () => { info.peerDependencies[TEST_DEP_ASSEMBLY.name] = '^42.1337.0'; }, )); + + describe('_loadDiagnostics', () => { + test('diagnostic categories are correctly detected', () => { + return _withTestProject( + async (projectRoot) => { + const info = await loadProjectInfo(projectRoot, { + fixPeerDependencies: false, + }); + expect(info.diagnostics).toBeDefined(); + const diagnostics = info.diagnostics!; + expect(Object.keys(diagnostics).sort()).toEqual([ + 'diagCode1', + 'diagCode2', + 'diagCode3', + 'diagCode4', + ]); + expect(diagnostics.diagCode1).toEqual(ts.DiagnosticCategory.Error); + expect(diagnostics.diagCode2).toEqual(ts.DiagnosticCategory.Warning); + expect(diagnostics.diagCode3).toEqual( + ts.DiagnosticCategory.Suggestion, + ); + expect(diagnostics.diagCode4).toEqual(ts.DiagnosticCategory.Message); + }, + (info) => { + const diagnostics = { + diagCode1: 'error', + diagCode2: 'warning', + diagCode3: 'suggestion', + diagCode4: 'message', + }; + info.jsii.diagnostics = diagnostics; + }, + ); + }); + + test('invalid category is rejected', () => { + return _withTestProject( + (projectRoot) => + expect( + loadProjectInfo(projectRoot, { + fixPeerDependencies: false, + }), + ).rejects.toThrow(/Invalid category/), + (info) => { + const diagnostics = { + diagCode1: 'invalid-category', + }; + info.jsii.diagnostics = diagnostics; + }, + ); + }); + }); }); const TEST_DEP_ASSEMBLY: spec.Assembly = { diff --git a/packages/jsii/test/quirks.test.ts b/packages/jsii/test/quirks.test.ts new file mode 100644 index 0000000000..ecb1fb230b --- /dev/null +++ b/packages/jsii/test/quirks.test.ts @@ -0,0 +1,32 @@ +import { sourceToAssemblyHelper } from '../lib'; + +// ---------------------------------------------------------------------- +test('trailing semicolon after method is correctly ignored', async () => { + const assembly = await sourceToAssemblyHelper(` + export class Foo { + private readonly initialized: boolean; + + public constructor() { + this.initialized = true; + }; + + public method() { return this.initialized; }; + } + `); + + expect(assembly.types!['testpkg.Foo']).toEqual({ + assembly: 'testpkg', + fqn: 'testpkg.Foo', + kind: 'class', + methods: [ + { + locationInModule: { filename: 'index.ts', line: 9 }, + name: 'method', + returns: { type: { primitive: 'boolean' } }, + }, + ], + initializer: { locationInModule: { filename: 'index.ts', line: 5 } }, + locationInModule: { filename: 'index.ts', line: 2 }, + name: 'Foo', + }); +}); diff --git a/packages/jsii/test/submodules.test.ts b/packages/jsii/test/submodules.test.ts new file mode 100644 index 0000000000..0b159faafb --- /dev/null +++ b/packages/jsii/test/submodules.test.ts @@ -0,0 +1,53 @@ +import { sourceToAssemblyHelper } from '../lib'; + +test('submodules loaded from directories can have a README', async () => { + const assembly = await sourceToAssemblyHelper({ + 'index.ts': 'export * as submodule from "./subdir"', + 'subdir/index.ts': 'export class Foo { }', + 'subdir/README.md': 'This is the README', + }); + + expect(assembly.submodules!['testpkg.submodule']).toEqual( + expect.objectContaining({ + readme: { + markdown: 'This is the README', + }, + }), + ); +}); + +test('submodules loaded from files can have a README', async () => { + const assembly = await sourceToAssemblyHelper({ + 'index.ts': 'export * as submodule from "./submod"', + 'submod.ts': 'export class Foo { }', + 'submod.README.md': 'This is the README', + }); + + expect(assembly.submodules!['testpkg.submodule']).toEqual( + expect.objectContaining({ + readme: { + markdown: 'This is the README', + }, + }), + ); +}); + +test('submodules loaded from directories can have targets', async () => { + const assembly = await sourceToAssemblyHelper({ + 'index.ts': 'export * as submodule from "./subdir"', + 'subdir/index.ts': 'export class Foo { }', + 'subdir/.jsiirc.json': JSON.stringify({ + targets: { + python: 'fun', + }, + }), + }); + + expect(assembly.submodules!['testpkg.submodule']).toEqual( + expect.objectContaining({ + targets: { + python: 'fun', + }, + }), + ); +}); diff --git a/packages/jsii/test/transforms/runtime-info.test.ts b/packages/jsii/test/transforms/runtime-info.test.ts new file mode 100644 index 0000000000..130b41f0b2 --- /dev/null +++ b/packages/jsii/test/transforms/runtime-info.test.ts @@ -0,0 +1,154 @@ +import * as ts from 'typescript'; + +import { RuntimeTypeInfoInjector } from '../../lib/transforms/runtime-info'; + +test('leaves files without classes unaltered', () => { + expect(transformedSource(EXAMPLE_NO_CLASS, 'Foo')).not.toContain( + 'JSII_RTTI_SYMBOL', + ); +}); + +test('leaves files without classes with metadata unaltered', () => { + expect(transformedSource(EXAMPLE_SINGLE_CLASS)).not.toContain( + 'JSII_RTTI_SYMBOL', + ); +}); + +test('adds jsii.rtti symbol at the top of each file when classes are present', () => { + expect(transformedSource(EXAMPLE_SINGLE_CLASS, 'Foo')).toContain( + 'const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");', + ); +}); + +test('adds runtime info for a class', () => { + expect(transformedSource(EXAMPLE_SINGLE_CLASS, 'Foo')).toContain( + 'private static readonly [JSII_RTTI_SYMBOL_1] = { fqn: "RuntimeInfoTest.Foo", version: "1.2.3" }', + ); +}); + +test('adds runtime info for each class', () => { + const transformed = transformedSource(EXAMPLE_MULTIPLE_CLASSES, 'Foo', 'Bar'); + expect(transformed).toContain( + 'private static readonly [JSII_RTTI_SYMBOL_1] = { fqn: "RuntimeInfoTest.Foo", version: "1.2.3" }', + ); + expect(transformed).toContain( + 'private static readonly [JSII_RTTI_SYMBOL_1] = { fqn: "RuntimeInfoTest.Bar", version: "1.2.3" }', + ); +}); + +test('skips runtime info if not available', () => { + const transformed = transformedSource(EXAMPLE_MULTIPLE_CLASSES, 'Foo'); + expect(transformed).toContain( + 'private static readonly [JSII_RTTI_SYMBOL_1] = { fqn: "RuntimeInfoTest.Foo", version: "1.2.3" }', + ); + expect(transformed).not.toContain( + 'private static readonly [JSII_RTTI_SYMBOL_1] = { fqn: "RuntimeInfoTest.Bar", version: "1.2.3" }', + ); +}); + +test('creates a unique name if the default is taken', () => { + // Conflicting example has existing variable for JSII_RTTI_SYMBOL_1, so transformation should use _2. + const transformed = transformedSource(EXAMPLE_CONFLICTING_NAME, 'Foo'); + expect(transformed).toContain( + 'const JSII_RTTI_SYMBOL_2 = Symbol.for("jsii.rtti");', + ); + expect(transformed).toContain( + 'private static readonly [JSII_RTTI_SYMBOL_2] = { fqn: "RuntimeInfoTest.Foo", version: "1.2.3" }', + ); +}); + +function transformedSource(source: string, ...classNames: string[]) { + const mockedTypeInfo = mockedTypeInfoForClasses(...classNames); + const injector = new TestRuntimeTypeInfoInjector(mockedTypeInfo); + const transformed = ts.transform( + ts.createSourceFile('source.ts', source, ts.ScriptTarget.Latest), + [injector.runtimeTypeTransformer()], + ); + return ts + .createPrinter() + .printBundle(ts.createBundle(transformed.transformed)); +} + +/** Test subclass of RuntimeTypeInfoInjector that accepts overrides for type info */ +class TestRuntimeTypeInfoInjector extends RuntimeTypeInfoInjector { + public constructor(private readonly typeInfo: Map) { + super('1.2.3'); + } + + protected getClassFqn(clazz: ts.ClassDeclaration): string | undefined { + return clazz.name ? this.typeInfo.get(clazz.name.text) : undefined; + } +} + +/** + * Mock the Map of classes to fqns. + * This assumes each class name only appears once in the source, + * which is a reasonable assumption for these tests. + */ +function mockedTypeInfoForClasses( + ...classNames: string[] +): Map { + const typeInfoMap = new Map(); + classNames.forEach((clazz) => + typeInfoMap.set(clazz, `RuntimeInfoTest.${clazz}`), + ); + return typeInfoMap; +} + +/** + * =============================== + * = EXAMPLE SOURCE FILES = + * =============================== + */ + +const EXAMPLE_NO_CLASS = ` +import * as ts from 'typescript'; + +interface Foo { + readonly foobar: string; +} +`; + +const EXAMPLE_SINGLE_CLASS = ` +import * as ts from 'typescript'; + +class Foo { + constructor(public readonly bar: string) {} +} +`; + +const EXAMPLE_MULTIPLE_CLASSES = ` +class Foo { + constructor(public readonly bar: string) {} + public doStuff() { return 42; } +} + +interface FooBar { + readonly answer: number; +} + +/** + * A bar. + */ +class Bar { + public doStuffToo() { + return new class implements FooBar { + public readonly answer = 21; + }(); + } +} + +export default class { + constructor() {} +} +`; + +const EXAMPLE_CONFLICTING_NAME = ` +import * as ts from 'typescript'; + +const JSII_RTTI_SYMBOL_1 = 42; + +class Foo { + constructor(public readonly bar: string) {} +} +`; diff --git a/packages/jsii/tsconfig.json b/packages/jsii/tsconfig.json index c83f0bfb31..6565dc0c72 100644 --- a/packages/jsii/tsconfig.json +++ b/packages/jsii/tsconfig.json @@ -1,12 +1,6 @@ { "extends": "../../tsconfig-base", - "include": [ - "**/*.ts" - ], - "exclude": [ - "test/negatives/*" - ], - "references": [{ - "path": "../@jsii/spec" - }] + "include": ["**/*.ts"], + "exclude": ["test/negatives/*", "jest.config.ts"], + "references": [{ "path": "../@jsii/spec" }] } diff --git a/packages/oo-ascii-tree/jest.config.ts b/packages/oo-ascii-tree/jest.config.ts new file mode 100644 index 0000000000..e37577d92f --- /dev/null +++ b/packages/oo-ascii-tree/jest.config.ts @@ -0,0 +1,3 @@ +import config from '../../jest.config'; + +export default config; diff --git a/packages/oo-ascii-tree/lib/ascii-tree.ts b/packages/oo-ascii-tree/lib/ascii-tree.ts index 7071a4f1eb..ee91543876 100644 --- a/packages/oo-ascii-tree/lib/ascii-tree.ts +++ b/packages/oo-ascii-tree/lib/ascii-tree.ts @@ -23,7 +23,7 @@ export class AsciiTree { /** * Prints the tree to an output stream. */ - public printTree(output: NodeJS.WritableStream = process.stdout) { + public printTree(output: Printer = process.stdout) { let ancestorsPrefix = ''; for (const parent of this.ancestors) { @@ -160,3 +160,5 @@ export class AsciiTree { return [...this.parent.ancestors, this.parent]; } } + +export type Printer = Pick; diff --git a/packages/oo-ascii-tree/package.json b/packages/oo-ascii-tree/package.json index 2faac9ee14..6531a7e58f 100644 --- a/packages/oo-ascii-tree/package.json +++ b/packages/oo-ascii-tree/package.json @@ -31,34 +31,12 @@ "package": "package-js" }, "devDependencies": { - "@types/jest": "^26.0.14", - "@types/node": "^10.17.39", - "eslint": "^7.11.0", - "jest": "^26.5.2", + "@types/jest": "^26.0.20", + "@types/node": "^10.17.51", + "eslint": "^7.19.0", + "jest": "^26.6.3", "jsii-build-tools": "^0.0.0", - "prettier": "^2.1.2", - "typescript": "~3.9.7" - }, - "jest": { - "collectCoverage": true, - "collectCoverageFrom": [ - "**/bin/**/*.js", - "**/lib/**/*.js" - ], - "coverageReporters": [ - "lcov", - "text" - ], - "coverageThreshold": { - "global": { - "branches": 85, - "statements": 85 - } - }, - "errorOnDeprecated": true, - "testEnvironment": "node", - "testMatch": [ - "**/?(*.)+(spec|test).js" - ] + "prettier": "^2.2.1", + "typescript": "~3.9.9" } } diff --git a/packages/oo-ascii-tree/test/tree.test.ts b/packages/oo-ascii-tree/test/tree.test.ts index dc615cd6b6..d6bca4be15 100644 --- a/packages/oo-ascii-tree/test/tree.test.ts +++ b/packages/oo-ascii-tree/test/tree.test.ts @@ -1,6 +1,7 @@ import * as fs from 'fs'; import * as path from 'path'; import { promisify } from 'util'; + import { AsciiTree } from '../lib'; const readFile = promisify(fs.readFile); diff --git a/packages/oo-ascii-tree/tsconfig.json b/packages/oo-ascii-tree/tsconfig.json index 388615743a..34b48fb638 100644 --- a/packages/oo-ascii-tree/tsconfig.json +++ b/packages/oo-ascii-tree/tsconfig.json @@ -1,4 +1,5 @@ { "extends": "../../tsconfig-base", - "include": ["**/*.ts"] + "include": ["**/*.ts"], + "exclude": ["jest.config.ts"], } diff --git a/scripts/align-version.js b/scripts/align-version.js index f5b5cdf2ee..225aad57d6 100755 --- a/scripts/align-version.js +++ b/scripts/align-version.js @@ -7,6 +7,11 @@ const fs = require('fs'); const marker = require('./get-version-marker'); const repoVersion = require('./get-version'); +const exclude = [ + 'jsii-calc', + '@scope/jsii-calc-base-of-base' +] + for (const file of process.argv.splice(2)) { const pkg = JSON.parse(fs.readFileSync(file).toString()); @@ -15,11 +20,14 @@ for (const file of process.argv.splice(2)) { continue; } - if (pkg.version !== marker) { - throw new Error(`unexpected - all package.json files in this repo should have a version of ${marker}: ${file}`); - } + // jsii-calc have special versions to test golang major version suffix + if (!exclude.includes(pkg.name)) { + if (pkg.version !== marker) { + throw new Error(`unexpected - all package.json files in this repo should have a version of ${marker}: ${file}`); + } - pkg.version = repoVersion; + pkg.version = repoVersion; + } processSection(pkg.dependencies || { }, file); processSection(pkg.devDependencies || { }, file); diff --git a/scripts/fetch-dotnet-snk.sh b/scripts/fetch-dotnet-snk.sh deleted file mode 100644 index 7c22c6b466..0000000000 --- a/scripts/fetch-dotnet-snk.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash -set -euo pipefail - -# This script retrieves the .snk file needed to create strong names for .NET assemblies. - -function echo_usage() { - echo "USAGE: Set the following environment variables, then run ./fetch-dotnet-snk.sh with no arguments." - echo -e "\tDOTNET_STRONG_NAME_ENABLED=true" - echo -e "\tDOTNET_STRONG_NAME_ROLE_ARN=" - echo -e "\tDOTNET_STRONG_NAME_SECRET_REGION=" - echo -e "\tDOTNET_STRONG_NAME_SECRET_ID=" -} - -if [ -z "${DOTNET_STRONG_NAME_ENABLED:-}" ]; then - echo "Environment variable DOTNET_STRONG_NAME_ENABLED is not set. Skipping strong-name signing." - exit 0 -fi - -# TODO: FIXME LATER -echo "!!! STRONG NAME SIGNING TEMPORARILY DISABLED !!!" -exit 0 -# END OF TODO - -echo "Retrieving SNK..." - -if [ -z "${DOTNET_STRONG_NAME_ROLE_ARN:-}" ]; then - echo "Strong name signing is enabled, but DOTNET_STRONG_NAME_ROLE_ARN is not set." - echo_usage - exit 1 -fi - -if [ -z "${DOTNET_STRONG_NAME_SECRET_REGION:-}" ]; then - echo "Strong name signing is enabled, but DOTNET_STRONG_NAME_SECRET_REGION is not set." - echo_usage - exit 1 -fi - -if [ -z "${DOTNET_STRONG_NAME_SECRET_ID:-}" ]; then - echo "Strong name signing is enabled, but DOTNET_STRONG_NAME_SECRET_ID is not set." - echo_usage - exit 1 -fi - -ROLE=$(aws sts assume-role --region ${DOTNET_STRONG_NAME_SECRET_REGION:-} --role-arn ${DOTNET_STRONG_NAME_ROLE_ARN:-} --role-session-name "jsii-dotnet-snk") -export AWS_ACCESS_KEY_ID=$(node -p "(${ROLE}).Credentials.AccessKeyId") -export AWS_SECRET_ACCESS_KEY=$(node -p "(${ROLE}).Credentials.SecretAccessKey") -export AWS_SESSION_TOKEN=$(node -p "(${ROLE}).Credentials.SessionToken") - -SNK_SECRET=$(aws secretsmanager get-secret-value --region ${DOTNET_STRONG_NAME_SECRET_REGION:-} --secret-id ${DOTNET_STRONG_NAME_SECRET_ID:-}) -TMP_DIR=$(mktemp -d) -TMP_KEY="$TMP_DIR/key.snk" -node -p "(${SNK_SECRET}).SecretBinary" | base64 --decode > $TMP_KEY - -cp $TMP_KEY packages/@jsii/dotnet-runtime/src/Amazon.JSII.Analyzers/key.snk -cp $TMP_KEY packages/@jsii/dotnet-runtime/src/Amazon.JSII.JsonModel/key.snk -cp $TMP_KEY packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/key.snk - -rm -rf $TMP_DIR diff --git a/superchain/Dockerfile b/superchain/Dockerfile index 8d2635f43b..8455512c53 100644 --- a/superchain/Dockerfile +++ b/superchain/Dockerfile @@ -1,4 +1,4 @@ -FROM amazonlinux:2 +FROM public.ecr.aws/amazonlinux/amazonlinux:2 # Set locale and some other interesting environment variables ENV LANG="C.UTF-8" \ @@ -25,18 +25,20 @@ ENV LANG="C.UTF-8" # Also upgrading anything already installed, and adding some common dependencies for included tools RUN yum -y upgrade \ && yum -y install deltarpm tar \ - gcc make system-rpm-config \ + make system-rpm-config yum-utils \ git gzip openssl rsync unzip which zip \ && yum clean all && rm -rf /var/cache/yum # Install .NET Core, mono & PowerShell COPY gpg/mono.asc /tmp/mono.asc RUN rpm --import "https://packages.microsoft.com/keys/microsoft.asc" \ - && rpm -Uvh "https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm" \ + && rpm -Uvh "https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm" \ && rpm --import /tmp/mono.asc && rm -f /tmp/mono.asc \ && curl -sSL "https://download.mono-project.com/repo/centos7-stable.repo" \ | tee /etc/yum.repos.d/mono-centos7-stable.repo \ && yum -y install dotnet-sdk-3.1 mono-devel powershell \ + && yum-config-manager --disable packages-microsoft-com-prod \ + && yum-config-manager --disable mono-centos7-stable \ && yum clean all && rm -rf /var/cache/yum # Install Python 3 @@ -46,16 +48,6 @@ RUN yum -y install python3 python3-pip && rm -rf $(pip cache dir) \ && yum clean all && rm -rf /var/cache/yum -# Install Ruby 2.6+ -RUN amazon-linux-extras install ruby2.6 \ - && yum -y install ruby-devel rubygem-rdoc \ - && yum clean all && rm -rf /var/cache/yum \ - && echo 'install: --no-document' > /usr/local/etc/gemrc \ - && echo 'update: --no-document' >> /usr/local/etc/gemrc \ - && mkdir -p "$GEM_HOME" \ - && gem install 'bundler:~>1.17.3' 'bundler:~>2.1.4' -ENV PATH="$GEM_HOME/bin:$GEM_HOME/gems/bin:$PATH" - # Install JDK8 (Corretto) RUN amazon-linux-extras enable corretto8 \ && yum -y install java-1.8.0-amazon-corretto-devel \ @@ -114,14 +106,9 @@ ARG COMMIT_ID LABEL org.opencontainers.image.created=${BUILD_TIMESTAMP} \ org.opencontainers.image.title="jsii/superchain" \ org.opencontainers.image.description="An image to build cross-language artifacts with AWS jsii" \ - org.opencontainers.image.url="https://github.com/aws/jsii/tree/master/superchain" \ + org.opencontainers.image.url="https://github.com/aws/jsii/tree/main/superchain" \ org.opencontainers.image.source="https://github.com/aws/jsii.git" \ org.opencontainers.image.revision=$COMMIT_ID \ org.opencontainers.image.authors="Amazon Web Services (https://aws.amazon.com)" -# Upgrade all packages that weren't up-to-date just yet (last so it risks invalidating cache less) -# This is the second time we do it (this layer may be empty)... It's in case we re-used a cached layer the first time -RUN yum -y upgrade \ - && yum clean all && rm -rf /var/cache/yum - CMD ["/bin/bash"] diff --git a/superchain/README.md b/superchain/README.md index 634150654d..cc7d2d045a 100644 --- a/superchain/README.md +++ b/superchain/README.md @@ -1,4 +1,5 @@ # Superchain + An [`amazonlinux:2`][al2]-based Docker image bundling all the SDKs and tools required in order to package [jsii] projects in all supported languages. @@ -16,7 +17,6 @@ SDK | Version `PowerShell` | `pwsh >= 6.2.3` `Python 3` | `python3 >= 3.7.4` with `pip3 >= 20.0.2` `Go` | `go >= 1.15.2` -`Ruby` | `ruby >= 2.6.3p62` ## Included Tools & Utilities @@ -24,7 +24,6 @@ Tool / Utility | Version ---------------|-------------------------------------------- `aws` | `>= 1.16.300` `bundler` | `>= 1.17.3` and `>= 2.1.4` -`gcc` | `>= 7.3.1` `docker` | `>= 18.09.9-ce` `git` | `>= 2.23.1` `make` | `>= 3.82` diff --git a/tools/jsii-build-tools/package.json b/tools/jsii-build-tools/package.json index b822287acf..1b4baaa445 100644 --- a/tools/jsii-build-tools/package.json +++ b/tools/jsii-build-tools/package.json @@ -34,6 +34,6 @@ }, "dependencies": { "chalk": "^4.1.0", - "diff": "^4.0.2" + "diff": "^5.0.0" } } diff --git a/tsconfig.json b/tsconfig.json index 60adb018b7..c623035291 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,4 +1,5 @@ { + "extends": "./tsconfig-base.json", "files": [], "include": [], "references": [ diff --git a/yarn.lock b/yarn.lock index 38f612603c..32115d5882 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,151 +2,151 @@ # yarn lockfile v1 -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.0.0-beta.36", "@babel/code-frame@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a" - integrity sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg== - dependencies: - "@babel/highlight" "^7.10.4" - -"@babel/core@^7.0.0-beta.39", "@babel/core@^7.1.0", "@babel/core@^7.7.5": - version "7.11.1" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.11.1.tgz#2c55b604e73a40dc21b0e52650b11c65cf276643" - integrity sha512-XqF7F6FWQdKGGWAzGELL+aCO1p+lRY5Tj5/tbT3St1G8NaH70jhhDIKknIZaDans0OQBG5wRAldROLHSt44BgQ== - dependencies: - "@babel/code-frame" "^7.10.4" - "@babel/generator" "^7.11.0" - "@babel/helper-module-transforms" "^7.11.0" - "@babel/helpers" "^7.10.4" - "@babel/parser" "^7.11.1" - "@babel/template" "^7.10.4" - "@babel/traverse" "^7.11.0" - "@babel/types" "^7.11.0" +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz#dcfc826beef65e75c50e21d3837d7d95798dd658" + integrity sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g== + dependencies: + "@babel/highlight" "^7.12.13" + +"@babel/core@^7.1.0", "@babel/core@^7.7.5": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.13.tgz#b73a87a3a3e7d142a66248bf6ad88b9ceb093425" + integrity sha512-BQKE9kXkPlXHPeqissfxo0lySWJcYdEP0hdtJOH/iJfDdhOCcgtNCjftCJg3qqauB4h+lz2N6ixM++b9DN1Tcw== + dependencies: + "@babel/code-frame" "^7.12.13" + "@babel/generator" "^7.12.13" + "@babel/helper-module-transforms" "^7.12.13" + "@babel/helpers" "^7.12.13" + "@babel/parser" "^7.12.13" + "@babel/template" "^7.12.13" + "@babel/traverse" "^7.12.13" + "@babel/types" "^7.12.13" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.1" json5 "^2.1.2" lodash "^4.17.19" - resolve "^1.3.2" semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.11.0": - version "7.11.0" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.11.0.tgz#4b90c78d8c12825024568cbe83ee6c9af193585c" - integrity sha512-fEm3Uzw7Mc9Xi//qU20cBKatTfs2aOtKqmvy/Vm7RkJEGFQ4xc9myCfbXxqK//ZS8MR/ciOHw6meGASJuKmDfQ== +"@babel/generator@^7.12.13": + version "7.12.15" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.12.15.tgz#4617b5d0b25cc572474cc1aafee1edeaf9b5368f" + integrity sha512-6F2xHxBiFXWNSGb7vyCUTBF8RCLY66rS0zEPcP8t/nQyXjha5EuK4z7H5o7fWG8B4M7y6mqVWq1J+1PuwRhecQ== dependencies: - "@babel/types" "^7.11.0" + "@babel/types" "^7.12.13" jsesc "^2.5.1" source-map "^0.5.0" -"@babel/helper-function-name@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz#d2d3b20c59ad8c47112fa7d2a94bc09d5ef82f1a" - integrity sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ== - dependencies: - "@babel/helper-get-function-arity" "^7.10.4" - "@babel/template" "^7.10.4" - "@babel/types" "^7.10.4" - -"@babel/helper-get-function-arity@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz#98c1cbea0e2332f33f9a4661b8ce1505b2c19ba2" - integrity sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A== - dependencies: - "@babel/types" "^7.10.4" - -"@babel/helper-member-expression-to-functions@^7.10.4": - version "7.11.0" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.11.0.tgz#ae69c83d84ee82f4b42f96e2a09410935a8f26df" - integrity sha512-JbFlKHFntRV5qKw3YC0CvQnDZ4XMwgzzBbld7Ly4Mj4cbFy3KywcR8NtNctRToMWJOVvLINJv525Gd6wwVEx/Q== - dependencies: - "@babel/types" "^7.11.0" - -"@babel/helper-module-imports@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.10.4.tgz#4c5c54be04bd31670a7382797d75b9fa2e5b5620" - integrity sha512-nEQJHqYavI217oD9+s5MUBzk6x1IlvoS9WTPfgG43CbMEeStE0v+r+TucWdx8KFGowPGvyOkDT9+7DHedIDnVw== - dependencies: - "@babel/types" "^7.10.4" - -"@babel/helper-module-transforms@^7.11.0": - version "7.11.0" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.11.0.tgz#b16f250229e47211abdd84b34b64737c2ab2d359" - integrity sha512-02EVu8COMuTRO1TAzdMtpBPbe6aQ1w/8fePD2YgQmxZU4gpNWaL9gK3Jp7dxlkUlUCJOTaSeA+Hrm1BRQwqIhg== - dependencies: - "@babel/helper-module-imports" "^7.10.4" - "@babel/helper-replace-supers" "^7.10.4" - "@babel/helper-simple-access" "^7.10.4" - "@babel/helper-split-export-declaration" "^7.11.0" - "@babel/template" "^7.10.4" - "@babel/types" "^7.11.0" +"@babel/helper-function-name@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz#93ad656db3c3c2232559fd7b2c3dbdcbe0eb377a" + integrity sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA== + dependencies: + "@babel/helper-get-function-arity" "^7.12.13" + "@babel/template" "^7.12.13" + "@babel/types" "^7.12.13" + +"@babel/helper-get-function-arity@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz#bc63451d403a3b3082b97e1d8b3fe5bd4091e583" + integrity sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg== + dependencies: + "@babel/types" "^7.12.13" + +"@babel/helper-member-expression-to-functions@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.13.tgz#c5715695b4f8bab32660dbdcdc2341dec7e3df40" + integrity sha512-B+7nN0gIL8FZ8SvMcF+EPyB21KnCcZHQZFczCxbiNGV/O0rsrSBlWGLzmtBJ3GMjSVMIm4lpFhR+VdVBuIsUcQ== + dependencies: + "@babel/types" "^7.12.13" + +"@babel/helper-module-imports@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.12.13.tgz#ec67e4404f41750463e455cc3203f6a32e93fcb0" + integrity sha512-NGmfvRp9Rqxy0uHSSVP+SRIW1q31a7Ji10cLBcqSDUngGentY4FRiHOFZFE1CLU5eiL0oE8reH7Tg1y99TDM/g== + dependencies: + "@babel/types" "^7.12.13" + +"@babel/helper-module-transforms@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.12.13.tgz#01afb052dcad2044289b7b20beb3fa8bd0265bea" + integrity sha512-acKF7EjqOR67ASIlDTupwkKM1eUisNAjaSduo5Cz+793ikfnpe7p4Q7B7EWU2PCoSTPWsQkR7hRUWEIZPiVLGA== + dependencies: + "@babel/helper-module-imports" "^7.12.13" + "@babel/helper-replace-supers" "^7.12.13" + "@babel/helper-simple-access" "^7.12.13" + "@babel/helper-split-export-declaration" "^7.12.13" + "@babel/helper-validator-identifier" "^7.12.11" + "@babel/template" "^7.12.13" + "@babel/traverse" "^7.12.13" + "@babel/types" "^7.12.13" lodash "^4.17.19" -"@babel/helper-optimise-call-expression@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz#50dc96413d594f995a77905905b05893cd779673" - integrity sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg== +"@babel/helper-optimise-call-expression@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz#5c02d171b4c8615b1e7163f888c1c81c30a2aaea" + integrity sha512-BdWQhoVJkp6nVjB7nkFWcn43dkprYauqtk++Py2eaf/GRDFm5BxRqEIZCiHlZUGAVmtwKcsVL1dC68WmzeFmiA== dependencies: - "@babel/types" "^7.10.4" + "@babel/types" "^7.12.13" -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.8.0": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz#2f75a831269d4f677de49986dff59927533cf375" - integrity sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg== +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.8.0": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.12.13.tgz#174254d0f2424d8aefb4dd48057511247b0a9eeb" + integrity sha512-C+10MXCXJLiR6IeG9+Wiejt9jmtFpxUc3MQqCmPY8hfCjyUGl9kT+B2okzEZrtykiwrc4dbCPdDoz0A/HQbDaA== -"@babel/helper-replace-supers@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.10.4.tgz#d585cd9388ea06e6031e4cd44b6713cbead9e6cf" - integrity sha512-sPxZfFXocEymYTdVK1UNmFPBN+Hv5mJkLPsYWwGBxZAxaWfFu+xqp7b6qWD0yjNuNL2VKc6L5M18tOXUP7NU0A== +"@babel/helper-replace-supers@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.12.13.tgz#00ec4fb6862546bd3d0aff9aac56074277173121" + integrity sha512-pctAOIAMVStI2TMLhozPKbf5yTEXc0OJa0eENheb4w09SrgOWEs+P4nTOZYJQCqs8JlErGLDPDJTiGIp3ygbLg== dependencies: - "@babel/helper-member-expression-to-functions" "^7.10.4" - "@babel/helper-optimise-call-expression" "^7.10.4" - "@babel/traverse" "^7.10.4" - "@babel/types" "^7.10.4" + "@babel/helper-member-expression-to-functions" "^7.12.13" + "@babel/helper-optimise-call-expression" "^7.12.13" + "@babel/traverse" "^7.12.13" + "@babel/types" "^7.12.13" -"@babel/helper-simple-access@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.10.4.tgz#0f5ccda2945277a2a7a2d3a821e15395edcf3461" - integrity sha512-0fMy72ej/VEvF8ULmX6yb5MtHG4uH4Dbd6I/aHDb/JVg0bbivwt9Wg+h3uMvX+QSFtwr5MeItvazbrc4jtRAXw== +"@babel/helper-simple-access@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.12.13.tgz#8478bcc5cacf6aa1672b251c1d2dde5ccd61a6c4" + integrity sha512-0ski5dyYIHEfwpWGx5GPWhH35j342JaflmCeQmsPWcrOQDtCN6C1zKAVRFVbK53lPW2c9TsuLLSUDf0tIGJ5hA== dependencies: - "@babel/template" "^7.10.4" - "@babel/types" "^7.10.4" + "@babel/types" "^7.12.13" -"@babel/helper-split-export-declaration@^7.11.0": - version "7.11.0" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz#f8a491244acf6a676158ac42072911ba83ad099f" - integrity sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg== +"@babel/helper-split-export-declaration@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz#e9430be00baf3e88b0e13e6f9d4eaf2136372b05" + integrity sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg== dependencies: - "@babel/types" "^7.11.0" + "@babel/types" "^7.12.13" -"@babel/helper-validator-identifier@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2" - integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw== +"@babel/helper-validator-identifier@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz#c9a1f021917dcb5ccf0d4e453e399022981fc9ed" + integrity sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw== -"@babel/helpers@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.10.4.tgz#2abeb0d721aff7c0a97376b9e1f6f65d7a475044" - integrity sha512-L2gX/XeUONeEbI78dXSrJzGdz4GQ+ZTA/aazfUsFaWjSe95kiCuOZ5HsXvkiw3iwF+mFHSRUfJU8t6YavocdXA== +"@babel/helpers@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.12.13.tgz#3c75e993632e4dadc0274eae219c73eb7645ba47" + integrity sha512-oohVzLRZ3GQEk4Cjhfs9YkJA4TdIDTObdBEZGrd6F/T0GPSnuV6l22eMcxlvcvzVIPH3VTtxbseudM1zIE+rPQ== dependencies: - "@babel/template" "^7.10.4" - "@babel/traverse" "^7.10.4" - "@babel/types" "^7.10.4" + "@babel/template" "^7.12.13" + "@babel/traverse" "^7.12.13" + "@babel/types" "^7.12.13" -"@babel/highlight@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143" - integrity sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA== +"@babel/highlight@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.12.13.tgz#8ab538393e00370b26271b01fa08f7f27f2e795c" + integrity sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww== dependencies: - "@babel/helper-validator-identifier" "^7.10.4" + "@babel/helper-validator-identifier" "^7.12.11" chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.10.4", "@babel/parser@^7.11.0", "@babel/parser@^7.11.1": - version "7.11.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.11.3.tgz#9e1eae46738bcd08e23e867bab43e7b95299a8f9" - integrity sha512-REo8xv7+sDxkKvoxEywIdsNFiZLybwdI7hcT5uEPyQrSMB4YQ973BfC9OOrD/81MaIjh6UxdulIQXkjmiH3PcA== +"@babel/parser@^7.1.0", "@babel/parser@^7.12.13": + version "7.12.15" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.15.tgz#2b20de7f0b4b332d9b119dd9c33409c538b8aacf" + integrity sha512-AQBOU2Z9kWwSZMd6lNjCX0GUgFonL1wAM1db8L8PMk9UDaGsRCArBkU4Sc+UCM3AE4hjbXx+h58Lb3QT4oRmrA== "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -163,11 +163,11 @@ "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-class-properties@^7.8.3": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.10.4.tgz#6644e6a0baa55a61f9e3231f6c9eeb6ee46c124c" - integrity sha512-GCSBF7iUle6rNugfURwNmCGG3Z/2+opxAMLs1nND4bhEG5PuxTIggDBoeYYSujAlLtsupzOHYJQgPS3pivwXIA== + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" + integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== dependencies: - "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-plugin-utils" "^7.12.13" "@babel/plugin-syntax-import-meta@^7.8.3": version "7.10.4" @@ -225,43 +225,50 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/runtime@^7.11.0", "@babel/runtime@^7.7.6": - version "7.11.2" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.11.2.tgz#f549c13c754cc40b87644b9fa9f09a6a95fe0736" - integrity sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw== +"@babel/plugin-syntax-top-level-await@^7.8.3": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.13.tgz#c5f0fa6e249f5b739727f923540cf7a806130178" + integrity sha512-A81F9pDwyS7yM//KwbCSDqy3Uj4NMIurtplxphWxoYtNPov7cJsDkAFNNyVlIZ3jwGycVsurZ+LtOA8gZ376iQ== dependencies: - regenerator-runtime "^0.13.4" + "@babel/helper-plugin-utils" "^7.12.13" -"@babel/template@^7.10.4", "@babel/template@^7.3.3": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.10.4.tgz#3251996c4200ebc71d1a8fc405fba940f36ba278" - integrity sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA== +"@babel/runtime@^7.12.5", "@babel/runtime@^7.7.6": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.12.13.tgz#0a21452352b02542db0ffb928ac2d3ca7cb6d66d" + integrity sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw== dependencies: - "@babel/code-frame" "^7.10.4" - "@babel/parser" "^7.10.4" - "@babel/types" "^7.10.4" + regenerator-runtime "^0.13.4" -"@babel/traverse@^7.0.0-beta.39", "@babel/traverse@^7.1.0", "@babel/traverse@^7.10.4", "@babel/traverse@^7.11.0": - version "7.11.0" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.11.0.tgz#9b996ce1b98f53f7c3e4175115605d56ed07dd24" - integrity sha512-ZB2V+LskoWKNpMq6E5UUCrjtDUh5IOTAyIl0dTjIEoXum/iKWkoIEKIRDnUucO6f+2FzNkE0oD4RLKoPIufDtg== - dependencies: - "@babel/code-frame" "^7.10.4" - "@babel/generator" "^7.11.0" - "@babel/helper-function-name" "^7.10.4" - "@babel/helper-split-export-declaration" "^7.11.0" - "@babel/parser" "^7.11.0" - "@babel/types" "^7.11.0" +"@babel/template@^7.12.13", "@babel/template@^7.3.3": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.12.13.tgz#530265be8a2589dbb37523844c5bcb55947fb327" + integrity sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA== + dependencies: + "@babel/code-frame" "^7.12.13" + "@babel/parser" "^7.12.13" + "@babel/types" "^7.12.13" + +"@babel/traverse@^7.1.0", "@babel/traverse@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.13.tgz#689f0e4b4c08587ad26622832632735fb8c4e0c0" + integrity sha512-3Zb4w7eE/OslI0fTp8c7b286/cQps3+vdLW3UcwC8VSJC6GbKn55aeVVu2QJNuCDoeKyptLOFrPq8WqZZBodyA== + dependencies: + "@babel/code-frame" "^7.12.13" + "@babel/generator" "^7.12.13" + "@babel/helper-function-name" "^7.12.13" + "@babel/helper-split-export-declaration" "^7.12.13" + "@babel/parser" "^7.12.13" + "@babel/types" "^7.12.13" debug "^4.1.0" globals "^11.1.0" lodash "^4.17.19" -"@babel/types@^7.0.0", "@babel/types@^7.0.0-beta.39", "@babel/types@^7.10.4", "@babel/types@^7.11.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3": - version "7.11.0" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.11.0.tgz#2ae6bf1ba9ae8c3c43824e5861269871b206e90d" - integrity sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA== +"@babel/types@^7.0.0", "@babel/types@^7.12.13", "@babel/types@^7.3.0", "@babel/types@^7.3.3": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.13.tgz#8be1aa8f2c876da11a9cf650c0ecf656913ad611" + integrity sha512-oKrdZTld2im1z8bDwTOQvUbxKwE+854zc16qWZQlcTqMN00pWxHQ4ZeOq0yDMnisOpRykH2/5Qqcrk/OlbAjiQ== dependencies: - "@babel/helper-validator-identifier" "^7.10.4" + "@babel/helper-validator-identifier" "^7.12.11" lodash "^4.17.19" to-fast-properties "^2.0.0" @@ -278,10 +285,15 @@ exec-sh "^0.3.2" minimist "^1.2.0" -"@eslint/eslintrc@^0.1.3": - version "0.1.3" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.1.3.tgz#7d1a2b2358552cc04834c0979bd4275362e37085" - integrity sha512-4YVwPkANLeNtRjMekzux1ci8hIaH5eGKktGqR0d3LWsKNn5B2X/1Z6Trxy7jQXl9EBGE6Yj02O+t09FMeRllaA== +"@discoveryjs/json-ext@^0.5.0": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.2.tgz#8f03a22a04de437254e8ce8cc84ba39689288752" + integrity sha512-HyYEUDeIj5rRQU2Hk5HTB2uHsbRQpF70nvMhVzi+VJR0X+xNEhjPui4/kBf3VeH/wqD28PT4sVOm8qqLjBrSZg== + +"@eslint/eslintrc@^0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.3.0.tgz#d736d6963d7003b6514e6324bec9c602ac340318" + integrity sha512-1JTKgrOKAHVivSvOYw+sJOunkBjUOvjqWk1DPja7ZFhIS2mX/4EgTT8M7eTK9jrKhL/FvXXEbQwIs3pg1xp3dg== dependencies: ajv "^6.12.4" debug "^4.1.1" @@ -290,7 +302,7 @@ ignore "^4.0.6" import-fresh "^3.2.1" js-yaml "^3.13.1" - lodash "^4.17.19" + lodash "^4.17.20" minimatch "^3.0.4" strip-json-comments "^3.1.1" @@ -387,93 +399,93 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd" integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== -"@jest/console@^26.5.2": - version "26.5.2" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-26.5.2.tgz#94fc4865b1abed7c352b5e21e6c57be4b95604a6" - integrity sha512-lJELzKINpF1v74DXHbCRIkQ/+nUV1M+ntj+X1J8LxCgpmJZjfLmhFejiMSbjjD66fayxl5Z06tbs3HMyuik6rw== +"@jest/console@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-26.6.2.tgz#4e04bc464014358b03ab4937805ee36a0aeb98f2" + integrity sha512-IY1R2i2aLsLr7Id3S6p2BA82GNWryt4oSvEXLAKc+L2zdi89dSkE8xC1C+0kpATG4JhBJREnQOH7/zmccM2B0g== dependencies: - "@jest/types" "^26.5.2" + "@jest/types" "^26.6.2" "@types/node" "*" chalk "^4.0.0" - jest-message-util "^26.5.2" - jest-util "^26.5.2" + jest-message-util "^26.6.2" + jest-util "^26.6.2" slash "^3.0.0" -"@jest/core@^26.5.2": - version "26.5.2" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-26.5.2.tgz#e39f14676f4ba4632ecabfdc374071ab22131f22" - integrity sha512-LLTo1LQMg7eJjG/+P1NYqFof2B25EV1EqzD5FonklihG4UJKiK2JBIvWonunws6W7e+DhNLoFD+g05tCY03eyA== +"@jest/core@^26.6.3": + version "26.6.3" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-26.6.3.tgz#7639fcb3833d748a4656ada54bde193051e45fad" + integrity sha512-xvV1kKbhfUqFVuZ8Cyo+JPpipAHHAV3kcDBftiduK8EICXmTFddryy3P7NfZt8Pv37rA9nEJBKCCkglCPt/Xjw== dependencies: - "@jest/console" "^26.5.2" - "@jest/reporters" "^26.5.2" - "@jest/test-result" "^26.5.2" - "@jest/transform" "^26.5.2" - "@jest/types" "^26.5.2" + "@jest/console" "^26.6.2" + "@jest/reporters" "^26.6.2" + "@jest/test-result" "^26.6.2" + "@jest/transform" "^26.6.2" + "@jest/types" "^26.6.2" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.4" - jest-changed-files "^26.5.2" - jest-config "^26.5.2" - jest-haste-map "^26.5.2" - jest-message-util "^26.5.2" + jest-changed-files "^26.6.2" + jest-config "^26.6.3" + jest-haste-map "^26.6.2" + jest-message-util "^26.6.2" jest-regex-util "^26.0.0" - jest-resolve "^26.5.2" - jest-resolve-dependencies "^26.5.2" - jest-runner "^26.5.2" - jest-runtime "^26.5.2" - jest-snapshot "^26.5.2" - jest-util "^26.5.2" - jest-validate "^26.5.2" - jest-watcher "^26.5.2" + jest-resolve "^26.6.2" + jest-resolve-dependencies "^26.6.3" + jest-runner "^26.6.3" + jest-runtime "^26.6.3" + jest-snapshot "^26.6.2" + jest-util "^26.6.2" + jest-validate "^26.6.2" + jest-watcher "^26.6.2" micromatch "^4.0.2" p-each-series "^2.1.0" rimraf "^3.0.0" slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/environment@^26.5.2": - version "26.5.2" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-26.5.2.tgz#eba3cfc698f6e03739628f699c28e8a07f5e65fe" - integrity sha512-YjhCD/Zhkz0/1vdlS/QN6QmuUdDkpgBdK4SdiVg4Y19e29g4VQYN5Xg8+YuHjdoWGY7wJHMxc79uDTeTOy9Ngw== +"@jest/environment@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-26.6.2.tgz#ba364cc72e221e79cc8f0a99555bf5d7577cf92c" + integrity sha512-nFy+fHl28zUrRsCeMB61VDThV1pVTtlEokBRgqPrcT1JNq4yRNIyTHfyht6PqtUvY9IsuLGTrbG8kPXjSZIZwA== dependencies: - "@jest/fake-timers" "^26.5.2" - "@jest/types" "^26.5.2" + "@jest/fake-timers" "^26.6.2" + "@jest/types" "^26.6.2" "@types/node" "*" - jest-mock "^26.5.2" + jest-mock "^26.6.2" -"@jest/fake-timers@^26.5.2": - version "26.5.2" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-26.5.2.tgz#1291ac81680ceb0dc7daa1f92c059307eea6400a" - integrity sha512-09Hn5Oraqt36V1akxQeWMVL0fR9c6PnEhpgLaYvREXZJAh2H2Y+QLCsl0g7uMoJeoWJAuz4tozk1prbR1Fc1sw== +"@jest/fake-timers@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-26.6.2.tgz#459c329bcf70cee4af4d7e3f3e67848123535aad" + integrity sha512-14Uleatt7jdzefLPYM3KLcnUl1ZNikaKq34enpb5XG9i81JpppDb5muZvonvKyrl7ftEHkKS5L5/eB/kxJ+bvA== dependencies: - "@jest/types" "^26.5.2" + "@jest/types" "^26.6.2" "@sinonjs/fake-timers" "^6.0.1" "@types/node" "*" - jest-message-util "^26.5.2" - jest-mock "^26.5.2" - jest-util "^26.5.2" + jest-message-util "^26.6.2" + jest-mock "^26.6.2" + jest-util "^26.6.2" -"@jest/globals@^26.5.2": - version "26.5.2" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-26.5.2.tgz#c333f82c29e19ecb609a75d1a532915a5c956c59" - integrity sha512-9PmnFsAUJxpPt1s/stq02acS1YHliVBDNfAWMe1bwdRr1iTCfhbNt3ERQXrO/ZfZSweftoA26Q/2yhSVSWQ3sw== +"@jest/globals@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-26.6.2.tgz#5b613b78a1aa2655ae908eba638cc96a20df720a" + integrity sha512-85Ltnm7HlB/KesBUuALwQ68YTU72w9H2xW9FjZ1eL1U3lhtefjjl5c2MiUbpXt/i6LaPRvoOFJ22yCBSfQ0JIA== dependencies: - "@jest/environment" "^26.5.2" - "@jest/types" "^26.5.2" - expect "^26.5.2" + "@jest/environment" "^26.6.2" + "@jest/types" "^26.6.2" + expect "^26.6.2" -"@jest/reporters@^26.5.2": - version "26.5.2" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-26.5.2.tgz#0f1c900c6af712b46853d9d486c9c0382e4050f6" - integrity sha512-zvq6Wvy6MmJq/0QY0YfOPb49CXKSf42wkJbrBPkeypVa8I+XDxijvFuywo6TJBX/ILPrdrlE/FW9vJZh6Rf9vA== +"@jest/reporters@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-26.6.2.tgz#1f518b99637a5f18307bd3ecf9275f6882a667f6" + integrity sha512-h2bW53APG4HvkOnVMo8q3QXa6pcaNt1HkwVsOPMBV6LD/q9oSpxNSYZQYkAnjdMjrJ86UuYeLo+aEZClV6opnw== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^26.5.2" - "@jest/test-result" "^26.5.2" - "@jest/transform" "^26.5.2" - "@jest/types" "^26.5.2" + "@jest/console" "^26.6.2" + "@jest/test-result" "^26.6.2" + "@jest/transform" "^26.6.2" + "@jest/types" "^26.6.2" chalk "^4.0.0" collect-v8-coverage "^1.0.0" exit "^0.1.2" @@ -484,94 +496,73 @@ istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.0.2" - jest-haste-map "^26.5.2" - jest-resolve "^26.5.2" - jest-util "^26.5.2" - jest-worker "^26.5.0" + jest-haste-map "^26.6.2" + jest-resolve "^26.6.2" + jest-util "^26.6.2" + jest-worker "^26.6.2" slash "^3.0.0" source-map "^0.6.0" string-length "^4.0.1" terminal-link "^2.0.0" - v8-to-istanbul "^5.0.1" + v8-to-istanbul "^7.0.0" optionalDependencies: node-notifier "^8.0.0" -"@jest/source-map@^26.5.0": - version "26.5.0" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-26.5.0.tgz#98792457c85bdd902365cd2847b58fff05d96367" - integrity sha512-jWAw9ZwYHJMe9eZq/WrsHlwF8E3hM9gynlcDpOyCb9bR8wEd9ZNBZCi7/jZyzHxC7t3thZ10gO2IDhu0bPKS5g== +"@jest/source-map@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-26.6.2.tgz#29af5e1e2e324cafccc936f218309f54ab69d535" + integrity sha512-YwYcCwAnNmOVsZ8mr3GfnzdXDAl4LaenZP5z+G0c8bzC9/dugL8zRmxZzdoTl4IaS3CryS1uWnROLPFmb6lVvA== dependencies: callsites "^3.0.0" graceful-fs "^4.2.4" source-map "^0.6.0" -"@jest/test-result@^26.5.2": - version "26.5.2" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-26.5.2.tgz#cc1a44cfd4db2ecee3fb0bc4e9fe087aa54b5230" - integrity sha512-E/Zp6LURJEGSCWpoMGmCFuuEI1OWuI3hmZwmULV0GsgJBh7u0rwqioxhRU95euUuviqBDN8ruX/vP/4bwYolXw== +"@jest/test-result@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-26.6.2.tgz#55da58b62df134576cc95476efa5f7949e3f5f18" + integrity sha512-5O7H5c/7YlojphYNrK02LlDIV2GNPYisKwHm2QTKjNZeEzezCbwYs9swJySv2UfPMyZ0VdsmMv7jIlD/IKYQpQ== dependencies: - "@jest/console" "^26.5.2" - "@jest/types" "^26.5.2" + "@jest/console" "^26.6.2" + "@jest/types" "^26.6.2" "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-sequencer@^26.5.2": - version "26.5.2" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-26.5.2.tgz#c4559c7e134b27b020317303ee5399bf62917a4b" - integrity sha512-XmGEh7hh07H2B8mHLFCIgr7gA5Y6Hw1ZATIsbz2fOhpnQ5AnQtZk0gmP0Q5/+mVB2xygO64tVFQxOajzoptkNA== +"@jest/test-sequencer@^26.6.3": + version "26.6.3" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-26.6.3.tgz#98e8a45100863886d074205e8ffdc5a7eb582b17" + integrity sha512-YHlVIjP5nfEyjlrSr8t/YdNfU/1XEt7c5b4OxcXCjyRhjzLYu/rO69/WHPuYcbCWkz8kAeZVZp2N2+IOLLEPGw== dependencies: - "@jest/test-result" "^26.5.2" + "@jest/test-result" "^26.6.2" graceful-fs "^4.2.4" - jest-haste-map "^26.5.2" - jest-runner "^26.5.2" - jest-runtime "^26.5.2" + jest-haste-map "^26.6.2" + jest-runner "^26.6.3" + jest-runtime "^26.6.3" -"@jest/transform@^26.5.2": - version "26.5.2" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-26.5.2.tgz#6a0033a1d24316a1c75184d010d864f2c681bef5" - integrity sha512-AUNjvexh+APhhmS8S+KboPz+D3pCxPvEAGduffaAJYxIFxGi/ytZQkrqcKDUU0ERBAo5R7087fyOYr2oms1seg== +"@jest/transform@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-26.6.2.tgz#5ac57c5fa1ad17b2aae83e73e45813894dcf2e4b" + integrity sha512-E9JjhUgNzvuQ+vVAL21vlyfy12gP0GhazGgJC4h6qUt1jSdUXGWJ1wfu/X7Sd8etSgxV4ovT1pb9v5D6QW4XgA== dependencies: "@babel/core" "^7.1.0" - "@jest/types" "^26.5.2" + "@jest/types" "^26.6.2" babel-plugin-istanbul "^6.0.0" chalk "^4.0.0" convert-source-map "^1.4.0" fast-json-stable-stringify "^2.0.0" graceful-fs "^4.2.4" - jest-haste-map "^26.5.2" + jest-haste-map "^26.6.2" jest-regex-util "^26.0.0" - jest-util "^26.5.2" + jest-util "^26.6.2" micromatch "^4.0.2" pirates "^4.0.1" slash "^3.0.0" source-map "^0.6.1" write-file-atomic "^3.0.0" -"@jest/types@^25.5.0": - version "25.5.0" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-25.5.0.tgz#4d6a4793f7b9599fc3680877b856a97dbccf2a9d" - integrity sha512-OXD0RgQ86Tu3MazKo8bnrkDRaDXXMGUqd+kTtLtK1Zb7CRzQcaSRPPPV37SvYTdevXEBVxe0HXylEjs8ibkmCw== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^1.1.1" - "@types/yargs" "^15.0.0" - chalk "^3.0.0" - -"@jest/types@^26.3.0": - version "26.3.0" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.3.0.tgz#97627bf4bdb72c55346eef98e3b3f7ddc4941f71" - integrity sha512-BDPG23U0qDeAvU4f99haztXwdAg3hz4El95LkAM+tHAqqhiVzRpEGHHU8EDxT/AnxOrA65YjLBwDahdJ9pTLJQ== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^15.0.0" - chalk "^4.0.0" - -"@jest/types@^26.5.2": - version "26.5.2" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.5.2.tgz#44c24f30c8ee6c7f492ead9ec3f3c62a5289756d" - integrity sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg== +"@jest/types@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.2.tgz#bef5a532030e1d88a2f5a6d933f84e97226ed48e" + integrity sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ== dependencies: "@types/istanbul-lib-coverage" "^2.0.0" "@types/istanbul-reports" "^3.0.0" @@ -1272,18 +1263,18 @@ call-me-maybe "^1.0.1" glob-to-regexp "^0.3.0" -"@nodelib/fs.scandir@2.1.3": - version "2.1.3" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b" - integrity sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw== +"@nodelib/fs.scandir@2.1.4": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz#d4b3549a5db5de2683e0c1071ab4f140904bbf69" + integrity sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA== dependencies: - "@nodelib/fs.stat" "2.0.3" + "@nodelib/fs.stat" "2.0.4" run-parallel "^1.1.9" -"@nodelib/fs.stat@2.0.3", "@nodelib/fs.stat@^2.0.2": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz#34dc5f4cabbc720f4e60f75a747e7ecd6c175bd3" - integrity sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA== +"@nodelib/fs.stat@2.0.4", "@nodelib/fs.stat@^2.0.2": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz#a3f2dd61bab43b8db8fa108a121cfffe4c676655" + integrity sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q== "@nodelib/fs.stat@^1.1.2": version "1.1.3" @@ -1291,57 +1282,60 @@ integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== "@nodelib/fs.walk@^1.2.3": - version "1.2.4" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz#011b9202a70a6366e436ca5c065844528ab04976" - integrity sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ== + version "1.2.6" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz#cce9396b30aa5afe9e3756608f5831adcb53d063" + integrity sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow== dependencies: - "@nodelib/fs.scandir" "2.1.3" + "@nodelib/fs.scandir" "2.1.4" fastq "^1.6.0" -"@npmcli/move-file@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@npmcli/move-file/-/move-file-1.0.1.tgz#de103070dac0f48ce49cf6693c23af59c0f70464" - integrity sha512-Uv6h1sT+0DrblvIrolFtbvM1FgWm+/sy4B3pvLp67Zys+thcukzS5ekn7HsZFGpWP4Q3fYJCljbWQE/XivMRLw== +"@octokit/auth-token@^2.4.0", "@octokit/auth-token@^2.4.4": + version "2.4.5" + resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.5.tgz#568ccfb8cb46f36441fac094ce34f7a875b197f3" + integrity sha512-BpGYsPgJt05M7/L/5FoE1PiAbdxXFZkX/3kDYcsvd1v6UhlnE5e96dTDr0ezX/EFwciQxf3cNV0loipsURU+WA== dependencies: - mkdirp "^1.0.4" + "@octokit/types" "^6.0.3" -"@octokit/auth-token@^2.4.0": - version "2.4.2" - resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.2.tgz#10d0ae979b100fa6b72fa0e8e63e27e6d0dbff8a" - integrity sha512-jE/lE/IKIz2v1+/P0u4fJqv0kYwXOTujKemJMFr6FeopsxlIK3+wKDCJGnysg81XID5TgZQbIfuJ5J0lnTiuyQ== - dependencies: - "@octokit/types" "^5.0.0" - -"@octokit/core@^3.0.0": - version "3.1.2" - resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.1.2.tgz#c937d5f9621b764573068fcd2e5defcc872fd9cc" - integrity sha512-AInOFULmwOa7+NFi9F8DlDkm5qtZVmDQayi7TUgChE3yeIGPq0Y+6cAEXPexQ3Ea+uZy66hKEazR7DJyU+4wfw== +"@octokit/core@^3.2.3": + version "3.2.5" + resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.2.5.tgz#57becbd5fd789b0592b915840855f3a5f233d554" + integrity sha512-+DCtPykGnvXKWWQI0E1XD+CCeWSBhB6kwItXqfFmNBlIlhczuDPbg+P6BtLnVBaRJDAjv+1mrUJuRsFSjktopg== dependencies: - "@octokit/auth-token" "^2.4.0" - "@octokit/graphql" "^4.3.1" - "@octokit/request" "^5.4.0" - "@octokit/types" "^5.0.0" + "@octokit/auth-token" "^2.4.4" + "@octokit/graphql" "^4.5.8" + "@octokit/request" "^5.4.12" + "@octokit/types" "^6.0.3" before-after-hook "^2.1.0" universal-user-agent "^6.0.0" "@octokit/endpoint@^6.0.1": - version "6.0.5" - resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.5.tgz#43a6adee813c5ffd2f719e20cfd14a1fee7c193a" - integrity sha512-70K5u6zd45ItOny6aHQAsea8HHQjlQq85yqOMe+Aj8dkhN2qSJ9T+Q3YjUjEYfPRBcuUWNgMn62DQnP/4LAIiQ== + version "6.0.11" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.11.tgz#082adc2aebca6dcefa1fb383f5efb3ed081949d1" + integrity sha512-fUIPpx+pZyoLW4GCs3yMnlj2LfoXTWDUVPTC4V3MUEKZm48W+XYpeWSZCv+vYF1ZABUm2CqnDVf1sFtIYrj7KQ== dependencies: - "@octokit/types" "^5.0.0" - is-plain-object "^4.0.0" + "@octokit/types" "^6.0.3" + is-plain-object "^5.0.0" universal-user-agent "^6.0.0" -"@octokit/graphql@^4.3.1": - version "4.5.3" - resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.5.3.tgz#d5ff0d4a8a33e98614a2a7359dac98bc285e062f" - integrity sha512-JyYvi3j2tOb5ofASEpcg1Advs07H+Ag+I+ez7buuZfNVAmh1IYcDTuxd4gnYH8S2PSGu+f5IdDGxMmkK+5zsdA== +"@octokit/graphql@^4.5.8": + version "4.6.0" + resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.6.0.tgz#f9abca55f82183964a33439d5264674c701c3327" + integrity sha512-CJ6n7izLFXLvPZaWzCQDjU/RP+vHiZmWdOunaCS87v+2jxMsW9FB5ktfIxybRBxZjxuJGRnxk7xJecWTVxFUYQ== dependencies: "@octokit/request" "^5.3.0" - "@octokit/types" "^5.0.0" + "@octokit/types" "^6.0.3" universal-user-agent "^6.0.0" +"@octokit/openapi-types@^4.0.0": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-4.0.1.tgz#bafd3d173974827ba0b733fcca7f1860cb71a9aa" + integrity sha512-k2hRcfcLRyPJjtYfJLzg404n7HZ6sUpAWAR/uNI8tf96NgatWOpw1ocdF+WFfx/trO1ivBh7ckynO1rn+xAw/Q== + +"@octokit/openapi-types@^4.0.3": + version "4.0.4" + resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-4.0.4.tgz#96fcce11e929802898646205ac567e5df592f82b" + integrity sha512-31zY8JIuz3h6RAFOnyA8FbOwhILILiBu1qD81RyZZWY7oMBhIdBn6MaAmnnptLhB4jk0g50nkQkUVP4kUzppcA== + "@octokit/plugin-enterprise-rest@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/@octokit/plugin-enterprise-rest/-/plugin-enterprise-rest-6.0.1.tgz#e07896739618dab8da7d4077c658003775f95437" @@ -1354,17 +1348,17 @@ dependencies: "@octokit/types" "^2.0.1" -"@octokit/plugin-paginate-rest@^2.2.0": - version "2.3.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.3.0.tgz#7d1073e56cfd15d3f99dcfe81fa5d2b466f3a6f6" - integrity sha512-Ye2ZJreP0ZlqJQz8fz+hXvrEAEYK4ay7br1eDpWzr6j76VXs/gKqxFcH8qRzkB3fo/2xh4Vy9VtGii4ZDc9qlA== +"@octokit/plugin-paginate-rest@^2.6.2": + version "2.9.1" + resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.9.1.tgz#e9bb34a89b7ed5b801f1c976feeb9b0078ecd201" + integrity sha512-8wnuWGjwDIEobbBet2xAjZwgiMVTgIer5wBsnGXzV3lJ4yqphLU2FEMpkhSrDx7y+WkZDfZ+V+1cFMZ1mAaFag== dependencies: - "@octokit/types" "^5.2.0" + "@octokit/types" "^6.8.0" -"@octokit/plugin-request-log@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.0.tgz#eef87a431300f6148c39a7f75f8cfeb218b2547e" - integrity sha512-ywoxP68aOT3zHCLgWZgwUJatiENeHE7xJzYjfz8WI0goynp96wETBF+d95b8g/uL4QmS6owPVlaxiz3wyMAzcw== +"@octokit/plugin-request-log@^1.0.0", "@octokit/plugin-request-log@^1.0.2": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.3.tgz#70a62be213e1edc04bb8897ee48c311482f9700d" + integrity sha512-4RFU4li238jMJAzLgAwkBAw+4Loile5haQMQr+uhFq27BmyJXcXSKvoQKqh0agsZEiUlW6iSv3FAgvmGkur7OQ== "@octokit/plugin-rest-endpoint-methods@2.4.0": version "2.4.0" @@ -1374,12 +1368,12 @@ "@octokit/types" "^2.0.1" deprecation "^2.3.1" -"@octokit/plugin-rest-endpoint-methods@4.2.0": - version "4.2.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.2.0.tgz#c5a0691b3aba5d8b4ef5dffd6af3649608f167ba" - integrity sha512-1/qn1q1C1hGz6W/iEDm9DoyNoG/xdFDt78E3eZ5hHeUfJTLJgyAMdj9chL/cNBHjcjd+FH5aO1x0VCqR2RE0mw== +"@octokit/plugin-rest-endpoint-methods@4.10.3": + version "4.10.3" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.10.3.tgz#d78ddf926bca3b81a4d9b79a463d32b3750a4485" + integrity sha512-CsNQeVY34Vs9iea2Z9/TCPlebxv6KpjO9f1BUPz+14qundTSYT9kgf8j5wA1k37VstfBQ4xnuURYdnbGzJBJXw== dependencies: - "@octokit/types" "^5.5.0" + "@octokit/types" "^6.8.3" deprecation "^2.3.1" "@octokit/request-error@^1.0.2": @@ -1392,25 +1386,25 @@ once "^1.4.0" "@octokit/request-error@^2.0.0": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.0.2.tgz#0e76b83f5d8fdda1db99027ea5f617c2e6ba9ed0" - integrity sha512-2BrmnvVSV1MXQvEkrb9zwzP0wXFNbPJij922kYBTLIlIafukrGOb+ABBT2+c6wZiuyWDH1K1zmjGQ0toN/wMWw== + version "2.0.5" + resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.0.5.tgz#72cc91edc870281ad583a42619256b380c600143" + integrity sha512-T/2wcCFyM7SkXzNoyVNWjyVlUwBvW3igM3Btr/eKYiPmucXTtkxt2RBsf6gn3LTzaLSLTQtNmvg+dGsOxQrjZg== dependencies: - "@octokit/types" "^5.0.1" + "@octokit/types" "^6.0.3" deprecation "^2.0.0" once "^1.4.0" -"@octokit/request@^5.2.0", "@octokit/request@^5.3.0", "@octokit/request@^5.4.0": - version "5.4.7" - resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.7.tgz#fd703ee092e0463ceba49ff7a3e61cb4cf8a0fde" - integrity sha512-FN22xUDP0i0uF38YMbOfx6TotpcENP5W8yJM1e/LieGXn6IoRxDMnBf7tx5RKSW4xuUZ/1P04NFZy5iY3Rax1A== +"@octokit/request@^5.2.0", "@octokit/request@^5.3.0", "@octokit/request@^5.4.12": + version "5.4.14" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.14.tgz#ec5f96f78333bb2af390afa5ff66f114b063bc96" + integrity sha512-VkmtacOIQp9daSnBmDI92xNIeLuSRDOIuplp/CJomkvzt7M18NXgG044Cx/LFKLgjKt9T2tZR6AtJayba9GTSA== dependencies: "@octokit/endpoint" "^6.0.1" "@octokit/request-error" "^2.0.0" - "@octokit/types" "^5.0.0" + "@octokit/types" "^6.7.1" deprecation "^2.0.0" - is-plain-object "^4.0.0" - node-fetch "^2.3.0" + is-plain-object "^5.0.0" + node-fetch "^2.6.1" once "^1.4.0" universal-user-agent "^6.0.0" @@ -1436,15 +1430,15 @@ once "^1.4.0" universal-user-agent "^4.0.0" -"@octokit/rest@^18.0.6": - version "18.0.6" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.0.6.tgz#76c274f1a68f40741a131768ef483f041e7b98b6" - integrity sha512-ES4lZBKPJMX/yUoQjAZiyFjei9pJ4lTTfb9k7OtYoUzKPDLl/M8jiHqt6qeSauyU4eZGLw0sgP1WiQl9FYeM5w== +"@octokit/rest@^18.1.1": + version "18.1.1" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.1.1.tgz#bd7053c28db3577c936029e9da6bfbd046474a2f" + integrity sha512-ZcCHMyfGT1qtJD72usigAfUQ6jU89ZUPFb2AOubR6WZ7/RRFVZUENVm1I2yvJBUicqTujezPW9cY1+o3Mb4rNA== dependencies: - "@octokit/core" "^3.0.0" - "@octokit/plugin-paginate-rest" "^2.2.0" - "@octokit/plugin-request-log" "^1.0.0" - "@octokit/plugin-rest-endpoint-methods" "4.2.0" + "@octokit/core" "^3.2.3" + "@octokit/plugin-paginate-rest" "^2.6.2" + "@octokit/plugin-request-log" "^1.0.2" + "@octokit/plugin-rest-endpoint-methods" "4.10.3" "@octokit/types@^2.0.0", "@octokit/types@^2.0.1": version "2.16.2" @@ -1453,24 +1447,25 @@ dependencies: "@types/node" ">= 8" -"@octokit/types@^5.0.0", "@octokit/types@^5.0.1", "@octokit/types@^5.2.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-5.4.0.tgz#25f2f8e24fec09214553168c41c06383c9d0f529" - integrity sha512-D/uotqF69M50OIlwMqgyIg9PuLT2daOiBAYF0P40I2ekFA2ESwwBY5dxZe/UhXdPvIbNKDzuZmQrO7rMpuFbcg== +"@octokit/types@^6.0.3", "@octokit/types@^6.7.1", "@octokit/types@^6.8.0": + version "6.8.2" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.8.2.tgz#ce4872e038d6df38b2d3c21bc12329af0b10facb" + integrity sha512-RpG0NJd7OKSkWptiFhy1xCLkThs5YoDIKM21lEtDmUvSpbaIEfrxzckWLUGDFfF8RydSyngo44gDv8m2hHruUg== dependencies: + "@octokit/openapi-types" "^4.0.0" "@types/node" ">= 8" -"@octokit/types@^5.5.0": - version "5.5.0" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-5.5.0.tgz#e5f06e8db21246ca102aa28444cdb13ae17a139b" - integrity sha512-UZ1pErDue6bZNjYOotCNveTXArOMZQFG6hKJfOnGnulVCMcVVi7YIIuuR4WfBhjo7zgpmzn/BkPDnUXtNx+PcQ== +"@octokit/types@^6.8.3": + version "6.8.5" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.8.5.tgz#797dfdad8c75718e97dc687d4c9fc49200ca8d17" + integrity sha512-ZsQawftZoi0kSF2pCsdgLURbOjtVcHnBOXiSxBKSNF56CRjARt5rb/g8WJgqB8vv4lgUEHrv06EdDKYQ22vA9Q== dependencies: - "@types/node" ">= 8" + "@octokit/openapi-types" "^4.0.3" "@sinonjs/commons@^1.7.0": - version "1.8.1" - resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.1.tgz#e7df00f98a203324f6dc7cc606cad9d4a8ab2217" - integrity sha512-892K+kWUUi3cl+LlqEWIDrhvLgdL79tECi8JZUyq6IviKy/DNhuzCRlbHUjxK89f4ypPMMaFnFuR9Ie6DoIMsw== + version "1.8.2" + resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.2.tgz#858f5c4b48d80778fde4b9d541f27edc0d56488b" + integrity sha512-sruwd86RJHdsVf/AtBoijDmUqJp3B6hF/DGC23C+JaegnDHaZyewCjoVGTdg3J0uz3Zs7NnIT05OBOmML72lQw== dependencies: type-detect "4.0.8" @@ -1482,9 +1477,9 @@ "@sinonjs/commons" "^1.7.0" "@types/babel__core@^7.0.0", "@types/babel__core@^7.1.7": - version "7.1.9" - resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.9.tgz#77e59d438522a6fb898fa43dc3455c6e72f3963d" - integrity sha512-sY2RsIJ5rpER1u3/aQ8OFSI7qGIy8o1NEEbgb2UaJcvOtXOMpd39ko723NBpjQFg9SIX7TXtjejZVGeIMLhoOw== + version "7.1.12" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.12.tgz#4d8e9e51eb265552a7e4f1ff2219ab6133bdfb2d" + integrity sha512-wMTHiiTiBAAPebqaPiPDLFA4LYPKr6Ph0Xq/6rq1Ur3v66HXyG+clfR9CNETkD7MQS8ZHvpQOtA53DLws5WAEQ== dependencies: "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" @@ -1493,31 +1488,24 @@ "@types/babel__traverse" "*" "@types/babel__generator@*": - version "7.6.1" - resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.1.tgz#4901767b397e8711aeb99df8d396d7ba7b7f0e04" - integrity sha512-bBKm+2VPJcMRVwNhxKu8W+5/zT7pwNEqeokFOmbvVSqGzFneNxYcEBro9Ac7/N9tlsaPYnZLK8J1LWKkMsLAew== + version "7.6.2" + resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.2.tgz#f3d71178e187858f7c45e30380f8f1b7415a12d8" + integrity sha512-MdSJnBjl+bdwkLskZ3NGFp9YcXGx5ggLpQQPqtgakVhsWK0hTtNYhjpZLlWQTviGTvF8at+Bvli3jV7faPdgeQ== dependencies: "@babel/types" "^7.0.0" "@types/babel__template@*": - version "7.0.2" - resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.0.2.tgz#4ff63d6b52eddac1de7b975a5223ed32ecea9307" - integrity sha512-/K6zCpeW7Imzgab2bLkLEbz0+1JlFSrUMdw7KoIIu+IUdu51GWaBZpd3y1VXGVXzynvGa4DaIaxNZHiON3GXUg== + version "7.4.0" + resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.0.tgz#0c888dd70b3ee9eebb6e4f200e809da0076262be" + integrity sha512-NTPErx4/FiPCGScH7foPyr+/1Dkzkni+rHiYHHoTjvwou7AQzJkNeD60A9CXRy+ZEN2B1bggmkTMCDb+Mv5k+A== dependencies: "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" -"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": - version "7.0.13" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.13.tgz#1874914be974a492e1b4cb00585cabb274e8ba18" - integrity sha512-i+zS7t6/s9cdQvbqKDARrcbrPvtJGlbYsMkazo03nTAK3RX9FNrLllXys22uiTGJapPOTZTQ35nHh4ISph4SLQ== - dependencies: - "@babel/types" "^7.3.0" - -"@types/babel__traverse@^7.0.4": - version "7.0.15" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.15.tgz#db9e4238931eb69ef8aab0ad6523d4d4caa39d03" - integrity sha512-Pzh9O3sTK8V6I1olsXpCfj2k/ygO2q1X0vhhnDrEQyYLHZesWz+zMZMVcwXLCYf0U36EtmyYaFGPfXlTtDHe3A== +"@types/babel__traverse@*", "@types/babel__traverse@^7.0.4", "@types/babel__traverse@^7.0.6": + version "7.11.0" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.11.0.tgz#b9a1efa635201ba9bc850323a8793ee2d36c04a0" + integrity sha512-kSjgDMZONiIfSH1Nxcr5JIRMwUetDki63FSQfpTCz8ogF3Ulqm8+mr5f78dUYs6vMiB6gBusQqfQmBvHZj/lwg== dependencies: "@babel/types" "^7.3.0" @@ -1526,11 +1514,6 @@ resolved "https://registry.yarnpkg.com/@types/clone/-/clone-2.1.0.tgz#cb888a3fe5319275b566ae3a9bc606e310c533d4" integrity sha512-d/aS/lPOnUSruPhgNtT8jW39fHRVTLQy9sodysP1kkG8EdAtdZu1vt8NJaYA8w/6Z9j8izkAsx1A/yJhcYR1CA== -"@types/color-name@^1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" - integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== - "@types/commonmark@^0.27.4": version "0.27.4" resolved "https://registry.yarnpkg.com/@types/commonmark/-/commonmark-0.27.4.tgz#8f42990e5cf3b6b95bd99eaa452e157aab679b82" @@ -1557,17 +1540,17 @@ "@types/estree" "*" "@types/eslint@*": - version "7.2.4" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.2.4.tgz#d12eeed7741d2491b69808576ac2d20c14f74c41" - integrity sha512-YCY4kzHMsHoyKspQH+nwSe+70Kep7Vjt2X+dZe5Vs2vkRudqtoFoUIv1RlJmZB8Hbp7McneupoZij4PadxsK5Q== + version "7.2.6" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.2.6.tgz#5e9aff555a975596c03a98b59ecd103decc70c3c" + integrity sha512-I+1sYH+NPQ3/tVqCeUSBwTE/0heyvtXqpIopUUArlBm0Kpocb8FbMa3AZ/ASKIFpN3rnEx932TTXDbt9OXsNDw== dependencies: "@types/estree" "*" "@types/json-schema" "*" -"@types/estree@*", "@types/estree@^0.0.45": - version "0.0.45" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.45.tgz#e9387572998e5ecdac221950dab3e8c3b16af884" - integrity sha512-jnqIUKDUqJbDIUxm0Uj7bnlMnRm1T/eZ9N+AVMqhPgzrba2GhGG5o/jCTwmdPK709nEZsGoMzXEDUjcXHa3W0g== +"@types/estree@*", "@types/estree@^0.0.46": + version "0.0.46" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.46.tgz#0fb6bfbbeabd7a30880504993369c4bf1deab1fe" + integrity sha512-laIjwTQaD+5DukBZaygQ79K1Z0jb1bPEMRrkXSLjtCcZm+abyp5YbrqpSLzD42FwWW6gK/aS4NYpJ804nG2brg== "@types/fs-extra@^8.1.1": version "8.1.1" @@ -1585,9 +1568,9 @@ "@types/node" "*" "@types/graceful-fs@^4.1.2": - version "4.1.3" - resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.3.tgz#039af35fe26bec35003e8d86d2ee9c586354348f" - integrity sha512-AiHRaEB50LQg0pZmm659vNBb9f4SJ0qrAnteuzhSeAUcJKxoYgEnprg/83kppCnc2zvtCKbdZry1a5pVY3lOTQ== + version "4.1.4" + resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.4.tgz#4ff9f641a7c6d1a3508ff88bc3141b152772e753" + integrity sha512-mWA/4zFQhfvOA8zWkXobwJvBD7vzcxgrOQ0J5CH1votGqdq9m7+FwtGaqyCZqC3NyyBkc9z4m+iry4LlqcMWJg== dependencies: "@types/node" "*" @@ -1611,14 +1594,6 @@ dependencies: "@types/istanbul-lib-coverage" "*" -"@types/istanbul-reports@^1.1.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-1.1.2.tgz#e875cc689e47bce549ec81f3df5e6f6f11cfaeb2" - integrity sha512-P/W9yOX/3oPZSpaYOCQzGqgCQRXn0FFO/V8bWrCQs+wLmvVVxk6CRBXALEvNs9OHIatlnlFokfhuDo2ug01ciw== - dependencies: - "@types/istanbul-lib-coverage" "*" - "@types/istanbul-lib-report" "*" - "@types/istanbul-reports@^3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz#508b13aa344fa4976234e75dddcc34925737d821" @@ -1626,30 +1601,25 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jest-expect-message@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@types/jest-expect-message/-/jest-expect-message-1.0.2.tgz#5e354d78f01db717ff280fdca5bc48be19eccce0" - integrity sha512-a6En2I1lLW0oW1FmukuPR056n+zGBN6CIctrQN9znBrC+6/GsBRg1ICtZUzHtRn9U0hd4vXjRMd2D2BMefMy2Q== +"@types/jest-expect-message@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@types/jest-expect-message/-/jest-expect-message-1.0.3.tgz#433ad89565c871acefafedeb957d0a8ec2a977a0" + integrity sha512-sp70Lc8POkOcXHEcLERpX/7B/BtQiqIYz3AvC9ZMNKSaiDttr8hKvz9DljIn7N6WJi3ioVoTtB1utDAX46oPlg== dependencies: "@types/jest" "*" -"@types/jest@*", "@types/jest@26.x", "@types/jest@^26.0.14": - version "26.0.14" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.14.tgz#078695f8f65cb55c5a98450d65083b2b73e5a3f3" - integrity sha512-Hz5q8Vu0D288x3iWXePSn53W7hAjP0H7EQ6QvDO9c7t46mR0lNOLlfuwQ+JkVxuhygHzlzPX+0jKdA3ZgSh+Vg== +"@types/jest@*", "@types/jest@26.x", "@types/jest@^26.0.20": + version "26.0.20" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.20.tgz#cd2f2702ecf69e86b586e1f5223a60e454056307" + integrity sha512-9zi2Y+5USJRxd0FsahERhBwlcvFh6D2GLQnY2FH2BzK8J9s9omvNHIbvABwIluXa0fD8XVKMLTO0aOEuUfACAA== dependencies: - jest-diff "^25.2.1" - pretty-format "^25.2.1" - -"@types/json-schema@*", "@types/json-schema@^7.0.6": - version "7.0.6" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.6.tgz#f4c7ec43e81b319a9815115031709f26987891f0" - integrity sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw== + jest-diff "^26.0.0" + pretty-format "^26.0.0" -"@types/json-schema@^7.0.3", "@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== +"@types/json-schema@*", "@types/json-schema@^7.0.3", "@types/json-schema@^7.0.6": + version "7.0.7" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad" + integrity sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA== "@types/json5@^0.0.29": version "0.0.29" @@ -1662,9 +1632,9 @@ integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== "@types/minimist@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.0.tgz#69a23a3ad29caf0097f06eda59b361ee2f0639f6" - integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY= + version "1.2.1" + resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.1.tgz#283f669ff76d7b8260df8ab7a4262cc83d988256" + integrity sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg== "@types/minipass@*": version "2.2.0" @@ -1681,14 +1651,14 @@ "@types/node" "*" "@types/node@*", "@types/node@>= 8": - version "14.0.27" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.0.27.tgz#a151873af5a5e851b51b3b065c9e63390a9e0eb1" - integrity sha512-kVrqXhbclHNHGu9ztnAwSncIgJv/FaxmzXJvGXNdcCpV1b8u1/Mi6z6m0vwy0LzKeXFTPLH0NzwmoJ3fNCIq0g== + version "14.14.25" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.25.tgz#15967a7b577ff81383f9b888aa6705d43fbbae93" + integrity sha512-EPpXLOVqDvisVxtlbvzfyqSsFeQxltFbluZNRndIb8tr9KiBnYNLzrc1N3pyKUCww2RNrfHDViqDWWE1LCJQtQ== -"@types/node@^10.17.39": - version "10.17.39" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.39.tgz#ce1122758d0608de8303667cebf171f44192629b" - integrity sha512-dJLCxrpQmgyxYGcl0Ae9MTsQgI22qHHcGFj/8VKu7McJA5zQpnuGjoksnxbo1JxSjW/Nahnl13W8MYZf01CZHA== +"@types/node@^10.17.51": + version "10.17.51" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.51.tgz#639538575befbcf3d3861f95c41de8e47124d674" + integrity sha512-KANw+MkL626tq90l++hGelbl67irOJzGhUJk6a1Bt8QHOeh9tztJx+L0AqttraWKinmZn7Qi5lJZJzx45Gq0dg== "@types/normalize-package-data@^2.4.0": version "2.4.0" @@ -1696,9 +1666,9 @@ integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA== "@types/prettier@^2.0.0": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.0.2.tgz#5bb52ee68d0f8efa9cc0099920e56be6cc4e37f3" - integrity sha512-IkVfat549ggtkZUthUzEX49562eGikhSYeVGX97SkMFn+sTZrgRewXjQ4tPKFPCykZHkX1Zfd9OoELGqKU2jJA== + version "2.2.0" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.2.0.tgz#a4e8205a4955690eef712a6d0394a1d2e121e721" + integrity sha512-O3SQC6+6AySHwrspYn2UvC6tjo6jCTMMmylxZUFhE1CulVu5l3AxU6ca9lrJDTQDVllF62LIxVSx5fuYL6LiZg== "@types/semver@^7.3.4": version "7.3.4" @@ -1719,16 +1689,16 @@ "@types/tar-stream" "*" "@types/tar-stream@*": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@types/tar-stream/-/tar-stream-2.1.0.tgz#884b1cbe6c35ff459c05a5eba86b406805943ef6" - integrity sha512-s1UQxQUVMHbSkCC0X4qdoiWgHF8DoyY1JjQouFsnk/8ysoTdBaiCHud/exoAZzKDbzAXVc+ah6sczxGVMAohFw== + version "2.2.0" + resolved "https://registry.yarnpkg.com/@types/tar-stream/-/tar-stream-2.2.0.tgz#2778ef8e328a520959a39681c15c83c53553426f" + integrity sha512-sRTpT180sVigzD4SiCWJQQrqcdkWnmscWvx+cXvAoPtXbLFC5+QmKi2xwRcPe4iRu0GcVl1qTeJKUTS5hULfrw== dependencies: "@types/node" "*" -"@types/tar@^4.0.3": - version "4.0.3" - resolved "https://registry.yarnpkg.com/@types/tar/-/tar-4.0.3.tgz#e2cce0b8ff4f285293243f5971bd7199176ac489" - integrity sha512-Z7AVMMlkI8NTWF0qGhC4QIX0zkV/+y0J8x7b/RsHrN0310+YNjoJd8UrApCiGBCWtKjxS9QhNqLi2UJNToh5hA== +"@types/tar@^4.0.4": + version "4.0.4" + resolved "https://registry.yarnpkg.com/@types/tar/-/tar-4.0.4.tgz#d680de60855e7778a51c672b755869a3b8d2889f" + integrity sha512-0Xv+xcmkTsOZdIF4yCnd7RkOOyfyqPaqJ7RZFKnwdxfDbkN3eAAE9sHl8zJFqBz4VhxolW9EErbjR1oyH7jK2A== dependencies: "@types/minipass" "*" "@types/node" "*" @@ -1741,231 +1711,231 @@ "@types/node" "*" "@types/yargs-parser@*": - version "15.0.0" - resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-15.0.0.tgz#cb3f9f741869e20cce330ffbeb9271590483882d" - integrity sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw== + version "20.2.0" + resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-20.2.0.tgz#dd3e6699ba3237f0348cd085e4698780204842f9" + integrity sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA== -"@types/yargs@^15.0.0", "@types/yargs@^15.0.7": - version "15.0.7" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.7.tgz#dad50a7a234a35ef9460737a56024287a3de1d2b" - integrity sha512-Gf4u3EjaPNcC9cTu4/j2oN14nSVhr8PQ+BvBcBQHAhDZfl0bVIiLgvnRXv/dn58XhTm9UXvBpvJpDlwV65QxOA== +"@types/yargs@^15.0.0": + version "15.0.13" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.13.tgz#34f7fec8b389d7f3c1fd08026a5763e072d3c6dc" + integrity sha512-kQ5JNTrbDv3Rp5X2n/iUu37IJBDU2gsZ5R/g1/KHOOEc5IKfUFjXT6DENPGduh08I/pamwtEq4oul7gUqKTQDQ== dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@^4.4.1": - version "4.4.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.4.1.tgz#b8acea0373bd2a388ac47df44652f00bf8b368f5" - integrity sha512-O+8Utz8pb4OmcA+Nfi5THQnQpHSD2sDUNw9AxNHpuYOo326HZTtG8gsfT+EAYuVrFNaLyNb2QnUNkmTRDskuRA== +"@types/yargs@^16.0.0": + version "16.0.0" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-16.0.0.tgz#0e033b23452da5d61b6c44747612cb80ac528751" + integrity sha512-2nN6AGeMwe8+O6nO9ytQfbMQOJy65oi1yK2y/9oReR08DaXSGtMsrLyCM1ooKqfICpCx4oITaR4LkOmdzz41Ww== + dependencies: + "@types/yargs-parser" "*" + +"@typescript-eslint/eslint-plugin@^4.15.0": + version "4.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.15.0.tgz#13a5a07cf30d0d5781e43480aa2a8d38d308b084" + integrity sha512-DJgdGZW+8CFUTz5C/dnn4ONcUm2h2T0itWD85Ob5/V27Ndie8hUoX5HKyGssvR8sUMkAIlUc/AMK67Lqa3kBIQ== dependencies: - "@typescript-eslint/experimental-utils" "4.4.1" - "@typescript-eslint/scope-manager" "4.4.1" + "@typescript-eslint/experimental-utils" "4.15.0" + "@typescript-eslint/scope-manager" "4.15.0" debug "^4.1.1" functional-red-black-tree "^1.0.1" + lodash "^4.17.15" regexpp "^3.0.0" semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@4.4.1": - version "4.4.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.4.1.tgz#40613b9757fa0170de3e0043254dbb077cafac0c" - integrity sha512-Nt4EVlb1mqExW9cWhpV6pd1a3DkUbX9DeyYsdoeziKOpIJ04S2KMVDO+SEidsXRH/XHDpbzXykKcMTLdTXH6cQ== +"@typescript-eslint/experimental-utils@4.15.0": + version "4.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.15.0.tgz#b87c36410a9b23f637689427be85007a2ec1a9c6" + integrity sha512-V4vaDWvxA2zgesg4KPgEGiomWEBpJXvY4ZX34Y3qxK8LUm5I87L+qGIOTd9tHZOARXNRt9pLbblSKiYBlGMawg== dependencies: "@types/json-schema" "^7.0.3" - "@typescript-eslint/scope-manager" "4.4.1" - "@typescript-eslint/types" "4.4.1" - "@typescript-eslint/typescript-estree" "4.4.1" + "@typescript-eslint/scope-manager" "4.15.0" + "@typescript-eslint/types" "4.15.0" + "@typescript-eslint/typescript-estree" "4.15.0" eslint-scope "^5.0.0" eslint-utils "^2.0.0" -"@typescript-eslint/parser@^4.4.1": - version "4.4.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.4.1.tgz#25fde9c080611f303f2f33cedb145d2c59915b80" - integrity sha512-S0fuX5lDku28Au9REYUsV+hdJpW/rNW0gWlc4SXzF/kdrRaAVX9YCxKpziH7djeWT/HFAjLZcnY7NJD8xTeUEg== +"@typescript-eslint/parser@^4.15.0": + version "4.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.15.0.tgz#8df94365b4b7161f9e8514fe28aef19954810b6b" + integrity sha512-L6Dtbq8Bc7g2aZwnIBETpmUa9XDKCMzKVwAArnGp5Mn7PRNFjf3mUzq8UeBjL3K8t311hvevnyqXAMSmxO8Gpg== dependencies: - "@typescript-eslint/scope-manager" "4.4.1" - "@typescript-eslint/types" "4.4.1" - "@typescript-eslint/typescript-estree" "4.4.1" + "@typescript-eslint/scope-manager" "4.15.0" + "@typescript-eslint/types" "4.15.0" + "@typescript-eslint/typescript-estree" "4.15.0" debug "^4.1.1" -"@typescript-eslint/scope-manager@4.4.1": - version "4.4.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.4.1.tgz#d19447e60db2ce9c425898d62fa03b2cce8ea3f9" - integrity sha512-2oD/ZqD4Gj41UdFeWZxegH3cVEEH/Z6Bhr/XvwTtGv66737XkR4C9IqEkebCuqArqBJQSj4AgNHHiN1okzD/wQ== +"@typescript-eslint/scope-manager@4.15.0": + version "4.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.15.0.tgz#c42703558ea6daaaba51a9c3a86f2902dbab9432" + integrity sha512-CSNBZnCC2jEA/a+pR9Ljh8Y+5TY5qgbPz7ICEk9WCpSEgT6Pi7H2RIjxfrrbUXvotd6ta+i27sssKEH8Azm75g== dependencies: - "@typescript-eslint/types" "4.4.1" - "@typescript-eslint/visitor-keys" "4.4.1" + "@typescript-eslint/types" "4.15.0" + "@typescript-eslint/visitor-keys" "4.15.0" -"@typescript-eslint/types@4.4.1": - version "4.4.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.4.1.tgz#c507b35cf523bc7ba00aae5f75ee9b810cdabbc1" - integrity sha512-KNDfH2bCyax5db+KKIZT4rfA8rEk5N0EJ8P0T5AJjo5xrV26UAzaiqoJCxeaibqc0c/IvZxp7v2g3difn2Pn3w== +"@typescript-eslint/types@4.15.0": + version "4.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.15.0.tgz#3011ae1ac3299bb9a5ac56bdd297cccf679d3662" + integrity sha512-su4RHkJhS+iFwyqyXHcS8EGPlUVoC+XREfy5daivjLur9JP8GhvTmDipuRpcujtGC4M+GYhUOJCPDE3rC5NJrg== -"@typescript-eslint/typescript-estree@4.4.1": - version "4.4.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.4.1.tgz#598f6de488106c2587d47ca2462c60f6e2797cb8" - integrity sha512-wP/V7ScKzgSdtcY1a0pZYBoCxrCstLrgRQ2O9MmCUZDtmgxCO/TCqOTGRVwpP4/2hVfqMz/Vw1ZYrG8cVxvN3g== +"@typescript-eslint/typescript-estree@4.15.0": + version "4.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.15.0.tgz#402c86a7d2111c1f7a2513022f22a38a395b7f93" + integrity sha512-jG6xTmcNbi6xzZq0SdWh7wQ9cMb2pqXaUp6bUZOMsIlu5aOlxGxgE/t6L/gPybybQGvdguajXGkZKSndZJpksA== dependencies: - "@typescript-eslint/types" "4.4.1" - "@typescript-eslint/visitor-keys" "4.4.1" + "@typescript-eslint/types" "4.15.0" + "@typescript-eslint/visitor-keys" "4.15.0" debug "^4.1.1" globby "^11.0.1" is-glob "^4.0.1" - lodash "^4.17.15" semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/visitor-keys@4.4.1": - version "4.4.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.4.1.tgz#1769dc7a9e2d7d2cfd3318b77ed8249187aed5c3" - integrity sha512-H2JMWhLaJNeaylSnMSQFEhT/S/FsJbebQALmoJxMPMxLtlVAMy2uJP/Z543n9IizhjRayLSqoInehCeNW9rWcw== +"@typescript-eslint/visitor-keys@4.15.0": + version "4.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.15.0.tgz#2a07768df30c8a5673f1bce406338a07fdec38ca" + integrity sha512-RnDtJwOwFucWFAMjG3ghCG/ikImFJFEg20DI7mn4pHEx3vC48lIAoyjhffvfHmErRDboUPC7p9Z2il4CLb7qxA== dependencies: - "@typescript-eslint/types" "4.4.1" + "@typescript-eslint/types" "4.15.0" eslint-visitor-keys "^2.0.0" -"@webassemblyjs/ast@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.9.0.tgz#bd850604b4042459a5a41cd7d338cbed695ed964" - integrity sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA== +"@webassemblyjs/ast@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.0.tgz#a5aa679efdc9e51707a4207139da57920555961f" + integrity sha512-kX2W49LWsbthrmIRMbQZuQDhGtjyqXfEmmHyEi4XWnSZtPmxY0+3anPIzsnRb45VH/J55zlOfWvZuY47aJZTJg== dependencies: - "@webassemblyjs/helper-module-context" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/wast-parser" "1.9.0" + "@webassemblyjs/helper-numbers" "1.11.0" + "@webassemblyjs/helper-wasm-bytecode" "1.11.0" -"@webassemblyjs/floating-point-hex-parser@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz#3c3d3b271bddfc84deb00f71344438311d52ffb4" - integrity sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA== +"@webassemblyjs/floating-point-hex-parser@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.0.tgz#34d62052f453cd43101d72eab4966a022587947c" + integrity sha512-Q/aVYs/VnPDVYvsCBL/gSgwmfjeCb4LW8+TMrO3cSzJImgv8lxxEPM2JA5jMrivE7LSz3V+PFqtMbls3m1exDA== -"@webassemblyjs/helper-api-error@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz#203f676e333b96c9da2eeab3ccef33c45928b6a2" - integrity sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw== +"@webassemblyjs/helper-api-error@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.0.tgz#aaea8fb3b923f4aaa9b512ff541b013ffb68d2d4" + integrity sha512-baT/va95eXiXb2QflSx95QGT5ClzWpGaa8L7JnJbgzoYeaA27FCvuBXU758l+KXWRndEmUXjP0Q5fibhavIn8w== -"@webassemblyjs/helper-buffer@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz#a1442d269c5feb23fcbc9ef759dac3547f29de00" - integrity sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA== - -"@webassemblyjs/helper-code-frame@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz#647f8892cd2043a82ac0c8c5e75c36f1d9159f27" - integrity sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA== - dependencies: - "@webassemblyjs/wast-printer" "1.9.0" - -"@webassemblyjs/helper-fsm@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz#c05256b71244214671f4b08ec108ad63b70eddb8" - integrity sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw== +"@webassemblyjs/helper-buffer@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.0.tgz#d026c25d175e388a7dbda9694e91e743cbe9b642" + integrity sha512-u9HPBEl4DS+vA8qLQdEQ6N/eJQ7gT7aNvMIo8AAWvAl/xMrcOSiI2M0MAnMCy3jIFke7bEee/JwdX1nUpCtdyA== -"@webassemblyjs/helper-module-context@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz#25d8884b76839871a08a6c6f806c3979ef712f07" - integrity sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g== +"@webassemblyjs/helper-numbers@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.0.tgz#7ab04172d54e312cc6ea4286d7d9fa27c88cd4f9" + integrity sha512-DhRQKelIj01s5IgdsOJMKLppI+4zpmcMQ3XboFPLwCpSNH6Hqo1ritgHgD0nqHeSYqofA6aBN/NmXuGjM1jEfQ== dependencies: - "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/floating-point-hex-parser" "1.11.0" + "@webassemblyjs/helper-api-error" "1.11.0" + "@xtuc/long" "4.2.2" -"@webassemblyjs/helper-wasm-bytecode@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz#4fed8beac9b8c14f8c58b70d124d549dd1fe5790" - integrity sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw== +"@webassemblyjs/helper-wasm-bytecode@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.0.tgz#85fdcda4129902fe86f81abf7e7236953ec5a4e1" + integrity sha512-MbmhvxXExm542tWREgSFnOVo07fDpsBJg3sIl6fSp9xuu75eGz5lz31q7wTLffwL3Za7XNRCMZy210+tnsUSEA== -"@webassemblyjs/helper-wasm-section@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz#5a4138d5a6292ba18b04c5ae49717e4167965346" - integrity sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw== +"@webassemblyjs/helper-wasm-section@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.0.tgz#9ce2cc89300262509c801b4af113d1ca25c1a75b" + integrity sha512-3Eb88hcbfY/FCukrg6i3EH8H2UsD7x8Vy47iVJrP967A9JGqgBVL9aH71SETPx1JrGsOUVLo0c7vMCN22ytJew== dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-buffer" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/wasm-gen" "1.9.0" + "@webassemblyjs/ast" "1.11.0" + "@webassemblyjs/helper-buffer" "1.11.0" + "@webassemblyjs/helper-wasm-bytecode" "1.11.0" + "@webassemblyjs/wasm-gen" "1.11.0" -"@webassemblyjs/ieee754@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz#15c7a0fbaae83fb26143bbacf6d6df1702ad39e4" - integrity sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg== +"@webassemblyjs/ieee754@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.0.tgz#46975d583f9828f5d094ac210e219441c4e6f5cf" + integrity sha512-KXzOqpcYQwAfeQ6WbF6HXo+0udBNmw0iXDmEK5sFlmQdmND+tr773Ti8/5T/M6Tl/413ArSJErATd8In3B+WBA== dependencies: "@xtuc/ieee754" "^1.2.0" -"@webassemblyjs/leb128@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.9.0.tgz#f19ca0b76a6dc55623a09cffa769e838fa1e1c95" - integrity sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw== +"@webassemblyjs/leb128@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.0.tgz#f7353de1df38aa201cba9fb88b43f41f75ff403b" + integrity sha512-aqbsHa1mSQAbeeNcl38un6qVY++hh8OpCOzxhixSYgbRfNWcxJNJQwe2rezK9XEcssJbbWIkblaJRwGMS9zp+g== dependencies: "@xtuc/long" "4.2.2" -"@webassemblyjs/utf8@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.9.0.tgz#04d33b636f78e6a6813227e82402f7637b6229ab" - integrity sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w== - -"@webassemblyjs/wasm-edit@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz#3fe6d79d3f0f922183aa86002c42dd256cfee9cf" - integrity sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-buffer" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/helper-wasm-section" "1.9.0" - "@webassemblyjs/wasm-gen" "1.9.0" - "@webassemblyjs/wasm-opt" "1.9.0" - "@webassemblyjs/wasm-parser" "1.9.0" - "@webassemblyjs/wast-printer" "1.9.0" - -"@webassemblyjs/wasm-gen@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz#50bc70ec68ded8e2763b01a1418bf43491a7a49c" - integrity sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/ieee754" "1.9.0" - "@webassemblyjs/leb128" "1.9.0" - "@webassemblyjs/utf8" "1.9.0" +"@webassemblyjs/utf8@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.0.tgz#86e48f959cf49e0e5091f069a709b862f5a2cadf" + integrity sha512-A/lclGxH6SpSLSyFowMzO/+aDEPU4hvEiooCMXQPcQFPPJaYcPQNKGOCLUySJsYJ4trbpr+Fs08n4jelkVTGVw== + +"@webassemblyjs/wasm-edit@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.0.tgz#ee4a5c9f677046a210542ae63897094c2027cb78" + integrity sha512-JHQ0damXy0G6J9ucyKVXO2j08JVJ2ntkdJlq1UTiUrIgfGMmA7Ik5VdC/L8hBK46kVJgujkBIoMtT8yVr+yVOQ== + dependencies: + "@webassemblyjs/ast" "1.11.0" + "@webassemblyjs/helper-buffer" "1.11.0" + "@webassemblyjs/helper-wasm-bytecode" "1.11.0" + "@webassemblyjs/helper-wasm-section" "1.11.0" + "@webassemblyjs/wasm-gen" "1.11.0" + "@webassemblyjs/wasm-opt" "1.11.0" + "@webassemblyjs/wasm-parser" "1.11.0" + "@webassemblyjs/wast-printer" "1.11.0" + +"@webassemblyjs/wasm-gen@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.0.tgz#3cdb35e70082d42a35166988dda64f24ceb97abe" + integrity sha512-BEUv1aj0WptCZ9kIS30th5ILASUnAPEvE3tVMTrItnZRT9tXCLW2LEXT8ezLw59rqPP9klh9LPmpU+WmRQmCPQ== + dependencies: + "@webassemblyjs/ast" "1.11.0" + "@webassemblyjs/helper-wasm-bytecode" "1.11.0" + "@webassemblyjs/ieee754" "1.11.0" + "@webassemblyjs/leb128" "1.11.0" + "@webassemblyjs/utf8" "1.11.0" + +"@webassemblyjs/wasm-opt@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.0.tgz#1638ae188137f4bb031f568a413cd24d32f92978" + integrity sha512-tHUSP5F4ywyh3hZ0+fDQuWxKx3mJiPeFufg+9gwTpYp324mPCQgnuVKwzLTZVqj0duRDovnPaZqDwoyhIO8kYg== + dependencies: + "@webassemblyjs/ast" "1.11.0" + "@webassemblyjs/helper-buffer" "1.11.0" + "@webassemblyjs/wasm-gen" "1.11.0" + "@webassemblyjs/wasm-parser" "1.11.0" + +"@webassemblyjs/wasm-parser@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.0.tgz#3e680b8830d5b13d1ec86cc42f38f3d4a7700754" + integrity sha512-6L285Sgu9gphrcpDXINvm0M9BskznnzJTE7gYkjDbxET28shDqp27wpruyx3C2S/dvEwiigBwLA1cz7lNUi0kw== + dependencies: + "@webassemblyjs/ast" "1.11.0" + "@webassemblyjs/helper-api-error" "1.11.0" + "@webassemblyjs/helper-wasm-bytecode" "1.11.0" + "@webassemblyjs/ieee754" "1.11.0" + "@webassemblyjs/leb128" "1.11.0" + "@webassemblyjs/utf8" "1.11.0" + +"@webassemblyjs/wast-printer@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.0.tgz#680d1f6a5365d6d401974a8e949e05474e1fab7e" + integrity sha512-Fg5OX46pRdTgB7rKIUojkh9vXaVN6sGYCnEiJN1GYkb0RPwShZXp6KTDqmoMdQPKhcroOXh3fEzmkWmCYaKYhQ== + dependencies: + "@webassemblyjs/ast" "1.11.0" + "@xtuc/long" "4.2.2" -"@webassemblyjs/wasm-opt@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz#2211181e5b31326443cc8112eb9f0b9028721a61" - integrity sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-buffer" "1.9.0" - "@webassemblyjs/wasm-gen" "1.9.0" - "@webassemblyjs/wasm-parser" "1.9.0" +"@webpack-cli/configtest@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-1.0.1.tgz#241aecfbdc715eee96bed447ed402e12ec171935" + integrity sha512-B+4uBUYhpzDXmwuo3V9yBH6cISwxEI4J+NO5ggDaGEEHb0osY/R7MzeKc0bHURXQuZjMM4qD+bSJCKIuI3eNBQ== -"@webassemblyjs/wasm-parser@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz#9d48e44826df4a6598294aa6c87469d642fff65e" - integrity sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA== +"@webpack-cli/info@^1.2.2": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-1.2.2.tgz#ef3c0cd947a1fa083e174a59cb74e0b6195c236c" + integrity sha512-5U9kUJHnwU+FhKH4PWGZuBC1hTEPYyxGSL5jjoBI96Gx8qcYJGOikpiIpFoTq8mmgX3im2zAo2wanv/alD74KQ== dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-api-error" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/ieee754" "1.9.0" - "@webassemblyjs/leb128" "1.9.0" - "@webassemblyjs/utf8" "1.9.0" - -"@webassemblyjs/wast-parser@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz#3031115d79ac5bd261556cecc3fa90a3ef451914" - integrity sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/floating-point-hex-parser" "1.9.0" - "@webassemblyjs/helper-api-error" "1.9.0" - "@webassemblyjs/helper-code-frame" "1.9.0" - "@webassemblyjs/helper-fsm" "1.9.0" - "@xtuc/long" "4.2.2" + envinfo "^7.7.3" -"@webassemblyjs/wast-printer@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz#4935d54c85fef637b00ce9f52377451d00d47899" - integrity sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/wast-parser" "1.9.0" - "@xtuc/long" "4.2.2" +"@webpack-cli/serve@^1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-1.3.0.tgz#2730c770f5f1f132767c63dcaaa4ec28f8c56a6c" + integrity sha512-k2p2VrONcYVX1wRRrf0f3X2VGltLWcv+JzXRBDmvCxGlCeESx4OXw91TsWeKOkp784uNoVQo313vxJFHXPPwfw== "@xtuc/ieee754@^1.2.0": version "1.2.0" @@ -2012,10 +1982,10 @@ acorn-globals@^6.0.0: acorn "^7.1.1" acorn-walk "^7.1.1" -acorn-jsx@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.2.0.tgz#4c66069173d6fdd68ed85239fc256226182b2ebe" - integrity sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ== +acorn-jsx@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b" + integrity sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng== acorn-walk@^7.1.1: version "7.2.0" @@ -2023,14 +1993,14 @@ acorn-walk@^7.1.1: integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== acorn@^7.1.1, acorn@^7.4.0: - version "7.4.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.0.tgz#e1ad486e6c54501634c6c397c5c121daa383607c" - integrity sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w== + version "7.4.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" + integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== -acorn@^8.0.3: - version "8.0.4" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.0.4.tgz#7a3ae4191466a6984eee0fe3407a4f3aa9db8354" - integrity sha512-XNP0PqF1XD19ZlLKvB7cMmnZswW4C/03pRHgirB30uSJTaS3A3V1/P4sS3HPvFmjoriPCJQs+JDSbm4bL1TxGQ== +acorn@^8.0.4: + version "8.0.5" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.0.5.tgz#a3bfb872a74a6a7f661bc81b9849d9cac12601b7" + integrity sha512-v+DieK/HJkJOpFBETDJioequtc3PfxsWMaxIdIwujtF7FEV/MAyDQLlm6/zPvr7Mix07mLh6ccVwIsloceodlg== add-stream@^1.0.0: version "1.0.0" @@ -2058,20 +2028,12 @@ agentkeepalive@^3.4.1: dependencies: humanize-ms "^1.2.1" -aggregate-error@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" - integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== - dependencies: - clean-stack "^2.0.0" - indent-string "^4.0.0" - ajv-keywords@^3.5.2: version "3.5.2" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== -ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5: +ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -2081,10 +2043,20 @@ ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -all-contributors-cli@^6.19.0: - version "6.19.0" - resolved "https://registry.yarnpkg.com/all-contributors-cli/-/all-contributors-cli-6.19.0.tgz#7e4550973afede2476b62bd159fee6d72a1ad802" - integrity sha512-QJN4iLeTeYpTZJES8XFTzQ+itA1qSyBbxLapJLtwrnY+kipyRhCX49fS/s/qftQQym9XLATMZUpUeEeJSox1sw== +ajv@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-7.0.4.tgz#827e5f5ae32f5e5c1637db61f253a112229b5e2f" + integrity sha512-xzzzaqgEQfmuhbhAoqjJ8T/1okb6gAzXn/eQRNpAN1AEUoHJTNF9xCDRTtf/s3SKldtZfa+RJeTs+BQq+eZ/sw== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + +all-contributors-cli@^6.20.0: + version "6.20.0" + resolved "https://registry.yarnpkg.com/all-contributors-cli/-/all-contributors-cli-6.20.0.tgz#9bc98dda38cb29cfe8afc8a78c004e14af25d2f6" + integrity sha512-trEQlL1s1u8FSWSwY2w9uL4GCG7Fo9HIW5rm5LtlE0SQHSolfXQBzJib07Qes5j52/t72wjuE6sEKkuRrwiuuQ== dependencies: "@babel/runtime" "^7.7.6" async "^3.0.1" @@ -2142,11 +2114,10 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1: color-convert "^1.9.0" ansi-styles@^4.0.0, ansi-styles@^4.1.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" - integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA== + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== dependencies: - "@types/color-name" "^1.1.1" color-convert "^2.0.1" any-promise@^1.0.0: @@ -2236,12 +2207,14 @@ array-ify@^1.0.0: integrity sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4= array-includes@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.1.tgz#cdd67e6852bdf9c1215460786732255ed2459348" - integrity sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ== + version "3.1.2" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.2.tgz#a8db03e0b88c8c6aeddc49cb132f9bcab4ebf9c8" + integrity sha512-w2GspexNQpx+PutG3QpT437/BenZBj0M/MZGn5mzv/MofYqo0xmRHzn4lFsoDlWJ+THYsGJmFlW68WlDFx7VRw== dependencies: + call-bind "^1.0.0" define-properties "^1.1.3" - es-abstract "^1.17.0" + es-abstract "^1.18.0-next.1" + get-intrinsic "^1.0.1" is-string "^1.0.5" array-union@^1.0.2: @@ -2267,12 +2240,13 @@ array-unique@^0.3.2: integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= array.prototype.flat@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz#0de82b426b0318dbfdb940089e38b043d37f6c7b" - integrity sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ== + version "1.2.4" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz#6ef638b43312bd401b4c6199fdec7e2dc9e9a123" + integrity sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg== dependencies: + call-bind "^1.0.0" define-properties "^1.1.3" - es-abstract "^1.17.0-next.1" + es-abstract "^1.18.0-next.1" arrify@^1.0.1: version "1.0.1" @@ -2301,10 +2275,10 @@ assign-symbols@^1.0.0: resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= -astral-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" - integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== +astral-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" + integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== async@^3.0.1: version "3.2.0" @@ -2331,7 +2305,7 @@ atob@^2.1.2: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== -available-typed-arrays@^1.0.0, available-typed-arrays@^1.0.2: +available-typed-arrays@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.2.tgz#6b098ca9d8039079ee3f77f7b783c4480ba513f5" integrity sha512-XWX3OX8Onv97LMk/ftVyBibpGwY5a8SmuxZPzeOxqmuEqUCOM9ZE+uIaD1VNJ5QnvU2UQusvmKbuM1FR8QWGfQ== @@ -2344,20 +2318,20 @@ aws-sign2@~0.7.0: integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= aws4@^1.8.0: - version "1.10.1" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.10.1.tgz#e1e82e4f3e999e2cfd61b161280d16a111f86428" - integrity sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA== + version "1.11.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" + integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== -babel-jest@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-26.5.2.tgz#164f367a35946c6cf54eaccde8762dec50422250" - integrity sha512-U3KvymF3SczA3vOL/cgiUFOznfMET+XDIXiWnoJV45siAp2pLMG8i2+/MGZlAC3f/F6Q40LR4M4qDrWZ9wkK8A== +babel-jest@^26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-26.6.3.tgz#d87d25cb0037577a0c89f82e5755c5d293c01056" + integrity sha512-pl4Q+GAVOHwvjrck6jKjvmGhnO3jHX/xuB9d27f+EJZ/6k+6nMuPjorrYp7s++bKKdANwzElBWnLWaObvTnaZA== dependencies: - "@jest/transform" "^26.5.2" - "@jest/types" "^26.5.2" + "@jest/transform" "^26.6.2" + "@jest/types" "^26.6.2" "@types/babel__core" "^7.1.7" babel-plugin-istanbul "^6.0.0" - babel-preset-jest "^26.5.0" + babel-preset-jest "^26.6.2" chalk "^4.0.0" graceful-fs "^4.2.4" slash "^3.0.0" @@ -2373,20 +2347,20 @@ babel-plugin-istanbul@^6.0.0: istanbul-lib-instrument "^4.0.0" test-exclude "^6.0.0" -babel-plugin-jest-hoist@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-26.5.0.tgz#3916b3a28129c29528de91e5784a44680db46385" - integrity sha512-ck17uZFD3CDfuwCLATWZxkkuGGFhMij8quP8CNhwj8ek1mqFgbFzRJ30xwC04LLscj/aKsVFfRST+b5PT7rSuw== +babel-plugin-jest-hoist@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-26.6.2.tgz#8185bd030348d254c6d7dd974355e6a28b21e62d" + integrity sha512-PO9t0697lNTmcEHH69mdtYiOIkkOlj9fySqfO3K1eCcdISevLAE0xY59VLLUj0SoiPiTX/JU2CYFpILydUa5Lw== dependencies: "@babel/template" "^7.3.3" "@babel/types" "^7.3.3" "@types/babel__core" "^7.0.0" "@types/babel__traverse" "^7.0.6" -babel-preset-current-node-syntax@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-0.1.3.tgz#b4b547acddbf963cba555ba9f9cbbb70bfd044da" - integrity sha512-uyexu1sVwcdFnyq9o8UQYsXwXflIh8LvrF5+cKrYam93ned1CStffB3+BEcsxGSgagoA3GEyjDqO4a/58hyPYQ== +babel-preset-current-node-syntax@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz#b4399239b89b2a011f9ddbe3e4f401fc40cff73b" + integrity sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ== dependencies: "@babel/plugin-syntax-async-generators" "^7.8.4" "@babel/plugin-syntax-bigint" "^7.8.3" @@ -2399,19 +2373,15 @@ babel-preset-current-node-syntax@^0.1.3: "@babel/plugin-syntax-object-rest-spread" "^7.8.3" "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" "@babel/plugin-syntax-optional-chaining" "^7.8.3" + "@babel/plugin-syntax-top-level-await" "^7.8.3" -babel-preset-jest@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-26.5.0.tgz#f1b166045cd21437d1188d29f7fba470d5bdb0e7" - integrity sha512-F2vTluljhqkiGSJGBg/jOruA8vIIIL11YrxRcO7nviNTMbbofPSHwnm8mgP7d/wS7wRSexRoI6X1A6T74d4LQA== +babel-preset-jest@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-26.6.2.tgz#747872b1171df032252426586881d62d31798fee" + integrity sha512-YvdtlVm9t3k777c5NPQIv6cxFFFapys25HiUmuSgHwIZhfifweR5c5Sf5nwE3MAbfu327CYSvps8Yx6ANLyleQ== dependencies: - babel-plugin-jest-hoist "^26.5.0" - babel-preset-current-node-syntax "^0.1.3" - -babylon@^7.0.0-beta.39: - version "7.0.0-beta.47" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.47.tgz#6d1fa44f0abec41ab7c780481e62fd9aafbdea80" - integrity sha512-+rq2cr4GDhtToEzKFD6KZZMDBXhjFAr9JjPw9pAppZACeEWqNM294j+NdBzkSHYXwzzBmVjZ3nEVJlOhbR2gOQ== + babel-plugin-jest-hoist "^26.6.2" + babel-preset-current-node-syntax "^1.0.0" balanced-match@^1.0.0: version "1.0.0" @@ -2439,14 +2409,9 @@ bcrypt-pbkdf@^1.0.0: tweetnacl "^0.14.3" before-after-hook@^2.0.0, before-after-hook@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.1.0.tgz#b6c03487f44e24200dd30ca5e6a1979c5d2fb635" - integrity sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A== - -big.js@^5.2.2: - version "5.2.2" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" - integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== + version "2.1.1" + resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.1.1.tgz#99ae36992b5cfab4a83f6bee74ab27835f28f405" + integrity sha512-5ekuQOvO04MDj7kYZJaMab2S8SPjGJbotVNyv7QYFCOAwrGZs/YnoDNlh1U+m5hl7H2D/+n0taaAV/tfyd3KMA== bluebird@^3.5.1, bluebird@^3.5.3, bluebird@^3.5.5: version "3.7.2" @@ -2489,15 +2454,16 @@ browser-process-hrtime@^1.0.0: resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== -browserslist@^4.14.3: - version "4.14.5" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.14.5.tgz#1c751461a102ddc60e40993639b709be7f2c4015" - integrity sha512-Z+vsCZIvCBvqLoYkBFTwEYH3v5MCQbsAjp50ERycpOjnPmolg1Gjy4+KaWWpm8QOJt9GHkhdqAl14NpCX73CWA== +browserslist@^4.14.5: + version "4.16.3" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.3.tgz#340aa46940d7db878748567c5dea24a48ddf3717" + integrity sha512-vIyhWmIkULaq04Gt93txdh+j02yX/JzlyhLYbV3YQCn/zvES3JnY7TifHHvvr1w5hTDluNKMkV05cs4vy8Q7sw== dependencies: - caniuse-lite "^1.0.30001135" - electron-to-chromium "^1.3.571" - escalade "^3.1.0" - node-releases "^1.1.61" + caniuse-lite "^1.0.30001181" + colorette "^1.2.1" + electron-to-chromium "^1.3.649" + escalade "^3.1.1" + node-releases "^1.1.70" bs-logger@0.x: version "0.2.6" @@ -2559,29 +2525,6 @@ cacache@^12.0.0, cacache@^12.0.3: unique-filename "^1.1.1" y18n "^4.0.0" -cacache@^15.0.5: - version "15.0.5" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-15.0.5.tgz#69162833da29170d6732334643c60e005f5f17d0" - integrity sha512-lloiL22n7sOjEEXdL8NAjTgv9a1u43xICE9/203qonkZUCj5X1UEWIdf2/Y0d6QcCtMzbKQyhrcDbdvlZTs/+A== - dependencies: - "@npmcli/move-file" "^1.0.1" - chownr "^2.0.0" - fs-minipass "^2.0.0" - glob "^7.1.4" - infer-owner "^1.0.4" - lru-cache "^6.0.0" - minipass "^3.1.1" - minipass-collect "^1.0.2" - minipass-flush "^1.0.5" - minipass-pipeline "^1.2.2" - mkdirp "^1.0.3" - p-map "^4.0.0" - promise-inflight "^1.0.1" - rimraf "^3.0.2" - ssri "^8.0.0" - tar "^6.0.2" - unique-filename "^1.1.1" - cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" @@ -2597,6 +2540,14 @@ cache-base@^1.0.1: union-value "^1.0.0" unset-value "^1.0.0" +call-bind@^1.0.0, call-bind@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + call-me-maybe@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" @@ -2667,15 +2618,15 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -camelcase@^6.0.0, camelcase@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.1.0.tgz#27dc176173725fb0adf8a48b647f4d7871944d78" - integrity sha512-WCMml9ivU60+8rEJgELlFp1gxFcEGxwYleE3bziHEDeqsqAWGHdimB7beBFGjLzVNgPGyDsfgXLQEYMpmIFnVQ== +camelcase@^6.0.0, camelcase@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" + integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== -caniuse-lite@^1.0.30001135: - version "1.0.30001148" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001148.tgz#dc97c7ed918ab33bf8706ddd5e387287e015d637" - integrity sha512-E66qcd0KMKZHNJQt9hiLZGE3J4zuTqE1OnU53miEVtylFbwOEmeA5OsRu90noZful+XGSQOni1aT2tiqu/9yYw== +caniuse-lite@^1.0.30001181: + version "1.0.30001185" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001185.tgz#3482a407d261da04393e2f0d61eefbc53be43b95" + integrity sha512-Fpi4kVNtNvJ15H0F6vwmXtb3tukv3Zg3qhKkOGUq7KJ1J6b9kf4dnNgtEAFXhRsJo0gNj9W60+wBvn0JcTvdTg== capture-exit@^2.0.0: version "2.0.0" @@ -2703,14 +2654,6 @@ chalk@^2.0.0, chalk@^2.3.1, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" - integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - chalk@^4.0.0, chalk@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" @@ -2751,6 +2694,11 @@ ci-info@^2.0.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== +cjs-module-lexer@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-0.6.0.tgz#4186fcca0eae175970aee870b9fe2d6cf8d5655f" + integrity sha512-uc2Vix1frTfnuzxxu1Hp4ktSvM3QaI4oXl4ZUqL1wjTu/BGki9TrCWoqLTg/drR1KwAEarXuRFCG2Svr1GxPFw== + class-utils@^0.3.5: version "0.3.6" resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" @@ -2761,11 +2709,6 @@ class-utils@^0.3.5: isobject "^3.0.0" static-extend "^0.1.1" -clean-stack@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" - integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== - cli-cursor@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" @@ -2808,10 +2751,10 @@ cliui@^6.0.0: strip-ansi "^6.0.0" wrap-ansi "^6.2.0" -cliui@^7.0.0: - version "7.0.1" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.1.tgz#a4cb67aad45cd83d8d05128fc9f4d8fbb887e6b3" - integrity sha512-rcvHOWyGyid6I1WjT/3NatKj2kDt9OdSHSXpyLXaMWFbKpGACNW8pRhhdPUq9MWUOdwn8Rz9AVETjF4105rZZQ== +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== dependencies: string-width "^4.2.0" strip-ansi "^6.0.0" @@ -2883,6 +2826,11 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +colorette@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.1.tgz#4d0b921325c14faf92633086a536db6e89564b1b" + integrity sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw== + colors@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" @@ -2908,15 +2856,15 @@ commander@^2.20.0: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -commondir@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" - integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= +commander@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-7.0.0.tgz#3e2bbfd8bb6724760980988fb5b22b7ee6b71ab2" + integrity sha512-ovx/7NkTrnPuIV8sqk/GjUIIM1+iUQeqA3ye2VNpq9sVoiZsooObWlQy+OPWGI17GDaEoybuAGJm6U8yC077BA== -commonmark@^0.29.2: - version "0.29.2" - resolved "https://registry.yarnpkg.com/commonmark/-/commonmark-0.29.2.tgz#e7bd5582400f2a45421f2f64eca19fc89cbd4e1b" - integrity sha512-spe43MvEIaPpHss1T7z4yQaFQfLGmMu+yvCwv6xqhELIwkG/ZGgDpxOPzKxnuYzYT2c+aziCCc8m2rBVLA7jUA== +commonmark@^0.29.3: + version "0.29.3" + resolved "https://registry.yarnpkg.com/commonmark/-/commonmark-0.29.3.tgz#bb1d5733bfe3ea213b412f33f16439cc12999c2c" + integrity sha512-fvt/NdOFKaL2gyhltSy6BC4LxbbxbnPxBMl923ittqO/JBM0wQHaoYZliE4tp26cRxX/ZZtRsJlZzQrVdUkXAA== dependencies: entities "~2.0" mdurl "~1.0.1" @@ -2979,25 +2927,25 @@ contains-path@^0.1.0: resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" integrity sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo= -conventional-changelog-angular@^5.0.11, conventional-changelog-angular@^5.0.3: - version "5.0.11" - resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.11.tgz#99a3ca16e4a5305e0c2c2fae3ef74fd7631fc3fb" - integrity sha512-nSLypht/1yEflhuTogC03i7DX7sOrXGsRn14g131Potqi6cbGbGEE9PSDEHKldabB6N76HiSyw9Ph+kLmC04Qw== +conventional-changelog-angular@^5.0.12, conventional-changelog-angular@^5.0.3: + version "5.0.12" + resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.12.tgz#c979b8b921cbfe26402eb3da5bbfda02d865a2b9" + integrity sha512-5GLsbnkR/7A89RyHLvvoExbiGbd9xKdKqDTrArnPbOqBqG/2wIosu0fHwpeIRI8Tl94MhVNBXcLJZl92ZQ5USw== dependencies: compare-func "^2.0.0" q "^1.5.1" -conventional-changelog-atom@^2.0.7: - version "2.0.7" - resolved "https://registry.yarnpkg.com/conventional-changelog-atom/-/conventional-changelog-atom-2.0.7.tgz#221575253a04f77a2fd273eb2bf29a138f710abf" - integrity sha512-7dOREZwzB+tCEMjRTDfen0OHwd7vPUdmU0llTy1eloZgtOP4iSLVzYIQqfmdRZEty+3w5Jz+AbhfTJKoKw1JeQ== +conventional-changelog-atom@^2.0.8: + version "2.0.8" + resolved "https://registry.yarnpkg.com/conventional-changelog-atom/-/conventional-changelog-atom-2.0.8.tgz#a759ec61c22d1c1196925fca88fe3ae89fd7d8de" + integrity sha512-xo6v46icsFTK3bb7dY/8m2qvc8sZemRgdqLb/bjpBsH2UyOS8rKNTgcb5025Hri6IpANPApbXMg15QLb1LJpBw== dependencies: q "^1.5.1" -conventional-changelog-codemirror@^2.0.7: - version "2.0.7" - resolved "https://registry.yarnpkg.com/conventional-changelog-codemirror/-/conventional-changelog-codemirror-2.0.7.tgz#d6b6a8ce2707710c5a036e305037547fb9e15bfb" - integrity sha512-Oralk1kiagn3Gb5cR5BffenWjVu59t/viE6UMD/mQa1hISMPkMYhJIqX+CMeA1zXgVBO+YHQhhokEj99GP5xcg== +conventional-changelog-codemirror@^2.0.8: + version "2.0.8" + resolved "https://registry.yarnpkg.com/conventional-changelog-codemirror/-/conventional-changelog-codemirror-2.0.8.tgz#398e9530f08ce34ec4640af98eeaf3022eb1f7dc" + integrity sha512-z5DAsn3uj1Vfp7po3gpt2Boc+Bdwmw2++ZHa5Ak9k0UKsYAO5mH1UBTN0qSCuJZREIhX6WU4E1p3IW2oRCNzQw== dependencies: q "^1.5.1" @@ -3006,10 +2954,10 @@ conventional-changelog-config-spec@2.1.0: resolved "https://registry.yarnpkg.com/conventional-changelog-config-spec/-/conventional-changelog-config-spec-2.1.0.tgz#874a635287ef8b581fd8558532bf655d4fb59f2d" integrity sha512-IpVePh16EbbB02V+UA+HQnnPIohgXvJRxHcS5+Uwk4AT5LjzCZJm5sp/yqs5C6KZJ1jMsV4paEV13BN1pvDuxQ== -conventional-changelog-conventionalcommits@4.4.0, conventional-changelog-conventionalcommits@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.4.0.tgz#8d96687141c9bbd725a89b95c04966d364194cd4" - integrity sha512-ybvx76jTh08tpaYrYn/yd0uJNLt5yMrb1BphDe4WBredMlvPisvMghfpnJb6RmRNcqXeuhR6LfGZGewbkRm9yA== +conventional-changelog-conventionalcommits@4.5.0, conventional-changelog-conventionalcommits@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.5.0.tgz#a02e0b06d11d342fdc0f00c91d78265ed0bc0a62" + integrity sha512-buge9xDvjjOxJlyxUnar/+6i/aVEVGA7EEh4OafBCXPlLUQPGbRUBhBUveWRxzvR8TEjhKEP4BdepnpG2FSZXw== dependencies: compare-func "^2.0.0" lodash "^4.17.15" @@ -3034,59 +2982,59 @@ conventional-changelog-core@^3.1.6: read-pkg-up "^3.0.0" through2 "^3.0.0" -conventional-changelog-core@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-4.2.0.tgz#d8befd1e1f5126bf35a17668276cc8c244650469" - integrity sha512-8+xMvN6JvdDtPbGBqA7oRNyZD4od1h/SIzrWqHcKZjitbVXrFpozEeyn4iI4af1UwdrabQpiZMaV07fPUTGd4w== +conventional-changelog-core@^4.2.1: + version "4.2.2" + resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-4.2.2.tgz#f0897df6d53b5d63dec36b9442bd45354f8b3ce5" + integrity sha512-7pDpRUiobQDNkwHyJG7k9f6maPo9tfPzkSWbRq97GGiZqisElhnvUZSvyQH20ogfOjntB5aadvv6NNcKL1sReg== dependencies: add-stream "^1.0.0" - conventional-changelog-writer "^4.0.17" - conventional-commits-parser "^3.1.0" + conventional-changelog-writer "^4.0.18" + conventional-commits-parser "^3.2.0" dateformat "^3.0.0" get-pkg-repo "^1.0.0" - git-raw-commits "2.0.0" + git-raw-commits "^2.0.8" git-remote-origin-url "^2.0.0" - git-semver-tags "^4.1.0" + git-semver-tags "^4.1.1" lodash "^4.17.15" - normalize-package-data "^2.3.5" + normalize-package-data "^3.0.0" q "^1.5.1" read-pkg "^3.0.0" read-pkg-up "^3.0.0" shelljs "^0.8.3" - through2 "^3.0.0" + through2 "^4.0.0" -conventional-changelog-ember@^2.0.8: - version "2.0.8" - resolved "https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-2.0.8.tgz#f0f04eb7ff3c885af97db100865ab95dcfa9917f" - integrity sha512-JEMEcUAMg4Q9yxD341OgWlESQ4gLqMWMXIWWUqoQU8yvTJlKnrvcui3wk9JvnZQyONwM2g1MKRZuAjKxr8hAXA== +conventional-changelog-ember@^2.0.9: + version "2.0.9" + resolved "https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-2.0.9.tgz#619b37ec708be9e74a220f4dcf79212ae1c92962" + integrity sha512-ulzIReoZEvZCBDhcNYfDIsLTHzYHc7awh+eI44ZtV5cx6LVxLlVtEmcO+2/kGIHGtw+qVabJYjdI5cJOQgXh1A== dependencies: q "^1.5.1" -conventional-changelog-eslint@^3.0.8: - version "3.0.8" - resolved "https://registry.yarnpkg.com/conventional-changelog-eslint/-/conventional-changelog-eslint-3.0.8.tgz#f8b952b7ed7253ea0ac0b30720bb381f4921b46c" - integrity sha512-5rTRltgWG7TpU1PqgKHMA/2ivjhrB+E+S7OCTvj0zM/QGg4vmnVH67Vq/EzvSNYtejhWC+OwzvDrLk3tqPry8A== +conventional-changelog-eslint@^3.0.9: + version "3.0.9" + resolved "https://registry.yarnpkg.com/conventional-changelog-eslint/-/conventional-changelog-eslint-3.0.9.tgz#689bd0a470e02f7baafe21a495880deea18b7cdb" + integrity sha512-6NpUCMgU8qmWmyAMSZO5NrRd7rTgErjrm4VASam2u5jrZS0n38V7Y9CzTtLT2qwz5xEChDR4BduoWIr8TfwvXA== dependencies: q "^1.5.1" -conventional-changelog-express@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/conventional-changelog-express/-/conventional-changelog-express-2.0.5.tgz#6e93705acdad374516ca125990012a48e710f8de" - integrity sha512-pW2hsjKG+xNx/Qjof8wYlAX/P61hT5gQ/2rZ2NsTpG+PgV7Rc8RCfITvC/zN9K8fj0QmV6dWmUefCteD9baEAw== +conventional-changelog-express@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/conventional-changelog-express/-/conventional-changelog-express-2.0.6.tgz#420c9d92a347b72a91544750bffa9387665a6ee8" + integrity sha512-SDez2f3iVJw6V563O3pRtNwXtQaSmEfTCaTBPCqn0oG0mfkq0rX4hHBq5P7De2MncoRixrALj3u3oQsNK+Q0pQ== dependencies: q "^1.5.1" -conventional-changelog-jquery@^3.0.10: - version "3.0.10" - resolved "https://registry.yarnpkg.com/conventional-changelog-jquery/-/conventional-changelog-jquery-3.0.10.tgz#fe8eb6aff322aa980af5eb68497622a5f6257ce7" - integrity sha512-QCW6wF8QgPkq2ruPaxc83jZxoWQxLkt/pNxIDn/oYjMiVgrtqNdd7lWe3vsl0hw5ENHNf/ejXuzDHk6suKsRpg== +conventional-changelog-jquery@^3.0.11: + version "3.0.11" + resolved "https://registry.yarnpkg.com/conventional-changelog-jquery/-/conventional-changelog-jquery-3.0.11.tgz#d142207400f51c9e5bb588596598e24bba8994bf" + integrity sha512-x8AWz5/Td55F7+o/9LQ6cQIPwrCjfJQ5Zmfqi8thwUEKHstEn4kTIofXub7plf1xvFA2TqhZlq7fy5OmV6BOMw== dependencies: q "^1.5.1" -conventional-changelog-jshint@^2.0.8: - version "2.0.8" - resolved "https://registry.yarnpkg.com/conventional-changelog-jshint/-/conventional-changelog-jshint-2.0.8.tgz#3fff4df8cb46037f77b9dc3f8e354c7f99332f13" - integrity sha512-hB/iI0IiZwnZ+seYI+qEQ4b+EMQSEC8jGIvhO2Vpz1E5p8FgLz75OX8oB1xJWl+s4xBMB6f8zJr0tC/BL7YOjw== +conventional-changelog-jshint@^2.0.9: + version "2.0.9" + resolved "https://registry.yarnpkg.com/conventional-changelog-jshint/-/conventional-changelog-jshint-2.0.9.tgz#f2d7f23e6acd4927a238555d92c09b50fe3852ff" + integrity sha512-wMLdaIzq6TNnMHMy31hql02OEQ8nCQfExw1SE0hYL5KvU+JCTuPaDO+7JiogGT2gJAxiUGATdtYYfh+nT+6riA== dependencies: compare-func "^2.0.0" q "^1.5.1" @@ -3096,72 +3044,72 @@ conventional-changelog-preset-loader@^2.1.1, conventional-changelog-preset-loade resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.4.tgz#14a855abbffd59027fd602581f1f34d9862ea44c" integrity sha512-GEKRWkrSAZeTq5+YjUZOYxdHq+ci4dNwHvpaBC3+ENalzFWuCWa9EZXSuZBpkr72sMdKB+1fyDV4takK1Lf58g== -conventional-changelog-writer@^4.0.17, conventional-changelog-writer@^4.0.6: - version "4.0.17" - resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.0.17.tgz#4753aaa138bf5aa59c0b274cb5937efcd2722e21" - integrity sha512-IKQuK3bib/n032KWaSb8YlBFds+aLmzENtnKtxJy3+HqDq5kohu3g/UdNbIHeJWygfnEbZjnCKFxAW0y7ArZAw== +conventional-changelog-writer@^4.0.18, conventional-changelog-writer@^4.0.6: + version "4.1.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.1.0.tgz#1ca7880b75aa28695ad33312a1f2366f4b12659f" + integrity sha512-WwKcUp7WyXYGQmkLsX4QmU42AZ1lqlvRW9mqoyiQzdD+rJWbTepdWoKJuwXTS+yq79XKnQNa93/roViPQrAQgw== dependencies: compare-func "^2.0.0" - conventional-commits-filter "^2.0.6" + conventional-commits-filter "^2.0.7" dateformat "^3.0.0" handlebars "^4.7.6" json-stringify-safe "^5.0.1" lodash "^4.17.15" - meow "^7.0.0" + meow "^8.0.0" semver "^6.0.0" split "^1.0.0" - through2 "^3.0.0" - -conventional-changelog@3.1.23: - version "3.1.23" - resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-3.1.23.tgz#d696408021b579a3814aba79b38729ed86478aea" - integrity sha512-sScUu2NHusjRC1dPc5p8/b3kT78OYr95/Bx7Vl8CPB8tF2mG1xei5iylDTRjONV5hTlzt+Cn/tBWrKdd299b7A== - dependencies: - conventional-changelog-angular "^5.0.11" - conventional-changelog-atom "^2.0.7" - conventional-changelog-codemirror "^2.0.7" - conventional-changelog-conventionalcommits "^4.4.0" - conventional-changelog-core "^4.2.0" - conventional-changelog-ember "^2.0.8" - conventional-changelog-eslint "^3.0.8" - conventional-changelog-express "^2.0.5" - conventional-changelog-jquery "^3.0.10" - conventional-changelog-jshint "^2.0.8" + through2 "^4.0.0" + +conventional-changelog@3.1.24: + version "3.1.24" + resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-3.1.24.tgz#ebd180b0fd1b2e1f0095c4b04fd088698348a464" + integrity sha512-ed6k8PO00UVvhExYohroVPXcOJ/K1N0/drJHx/faTH37OIZthlecuLIRX/T6uOp682CAoVoFpu+sSEaeuH6Asg== + dependencies: + conventional-changelog-angular "^5.0.12" + conventional-changelog-atom "^2.0.8" + conventional-changelog-codemirror "^2.0.8" + conventional-changelog-conventionalcommits "^4.5.0" + conventional-changelog-core "^4.2.1" + conventional-changelog-ember "^2.0.9" + conventional-changelog-eslint "^3.0.9" + conventional-changelog-express "^2.0.6" + conventional-changelog-jquery "^3.0.11" + conventional-changelog-jshint "^2.0.9" conventional-changelog-preset-loader "^2.3.4" -conventional-commits-filter@^2.0.2, conventional-commits-filter@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-2.0.6.tgz#0935e1240c5ca7698329affee1b6a46d33324c4c" - integrity sha512-4g+sw8+KA50/Qwzfr0hL5k5NWxqtrOVw4DDk3/h6L85a9Gz0/Eqp3oP+CWCNfesBvZZZEFHF7OTEbRe+yYSyKw== +conventional-commits-filter@^2.0.2, conventional-commits-filter@^2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-2.0.7.tgz#f8d9b4f182fce00c9af7139da49365b136c8a0b3" + integrity sha512-ASS9SamOP4TbCClsRHxIHXRfcGCnIoQqkvAzCSbZzTFLfcTqJVugB0agRgsEELsqaeWgsXv513eS116wnlSSPA== dependencies: lodash.ismatch "^4.4.0" modify-values "^1.0.0" -conventional-commits-parser@^3.0.3, conventional-commits-parser@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.1.0.tgz#10140673d5e7ef5572633791456c5d03b69e8be4" - integrity sha512-RSo5S0WIwXZiRxUGTPuYFbqvrR4vpJ1BDdTlthFgvHt5kEdnd1+pdvwWphWn57/oIl4V72NMmOocFqqJ8mFFhA== +conventional-commits-parser@^3.0.3, conventional-commits-parser@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.2.0.tgz#9e261b139ca4b7b29bcebbc54460da36894004ca" + integrity sha512-XmJiXPxsF0JhAKyfA2Nn+rZwYKJ60nanlbSWwwkGwLQFbugsc0gv1rzc7VbbUWAzJfR1qR87/pNgv9NgmxtBMQ== dependencies: JSONStream "^1.0.4" is-text-path "^1.0.1" lodash "^4.17.15" - meow "^7.0.0" + meow "^8.0.0" split2 "^2.0.0" - through2 "^3.0.0" + through2 "^4.0.0" trim-off-newlines "^1.0.0" -conventional-recommended-bump@6.0.10: - version "6.0.10" - resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-6.0.10.tgz#ac2fb3e31bad2aeda80086b345bf0c52edd1d1b3" - integrity sha512-2ibrqAFMN3ZA369JgVoSbajdD/BHN6zjY7DZFKTHzyzuQejDUCjQ85S5KHxCRxNwsbDJhTPD5hOKcis/jQhRgg== +conventional-recommended-bump@6.0.11: + version "6.0.11" + resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-6.0.11.tgz#fcc39acb51d1946b63fc478737d1e52712f36356" + integrity sha512-FciYBMwzwwBZ1K4NS8c57rsOfSc51e1V6UVSNIosrjH+A6xXkyiA4ELwoWyRKdMhJ+m3O6ru9ZJ7F2QFjjYJdQ== dependencies: concat-stream "^2.0.0" conventional-changelog-preset-loader "^2.3.4" - conventional-commits-filter "^2.0.6" - conventional-commits-parser "^3.1.0" + conventional-commits-filter "^2.0.7" + conventional-commits-parser "^3.2.0" git-raw-commits "2.0.0" - git-semver-tags "^4.1.0" - meow "^7.0.0" + git-semver-tags "^4.1.1" + meow "^8.0.0" q "^1.5.1" conventional-recommended-bump@^5.0.0: @@ -3217,7 +3165,12 @@ cosmiconfig@^5.1.0: js-yaml "^3.13.1" parse-json "^4.0.0" -cross-spawn@^6.0.0, cross-spawn@^6.0.5: +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== + +cross-spawn@^6.0.0: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== @@ -3228,7 +3181,7 @@ cross-spawn@^6.0.0, cross-spawn@^6.0.5: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^7.0.0, cross-spawn@^7.0.2: +cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -3273,6 +3226,11 @@ dargs@^4.0.1: dependencies: number-is-nan "^1.0.0" +dargs@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/dargs/-/dargs-7.0.0.tgz#04015c41de0bcb69ec84050f3d9be0caf8d6d5cc" + integrity sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg== + dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" @@ -3319,18 +3277,18 @@ debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: ms "2.0.0" debug@^3.1.0: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== + version "3.2.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== dependencies: ms "^2.1.1" debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" - integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== + version "4.3.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" + integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== dependencies: - ms "^2.1.1" + ms "2.1.2" debuglog@^1.0.1: version "1.0.1" @@ -3350,15 +3308,15 @@ decamelize@^1.1.0, decamelize@^1.1.2, decamelize@^1.2.0: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= -decamelize@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" - integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== +decamelize@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-5.0.0.tgz#88358157b010ef133febfd27c18994bd80c6215b" + integrity sha512-U75DcT5hrio3KNtvdULAWnLiAPbFUC4191ldxMmj4FA/mRuBnmDwU0boNfPyFRhnan+Jm+haLeSn3P0afcBn4w== decimal.js@^10.2.0: - version "10.2.0" - resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.2.0.tgz#39466113a9e036111d02f82489b5fd6b0b5ed231" - integrity sha512-vDPw+rDgn3bZe1+F/pyEwb1oMG2XTlRVgAa6B4KccTEpYgF8w6eQllVbQcfIJnZyvzFtFpxnpGtx8dd7DJp/Rw== + version "10.2.1" + resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.2.1.tgz#238ae7b0f0c793d3e3cea410108b35a2c01426a3" + integrity sha512-KaL7+6Fw6i5A2XSnsbhm/6B+NuEA7TZ4vqxnd5tXz9sbKtrN9Srj8ab4vKVdK8YAqZO9P1kg45Y6YLoduPf+kw== decode-uri-component@^0.2.0: version "0.2.0" @@ -3370,20 +3328,21 @@ dedent@^0.7.0: resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" integrity sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw= -deep-equal@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-2.0.4.tgz#6b0b407a074666033169df3acaf128e1c6f3eab6" - integrity sha512-BUfaXrVoCfgkOQY/b09QdO9L3XNoF2XH0A3aY9IQwQL/ZjLOe8FQgCNVl1wiolhsFo8kFdO9zdPViCPbmaJA5w== +deep-equal@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-2.0.5.tgz#55cd2fe326d83f9cbf7261ef0e060b3f724c5cb9" + integrity sha512-nPiRgmbAtm1a3JsnLCf6/SLfXcjyN5v8L1TXzdCmHrXJ4hx+gW/w1YCcn7z8gJtSiDArZCgYtbao3QqLm/N1Sw== dependencies: - es-abstract "^1.18.0-next.1" - es-get-iterator "^1.1.0" + call-bind "^1.0.0" + es-get-iterator "^1.1.1" + get-intrinsic "^1.0.1" is-arguments "^1.0.4" is-date-object "^1.0.2" is-regex "^1.1.1" isarray "^2.0.5" - object-is "^1.1.3" + object-is "^1.1.4" object-keys "^1.1.1" - object.assign "^4.1.1" + object.assign "^4.1.2" regexp.prototype.flags "^1.3.0" side-channel "^1.0.3" which-boxed-primitive "^1.0.1" @@ -3451,11 +3410,6 @@ deprecation@^2.0.0, deprecation@^2.3.1: resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" integrity sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ== -detect-file@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7" - integrity sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc= - detect-indent@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" @@ -3489,21 +3443,21 @@ didyoumean@^1.2.1: resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.1.tgz#e92edfdada6537d484d73c0172fd1eba0c4976ff" integrity sha1-6S7f2tplN9SE1zwBcv0eugxJdv8= -diff-sequences@^25.2.6: - version "25.2.6" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-25.2.6.tgz#5f467c00edd35352b7bca46d7927d60e687a76dd" - integrity sha512-Hq8o7+6GaZeoFjtpgvRBUknSXNeJiCx7V9Fr94ZMljNiCr9n9L8H8aJqgWOQiDDGdyn29fRNcDdRVJ5fdyihfg== - -diff-sequences@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.5.0.tgz#ef766cf09d43ed40406611f11c6d8d9dd8b2fefd" - integrity sha512-ZXx86srb/iYy6jG71k++wBN9P9J05UNQ5hQHQd9MtMPvcqXPx/vKU69jfHV637D00Q2gSgPk2D+jSx3l1lDW/Q== +diff-sequences@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.6.2.tgz#48ba99157de1923412eed41db6b6d4aa9ca7c0b1" + integrity sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q== -diff@^4.0.1, diff@^4.0.2: +diff@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== +diff@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" + integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== + dir-glob@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.2.2.tgz#fa09f0694153c8918b18ba0deafae94769fc50c4" @@ -3548,9 +3502,9 @@ dot-prop@^4.2.0: is-obj "^1.0.0" dot-prop@^5.1.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.2.0.tgz#c34ecc29556dc45f1f4c22697b6f4904e0cc4fcb" - integrity sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A== + version "5.3.0" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" + integrity sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q== dependencies: is-obj "^2.0.0" @@ -3590,15 +3544,15 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" -electron-to-chromium@^1.3.571: - version "1.3.579" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.579.tgz#58bf17499de6edf697e1442017d8569bce0d301a" - integrity sha512-9HaGm4UDxCtcmIqWWdv79pGgpRZWTqr+zg6kxp0MelSHfe1PNjrI8HXy1HgTSy4p0iQETGt8/ElqKFLW008BSA== +electron-to-chromium@^1.3.649: + version "1.3.661" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.661.tgz#8603ec971b3e3b3d83389ac2bb64b9b07d7bb40a" + integrity sha512-INNzKoL9ceOpPCpF5J+Fp9AOHY1RegwKViohAyTzV3XbkuRUx04r4v8edsDbevsog8UuL0GvD/Qerr2HwVTlSA== emittery@^0.7.1: - version "0.7.1" - resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.7.1.tgz#c02375a927a40948c0345cc903072597f5270451" - integrity sha512-d34LN4L6h18Bzz9xpoku2nPwKxCPlPMr3EEKTkoEBi+1/+b0lcRkRJ1UVyyZaKNeqGR3swcGl6s390DNO4YVgQ== + version "0.7.2" + resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.7.2.tgz#25595908e13af0f5674ab419396e2fb394cdfa82" + integrity sha512-A8OG5SR/ij3SsJdWDJdkkSYUjQdCUx6APQXem0SaEePBSRg4eymGYwBkKo1Y6DU+af/Jn2dBQqDBvjnr9Vi8nQ== emoji-regex@^7.0.1: version "7.0.3" @@ -3610,11 +3564,6 @@ emoji-regex@^8.0.0: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== -emojis-list@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" - integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== - encoding@^0.1.11: version "0.1.13" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" @@ -3629,24 +3578,15 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0: dependencies: once "^1.4.0" -enhanced-resolve@^4.1.1: - version "4.3.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.3.0.tgz#3b806f3bfafc1ec7de69551ef93cca46c1704126" - integrity sha512-3e87LvavsdxyoCfGusJnrZ5G8SLPOFeHSNpZI/ATL9a5leXo2k0w6MKnbqhdBad9qTobSfB20Ld7UmgoNbAZkQ== - dependencies: - graceful-fs "^4.1.2" - memory-fs "^0.5.0" - tapable "^1.0.0" - -enhanced-resolve@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.2.0.tgz#3db3307a608f236f33aeea79303d32915792cbab" - integrity sha512-NZlGLl8DxmZoq0uqPPtJfsCAir68uR047+Udsh1FH4+5ydGQdMurn/A430A1BtxASVmMEuS7/XiJ5OxJ9apAzQ== +enhanced-resolve@^5.7.0: + version "5.7.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.7.0.tgz#525c5d856680fbd5052de453ac83e32049958b5c" + integrity sha512-6njwt/NsZFUKhM6j9U8hzVyD4E4r0x7NQzhTCbcWOJ0IQjNSAoalWmb0AE51Wn+fwan5qVESWi7t2ToBxs9vrw== dependencies: graceful-fs "^4.2.4" - tapable "^2.0.0" + tapable "^2.2.0" -enquirer@^2.3.5: +enquirer@^2.3.5, enquirer@^2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== @@ -3663,23 +3603,16 @@ env-paths@^2.2.0: resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.0.tgz#cdca557dc009152917d6166e2febe1f039685e43" integrity sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA== -envinfo@^7.3.1: - version "7.7.2" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.7.2.tgz#098f97a0e902f8141f9150553c92dbb282c4cabe" - integrity sha512-k3Eh5bKuQnZjm49/L7H4cHzs2FlL5QjbTB3JrPxoTI8aJG7hVMe4uKyJxSYH4ahseby2waUwk5OaKX/nAsaYgg== +envinfo@^7.3.1, envinfo@^7.7.3: + version "7.7.4" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.7.4.tgz#c6311cdd38a0e86808c1c9343f667e4267c4a320" + integrity sha512-TQXTYFVVwwluWSFis6K2XKxgrD22jEv0FTuLCQI+OjH7rn93+iY0fSSFM5lrSxFY+H1+B0/cvvlamr3UsBivdQ== err-code@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/err-code/-/err-code-1.1.2.tgz#06e0116d3028f6aef4806849eb0ea6a748ae6960" integrity sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA= -errno@^0.1.3: - version "0.1.7" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" - integrity sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg== - dependencies: - prr "~1.0.1" - error-ex@^1.2.0, error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" @@ -3687,54 +3620,45 @@ error-ex@^1.2.0, error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.17.0, es-abstract@^1.17.0-next.1, es-abstract@^1.17.4, es-abstract@^1.17.5: - version "1.17.6" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.6.tgz#9142071707857b2cacc7b89ecb670316c3e2d52a" - integrity sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw== - dependencies: - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" - is-callable "^1.2.0" - is-regex "^1.1.0" - object-inspect "^1.7.0" - object-keys "^1.1.1" - object.assign "^4.1.0" - string.prototype.trimend "^1.0.1" - string.prototype.trimstart "^1.0.1" - -es-abstract@^1.18.0-next.0, es-abstract@^1.18.0-next.1: - version "1.18.0-next.1" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.0-next.1.tgz#6e3a0a4bda717e5023ab3b8e90bec36108d22c68" - integrity sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA== +es-abstract@^1.18.0-next.1: + version "1.18.0-next.2" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.0-next.2.tgz#088101a55f0541f595e7e057199e27ddc8f3a5c2" + integrity sha512-Ih4ZMFHEtZupnUh6497zEL4y2+w8+1ljnCyaTa+adcoafI1GOvMwFlDjBLfWR7y9VLfrjRJe9ocuHY1PSR9jjw== dependencies: + call-bind "^1.0.2" es-to-primitive "^1.2.1" function-bind "^1.1.1" + get-intrinsic "^1.0.2" has "^1.0.3" has-symbols "^1.0.1" is-callable "^1.2.2" - is-negative-zero "^2.0.0" + is-negative-zero "^2.0.1" is-regex "^1.1.1" - object-inspect "^1.8.0" + object-inspect "^1.9.0" object-keys "^1.1.1" - object.assign "^4.1.1" - string.prototype.trimend "^1.0.1" - string.prototype.trimstart "^1.0.1" + object.assign "^4.1.2" + string.prototype.trimend "^1.0.3" + string.prototype.trimstart "^1.0.3" -es-get-iterator@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.0.tgz#bb98ad9d6d63b31aacdc8f89d5d0ee57bcb5b4c8" - integrity sha512-UfrmHuWQlNMTs35e1ypnvikg6jCz3SK8v8ImvmDsh36fCVUR1MqoFDiyn0/k52C8NqO3YsO8Oe0azeesNuqSsQ== +es-get-iterator@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.2.tgz#9234c54aba713486d7ebde0220864af5e2b283f7" + integrity sha512-+DTO8GYwbMCwbywjimwZMHp8AuYXOS2JZFWoi2AlPOS3ebnII9w/NLpNZtA7A0YLaVDw+O7KFCeoIV7OPvM7hQ== dependencies: - es-abstract "^1.17.4" + call-bind "^1.0.2" + get-intrinsic "^1.1.0" has-symbols "^1.0.1" - is-arguments "^1.0.4" - is-map "^2.0.1" - is-set "^2.0.1" + is-arguments "^1.1.0" + is-map "^2.0.2" + is-set "^2.0.2" is-string "^1.0.5" isarray "^2.0.5" +es-module-lexer@^0.3.26: + version "0.3.26" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.3.26.tgz#7b507044e97d5b03b01d4392c74ffeb9c177a83b" + integrity sha512-Va0Q/xqtrss45hWzP8CZJwzGSZJjDM5/MJRE3IXXnUCcVLElR9BRaE9F62BopysASyc4nM3uwhSW7FFB9nlWAA== + es-to-primitive@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" @@ -3756,12 +3680,7 @@ es6-promisify@^5.0.0: dependencies: es6-promise "^4.0.3" -escalade@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.0.2.tgz#6a580d70edb87880f22b4c91d0d56078df6962c4" - integrity sha512-gPYAU37hYCUhW5euPeR+Y74F7BL+IBsV93j5cvGriSaD1aG6MGsqsV1yamRdrWrb2j3aiZvb0X+UBOWpx3JWtQ== - -escalade@^3.1.0: +escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== @@ -3793,12 +3712,10 @@ escodegen@^1.14.1: optionalDependencies: source-map "~0.6.1" -eslint-config-prettier@^6.12.0: - version "6.12.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.12.0.tgz#9eb2bccff727db1c52104f0b49e87ea46605a0d2" - integrity sha512-9jWPlFlgNwRUYVoujvWTQ1aMO8o6648r+K7qU7K5Jmkbyqav1fuEZC0COYpGBxyiAJb65Ra9hrmFx19xRGwXWw== - dependencies: - get-stdin "^6.0.0" +eslint-config-prettier@^7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-7.2.0.tgz#f4a4bd2832e810e8cc7c1411ec85b3e85c0c53f9" + integrity sha512-rV4Qu0C3nfJKPOAhFujFxB7RMP+URFyQqqOZW9DMRD7ZDTFyjaIlETU3xzHELt++4ugC0+Jm084HQYkkJe+Ivg== eslint-import-resolver-node@^0.3.4: version "0.3.4" @@ -3846,14 +3763,14 @@ eslint-plugin-import@^2.22.1: resolve "^1.17.0" tsconfig-paths "^3.9.0" -eslint-plugin-prettier@^3.1.4: - version "3.1.4" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.4.tgz#168ab43154e2ea57db992a2cd097c828171f75c2" - integrity sha512-jZDa8z76klRqo+TdGDTFJSavwbnWK2ZpqGKNZ+VvweMW516pDUMmQ2koXvxEE4JhzNvTv+radye/bWGBmA6jmg== +eslint-plugin-prettier@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.3.1.tgz#7079cfa2497078905011e6f82e8dd8453d1371b7" + integrity sha512-Rq3jkcFY8RYeQLgk2cCwuc0P7SEFwDravPhsJZOQ5N4YI4DSg50NyqJ/9gdZHzQlHf8MvafSesbNJCcP/FF6pQ== dependencies: prettier-linter-helpers "^1.0.0" -eslint-scope@^5.0.0, eslint-scope@^5.1.0, eslint-scope@^5.1.1: +eslint-scope@^5.0.0, eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== @@ -3878,13 +3795,13 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8" integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== -eslint@^7.11.0: - version "7.11.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.11.0.tgz#aaf2d23a0b5f1d652a08edacea0c19f7fadc0b3b" - integrity sha512-G9+qtYVCHaDi1ZuWzBsOWo2wSwd70TXnU6UHA3cTYHp7gCTXZcpggWFoUVAMRarg68qtPoNfFbzPh+VdOgmwmw== +eslint@^7.19.0: + version "7.19.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.19.0.tgz#6719621b196b5fad72e43387981314e5d0dc3f41" + integrity sha512-CGlMgJY56JZ9ZSYhJuhow61lMPPjUzWmChFya71Z/jilVos7mR/jPgaEfVGgMBY5DshbKdG8Ezb8FDCHcoMEMg== dependencies: "@babel/code-frame" "^7.0.0" - "@eslint/eslintrc" "^0.1.3" + "@eslint/eslintrc" "^0.3.0" ajv "^6.10.0" chalk "^4.0.0" cross-spawn "^7.0.2" @@ -3894,10 +3811,10 @@ eslint@^7.11.0: eslint-scope "^5.1.1" eslint-utils "^2.1.0" eslint-visitor-keys "^2.0.0" - espree "^7.3.0" + espree "^7.3.1" esquery "^1.2.0" esutils "^2.0.2" - file-entry-cache "^5.0.1" + file-entry-cache "^6.0.0" functional-red-black-tree "^1.0.1" glob-parent "^5.0.0" globals "^12.1.0" @@ -3908,7 +3825,7 @@ eslint@^7.11.0: js-yaml "^3.13.1" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.4.1" - lodash "^4.17.19" + lodash "^4.17.20" minimatch "^3.0.4" natural-compare "^1.4.0" optionator "^0.9.1" @@ -3917,17 +3834,17 @@ eslint@^7.11.0: semver "^7.2.1" strip-ansi "^6.0.0" strip-json-comments "^3.1.0" - table "^5.2.3" + table "^6.0.4" text-table "^0.2.0" v8-compile-cache "^2.0.3" -espree@^7.3.0: - version "7.3.0" - resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.0.tgz#dc30437cf67947cf576121ebd780f15eeac72348" - integrity sha512-dksIWsvKCixn1yrEXO8UosNSxaDoSYpq9reEjZSbHLpT5hpaCAKTLBwq0RHtLrIr+c0ByiYzWT8KTMRzoRCNlw== +espree@^7.3.0, espree@^7.3.1: + version "7.3.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6" + integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g== dependencies: acorn "^7.4.0" - acorn-jsx "^5.2.0" + acorn-jsx "^5.3.1" eslint-visitor-keys "^1.3.0" esprima@^4.0.0, esprima@^4.0.1: @@ -3936,9 +3853,9 @@ esprima@^4.0.0, esprima@^4.0.1: integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== esquery@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.3.1.tgz#b78b5828aa8e214e29fb74c4d5b752e1c033da57" - integrity sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ== + version "1.4.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" + integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== dependencies: estraverse "^5.1.0" @@ -3993,9 +3910,9 @@ execa@^1.0.0: strip-eof "^1.0.0" execa@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/execa/-/execa-4.0.3.tgz#0a34dabbad6d66100bd6f2c576c8669403f317f2" - integrity sha512-WFDXGHckXPWZX19t1kCsXzOpqX9LWYNqn4C+HqZlk/V0imTkzJZqf87ZBhvpHaftERYknpk0fjSylnXVlVgI0A== + version "4.1.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" + integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA== dependencies: cross-spawn "^7.0.0" get-stream "^5.0.0" @@ -4007,6 +3924,21 @@ execa@^4.0.0: signal-exit "^3.0.2" strip-final-newline "^2.0.0" +execa@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.0.0.tgz#4029b0007998a841fbd1032e5f4de86a3c1e3376" + integrity sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" + strip-final-newline "^2.0.0" + exit@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" @@ -4025,23 +3957,16 @@ expand-brackets@^2.1.4: snapdragon "^0.8.1" to-regex "^3.0.1" -expand-tilde@^2.0.0, expand-tilde@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" - integrity sha1-l+gBqgUt8CRU3kawK/YhZCzchQI= +expect@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/expect/-/expect-26.6.2.tgz#c6b996bf26bf3fe18b67b2d0f51fc981ba934417" + integrity sha512-9/hlOBkQl2l/PLHJx6JjoDF6xPKcJEsUlWKb23rKE7KzeDqUZKXKNMW27KIue5JMdBV9HgmoJPcc8HtO85t9IA== dependencies: - homedir-polyfill "^1.0.1" - -expect@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/expect/-/expect-26.5.2.tgz#3e0631c4a657a83dbec769ad246a2998953a55a6" - integrity sha512-ccTGrXZd8DZCcvCz4htGXTkd/LOoy6OEtiDS38x3/VVf6E4AQL0QoeksBiw7BtGR5xDNiRYPB8GN6pfbuTOi7w== - dependencies: - "@jest/types" "^26.5.2" + "@jest/types" "^26.6.2" ansi-styles "^4.0.0" jest-get-type "^26.3.0" - jest-matcher-utils "^26.5.2" - jest-message-util "^26.5.2" + jest-matcher-utils "^26.6.2" + jest-message-util "^26.6.2" jest-regex-util "^26.0.0" extend-shallow@^2.0.1: @@ -4120,9 +4045,9 @@ fast-glob@^2.2.6: micromatch "^3.1.10" fast-glob@^3.1.1: - version "3.2.4" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.4.tgz#d20aefbf99579383e7f3cc66529158c9b98554d3" - integrity sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ== + version "3.2.5" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.5.tgz#7939af2a656de79a4f1901903ee8adcaa7cb9661" + integrity sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg== dependencies: "@nodelib/fs.stat" "^2.0.2" "@nodelib/fs.walk" "^1.2.3" @@ -4141,10 +4066,15 @@ fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= +fastest-levenshtein@^1.0.12: + version "1.0.12" + resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz#9990f7d3a88cc5a9ffd1f1745745251700d497e2" + integrity sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow== + fastq@^1.6.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.8.0.tgz#550e1f9f59bbc65fe185cb6a9b4d95357107f481" - integrity sha512-SMIZoZdLh/fgofivvIkmknUXyPnvxRE3DhtZ5Me3Mrsk5gyPL42F0xr51TdRXskBxHfMp+07bcYzfsYEsSQA9Q== + version "1.10.1" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.10.1.tgz#8b8f2ac8bf3632d67afcd65dac248d5fdc45385e" + integrity sha512-AWuv6Ery3pM+dY7LYS8YIaCiQvUaos9OB1RyNgaOWnaX+Tik7Onvcsf8x8c+YtDeT0maYLniBip2hox5KtEXXA== dependencies: reusify "^1.0.4" @@ -4174,12 +4104,12 @@ figures@^3.0.0, figures@^3.1.0: dependencies: escape-string-regexp "^1.0.5" -file-entry-cache@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c" - integrity sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g== +file-entry-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.0.tgz#7921a89c391c6d93efec2169ac6bf300c527ea0a" + integrity sha512-fqoO76jZ3ZnYrXLDRxBR1YvOvc0k844kcOg40bgsPrE25LAb/PDqTY+ho64Xh2c8ZXgIKldchCFHczG2UVRcWA== dependencies: - flat-cache "^2.0.1" + flat-cache "^3.0.4" fill-range@^4.0.0: version "4.0.0" @@ -4198,14 +4128,10 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -find-cache-dir@^3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.1.tgz#89b33fad4a4670daa94f855f7fbe31d6d84fe880" - integrity sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ== - dependencies: - commondir "^1.0.1" - make-dir "^3.0.2" - pkg-dir "^4.1.0" +filter-obj@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/filter-obj/-/filter-obj-1.1.0.tgz#9b311112bc6c6127a16e016c6c5d7f19e0805c5b" + integrity sha1-mzERErxsYSehbgFsbF1/GeCAXFs= find-up@^1.0.0: version "1.1.2" @@ -4237,30 +4163,32 @@ find-up@^4.0.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" -findup-sync@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-3.0.0.tgz#17b108f9ee512dfb7a5c7f3c8b27ea9e1a9c08d1" - integrity sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg== +find-up@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== dependencies: - detect-file "^1.0.0" - is-glob "^4.0.0" - micromatch "^3.0.4" - resolve-dir "^1.0.1" + locate-path "^6.0.0" + path-exists "^4.0.0" -flat-cache@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" - integrity sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA== +flat-cache@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" + integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== dependencies: - flatted "^2.0.0" - rimraf "2.6.3" - write "1.0.3" + flatted "^3.1.0" + rimraf "^3.0.2" -flatted@^2.0.0, flatted@^2.0.1: +flatted@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138" integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA== +flatted@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.1.1.tgz#c4b489e80096d9df1dfc97c79871aea7c617c469" + integrity sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA== + flush-write-stream@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.1.1.tgz#8dd7d873a1babc207d94ead0c2e0e44276ebf2e8" @@ -4324,15 +4252,15 @@ fs-extra@^8.1.0: jsonfile "^4.0.0" universalify "^0.1.0" -fs-extra@^9.0.1: - version "9.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.1.tgz#910da0062437ba4c39fedd863f1675ccfefcb9fc" - integrity sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ== +fs-extra@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" + integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== dependencies: at-least-node "^1.0.0" graceful-fs "^4.2.0" jsonfile "^6.0.1" - universalify "^1.0.0" + universalify "^2.0.0" fs-minipass@^1.2.5: version "1.2.7" @@ -4364,9 +4292,9 @@ fs.realpath@^1.0.0: integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= fsevents@^2.1.2: - version "2.1.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" - integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== function-bind@^1.1.1: version "1.1.1" @@ -4398,15 +4326,24 @@ genfun@^5.0.0: integrity sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA== gensync@^1.0.0-beta.1: - version "1.0.0-beta.1" - resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269" - integrity sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg== + version "1.0.0-beta.2" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== get-caller-file@^2.0.1, get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== +get-intrinsic@^1.0.1, get-intrinsic@^1.0.2, get-intrinsic@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" + integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + get-package-type@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" @@ -4433,11 +4370,6 @@ get-stdin@^4.0.1: resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4= -get-stdin@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" - integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== - get-stream@^4.0.0, get-stream@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" @@ -4452,6 +4384,11 @@ get-stream@^5.0.0: dependencies: pump "^3.0.0" +get-stream@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.0.tgz#3e0012cb6827319da2706e601a1583e8629a6718" + integrity sha512-A1B3Bh1UmL0bidM/YX2NsCOTnGJePL9rO/M+Mw3m9f2gUpfokS0hi5Eah0WSUEWZdZhIZtMjkIYS7mDfOqNHbg== + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -4475,6 +4412,17 @@ git-raw-commits@2.0.0: split2 "^2.0.0" through2 "^2.0.0" +git-raw-commits@^2.0.8: + version "2.0.10" + resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.10.tgz#e2255ed9563b1c9c3ea6bd05806410290297bbc1" + integrity sha512-sHhX5lsbG9SOO6yXdlwgEMQ/ljIn7qMpAbJZCGfXX2fq5T8M5SrDnpYk9/4HswTildcIqatsWa91vty6VhWSaQ== + dependencies: + dargs "^7.0.0" + lodash "^4.17.15" + meow "^8.0.0" + split2 "^3.0.0" + through2 "^4.0.0" + git-remote-origin-url@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz#5282659dae2107145a11126112ad3216ec5fa65f" @@ -4491,12 +4439,12 @@ git-semver-tags@^2.0.3: meow "^4.0.0" semver "^6.0.0" -git-semver-tags@^4.0.0, git-semver-tags@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-4.1.0.tgz#0146c9bc24ee96104c99f443071c8c2d7dc848e3" - integrity sha512-TcxAGeo03HdErzKzi4fDD+xEL7gi8r2Y5YSxH6N2XYdVSV5UkBwfrt7Gqo1b+uSHCjy/sa9Y6BBBxxFLxfbhTg== +git-semver-tags@^4.0.0, git-semver-tags@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-4.1.1.tgz#63191bcd809b0ec3e151ba4751c16c444e5b5780" + integrity sha512-OWyMt5zBe7xFs8vglMmhM9lRQzCWL3WjHtxNNfJTMngGym7pC1kh8sP6jevfydJ6LP3ZvGxfb6ABYgPUM0mtsA== dependencies: - meow "^7.0.0" + meow "^8.0.0" semver "^6.0.0" git-up@^4.0.0: @@ -4508,9 +4456,9 @@ git-up@^4.0.0: parse-url "^5.0.0" git-url-parse@^11.1.2: - version "11.1.3" - resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-11.1.3.tgz#03625b6fc09905e9ad1da7bb2b84be1bf9123143" - integrity sha512-GPsfwticcu52WQ+eHp0IYkAyaOASgYdtsQDIt4rUp6GbiNt1P9ddrh3O0kQB0eD4UJZszVqNT3+9Zwcg40fywA== + version "11.4.4" + resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-11.4.4.tgz#5d747debc2469c17bc385719f7d0427802d83d77" + integrity sha512-Y4o9o7vQngQDIU9IjyCmRJBin5iYjI5u9ZITnddRZpD7dcCFQj2sL2XuMNbLRE4b4B/4ENPsp2Q8P44fjAZ0Pw== dependencies: git-up "^4.0.0" @@ -4546,7 +4494,7 @@ glob-to-regexp@^0.4.1: resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== -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: +glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== @@ -4558,42 +4506,6 @@ glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, gl once "^1.3.0" path-is-absolute "^1.0.0" -global-modules@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea" - integrity sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg== - dependencies: - global-prefix "^1.0.1" - is-windows "^1.0.1" - resolve-dir "^1.0.0" - -global-modules@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" - integrity sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A== - dependencies: - global-prefix "^3.0.0" - -global-prefix@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-1.0.2.tgz#dbf743c6c14992593c655568cb66ed32c0122ebe" - integrity sha1-2/dDxsFJklk8ZVVoy2btMsASLr4= - dependencies: - expand-tilde "^2.0.2" - homedir-polyfill "^1.0.1" - ini "^1.3.4" - is-windows "^1.0.1" - which "^1.2.14" - -global-prefix@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-3.0.0.tgz#fc85f73064df69f50421f47f883fe5b913ba9b97" - integrity sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg== - dependencies: - ini "^1.3.5" - kind-of "^6.0.2" - which "^1.3.1" - globals@^11.1.0: version "11.12.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" @@ -4607,9 +4519,9 @@ globals@^12.1.0: type-fest "^0.8.1" globby@^11.0.1: - version "11.0.1" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.1.tgz#9a2bf107a068f3ffeabc49ad702c79ede8cfd357" - integrity sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ== + version "11.0.2" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.2.tgz#1af538b766a3b540ebfb58a32b2e2d5897321d83" + integrity sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og== dependencies: array-union "^2.1.0" dir-glob "^3.0.1" @@ -4633,9 +4545,9 @@ globby@^9.2.0: slash "^2.0.0" graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2, graceful-fs@^4.2.4: - version "4.2.4" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" - integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== + version "4.2.6" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee" + integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ== growly@^1.3.0: version "1.3.0" @@ -4730,18 +4642,18 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" -homedir-polyfill@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8" - integrity sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA== - dependencies: - parse-passwd "^1.0.0" - hosted-git-info@^2.1.4, hosted-git-info@^2.7.1: version "2.8.8" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg== +hosted-git-info@^3.0.6: + version "3.0.8" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-3.0.8.tgz#6e35d4cc87af2c5f816e4cb9ce350ba87a3f370d" + integrity sha512-aXpmwoOhRBrw6X3j0h5RloK4x1OzsxMPyxqIHyNfSe2pypkVTZFpEiRoSipPEPlMrh0HW/XsjkJ5WgnCirpNUw== + dependencies: + lru-cache "^6.0.0" + html-encoding-sniffer@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz#42a6dc4fd33f00281176e8b23759ca4e4fa185f3" @@ -4789,6 +4701,11 @@ human-signals@^1.1.1: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== +human-signals@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + humanize-ms@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" @@ -4841,9 +4758,9 @@ import-fresh@^2.0.0: resolve-from "^3.0.0" import-fresh@^3.0.0, import-fresh@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66" - integrity sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ== + version "3.3.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== dependencies: parent-module "^1.0.0" resolve-from "^4.0.0" @@ -4904,10 +4821,10 @@ inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -ini@^1.3.2, ini@^1.3.4, ini@^1.3.5: - version "1.3.5" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" - integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== +ini@^1.3.2, ini@^1.3.4: + version "1.3.8" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== init-package-json@^1.10.3: version "1.10.3" @@ -4961,11 +4878,16 @@ inquirer@^7.0.4, inquirer@^7.3.3: strip-ansi "^6.0.0" through "^2.3.6" -interpret@^1.0.0, interpret@^1.4.0: +interpret@^1.0.0: version "1.4.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== +interpret@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-2.2.0.tgz#1a78a0b5965c40a5416d007ad6f50ad27c417df9" + integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw== + ip-regex@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" @@ -4990,40 +4912,39 @@ is-accessor-descriptor@^1.0.0: dependencies: kind-of "^6.0.0" -is-arguments@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.0.4.tgz#3faf966c7cba0ff437fb31f6250082fcf0448cf3" - integrity sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA== +is-arguments@^1.0.4, is-arguments@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.0.tgz#62353031dfbee07ceb34656a6bde59efecae8dd9" + integrity sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg== + dependencies: + call-bind "^1.0.0" is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= -is-bigint@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.0.tgz#73da8c33208d00f130e9b5e15d23eac9215601c4" - integrity sha512-t5mGUXC/xRheCK431ylNiSkGGpBp8bHENBcENTkDT6ppwPzEVxNGZRvgvmOEfbWkFhA7D2GEuE2mmQTr78sl2g== - -is-boolean-object@^1.0.0: +is-bigint@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.0.1.tgz#10edc0900dd127697a92f6f9807c7617d68ac48e" - integrity sha512-TqZuVwa/sppcrhUCAYkGBk7w0yxfQQnxq28fjkO53tnK9FQXmdwz2JS5+GjsWQ6RByES1K40nI+yDic5c9/aAQ== + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.1.tgz#6923051dfcbc764278540b9ce0e6b3213aa5ebc2" + integrity sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg== + +is-boolean-object@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.0.tgz#e2aaad3a3a8fca34c28f6eee135b156ed2587ff0" + integrity sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA== + dependencies: + call-bind "^1.0.0" is-buffer@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== -is-callable@^1.1.4, is-callable@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.0.tgz#83336560b54a38e35e3a2df7afd0454d691468bb" - integrity sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw== - -is-callable@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.2.tgz#c7c6715cd22d4ddb48d3e19970223aceabb080d9" - integrity sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA== +is-callable@^1.1.4, is-callable@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.3.tgz#8b1e0500b73a1d76c70487636f368e519de8db8e" + integrity sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ== is-ci@^2.0.0: version "2.0.0" @@ -5032,6 +4953,13 @@ is-ci@^2.0.0: dependencies: ci-info "^2.0.0" +is-core-module@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a" + integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ== + dependencies: + has "^1.0.3" + is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -5137,17 +5065,17 @@ is-glob@^4.0.0, is-glob@^4.0.1: dependencies: is-extglob "^2.1.1" -is-map@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.1.tgz#520dafc4307bb8ebc33b813de5ce7c9400d644a1" - integrity sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw== +is-map@^2.0.1, is-map@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.2.tgz#00922db8c9bf73e81b7a335827bc2a43f2b91127" + integrity sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg== -is-negative-zero@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.0.tgz#9553b121b0fac28869da9ed459e20c7543788461" - integrity sha1-lVOxIbD6wohp2p7UWeIMdUN4hGE= +is-negative-zero@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24" + integrity sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w== -is-number-object@^1.0.3: +is-number-object@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.4.tgz#36ac95e741cf18b283fc1ddf5e83da798e3ec197" integrity sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw== @@ -5186,27 +5114,28 @@ is-plain-object@^2.0.3, is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" -is-plain-object@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-4.1.1.tgz#1a14d6452cbd50790edc7fdaa0aed5a40a35ebb5" - integrity sha512-5Aw8LLVsDlZsETVMhoMXzqsXwQqr/0vlnBYzIXJbYo2F4yYlhLHs+Ez7Bod7IIQKWkJbJfxrWD7pA1Dw1TKrwA== +is-plain-object@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" + integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== is-potential-custom-element-name@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.0.tgz#0c52e54bcca391bb2c494b21e8626d7336c6e397" integrity sha1-DFLlS8yjkbssSUsh6GJtczbG45c= -is-regex@^1.1.0, is-regex@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.1.tgz#c6f98aacc546f6cec5468a07b7b153ab564a57b9" - integrity sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg== +is-regex@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.2.tgz#81c8ebde4db142f2cf1c53fc86d6a45788266251" + integrity sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg== dependencies: + call-bind "^1.0.2" has-symbols "^1.0.1" -is-set@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.1.tgz#d1604afdab1724986d30091575f54945da7e5f43" - integrity sha512-eJEzOtVyenDs1TMzSQ3kU3K+E0GUS9sno+F0OBT97xsgcJsF9nXMBtkT9/kut5JEpM7oL7X/0qxR17K3mcwIAA== +is-set@^2.0.1, is-set@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.2.tgz#90755fa4c2562dc1c5d4024760d6119b94ca18ec" + integrity sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g== is-ssh@^1.3.0: version "1.3.2" @@ -5225,12 +5154,12 @@ is-stream@^2.0.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== -is-string@^1.0.4, is-string@^1.0.5: +is-string@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6" integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ== -is-symbol@^1.0.2: +is-symbol@^1.0.2, is-symbol@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== @@ -5245,12 +5174,13 @@ is-text-path@^1.0.1: text-extensions "^1.0.0" is-typed-array@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.3.tgz#a4ff5a5e672e1a55f99c7f54e59597af5c1df04d" - integrity sha512-BSYUBOK/HJibQ30wWkWold5txYwMUXQct9YHAQJr8fSwvZoiglcqB0pd7vEN23+Tsi9IUEjztdOSzl4qLVYGTQ== + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.4.tgz#1f66f34a283a3c94a4335434661ca53fff801120" + integrity sha512-ILaRgn4zaSrVNXNGtON6iFNotXW3hAPF3+0fB1usg2jFlWqo5fEDdmJkz0zBfoi7Dgskr8Khi2xZ8cXqZEfXNA== dependencies: - available-typed-arrays "^1.0.0" - es-abstract "^1.17.4" + available-typed-arrays "^1.0.2" + call-bind "^1.0.0" + es-abstract "^1.18.0-next.1" foreach "^2.0.5" has-symbols "^1.0.1" @@ -5274,7 +5204,7 @@ is-weakset@^2.0.1: resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.1.tgz#e9a0af88dbd751589f5e50d80f4c98b780884f83" integrity sha512-pi4vhbhVHGLxohUw7PhGsueT4vRGFoXhP7+RGN0jKIv9+8PWYCQTqtADngrxOm2g46hoH0+g8uZZBzMrvVGDmw== -is-windows@^1.0.0, is-windows@^1.0.1, is-windows@^1.0.2: +is-windows@^1.0.0, is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== @@ -5364,77 +5294,94 @@ istanbul-reports@^3.0.2: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" -jest-changed-files@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-26.5.2.tgz#330232c6a5c09a7f040a5870e8f0a9c6abcdbed5" - integrity sha512-qSmssmiIdvM5BWVtyK/nqVpN3spR5YyvkvPqz1x3BR1bwIxsWmU/MGwLoCrPNLbkG2ASAKfvmJpOduEApBPh2w== +jest-changed-files@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-26.6.2.tgz#f6198479e1cc66f22f9ae1e22acaa0b429c042d0" + integrity sha512-fDS7szLcY9sCtIip8Fjry9oGf3I2ht/QT21bAHm5Dmf0mD4X3ReNUf17y+bO6fR8WgbIZTlbyG1ak/53cbRzKQ== dependencies: - "@jest/types" "^26.5.2" + "@jest/types" "^26.6.2" execa "^4.0.0" throat "^5.0.0" -jest-cli@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-26.5.2.tgz#0df114399b4036a3f046f0a9f25c50372c76b3a2" - integrity sha512-usm48COuUvRp8YEG5OWOaxbSM0my7eHn3QeBWxiGUuFhvkGVBvl1fic4UjC02EAEQtDv8KrNQUXdQTV6ZZBsoA== +jest-circus@^26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-26.6.3.tgz#3cc7ef2a6a3787e5d7bfbe2c72d83262154053e7" + integrity sha512-ACrpWZGcQMpbv13XbzRzpytEJlilP/Su0JtNCi5r/xLpOUhnaIJr8leYYpLEMgPFURZISEHrnnpmB54Q/UziPw== dependencies: - "@jest/core" "^26.5.2" - "@jest/test-result" "^26.5.2" - "@jest/types" "^26.5.2" + "@babel/traverse" "^7.1.0" + "@jest/environment" "^26.6.2" + "@jest/test-result" "^26.6.2" + "@jest/types" "^26.6.2" + "@types/babel__traverse" "^7.0.4" + "@types/node" "*" + chalk "^4.0.0" + co "^4.6.0" + dedent "^0.7.0" + expect "^26.6.2" + is-generator-fn "^2.0.0" + jest-each "^26.6.2" + jest-matcher-utils "^26.6.2" + jest-message-util "^26.6.2" + jest-runner "^26.6.3" + jest-runtime "^26.6.3" + jest-snapshot "^26.6.2" + jest-util "^26.6.2" + pretty-format "^26.6.2" + stack-utils "^2.0.2" + throat "^5.0.0" + +jest-cli@^26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-26.6.3.tgz#43117cfef24bc4cd691a174a8796a532e135e92a" + integrity sha512-GF9noBSa9t08pSyl3CY4frMrqp+aQXFGFkf5hEPbh/pIUFYWMK6ZLTfbmadxJVcJrdRoChlWQsA2VkJcDFK8hg== + dependencies: + "@jest/core" "^26.6.3" + "@jest/test-result" "^26.6.2" + "@jest/types" "^26.6.2" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.4" import-local "^3.0.2" is-ci "^2.0.0" - jest-config "^26.5.2" - jest-util "^26.5.2" - jest-validate "^26.5.2" + jest-config "^26.6.3" + jest-util "^26.6.2" + jest-validate "^26.6.2" prompts "^2.0.1" yargs "^15.4.1" -jest-config@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-26.5.2.tgz#6e828e25f10124433dd008fbd83348636de0972a" - integrity sha512-dqJOnSegNdE5yDiuGHsjTM5gec7Z4AcAMHiW+YscbOYJAlb3LEtDSobXCq0or9EmGQI5SFmKy4T7P1FxetJOfg== +jest-config@^26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-26.6.3.tgz#64f41444eef9eb03dc51d5c53b75c8c71f645349" + integrity sha512-t5qdIj/bCj2j7NFVHb2nFB4aUdfucDn3JRKgrZnplb8nieAirAzRSHP8uDEd+qV6ygzg9Pz4YG7UTJf94LPSyg== dependencies: "@babel/core" "^7.1.0" - "@jest/test-sequencer" "^26.5.2" - "@jest/types" "^26.5.2" - babel-jest "^26.5.2" + "@jest/test-sequencer" "^26.6.3" + "@jest/types" "^26.6.2" + babel-jest "^26.6.3" chalk "^4.0.0" deepmerge "^4.2.2" glob "^7.1.1" graceful-fs "^4.2.4" - jest-environment-jsdom "^26.5.2" - jest-environment-node "^26.5.2" + jest-environment-jsdom "^26.6.2" + jest-environment-node "^26.6.2" jest-get-type "^26.3.0" - jest-jasmine2 "^26.5.2" + jest-jasmine2 "^26.6.3" jest-regex-util "^26.0.0" - jest-resolve "^26.5.2" - jest-util "^26.5.2" - jest-validate "^26.5.2" + jest-resolve "^26.6.2" + jest-util "^26.6.2" + jest-validate "^26.6.2" micromatch "^4.0.2" - pretty-format "^26.5.2" - -jest-diff@^25.2.1: - version "25.5.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-25.5.0.tgz#1dd26ed64f96667c068cef026b677dfa01afcfa9" - integrity sha512-z1kygetuPiREYdNIumRpAHY6RXiGmp70YHptjdaxTWGmA085W3iCnXNx0DhflK3vwrKmrRWyY1wUpkPMVxMK7A== - dependencies: - chalk "^3.0.0" - diff-sequences "^25.2.6" - jest-get-type "^25.2.6" - pretty-format "^25.5.0" + pretty-format "^26.6.2" -jest-diff@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-26.5.2.tgz#8e26cb32dc598e8b8a1b9deff55316f8313c8053" - integrity sha512-HCSWDUGwsov5oTlGzrRM+UPJI/Dpqi9jzeV0fdRNi3Ch5bnoXhnyJMmVg2juv9081zLIy3HGPI5mcuGgXM2xRA== +jest-diff@^26.0.0, jest-diff@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-26.6.2.tgz#1aa7468b52c3a68d7d5c5fdcdfcd5e49bd164394" + integrity sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA== dependencies: chalk "^4.0.0" - diff-sequences "^26.5.0" + diff-sequences "^26.6.2" jest-get-type "^26.3.0" - pretty-format "^26.5.2" + pretty-format "^26.6.2" jest-docblock@^26.0.0: version "26.0.0" @@ -5443,140 +5390,136 @@ jest-docblock@^26.0.0: dependencies: detect-newline "^3.0.0" -jest-each@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-26.5.2.tgz#35e68d6906a7f826d3ca5803cfe91d17a5a34c31" - integrity sha512-w7D9FNe0m2D3yZ0Drj9CLkyF/mGhmBSULMQTypzAKR746xXnjUrK8GUJdlLTWUF6dd0ks3MtvGP7/xNFr9Aphg== +jest-each@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-26.6.2.tgz#02526438a77a67401c8a6382dfe5999952c167cb" + integrity sha512-Mer/f0KaATbjl8MCJ+0GEpNdqmnVmDYqCTJYTvoo7rqmRiDllmp2AYN+06F93nXcY3ur9ShIjS+CO/uD+BbH4A== dependencies: - "@jest/types" "^26.5.2" + "@jest/types" "^26.6.2" chalk "^4.0.0" jest-get-type "^26.3.0" - jest-util "^26.5.2" - pretty-format "^26.5.2" + jest-util "^26.6.2" + pretty-format "^26.6.2" -jest-environment-jsdom@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-26.5.2.tgz#5feab05b828fd3e4b96bee5e0493464ddd2bb4bc" - integrity sha512-fWZPx0bluJaTQ36+PmRpvUtUlUFlGGBNyGX1SN3dLUHHMcQ4WseNEzcGGKOw4U5towXgxI4qDoI3vwR18H0RTw== +jest-environment-jsdom@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-26.6.2.tgz#78d09fe9cf019a357009b9b7e1f101d23bd1da3e" + integrity sha512-jgPqCruTlt3Kwqg5/WVFyHIOJHsiAvhcp2qiR2QQstuG9yWox5+iHpU3ZrcBxW14T4fe5Z68jAfLRh7joCSP2Q== dependencies: - "@jest/environment" "^26.5.2" - "@jest/fake-timers" "^26.5.2" - "@jest/types" "^26.5.2" + "@jest/environment" "^26.6.2" + "@jest/fake-timers" "^26.6.2" + "@jest/types" "^26.6.2" "@types/node" "*" - jest-mock "^26.5.2" - jest-util "^26.5.2" + jest-mock "^26.6.2" + jest-util "^26.6.2" jsdom "^16.4.0" -jest-environment-node@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-26.5.2.tgz#275a0f01b5e47447056f1541a15ed4da14acca03" - integrity sha512-YHjnDsf/GKFCYMGF1V+6HF7jhY1fcLfLNBDjhAOvFGvt6d8vXvNdJGVM7uTZ2VO/TuIyEFhPGaXMX5j3h7fsrA== +jest-environment-node@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-26.6.2.tgz#824e4c7fb4944646356f11ac75b229b0035f2b0c" + integrity sha512-zhtMio3Exty18dy8ee8eJ9kjnRyZC1N4C1Nt/VShN1apyXc8rWGtJ9lI7vqiWcyyXS4BVSEn9lxAM2D+07/Tag== dependencies: - "@jest/environment" "^26.5.2" - "@jest/fake-timers" "^26.5.2" - "@jest/types" "^26.5.2" + "@jest/environment" "^26.6.2" + "@jest/fake-timers" "^26.6.2" + "@jest/types" "^26.6.2" "@types/node" "*" - jest-mock "^26.5.2" - jest-util "^26.5.2" + jest-mock "^26.6.2" + jest-util "^26.6.2" jest-expect-message@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/jest-expect-message/-/jest-expect-message-1.0.2.tgz#6d67cdf093457a607d231038a3b84aa3a076bcba" integrity sha512-WFiXMgwS2lOqQZt1iJMI/hOXpUm32X+ApsuzYcQpW5m16Pv6/Gd9kgC+Q+Q1YVNU04kYcAOv9NXMnjg6kKUy6Q== -jest-get-type@^25.2.6: - version "25.2.6" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-25.2.6.tgz#0b0a32fab8908b44d508be81681487dbabb8d877" - integrity sha512-DxjtyzOHjObRM+sM1knti6or+eOgcGU4xVSb2HNP1TqO4ahsT+rqZg+nyqHWJSvWgKC5cG3QjGFBqxLghiF/Ig== - jest-get-type@^26.3.0: version "26.3.0" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-26.3.0.tgz#e97dc3c3f53c2b406ca7afaed4493b1d099199e0" integrity sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig== -jest-haste-map@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-26.5.2.tgz#a15008abfc502c18aa56e4919ed8c96304ceb23d" - integrity sha512-lJIAVJN3gtO3k4xy+7i2Xjtwh8CfPcH08WYjZpe9xzveDaqGw9fVNCpkYu6M525wKFVkLmyi7ku+DxCAP1lyMA== +jest-haste-map@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-26.6.2.tgz#dd7e60fe7dc0e9f911a23d79c5ff7fb5c2cafeaa" + integrity sha512-easWIJXIw71B2RdR8kgqpjQrbMRWQBgiBwXYEhtGUTaX+doCjBheluShdDMeR8IMfJiTqH4+zfhtg29apJf/8w== dependencies: - "@jest/types" "^26.5.2" + "@jest/types" "^26.6.2" "@types/graceful-fs" "^4.1.2" "@types/node" "*" anymatch "^3.0.3" fb-watchman "^2.0.0" graceful-fs "^4.2.4" jest-regex-util "^26.0.0" - jest-serializer "^26.5.0" - jest-util "^26.5.2" - jest-worker "^26.5.0" + jest-serializer "^26.6.2" + jest-util "^26.6.2" + jest-worker "^26.6.2" micromatch "^4.0.2" sane "^4.0.3" walker "^1.0.7" optionalDependencies: fsevents "^2.1.2" -jest-jasmine2@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-26.5.2.tgz#0e33819d31b1f2aab5efd1e02ce502209c0e64a2" - integrity sha512-2J+GYcgLVPTkpmvHEj0/IDTIAuyblGNGlyGe4fLfDT2aktEPBYvoxUwFiOmDDxxzuuEAD2uxcYXr0+1Yw4tjFA== +jest-jasmine2@^26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-26.6.3.tgz#adc3cf915deacb5212c93b9f3547cd12958f2edd" + integrity sha512-kPKUrQtc8aYwBV7CqBg5pu+tmYXlvFlSFYn18ev4gPFtrRzB15N2gW/Roew3187q2w2eHuu0MU9TJz6w0/nPEg== dependencies: "@babel/traverse" "^7.1.0" - "@jest/environment" "^26.5.2" - "@jest/source-map" "^26.5.0" - "@jest/test-result" "^26.5.2" - "@jest/types" "^26.5.2" + "@jest/environment" "^26.6.2" + "@jest/source-map" "^26.6.2" + "@jest/test-result" "^26.6.2" + "@jest/types" "^26.6.2" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" - expect "^26.5.2" + expect "^26.6.2" is-generator-fn "^2.0.0" - jest-each "^26.5.2" - jest-matcher-utils "^26.5.2" - jest-message-util "^26.5.2" - jest-runtime "^26.5.2" - jest-snapshot "^26.5.2" - jest-util "^26.5.2" - pretty-format "^26.5.2" + jest-each "^26.6.2" + jest-matcher-utils "^26.6.2" + jest-message-util "^26.6.2" + jest-runtime "^26.6.3" + jest-snapshot "^26.6.2" + jest-util "^26.6.2" + pretty-format "^26.6.2" throat "^5.0.0" -jest-leak-detector@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-26.5.2.tgz#83fcf9a4a6ef157549552cb4f32ca1d6221eea69" - integrity sha512-h7ia3dLzBFItmYERaLPEtEKxy3YlcbcRSjj0XRNJgBEyODuu+3DM2o62kvIFvs3PsaYoIIv+e+nLRI61Dj1CNw== +jest-leak-detector@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-26.6.2.tgz#7717cf118b92238f2eba65054c8a0c9c653a91af" + integrity sha512-i4xlXpsVSMeKvg2cEKdfhh0H39qlJlP5Ex1yQxwF9ubahboQYMgTtz5oML35AVA3B4Eu+YsmwaiKVev9KCvLxg== dependencies: jest-get-type "^26.3.0" - pretty-format "^26.5.2" + pretty-format "^26.6.2" -jest-matcher-utils@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-26.5.2.tgz#6aa2c76ce8b9c33e66f8856ff3a52bab59e6c85a" - integrity sha512-W9GO9KBIC4gIArsNqDUKsLnhivaqf8MSs6ujO/JDcPIQrmY+aasewweXVET8KdrJ6ADQaUne5UzysvF/RR7JYA== +jest-matcher-utils@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-26.6.2.tgz#8e6fd6e863c8b2d31ac6472eeb237bc595e53e7a" + integrity sha512-llnc8vQgYcNqDrqRDXWwMr9i7rS5XFiCwvh6DTP7Jqa2mqpcCBBlpCbn+trkG0KNhPu/h8rzyBkriOtBstvWhw== dependencies: chalk "^4.0.0" - jest-diff "^26.5.2" + jest-diff "^26.6.2" jest-get-type "^26.3.0" - pretty-format "^26.5.2" + pretty-format "^26.6.2" -jest-message-util@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-26.5.2.tgz#6c4c4c46dcfbabb47cd1ba2f6351559729bc11bb" - integrity sha512-Ocp9UYZ5Jl15C5PNsoDiGEk14A4NG0zZKknpWdZGoMzJuGAkVt10e97tnEVMYpk7LnQHZOfuK2j/izLBMcuCZw== +jest-message-util@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-26.6.2.tgz#58173744ad6fc0506b5d21150b9be56ef001ca07" + integrity sha512-rGiLePzQ3AzwUshu2+Rn+UMFk0pHN58sOG+IaJbk5Jxuqo3NYO1U2/MIR4S1sKgsoYSXSzdtSa0TgrmtUwEbmA== dependencies: "@babel/code-frame" "^7.0.0" - "@jest/types" "^26.5.2" + "@jest/types" "^26.6.2" "@types/stack-utils" "^2.0.0" chalk "^4.0.0" graceful-fs "^4.2.4" micromatch "^4.0.2" + pretty-format "^26.6.2" slash "^3.0.0" stack-utils "^2.0.2" -jest-mock@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-26.5.2.tgz#c9302e8ef807f2bfc749ee52e65ad11166a1b6a1" - integrity sha512-9SiU4b5PtO51v0MtJwVRqeGEroH66Bnwtq4ARdNP7jNXbpT7+ByeWNAk4NeT/uHfNSVDXEXgQo1XRuwEqS6Rdw== +jest-mock@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-26.6.2.tgz#d6cb712b041ed47fe0d9b6fc3474bc6543feb302" + integrity sha512-YyFjePHHp1LzpzYcmgqkJ0nm0gg/lJx2aZFzFy1S6eUqNjXsOqTK10zNRff2dNfssgokjkG65OlWNcIlgd3zew== dependencies: - "@jest/types" "^26.5.2" + "@jest/types" "^26.6.2" "@types/node" "*" jest-pnp-resolver@^1.2.2: @@ -5589,183 +5532,172 @@ 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.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-26.5.2.tgz#ee30b7cfea81c81bf5e195a9287d7ec07f893170" - integrity sha512-LLkc8LuRtxqOx0AtX/Npa2C4I23WcIrwUgNtHYXg4owYF/ZDQShcwBAHjYZIFR06+HpQcZ43+kCTMlQ3aDCYTg== +jest-resolve-dependencies@^26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-26.6.3.tgz#6680859ee5d22ee5dcd961fe4871f59f4c784fb6" + integrity sha512-pVwUjJkxbhe4RY8QEWzN3vns2kqyuldKpxlxJlzEYfKSvY6/bMvxoFrYYzUO1Gx28yKWN37qyV7rIoIp2h8fTg== dependencies: - "@jest/types" "^26.5.2" + "@jest/types" "^26.6.2" jest-regex-util "^26.0.0" - jest-snapshot "^26.5.2" + jest-snapshot "^26.6.2" -jest-resolve@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-26.5.2.tgz#0d719144f61944a428657b755a0e5c6af4fc8602" - integrity sha512-XsPxojXGRA0CoDD7Vis59ucz2p3cQFU5C+19tz3tLEAlhYKkK77IL0cjYjikY9wXnOaBeEdm1rOgSJjbZWpcZg== +jest-resolve@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-26.6.2.tgz#a3ab1517217f469b504f1b56603c5bb541fbb507" + integrity sha512-sOxsZOq25mT1wRsfHcbtkInS+Ek7Q8jCHUB0ZUTP0tc/c41QHriU/NunqMfCUWsL4H3MHpvQD4QR9kSYhS7UvQ== dependencies: - "@jest/types" "^26.5.2" + "@jest/types" "^26.6.2" chalk "^4.0.0" graceful-fs "^4.2.4" jest-pnp-resolver "^1.2.2" - jest-util "^26.5.2" + jest-util "^26.6.2" read-pkg-up "^7.0.1" - resolve "^1.17.0" + resolve "^1.18.1" slash "^3.0.0" -jest-runner@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-26.5.2.tgz#4f9e6b0bb7eb4710c209a9e145b8a10894f4c19f" - integrity sha512-GKhYxtSX5+tXZsd2QwfkDqPIj5C2HqOdXLRc2x2qYqWE26OJh17xo58/fN/mLhRkO4y6o60ZVloan7Kk5YA6hg== +jest-runner@^26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-26.6.3.tgz#2d1fed3d46e10f233fd1dbd3bfaa3fe8924be159" + integrity sha512-atgKpRHnaA2OvByG/HpGA4g6CSPS/1LK0jK3gATJAoptC1ojltpmVlYC3TYgdmGp+GLuhzpH30Gvs36szSL2JQ== dependencies: - "@jest/console" "^26.5.2" - "@jest/environment" "^26.5.2" - "@jest/test-result" "^26.5.2" - "@jest/types" "^26.5.2" + "@jest/console" "^26.6.2" + "@jest/environment" "^26.6.2" + "@jest/test-result" "^26.6.2" + "@jest/types" "^26.6.2" "@types/node" "*" chalk "^4.0.0" emittery "^0.7.1" exit "^0.1.2" graceful-fs "^4.2.4" - jest-config "^26.5.2" + jest-config "^26.6.3" jest-docblock "^26.0.0" - jest-haste-map "^26.5.2" - jest-leak-detector "^26.5.2" - jest-message-util "^26.5.2" - jest-resolve "^26.5.2" - jest-runtime "^26.5.2" - jest-util "^26.5.2" - jest-worker "^26.5.0" + jest-haste-map "^26.6.2" + jest-leak-detector "^26.6.2" + jest-message-util "^26.6.2" + jest-resolve "^26.6.2" + jest-runtime "^26.6.3" + jest-util "^26.6.2" + jest-worker "^26.6.2" source-map-support "^0.5.6" throat "^5.0.0" -jest-runtime@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-26.5.2.tgz#b72f5f79eb2fe0c46bfef4cdb9c1e01d1c69ba41" - integrity sha512-zArr4DatX/Sn0wswX/AnAuJgmwgAR5rNtrUz36HR8BfMuysHYNq5sDbYHuLC4ICyRdy5ae/KQ+sczxyS9G6Qvw== - dependencies: - "@jest/console" "^26.5.2" - "@jest/environment" "^26.5.2" - "@jest/fake-timers" "^26.5.2" - "@jest/globals" "^26.5.2" - "@jest/source-map" "^26.5.0" - "@jest/test-result" "^26.5.2" - "@jest/transform" "^26.5.2" - "@jest/types" "^26.5.2" +jest-runtime@^26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-26.6.3.tgz#4f64efbcfac398331b74b4b3c82d27d401b8fa2b" + integrity sha512-lrzyR3N8sacTAMeonbqpnSka1dHNux2uk0qqDXVkMv2c/A3wYnvQ4EXuI013Y6+gSKSCxdaczvf4HF0mVXHRdw== + dependencies: + "@jest/console" "^26.6.2" + "@jest/environment" "^26.6.2" + "@jest/fake-timers" "^26.6.2" + "@jest/globals" "^26.6.2" + "@jest/source-map" "^26.6.2" + "@jest/test-result" "^26.6.2" + "@jest/transform" "^26.6.2" + "@jest/types" "^26.6.2" "@types/yargs" "^15.0.0" chalk "^4.0.0" + cjs-module-lexer "^0.6.0" collect-v8-coverage "^1.0.0" exit "^0.1.2" glob "^7.1.3" graceful-fs "^4.2.4" - jest-config "^26.5.2" - jest-haste-map "^26.5.2" - jest-message-util "^26.5.2" - jest-mock "^26.5.2" + jest-config "^26.6.3" + jest-haste-map "^26.6.2" + jest-message-util "^26.6.2" + jest-mock "^26.6.2" jest-regex-util "^26.0.0" - jest-resolve "^26.5.2" - jest-snapshot "^26.5.2" - jest-util "^26.5.2" - jest-validate "^26.5.2" + jest-resolve "^26.6.2" + jest-snapshot "^26.6.2" + jest-util "^26.6.2" + jest-validate "^26.6.2" slash "^3.0.0" strip-bom "^4.0.0" yargs "^15.4.1" -jest-serializer@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-26.5.0.tgz#f5425cc4c5f6b4b355f854b5f0f23ec6b962bc13" - integrity sha512-+h3Gf5CDRlSLdgTv7y0vPIAoLgX/SI7T4v6hy+TEXMgYbv+ztzbg5PSN6mUXAT/hXYHvZRWm+MaObVfqkhCGxA== +jest-serializer@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-26.6.2.tgz#d139aafd46957d3a448f3a6cdabe2919ba0742d1" + integrity sha512-S5wqyz0DXnNJPd/xfIzZ5Xnp1HrJWBczg8mMfMpN78OJ5eDxXyf+Ygld9wX1DnUWbIbhM1YDY95NjR4CBXkb2g== dependencies: "@types/node" "*" graceful-fs "^4.2.4" -jest-snapshot@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-26.5.2.tgz#0cf7642eaf8e8d2736bd443f619959bf237f9ccf" - integrity sha512-MkXIDvEefzDubI/WaDVSRH4xnkuirP/Pz8LhAIDXcVQTmcEfwxywj5LGwBmhz+kAAIldA7XM4l96vbpzltSjqg== +jest-snapshot@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-26.6.2.tgz#f3b0af1acb223316850bd14e1beea9837fb39c84" + integrity sha512-OLhxz05EzUtsAmOMzuupt1lHYXCNib0ECyuZ/PZOx9TrZcC8vL0x+DUG3TL+GLX3yHG45e6YGjIm0XwDc3q3og== dependencies: "@babel/types" "^7.0.0" - "@jest/types" "^26.5.2" + "@jest/types" "^26.6.2" "@types/babel__traverse" "^7.0.4" "@types/prettier" "^2.0.0" chalk "^4.0.0" - expect "^26.5.2" + expect "^26.6.2" graceful-fs "^4.2.4" - jest-diff "^26.5.2" + jest-diff "^26.6.2" jest-get-type "^26.3.0" - jest-haste-map "^26.5.2" - jest-matcher-utils "^26.5.2" - jest-message-util "^26.5.2" - jest-resolve "^26.5.2" + jest-haste-map "^26.6.2" + jest-matcher-utils "^26.6.2" + jest-message-util "^26.6.2" + jest-resolve "^26.6.2" natural-compare "^1.4.0" - pretty-format "^26.5.2" + pretty-format "^26.6.2" semver "^7.3.2" -jest-util@^26.1.0: - version "26.3.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.3.0.tgz#a8974b191df30e2bf523ebbfdbaeb8efca535b3e" - integrity sha512-4zpn6bwV0+AMFN0IYhH/wnzIQzRaYVrz1A8sYnRnj4UXDXbOVtWmlaZkO9mipFqZ13okIfN87aDoJWB7VH6hcw== +jest-util@^26.1.0, jest-util@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.6.2.tgz#907535dbe4d5a6cb4c47ac9b926f6af29576cbc1" + integrity sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q== dependencies: - "@jest/types" "^26.3.0" + "@jest/types" "^26.6.2" "@types/node" "*" chalk "^4.0.0" graceful-fs "^4.2.4" is-ci "^2.0.0" micromatch "^4.0.2" -jest-util@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.5.2.tgz#8403f75677902cc52a1b2140f568e91f8ed4f4d7" - integrity sha512-WTL675bK+GSSAYgS8z9FWdCT2nccO1yTIplNLPlP0OD8tUk/H5IrWKMMRudIQQ0qp8bb4k+1Qa8CxGKq9qnYdg== +jest-validate@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-26.6.2.tgz#23d380971587150467342911c3d7b4ac57ab20ec" + integrity sha512-NEYZ9Aeyj0i5rQqbq+tpIOom0YS1u2MVu6+euBsvpgIme+FOfRmoC4R5p0JiAUpaFvFy24xgrpMknarR/93XjQ== dependencies: - "@jest/types" "^26.5.2" - "@types/node" "*" - chalk "^4.0.0" - graceful-fs "^4.2.4" - is-ci "^2.0.0" - micromatch "^4.0.2" - -jest-validate@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-26.5.2.tgz#7ea266700b64234cd1c0cee982490c5a80e9b0f0" - integrity sha512-FmJks0zY36mp6Af/5sqO6CTL9bNMU45yKCJk3hrz8d2aIqQIlN1pr9HPIwZE8blLaewOla134nt5+xAmWsx3SQ== - dependencies: - "@jest/types" "^26.5.2" + "@jest/types" "^26.6.2" camelcase "^6.0.0" chalk "^4.0.0" jest-get-type "^26.3.0" leven "^3.1.0" - pretty-format "^26.5.2" + pretty-format "^26.6.2" -jest-watcher@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-26.5.2.tgz#2957f4461007e0769d74b537379ecf6b7c696916" - integrity sha512-i3m1NtWzF+FXfJ3ljLBB/WQEp4uaNhX7QcQUWMokcifFTUQBDFyUMEwk0JkJ1kopHbx7Een3KX0Q7+9koGM/Pw== +jest-watcher@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-26.6.2.tgz#a5b683b8f9d68dbcb1d7dae32172d2cca0592975" + integrity sha512-WKJob0P/Em2csiVthsI68p6aGKTIcsfjH9Gsx1f0A3Italz43e3ho0geSAVsmj09RWOELP1AZ/DXyJgOgDKxXQ== dependencies: - "@jest/test-result" "^26.5.2" - "@jest/types" "^26.5.2" + "@jest/test-result" "^26.6.2" + "@jest/types" "^26.6.2" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" - jest-util "^26.5.2" + jest-util "^26.6.2" string-length "^4.0.1" -jest-worker@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.5.0.tgz#87deee86dbbc5f98d9919e0dadf2c40e3152fa30" - integrity sha512-kTw66Dn4ZX7WpjZ7T/SUDgRhapFRKWmisVAF0Rv4Fu8SLFD7eLbqpLvbxVqYhSgaWa7I+bW7pHnbyfNsH6stug== +jest-worker@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" + integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ== dependencies: "@types/node" "*" merge-stream "^2.0.0" supports-color "^7.0.0" -jest@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/jest/-/jest-26.5.2.tgz#c6791642b331fe7abd2f993b0a74aa546f7be0fb" - integrity sha512-4HFabJVwsgDwul/7rhXJ3yFAF/aUkVIXiJWmgFxb+WMdZG39fVvOwYAs8/3r4AlFPc4m/n5sTMtuMbOL3kNtrQ== +jest@^26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/jest/-/jest-26.6.3.tgz#40e8fdbe48f00dfa1f0ce8121ca74b88ac9148ef" + integrity sha512-lGS5PXGAzR4RF7V5+XObhqz2KZIDUA1yD0DG6pBVmy10eh0ZIXQImRuzocsI/N2XZ1GrLFwTS27In2i2jlpq1Q== dependencies: - "@jest/core" "^26.5.2" + "@jest/core" "^26.6.3" import-local "^3.0.2" - jest-cli "^26.5.2" + jest-cli "^26.6.3" js-tokens@^4.0.0: version "4.0.0" @@ -5773,9 +5705,9 @@ js-tokens@^4.0.0: integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== js-yaml@^3.13.1: - version "3.14.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" - integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== dependencies: argparse "^1.0.7" esprima "^4.0.0" @@ -5823,11 +5755,11 @@ jsesc@^2.5.1: integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== json-fixer@^1.5.1: - version "1.6.3" - resolved "https://registry.yarnpkg.com/json-fixer/-/json-fixer-1.6.3.tgz#1beaf69b137ed3588b8fdb5a5a507f4b3f276fe4" - integrity sha512-JSjfJJaKCQpSNEh+Tw1lX2L8MnDjIxfBpPTWUO/XN0JUY87nHJiFBy5i0Tm8o7/841LWfMDbqhn7UjhkjrZKkw== + version "1.6.8" + resolved "https://registry.yarnpkg.com/json-fixer/-/json-fixer-1.6.8.tgz#4a1930af55ca0baa410c3a2cdf2b065ba87121ed" + integrity sha512-VUI3GPVLpM/nYmM1tSuvd3kh36eWvoNO1SFveVQf5k9QJI3kfaoOPVbN7WbpRfvZqa2BFySyVuqSs57laYfIDQ== dependencies: - "@babel/runtime" "^7.11.0" + "@babel/runtime" "^7.12.5" chalk "^4.1.0" pegjs "^0.10.0" @@ -5836,11 +5768,21 @@ json-parse-better-errors@^1.0.0, json-parse-better-errors@^1.0.1, json-parse-bet resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== +json-parse-even-better-errors@^2.3.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== + json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== +json-schema-traverse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" + integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== + json-schema@0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" @@ -5864,9 +5806,9 @@ json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= json5@2.x, json5@^2.1.2: - version "2.1.3" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.3.tgz#c9b0f7fa9233bfe5807fe66fcf3a5617ed597d43" - integrity sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA== + version "2.2.0" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3" + integrity sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA== dependencies: minimist "^1.2.5" @@ -5885,11 +5827,11 @@ jsonfile@^4.0.0: graceful-fs "^4.1.6" jsonfile@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.0.1.tgz#98966cba214378c8c84b82e085907b40bf614179" - integrity sha512-jR2b5v7d2vIOust+w3wtFKZIfpC2pnRmFAhAC/BuweZFQR8qZzxH1OyrQ10HmdVYiXWkYUqPVsz91cG7EL2FBg== + version "6.1.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== dependencies: - universalify "^1.0.0" + universalify "^2.0.0" optionalDependencies: graceful-fs "^4.1.6" @@ -5903,10 +5845,10 @@ jsonparse@^1.2.0: resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" integrity sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA= -jsonschema@^1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.2.11.tgz#7a799cc2aa5a285d893203e8dc81f5becbfb0e91" - integrity sha512-XNZHs3N1IOa3lPKm//npxMhOdaoPw+MvEV0NIgxcER83GTJcG13rehtWmpBCfEt8DrtYwIkMTs8bdXoYs4fvnQ== +jsonschema@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.4.0.tgz#1afa34c4bc22190d8e42271ec17ac8b3404f87b2" + integrity sha512-/YgW6pRMr6M7C+4o8kS+B/2myEpHCrxO4PEWnqJNBFMjn7EWXqlQ4tGwL6xTHeRplwuZmcAncdvfOad1nT2yMw== jsprim@^1.2.2: version "1.4.1" @@ -6039,28 +5981,10 @@ load-json-file@^5.3.0: strip-bom "^3.0.0" type-fest "^0.3.0" -loader-runner@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.1.0.tgz#f70bc0c29edbabdf2043e7ee73ccc3fe1c96b42d" - integrity sha512-oR4lB4WvwFoC70ocraKhn5nkKSs23t57h9udUgw8o0iH8hMXeEoRuUgfcvgUwAJ1ZpRqBvcou4N2SMvM1DwMrA== - -loader-utils@^1.1.0, loader-utils@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.0.tgz#c579b5e34cb34b1a74edc6c1fb36bfa371d5a613" - integrity sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA== - dependencies: - big.js "^5.2.2" - emojis-list "^3.0.0" - json5 "^1.0.1" - -loader-utils@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.0.tgz#e4cace5b816d425a166b5f097e10cd12b36064b0" - integrity sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ== - dependencies: - big.js "^5.2.2" - emojis-list "^3.0.0" - json5 "^2.1.2" +loader-runner@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.2.0.tgz#d7022380d66d14c5fb1d496b89864ebcfd478384" + integrity sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw== locate-path@^2.0.0: version "2.0.0" @@ -6085,6 +6009,13 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + lodash._reinterpolate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" @@ -6105,11 +6036,6 @@ lodash.ismatch@^4.4.0: resolved "https://registry.yarnpkg.com/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz#756cb5150ca3ba6f11085a78849645f188f85f37" integrity sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc= -lodash.memoize@4.x: - version "4.1.2" - resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" - integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4= - lodash.set@^4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/lodash.set/-/lodash.set-4.3.2.tgz#d8757b1da807dde24816b0d6a84bea1a76230b23" @@ -6140,7 +6066,7 @@ lodash.uniq@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= -lodash@^4.11.2, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.2.1: +lodash@4.x, lodash@^4.11.2, lodash@^4.17.12, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.2.1: version "4.17.20" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== @@ -6156,11 +6082,6 @@ log4js@^6.3.0: rfdc "^1.1.4" streamroller "^2.2.4" -long@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b" - integrity sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s= - loud-rejection@^1.0.0: version "1.6.0" resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" @@ -6203,7 +6124,7 @@ make-dir@^2.1.0: pify "^4.0.1" semver "^5.6.0" -make-dir@^3.0.0, make-dir@^3.0.2: +make-dir@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== @@ -6271,14 +6192,6 @@ mdurl@~1.0.1: resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" integrity sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4= -memory-fs@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.5.0.tgz#324c01288b88652966d161db77838720845a8e3c" - integrity sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA== - dependencies: - errno "^0.1.3" - readable-stream "^2.0.1" - memory-streams@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/memory-streams/-/memory-streams-0.1.3.tgz#d9b0017b4b87f1d92f55f2745c9caacb1dc93ceb" @@ -6317,22 +6230,22 @@ meow@^4.0.0: redent "^2.0.0" trim-newlines "^2.0.0" -meow@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/meow/-/meow-7.1.0.tgz#50ecbcdafa16f8b58fb7eb9675b933f6473b3a59" - integrity sha512-kq5F0KVteskZ3JdfyQFivJEj2RaA8NFsS4+r9DaMKLcUHpk5OcHS3Q0XkCXONB1mZRPsu/Y/qImKri0nwSEZog== +meow@^8.0.0: + version "8.1.2" + resolved "https://registry.yarnpkg.com/meow/-/meow-8.1.2.tgz#bcbe45bda0ee1729d350c03cffc8395a36c4e897" + integrity sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q== dependencies: "@types/minimist" "^1.2.0" camelcase-keys "^6.2.2" decamelize-keys "^1.1.0" hard-rejection "^2.1.0" minimist-options "4.1.0" - normalize-package-data "^2.5.0" + normalize-package-data "^3.0.0" read-pkg-up "^7.0.1" redent "^3.0.0" trim-newlines "^3.0.0" - type-fest "^0.13.1" - yargs-parser "^18.1.3" + type-fest "^0.18.0" + yargs-parser "^20.2.3" merge-stream@^2.0.0: version "2.0.0" @@ -6344,7 +6257,7 @@ merge2@^1.2.3, merge2@^1.3.0: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== -micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4: +micromatch@^3.1.10, micromatch@^3.1.4: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== @@ -6371,17 +6284,17 @@ micromatch@^4.0.2: braces "^3.0.1" picomatch "^2.0.5" -mime-db@1.44.0: - version "1.44.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" - integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== +mime-db@1.45.0: + version "1.45.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.45.0.tgz#cceeda21ccd7c3a745eba2decd55d4b73e7879ea" + integrity sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w== mime-types@^2.1.12, mime-types@^2.1.27, mime-types@~2.1.19: - version "2.1.27" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" - integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== + version "2.1.28" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.28.tgz#1160c4757eab2c5363888e005273ecf79d2a0ecd" + integrity sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ== dependencies: - mime-db "1.44.0" + mime-db "1.45.0" mimic-fn@^1.0.0: version "1.2.0" @@ -6427,27 +6340,6 @@ minimist@>=1.2.2, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@^1 resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== -minipass-collect@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-1.0.2.tgz#22b813bf745dc6edba2576b940022ad6edc8c617" - integrity sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA== - dependencies: - minipass "^3.0.0" - -minipass-flush@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/minipass-flush/-/minipass-flush-1.0.5.tgz#82e7135d7e89a50ffe64610a787953c4c4cbb373" - integrity sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw== - dependencies: - minipass "^3.0.0" - -minipass-pipeline@^1.2.2: - version "1.2.4" - resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz#68472f79711c084657c067c5c6ad93cddea8214c" - integrity sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A== - dependencies: - minipass "^3.0.0" - minipass@^2.3.5, minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" @@ -6456,7 +6348,7 @@ minipass@^2.3.5, minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: safe-buffer "^5.1.2" yallist "^3.0.0" -minipass@^3.0.0, minipass@^3.1.1: +minipass@^3.0.0: version "3.1.3" resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.3.tgz#7d42ff1f39635482e15f9cdb53184deebd5815fd" integrity sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg== @@ -6509,7 +6401,7 @@ mkdirp-promise@^5.0.1: dependencies: mkdirp "*" -mkdirp@*, mkdirp@1.x, mkdirp@^1.0.3, mkdirp@^1.0.4: +mkdirp@*, mkdirp@1.x, mkdirp@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== @@ -6548,11 +6440,16 @@ ms@2.0.0: resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= -ms@^2.0.0, ms@^2.1.1: +ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +ms@^2.0.0, ms@^2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + multimatch@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-3.0.0.tgz#0e2534cc6bc238d9ab67e1b9cd5fcd85a6dbf70b" @@ -6623,7 +6520,7 @@ node-fetch-npm@^2.0.2: json-parse-better-errors "^1.0.0" safe-buffer "^5.1.1" -node-fetch@^2.3.0, node-fetch@^2.5.0, node-fetch@^2.6.0: +node-fetch@^2.5.0, node-fetch@^2.6.0, node-fetch@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== @@ -6656,9 +6553,9 @@ node-modules-regexp@^1.0.0: integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= 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== + version "8.0.1" + resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-8.0.1.tgz#f86e89bbc925f2b068784b31f382afdc6ca56be1" + integrity sha512-BvEXF+UmsnAfYfoapKM9nGxnP+Wn7P91YfXmrKnfcYCx6VBeoN5Ez5Ogck6I8Bi5k4RlpqRYaw75pAwzX9OphA== dependencies: growly "^1.3.0" is-wsl "^2.2.0" @@ -6667,10 +6564,10 @@ node-notifier@^8.0.0: uuid "^8.3.0" which "^2.0.2" -node-releases@^1.1.61: - version "1.1.61" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.61.tgz#707b0fca9ce4e11783612ba4a2fcba09047af16e" - integrity sha512-DD5vebQLg8jLCOzwupn954fbIiZht05DAZs0k2u8NStSe6h9XdsuIQL8hSRKYiU8WUQRznmSDrKGbv3ObOmC7g== +node-releases@^1.1.70: + version "1.1.70" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.70.tgz#66e0ed0273aa65666d7fe78febe7634875426a08" + integrity sha512-Slf2s69+2/uAD79pVVQo8uSiC34+g8GWY8UH2Qtqv34ZfhYrxpYpfzs9Js9d6O0mbDmALuxaTlplnBTnSELcrw== nopt@^4.0.1: version "4.0.3" @@ -6690,6 +6587,16 @@ normalize-package-data@^2.0.0, normalize-package-data@^2.3.0, normalize-package- semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" +normalize-package-data@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-3.0.0.tgz#1f8a7c423b3d2e85eb36985eaf81de381d01301a" + integrity sha512-6lUjEI0d3v6kFrtgA/lOx4zHCWULXsFNIjHolnZCKCTLA6m/G625cdn3O7eNmT0iD3jfo6HZ9cdImGZwf21prw== + dependencies: + hosted-git-info "^3.0.6" + resolve "^1.17.0" + semver "^7.3.2" + validate-npm-package-license "^3.0.1" + normalize-path@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" @@ -6768,7 +6675,7 @@ npm-run-path@^2.0.0: dependencies: path-key "^2.0.0" -npm-run-path@^4.0.0: +npm-run-path@^4.0.0, npm-run-path@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== @@ -6819,18 +6726,18 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" -object-inspect@^1.7.0, object-inspect@^1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.8.0.tgz#df807e5ecf53a609cc6bfe93eac3cc7be5b3a9d0" - integrity sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA== +object-inspect@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.9.0.tgz#c90521d74e1127b67266ded3394ad6116986533a" + integrity sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw== -object-is@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.3.tgz#2e3b9e65560137455ee3bd62aec4d90a2ea1cc81" - integrity sha512-teyqLvFWzLkq5B9ki8FVWA902UER2qkxmdA4nLf+wjOLAWgxzCWZNCxpDq9MvE8MmhWNr+I8w3BN49Vx36Y6Xg== +object-is@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.4.tgz#63d6c83c00a43f4cbc9434eb9757c8a5b8565068" + integrity sha512-1ZvAZ4wlF7IyPVOcE1Omikt7UpaFlOQq0HlSti+ZvDH3UiD2brwGMwDbyV43jao2bKJ+4+WdPJHSd7kgzKYVqg== dependencies: + call-bind "^1.0.0" define-properties "^1.1.3" - es-abstract "^1.18.0-next.1" object-keys@^1.0.12, object-keys@^1.1.1: version "1.1.1" @@ -6844,23 +6751,24 @@ object-visit@^1.0.0: dependencies: isobject "^3.0.0" -object.assign@^4.1.0, object.assign@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.1.tgz#303867a666cdd41936ecdedfb1f8f3e32a478cdd" - integrity sha512-VT/cxmx5yaoHSOTSyrCygIDFco+RsibY2NM0a4RdEeY/4KgqezwFtK1yr3U67xYhqJSlASm2pKhLVzPj2lr4bA== +object.assign@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" + integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== dependencies: + call-bind "^1.0.0" define-properties "^1.1.3" - es-abstract "^1.18.0-next.0" has-symbols "^1.0.1" object-keys "^1.1.1" object.getownpropertydescriptors@^2.0.3: - version "2.1.0" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649" - integrity sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg== + version "2.1.1" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.1.tgz#0dfda8d108074d9c563e80490c883b6661091544" + integrity sha512-6DtXgZ/lIZ9hqx4GtZETobXLR/ZLaa0aqV0kzbn80Rf8Z2e/XFnhA0I7p07N2wH8bBBltr2xQPi6sbKWAY2Eng== dependencies: + call-bind "^1.0.0" define-properties "^1.1.3" - es-abstract "^1.17.0-next.1" + es-abstract "^1.18.0-next.1" object.pick@^1.3.0: version "1.3.0" @@ -6870,13 +6778,13 @@ object.pick@^1.3.0: isobject "^3.0.1" object.values@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.1.tgz#68a99ecde356b7e9295a3c5e0ce31dc8c953de5e" - integrity sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA== + version "1.1.2" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.2.tgz#7a2015e06fcb0f546bd652486ce8583a4731c731" + integrity sha512-MYC0jvJopr8EK6dPBiO8Nb9mvjdypOachO5REGk6MXzujbBrAisKo3HmdEI6kZDL6fC31Mwee/5YbtMebixeag== dependencies: + call-bind "^1.0.0" define-properties "^1.1.3" - es-abstract "^1.17.0-next.1" - function-bind "^1.1.1" + es-abstract "^1.18.0-next.1" has "^1.0.3" octokit-pagination-methods@^1.1.0: @@ -6898,7 +6806,7 @@ onetime@^2.0.0: dependencies: mimic-fn "^1.0.0" -onetime@^5.1.0: +onetime@^5.1.0, onetime@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== @@ -6956,9 +6864,9 @@ osenv@^0.1.4, osenv@^0.1.5: os-tmpdir "^1.0.0" p-each-series@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/p-each-series/-/p-each-series-2.1.0.tgz#961c8dd3f195ea96c747e636b262b800a6b1af48" - integrity sha512-ZuRs1miPT4HrjFa+9fRfOFXxGJfORgelKV9f9nNOWw2gl6gVsRaVDOQP0+MI0G0wGKns1Yacsu0GjOFbTK0JFQ== + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-each-series/-/p-each-series-2.2.0.tgz#105ab0357ce72b202a8a8b94933672657b5e2a9a" + integrity sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA== p-finally@^1.0.0: version "1.0.0" @@ -6979,12 +6887,12 @@ p-limit@^2.0.0, p-limit@^2.2.0: dependencies: p-try "^2.0.0" -p-limit@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.0.2.tgz#1664e010af3cadc681baafd3e2a437be7b0fb5fe" - integrity sha512-iwqZSOoWIW+Ew4kAGUlN16J4M7OB3ysMLSZtnhmqx7njIHFPlxWBX8xo3lVTyFVq6mI/lL9qt2IsN1sHwaxJkg== +p-limit@^3.0.2, p-limit@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== dependencies: - p-try "^2.0.0" + yocto-queue "^0.1.0" p-locate@^2.0.0: version "2.0.0" @@ -7007,6 +6915,13 @@ p-locate@^4.1.0: dependencies: p-limit "^2.2.0" +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + p-map-series@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-map-series/-/p-map-series-1.0.0.tgz#bf98fe575705658a9e1351befb85ae4c1f07bdca" @@ -7019,13 +6934,6 @@ p-map@^2.1.0: resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw== -p-map@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" - integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== - dependencies: - aggregate-error "^3.0.0" - p-pipe@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/p-pipe/-/p-pipe-1.2.0.tgz#4b1a11399a11520a67790ee5a0c1d5881d6befe9" @@ -7097,27 +7005,24 @@ parse-json@^4.0.0: json-parse-better-errors "^1.0.1" parse-json@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.0.1.tgz#7cfe35c1ccd641bce3981467e6c2ece61b3b3878" - integrity sha512-ztoZ4/DYeXQq4E21v169sC8qWINGpcosGv9XhTDvg9/hWvx/zrFkc9BiWxR58OJLHGk28j5BL0SDLeV2WmFZlQ== + version "5.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== dependencies: "@babel/code-frame" "^7.0.0" error-ex "^1.3.1" - json-parse-better-errors "^1.0.1" + json-parse-even-better-errors "^2.3.0" lines-and-columns "^1.1.6" -parse-passwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" - integrity sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY= - parse-path@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/parse-path/-/parse-path-4.0.2.tgz#ef14f0d3d77bae8dd4bc66563a4c151aac9e65aa" - integrity sha512-HSqVz6iuXSiL8C1ku5Gl1Z5cwDd9Wo0q8CoffdAghP6bz8pJa1tcMC+m4N+z6VAS8QdksnIGq1TB6EgR4vPR6w== + version "4.0.3" + resolved "https://registry.yarnpkg.com/parse-path/-/parse-path-4.0.3.tgz#82d81ec3e071dcc4ab49aa9f2c9c0b8966bb22bf" + integrity sha512-9Cepbp2asKnWTJ9x2kpw6Fe8y9JDbqwahGCTvklzd/cEq5C5JC59x2Xb0Kx+x0QZ8bvNquGO8/BWP0cwBHzSAA== dependencies: is-ssh "^1.3.0" protocols "^1.4.0" + qs "^6.9.4" + query-string "^6.13.8" parse-url@^5.0.0: version "5.0.2" @@ -7277,7 +7182,7 @@ pkg-dir@^3.0.0: dependencies: find-up "^3.0.0" -pkg-dir@^4.1.0, pkg-dir@^4.2.0: +pkg-dir@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== @@ -7306,30 +7211,20 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.1.2.tgz#3050700dae2e4c8b67c4c3f666cdb8af405e1ce5" - integrity sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg== - -pretty-format@^25.2.1, pretty-format@^25.5.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-25.5.0.tgz#7873c1d774f682c34b8d48b6743a2bf2ac55791a" - integrity sha512-kbo/kq2LQ/A/is0PQwsEHM7Ca6//bGPPvU6UnsdDRSKTWxT/ru/xb88v4BJf6a69H+uTytOEsTusT9ksd/1iWQ== - dependencies: - "@jest/types" "^25.5.0" - ansi-regex "^5.0.0" - ansi-styles "^4.0.0" - react-is "^16.12.0" +prettier@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5" + integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q== -pretty-format@^26.5.2: - version "26.5.2" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.5.2.tgz#5d896acfdaa09210683d34b6dc0e6e21423cd3e1" - integrity sha512-VizyV669eqESlkOikKJI8Ryxl/kPpbdLwNdPs2GrbQs18MpySB5S0Yo0N7zkg2xTRiFq4CFw8ct5Vg4a0xP0og== +pretty-format@^26.0.0, pretty-format@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.2.tgz#e35c2705f14cb7fe2fe94fa078345b444120fc93" + integrity sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg== dependencies: - "@jest/types" "^26.5.2" + "@jest/types" "^26.6.2" ansi-regex "^5.0.0" ansi-styles "^4.0.0" - react-is "^16.12.0" + react-is "^17.0.1" process-nextick-args@~2.0.0: version "2.0.1" @@ -7355,12 +7250,12 @@ promise-retry@^1.1.1: retry "^0.10.0" prompts@^2.0.1: - version "2.3.2" - resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.3.2.tgz#480572d89ecf39566d2bd3fe2c9fccb7c4c0b068" - integrity sha512-Q06uKs2CkNYVID0VqwfAl9mipo99zkBv/n2JtWY89Yxa3ZabWSrs0e2KTudKVa3peLUvYXMefDqIleLPVUBZMA== + version "2.4.0" + resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.0.tgz#4aa5de0723a231d1ee9121c40fdf663df73f61d7" + integrity sha512-awZAKrk3vN6CroQukBL+R9051a4R3zCZBlJm/HBfrSZ8iTpYix3VX1vU4mveiLpiwmOJT4wokTF9m6HUk4KqWQ== dependencies: kleur "^3.0.3" - sisteransi "^1.0.4" + sisteransi "^1.0.5" promzard@^0.3.0: version "0.3.0" @@ -7386,11 +7281,6 @@ protoduck@^5.0.1: dependencies: genfun "^5.0.0" -prr@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" - integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= - psl@^1.1.28: version "1.8.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" @@ -7431,11 +7321,31 @@ q@^1.5.1: resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= +qs@^6.9.4: + version "6.9.6" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.6.tgz#26ed3c8243a431b2924aca84cc90471f35d5a0ee" + integrity sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ== + qs@~6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== +query-string@^6.13.8: + version "6.14.0" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.14.0.tgz#0b7b7ca326f5facf10dd2d45d26645cd287f8c92" + integrity sha512-In3o+lUxlgejoVJgwEdYtdxrmlL0cQWJXj0+kkI7RWVo7hg5AhFtybeKlC9Dpgbr8eOC4ydpEh8017WwyfzqVQ== + dependencies: + decode-uri-component "^0.2.0" + filter-obj "^1.1.0" + split-on-first "^1.0.0" + strict-uri-encode "^2.0.0" + +queue-microtask@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.2.tgz#abf64491e6ecf0f38a6502403d4cda04f372dfd3" + integrity sha512-dB15eXv3p2jDlbOiNLyMabYg1/sXvppd8DP2J3EOCQ0AkuSXCW2tP7mnVouVLJKgUMY6yP0kcQDVpLCN13h4Xg== + quick-lru@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8" @@ -7453,10 +7363,10 @@ randombytes@^2.1.0: dependencies: safe-buffer "^5.1.0" -react-is@^16.12.0: - version "16.13.1" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" - integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== +react-is@^17.0.1: + version "17.0.1" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.1.tgz#5b3531bd76a645a4c9fb6e693ed36419e3301339" + integrity sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA== read-cmd-shim@^1.0.1: version "1.0.5" @@ -7466,16 +7376,14 @@ read-cmd-shim@^1.0.1: graceful-fs "^4.1.2" "read-package-json@1 || 2", read-package-json@^2.0.0, read-package-json@^2.0.13: - version "2.1.1" - resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-2.1.1.tgz#16aa66c59e7d4dad6288f179dd9295fd59bb98f1" - integrity sha512-dAiqGtVc/q5doFz6096CcnXhpYk0ZN8dEKVkGLU0CsASt8SrgF6SF7OTKAYubfvFhWaqofl+Y8HK19GR8jwW+A== + version "2.1.2" + resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-2.1.2.tgz#6992b2b66c7177259feb8eaac73c3acd28b9222a" + integrity sha512-D1KmuLQr6ZSJS0tW8hf3WGpRlwszJOXZ3E8Yd/DNRaM5d+1wVRZdHlpGBLAuovjr28LbWvjpWkBHMxpRGGjzNA== dependencies: glob "^7.1.1" - json-parse-better-errors "^1.0.1" + json-parse-even-better-errors "^2.3.0" normalize-package-data "^2.0.0" npm-normalize-package-bin "^1.0.0" - optionalDependencies: - graceful-fs "^4.1.2" read-package-tree@^5.1.6: version "5.3.1" @@ -7563,7 +7471,7 @@ read@1, read@~1.0.1: dependencies: mute-stream "~0.0.4" -"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.6, readable-stream@~2.3.6: +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.6, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -7576,7 +7484,7 @@ read@1, read@~1.0.1: string_decoder "~1.1.1" util-deprecate "~1.0.1" -"readable-stream@2 || 3", readable-stream@^3.0.2: +"readable-stream@2 || 3", readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -7612,6 +7520,13 @@ rechoir@^0.6.2: dependencies: resolve "^1.1.6" +rechoir@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.7.0.tgz#32650fd52c21ab252aa5d65b19310441c7e03aca" + integrity sha512-ADsDEH2bvbjltXEP+hTIAmeFekTFK0V2BTxMkok6qILyAJEXV0AFfoWcAq4yfll5VdIMd/RVXq0lR+wQi5ZU3Q== + dependencies: + resolve "^1.9.0" + redent@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" @@ -7650,12 +7565,12 @@ regex-not@^1.0.0, regex-not@^1.0.2: safe-regex "^1.1.0" regexp.prototype.flags@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz#7aba89b3c13a64509dabcf3ca8d9fbb9bdf5cb75" - integrity sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ== + version "1.3.1" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz#7ef352ae8d159e758c0eadca6f8fcb4eef07be26" + integrity sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA== dependencies: + call-bind "^1.0.2" define-properties "^1.1.3" - es-abstract "^1.17.0-next.1" regexpp@^3.0.0, regexpp@^3.1.0: version "3.1.0" @@ -7731,6 +7646,11 @@ require-directory@^2.1.1: resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= +require-from-string@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + require-main-filename@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" @@ -7750,14 +7670,6 @@ resolve-cwd@^3.0.0: dependencies: resolve-from "^5.0.0" -resolve-dir@^1.0.0, resolve-dir@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43" - integrity sha1-eaQGRMNivoLybv/nOcm7U4IEb0M= - dependencies: - expand-tilde "^2.0.0" - global-modules "^1.0.0" - resolve-from@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" @@ -7778,11 +7690,12 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.3.2: - version "1.17.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" - integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.18.1, resolve@^1.9.0: + version "1.19.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" + integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== dependencies: + is-core-module "^2.1.0" path-parse "^1.0.6" restore-cursor@^2.0.0: @@ -7817,16 +7730,9 @@ reusify@^1.0.4: integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== rfdc@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.1.4.tgz#ba72cc1367a0ccd9cf81a870b3b58bd3ad07f8c2" - integrity sha512-5C9HXdzK8EAqN7JDif30jqsBzavB7wLpaubisuQIGHWf2gUXSpzy6ArX/+Da8RjFpagWsCn+pIgxTMAmKw9Zug== - -rimraf@2.6.3: - version "2.6.3" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" - integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== - dependencies: - glob "^7.1.3" + version "1.2.0" + resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.2.0.tgz#9e9894258f48f284b43c3143c68070a4f373b949" + integrity sha512-ijLyszTMmUrXvjSooucVQwimGUk84eRcmCuLV8Xghe3UO85mjUtRAHRyoMM6XtyqbECaXuBWx18La3523sXINA== rimraf@^2.5.4, rimraf@^2.6.2, rimraf@^2.6.3: version "2.7.1" @@ -7853,9 +7759,11 @@ run-async@^2.2.0, run-async@^2.4.0: integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== run-parallel@^1.1.9: - version "1.1.9" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.9.tgz#c9dd3a7cf9f4b2c4b6244e173a6ed866e61dd679" - integrity sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q== + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" run-queue@^1.0.0, run-queue@^1.0.3: version "1.0.3" @@ -7865,9 +7773,9 @@ run-queue@^1.0.0, run-queue@^1.0.3: aproba "^1.1.1" rxjs@^6.4.0, rxjs@^6.6.0: - version "6.6.2" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.2.tgz#8096a7ac03f2cc4fe5860ef6e572810d9e01c0d2" - integrity sha512-BHdBMVoWC2sL26w//BCu3YzKT4s2jip/WhwsGEDmeKYBhKDZeYezVUnHatYB7L85v5xs0BAQmg6BEYJEKxBabg== + version "6.6.3" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.3.tgz#8ca84635c4daa900c0d3967a6ee7ac60271ee552" + integrity sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ== dependencies: tslib "^1.9.0" @@ -7936,10 +7844,12 @@ semver-intersect@^1.4.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -semver@7.x, semver@^7.1.1, semver@^7.2.1, semver@^7.3.2: - version "7.3.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" - integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== +semver@7.x, semver@^7.1.1, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4: + version "7.3.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" + integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== + dependencies: + lru-cache "^6.0.0" semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: version "6.3.0" @@ -8014,19 +7924,20 @@ shellwords@^0.1.1: integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww== side-channel@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.3.tgz#cdc46b057550bbab63706210838df5d4c19519c3" - integrity sha512-A6+ByhlLkksFoUepsGxfj5x1gTSrs+OydsRptUxeNCabQpCFUvcwIczgOigI8vhY/OJCnPnyE9rGiwgvr9cS1g== + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== dependencies: - es-abstract "^1.18.0-next.0" - object-inspect "^1.8.0" + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" -signal-exit@^3.0.0, signal-exit@^3.0.2: +signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== -sisteransi@^1.0.4: +sisteransi@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== @@ -8041,14 +7952,14 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== -slice-ansi@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" - integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ== +slice-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" + integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== dependencies: - ansi-styles "^3.2.0" - astral-regex "^1.0.0" - is-fullwidth-code-point "^2.0.0" + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" slide@^1.1.6: version "1.1.6" @@ -8122,22 +8033,24 @@ sort-keys@^2.0.0: dependencies: is-plain-obj "^1.0.0" -source-list-map@^2.0.0, source-list-map@^2.0.1: +source-list-map@^2.0.1: version "2.0.1" 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.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/source-map-loader/-/source-map-loader-1.1.1.tgz#1dd964294cfcc3d9bab65f46af97a38d8ae0c65d" - integrity sha512-m2HjSWP2R1yR9P31e4+ciGHFOPvW6GmqHgZkneOkrME2VvWysXTGi4o0yS28iKWWP3vAUmAoa+3x5ZRI2BIX6A== +source-map-js@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-0.6.2.tgz#0bb5de631b41cfbda6cfba8bd05a80efdfd2385e" + integrity sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug== + +source-map-loader@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/source-map-loader/-/source-map-loader-2.0.1.tgz#b4fd0ae7fa7e7d3954300f383f2d6fcc230a4261" + integrity sha512-UzOTTQhoNPeTNzOxwFw220RSRzdGSyH4lpNyWjR7Qm34P4/N0W669YSUFdH07+YNeN75h765XLHmNsF/bm97RQ== dependencies: abab "^2.0.5" iconv-lite "^0.6.2" - loader-utils "^2.0.0" - schema-utils "^3.0.0" - source-map "^0.6.1" - whatwg-mimetype "^2.3.0" + source-map-js "^0.6.2" source-map-resolve@^0.5.0: version "0.5.3" @@ -8159,9 +8072,9 @@ source-map-support@^0.5.17, source-map-support@^0.5.6, source-map-support@~0.5.1 source-map "^0.6.0" source-map-url@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" - integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= + version "0.4.1" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.1.tgz#0af66605a745a5a2f91cf1bbf8a7afbc283dec56" + integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw== source-map@^0.5.0, source-map@^0.5.6: version "0.5.7" @@ -8200,14 +8113,19 @@ spdx-expression-parse@^3.0.0: spdx-license-ids "^3.0.0" spdx-license-ids@^3.0.0: - version "3.0.5" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" - integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q== + version "3.0.7" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz#e9c18a410e5ed7e12442a549fbd8afa767038d65" + integrity sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ== -spdx-license-list@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/spdx-license-list/-/spdx-license-list-6.3.0.tgz#29507bdd88e5f1dcf62634d3c7f9051245e7ef07" - integrity sha512-Qz8ru5VVK5T4cFOBrshIzggzrQ15fVBcpjpZLCVz2j9KNnpslGbw8w1r06v2vi6YP6bnUSY5CXsFCfUypLZ2GA== +spdx-license-list@^6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/spdx-license-list/-/spdx-license-list-6.4.0.tgz#9850c3699c1d35745285607d064d2a5145049d12" + integrity sha512-4BxgJ1IZxTJuX1YxMGu2cRYK46Bk9zJNTK2/R0wNZR0cm+6SVl26/uG7FQmQtxoJQX1uZ0EpTi2L7zvMLboaBA== + +split-on-first@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/split-on-first/-/split-on-first-1.1.0.tgz#f610afeee3b12bce1d0c30425e76398b78249a5f" + integrity sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw== split-string@^3.0.1, split-string@^3.0.2: version "3.1.0" @@ -8223,6 +8141,13 @@ split2@^2.0.0: dependencies: through2 "^2.0.2" +split2@^3.0.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/split2/-/split2-3.2.2.tgz#bf2cf2a37d838312c249c89206fd7a17dd12365f" + integrity sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg== + dependencies: + readable-stream "^3.0.0" + split@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9" @@ -8257,35 +8182,28 @@ ssri@^6.0.0, ssri@^6.0.1: dependencies: figgy-pudding "^3.5.1" -ssri@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-8.0.0.tgz#79ca74e21f8ceaeddfcb4b90143c458b8d988808" - integrity sha512-aq/pz989nxVYwn16Tsbj1TqFpD5LLrQxHf5zaHuieFV+R0Bbr4y8qUsOA45hXT/N4/9UNXTarBjnjVmjSOVaAA== - dependencies: - minipass "^3.1.1" - stack-utils@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.2.tgz#5cf48b4557becb4638d0bc4f21d23f5d19586593" - integrity sha512-0H7QK2ECz3fyZMzQ8rH0j2ykpfbnd20BFtfg/SqVC2+sCTtcw0aDTGB7dk+de4U4uUeuz6nOtJcrkFFLG1B0Rg== + version "2.0.3" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.3.tgz#cd5f030126ff116b78ccb3c027fe302713b61277" + integrity sha512-gL//fkxfWUsIlFL2Tl42Cl6+HFALEaB1FU76I/Fy+oZjRreP7OPMXFlGbxM7NQsI0ZpUfw76sHnv0WNYuTb7Iw== dependencies: escape-string-regexp "^2.0.0" -standard-version@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/standard-version/-/standard-version-9.0.0.tgz#814055add91eec8679a773768927f927183fc818" - integrity sha512-eRR04IscMP3xW9MJTykwz13HFNYs8jS33AGuDiBKgfo5YrO0qX0Nxb4rjupVwT5HDYL/aR+MBEVLjlmVFmFEDQ== +standard-version@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/standard-version/-/standard-version-9.1.0.tgz#07589469324d967ffe665fa86ef612949a858a80" + integrity sha512-EJcbKUGKBuHjiDSUL5XjPhT1KGVM+UCvv/ti70fHnJwJyJqTSJWl0mWj/Wj0WwsoskyvKWURESzBsZmCCMUZzg== dependencies: chalk "^2.4.2" - conventional-changelog "3.1.23" + conventional-changelog "3.1.24" conventional-changelog-config-spec "2.1.0" - conventional-changelog-conventionalcommits "4.4.0" - conventional-recommended-bump "6.0.10" + conventional-changelog-conventionalcommits "4.5.0" + conventional-recommended-bump "6.0.11" detect-indent "^6.0.0" detect-newline "^3.1.0" dotgitignore "^2.1.0" figures "^3.1.0" - find-up "^4.1.0" + find-up "^5.0.0" fs-access "^1.0.1" git-semver-tags "^4.0.0" semver "^7.1.1" @@ -8327,6 +8245,11 @@ streamroller@^2.2.4: debug "^4.1.1" fs-extra "^8.1.0" +strict-uri-encode@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" + integrity sha1-ucczDHBChi9rFC3CdLvMWGbONUY= + string-length@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.1.tgz#4a973bf31ef77c4edbceadd6af2611996985f8a1" @@ -8375,21 +8298,21 @@ string.prototype.repeat@^0.2.0: resolved "https://registry.yarnpkg.com/string.prototype.repeat/-/string.prototype.repeat-0.2.0.tgz#aba36de08dcee6a5a337d49b2ea1da1b28fc0ecf" integrity sha1-q6Nt4I3O5qWjN9SbLqHaGyj8Ds8= -string.prototype.trimend@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz#85812a6b847ac002270f5808146064c995fb6913" - integrity sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g== +string.prototype.trimend@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz#a22bd53cca5c7cf44d7c9d5c732118873d6cd18b" + integrity sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw== dependencies: + call-bind "^1.0.0" define-properties "^1.1.3" - es-abstract "^1.17.5" -string.prototype.trimstart@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz#14af6d9f34b053f7cfc89b72f8f2ee14b9039a54" - integrity sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw== +string.prototype.trimstart@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz#9b4cb590e123bb36564401d59824298de50fd5aa" + integrity sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg== dependencies: + call-bind "^1.0.0" define-properties "^1.1.3" - es-abstract "^1.17.5" string_decoder@^1.1.1: version "1.3.0" @@ -8510,17 +8433,10 @@ supports-color@^5.3.0: dependencies: has-flag "^3.0.0" -supports-color@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" - integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== - dependencies: - has-flag "^3.0.0" - supports-color@^7.0.0, supports-color@^7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1" - integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g== + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== dependencies: has-flag "^4.0.0" @@ -8537,25 +8453,20 @@ symbol-tree@^3.2.4: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== -table@^5.2.3: - version "5.4.6" - resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e" - integrity sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug== +table@^6.0.4: + version "6.0.7" + resolved "https://registry.yarnpkg.com/table/-/table-6.0.7.tgz#e45897ffbcc1bcf9e8a87bf420f2c9e5a7a52a34" + integrity sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g== dependencies: - ajv "^6.10.2" - lodash "^4.17.14" - slice-ansi "^2.1.0" - string-width "^3.0.0" - -tapable@^1.0.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" - integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== + ajv "^7.0.2" + lodash "^4.17.20" + slice-ansi "^4.0.0" + string-width "^4.2.0" -tapable@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.0.0.tgz#a49c3d6a8a2bb606e7db372b82904c970d537a08" - integrity sha512-bjzn0C0RWoffnNdTzNi7rNDhs1Zlwk2tRXgk8EiHKAOX1Mag3d6T0Y5zNa7l9CJ+EoUne/0UHdwS8tMbkh9zDg== +tapable@^2.1.1, tapable@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.0.tgz#5c373d281d9c672848213d0e037d1c4165ab426b" + integrity sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw== tar@^4.4.10, tar@^4.4.12, tar@^4.4.8: version "4.4.13" @@ -8570,10 +8481,10 @@ tar@^4.4.10, tar@^4.4.12, tar@^4.4.8: safe-buffer "^5.1.2" yallist "^3.0.3" -tar@^6.0.2, tar@^6.0.5: - version "6.0.5" - resolved "https://registry.yarnpkg.com/tar/-/tar-6.0.5.tgz#bde815086e10b39f1dcd298e89d596e1535e200f" - integrity sha512-0b4HOimQHj9nXNEAA7zWwMM91Zhhba3pspja6sQbgTpynOJf+bkjBnfybNYzbpLbnwXnbyB4LOREvlyXLkCHSg== +tar@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.0.tgz#d1724e9bcc04b977b18d5c573b333a2207229a83" + integrity sha512-DUCttfhsnLCjwoDoFcI+B2iJgYa93vBnDUATYEeRx6sntCTdN01VnqsIuTlALXla/LWooNg0yEGeB+Y8WdFxGA== dependencies: chownr "^2.0.0" fs-minipass "^2.0.0" @@ -8607,25 +8518,22 @@ terminal-link@^2.0.0: ansi-escapes "^4.2.1" supports-hyperlinks "^2.0.0" -terser-webpack-plugin@^4.1.0: - version "4.2.3" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-4.2.3.tgz#28daef4a83bd17c1db0297070adc07fc8cfc6a9a" - integrity sha512-jTgXh40RnvOrLQNgIkwEKnQ8rmHjHK4u+6UBEi+W+FPmvb+uo+chJXntKe7/3lW5mNysgSWD60KyesnhW8D6MQ== +terser-webpack-plugin@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.1.1.tgz#7effadee06f7ecfa093dbbd3e9ab23f5f3ed8673" + integrity sha512-5XNNXZiR8YO6X6KhSGXfY0QrGrCRlSwAEjIIrlRQR4W8nP69TaJUlh3bkuac6zzgspiGPfKEHcY295MMVExl5Q== dependencies: - cacache "^15.0.5" - find-cache-dir "^3.3.1" - jest-worker "^26.5.0" - p-limit "^3.0.2" + jest-worker "^26.6.2" + p-limit "^3.1.0" schema-utils "^3.0.0" serialize-javascript "^5.0.1" source-map "^0.6.1" - terser "^5.3.4" - webpack-sources "^1.4.3" + terser "^5.5.1" -terser@^5.3.4: - version "5.3.5" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.3.5.tgz#9e080baa0568f96654621b20eb9effa440b1484e" - integrity sha512-Qw3CZAMmmfU824AoGKalx+riwocSI5Cs0PoGp9RdSLfmxkmJgyBxqLBP/isDNtFyhHnitikvRMZzyVgeq+U+Tg== +terser@^5.5.1: + version "5.5.1" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.5.1.tgz#540caa25139d6f496fdea056e414284886fb2289" + integrity sha512-6VGWZNVP2KTUcltUQJ25TtNjx/XgdDsBDKGt8nN0MpydU36LmbPPcMBd2kmtZNNGVVDLg44k7GKeHHj+4zPIBQ== dependencies: commander "^2.20.0" source-map "~0.7.2" @@ -8685,6 +8593,13 @@ through2@^3.0.0: inherits "^2.0.4" readable-stream "2 || 3" +through2@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/through2/-/through2-4.0.2.tgz#a7ce3ac2a7a8b0b966c80e7c49f0484c3b239764" + integrity sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw== + dependencies: + readable-stream "3" + through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" @@ -8790,10 +8705,10 @@ trim-off-newlines@^1.0.0: resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3" integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM= -ts-jest@^26.4.1: - version "26.4.1" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.4.1.tgz#08ec0d3fc2c3a39e4a46eae5610b69fafa6babd0" - integrity sha512-F4aFq01aS6mnAAa0DljNmKr/Kk9y4HVZ1m6/rtJ0ED56cuxINGq3Q9eVAh+z5vcYKe5qnTMvv90vE8vUMFxomg== +ts-jest@^26.5.1: + version "26.5.1" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.5.1.tgz#4d53ee4481552f57c1624f0bd3425c8b17996150" + integrity sha512-G7Rmo3OJMvlqE79amJX8VJKDiRcd7/r61wh9fnvvG8cAjhA9edklGw/dCxRSQmfZ/z8NDums5srSVgwZos1qfg== dependencies: "@types/jest" "26.x" bs-logger "0.x" @@ -8801,18 +8716,19 @@ ts-jest@^26.4.1: fast-json-stable-stringify "2.x" jest-util "^26.1.0" json5 "2.x" - lodash.memoize "4.x" + lodash "4.x" make-error "1.x" mkdirp "1.x" semver "7.x" yargs-parser "20.x" -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== +ts-node@^9.1.1: + version "9.1.1" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-9.1.1.tgz#51a9a450a3e959401bda5f004a72d54b936d376d" + integrity sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg== dependencies: arg "^4.1.0" + create-require "^1.1.0" diff "^4.0.1" make-error "^1.1.1" source-map-support "^0.5.17" @@ -8829,14 +8745,14 @@ tsconfig-paths@^3.9.0: strip-bom "^3.0.0" tslib@^1.8.1, tslib@^1.9.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" - integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== tsutils@^3.17.1: - version "3.17.1" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759" - integrity sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g== + version "3.20.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.20.0.tgz#ea03ea45462e146b53d70ce0893de453ff24f698" + integrity sha512-RYbuQuvkhuqVeXweWT3tJLKOEJ/UUw9GjNEZGWdrLLlM+611o1gwLHBpxoFJKKl25fLprp2eVthtKs5JOrNeXg== dependencies: tslib "^1.8.1" @@ -8876,10 +8792,10 @@ type-fest@^0.11.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1" integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ== -type-fest@^0.13.1: - version "0.13.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.13.1.tgz#0172cb5bce80b0bd542ea348db50c7e21834d934" - integrity sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg== +type-fest@^0.18.0: + version "0.18.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.18.1.tgz#db4bc151a4a2cf4eebf9add5db75508db6cc841f" + integrity sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw== type-fest@^0.3.0: version "0.3.1" @@ -8908,31 +8824,32 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -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== +typescript-json-schema@^0.49.0: + version "0.49.0" + resolved "https://registry.yarnpkg.com/typescript-json-schema/-/typescript-json-schema-0.49.0.tgz#442f6347ca85fb0d9811f217fb0d6537b68734b3" + integrity sha512-PumZkTmEE3T8TVyoJU6ZCp3K6VCmCb3Ei6fUaRIuDsIzYtmdJc6jV1D0RyBe5sd5mJ1iB6Zckm4KAKbqXs9oDw== dependencies: - "@types/json-schema" "^7.0.5" - glob "~7.1.6" + "@types/json-schema" "^7.0.6" + glob "^7.1.6" json-stable-stringify "^1.0.1" - typescript "~4.0.2" - yargs "^15.4.1" + ts-node "^9.1.1" + typescript "^4.1.3" + yargs "^16.2.0" -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.1.3: + version "4.1.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.4.tgz#f058636e2f4f83f94ddaae07b20fd5e14598432f" + integrity sha512-+Uru0t8qIRgjuCpiSPpfGuhHecMllk5Zsazj5LZvVsEStEjmIRRBZe+jHjGQvsgS7M1wONy2PQXd67EMyV6acg== -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== +typescript@~3.9.9: + version "3.9.9" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.9.tgz#e69905c54bc0681d0518bd4d587cc6f2d0b1a674" + integrity sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w== uglify-js@^3.1.4: - version "3.10.1" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.10.1.tgz#dd14767eb7150de97f2573a5ff210db14fffe4ad" - integrity sha512-RjxApKkrPJB6kjJxQS3iZlf///REXWYxYJxO/MpmlQzVkDWVI3PSnCBWezMecmTU/TRkNxrl8bmsfFQCp+LO+Q== + version "3.12.7" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.12.7.tgz#be4f06142a67bd91ef868b4e111dc241e151bff3" + integrity sha512-SIZhkoh+U/wjW+BHGhVwE9nt8tWJspncloBcFapkpGRwNPqcH8pzX36BXe3TPBjzHWPMUZotpCigak/udWNr1Q== uid-number@0.0.6: version "0.0.6" @@ -8985,10 +8902,10 @@ universalify@^0.1.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== -universalify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d" - integrity sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug== +universalify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" + integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== unset-value@^1.0.0: version "1.0.0" @@ -9004,9 +8921,9 @@ upath@^1.2.0: integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== uri-js@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" - integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== dependencies: punycode "^2.1.0" @@ -9038,19 +8955,19 @@ uuid@^3.0.1, uuid@^3.3.2: integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== 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== + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== -v8-compile-cache@^2.0.3, v8-compile-cache@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz#54bc3cdd43317bca91e35dcaf305b1a7237de745" - integrity sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ== +v8-compile-cache@^2.0.3, v8-compile-cache@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz#9471efa3ef9128d2f7c6a7ca39c4dd6b5055b132" + integrity sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q== -v8-to-istanbul@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-5.0.1.tgz#0608f5b49a481458625edb058488607f25498ba5" - integrity sha512-mbDNjuDajqYe3TXFk5qxcQy8L1msXNE37WTlLoqqpBfRsimbNcrlhQlDPntmECEcUvdC+AQ8CyMMf6EUx1r74Q== +v8-to-istanbul@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-7.1.0.tgz#5b95cef45c0f83217ec79f8fc7ee1c8b486aee07" + integrity sha512-uXUVqNUCLa0AH1vuVxzi+MI4RfxEOKt9pBgKwHbgH7st8Kv2P1m+jvWNnektzBh5QShF3ODgKmUFCf38LnVz1g== dependencies: "@types/istanbul-lib-coverage" "^2.0.1" convert-source-map "^1.6.0" @@ -9101,29 +9018,10 @@ walker@^1.0.7, walker@~1.0.5: dependencies: makeerror "1.0.x" -wasm-dce@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wasm-dce/-/wasm-dce-1.0.2.tgz#7e21e566fa17c61e8e257742a377a5bdb8f2e4f5" - integrity sha512-Fq1+nu43ybsjSnBquLrW/cULmKs61qbv9k8ep13QUe0nABBezMoNAA+j6QY66MW0/eoDVDp1rjXDqQ2VKyS/Xg== - dependencies: - "@babel/core" "^7.0.0-beta.39" - "@babel/traverse" "^7.0.0-beta.39" - "@babel/types" "^7.0.0-beta.39" - babylon "^7.0.0-beta.39" - webassembly-interpreter "0.0.30" - -wasm-loader@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/wasm-loader/-/wasm-loader-1.3.0.tgz#a123a6b6c9a9dac60de38449703be3537742e155" - integrity sha512-R4s75XH+o8qM+WaRrAU9S2rbAMDzob18/S3V8R9ZoFpZkPWLAohWWlzWAp1ybeTkOuuku/X1zJtxiV0pBYxZww== - dependencies: - loader-utils "^1.1.0" - wasm-dce "^1.0.0" - watchpack@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.0.0.tgz#b12248f32f0fd4799b7be0802ad1f6573a45955c" - integrity sha512-xSdCxxYZWNk3VK13bZRYhsQpfa8Vg63zXG+3pyU8ouqSLRCv4IGXIp9Kr226q6GBkGRlZrST2wwKtjfKz2m7Cg== + version "2.1.1" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.1.1.tgz#e99630550fca07df9f90a06056987baa40a689c7" + integrity sha512-Oo7LXCmc1eE1AjyuSBmtC3+Wy4HcV8PxWh2kP6fOl8yTlNS7r0K9l1ao2lrrUza7V39Y3D/BbJgY8VeSlc5JKw== dependencies: glob-to-regexp "^0.4.1" graceful-fs "^4.1.2" @@ -9135,20 +9033,6 @@ wcwidth@^1.0.0: dependencies: defaults "^1.0.3" -webassembly-floating-point-hex-parser@0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/webassembly-floating-point-hex-parser/-/webassembly-floating-point-hex-parser-0.1.2.tgz#85bb01f54e68690c2645ea0cfad26c1110fdf988" - integrity sha512-TUf1H++8U10+stJbFydnvrpG5Sznz5Rilez/oZlV5zI0C/e4cSxd8rALAJ8VpTvjVWxLmL3SVSJUK6Ap9AoiNg== - -webassembly-interpreter@0.0.30: - version "0.0.30" - resolved "https://registry.yarnpkg.com/webassembly-interpreter/-/webassembly-interpreter-0.0.30.tgz#f35aaec0fff2e6fd9ca7277eb1a9059dccedcb7f" - integrity sha512-+Jdy2piEvz9T5j751mOE8+rBO12p+nNW6Fg4kJZ+zP1oUfsm+151sbAbM8AFxWTURmWCGP+r8Lxwfv3pzN1bCQ== - dependencies: - "@babel/code-frame" "^7.0.0-beta.36" - long "^3.2.0" - webassembly-floating-point-hex-parser "0.1.2" - webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" @@ -9164,68 +9048,70 @@ webidl-conversions@^6.1.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514" integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== -webpack-cli@^3.3.12: - version "3.3.12" - resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-3.3.12.tgz#94e9ada081453cd0aa609c99e500012fd3ad2d4a" - integrity sha512-NVWBaz9k839ZH/sinurM+HcDvJOTXwSjYp1ku+5XKeOC03z8v5QitnK/x+lAxGXFyhdayoIf/GOpv85z3/xPag== +webpack-cli@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-4.5.0.tgz#b5213b84adf6e1f5de6391334c9fa53a48850466" + integrity sha512-wXg/ef6Ibstl2f50mnkcHblRPN/P9J4Nlod5Hg9HGFgSeF8rsqDGHJeVe4aR26q9l62TUJi6vmvC2Qz96YJw1Q== + dependencies: + "@discoveryjs/json-ext" "^0.5.0" + "@webpack-cli/configtest" "^1.0.1" + "@webpack-cli/info" "^1.2.2" + "@webpack-cli/serve" "^1.3.0" + colorette "^1.2.1" + commander "^7.0.0" + enquirer "^2.3.6" + execa "^5.0.0" + fastest-levenshtein "^1.0.12" + import-local "^3.0.2" + interpret "^2.2.0" + rechoir "^0.7.0" + v8-compile-cache "^2.2.0" + webpack-merge "^5.7.3" + +webpack-merge@^5.7.3: + version "5.7.3" + resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.7.3.tgz#2a0754e1877a25a8bbab3d2475ca70a052708213" + integrity sha512-6/JUQv0ELQ1igjGDzHkXbVDRxkfA57Zw7PfiupdLFJYrgFqY5ZP8xxbpp2lU3EPwYx89ht5Z/aDkD40hFCm5AA== dependencies: - chalk "^2.4.2" - cross-spawn "^6.0.5" - enhanced-resolve "^4.1.1" - findup-sync "^3.0.0" - global-modules "^2.0.0" - import-local "^2.0.0" - interpret "^1.4.0" - loader-utils "^1.4.0" - supports-color "^6.1.0" - v8-compile-cache "^2.1.1" - yargs "^13.3.2" - -webpack-sources@^1.4.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933" - integrity sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ== - dependencies: - source-list-map "^2.0.0" - source-map "~0.6.1" + clone-deep "^4.0.1" + wildcard "^2.0.0" -webpack-sources@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-2.0.1.tgz#1467f6e692ddce91e88b8044c44347b1087bbd4f" - integrity sha512-A9oYz7ANQBK5EN19rUXbvNgfdfZf5U2gP0769OXsj9CvYkCR6OHOsd6OKyEy4H38GGxpsQPKIL83NC64QY6Xmw== +webpack-sources@^2.1.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-2.2.0.tgz#058926f39e3d443193b6c31547229806ffd02bac" + integrity sha512-bQsA24JLwcnWGArOKUxYKhX3Mz/nK1Xf6hxullKERyktjNMC4x8koOeaDNTA2fEJ09BdWLbM/iTW0ithREUP0w== dependencies: source-list-map "^2.0.1" source-map "^0.6.1" -webpack@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.1.0.tgz#7ba2fc8f587ecf0a412477d2e977b3a8818db83c" - integrity sha512-ZJDq7dpVs479C6zCSF/CwOVsqqobjCusa+BgbXCEROZMS0RcBzQzDgc+hB2YXye8Y/JOvcFwJIqsVtTyHW7t8A== +webpack@^5.21.2: + version "5.21.2" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.21.2.tgz#647507e50d3637695be28af58a6a8246050394e7" + integrity sha512-xHflCenx+AM4uWKX71SWHhxml5aMXdy2tu/vdi4lClm7PADKxlyDAFFN1rEFzNV0MAoPpHtBeJnl/+K6F4QBPg== dependencies: "@types/eslint-scope" "^3.7.0" - "@types/estree" "^0.0.45" - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-module-context" "1.9.0" - "@webassemblyjs/wasm-edit" "1.9.0" - "@webassemblyjs/wasm-parser" "1.9.0" - acorn "^8.0.3" - browserslist "^4.14.3" + "@types/estree" "^0.0.46" + "@webassemblyjs/ast" "1.11.0" + "@webassemblyjs/wasm-edit" "1.11.0" + "@webassemblyjs/wasm-parser" "1.11.0" + acorn "^8.0.4" + browserslist "^4.14.5" chrome-trace-event "^1.0.2" - enhanced-resolve "^5.2.0" - eslint-scope "^5.1.0" + enhanced-resolve "^5.7.0" + es-module-lexer "^0.3.26" + eslint-scope "^5.1.1" events "^3.2.0" glob-to-regexp "^0.4.1" graceful-fs "^4.2.4" json-parse-better-errors "^1.0.2" - loader-runner "^4.1.0" + loader-runner "^4.2.0" mime-types "^2.1.27" neo-async "^2.6.2" - pkg-dir "^4.2.0" schema-utils "^3.0.0" - tapable "^2.0.0" - terser-webpack-plugin "^4.1.0" + tapable "^2.1.1" + terser-webpack-plugin "^5.1.1" watchpack "^2.0.0" - webpack-sources "^2.0.1" + webpack-sources "^2.1.1" whatwg-encoding@^1.0.5: version "1.0.5" @@ -9249,24 +9135,24 @@ whatwg-url@^7.0.0: webidl-conversions "^4.0.2" whatwg-url@^8.0.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.1.0.tgz#c628acdcf45b82274ce7281ee31dd3c839791771" - integrity sha512-vEIkwNi9Hqt4TV9RdnaBPNt+E2Sgmo3gePebCRgZ1R7g6d23+53zCTnuB0amKI4AXq6VM8jj2DUAa0S1vjJxkw== + version "8.4.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.4.0.tgz#50fb9615b05469591d2b2bd6dfaed2942ed72837" + integrity sha512-vwTUFf6V4zhcPkWp/4CQPr1TW9Ml6SF4lVyaIMBdJw5i6qUUJ1QWM4Z6YYVkfka0OUIzVo/0aNtGVGk256IKWw== dependencies: lodash.sortby "^4.7.0" tr46 "^2.0.2" - webidl-conversions "^5.0.0" + webidl-conversions "^6.1.0" which-boxed-primitive@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.1.tgz#cbe8f838ebe91ba2471bb69e9edbda67ab5a5ec1" - integrity sha512-7BT4TwISdDGBgaemWU0N0OU7FeAEJ9Oo2P1PHRm/FCWoEi2VLWC9b6xvxAA3C/NMpxg3HXVgi0sMmGbNUbNepQ== + version "1.0.2" + resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" + integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== dependencies: - is-bigint "^1.0.0" - is-boolean-object "^1.0.0" - is-number-object "^1.0.3" - is-string "^1.0.4" - is-symbol "^1.0.2" + is-bigint "^1.0.1" + is-boolean-object "^1.1.0" + is-number-object "^1.0.4" + is-string "^1.0.5" + is-symbol "^1.0.3" which-collection@^1.0.1: version "1.0.1" @@ -9284,18 +9170,19 @@ which-module@^2.0.0: integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= which-typed-array@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.2.tgz#e5f98e56bda93e3dac196b01d47c1156679c00b2" - integrity sha512-KT6okrd1tE6JdZAy3o2VhMoYPh3+J6EMZLyrxBQsZflI1QCZIxMrIYLkosd8Twf+YfknVIHmYQPgJt238p8dnQ== + version "1.1.4" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.4.tgz#8fcb7d3ee5adf2d771066fba7cf37e32fe8711ff" + integrity sha512-49E0SpUe90cjpoc7BOJwyPHRqSAd12c10Qm2amdEZrJPCY2NDxaW01zHITrem+rnETY3dwrbH3UUrUwagfCYDA== dependencies: available-typed-arrays "^1.0.2" - es-abstract "^1.17.5" + call-bind "^1.0.0" + es-abstract "^1.18.0-next.1" foreach "^2.0.5" function-bind "^1.1.1" has-symbols "^1.0.1" is-typed-array "^1.1.3" -which@^1.2.14, which@^1.2.9, which@^1.3.1: +which@^1.2.9, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== @@ -9316,6 +9203,11 @@ wide-align@^1.1.0: dependencies: string-width "^1.0.2 || 2" +wildcard@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec" + integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== + windows-release@^3.1.0: version "3.3.3" resolved "https://registry.yarnpkg.com/windows-release/-/windows-release-3.3.3.tgz#1c10027c7225743eec6b89df160d64c2e0293999" @@ -9416,17 +9308,10 @@ write-pkg@^3.1.0: sort-keys "^2.0.0" write-json-file "^2.2.0" -write@1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3" - integrity sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig== - dependencies: - mkdirp "^0.5.1" - ws@^7.2.3: - version "7.3.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.3.1.tgz#d0547bf67f7ce4f12a72dfe31262c68d7dc551c8" - integrity sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA== + version "7.4.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.3.tgz#1f9643de34a543b8edb124bdcbc457ae55a6e5cd" + integrity sha512-hr6vCR76GsossIRsr8OLR9acVVm1jyfEWvhbNjtgPOrfvAlKzvyeg/P6r8RuDjRyrcQoPQT7K0DGEPc7Ae6jzA== xml-name-validator@^3.0.0: version "3.0.0" @@ -9443,10 +9328,10 @@ xmlchars@^2.2.0: resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== -xmldom@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.3.0.tgz#e625457f4300b5df9c2e1ecb776147ece47f3e5a" - integrity sha512-z9s6k3wxE+aZHgXYxSTpGDo7BYOUfJsIRyoZiX6HTjwpwfS2wpQBQKa2fD+ShLyPkqDYo5ud7KitmLZ2Cd6r0g== +xmldom@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.4.0.tgz#8771e482a333af44587e30ce026f0998c23f3830" + integrity sha512-2E93k08T30Ugs+34HBSTQLVtpi6mCddaY8uO+pMNk1pqSjV5vElzn4mmh6KLxN3hki8rNcHSYzILoh3TEWORvA== xtend@~4.0.1: version "4.0.2" @@ -9454,14 +9339,14 @@ xtend@~4.0.1: integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== y18n@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" - integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== + version "4.0.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.1.tgz#8db2b83c31c5d75099bb890b23f3094891e247d4" + integrity sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ== -y18n@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.1.tgz#1ad2a7eddfa8bce7caa2e1f6b5da96c39d99d571" - integrity sha512-/jJ831jEs4vGDbYPQp4yGKDYPSCCEQ45uZWJHE1AoYBzqdZi8+LDWas0z4HrmJXmKdpFsTiowSHXdxyFhpmdMg== +y18n@^5.0.5: + version "5.0.5" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.5.tgz#8769ec08d03b1ea2df2500acef561743bbb9ab18" + integrity sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg== yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3: version "3.1.1" @@ -9473,18 +9358,10 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yargs-parser@20.x, yargs-parser@^20.0.0: - version "20.2.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.0.tgz#944791ca2be2e08ddadd3d87e9de4c6484338605" - integrity sha512-2agPoRFPoIcFzOIp6656gcvsg2ohtscpw2OINr/q46+Sq41xz2OYLqx5HRHabmFU1OARIPAYH5uteICE7mn/5A== - -yargs-parser@^13.1.2: - version "13.1.2" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" - integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" +yargs-parser@20.x, yargs-parser@^20.2.2, yargs-parser@^20.2.3: + version "20.2.4" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== yargs-parser@^15.0.1: version "15.0.1" @@ -9494,7 +9371,7 @@ yargs-parser@^15.0.1: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@^18.1.2, yargs-parser@^18.1.3: +yargs-parser@^18.1.2: version "18.1.3" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== @@ -9502,22 +9379,6 @@ yargs-parser@^18.1.2, yargs-parser@^18.1.3: camelcase "^5.0.0" decamelize "^1.2.0" -yargs@^13.3.2: - version "13.3.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" - integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== - dependencies: - cliui "^5.0.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^13.1.2" - yargs@^14.2.2: version "14.2.3" resolved "https://registry.yarnpkg.com/yargs/-/yargs-14.2.3.tgz#1a1c3edced1afb2a2fea33604bc6d1d8d688a414" @@ -9552,20 +9413,25 @@ yargs@^15.0.1, yargs@^15.3.1, yargs@^15.4.1: y18n "^4.0.0" yargs-parser "^18.1.2" -yargs@^16.0.3: - version "16.0.3" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.0.3.tgz#7a919b9e43c90f80d4a142a89795e85399a7e54c" - integrity sha512-6+nLw8xa9uK1BOEOykaiYAJVh6/CjxWXK/q9b5FpRgNslt8s22F2xMBqVIKgCRjNgGvGPBy8Vog7WN7yh4amtA== +yargs@^16.2.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== dependencies: - cliui "^7.0.0" - escalade "^3.0.2" + cliui "^7.0.2" + escalade "^3.1.1" get-caller-file "^2.0.5" require-directory "^2.1.1" string-width "^4.2.0" - y18n "^5.0.1" - yargs-parser "^20.0.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==