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

set isTracked on getter #20571

Closed
wants to merge 1 commit into from
Closed

set isTracked on getter #20571

wants to merge 1 commit into from

Conversation

patricklx
Copy link
Contributor

Instead of the descriptor. It's just ignored by defineProperty.

This would make it useful for the inspector to detect tracked property without hacks

Instead of the descriptor. It's just ignored by defineProperty
@chancancode
Copy link
Member

Can you expose this as

@chancancode
Copy link
Member

Can you expose these APIs with functions instead? maybe _hasOwnTrackedProperty and _hasTrackedProperty with the latter walking the prototype chain. Put it in some internal module and make it as @internal until we can RFC it. Probably better to keep track of this with WeakMap of Sets instead of mutating the function.

@patricklx
Copy link
Contributor Author

I just saw that i can do meta(obj). peekDescriptor(prop) instanceof TrackedDescriptor

@patricklx patricklx closed this Nov 9, 2023
@patricklx patricklx deleted the patch-1 branch November 9, 2023 21:27
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.

2 participants