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, all exported classes are stored in a separate api folder. Each class actually a wrapper around the corresponding "private" class with some methods/arguments removed.
Pros of this approach:
not possible to accidentally expose something to the public API
Cons:
documentation duplicated, boilerplate code
In some cases there is the same interface of "private" class and exposed one, for example, AciContractCallEncoder can be exported as
Additionally, traditional approaches to specify visibility of a class method may be used, like prefixing with _ (to be able to access in other library classes), or prefixing with # to make it a proper private method. Then wrapping classes won't be necessary.
The text was updated successfully, but these errors were encountered:
Currently, all exported classes are stored in a separate
api
folder. Each class actually a wrapper around the corresponding "private" class with some methods/arguments removed.Pros of this approach:
Cons:
In some cases there is the same interface of "private" class and exposed one, for example,
AciContractCallEncoder
can be exported aswithout exposing anything extra.
Additionally, traditional approaches to specify visibility of a class method may be used, like prefixing with
_
(to be able to access in other library classes), or prefixing with#
to make it a proper private method. Then wrapping classes won't be necessary.The text was updated successfully, but these errors were encountered: