Skip to content

Commit

Permalink
Merge pull request #9 from joulev/fix-ytext-type
Browse files Browse the repository at this point in the history
Fix typing when `useY` is used with `Y.Text`
  • Loading branch information
nikgraf authored Oct 26, 2024
2 parents 8993906 + dcdd9d2 commit 3b8af2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-yjs/src/useY.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type YTypeToJson<YType> =
? Array<YTypeToJson<Value>>
: YType extends Y.Map<infer MapValue>
? { [key: string]: YTypeToJson<MapValue> }
: YType extends Y.XmlFragment | Y.XmlText
: YType extends Y.XmlFragment | Y.XmlText | Y.Text
? string
: YType;

Expand Down

0 comments on commit 3b8af2d

Please sign in to comment.