Open yoav-steinberg opened 3 months ago
Hi,
This issue hasn't seen activity in 90 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!
Use Case
When a JSII static methods is used to generate constructs (a factory) it usually accepts an
scope
as it's first argument. The scope is then used as the target scope for instances generated inside the static method. For example the CDK's[Bucket.fromBucketName]
(https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3.Bucket.html#static-fromwbrbucketwbrnamescope-id-bucketname) receives ascope
as it's first argument.Since wing supports passing the
scope
argument implicitly to static methods we can detect this and enable calling these imported methods with the implicit scope or using the wingin
keyword to override the implicit scope:Note that supporting this requires adding the
in
explicit scoping specifier to all static methods in wing (not only JSII).Proposed Solution
No response
Implementation Notes
No response
Component
Compiler
Community Notes