@yorkie-js/sdk 0.6.41-rc2 → 0.6.41-rc3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4534,9 +4534,13 @@ export declare type PanelToSDKMessage =
4534
4534
  * ```typescript
4535
4535
  * const data = parse('{"content":Text([{"val":"Hi"}])}');
4536
4536
  * // { content: { type: 'Text', nodes: [{ val: 'Hi' }] } }
4537
+ *
4538
+ * // With type parameter:
4539
+ * const data = parse<{ content: YSONText }>('{"content":Text([{"val":"Hi"}])}');
4540
+ * // data.content is now typed as YSONText
4537
4541
  * ```
4538
4542
  */
4539
- declare function parse(yson: string): YSONValue {
4543
+ declare function parse<T = YSONValue>(yson: string): T {
4540
4544
  try {
4541
4545
  // Preprocess YSON string to handle special types
4542
4546
  const processed = preprocessYSON(yson);
@@ -4545,7 +4549,7 @@ declare function parse(yson: string): YSONValue {
4545
4549
  const parsed = JSON.parse(processed);
4546
4550
 
4547
4551
  // Post-process to restore type information
4548
- return postprocessValue(parsed);
4552
+ return postprocessValue(parsed) as T;
4549
4553
  } catch (err) {
4550
4554
  throw new YorkieError(
4551
4555
  Code.ErrInvalidArgument,
@@ -6752,15 +6756,15 @@ export declare type WrappedElement<T = unknown, A extends Indexable = Indexable>
6752
6756
  declare namespace YSON {
6753
6757
  export {
6754
6758
  YSONValue,
6755
- YSONText,
6756
- YSONTree,
6757
- YSONTextNode,
6758
- YSONTreeNode,
6759
- YSONInt,
6760
- YSONLong,
6761
- YSONDate,
6762
- YSONBinData,
6763
- YSONCounter,
6759
+ YSONText as Text,
6760
+ YSONTree as Tree,
6761
+ YSONTextNode as TextNode,
6762
+ YSONTreeNode as TreeNode,
6763
+ YSONInt as Int,
6764
+ YSONLong as Long,
6765
+ YSONDate as Date,
6766
+ YSONBinData as BinData,
6767
+ YSONCounter as Counter,
6764
6768
  isText,
6765
6769
  isTree,
6766
6770
  isInt,
@@ -6774,6 +6778,7 @@ declare namespace YSON {
6774
6778
  treeToXML
6775
6779
  }
6776
6780
  }
6781
+ export { YSON }
6777
6782
 
6778
6783
  /**
6779
6784
  * `YSONBinData` represents Base64-encoded binary data.
@@ -19014,7 +19014,7 @@ function createAuthInterceptor(apiKey, token) {
19014
19014
  };
19015
19015
  }
19016
19016
  const name = "@yorkie-js/sdk";
19017
- const version = "0.6.41-rc2";
19017
+ const version = "0.6.41-rc3";
19018
19018
  const pkg = {
19019
19019
  name,
19020
19020
  version
@@ -20849,6 +20849,7 @@ export {
20849
20849
  TimeTicket,
20850
20850
  Tree,
20851
20851
  VersionVector,
20852
+ YSON,
20852
20853
  converter,
20853
20854
  yorkie as default,
20854
20855
  setLogLevel