You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use jsii reflect to get an arbitrary member from a class, I expected to be able to access a locationInModule property since every property and method on a class or interface has a source code location. However, the current types report this as an error since cls.allMembers returns TypeMember[], and TypeMember extends Documentable but not SourceLocatable.
Fixes#3777
---
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
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Describe the bug
When I use jsii reflect to get an arbitrary member from a class, I expected to be able to access a
locationInModule
property since every property and method on a class or interface has a source code location. However, the current types report this as an error sincecls.allMembers
returnsTypeMember[]
, andTypeMember
extendsDocumentable
but notSourceLocatable
.Expected Behavior
I expected
member.locationInModule
to not return a type checking error.Current Behavior
I get a TypeScript error
Property 'locationInModule' does not exist on type 'TypeMember'.
Reproduction Steps
See code snippet above
Possible Solution
No response
Additional Information/Context
No response
SDK version used
jsii 1.68.0
Environment details (OS name and version, etc.)
N/A
The text was updated successfully, but these errors were encountered: