gcode-preview
gcode-preview copied to clipboard
Mark members as public / private
I've never consciously decided which members should be publicly accessible and which shouldn't. De facto this means all members are accessible and changing the names of these members or their signatures may theoretically break someone's code. Even if these members were never meant to be used directly.
It needs to be made explicit what can be accessed publicly.
HOW
- use
privateto hide member. This will cause the bundler to mangle the names of those members. Causing code to break. - log a deprecation warning. Doesn't break anyone's code. But means we're kicking the can down the road
Which members?
- since the constructor options are obviously pubic, it makes sense to also make their accompanying properties public
- these also must be public:
- init
- render
- processGCode
- clear
- _readFromStream
- resize
Can we safely make everything else private? Can we make the parser private?