microsoft / FluidFramework

Library for building distributed, real-time collaborative web applications
https://fluidframework.com
MIT License
4.7k stars 528 forks source link

More explicit typing for PendingStateManager.savedOps #21956

Open markfields opened 1 month ago

markfields commented 1 month ago

Description

Reading through this code, I was uncertain when IPendingMessage.sequenceNumber should/must be present or not. I found that it's actually very unambiguous in practice - it's only used after a local message is processed and moved to the savedOps array. So I updated the typing to reflect that.

Got to remove a runtime assert now that TypeScript is helping.

msfluid-bot commented 1 month ago
@fluid-example/bundle-size-tests: +269 Bytes
Metric NameBaseline SizeCompare SizeSize Diff
aqueduct.js 457.46 KB 457.5 KB +41 Bytes
azureClient.js 555.23 KB 555.28 KB +55 Bytes
connectionState.js 680 Bytes 680 Bytes No change
containerRuntime.js 258.67 KB 258.69 KB +20 Bytes
fluidFramework.js 405.94 KB 405.95 KB +14 Bytes
loader.js 134.04 KB 134.05 KB +14 Bytes
map.js 42.13 KB 42.14 KB +7 Bytes
matrix.js 145.61 KB 145.62 KB +7 Bytes
odspClient.js 523.37 KB 523.43 KB +55 Bytes
odspDriver.js 97.55 KB 97.57 KB +21 Bytes
odspPrefetchSnapshot.js 42.61 KB 42.62 KB +14 Bytes
sharedString.js 162.62 KB 162.63 KB +7 Bytes
sharedTree.js 396.45 KB 396.46 KB +7 Bytes
Total Size 3.3 MB 3.3 MB +269 Bytes

Baseline commit: bfbef34ed3db0ed08b03ecdb1de31a3b948fbcdd

Generated by :no_entry_sign: dangerJS against d086bf97fb05ad62e1fb1355a5e16411888b838c