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
As a developer working with Custom Elements classes that have their class members available in runtime, I would like to use Symbol to hide internal methods and properties from the public API.
The drawback of this approach is that "go to definition" currently does not recognise the case when Symbol is used for a method, and jumps to the place where the Symbol itself is defined.
I'm not sure whether this is a bug or feature.
TypeScript Version: 3.8.0-dev.20191126
Search Terms: Go to definition, ECMAScript Symbols, Symbol
I didn't found any related issue but the approach with using ES2015 Symbols was suggested to be used as a workaround for protected methods in mixins at #17744 (comment)
The text was updated successfully, but these errors were encountered:
As a developer working with Custom Elements classes that have their class members available in runtime, I would like to use
Symbol
to hide internal methods and properties from the public API.The drawback of this approach is that "go to definition" currently does not recognise the case when
Symbol
is used for a method, and jumps to the place where the Symbol itself is defined.I'm not sure whether this is a bug or feature.
TypeScript Version: 3.8.0-dev.20191126
Search Terms: Go to definition, ECMAScript Symbols, Symbol
Code
Expected behavior:
When clicking on
super[method]
, it should be possible to go to the line 4.Actual behavior:
When clicking on
super[method]
, go to definition moves to the line 1.Playground Link: https://www.typescriptlang.org/play/?ts=3.8.0-dev.20191126&ssl=1&ssc=1&pln=38&pc=2#code/MYewdgzgLgBAtgUygCxAExgXhgZQJ5wBGIANgBQDkiK6FAlANwBQTwJAhhBDAArsBOCMLADeTGBJgAHfiCgJg8jAG1qqNAF0ydGGMn6YgqAFd+YGBSkChUCs30BfJk9YcuMAMLIAliQwIAD3kwNG4+QWFdcUkZOQUlGFUkdS0dPQMJI1NzCGMpBH4kmk1tGABqCxhgHz87aIknJyA
Related Issues:
I didn't found any related issue but the approach with using ES2015 Symbols was suggested to be used as a workaround for
protected
methods in mixins at #17744 (comment)The text was updated successfully, but these errors were encountered: