Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing of type unions #193

Closed
5 of 7 tasks
RomainMuller opened this issue Jul 6, 2020 · 2 comments
Closed
5 of 7 tasks

Fixing of type unions #193

RomainMuller opened this issue Jul 6, 2020 · 2 comments
Assignees
Labels
management/tracking status/stale The RFC did not get any significant enough progress or tracking and has become stale.

Comments

@RomainMuller
Copy link
Contributor

RomainMuller commented Jul 6, 2020

PR Champion
#194 @RomainMuller

Description

Usage of TypeScript type unions has proven to be a source of problems when representing APIs in statically typed languages, such as Java and C#. This proposal is about fixing type unions to address these developer experience issues.

This is a candidate change for v2

Progress

  • Tracking Issue Created
  • RFC PR Created
  • Core Team Member Assigned
  • Initial Approval / Final Comment Period
  • Ready For Implementation
    • implementation issue 1
  • Resolved
@RomainMuller RomainMuller self-assigned this Jul 6, 2020
RomainMuller added a commit that referenced this issue Jul 7, 2020
RomainMuller added a commit that referenced this issue Jul 7, 2020
@eladb eladb added status/review Proposal pending review/revision and removed status/proposed Newly proposed RFC labels Jul 9, 2020
@RomainMuller RomainMuller changed the title Removal of type unions Fixing of type unions Jul 17, 2020
@RomainMuller RomainMuller added the status/final-comment-period Pending final approval label Jul 20, 2020
@RomainMuller
Copy link
Contributor Author

@onefuncman - You had objected on the initial premise... It's been changed and I think you might like it better :)

@eladb eladb removed the status/review Proposal pending review/revision label Jul 20, 2020
mergify bot pushed a commit to aws/jsii that referenced this issue Oct 28, 2020
In order to allow converting an opaque object instance to an arbitrary
(jsii-managed) interface type, the `UnsafeCase` operation may be used to
instantiate a proxy while bypassing all type consistency checks.

This is similar to using `as any` or `as T` in TypeScript, meaning that
if the user performs a cast to an incorrect/unsupported type, undefined
behavior follows.

This would unblock certain specific use-case scenarios that static
languages render difficult to enact, such as the one described in
aws/aws-cdk#3284.

In particular, this is the only way out until aws/aws-cdk-rfcs#193
is delivered, for dealing with instances of interfaces returned through
a type union API.

---

By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license].

[Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
@eladb eladb added status/proposed Newly proposed RFC and removed status/final-comment-period Pending final approval labels Aug 4, 2021
@mrgrain mrgrain added status/stale The RFC did not get any significant enough progress or tracking and has become stale. and removed status/proposed Newly proposed RFC labels Oct 27, 2023
@mrgrain
Copy link
Contributor

mrgrain commented Oct 27, 2023

There is a significant proposal, but no current owner. Closing as stale.

@mrgrain mrgrain closed this as not planned Won't fix, can't repro, duplicate, stale Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
management/tracking status/stale The RFC did not get any significant enough progress or tracking and has become stale.
Projects
None yet
Development

No branches or pull requests

3 participants