Skip to content

Intersection types #4906

@rix0rrr

Description

@rix0rrr

jsii-compiler

  • Recognize intersection types
  • Reject intersection types in output position
  • Check for incompatibility between intersection types
    • must both be interfaces
    • same-named props must match
    • intersection types may not appear as constructor arguments (C#, Java)

Runtime

  • Update to C# runtime
  • Update to jsii kernel

jsii-rosetta

  • Can pass arguments to intersected functions
  • Don't need to be able to declare intersected functions in an example

cdk-generate-synthetic-examples

  • Synthetic example generation for intersection types

jsii-reflect

  • Make jsii-reflect print intersection types

jsii-diff

  • Make jsii-diff allow updates to intersection types
  • Needs a release of jsii-compiler before we can write tests 🤬

jsii-pacmak

  • Output correct type decls for Java
  • Output correct type decls for C#
  • Output correct type decls for Python
  • Emit Python RTT
  • Output correct type decls for Go
  • If we're here anyway, generate documentation on expected types for union types where we collapse to object in C# and Java

docs

  • API generator should generate sensible output
  • jsii-docgen should generate sensible output
  • jsii documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/largeLarge work item – several weeks of effortfeature-requestA feature should be added or improved.p1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions