stacktracejs / stackframe

JS Object representation of a stack frame.
https://www.stacktracejs.com/#!/docs/stackframe
MIT License
77 stars 16 forks source link

Confusing property/get/set API #63

Open steverep opened 1 year ago

steverep commented 1 year ago

Expected Behavior

For the StackFrame object, I would expect a very simple way to get and set properties:

That should be the API regardless of whether or not it is implemented as a getter/setter pair. If there is extra work to do for either, then a getter/setter pair should be used with a hidden property like stackframe._filename, which the user should not be instructed to access directly.

Current Behavior

The current API is confusing and does not make use of actual JS getters and setters. For example:

Furthermore, the typings for the set methods have zero parameters defined.