gcode-preview icon indicating copy to clipboard operation
gcode-preview copied to clipboard

Mark members as public / private

Open remcoder opened this issue 1 year ago • 0 comments

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 private to 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?

remcoder avatar Mar 15 '24 23:03 remcoder