ember-inspector
ember-inspector copied to clipboard
Introduce API to allow objects to "opt out" of introspection on specific properties.
In #1106, we introduced a obj instanceof GlimmerComponent style check because @glimmer/[email protected] includes a few properties that throw errors when accessed (they are not intended to be used in Ember, and we provide helpful errors so that folks don't try to use them due to typing inconsistencies between Ember and Glimmer.js). In order to remove our special exemption for @glimmer/component I'd like to propose adding a mechanism that can be used to instruct the ember-inspector to completely ignore specific properties.
Off the top of my head, I have two proposed solutions here:
- allow objects to add an
__emberInspectorIgnoreproperty as an array of property names to ignore - have the ember-inspector add a "well known function" to the global that can be used to register these instructions directly with the inspector
Either of these would work, or we can pick another path, but I'd like to decide a resolution so that we can remove the need to special case @glimmer/component as done in #1106.
I guess this is fixed by the linked PR? There would also have been this possiblity: https://github.com/emberjs/ember-inspector/wiki/customize-debug-info-of-components