Many public APIs currently typed to any
should be constrained to Serializable
#1239
Labels
api
area: dev experience
Improving the experience of devs building on top of fluid
area: runtime
Runtime related issues
Many of our public APIs predate
Serializable
, and instead are incorrectly typed asany
, 'IMapLike,
PropertySet`, etc. (which are all overly permissive.) Usually, this manifests as data loss when the values are transmitted to remote clients or reloaded from a snapshot.Constraining these types to
<T extends Serializable = Serializable>
would help guard against accidental loss at compile time. (See runtime/matrix/src/matrix.ts as an example).The text was updated successfully, but these errors were encountered: