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
In this type, MapType is the value allowed by this map. But there are no key restrictions for this type. So in the downstream code, I have to write many as for typecasting.
Also, there are no restrictions on both in yDoc.
constyMap=doc.getMap('x')// not a good typeconstyMap2=doc.getMap('x')asY.Map<string|number>yMap.get('1')// this is string or number
The expected types
This is an example from my repository that enhances the map type.
Currently, yjs do have some typescript decorations for basic usage, but it needs to be stronger and more understood by people in typescript.
For example,
In this type, MapType is the value allowed by this map. But there are no key restrictions for this type. So in the downstream code, I have to write many
as
for typecasting.Also, there are no restrictions on both in yDoc.
The expected types
This is an example from my repository that enhances the map type.
The text was updated successfully, but these errors were encountered: