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
Currently, we have a target structure where we differentiate between classes, methods, functions, objects, and object functions.
This requires that during the collection of the targets, we keep track of what kind of sub-target we are currently in.
This can be pretty challenging, especially when properties are dynamically added, as in the following example:
class a {
methodOne() {
this.methodTwo = () => {...}
}
}
Or:
const a = {}
a.methodOne = () => {...}
Or:
const a = {
b: class {}
}
a.b.methodOne = () => {...}
These example show that it is difficult to keep track of what is a class and what is an object during the target discover.
Now since javascript internally uses object for classes anyway we can convert our entire targeting structure to be as follows:
Currently, we have a target structure where we differentiate between classes, methods, functions, objects, and object functions.
This requires that during the collection of the targets, we keep track of what kind of sub-target we are currently in.
This can be pretty challenging, especially when properties are dynamically added, as in the following example:
Or:
Or:
These example show that it is difficult to keep track of what is a class and what is an object during the target discover.
Now since javascript internally uses object for classes anyway we can convert our entire targeting structure to be as follows:
The text was updated successfully, but these errors were encountered: