Replies: 1 comment
-
Independent to different options, I like the "Additional: Enhanced TSDoc Documentation and Consistent Naming" section 😃 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Context
We need to decide on the best approach for organizing/documenting our convenience functions to make them easily discoverable.
Below are the some ideas I could come up with. Please add your comments on your preferred approach/make suggestions that have not been considered.
Current Approach
Note: lama guard and masking functions are added only as examples here.
Ideas
1. Namespace-style Organization (Current Approach:
ContentFilters.buildX()
)Pros:
Cons:
Object grouping generally not a common practice in modern JavaScript/TypeScript
Impacts tree-shaking (excl. sub-path approach)
Discovery relies on knowing the namespace/path
(Object grouping) Inconsistent naming patterns between config properties and their corresponding namespaces. This makes it unintuitive to guess the namespace name from the config property
2. Named Function Imports
Pros:
Cons:
3. Factory Function Approach (Like resilience example in Cloud SDK)
Pros:
Cons:
Additional: Enhanced TSDoc Documentation and Consistent Naming
Questions for Discussion
Decision
Beta Was this translation helpful? Give feedback.
All reactions