Closed cortfritz closed 1 week ago
The pull request introduces several documentation enhancements across multiple modules in the Yex
library, including Yex.DocServer
, Yex.Array
, Yex.Map
, Yex.Text
, and Yex
. Key changes include the deprecation of the get/2
function in both Yex.Array
and Yex.Map
, replaced by fetch/2
, and improved clarity in function documentation, particularly for callbacks and error handling. The overall functionality and signatures of the functions remain unchanged, focusing on enhancing documentation clarity and consistency.
File Path | Change Summary |
---|---|
lib/server/doc_server.ex | - Updated @moduledoc from "Example" to "Examples". - Enhanced @doc for handle_update_v1 , handle_awareness_change , and init with detailed descriptions. |
lib/shared_type/array.ex | - Deprecated get/2 , redirecting to fetch/2 . - Enhanced documentation for fetch/2 , insert_list/3 , to_list/1 , length/1 , and to_json/1 with new examples. |
lib/shared_type/map.ex | - Deprecated get/2 , introduced fetch!/2 . - Updated documentation for fetch/2 and to_json/1 with clearer examples. |
lib/shared_type/text.ex | - Updated documentation for to_delta and from functions to clarify examples. |
lib/y_ex.ex | - Updated documentation for apply_update for consistency. - Refined error handling in encode_state_as_update! to raise specific ArgumentError . |
Yex.DocServer
module that enhance its functionality, related to the changes in this PR.Yex.Sync.SharedDoc
module to utilize Yex.DocServer
, indicating a direct relationship with the modifications in the document server's handling.🐇 In the land of code, where rabbits play,
Documentation blooms, brightening the way.
Functions deprecated, new paths we find,
Clarity reigns, leaving confusion behind.
With each little change, our code's a delight,
Hopping along, making everything right! 🌟
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
It looks like the comments for Yex.apply_update were copied. Update replaces the copied text that was specific to the original comment with correct explanation.
Optionally, could just delete the copied text, happy to submit that PR instead.
Summary by CodeRabbit
Documentation Updates
Deprecations
get/2
function as deprecated in bothYex.Array
andYex.Map
, redirecting users tofetch/2
.New Features
fetch!/2
function inYex.Map
for improved error handling.