diff --git a/.all-contributorsrc b/.all-contributorsrc index fc2817df60..511fce6f28 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -1272,7 +1272,8 @@ "avatar_url": "https://avatars.githubusercontent.com/u/66279577?v=4", "profile": "https://github.com/comcalvi", "contributions": [ - "code" + "code", + "review" ] }, { @@ -1428,6 +1429,34 @@ "contributions": [ "bug" ] + }, + { + "login": "DanielMSchmidt", + "name": "Daniel Schmidt", + "avatar_url": "https://avatars.githubusercontent.com/u/1337046?v=4", + "profile": "http://danielmschmidt.de/", + "contributions": [ + "bug", + "code" + ] + }, + { + "login": "kaizencc", + "name": "Kaizen Conroy", + "avatar_url": "https://avatars.githubusercontent.com/u/36202692?v=4", + "profile": "https://github.com/kaizencc", + "contributions": [ + "code" + ] + }, + { + "login": "Naumel", + "name": "Naumel", + "avatar_url": "https://avatars.githubusercontent.com/u/104374999?v=4", + "profile": "https://github.com/Naumel", + "contributions": [ + "review" + ] } ], "repoType": "github", diff --git a/README.md b/README.md index ddde39ead0..2c8dd27f8e 100644 --- a/README.md +++ b/README.md @@ -54,193 +54,200 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

AWS CDK Automation

🚧 πŸ‘€

Aaron Costley

πŸ› πŸ’» πŸ€” πŸ‘€

Abdallah Hodieb

πŸ›

Adam Ruka

πŸ› πŸ’» 🚧 πŸ‘€

Adrian Dimech

πŸ’»

Alex Pulver

πŸ›

Andrew Wason

πŸ› πŸ’»

Andy Slezak

πŸ’»

Ansgar Mertens

🚧 πŸ’» πŸ›

Anshul Guleria

πŸ€”

Ari Palo

πŸ€”

Armaan Tobaccowalla

πŸ›

BartΕ‚omiej Jurek

πŸ›

Ben Bridts

πŸ“–

Ben Chaimberg

πŸ“–

Ben Farr

πŸ“–

Ben Walters

πŸ€”

Benjamin Macher

πŸ“–

Benjamin Maizels

πŸ’» πŸ‘€

Bill Cauchois

πŸ€”

Brecht Verhoeve

πŸ€”

Breland Miley

πŸ’»

CaerusKaru

πŸ’» 🚧

Calvin Combs

πŸ’»

Camilo BermΓΊdez

πŸ›

Campion Fellin

πŸ’»

Carter Van Deuren

πŸ›

Chris Garvis

πŸ“–

Christophe Vico

πŸ›

Christopher Currie

πŸ’» πŸ€”

Christopher Rybicki

πŸ“–

CommanderRoot

πŸ’»

Cory Hall

πŸ›

Cristian Măgherușan-Stanciu

πŸ›

CyrusNajmabadi

πŸ› πŸ€”

Damian Silbergleith

πŸ’» πŸ›

Daniel Dinu

πŸ› πŸ’»

Daniel Schroeder

πŸ› πŸ’» πŸ“– πŸ€” 🚧

Dave Slotnick

πŸ›

Donald Stufft

πŸ› πŸ’» πŸ€” πŸ‘€

Dongie Agnir

πŸ’» πŸ‘€

Eduardo Rabelo

πŸ“–

Eduardo Sena S. Rosa

πŸ›

Elad Ben-Israel

πŸ› πŸ’» πŸ€” 🚧 πŸ‘€ πŸ“’

Eli Polonsky

πŸ› πŸ’» πŸ€” 🚧 πŸ‘€

Eric Z. Beard

πŸ“†

Erik Karlsson

πŸ›

Eugene Kozlov

πŸ’»

Fabio Gentile

πŸ›

Florian Eitel

πŸ€”

Glib Shpychka

πŸ›

Graham Lea

πŸ€” πŸ‘€

Hamza Assyad

πŸ› πŸ’» πŸ€” πŸ‘€

Hari Pachuveetil

πŸ“ πŸ“–

Hsing-Hui Hsu

πŸ’» πŸ“– πŸ€” πŸ‘€

Ikko Ashimine

πŸ“–

James

πŸ› πŸ’»

James Kelley

πŸ›

James Mead

πŸ’»

James Siri

πŸ’» 🚧

Jason Del Ponte

πŸ€” πŸ‘€

Jason Fulghum

πŸ€” πŸ“† πŸ‘€

Jerry Kindall

πŸ“– πŸ€”

Jimmy Gaussen

πŸ€”

Johannes Weber

πŸ“–

Jon Steinich

πŸ› πŸ€” πŸ’»

Joseph Lawson

πŸ‘€

Joseph Martin

πŸ›

Junix

πŸ›

Justin Frahm

πŸ›

Justin Taylor

πŸ›

Kaizen Conroy

πŸ’» πŸ›

Kaushik Borra

πŸ›

Kyle Thomson

πŸ’» πŸ‘€

Leandro Padua

πŸ›

Liang Zhou

πŸ› πŸ’»

Madeline Kusters

πŸ’» πŸ›

Maja S Bratseth

πŸ›

Marcos Diez

πŸ›

Mark Nielsen

πŸ’»

Matthew Bonig

πŸ› πŸ“

Matthew Pirocchi

πŸ’» πŸ€” πŸ‘€

Meng Xin Zhu

πŸ›

Michael Neil

🚧

Mike Lane

πŸ›

Mitch Garnaat

πŸ› πŸ’» πŸ€” πŸ‘€

Mitchell Valine

πŸ› πŸ’» πŸ€” 🚧 πŸ‘€

Mohamad Soufan

πŸ“–

Mykola Mogylenko

πŸ›

Neta Nir

πŸ’» πŸ€” 🚧 πŸ‘€

Nick Lynch

πŸ› πŸ’» 🚧 πŸ‘€

Niranjan Jayakar

πŸ› πŸ’» πŸ€” 🚧 πŸ‘€

Noah Litov

πŸ’» 🚧 πŸ‘€

Otavio Macedo

πŸ’» πŸ›

PIDZ - Bart

πŸ€”

Peter Woodworth

🚧

Petr Kacer

πŸ›

Petra Barus

πŸ’»

Philip Cali

πŸ€”

Quentin Loos

πŸ€”

Raphael

πŸ›

Richard H Boyd

πŸ›

Rico Huijbers

πŸ› πŸ’» πŸ€” 🚧 πŸ‘€

Romain Marcadier

πŸ› πŸ’» 🎨 πŸ€” 🚧 πŸ‘€ πŸ“

SADIK KUZU

πŸ‘€

SK

πŸ€”

Sam Fink

πŸ’» πŸ‘€

Sam Goodwin

πŸ‘€

Sebastian Korfmann

πŸ› πŸ’» πŸ€”

Sepehr Laal

πŸ›

Shane Witbeck

πŸ€”

Shiv Lakshminarayan

πŸ’» 🚧 πŸ‘€

Somaya

πŸ’» πŸ€” 🚧 πŸ‘€

Stephen Kuenzli

πŸ“–

Takahiro Sugiura

πŸ“–

The Gitter Badger

πŸ’» 🚧

Thomas Poignant

πŸ›

Thomas Steinbach

πŸ›

Thorsten Hoeger

πŸ’»

Tim Wagner

πŸ› πŸ€”

Tobias Lidskog

πŸ’»

Ty Coghlan

πŸ›

Tyler van Hensbergen

πŸ€”

Vlad Hrybok

πŸ›

Vladimir Shchur

πŸ›

Yan Zhulanow

πŸ’»

Yigong Liu

πŸ› πŸ€”

Zach Bienenfeld

πŸ›

ajnarang

πŸ€”

aniljava

πŸ’»

arnogeurts-sqills

πŸ› πŸ’»

deccy-mcc

πŸ›

dependabot-preview[bot]

πŸ› 🚧

dependabot[bot]

🚧

dheffx

πŸ›

gregswdl

πŸ›

guyroberts21

πŸ“–

mattBrzezinski

πŸ“–

mergify

🚧

mergify[bot]

🚧

nathannaveen

🚧

seiyashima42

πŸ› πŸ’» πŸ“–

sullis

πŸ’»

vaneek

πŸ›

wendysophie

πŸ›

AWS CDK Automation

🚧 πŸ‘€

Aaron Costley

πŸ› πŸ’» πŸ€” πŸ‘€

Abdallah Hodieb

πŸ›

Adam Ruka

πŸ› πŸ’» 🚧 πŸ‘€

Adrian Dimech

πŸ’»

Alex Pulver

πŸ›

Andrew Wason

πŸ› πŸ’»

Andy Slezak

πŸ’»

Ansgar Mertens

🚧 πŸ’» πŸ›

Anshul Guleria

πŸ€”

Ari Palo

πŸ€”

Armaan Tobaccowalla

πŸ›

BartΕ‚omiej Jurek

πŸ›

Ben Bridts

πŸ“–

Ben Chaimberg

πŸ“–

Ben Farr

πŸ“–

Ben Walters

πŸ€”

Benjamin Macher

πŸ“–

Benjamin Maizels

πŸ’» πŸ‘€

Bill Cauchois

πŸ€”

Brecht Verhoeve

πŸ€”

Breland Miley

πŸ’»

CaerusKaru

πŸ’» 🚧

Calvin Combs

πŸ’» πŸ‘€

Camilo BermΓΊdez

πŸ›

Campion Fellin

πŸ’»

Carter Van Deuren

πŸ›

Chris Garvis

πŸ“–

Christophe Vico

πŸ›

Christopher Currie

πŸ’» πŸ€”

Christopher Rybicki

πŸ“–

CommanderRoot

πŸ’»

Cory Hall

πŸ›

Cristian Măgherușan-Stanciu

πŸ›

CyrusNajmabadi

πŸ› πŸ€”

Damian Silbergleith

πŸ’» πŸ›

Daniel Dinu

πŸ› πŸ’»

Daniel Schmidt

πŸ› πŸ’»

Daniel Schroeder

πŸ› πŸ’» πŸ“– πŸ€” 🚧

Dave Slotnick

πŸ›

Donald Stufft

πŸ› πŸ’» πŸ€” πŸ‘€

Dongie Agnir

πŸ’» πŸ‘€

Eduardo Rabelo

πŸ“–

Eduardo Sena S. Rosa

πŸ›

Elad Ben-Israel

πŸ› πŸ’» πŸ€” 🚧 πŸ‘€ πŸ“’

Eli Polonsky

πŸ› πŸ’» πŸ€” 🚧 πŸ‘€

Eric Z. Beard

πŸ“†

Erik Karlsson

πŸ›

Eugene Kozlov

πŸ’»

Fabio Gentile

πŸ›

Florian Eitel

πŸ€”

Glib Shpychka

πŸ›

Graham Lea

πŸ€” πŸ‘€

Hamza Assyad

πŸ› πŸ’» πŸ€” πŸ‘€

Hari Pachuveetil

πŸ“ πŸ“–

Hsing-Hui Hsu

πŸ’» πŸ“– πŸ€” πŸ‘€

Ikko Ashimine

πŸ“–

James

πŸ› πŸ’»

James Kelley

πŸ›

James Mead

πŸ’»

James Siri

πŸ’» 🚧

Jason Del Ponte

πŸ€” πŸ‘€

Jason Fulghum

πŸ€” πŸ“† πŸ‘€

Jerry Kindall

πŸ“– πŸ€”

Jimmy Gaussen

πŸ€”

Johannes Weber

πŸ“–

Jon Steinich

πŸ› πŸ€” πŸ’»

Joseph Lawson

πŸ‘€

Joseph Martin

πŸ›

Junix

πŸ›

Justin Frahm

πŸ›

Justin Taylor

πŸ›

Kaizen Conroy

πŸ’» πŸ›

Kaizen Conroy

πŸ’»

Kaushik Borra

πŸ›

Kyle Thomson

πŸ’» πŸ‘€

Leandro Padua

πŸ›

Liang Zhou

πŸ› πŸ’»

Madeline Kusters

πŸ’» πŸ›

Maja S Bratseth

πŸ›

Marcos Diez

πŸ›

Mark Nielsen

πŸ’»

Matthew Bonig

πŸ› πŸ“

Matthew Pirocchi

πŸ’» πŸ€” πŸ‘€

Meng Xin Zhu

πŸ›

Michael Neil

🚧

Mike Lane

πŸ›

Mitch Garnaat

πŸ› πŸ’» πŸ€” πŸ‘€

Mitchell Valine

πŸ› πŸ’» πŸ€” 🚧 πŸ‘€

Mohamad Soufan

πŸ“–

Mykola Mogylenko

πŸ›

Naumel

πŸ‘€

Neta Nir

πŸ’» πŸ€” 🚧 πŸ‘€

Nick Lynch

πŸ› πŸ’» 🚧 πŸ‘€

Niranjan Jayakar

πŸ› πŸ’» πŸ€” 🚧 πŸ‘€

Noah Litov

πŸ’» 🚧 πŸ‘€

Otavio Macedo

πŸ’» πŸ›

PIDZ - Bart

πŸ€”

Peter Woodworth

🚧

Petr Kacer

πŸ›

Petra Barus

πŸ’»

Philip Cali

πŸ€”

Quentin Loos

πŸ€”

Raphael

πŸ›

Richard H Boyd

πŸ›

Rico Huijbers

πŸ› πŸ’» πŸ€” 🚧 πŸ‘€

Romain Marcadier

πŸ› πŸ’» 🎨 πŸ€” 🚧 πŸ‘€ πŸ“

SADIK KUZU

πŸ‘€

SK

πŸ€”

Sam Fink

πŸ’» πŸ‘€

Sam Goodwin

πŸ‘€

Sebastian Korfmann

πŸ› πŸ’» πŸ€”

Sepehr Laal

πŸ›

Shane Witbeck

πŸ€”

Shiv Lakshminarayan

πŸ’» 🚧 πŸ‘€

Somaya

πŸ’» πŸ€” 🚧 πŸ‘€

Stephen Kuenzli

πŸ“–

Takahiro Sugiura

πŸ“–

The Gitter Badger

πŸ’» 🚧

Thomas Poignant

πŸ›

Thomas Steinbach

πŸ›

Thorsten Hoeger

πŸ’»

Tim Wagner

πŸ› πŸ€”

Tobias Lidskog

πŸ’»

Ty Coghlan

πŸ›

Tyler van Hensbergen

πŸ€”

Vlad Hrybok

πŸ›

Vladimir Shchur

πŸ›

Yan Zhulanow

πŸ’»

Yigong Liu

πŸ› πŸ€”

Zach Bienenfeld

πŸ›

ajnarang

πŸ€”

aniljava

πŸ’»

arnogeurts-sqills

πŸ› πŸ’»

deccy-mcc

πŸ›

dependabot-preview[bot]

πŸ› 🚧

dependabot[bot]

🚧

dheffx

πŸ›

gregswdl

πŸ›

guyroberts21

πŸ“–

mattBrzezinski

πŸ“–

mergify

🚧

mergify[bot]

🚧

nathannaveen

🚧

seiyashima42

πŸ› πŸ’» πŸ“–

sullis

πŸ’»

vaneek

πŸ›

wendysophie

πŸ›
diff --git a/packages/jsii-calc/lib/index.ts b/packages/jsii-calc/lib/index.ts index 5e6f39c2ca..9c487d7c6c 100644 --- a/packages/jsii-calc/lib/index.ts +++ b/packages/jsii-calc/lib/index.ts @@ -25,3 +25,4 @@ export * as cdk16625 from './cdk16625'; export * as jsii3656 from './jsii3656'; export * as anonymous from './anonymous'; +export * as union from './union'; diff --git a/packages/jsii-calc/lib/union.ts b/packages/jsii-calc/lib/union.ts new file mode 100644 index 0000000000..ef4bf22b8f --- /dev/null +++ b/packages/jsii-calc/lib/union.ts @@ -0,0 +1,21 @@ +import { IFriendly } from '@scope/jsii-calc-lib'; + +export interface IResolvable { + resolve(): any; +} + +export class Resolvable implements IResolvable { + private constructor() {} + + public resolve(): any { + return false; + } +} + +export class ConsumesUnion { + public static unionType(param: IResolvable | Resolvable | IFriendly) { + void param; + } + + private constructor() {} +} diff --git a/packages/jsii-calc/test/assembly.jsii b/packages/jsii-calc/test/assembly.jsii index 469a62babe..d392689d96 100644 --- a/packages/jsii-calc/test/assembly.jsii +++ b/packages/jsii-calc/test/assembly.jsii @@ -421,6 +421,13 @@ "line": 4 }, "symbolId": "lib/submodule/returns-param/index:" + }, + "jsii-calc.union": { + "locationInModule": { + "filename": "lib/index.ts", + "line": 28 + }, + "symbolId": "lib/union:" } }, "targets": { @@ -18199,8 +18206,125 @@ "name": "ReturnsSpecialParameter", "namespace": "submodule.returnsparam", "symbolId": "lib/submodule/returns-param/index:ReturnsSpecialParameter" + }, + "jsii-calc.union.ConsumesUnion": { + "assembly": "jsii-calc", + "docs": { + "stability": "stable" + }, + "fqn": "jsii-calc.union.ConsumesUnion", + "kind": "class", + "locationInModule": { + "filename": "lib/union.ts", + "line": 15 + }, + "methods": [ + { + "docs": { + "stability": "stable" + }, + "locationInModule": { + "filename": "lib/union.ts", + "line": 16 + }, + "name": "unionType", + "parameters": [ + { + "name": "param", + "type": { + "union": { + "types": [ + { + "fqn": "jsii-calc.union.IResolvable" + }, + { + "fqn": "jsii-calc.union.Resolvable" + }, + { + "fqn": "@scope/jsii-calc-lib.IFriendly" + } + ] + } + } + } + ], + "static": true + } + ], + "name": "ConsumesUnion", + "namespace": "union", + "symbolId": "lib/union:ConsumesUnion" + }, + "jsii-calc.union.IResolvable": { + "assembly": "jsii-calc", + "docs": { + "stability": "stable" + }, + "fqn": "jsii-calc.union.IResolvable", + "kind": "interface", + "locationInModule": { + "filename": "lib/union.ts", + "line": 3 + }, + "methods": [ + { + "abstract": true, + "docs": { + "stability": "stable" + }, + "locationInModule": { + "filename": "lib/union.ts", + "line": 4 + }, + "name": "resolve", + "returns": { + "type": { + "primitive": "any" + } + } + } + ], + "name": "IResolvable", + "namespace": "union", + "symbolId": "lib/union:IResolvable" + }, + "jsii-calc.union.Resolvable": { + "assembly": "jsii-calc", + "docs": { + "stability": "stable" + }, + "fqn": "jsii-calc.union.Resolvable", + "interfaces": [ + "jsii-calc.union.IResolvable" + ], + "kind": "class", + "locationInModule": { + "filename": "lib/union.ts", + "line": 7 + }, + "methods": [ + { + "docs": { + "stability": "stable" + }, + "locationInModule": { + "filename": "lib/union.ts", + "line": 10 + }, + "name": "resolve", + "overrides": "jsii-calc.union.IResolvable", + "returns": { + "type": { + "primitive": "any" + } + } + } + ], + "name": "Resolvable", + "namespace": "union", + "symbolId": "lib/union:Resolvable" } }, "version": "3.20.120", - "fingerprint": "Ze43eowG9ImRufT3MQ8yO+bW8JzOQlZIYtFsjpc960E=" + "fingerprint": "OaHwYmdPa8tbAJnlREahLGpRaNNBor2aoG04vsA/SvM=" } \ No newline at end of file diff --git a/packages/jsii-pacmak/lib/targets/dotnet/runtime-type-checking.ts b/packages/jsii-pacmak/lib/targets/dotnet/runtime-type-checking.ts index c59e6d3703..8014a86638 100644 --- a/packages/jsii-pacmak/lib/targets/dotnet/runtime-type-checking.ts +++ b/packages/jsii-pacmak/lib/targets/dotnet/runtime-type-checking.ts @@ -172,6 +172,31 @@ abstract class Validation { code.openBlock(`switch (${expression})`); for (const type of types) { validTypes.push(resolver.toDotNetTypeName(type.spec!)); + + /** + * Filter to remove classes and interfaces from a set of type references that + * are implied by another entry in the set. Practically this is meant to remove + * types from a set if a parent type of it is also present in the set, keeping + * only the most generic declaration. + * + * This is useful because the TypeScript compiler and jsii do not guarantee that + * all entries in a type union are unrelated, but the C# compiler treats dead + * code as an error, and will refuse to compile (error CS8120) a pattern-matching + * switch case if it cannot be matched (for example, if it matches on a child of + * a type that was previously matched on already). + */ + if ( + (type.type?.isClassType() || type.type?.isInterfaceType()) && + types.some( + (other) => + other !== type && + other.type != null && + type.type!.extends(other.type), + ) + ) { + continue; + } + const typeNames = [resolver.toDotNetType(type.spec!)]; if (typeNames[0] === 'double') { // For doubles, we accept any numeric value, really... diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-dotnet.test.js.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-dotnet.test.js.snap index 4af83084d1..ee78fe8a21 100644 --- a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-dotnet.test.js.snap +++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-dotnet.test.js.snap @@ -3167,6 +3167,10 @@ exports[`Generated code for "jsii-calc": / 1`] = ` ┃ ┣━ πŸ“„ TwoMethodsWithSimilarCapitalization.cs ┃ ┣━ πŸ“„ UmaskCheck.cs ┃ ┣━ πŸ“„ UnaryOperation.cs + ┃ ┣━ πŸ“ Union + ┃ ┃ ┣━ πŸ“„ ConsumesUnion.cs + ┃ ┃ ┣━ πŸ“„ IResolvable.cs + ┃ ┃ ┗━ πŸ“„ Resolvable.cs ┃ ┣━ πŸ“„ UnionProperties.cs ┃ ┣━ πŸ“„ UpcasingReflectable.cs ┃ ┣━ πŸ“„ UseBundledDependency.cs @@ -19762,6 +19766,105 @@ namespace Amazon.JSII.Tests.CalculatorNamespace `; +exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Union/ConsumesUnion.cs 1`] = ` +using Amazon.JSII.Runtime.Deputy; + +#pragma warning disable CS0672,CS0809,CS1591 + +namespace Amazon.JSII.Tests.CalculatorNamespace.Union +{ + [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Union.ConsumesUnion), fullyQualifiedName: "jsii-calc.union.ConsumesUnion")] + public class ConsumesUnion : DeputyBase + { + /// Used by jsii to construct an instance of this class from a Javascript-owned object reference + /// The Javascript-owned object reference + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + protected ConsumesUnion(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 ConsumesUnion(DeputyProps props): base(props) + { + } + + [JsiiMethod(name: "unionType", parametersJson: "[{\\"name\\":\\"param\\",\\"type\\":{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"jsii-calc.union.IResolvable\\"},{\\"fqn\\":\\"jsii-calc.union.Resolvable\\"},{\\"fqn\\":\\"@scope/jsii-calc-lib.IFriendly\\"}]}}}]")] + public static void UnionType(object param) + { + InvokeStaticVoidMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.Union.ConsumesUnion), new System.Type[]{typeof(object)}, new object[]{param}); + } + } +} + +`; + +exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Union/IResolvable.cs 1`] = ` +using Amazon.JSII.Runtime.Deputy; + +#pragma warning disable CS0672,CS0809,CS1591 + +namespace Amazon.JSII.Tests.CalculatorNamespace.Union +{ + [JsiiInterface(nativeType: typeof(IResolvable), fullyQualifiedName: "jsii-calc.union.IResolvable")] + public interface IResolvable + { + [JsiiMethod(name: "resolve", returnsJson: "{\\"type\\":{\\"primitive\\":\\"any\\"}}")] + object Resolve(); + + [JsiiTypeProxy(nativeType: typeof(IResolvable), fullyQualifiedName: "jsii-calc.union.IResolvable")] + internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Union.IResolvable + { + private _Proxy(ByRefValue reference): base(reference) + { + } + + [JsiiMethod(name: "resolve", returnsJson: "{\\"type\\":{\\"primitive\\":\\"any\\"}}")] + public object Resolve() + { + return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; + } + } + } +} + +`; + +exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Union/Resolvable.cs 1`] = ` +using Amazon.JSII.Runtime.Deputy; + +#pragma warning disable CS0672,CS0809,CS1591 + +namespace Amazon.JSII.Tests.CalculatorNamespace.Union +{ + [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Union.Resolvable), fullyQualifiedName: "jsii-calc.union.Resolvable")] + public class Resolvable : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Union.IResolvable + { + /// 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 Resolvable(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 Resolvable(DeputyProps props): base(props) + { + } + + [JsiiMethod(name: "resolve", returnsJson: "{\\"type\\":{\\"primitive\\":\\"any\\"}}")] + public virtual object Resolve() + { + return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; + } + } +} + +`; + exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnionProperties.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; @@ -20583,6 +20686,8 @@ exports[`Generated code for "jsii-calc": / 1`] = ` ┣━ πŸ“„ StructUnionConsumer.cs.diff ┣━ πŸ“„ StructWithCollectionOfUnionts.cs.diff ┣━ πŸ“„ TopLevelStruct.cs.diff + ┣━ πŸ“ Union + ┃ ┗━ πŸ“„ ConsumesUnion.cs.diff ┣━ πŸ“„ UnionProperties.cs.diff ┗━ πŸ“„ VariadicTypeUnion.cs.diff `; @@ -21252,6 +21357,38 @@ exports[`Generated code for "jsii-calc": /dotnet/Amazon /// You don't have to pass this. `; +exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Union/ConsumesUnion.cs.diff 1`] = ` +--- dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Union/ConsumesUnion.cs --no-runtime-type-checking ++++ dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Union/ConsumesUnion.cs --runtime-type-checking +@@ -22,9 +22,26 @@ + } + + [JsiiMethod(name: "unionType", parametersJson: "[{\\"name\\":\\"param\\",\\"type\\":{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"jsii-calc.union.IResolvable\\"},{\\"fqn\\":\\"jsii-calc.union.Resolvable\\"},{\\"fqn\\":\\"@scope/jsii-calc-lib.IFriendly\\"}]}}}]")] + public static void UnionType(object param) + { ++ if (Amazon.JSII.Runtime.Configuration.RuntimeTypeChecking) ++ { ++ switch (param) ++ { ++ case Amazon.JSII.Tests.CalculatorNamespace.Union.IResolvable cast_ccaaac: ++ break; ++ case Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IFriendly cast_ccaaac: ++ break; ++ case Amazon.JSII.Runtime.Deputy.AnonymousObject cast_ccaaac: ++ // Not enough information to type-check... ++ break; ++ case null: ++ throw new System.ArgumentException($"Expected argument {nameof(param)} to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.Union.IResolvable).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.Union.Resolvable).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IFriendly).FullName}; received null", nameof(param)); ++ default: ++ throw new System.ArgumentException($"Expected argument {nameof(param)} to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.Union.IResolvable).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.Union.Resolvable).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IFriendly).FullName}; received {param.GetType().FullName}", nameof(param)); ++ } ++ } + InvokeStaticVoidMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.Union.ConsumesUnion), new System.Type[]{typeof(object)}, new object[]{param}); + } + } + } +`; + exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnionProperties.cs.diff 1`] = ` --- dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnionProperties.cs --no-runtime-type-checking +++ dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnionProperties.cs --runtime-type-checking diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-go.test.js.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-go.test.js.snap index ba52978d53..76f3a65330 100644 --- a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-go.test.js.snap +++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-go.test.js.snap @@ -2808,6 +2808,11 @@ exports[`Generated code for "jsii-calc": / 1`] = ` ┃ ┣━ πŸ“„ submodule_Default.go ┃ ┣━ πŸ“„ submodule_MyClass.go ┃ ┗━ πŸ“„ submodule.go + ┣━ πŸ“ union + ┃ ┣━ πŸ“„ union_ConsumesUnion.go + ┃ ┣━ πŸ“„ union_IResolvable.go + ┃ ┣━ πŸ“„ union_Resolvable.go + ┃ ┗━ πŸ“„ union.go ┗━ πŸ“„ version `; @@ -24157,6 +24162,144 @@ func (m *jsiiProxy_MyClass) MethodWithSpecialParam(param *param.SpecialParameter } +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/union/union.go 1`] = ` +package union + +import ( + "reflect" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +func init() { + _jsii_.RegisterClass( + "jsii-calc.union.ConsumesUnion", + reflect.TypeOf((*ConsumesUnion)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_ConsumesUnion{} + }, + ) + _jsii_.RegisterInterface( + "jsii-calc.union.IResolvable", + reflect.TypeOf((*IResolvable)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "resolve", GoMethod: "Resolve"}, + }, + func() interface{} { + return &jsiiProxy_IResolvable{} + }, + ) + _jsii_.RegisterClass( + "jsii-calc.union.Resolvable", + reflect.TypeOf((*Resolvable)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "resolve", GoMethod: "Resolve"}, + }, + func() interface{} { + j := jsiiProxy_Resolvable{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_IResolvable) + return &j + }, + ) +} + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/union/union_ConsumesUnion.go 1`] = ` +package union + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +type ConsumesUnion interface { +} + +// The jsii proxy struct for ConsumesUnion +type jsiiProxy_ConsumesUnion struct { + _ byte // padding +} + +func ConsumesUnion_UnionType(param interface{}) { + _init_.Initialize() + + _jsii_.StaticInvokeVoid( + "jsii-calc.union.ConsumesUnion", + "unionType", + []interface{}{param}, + ) +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/union/union_IResolvable.go 1`] = ` +package union + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +type IResolvable interface { + Resolve() interface{} +} + +// The jsii proxy for IResolvable +type jsiiProxy_IResolvable struct { + _ byte // padding +} + +func (i *jsiiProxy_IResolvable) Resolve() interface{} { + var returns interface{} + + _jsii_.Invoke( + i, + "resolve", + nil, // no parameters + &returns, + ) + + return returns +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/union/union_Resolvable.go 1`] = ` +package union + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +type Resolvable interface { + IResolvable + Resolve() interface{} +} + +// The jsii proxy struct for Resolvable +type jsiiProxy_Resolvable struct { + jsiiProxy_IResolvable +} + +func (r *jsiiProxy_Resolvable) Resolve() interface{} { + var returns interface{} + + _jsii_.Invoke( + r, + "resolve", + nil, // no parameters + &returns, + ) + + return returns +} + + `; exports[`Generated code for "jsii-calc": /go/jsiicalc/version 1`] = ` @@ -24492,14 +24635,18 @@ exports[`Generated code for "jsii-calc": / 1`] = ` ┃ ┣━ πŸ†• pythonself_IInterfaceWithSelf__no_runtime_type_checking.go ┃ ┣━ πŸ†• pythonself_IInterfaceWithSelf__runtime_type_checks.go ┃ ┗━ πŸ“„ pythonself_IInterfaceWithSelf.go.diff - ┗━ πŸ“ submodule - ┣━ πŸ“ isolated - ┃ ┣━ πŸ†• isolated_Kwargs__no_runtime_type_checking.go - ┃ ┣━ πŸ†• isolated_Kwargs__runtime_type_checks.go - ┃ ┗━ πŸ“„ isolated_Kwargs.go.diff - ┣━ πŸ†• submodule_MyClass__no_runtime_type_checking.go - ┣━ πŸ†• submodule_MyClass__runtime_type_checks.go - ┗━ πŸ“„ submodule_MyClass.go.diff + ┣━ πŸ“ submodule + ┃ ┣━ πŸ“ isolated + ┃ ┃ ┣━ πŸ†• isolated_Kwargs__no_runtime_type_checking.go + ┃ ┃ ┣━ πŸ†• isolated_Kwargs__runtime_type_checks.go + ┃ ┃ ┗━ πŸ“„ isolated_Kwargs.go.diff + ┃ ┣━ πŸ†• submodule_MyClass__no_runtime_type_checking.go + ┃ ┣━ πŸ†• submodule_MyClass__runtime_type_checks.go + ┃ ┗━ πŸ“„ submodule_MyClass.go.diff + ┗━ πŸ“ union + ┣━ πŸ†• union_ConsumesUnion__no_runtime_type_checking.go + ┣━ πŸ†• union_ConsumesUnion__runtime_type_checks.go + ┗━ πŸ“„ union_ConsumesUnion.go.diff `; exports[`Generated code for "jsii-calc": /go/jsiicalc/anonymous/anonymous_UseOptions.go.diff 1`] = ` @@ -34533,3 +34680,78 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/s +} + `; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/union/union_ConsumesUnion.go.diff 1`] = ` +--- go/jsiicalc/union/union_ConsumesUnion.go --no-runtime-type-checking ++++ go/jsiicalc/union/union_ConsumesUnion.go --runtime-type-checking +@@ -14,10 +14,13 @@ + } + + func ConsumesUnion_UnionType(param interface{}) { + _init_.Initialize() + ++ if err := validateConsumesUnion_UnionTypeParameters(param); err != nil { ++ panic(err) ++ } + _jsii_.StaticInvokeVoid( + "jsii-calc.union.ConsumesUnion", + "unionType", + []interface{}{param}, + ) +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/union/union_ConsumesUnion__no_runtime_type_checking.go.diff 1`] = ` +--- go/jsiicalc/union/union_ConsumesUnion__no_runtime_type_checking.go --no-runtime-type-checking ++++ go/jsiicalc/union/union_ConsumesUnion__no_runtime_type_checking.go --runtime-type-checking +@@ -0,0 +1,11 @@ ++//go:build no_runtime_type_checking ++// +build no_runtime_type_checking ++ ++package union ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func validateConsumesUnion_UnionTypeParameters(param interface{}) error { ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/union/union_ConsumesUnion__runtime_type_checks.go.diff 1`] = ` +--- go/jsiicalc/union/union_ConsumesUnion__runtime_type_checks.go --no-runtime-type-checking ++++ go/jsiicalc/union/union_ConsumesUnion__runtime_type_checks.go --runtime-type-checking +@@ -0,0 +1,33 @@ ++//go:build !no_runtime_type_checking ++// +build !no_runtime_type_checking ++ ++package union ++ ++import ( ++ "fmt" ++ ++ _jsii_ "github.com/aws/jsii-runtime-go/runtime" ++ ++ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" ++) ++ ++func validateConsumesUnion_UnionTypeParameters(param interface{}) error { ++ if param == nil { ++ return fmt.Errorf("parameter param is required, but nil was provided") ++ } ++ switch param.(type) { ++ case IResolvable: ++ // ok ++ case Resolvable: ++ // ok ++ case scopejsiicalclib.IFriendly: ++ // ok ++ default: ++ if !_jsii_.IsAnonymousProxy(param) { ++ return fmt.Errorf("parameter param must be one of the allowed types: IResolvable, Resolvable, scopejsiicalclib.IFriendly; received %#v (a %T)", param, param) ++ } ++ } ++ ++ return nil ++} ++ +`; diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-java.test.js.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-java.test.js.snap index a37a2817c5..2a8ec40c46 100644 --- a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-java.test.js.snap +++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-java.test.js.snap @@ -3898,6 +3898,10 @@ exports[`Generated code for "jsii-calc": / 1`] = ` ┃ ┣━ πŸ“„ TwoMethodsWithSimilarCapitalization.java ┃ ┣━ πŸ“„ UmaskCheck.java ┃ ┣━ πŸ“„ UnaryOperation.java + ┃ ┣━ πŸ“ union + ┃ ┃ ┣━ πŸ“„ ConsumesUnion.java + ┃ ┃ ┣━ πŸ“„ IResolvable.java + ┃ ┃ ┗━ πŸ“„ Resolvable.java ┃ ┣━ πŸ“„ UnionProperties.java ┃ ┣━ πŸ“„ UpcasingReflectable.java ┃ ┣━ πŸ“„ UseBundledDependency.java @@ -27588,6 +27592,116 @@ public class ReturnsSpecialParameter extends software.amazon.jsii.JsiiObject { `; +exports[`Generated code for "jsii-calc": /java/src/main/java/software/amazon/jsii/tests/calculator/union/ConsumesUnion.java 1`] = ` +package software.amazon.jsii.tests.calculator.union; + +/** + */ +@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.union.ConsumesUnion") +public class ConsumesUnion extends software.amazon.jsii.JsiiObject { + + protected ConsumesUnion(final software.amazon.jsii.JsiiObjectRef objRef) { + super(objRef); + } + + protected ConsumesUnion(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { + super(initializationMode); + } + + /** + * @param param This parameter is required. + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public static void unionType(final @org.jetbrains.annotations.NotNull java.lang.Object param) { + software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.union.ConsumesUnion.class, "unionType", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(param, "param is required") }); + } +} + +`; + +exports[`Generated code for "jsii-calc": /java/src/main/java/software/amazon/jsii/tests/calculator/union/IResolvable.java 1`] = ` +package software.amazon.jsii.tests.calculator.union; + +/** + */ +@javax.annotation.Generated(value = "jsii-pacmak") +@software.amazon.jsii.Jsii(module = software.amazon.jsii.tests.calculator.$Module.class, fqn = "jsii-calc.union.IResolvable") +@software.amazon.jsii.Jsii.Proxy(IResolvable.Jsii$Proxy.class) +@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) +public interface IResolvable extends software.amazon.jsii.JsiiSerializable { + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @org.jetbrains.annotations.NotNull java.lang.Object resolve(); + + /** + * 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.union.IResolvable.Jsii$Default { + protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { + super(objRef); + } + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @Override + public final @org.jetbrains.annotations.NotNull java.lang.Object resolve() { + return software.amazon.jsii.Kernel.call(this, "resolve", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); + } + } + + /** + * Internal default implementation for {@link IResolvable}. + */ + @software.amazon.jsii.Internal + interface Jsii$Default extends IResolvable { + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @Override + default @org.jetbrains.annotations.NotNull java.lang.Object resolve() { + return software.amazon.jsii.Kernel.call(this, "resolve", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); + } + } +} + +`; + +exports[`Generated code for "jsii-calc": /java/src/main/java/software/amazon/jsii/tests/calculator/union/Resolvable.java 1`] = ` +package software.amazon.jsii.tests.calculator.union; + +/** + */ +@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.union.Resolvable") +public class Resolvable extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.union.IResolvable { + + protected Resolvable(final software.amazon.jsii.JsiiObjectRef objRef) { + super(objRef); + } + + protected Resolvable(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { + super(initializationMode); + } + + /** + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + @Override + public @org.jetbrains.annotations.NotNull java.lang.Object resolve() { + return software.amazon.jsii.Kernel.call(this, "resolve", software.amazon.jsii.NativeType.forClass(java.lang.Object.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 @@ -27870,6 +27984,9 @@ jsii-calc.submodule.nested_submodule.Namespaced=software.amazon.jsii.tests.calcu 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 +jsii-calc.union.ConsumesUnion=software.amazon.jsii.tests.calculator.union.ConsumesUnion +jsii-calc.union.IResolvable=software.amazon.jsii.tests.calculator.union.IResolvable +jsii-calc.union.Resolvable=software.amazon.jsii.tests.calculator.union.Resolvable `; @@ -27893,6 +28010,8 @@ exports[`Generated code for "jsii-calc": / 1`] = ` ┣━ πŸ“„ ClassWithNestedUnion.java.diff ┣━ πŸ“„ ConfusingToJackson.java.diff ┣━ πŸ“„ StructUnionConsumer.java.diff + ┣━ πŸ“ union + ┃ ┗━ πŸ“„ ConsumesUnion.java.diff ┗━ πŸ“„ VariadicTypeUnion.java.diff `; @@ -28345,3 +28464,31 @@ exports[`Generated code for "jsii-calc": /java/src/main /** * @param which This parameter is required. `; + +exports[`Generated code for "jsii-calc": /java/src/main/java/software/amazon/jsii/tests/calculator/union/ConsumesUnion.java.diff 1`] = ` +--- java/src/main/java/software/amazon/jsii/tests/calculator/union/ConsumesUnion.java --no-runtime-type-checking ++++ java/src/main/java/software/amazon/jsii/tests/calculator/union/ConsumesUnion.java --runtime-type-checking +@@ -18,8 +18,22 @@ + /** + * @param param This parameter is required. + */ + @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) + public static void unionType(final @org.jetbrains.annotations.NotNull java.lang.Object param) { ++ if (software.amazon.jsii.Configuration.getRuntimeTypeChecking()) { ++ if ( ++ !(param instanceof software.amazon.jsii.tests.calculator.union.IResolvable) ++ && !(param instanceof software.amazon.jsii.tests.calculator.union.Resolvable) ++ && !(param instanceof software.amazon.jsii.tests.calculator.lib.IFriendly) ++ && !(param.getClass().equals(software.amazon.jsii.JsiiObject.class)) ++ ) { ++ throw new IllegalArgumentException( ++ new java.lang.StringBuilder("Expected ") ++ .append("param") ++ .append(" to be one of: software.amazon.jsii.tests.calculator.union.IResolvable, software.amazon.jsii.tests.calculator.union.Resolvable, software.amazon.jsii.tests.calculator.lib.IFriendly; received ") ++ .append(param.getClass()).toString()); ++ } ++ } + software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.union.ConsumesUnion.class, "unionType", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(param, "param is required") }); + } + } +`; diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.js.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.js.snap index d460f782a1..5e135fbd7d 100644 --- a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.js.snap +++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.js.snap @@ -2437,22 +2437,24 @@ exports[`Generated code for "jsii-calc": / 1`] = ` ┣━ πŸ“„ py.typed ┣━ πŸ“ python_self ┃ ┗━ πŸ“„ __init__.py - ┗━ πŸ“ submodule - ┣━ πŸ“„ __init__.py - ┣━ πŸ“ back_references - ┃ ┗━ πŸ“„ __init__.py - ┣━ πŸ“ child - ┃ ┗━ πŸ“„ __init__.py - ┣━ πŸ“ isolated - ┃ ┗━ πŸ“„ __init__.py - ┣━ πŸ“ nested_submodule - ┃ ┣━ πŸ“„ __init__.py - ┃ ┗━ πŸ“ deeply_nested - ┃ ┗━ πŸ“„ __init__.py - ┣━ πŸ“ param - ┃ ┗━ πŸ“„ __init__.py - ┗━ πŸ“ returnsparam - ┗━ πŸ“„ __init__.py + ┣━ πŸ“ submodule + ┃ ┣━ πŸ“„ __init__.py + ┃ ┣━ πŸ“ back_references + ┃ ┃ ┗━ πŸ“„ __init__.py + ┃ ┣━ πŸ“ child + ┃ ┃ ┗━ πŸ“„ __init__.py + ┃ ┣━ πŸ“ isolated + ┃ ┃ ┗━ πŸ“„ __init__.py + ┃ ┣━ πŸ“ nested_submodule + ┃ ┃ ┣━ πŸ“„ __init__.py + ┃ ┃ ┗━ πŸ“ deeply_nested + ┃ ┃ ┗━ πŸ“„ __init__.py + ┃ ┣━ πŸ“ param + ┃ ┃ ┗━ πŸ“„ __init__.py + ┃ ┗━ πŸ“ returnsparam + ┃ ┗━ πŸ“„ __init__.py + ┗━ πŸ“ union + ┗━ πŸ“„ __init__.py `; exports[`Generated code for "jsii-calc": /python/LICENSE 1`] = ` @@ -2771,7 +2773,8 @@ kwargs = json.loads( "jsii_calc.submodule.nested_submodule", "jsii_calc.submodule.nested_submodule.deeply_nested", "jsii_calc.submodule.param", - "jsii_calc.submodule.returnsparam" + "jsii_calc.submodule.returnsparam", + "jsii_calc.union" ], "package_data": { "jsii_calc._jsii": [ @@ -11149,6 +11152,7 @@ __all__ = [ "onlystatic", "python_self", "submodule", + "union", ] publication.publish() @@ -11172,6 +11176,7 @@ from . import nodirect from . import onlystatic from . import python_self from . import submodule +from . import union `; @@ -13642,6 +13647,72 @@ publication.publish() `; +exports[`Generated code for "jsii-calc": /python/src/jsii_calc/union/__init__.py 1`] = ` +import abc +import builtins +import datetime +import enum +import typing + +import jsii +import publication +import typing_extensions + +from typeguard import check_type + +from .._jsii import * + +import scope.jsii_calc_lib + + +class ConsumesUnion(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.union.ConsumesUnion"): + @jsii.member(jsii_name="unionType") + @builtins.classmethod + def union_type( + cls, + param: typing.Union["IResolvable", "Resolvable", scope.jsii_calc_lib.IFriendly], + ) -> None: + ''' + :param param: - + ''' + return typing.cast(None, jsii.sinvoke(cls, "unionType", [param])) + + +@jsii.interface(jsii_type="jsii-calc.union.IResolvable") +class IResolvable(typing_extensions.Protocol): + @jsii.member(jsii_name="resolve") + def resolve(self) -> typing.Any: + ... + + +class _IResolvableProxy: + __jsii_type__: typing.ClassVar[str] = "jsii-calc.union.IResolvable" + + @jsii.member(jsii_name="resolve") + def resolve(self) -> typing.Any: + return typing.cast(typing.Any, jsii.invoke(self, "resolve", [])) + +# Adding a "__jsii_proxy_class__(): typing.Type" function to the interface +typing.cast(typing.Any, IResolvable).__jsii_proxy_class__ = lambda : _IResolvableProxy + + +@jsii.implements(IResolvable) +class Resolvable(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.union.Resolvable"): + @jsii.member(jsii_name="resolve") + def resolve(self) -> typing.Any: + return typing.cast(typing.Any, jsii.invoke(self, "resolve", [])) + + +__all__ = [ + "ConsumesUnion", + "IResolvable", + "Resolvable", +] + +publication.publish() + +`; + exports[`Generated code for "jsii-calc": / 1`] = ` ┗━ πŸ“ python @@ -13680,14 +13751,16 @@ exports[`Generated code for "jsii-calc": / 1`] = ` ┃ ┗━ πŸ“„ __init__.py.diff ┣━ πŸ“ python_self ┃ ┗━ πŸ“„ __init__.py.diff - ┗━ πŸ“ submodule - ┣━ πŸ“„ __init__.py.diff - ┣━ πŸ“ back_references - ┃ ┗━ πŸ“„ __init__.py.diff - ┣━ πŸ“ child - ┃ ┗━ πŸ“„ __init__.py.diff - ┗━ πŸ“ param - ┗━ πŸ“„ __init__.py.diff + ┣━ πŸ“ submodule + ┃ ┣━ πŸ“„ __init__.py.diff + ┃ ┣━ πŸ“ back_references + ┃ ┃ ┗━ πŸ“„ __init__.py.diff + ┃ ┣━ πŸ“ child + ┃ ┃ ┗━ πŸ“„ __init__.py.diff + ┃ ┗━ πŸ“ param + ┃ ┗━ πŸ“„ __init__.py.diff + ┗━ πŸ“ union + ┗━ πŸ“„ __init__.py.diff `; exports[`Generated code for "jsii-calc": /python/src/jsii_calc/__init__.py.diff 1`] = ` @@ -17364,3 +17437,22 @@ exports[`Generated code for "jsii-calc": /python/src/js @builtins.property `; + +exports[`Generated code for "jsii-calc": /python/src/jsii_calc/union/__init__.py.diff 1`] = ` +--- python/src/jsii_calc/union/__init__.py --no-runtime-type-checking ++++ python/src/jsii_calc/union/__init__.py --runtime-type-checking +@@ -23,10 +23,13 @@ + param: typing.Union["IResolvable", "Resolvable", scope.jsii_calc_lib.IFriendly], + ) -> None: + ''' + :param param: - + ''' ++ if __debug__: ++ type_hints = typing.get_type_hints(ConsumesUnion.union_type) ++ check_type(argname="argument param", value=param, expected_type=type_hints["param"]) + return typing.cast(None, jsii.sinvoke(cls, "unionType", [param])) + + + @jsii.interface(jsii_type="jsii-calc.union.IResolvable") + class IResolvable(typing_extensions.Protocol): +`; diff --git a/packages/jsii-reflect/test/__snapshots__/jsii-tree.test.js.snap b/packages/jsii-reflect/test/__snapshots__/jsii-tree.test.js.snap index cd6aaf77b4..4ac15cf9f7 100644 --- a/packages/jsii-reflect/test/__snapshots__/jsii-tree.test.js.snap +++ b/packages/jsii-reflect/test/__snapshots__/jsii-tree.test.js.snap @@ -445,139 +445,159 @@ exports[`jsii-tree --all 1`] = ` β”‚ β”‚ β”‚ └─┬ static staticMethod() method (stable) β”‚ β”‚ β”‚ β”œβ”€β”€ static β”‚ β”‚ β”‚ └── returns: string - β”‚ β”‚ └─┬ submodule - β”‚ β”‚ β”œβ”€β”¬ submodules - β”‚ β”‚ β”‚ β”œβ”€β”¬ back_references - β”‚ β”‚ β”‚ β”‚ └─┬ types - β”‚ β”‚ β”‚ β”‚ └─┬ interface MyClassReference (stable) - β”‚ β”‚ β”‚ β”‚ └─┬ members - β”‚ β”‚ β”‚ β”‚ └─┬ reference property (stable) - β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ abstract - β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ immutable - β”‚ β”‚ β”‚ β”‚ └── type: jsii-calc.submodule.MyClass - β”‚ β”‚ β”‚ β”œβ”€β”¬ child - β”‚ β”‚ β”‚ β”‚ └─┬ types - β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ class InnerClass (stable) - β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ members - β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ () initializer (stable) - β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ static staticProp property (stable) - β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ const - β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ immutable - β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ static - β”‚ β”‚ β”‚ β”‚ β”‚ └── type: jsii-calc.submodule.child.SomeStruct - β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ class OuterClass (stable) - β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ members - β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ () initializer (stable) - β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ innerClass property (stable) - β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ immutable - β”‚ β”‚ β”‚ β”‚ β”‚ └── type: jsii-calc.submodule.child.InnerClass - β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ interface KwargsProps (stable) - β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ interfaces - β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └── SomeStruct - β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ members - β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ extra property (stable) - β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ abstract - β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ immutable - β”‚ β”‚ β”‚ β”‚ β”‚ └── type: Optional - β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ interface SomeStruct (stable) - β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ members - β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ prop property (stable) - β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ abstract - β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ immutable - β”‚ β”‚ β”‚ β”‚ β”‚ └── type: jsii-calc.submodule.child.SomeEnum - β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ interface Structure (stable) - β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ members - β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ bool property (stable) - β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ abstract - β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ immutable - β”‚ β”‚ β”‚ β”‚ β”‚ └── type: boolean - β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ enum Awesomeness (stable) - β”‚ β”‚ β”‚ β”‚ β”‚ └── AWESOME (stable) - β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ enum Goodness (stable) - β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ PRETTY_GOOD (stable) - β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ REALLY_GOOD (stable) - β”‚ β”‚ β”‚ β”‚ β”‚ └── AMAZINGLY_GOOD (stable) - β”‚ β”‚ β”‚ β”‚ └─┬ enum SomeEnum (stable) - β”‚ β”‚ β”‚ β”‚ └── SOME (stable) - β”‚ β”‚ β”‚ β”œβ”€β”¬ isolated - β”‚ β”‚ β”‚ β”‚ └─┬ types - β”‚ β”‚ β”‚ β”‚ └─┬ class Kwargs (stable) - β”‚ β”‚ β”‚ β”‚ └─┬ members - β”‚ β”‚ β”‚ β”‚ └─┬ static method(props) method (stable) - β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ static - β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ parameters - β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ props - β”‚ β”‚ β”‚ β”‚ β”‚ └── type: Optional - β”‚ β”‚ β”‚ β”‚ └── returns: boolean - β”‚ β”‚ β”‚ β”œβ”€β”¬ 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 ReturnsSpecialParameter (stable) - β”‚ β”‚ β”‚ └─┬ members - β”‚ β”‚ β”‚ β”œβ”€β”€ () initializer (stable) - β”‚ β”‚ β”‚ └─┬ returnsSpecialParam() method (stable) - β”‚ β”‚ β”‚ └── returns: jsii-calc.submodule.param.SpecialParameter + β”‚ β”‚ β”œβ”€β”¬ submodule + β”‚ β”‚ β”‚ β”œβ”€β”¬ submodules + β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ back_references + β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ types + β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ interface MyClassReference (stable) + β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ members + β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ reference property (stable) + β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ abstract + β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ immutable + β”‚ β”‚ β”‚ β”‚ β”‚ └── type: jsii-calc.submodule.MyClass + β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ child + β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ types + β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ class InnerClass (stable) + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ members + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ () initializer (stable) + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ static staticProp property (stable) + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ const + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ immutable + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ static + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └── type: jsii-calc.submodule.child.SomeStruct + β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ class OuterClass (stable) + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ members + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ () initializer (stable) + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ innerClass property (stable) + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ immutable + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └── type: jsii-calc.submodule.child.InnerClass + β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ interface KwargsProps (stable) + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ interfaces + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └── SomeStruct + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ members + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ extra property (stable) + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ abstract + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ immutable + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └── type: Optional + β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ interface SomeStruct (stable) + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ members + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ prop property (stable) + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ abstract + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ immutable + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └── type: jsii-calc.submodule.child.SomeEnum + β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ interface Structure (stable) + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ members + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ bool property (stable) + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ abstract + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ immutable + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └── type: boolean + β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ enum Awesomeness (stable) + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └── AWESOME (stable) + β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ enum Goodness (stable) + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ PRETTY_GOOD (stable) + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ REALLY_GOOD (stable) + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └── AMAZINGLY_GOOD (stable) + β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ enum SomeEnum (stable) + β”‚ β”‚ β”‚ β”‚ β”‚ └── SOME (stable) + β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ isolated + β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ types + β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ class Kwargs (stable) + β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ members + β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ static method(props) method (stable) + β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ static + β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ parameters + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ props + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └── type: Optional + β”‚ β”‚ β”‚ β”‚ β”‚ └── returns: boolean + β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ 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 ReturnsSpecialParameter (stable) + β”‚ β”‚ β”‚ β”‚ └─┬ members + β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ () initializer (stable) + β”‚ β”‚ β”‚ β”‚ └─┬ returnsSpecialParam() method (stable) + β”‚ β”‚ β”‚ β”‚ └── returns: jsii-calc.submodule.param.SpecialParameter + β”‚ β”‚ β”‚ └─┬ types + β”‚ β”‚ β”‚ β”œβ”€β”¬ class MyClass (stable) + β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ interfaces: INamespaced + β”‚ β”‚ β”‚ β”‚ └─┬ members + β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ (props) initializer (stable) + β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ 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 + β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ definedAt property (stable) + β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ immutable + β”‚ β”‚ β”‚ β”‚ β”‚ └── type: string + β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ goodness property (stable) + β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ immutable + β”‚ β”‚ β”‚ β”‚ β”‚ └── type: jsii-calc.submodule.child.Goodness + β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ props property (stable) + β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ immutable + β”‚ β”‚ β”‚ β”‚ β”‚ └── type: jsii-calc.submodule.child.SomeStruct + β”‚ β”‚ β”‚ β”‚ └─┬ allTypes property (stable) + β”‚ β”‚ β”‚ β”‚ └── type: Optional + β”‚ β”‚ β”‚ └─┬ interface Default (stable) + β”‚ β”‚ β”‚ └─┬ members + β”‚ β”‚ β”‚ └─┬ foo property (stable) + β”‚ β”‚ β”‚ β”œβ”€β”€ abstract + β”‚ β”‚ β”‚ β”œβ”€β”€ immutable + β”‚ β”‚ β”‚ └── type: number + β”‚ β”‚ └─┬ union β”‚ β”‚ └─┬ types - β”‚ β”‚ β”œβ”€β”¬ class MyClass (stable) - β”‚ β”‚ β”‚ β”œβ”€β”€ interfaces: INamespaced + β”‚ β”‚ β”œβ”€β”¬ class ConsumesUnion (stable) β”‚ β”‚ β”‚ └─┬ members - β”‚ β”‚ β”‚ β”œβ”€β”¬ (props) initializer (stable) - β”‚ β”‚ β”‚ β”‚ └─┬ 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 - β”‚ β”‚ β”‚ β”œβ”€β”¬ definedAt property (stable) - β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ immutable - β”‚ β”‚ β”‚ β”‚ └── type: string - β”‚ β”‚ β”‚ β”œβ”€β”¬ goodness property (stable) - β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ immutable - β”‚ β”‚ β”‚ β”‚ └── type: jsii-calc.submodule.child.Goodness - β”‚ β”‚ β”‚ β”œβ”€β”¬ props property (stable) - β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ immutable - β”‚ β”‚ β”‚ β”‚ └── type: jsii-calc.submodule.child.SomeStruct - β”‚ β”‚ β”‚ └─┬ allTypes property (stable) - β”‚ β”‚ β”‚ └── type: Optional - β”‚ β”‚ └─┬ interface Default (stable) + β”‚ β”‚ β”‚ └─┬ static unionType(param) method (stable) + β”‚ β”‚ β”‚ β”œβ”€β”€ static + β”‚ β”‚ β”‚ β”œβ”€β”¬ parameters + β”‚ β”‚ β”‚ β”‚ └─┬ param + β”‚ β”‚ β”‚ β”‚ └── type: jsii-calc.union.IResolvable | jsii-calc.union.Resolvable | @scope/jsii-calc-lib.IFriendly + β”‚ β”‚ β”‚ └── returns: void + β”‚ β”‚ β”œβ”€β”¬ class Resolvable (stable) + β”‚ β”‚ β”‚ β”œβ”€β”€ interfaces: IResolvable + β”‚ β”‚ β”‚ └─┬ members + β”‚ β”‚ β”‚ └─┬ resolve() method (stable) + β”‚ β”‚ β”‚ └── returns: any + β”‚ β”‚ └─┬ interface IResolvable (stable) β”‚ β”‚ └─┬ members - β”‚ β”‚ └─┬ foo property (stable) + β”‚ β”‚ └─┬ resolve() method (stable) β”‚ β”‚ β”œβ”€β”€ abstract - β”‚ β”‚ β”œβ”€β”€ immutable - β”‚ β”‚ └── type: number + β”‚ β”‚ └── returns: any β”‚ └─┬ types β”‚ β”œβ”€β”¬ class AbstractClass (stable) β”‚ β”‚ β”œβ”€β”€ base: AbstractClassBase @@ -3648,44 +3668,50 @@ exports[`jsii-tree --inheritance 1`] = ` β”‚ β”‚ β”œβ”€β”¬ onlystatic β”‚ β”‚ β”‚ └─┬ types β”‚ β”‚ β”‚ └── class OnlyStaticMethods - β”‚ β”‚ └─┬ submodule - β”‚ β”‚ β”œβ”€β”¬ submodules - β”‚ β”‚ β”‚ β”œβ”€β”¬ back_references - β”‚ β”‚ β”‚ β”‚ └─┬ types - β”‚ β”‚ β”‚ β”‚ └── interface MyClassReference - β”‚ β”‚ β”‚ β”œβ”€β”¬ child - β”‚ β”‚ β”‚ β”‚ └─┬ types - β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ class InnerClass - β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ class OuterClass - β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ interface KwargsProps - β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ interfaces - β”‚ β”‚ β”‚ β”‚ β”‚ └── SomeStruct - β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ interface SomeStruct - β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ interface Structure - β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ enum Awesomeness - β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ enum Goodness - β”‚ β”‚ β”‚ β”‚ └── enum SomeEnum - β”‚ β”‚ β”‚ β”œβ”€β”¬ isolated - β”‚ β”‚ β”‚ β”‚ └─┬ types - β”‚ β”‚ β”‚ β”‚ └── class Kwargs - β”‚ β”‚ β”‚ β”œβ”€β”¬ nested_submodule - β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ submodules - β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ deeplyNested - β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ types - β”‚ β”‚ β”‚ β”‚ β”‚ └── interface INamespaced - β”‚ β”‚ β”‚ β”‚ └─┬ types - β”‚ β”‚ β”‚ β”‚ └─┬ class Namespaced - β”‚ β”‚ β”‚ β”‚ └── interfaces: INamespaced - β”‚ β”‚ β”‚ β”œβ”€β”¬ param - β”‚ β”‚ β”‚ β”‚ └─┬ types - β”‚ β”‚ β”‚ β”‚ └── interface SpecialParameter - β”‚ β”‚ β”‚ └─┬ returnsparam - β”‚ β”‚ β”‚ └─┬ types - β”‚ β”‚ β”‚ └── class ReturnsSpecialParameter + β”‚ β”‚ β”œβ”€β”¬ submodule + β”‚ β”‚ β”‚ β”œβ”€β”¬ submodules + β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ back_references + β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ types + β”‚ β”‚ β”‚ β”‚ β”‚ └── interface MyClassReference + β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ child + β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ types + β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ class InnerClass + β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ class OuterClass + β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ interface KwargsProps + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ interfaces + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └── SomeStruct + β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ interface SomeStruct + β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ interface Structure + β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ enum Awesomeness + β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ enum Goodness + β”‚ β”‚ β”‚ β”‚ β”‚ └── enum SomeEnum + β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ isolated + β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ types + β”‚ β”‚ β”‚ β”‚ β”‚ └── class Kwargs + β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ nested_submodule + β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ submodules + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ deeplyNested + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ types + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └── interface INamespaced + β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ types + β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ class Namespaced + β”‚ β”‚ β”‚ β”‚ β”‚ └── interfaces: INamespaced + β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ param + β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ types + β”‚ β”‚ β”‚ β”‚ β”‚ └── interface SpecialParameter + β”‚ β”‚ β”‚ β”‚ └─┬ returnsparam + β”‚ β”‚ β”‚ β”‚ └─┬ types + β”‚ β”‚ β”‚ β”‚ └── class ReturnsSpecialParameter + β”‚ β”‚ β”‚ └─┬ types + β”‚ β”‚ β”‚ β”œβ”€β”¬ class MyClass + β”‚ β”‚ β”‚ β”‚ └── interfaces: INamespaced + β”‚ β”‚ β”‚ └── interface Default + β”‚ β”‚ └─┬ union β”‚ β”‚ └─┬ types - β”‚ β”‚ β”œβ”€β”¬ class MyClass - β”‚ β”‚ β”‚ └── interfaces: INamespaced - β”‚ β”‚ └── interface Default + β”‚ β”‚ β”œβ”€β”€ class ConsumesUnion + β”‚ β”‚ β”œβ”€β”¬ class Resolvable + β”‚ β”‚ β”‚ └── interfaces: IResolvable + β”‚ β”‚ └── interface IResolvable β”‚ └─┬ types β”‚ β”œβ”€β”¬ class AbstractClass β”‚ β”‚ β”œβ”€β”€ base: AbstractClassBase @@ -4259,81 +4285,92 @@ exports[`jsii-tree --members 1`] = ` β”‚ β”‚ β”‚ └─┬ class OnlyStaticMethods β”‚ β”‚ β”‚ └─┬ members β”‚ β”‚ β”‚ └── static staticMethod() method - β”‚ β”‚ └─┬ submodule - β”‚ β”‚ β”œβ”€β”¬ submodules - β”‚ β”‚ β”‚ β”œβ”€β”¬ back_references - β”‚ β”‚ β”‚ β”‚ └─┬ types - β”‚ β”‚ β”‚ β”‚ └─┬ interface MyClassReference - β”‚ β”‚ β”‚ β”‚ └─┬ members - β”‚ β”‚ β”‚ β”‚ └── reference property - β”‚ β”‚ β”‚ β”œβ”€β”¬ child - β”‚ β”‚ β”‚ β”‚ └─┬ types - β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ class InnerClass - β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ members - β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ () initializer - β”‚ β”‚ β”‚ β”‚ β”‚ └── static staticProp property - β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ class OuterClass - β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ members - β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ () initializer - β”‚ β”‚ β”‚ β”‚ β”‚ └── innerClass property - β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ interface KwargsProps - β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ members - β”‚ β”‚ β”‚ β”‚ β”‚ └── extra property - β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ interface SomeStruct - β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ members - β”‚ β”‚ β”‚ β”‚ β”‚ └── prop property - β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ interface Structure - β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ members - β”‚ β”‚ β”‚ β”‚ β”‚ └── bool property - β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ enum Awesomeness - β”‚ β”‚ β”‚ β”‚ β”‚ └── AWESOME - β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ enum Goodness - β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ PRETTY_GOOD - β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ REALLY_GOOD - β”‚ β”‚ β”‚ β”‚ β”‚ └── AMAZINGLY_GOOD - β”‚ β”‚ β”‚ β”‚ └─┬ enum SomeEnum - β”‚ β”‚ β”‚ β”‚ └── SOME - β”‚ β”‚ β”‚ β”œβ”€β”¬ isolated - β”‚ β”‚ β”‚ β”‚ └─┬ types - β”‚ β”‚ β”‚ β”‚ └─┬ class Kwargs - β”‚ β”‚ β”‚ β”‚ └─┬ members - β”‚ β”‚ β”‚ β”‚ └── static method(props) method - β”‚ β”‚ β”‚ β”œβ”€β”¬ 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 ReturnsSpecialParameter - β”‚ β”‚ β”‚ └─┬ members - β”‚ β”‚ β”‚ β”œβ”€β”€ () initializer - β”‚ β”‚ β”‚ └── returnsSpecialParam() method + β”‚ β”‚ β”œβ”€β”¬ submodule + β”‚ β”‚ β”‚ β”œβ”€β”¬ submodules + β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ back_references + β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ types + β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ interface MyClassReference + β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ members + β”‚ β”‚ β”‚ β”‚ β”‚ └── reference property + β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ child + β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ types + β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ class InnerClass + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ members + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ () initializer + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └── static staticProp property + β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ class OuterClass + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ members + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ () initializer + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └── innerClass property + β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ interface KwargsProps + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ members + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └── extra property + β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ interface SomeStruct + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ members + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └── prop property + β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ interface Structure + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ members + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └── bool property + β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ enum Awesomeness + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └── AWESOME + β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ enum Goodness + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ PRETTY_GOOD + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ REALLY_GOOD + β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └── AMAZINGLY_GOOD + β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ enum SomeEnum + β”‚ β”‚ β”‚ β”‚ β”‚ └── SOME + β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ isolated + β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ types + β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ class Kwargs + β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ members + β”‚ β”‚ β”‚ β”‚ β”‚ └── static method(props) method + β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ 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 ReturnsSpecialParameter + β”‚ β”‚ β”‚ β”‚ └─┬ members + β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ () initializer + β”‚ β”‚ β”‚ β”‚ └── returnsSpecialParam() method + β”‚ β”‚ β”‚ └─┬ types + β”‚ β”‚ β”‚ β”œβ”€β”¬ class MyClass + β”‚ β”‚ β”‚ β”‚ └─┬ members + β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ (props) initializer + β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ methodWithSpecialParam(param) method + β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ awesomeness property + β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ definedAt property + β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ goodness property + β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ props property + β”‚ β”‚ β”‚ β”‚ └── allTypes property + β”‚ β”‚ β”‚ └─┬ interface Default + β”‚ β”‚ β”‚ └─┬ members + β”‚ β”‚ β”‚ └── foo property + β”‚ β”‚ └─┬ union β”‚ β”‚ └─┬ types - β”‚ β”‚ β”œβ”€β”¬ class MyClass + β”‚ β”‚ β”œβ”€β”¬ class ConsumesUnion β”‚ β”‚ β”‚ └─┬ members - β”‚ β”‚ β”‚ β”œβ”€β”€ (props) initializer - β”‚ β”‚ β”‚ β”œβ”€β”€ methodWithSpecialParam(param) method - β”‚ β”‚ β”‚ β”œβ”€β”€ awesomeness property - β”‚ β”‚ β”‚ β”œβ”€β”€ definedAt property - β”‚ β”‚ β”‚ β”œβ”€β”€ goodness property - β”‚ β”‚ β”‚ β”œβ”€β”€ props property - β”‚ β”‚ β”‚ └── allTypes property - β”‚ β”‚ └─┬ interface Default + β”‚ β”‚ β”‚ └── static unionType(param) method + β”‚ β”‚ β”œβ”€β”¬ class Resolvable + β”‚ β”‚ β”‚ └─┬ members + β”‚ β”‚ β”‚ └── resolve() method + β”‚ β”‚ └─┬ interface IResolvable β”‚ β”‚ └─┬ members - β”‚ β”‚ └── foo property + β”‚ β”‚ └── resolve() method β”‚ └─┬ types β”‚ β”œβ”€β”¬ class AbstractClass β”‚ β”‚ └─┬ members @@ -5639,16 +5676,17 @@ exports[`jsii-tree --signatures 1`] = ` β”‚ β”‚ β”œβ”€β”€ sub1 β”‚ β”‚ └── sub2 β”‚ β”œβ”€β”€ onlystatic - β”‚ └─┬ submodule - β”‚ └─┬ submodules - β”‚ β”œβ”€β”€ back_references - β”‚ β”œβ”€β”€ child - β”‚ β”œβ”€β”€ isolated - β”‚ β”œβ”€β”¬ nested_submodule - β”‚ β”‚ └─┬ submodules - β”‚ β”‚ └── deeplyNested - β”‚ β”œβ”€β”€ param - β”‚ └── returnsparam + β”‚ β”œβ”€β”¬ submodule + β”‚ β”‚ └─┬ submodules + β”‚ β”‚ β”œβ”€β”€ back_references + β”‚ β”‚ β”œβ”€β”€ child + β”‚ β”‚ β”œβ”€β”€ isolated + β”‚ β”‚ β”œβ”€β”¬ nested_submodule + β”‚ β”‚ β”‚ └─┬ submodules + β”‚ β”‚ β”‚ └── deeplyNested + β”‚ β”‚ β”œβ”€β”€ param + β”‚ β”‚ └── returnsparam + β”‚ └── union β”œβ”€β”€ @scope/jsii-calc-base β”œβ”€β”€ @scope/jsii-calc-base-of-base └─┬ @scope/jsii-calc-lib @@ -5763,40 +5801,45 @@ exports[`jsii-tree --types 1`] = ` β”‚ β”‚ β”œβ”€β”¬ onlystatic β”‚ β”‚ β”‚ └─┬ types β”‚ β”‚ β”‚ └── class OnlyStaticMethods - β”‚ β”‚ └─┬ 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 + β”‚ β”‚ β”œβ”€β”¬ 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 + β”‚ β”‚ β”‚ └── interface Default + β”‚ β”‚ └─┬ union β”‚ β”‚ └─┬ types - β”‚ β”‚ β”œβ”€β”€ class MyClass - β”‚ β”‚ └── interface Default + β”‚ β”‚ β”œβ”€β”€ class ConsumesUnion + β”‚ β”‚ β”œβ”€β”€ class Resolvable + β”‚ β”‚ └── interface IResolvable β”‚ └─┬ types β”‚ β”œβ”€β”€ class AbstractClass β”‚ β”œβ”€β”€ class AbstractClassBase @@ -6089,16 +6132,17 @@ exports[`jsii-tree 1`] = ` β”‚ β”‚ β”œβ”€β”€ sub1 β”‚ β”‚ └── sub2 β”‚ β”œβ”€β”€ onlystatic - β”‚ └─┬ submodule - β”‚ └─┬ submodules - β”‚ β”œβ”€β”€ back_references - β”‚ β”œβ”€β”€ child - β”‚ β”œβ”€β”€ isolated - β”‚ β”œβ”€β”¬ nested_submodule - β”‚ β”‚ └─┬ submodules - β”‚ β”‚ └── deeplyNested - β”‚ β”œβ”€β”€ param - β”‚ └── returnsparam + β”‚ β”œβ”€β”¬ submodule + β”‚ β”‚ └─┬ submodules + β”‚ β”‚ β”œβ”€β”€ back_references + β”‚ β”‚ β”œβ”€β”€ child + β”‚ β”‚ β”œβ”€β”€ isolated + β”‚ β”‚ β”œβ”€β”¬ nested_submodule + β”‚ β”‚ β”‚ └─┬ submodules + β”‚ β”‚ β”‚ └── deeplyNested + β”‚ β”‚ β”œβ”€β”€ param + β”‚ β”‚ └── returnsparam + β”‚ └── union β”œβ”€β”€ @scope/jsii-calc-base β”œβ”€β”€ @scope/jsii-calc-base-of-base └─┬ @scope/jsii-calc-lib diff --git a/packages/jsii-reflect/test/__snapshots__/tree.test.js.snap b/packages/jsii-reflect/test/__snapshots__/tree.test.js.snap index e5fcf52c5a..e3d1791aee 100644 --- a/packages/jsii-reflect/test/__snapshots__/tree.test.js.snap +++ b/packages/jsii-reflect/test/__snapshots__/tree.test.js.snap @@ -34,16 +34,17 @@ exports[`defaults 1`] = ` β”‚ β”‚ β”œβ”€β”€ sub1 β”‚ β”‚ └── sub2 β”‚ β”œβ”€β”€ onlystatic - β”‚ └─┬ submodule - β”‚ └─┬ submodules - β”‚ β”œβ”€β”€ back_references - β”‚ β”œβ”€β”€ child - β”‚ β”œβ”€β”€ isolated - β”‚ β”œβ”€β”¬ nested_submodule - β”‚ β”‚ └─┬ submodules - β”‚ β”‚ └── deeplyNested - β”‚ β”œβ”€β”€ param - β”‚ └── returnsparam + β”‚ β”œβ”€β”¬ submodule + β”‚ β”‚ └─┬ submodules + β”‚ β”‚ β”œβ”€β”€ back_references + β”‚ β”‚ β”œβ”€β”€ child + β”‚ β”‚ β”œβ”€β”€ isolated + β”‚ β”‚ β”œβ”€β”¬ nested_submodule + β”‚ β”‚ β”‚ └─┬ submodules + β”‚ β”‚ β”‚ └── deeplyNested + β”‚ β”‚ β”œβ”€β”€ param + β”‚ β”‚ └── returnsparam + β”‚ └── union β”œβ”€β”€ @scope/jsii-calc-base β”œβ”€β”€ @scope/jsii-calc-base-of-base └─┬ @scope/jsii-calc-lib @@ -86,16 +87,17 @@ exports[`inheritance 1`] = ` β”‚ β”‚ β”œβ”€β”€ sub1 β”‚ β”‚ └── sub2 β”‚ β”œβ”€β”€ onlystatic - β”‚ └─┬ submodule - β”‚ └─┬ submodules - β”‚ β”œβ”€β”€ back_references - β”‚ β”œβ”€β”€ child - β”‚ β”œβ”€β”€ isolated - β”‚ β”œβ”€β”¬ nested_submodule - β”‚ β”‚ └─┬ submodules - β”‚ β”‚ └── deeplyNested - β”‚ β”œβ”€β”€ param - β”‚ └── returnsparam + β”‚ β”œβ”€β”¬ submodule + β”‚ β”‚ └─┬ submodules + β”‚ β”‚ β”œβ”€β”€ back_references + β”‚ β”‚ β”œβ”€β”€ child + β”‚ β”‚ β”œβ”€β”€ isolated + β”‚ β”‚ β”œβ”€β”¬ nested_submodule + β”‚ β”‚ β”‚ └─┬ submodules + β”‚ β”‚ β”‚ └── deeplyNested + β”‚ β”‚ β”œβ”€β”€ param + β”‚ β”‚ └── returnsparam + β”‚ └── union β”œβ”€β”€ @scope/jsii-calc-base β”œβ”€β”€ @scope/jsii-calc-base-of-base └─┬ @scope/jsii-calc-lib @@ -138,16 +140,17 @@ exports[`members 1`] = ` β”‚ β”‚ β”œβ”€β”€ sub1 β”‚ β”‚ └── sub2 β”‚ β”œβ”€β”€ onlystatic - β”‚ └─┬ submodule - β”‚ └─┬ submodules - β”‚ β”œβ”€β”€ back_references - β”‚ β”œβ”€β”€ child - β”‚ β”œβ”€β”€ isolated - β”‚ β”œβ”€β”¬ nested_submodule - β”‚ β”‚ └─┬ submodules - β”‚ β”‚ └── deeplyNested - β”‚ β”œβ”€β”€ param - β”‚ └── returnsparam + β”‚ β”œβ”€β”¬ submodule + β”‚ β”‚ └─┬ submodules + β”‚ β”‚ β”œβ”€β”€ back_references + β”‚ β”‚ β”œβ”€β”€ child + β”‚ β”‚ β”œβ”€β”€ isolated + β”‚ β”‚ β”œβ”€β”¬ nested_submodule + β”‚ β”‚ β”‚ └─┬ submodules + β”‚ β”‚ β”‚ └── deeplyNested + β”‚ β”‚ β”œβ”€β”€ param + β”‚ β”‚ └── returnsparam + β”‚ └── union β”œβ”€β”€ @scope/jsii-calc-base β”œβ”€β”€ @scope/jsii-calc-base-of-base └─┬ @scope/jsii-calc-lib @@ -601,139 +604,159 @@ exports[`showAll 1`] = ` β”‚ β”‚ β”‚ └─┬ static staticMethod() method β”‚ β”‚ β”‚ β”œβ”€β”€ static β”‚ β”‚ β”‚ └── returns: string - β”‚ β”‚ └─┬ 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 + β”‚ β”‚ β”œβ”€β”¬ 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 + β”‚ β”‚ β”‚ └─┬ interface Default + β”‚ β”‚ β”‚ └─┬ members + β”‚ β”‚ β”‚ └─┬ foo property + β”‚ β”‚ β”‚ β”œβ”€β”€ abstract + β”‚ β”‚ β”‚ β”œβ”€β”€ immutable + β”‚ β”‚ β”‚ └── type: number + β”‚ β”‚ └─┬ union β”‚ β”‚ └─┬ types - β”‚ β”‚ β”œβ”€β”¬ class MyClass - β”‚ β”‚ β”‚ β”œβ”€β”€ interfaces: INamespaced + β”‚ β”‚ β”œβ”€β”¬ class ConsumesUnion + β”‚ β”‚ β”‚ └─┬ members + β”‚ β”‚ β”‚ └─┬ static unionType(param) method + β”‚ β”‚ β”‚ β”œβ”€β”€ static + β”‚ β”‚ β”‚ β”œβ”€β”¬ parameters + β”‚ β”‚ β”‚ β”‚ └─┬ param + β”‚ β”‚ β”‚ β”‚ └── type: jsii-calc.union.IResolvable | jsii-calc.union.Resolvable | @scope/jsii-calc-lib.IFriendly + β”‚ β”‚ β”‚ └── returns: void + β”‚ β”‚ β”œβ”€β”¬ class Resolvable + β”‚ β”‚ β”‚ β”œβ”€β”€ interfaces: IResolvable β”‚ β”‚ β”‚ └─┬ 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 - β”‚ β”‚ └─┬ interface Default + β”‚ β”‚ β”‚ └─┬ resolve() method + β”‚ β”‚ β”‚ └── returns: any + β”‚ β”‚ └─┬ interface IResolvable β”‚ β”‚ └─┬ members - β”‚ β”‚ └─┬ foo property + β”‚ β”‚ └─┬ resolve() method β”‚ β”‚ β”œβ”€β”€ abstract - β”‚ β”‚ β”œβ”€β”€ immutable - β”‚ β”‚ └── type: number + β”‚ β”‚ └── returns: any β”‚ └─┬ types β”‚ β”œβ”€β”¬ class AbstractClass β”‚ β”‚ β”œβ”€β”€ base: AbstractClassBase @@ -3703,16 +3726,17 @@ exports[`signatures 1`] = ` β”‚ β”‚ β”œβ”€β”€ sub1 β”‚ β”‚ └── sub2 β”‚ β”œβ”€β”€ onlystatic - β”‚ └─┬ submodule - β”‚ └─┬ submodules - β”‚ β”œβ”€β”€ back_references - β”‚ β”œβ”€β”€ child - β”‚ β”œβ”€β”€ isolated - β”‚ β”œβ”€β”¬ nested_submodule - β”‚ β”‚ └─┬ submodules - β”‚ β”‚ └── deeplyNested - β”‚ β”œβ”€β”€ param - β”‚ └── returnsparam + β”‚ β”œβ”€β”¬ submodule + β”‚ β”‚ └─┬ submodules + β”‚ β”‚ β”œβ”€β”€ back_references + β”‚ β”‚ β”œβ”€β”€ child + β”‚ β”‚ β”œβ”€β”€ isolated + β”‚ β”‚ β”œβ”€β”¬ nested_submodule + β”‚ β”‚ β”‚ └─┬ submodules + β”‚ β”‚ β”‚ └── deeplyNested + β”‚ β”‚ β”œβ”€β”€ param + β”‚ β”‚ └── returnsparam + β”‚ └── union β”œβ”€β”€ @scope/jsii-calc-base β”œβ”€β”€ @scope/jsii-calc-base-of-base └─┬ @scope/jsii-calc-lib @@ -3827,40 +3851,45 @@ exports[`types 1`] = ` β”‚ β”‚ β”œβ”€β”¬ onlystatic β”‚ β”‚ β”‚ └─┬ types β”‚ β”‚ β”‚ └── class OnlyStaticMethods - β”‚ β”‚ └─┬ 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 + β”‚ β”‚ β”œβ”€β”¬ 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 + β”‚ β”‚ β”‚ └── interface Default + β”‚ β”‚ └─┬ union β”‚ β”‚ └─┬ types - β”‚ β”‚ β”œβ”€β”€ class MyClass - β”‚ β”‚ └── interface Default + β”‚ β”‚ β”œβ”€β”€ class ConsumesUnion + β”‚ β”‚ β”œβ”€β”€ class Resolvable + β”‚ β”‚ └── interface IResolvable β”‚ └─┬ types β”‚ β”œβ”€β”€ class AbstractClass β”‚ β”œβ”€β”€ class AbstractClassBase diff --git a/packages/jsii-reflect/test/__snapshots__/type-system.test.js.snap b/packages/jsii-reflect/test/__snapshots__/type-system.test.js.snap index 88b91e4af3..4175895716 100644 --- a/packages/jsii-reflect/test/__snapshots__/type-system.test.js.snap +++ b/packages/jsii-reflect/test/__snapshots__/type-system.test.js.snap @@ -189,6 +189,8 @@ exports[`TypeSystem.classes lists all the classes in the typesystem 1`] = ` "jsii-calc.submodule.isolated.Kwargs", "jsii-calc.submodule.nested_submodule.Namespaced", "jsii-calc.submodule.returnsparam.ReturnsSpecialParameter", + "jsii-calc.union.ConsumesUnion", + "jsii-calc.union.Resolvable", ] `; diff --git a/tsconfig-base.json b/tsconfig-base.json index 9b3a340c0f..e8d41fbe6f 100644 --- a/tsconfig-base.json +++ b/tsconfig-base.json @@ -21,5 +21,6 @@ "composite": true, /* Ensure TypeScript can determine where to find the outputs of the referenced project to compile project. */ "incremental": true, /* Enable incremental compilation by reading/writing information from prior compilations to a file on disk. */ "useDefineForClassFields": false, /* Use Object.defineProperty for introducing class fields. */ + "skipLibCheck": true, /* Skip type checking of declaration files. */ } }