jsii icon indicating copy to clipboard operation
jsii copied to clipboard

Override JavaScript methods

Open cchidhu opened this issue 1 year ago • 1 comments

Describe the bug

I have the following TypeScript class where one of the methods needs to be overridden in the implementation. I am ensuring this in the constructor. image

Implementation of the above class in Python, image

The foreign application implementing the above class is experiencing unexpected results even after the 'dummy_green_method' is overridden in the implementation. I expect the super constructor not to throw an error in the implementation because the method has been overridden. However, this is not the case. Please provide guidance on what I might be missing here.

Expected Behavior

The above implementation should throw an error while declaring an object.

Current Behavior

It's throwing an error because in the base constructor dummy_green_method is not overridden.

Reproduction Steps

Provided in the problem description.

Possible Solution

No response

Additional Information/Context

No response

SDK version used

1.69.0

Environment details (OS name and version, etc.)

macOS/13.6 (22G120)

cchidhu avatar Oct 22 '23 13:10 cchidhu

I suspect this might not be possible as described here: https://aws.github.io/jsii/user-guides/language-support/callbacks/ However the case is definitely not clearly described in the docs. Needs checking.

mrgrain avatar Apr 09 '24 11:04 mrgrain