-
Notifications
You must be signed in to change notification settings - Fork 16
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
remove 'Number' from public property names #5
Comments
I'm not quite following. Are you referring to I don't think the names were chosen to indicate the type of the variable, but I'm definitely not opposed to changing the names, if they cause a problem. |
@oliversalzburg yes, those two properties are exactly what I was referring to. It's not a problem, as much as it is inconvenient. |
@oliversalzburg getters would solve it for me. |
@capaj Just to make sure, I assume your use case isn't covered by stacktrace-gps? |
@oliversalzburg I am actually using it to get the actual line/column of a location where error was thrown. I will probably use it-it does exactly what I need. Once I figure out how to get source maps out of SystemJS |
The property names are intended to be as similar to Gecko and V8 Error stack representations. A getter would work, but stackframe is intended for use even in browsers that don't support ES5 getters. We could provide that and a polyfill, but that would significantly impact the library size. We could perhaps add aliases such that |
It is not a good practice to indicate a property type in it's name. If you want to specify it, JSDOC is much better place to do it.
I have been using stacktrace recently in conjunction with source-map from Mozilla and I had to remap stackframe objects to fit
because that is a kind of object that they expect. I think it would make sense to unify the naming conventions in Mozilla's favour. What do you think @oliversalzburg ?
The text was updated successfully, but these errors were encountered: