Skip to content

Improve getDescriptor for inherited methods#50

Merged
sheremet-va merged 2 commits intotinylibs:mainfrom
david2tm:inherited-getter-setter-spyon
Apr 17, 2025
Merged

Improve getDescriptor for inherited methods#50
sheremet-va merged 2 commits intotinylibs:mainfrom
david2tm:inherited-getter-setter-spyon

Conversation

@david2tm
Copy link
Copy Markdown
Contributor

@david2tm david2tm commented Apr 2, 2025

When looking for getter/setter descriptor, we should go deeper for prototypes.

Fixes #49

getDescriptor will now "dig" until it finds getOwnPropertyDescriptor or there are no more getPrototypeOf available.

Copy link
Copy Markdown

@hi-ogawa hi-ogawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! (approving though I don't have permission on this repo)

@david2tm david2tm requested a review from sheremet-va April 8, 2025 07:32
@sheremet-va sheremet-va merged commit 0684083 into tinylibs:main Apr 17, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot spy on inherited getters/setters

3 participants