@fluidframework/tree 2.72.0 → 2.74.0-365691

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.
Files changed (696) hide show
  1. package/CHANGELOG.md +99 -0
  2. package/api-report/tree.alpha.api.md +32 -31
  3. package/dist/alpha.d.ts +7 -1
  4. package/dist/api.d.ts +6 -2
  5. package/dist/api.d.ts.map +1 -1
  6. package/dist/api.js +2 -11
  7. package/dist/api.js.map +1 -1
  8. package/dist/codec/codec.d.ts +9 -2
  9. package/dist/codec/codec.d.ts.map +1 -1
  10. package/dist/codec/codec.js +9 -2
  11. package/dist/codec/codec.js.map +1 -1
  12. package/dist/codec/index.d.ts +1 -1
  13. package/dist/codec/index.d.ts.map +1 -1
  14. package/dist/codec/index.js +2 -1
  15. package/dist/codec/index.js.map +1 -1
  16. package/dist/codec/versioned/codec.d.ts +7 -2
  17. package/dist/codec/versioned/codec.d.ts.map +1 -1
  18. package/dist/codec/versioned/codec.js +24 -1
  19. package/dist/codec/versioned/codec.js.map +1 -1
  20. package/dist/codec/versioned/index.d.ts +1 -1
  21. package/dist/codec/versioned/index.d.ts.map +1 -1
  22. package/dist/codec/versioned/index.js +2 -1
  23. package/dist/codec/versioned/index.js.map +1 -1
  24. package/dist/core/schema-stored/schema.d.ts +12 -1
  25. package/dist/core/schema-stored/schema.d.ts.map +1 -1
  26. package/dist/core/schema-stored/schema.js.map +1 -1
  27. package/dist/core/tree/detachedFieldIndexCodecs.d.ts.map +1 -1
  28. package/dist/core/tree/detachedFieldIndexCodecs.js +5 -3
  29. package/dist/core/tree/detachedFieldIndexCodecs.js.map +1 -1
  30. package/dist/feature-libraries/chunked-forest/chunkTree.d.ts +4 -5
  31. package/dist/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  32. package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  33. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  34. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js +1 -0
  35. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  36. package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts +2 -1
  37. package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts.map +1 -1
  38. package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
  39. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +3 -3
  40. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  41. package/dist/feature-libraries/chunked-forest/codec/codecs.js +32 -18
  42. package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  43. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +6 -6
  44. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
  45. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js +4 -2
  46. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  47. package/dist/feature-libraries/chunked-forest/codec/format.d.ts +156 -4
  48. package/dist/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
  49. package/dist/feature-libraries/chunked-forest/codec/format.js +7 -3
  50. package/dist/feature-libraries/chunked-forest/codec/format.js.map +1 -1
  51. package/dist/feature-libraries/chunked-forest/codec/formatGeneric.d.ts +8 -3
  52. package/dist/feature-libraries/chunked-forest/codec/formatGeneric.d.ts.map +1 -1
  53. package/dist/feature-libraries/chunked-forest/codec/formatGeneric.js +4 -1
  54. package/dist/feature-libraries/chunked-forest/codec/formatGeneric.js.map +1 -1
  55. package/dist/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.d.ts +2 -2
  56. package/dist/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.d.ts.map +1 -1
  57. package/dist/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.js.map +1 -1
  58. package/dist/feature-libraries/chunked-forest/codec/index.d.ts +1 -1
  59. package/dist/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
  60. package/dist/feature-libraries/chunked-forest/codec/index.js +2 -1
  61. package/dist/feature-libraries/chunked-forest/codec/index.js.map +1 -1
  62. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +13 -13
  63. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
  64. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +23 -6
  65. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
  66. package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts +9 -8
  67. package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts.map +1 -1
  68. package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.js +20 -4
  69. package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.js.map +1 -1
  70. package/dist/feature-libraries/chunked-forest/index.d.ts +1 -1
  71. package/dist/feature-libraries/chunked-forest/index.d.ts.map +1 -1
  72. package/dist/feature-libraries/chunked-forest/index.js +2 -1
  73. package/dist/feature-libraries/chunked-forest/index.js.map +1 -1
  74. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts +35 -17
  75. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  76. package/dist/feature-libraries/default-schema/defaultFieldKinds.js +53 -55
  77. package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  78. package/dist/feature-libraries/default-schema/index.d.ts +1 -3
  79. package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
  80. package/dist/feature-libraries/default-schema/index.js +2 -8
  81. package/dist/feature-libraries/default-schema/index.js.map +1 -1
  82. package/dist/feature-libraries/forest-summary/forestSummarizer.js +1 -1
  83. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  84. package/dist/feature-libraries/forest-summary/format.d.ts +2 -2
  85. package/dist/feature-libraries/forest-summary/format.d.ts.map +1 -1
  86. package/dist/feature-libraries/forest-summary/format.js +4 -2
  87. package/dist/feature-libraries/forest-summary/format.js.map +1 -1
  88. package/dist/feature-libraries/index.d.ts +5 -4
  89. package/dist/feature-libraries/index.d.ts.map +1 -1
  90. package/dist/feature-libraries/index.js +8 -8
  91. package/dist/feature-libraries/index.js.map +1 -1
  92. package/dist/feature-libraries/modular-schema/comparison.d.ts.map +1 -1
  93. package/dist/feature-libraries/modular-schema/comparison.js +1 -2
  94. package/dist/feature-libraries/modular-schema/comparison.js.map +1 -1
  95. package/dist/feature-libraries/modular-schema/fieldKind.d.ts +38 -12
  96. package/dist/feature-libraries/modular-schema/fieldKind.d.ts.map +1 -1
  97. package/dist/feature-libraries/modular-schema/fieldKind.js +29 -11
  98. package/dist/feature-libraries/modular-schema/fieldKind.js.map +1 -1
  99. package/dist/feature-libraries/modular-schema/fieldKindConfiguration.d.ts +2 -2
  100. package/dist/feature-libraries/modular-schema/fieldKindConfiguration.d.ts.map +1 -1
  101. package/dist/feature-libraries/modular-schema/fieldKindConfiguration.js.map +1 -1
  102. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts +2 -2
  103. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  104. package/dist/feature-libraries/modular-schema/genericFieldKind.js +3 -2
  105. package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  106. package/dist/feature-libraries/modular-schema/index.d.ts +0 -1
  107. package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
  108. package/dist/feature-libraries/modular-schema/index.js +1 -3
  109. package/dist/feature-libraries/modular-schema/index.js.map +1 -1
  110. package/dist/feature-libraries/modular-schema/isNeverTree.d.ts +5 -6
  111. package/dist/feature-libraries/modular-schema/isNeverTree.d.ts.map +1 -1
  112. package/dist/feature-libraries/modular-schema/isNeverTree.js.map +1 -1
  113. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts +2 -2
  114. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  115. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  116. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +8 -8
  117. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  118. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +1 -2
  119. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  120. package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts +66 -9
  121. package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +1 -1
  122. package/dist/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  123. package/dist/feature-libraries/object-forest/objectForest.js +3 -2
  124. package/dist/feature-libraries/object-forest/objectForest.js.map +1 -1
  125. package/dist/feature-libraries/optional-field/index.d.ts +1 -1
  126. package/dist/feature-libraries/optional-field/index.d.ts.map +1 -1
  127. package/dist/feature-libraries/optional-field/index.js.map +1 -1
  128. package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
  129. package/dist/feature-libraries/optional-field/optionalFieldCodecs.js +1 -5
  130. package/dist/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
  131. package/dist/feature-libraries/schema-index/codec.d.ts.map +1 -1
  132. package/dist/feature-libraries/schema-index/codec.js +5 -3
  133. package/dist/feature-libraries/schema-index/codec.js.map +1 -1
  134. package/dist/feature-libraries/{default-schema/schemaChecker.d.ts → schemaChecker.d.ts} +2 -2
  135. package/dist/feature-libraries/schemaChecker.d.ts.map +1 -0
  136. package/dist/feature-libraries/{default-schema/schemaChecker.js → schemaChecker.js} +3 -3
  137. package/dist/feature-libraries/schemaChecker.js.map +1 -0
  138. package/dist/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
  139. package/dist/feature-libraries/sequence-field/formatV2.js +1 -0
  140. package/dist/feature-libraries/sequence-field/formatV2.js.map +1 -1
  141. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  142. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.js +0 -2
  143. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
  144. package/dist/feature-libraries/treeCompressionUtils.d.ts +2 -12
  145. package/dist/feature-libraries/treeCompressionUtils.d.ts.map +1 -1
  146. package/dist/feature-libraries/treeCompressionUtils.js +4 -14
  147. package/dist/feature-libraries/treeCompressionUtils.js.map +1 -1
  148. package/dist/index.d.ts +4 -4
  149. package/dist/index.d.ts.map +1 -1
  150. package/dist/index.js +8 -3
  151. package/dist/index.js.map +1 -1
  152. package/dist/packageVersion.d.ts +1 -1
  153. package/dist/packageVersion.d.ts.map +1 -1
  154. package/dist/packageVersion.js +1 -1
  155. package/dist/packageVersion.js.map +1 -1
  156. package/dist/shared-tree/index.d.ts +1 -1
  157. package/dist/shared-tree/index.d.ts.map +1 -1
  158. package/dist/shared-tree/index.js +1 -2
  159. package/dist/shared-tree/index.js.map +1 -1
  160. package/dist/shared-tree/sharedTree.d.ts +7 -54
  161. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  162. package/dist/shared-tree/sharedTree.js +2 -52
  163. package/dist/shared-tree/sharedTree.js.map +1 -1
  164. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts +1 -1
  165. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  166. package/dist/shared-tree/sharedTreeChangeCodecs.js +0 -2
  167. package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  168. package/dist/shared-tree/sharedTreeChangeFamily.d.ts +2 -2
  169. package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  170. package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  171. package/dist/shared-tree/treeCheckout.d.ts +2 -2
  172. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  173. package/dist/shared-tree/treeCheckout.js.map +1 -1
  174. package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  175. package/dist/shared-tree-core/editManagerCodecs.js +12 -6
  176. package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
  177. package/dist/shared-tree-core/editManagerFormatCommons.d.ts +3 -4
  178. package/dist/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
  179. package/dist/shared-tree-core/editManagerFormatCommons.js +5 -8
  180. package/dist/shared-tree-core/editManagerFormatCommons.js.map +1 -1
  181. package/dist/shared-tree-core/index.d.ts +3 -3
  182. package/dist/shared-tree-core/index.d.ts.map +1 -1
  183. package/dist/shared-tree-core/index.js +3 -2
  184. package/dist/shared-tree-core/index.js.map +1 -1
  185. package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
  186. package/dist/shared-tree-core/messageCodecs.js +20 -9
  187. package/dist/shared-tree-core/messageCodecs.js.map +1 -1
  188. package/dist/shared-tree-core/messageFormat.d.ts +4 -6
  189. package/dist/shared-tree-core/messageFormat.d.ts.map +1 -1
  190. package/dist/shared-tree-core/messageFormat.js +9 -7
  191. package/dist/shared-tree-core/messageFormat.js.map +1 -1
  192. package/dist/simple-tree/api/configuration.d.ts +2 -0
  193. package/dist/simple-tree/api/configuration.d.ts.map +1 -1
  194. package/dist/simple-tree/api/configuration.js +10 -0
  195. package/dist/simple-tree/api/configuration.js.map +1 -1
  196. package/dist/simple-tree/api/incrementalAllowedTypes.d.ts +15 -12
  197. package/dist/simple-tree/api/incrementalAllowedTypes.d.ts.map +1 -1
  198. package/dist/simple-tree/api/incrementalAllowedTypes.js +17 -14
  199. package/dist/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
  200. package/dist/simple-tree/api/index.d.ts +2 -1
  201. package/dist/simple-tree/api/index.d.ts.map +1 -1
  202. package/dist/simple-tree/api/index.js +6 -2
  203. package/dist/simple-tree/api/index.js.map +1 -1
  204. package/dist/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
  205. package/dist/simple-tree/api/schemaFromSimple.js +7 -1
  206. package/dist/simple-tree/api/schemaFromSimple.js.map +1 -1
  207. package/dist/simple-tree/api/simpleSchemaCodec.js +4 -6
  208. package/dist/simple-tree/api/simpleSchemaCodec.js.map +1 -1
  209. package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts +103 -0
  210. package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -0
  211. package/dist/simple-tree/api/snapshotCompatibilityChecker.js +128 -0
  212. package/dist/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -0
  213. package/dist/simple-tree/api/tree.d.ts +2 -2
  214. package/dist/simple-tree/api/tree.js +1 -1
  215. package/dist/simple-tree/api/tree.js.map +1 -1
  216. package/dist/simple-tree/core/allowedTypes.js +1 -1
  217. package/dist/simple-tree/core/allowedTypes.js.map +1 -1
  218. package/dist/simple-tree/core/index.d.ts +3 -3
  219. package/dist/simple-tree/core/index.d.ts.map +1 -1
  220. package/dist/simple-tree/core/index.js +3 -1
  221. package/dist/simple-tree/core/index.js.map +1 -1
  222. package/dist/simple-tree/core/toStored.d.ts +12 -5
  223. package/dist/simple-tree/core/toStored.d.ts.map +1 -1
  224. package/dist/simple-tree/core/toStored.js +26 -10
  225. package/dist/simple-tree/core/toStored.js.map +1 -1
  226. package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  227. package/dist/simple-tree/core/treeNodeKernel.js +1 -0
  228. package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
  229. package/dist/simple-tree/core/treeNodeSchema.d.ts +1 -6
  230. package/dist/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  231. package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
  232. package/dist/simple-tree/core/treeNodeValid.d.ts +1 -1
  233. package/dist/simple-tree/core/treeNodeValid.d.ts.map +1 -1
  234. package/dist/simple-tree/core/treeNodeValid.js +1 -2
  235. package/dist/simple-tree/core/treeNodeValid.js.map +1 -1
  236. package/dist/simple-tree/fieldSchema.d.ts.map +1 -1
  237. package/dist/simple-tree/fieldSchema.js +1 -8
  238. package/dist/simple-tree/fieldSchema.js.map +1 -1
  239. package/dist/simple-tree/index.d.ts +3 -3
  240. package/dist/simple-tree/index.d.ts.map +1 -1
  241. package/dist/simple-tree/index.js +10 -4
  242. package/dist/simple-tree/index.js.map +1 -1
  243. package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
  244. package/dist/simple-tree/leafNodeSchema.js +0 -1
  245. package/dist/simple-tree/leafNodeSchema.js.map +1 -1
  246. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  247. package/dist/simple-tree/node-kinds/array/arrayNode.js +14 -49
  248. package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  249. package/dist/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
  250. package/dist/simple-tree/node-kinds/map/mapNode.js +1 -5
  251. package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  252. package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
  253. package/dist/simple-tree/node-kinds/object/objectNode.js +3 -10
  254. package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  255. package/dist/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
  256. package/dist/simple-tree/node-kinds/record/recordNode.js +1 -5
  257. package/dist/simple-tree/node-kinds/record/recordNode.js.map +1 -1
  258. package/dist/simple-tree/simpleSchema.d.ts +15 -3
  259. package/dist/simple-tree/simpleSchema.d.ts.map +1 -1
  260. package/dist/simple-tree/simpleSchema.js.map +1 -1
  261. package/dist/simple-tree/toStoredSchema.d.ts +20 -8
  262. package/dist/simple-tree/toStoredSchema.d.ts.map +1 -1
  263. package/dist/simple-tree/toStoredSchema.js +27 -22
  264. package/dist/simple-tree/toStoredSchema.js.map +1 -1
  265. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
  266. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js +18 -15
  267. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
  268. package/dist/tableSchema.d.ts +22 -52
  269. package/dist/tableSchema.d.ts.map +1 -1
  270. package/dist/tableSchema.js +141 -277
  271. package/dist/tableSchema.js.map +1 -1
  272. package/dist/treeFactory.d.ts +5 -0
  273. package/dist/treeFactory.d.ts.map +1 -1
  274. package/dist/treeFactory.js +12 -5
  275. package/dist/treeFactory.js.map +1 -1
  276. package/dist/util/arrayUtilities.d.ts +45 -0
  277. package/dist/util/arrayUtilities.d.ts.map +1 -0
  278. package/dist/util/arrayUtilities.js +76 -0
  279. package/dist/util/arrayUtilities.js.map +1 -0
  280. package/dist/util/breakable.js +3 -3
  281. package/dist/util/breakable.js.map +1 -1
  282. package/dist/util/index.d.ts +1 -0
  283. package/dist/util/index.d.ts.map +1 -1
  284. package/dist/util/index.js +7 -2
  285. package/dist/util/index.js.map +1 -1
  286. package/dist/util/typeCheckTests.d.ts.map +1 -1
  287. package/dist/util/typeCheckTests.js.map +1 -1
  288. package/lib/alpha.d.ts +7 -1
  289. package/lib/api.d.ts +6 -2
  290. package/lib/api.d.ts.map +1 -1
  291. package/lib/api.js +2 -13
  292. package/lib/api.js.map +1 -1
  293. package/lib/codec/codec.d.ts +9 -2
  294. package/lib/codec/codec.d.ts.map +1 -1
  295. package/lib/codec/codec.js +9 -2
  296. package/lib/codec/codec.js.map +1 -1
  297. package/lib/codec/index.d.ts +1 -1
  298. package/lib/codec/index.d.ts.map +1 -1
  299. package/lib/codec/index.js +1 -1
  300. package/lib/codec/index.js.map +1 -1
  301. package/lib/codec/versioned/codec.d.ts +7 -2
  302. package/lib/codec/versioned/codec.d.ts.map +1 -1
  303. package/lib/codec/versioned/codec.js +22 -0
  304. package/lib/codec/versioned/codec.js.map +1 -1
  305. package/lib/codec/versioned/index.d.ts +1 -1
  306. package/lib/codec/versioned/index.d.ts.map +1 -1
  307. package/lib/codec/versioned/index.js +1 -1
  308. package/lib/codec/versioned/index.js.map +1 -1
  309. package/lib/core/schema-stored/schema.d.ts +12 -1
  310. package/lib/core/schema-stored/schema.d.ts.map +1 -1
  311. package/lib/core/schema-stored/schema.js.map +1 -1
  312. package/lib/core/tree/detachedFieldIndexCodecs.d.ts.map +1 -1
  313. package/lib/core/tree/detachedFieldIndexCodecs.js +5 -3
  314. package/lib/core/tree/detachedFieldIndexCodecs.js.map +1 -1
  315. package/lib/feature-libraries/chunked-forest/chunkTree.d.ts +4 -5
  316. package/lib/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  317. package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  318. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  319. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js +2 -1
  320. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  321. package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts +2 -1
  322. package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts.map +1 -1
  323. package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
  324. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +3 -3
  325. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  326. package/lib/feature-libraries/chunked-forest/codec/codecs.js +36 -22
  327. package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  328. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +6 -6
  329. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
  330. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js +4 -2
  331. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  332. package/lib/feature-libraries/chunked-forest/codec/format.d.ts +156 -4
  333. package/lib/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
  334. package/lib/feature-libraries/chunked-forest/codec/format.js +6 -2
  335. package/lib/feature-libraries/chunked-forest/codec/format.js.map +1 -1
  336. package/lib/feature-libraries/chunked-forest/codec/formatGeneric.d.ts +8 -3
  337. package/lib/feature-libraries/chunked-forest/codec/formatGeneric.d.ts.map +1 -1
  338. package/lib/feature-libraries/chunked-forest/codec/formatGeneric.js +4 -1
  339. package/lib/feature-libraries/chunked-forest/codec/formatGeneric.js.map +1 -1
  340. package/lib/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.d.ts +2 -2
  341. package/lib/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.d.ts.map +1 -1
  342. package/lib/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.js.map +1 -1
  343. package/lib/feature-libraries/chunked-forest/codec/index.d.ts +1 -1
  344. package/lib/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
  345. package/lib/feature-libraries/chunked-forest/codec/index.js +1 -1
  346. package/lib/feature-libraries/chunked-forest/codec/index.js.map +1 -1
  347. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +13 -13
  348. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
  349. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +22 -6
  350. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
  351. package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts +9 -8
  352. package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts.map +1 -1
  353. package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.js +17 -2
  354. package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.js.map +1 -1
  355. package/lib/feature-libraries/chunked-forest/index.d.ts +1 -1
  356. package/lib/feature-libraries/chunked-forest/index.d.ts.map +1 -1
  357. package/lib/feature-libraries/chunked-forest/index.js +1 -1
  358. package/lib/feature-libraries/chunked-forest/index.js.map +1 -1
  359. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts +35 -17
  360. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  361. package/lib/feature-libraries/default-schema/defaultFieldKinds.js +55 -57
  362. package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  363. package/lib/feature-libraries/default-schema/index.d.ts +1 -3
  364. package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
  365. package/lib/feature-libraries/default-schema/index.js +1 -3
  366. package/lib/feature-libraries/default-schema/index.js.map +1 -1
  367. package/lib/feature-libraries/forest-summary/forestSummarizer.js +2 -2
  368. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  369. package/lib/feature-libraries/forest-summary/format.d.ts +2 -2
  370. package/lib/feature-libraries/forest-summary/format.d.ts.map +1 -1
  371. package/lib/feature-libraries/forest-summary/format.js +4 -2
  372. package/lib/feature-libraries/forest-summary/format.js.map +1 -1
  373. package/lib/feature-libraries/index.d.ts +5 -4
  374. package/lib/feature-libraries/index.d.ts.map +1 -1
  375. package/lib/feature-libraries/index.js +5 -4
  376. package/lib/feature-libraries/index.js.map +1 -1
  377. package/lib/feature-libraries/modular-schema/comparison.d.ts.map +1 -1
  378. package/lib/feature-libraries/modular-schema/comparison.js +1 -2
  379. package/lib/feature-libraries/modular-schema/comparison.js.map +1 -1
  380. package/lib/feature-libraries/modular-schema/fieldKind.d.ts +38 -12
  381. package/lib/feature-libraries/modular-schema/fieldKind.d.ts.map +1 -1
  382. package/lib/feature-libraries/modular-schema/fieldKind.js +29 -11
  383. package/lib/feature-libraries/modular-schema/fieldKind.js.map +1 -1
  384. package/lib/feature-libraries/modular-schema/fieldKindConfiguration.d.ts +2 -2
  385. package/lib/feature-libraries/modular-schema/fieldKindConfiguration.d.ts.map +1 -1
  386. package/lib/feature-libraries/modular-schema/fieldKindConfiguration.js.map +1 -1
  387. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts +2 -2
  388. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  389. package/lib/feature-libraries/modular-schema/genericFieldKind.js +3 -2
  390. package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  391. package/lib/feature-libraries/modular-schema/index.d.ts +0 -1
  392. package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
  393. package/lib/feature-libraries/modular-schema/index.js +0 -1
  394. package/lib/feature-libraries/modular-schema/index.js.map +1 -1
  395. package/lib/feature-libraries/modular-schema/isNeverTree.d.ts +5 -6
  396. package/lib/feature-libraries/modular-schema/isNeverTree.d.ts.map +1 -1
  397. package/lib/feature-libraries/modular-schema/isNeverTree.js.map +1 -1
  398. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts +2 -2
  399. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  400. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +1 -1
  401. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  402. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +8 -8
  403. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  404. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +1 -2
  405. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  406. package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts +66 -9
  407. package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +1 -1
  408. package/lib/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  409. package/lib/feature-libraries/object-forest/objectForest.js +2 -1
  410. package/lib/feature-libraries/object-forest/objectForest.js.map +1 -1
  411. package/lib/feature-libraries/optional-field/index.d.ts +1 -1
  412. package/lib/feature-libraries/optional-field/index.d.ts.map +1 -1
  413. package/lib/feature-libraries/optional-field/index.js.map +1 -1
  414. package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
  415. package/lib/feature-libraries/optional-field/optionalFieldCodecs.js +1 -5
  416. package/lib/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
  417. package/lib/feature-libraries/schema-index/codec.d.ts.map +1 -1
  418. package/lib/feature-libraries/schema-index/codec.js +5 -3
  419. package/lib/feature-libraries/schema-index/codec.js.map +1 -1
  420. package/lib/feature-libraries/{default-schema/schemaChecker.d.ts → schemaChecker.d.ts} +2 -2
  421. package/lib/feature-libraries/schemaChecker.d.ts.map +1 -0
  422. package/lib/feature-libraries/{default-schema/schemaChecker.js → schemaChecker.js} +3 -3
  423. package/lib/feature-libraries/schemaChecker.js.map +1 -0
  424. package/lib/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
  425. package/lib/feature-libraries/sequence-field/formatV2.js +1 -0
  426. package/lib/feature-libraries/sequence-field/formatV2.js.map +1 -1
  427. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  428. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.js +0 -2
  429. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
  430. package/lib/feature-libraries/treeCompressionUtils.d.ts +2 -12
  431. package/lib/feature-libraries/treeCompressionUtils.d.ts.map +1 -1
  432. package/lib/feature-libraries/treeCompressionUtils.js +3 -13
  433. package/lib/feature-libraries/treeCompressionUtils.js.map +1 -1
  434. package/lib/index.d.ts +4 -4
  435. package/lib/index.d.ts.map +1 -1
  436. package/lib/index.js +3 -3
  437. package/lib/index.js.map +1 -1
  438. package/lib/packageVersion.d.ts +1 -1
  439. package/lib/packageVersion.d.ts.map +1 -1
  440. package/lib/packageVersion.js +1 -1
  441. package/lib/packageVersion.js.map +1 -1
  442. package/lib/shared-tree/index.d.ts +1 -1
  443. package/lib/shared-tree/index.d.ts.map +1 -1
  444. package/lib/shared-tree/index.js +1 -1
  445. package/lib/shared-tree/index.js.map +1 -1
  446. package/lib/shared-tree/sharedTree.d.ts +7 -54
  447. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  448. package/lib/shared-tree/sharedTree.js +1 -51
  449. package/lib/shared-tree/sharedTree.js.map +1 -1
  450. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts +1 -1
  451. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  452. package/lib/shared-tree/sharedTreeChangeCodecs.js +0 -2
  453. package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  454. package/lib/shared-tree/sharedTreeChangeFamily.d.ts +2 -2
  455. package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  456. package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  457. package/lib/shared-tree/treeCheckout.d.ts +2 -2
  458. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  459. package/lib/shared-tree/treeCheckout.js.map +1 -1
  460. package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  461. package/lib/shared-tree-core/editManagerCodecs.js +13 -7
  462. package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
  463. package/lib/shared-tree-core/editManagerFormatCommons.d.ts +3 -4
  464. package/lib/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
  465. package/lib/shared-tree-core/editManagerFormatCommons.js +4 -7
  466. package/lib/shared-tree-core/editManagerFormatCommons.js.map +1 -1
  467. package/lib/shared-tree-core/index.d.ts +3 -3
  468. package/lib/shared-tree-core/index.d.ts.map +1 -1
  469. package/lib/shared-tree-core/index.js +2 -2
  470. package/lib/shared-tree-core/index.js.map +1 -1
  471. package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
  472. package/lib/shared-tree-core/messageCodecs.js +21 -10
  473. package/lib/shared-tree-core/messageCodecs.js.map +1 -1
  474. package/lib/shared-tree-core/messageFormat.d.ts +4 -6
  475. package/lib/shared-tree-core/messageFormat.d.ts.map +1 -1
  476. package/lib/shared-tree-core/messageFormat.js +8 -6
  477. package/lib/shared-tree-core/messageFormat.js.map +1 -1
  478. package/lib/simple-tree/api/configuration.d.ts +2 -0
  479. package/lib/simple-tree/api/configuration.d.ts.map +1 -1
  480. package/lib/simple-tree/api/configuration.js +10 -0
  481. package/lib/simple-tree/api/configuration.js.map +1 -1
  482. package/lib/simple-tree/api/incrementalAllowedTypes.d.ts +15 -12
  483. package/lib/simple-tree/api/incrementalAllowedTypes.d.ts.map +1 -1
  484. package/lib/simple-tree/api/incrementalAllowedTypes.js +15 -12
  485. package/lib/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
  486. package/lib/simple-tree/api/index.d.ts +2 -1
  487. package/lib/simple-tree/api/index.d.ts.map +1 -1
  488. package/lib/simple-tree/api/index.js +2 -1
  489. package/lib/simple-tree/api/index.js.map +1 -1
  490. package/lib/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
  491. package/lib/simple-tree/api/schemaFromSimple.js +8 -2
  492. package/lib/simple-tree/api/schemaFromSimple.js.map +1 -1
  493. package/lib/simple-tree/api/simpleSchemaCodec.js +5 -7
  494. package/lib/simple-tree/api/simpleSchemaCodec.js.map +1 -1
  495. package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts +103 -0
  496. package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -0
  497. package/lib/simple-tree/api/snapshotCompatibilityChecker.js +122 -0
  498. package/lib/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -0
  499. package/lib/simple-tree/api/tree.d.ts +2 -2
  500. package/lib/simple-tree/api/tree.js +1 -1
  501. package/lib/simple-tree/api/tree.js.map +1 -1
  502. package/lib/simple-tree/core/allowedTypes.js +1 -1
  503. package/lib/simple-tree/core/allowedTypes.js.map +1 -1
  504. package/lib/simple-tree/core/index.d.ts +3 -3
  505. package/lib/simple-tree/core/index.d.ts.map +1 -1
  506. package/lib/simple-tree/core/index.js +2 -2
  507. package/lib/simple-tree/core/index.js.map +1 -1
  508. package/lib/simple-tree/core/toStored.d.ts +12 -5
  509. package/lib/simple-tree/core/toStored.d.ts.map +1 -1
  510. package/lib/simple-tree/core/toStored.js +25 -9
  511. package/lib/simple-tree/core/toStored.js.map +1 -1
  512. package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  513. package/lib/simple-tree/core/treeNodeKernel.js +1 -0
  514. package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
  515. package/lib/simple-tree/core/treeNodeSchema.d.ts +1 -6
  516. package/lib/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  517. package/lib/simple-tree/core/treeNodeSchema.js.map +1 -1
  518. package/lib/simple-tree/core/treeNodeValid.d.ts +1 -1
  519. package/lib/simple-tree/core/treeNodeValid.d.ts.map +1 -1
  520. package/lib/simple-tree/core/treeNodeValid.js +1 -2
  521. package/lib/simple-tree/core/treeNodeValid.js.map +1 -1
  522. package/lib/simple-tree/fieldSchema.d.ts.map +1 -1
  523. package/lib/simple-tree/fieldSchema.js +2 -9
  524. package/lib/simple-tree/fieldSchema.js.map +1 -1
  525. package/lib/simple-tree/index.d.ts +3 -3
  526. package/lib/simple-tree/index.d.ts.map +1 -1
  527. package/lib/simple-tree/index.js +3 -3
  528. package/lib/simple-tree/index.js.map +1 -1
  529. package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
  530. package/lib/simple-tree/leafNodeSchema.js +1 -2
  531. package/lib/simple-tree/leafNodeSchema.js.map +1 -1
  532. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  533. package/lib/simple-tree/node-kinds/array/arrayNode.js +16 -51
  534. package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  535. package/lib/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
  536. package/lib/simple-tree/node-kinds/map/mapNode.js +3 -7
  537. package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  538. package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
  539. package/lib/simple-tree/node-kinds/object/objectNode.js +4 -11
  540. package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  541. package/lib/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
  542. package/lib/simple-tree/node-kinds/record/recordNode.js +3 -7
  543. package/lib/simple-tree/node-kinds/record/recordNode.js.map +1 -1
  544. package/lib/simple-tree/simpleSchema.d.ts +15 -3
  545. package/lib/simple-tree/simpleSchema.d.ts.map +1 -1
  546. package/lib/simple-tree/simpleSchema.js.map +1 -1
  547. package/lib/simple-tree/toStoredSchema.d.ts +20 -8
  548. package/lib/simple-tree/toStoredSchema.d.ts.map +1 -1
  549. package/lib/simple-tree/toStoredSchema.js +28 -24
  550. package/lib/simple-tree/toStoredSchema.js.map +1 -1
  551. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
  552. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js +20 -17
  553. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
  554. package/lib/tableSchema.d.ts +22 -52
  555. package/lib/tableSchema.d.ts.map +1 -1
  556. package/lib/tableSchema.js +143 -279
  557. package/lib/tableSchema.js.map +1 -1
  558. package/lib/treeFactory.d.ts +5 -0
  559. package/lib/treeFactory.d.ts.map +1 -1
  560. package/lib/treeFactory.js +10 -4
  561. package/lib/treeFactory.js.map +1 -1
  562. package/lib/util/arrayUtilities.d.ts +45 -0
  563. package/lib/util/arrayUtilities.d.ts.map +1 -0
  564. package/lib/util/arrayUtilities.js +69 -0
  565. package/lib/util/arrayUtilities.js.map +1 -0
  566. package/lib/util/breakable.js +3 -3
  567. package/lib/util/breakable.js.map +1 -1
  568. package/lib/util/index.d.ts +1 -0
  569. package/lib/util/index.d.ts.map +1 -1
  570. package/lib/util/index.js +1 -0
  571. package/lib/util/index.js.map +1 -1
  572. package/lib/util/typeCheckTests.d.ts.map +1 -1
  573. package/lib/util/typeCheckTests.js.map +1 -1
  574. package/package.json +22 -22
  575. package/src/api.ts +22 -11
  576. package/src/codec/codec.ts +10 -2
  577. package/src/codec/index.ts +1 -0
  578. package/src/codec/versioned/codec.ts +40 -2
  579. package/src/codec/versioned/index.ts +1 -0
  580. package/src/core/schema-stored/schema.ts +12 -1
  581. package/src/core/tree/detachedFieldIndexCodecs.ts +10 -3
  582. package/src/feature-libraries/README.md +1 -1
  583. package/src/feature-libraries/chunked-forest/chunkTree.ts +3 -3
  584. package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +5 -0
  585. package/src/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.ts +2 -1
  586. package/src/feature-libraries/chunked-forest/codec/codecs.ts +55 -26
  587. package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +8 -3
  588. package/src/feature-libraries/chunked-forest/codec/format.ts +14 -4
  589. package/src/feature-libraries/chunked-forest/codec/formatGeneric.ts +7 -2
  590. package/src/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.ts +5 -6
  591. package/src/feature-libraries/chunked-forest/codec/index.ts +1 -4
  592. package/src/feature-libraries/chunked-forest/codec/schemaBasedEncode.ts +62 -9
  593. package/src/feature-libraries/chunked-forest/codec/uncompressedEncode.ts +24 -2
  594. package/src/feature-libraries/chunked-forest/index.ts +1 -1
  595. package/src/feature-libraries/default-schema/defaultFieldKinds.ts +86 -74
  596. package/src/feature-libraries/default-schema/index.ts +1 -9
  597. package/src/feature-libraries/forest-summary/forestSummarizer.ts +2 -2
  598. package/src/feature-libraries/forest-summary/format.ts +15 -9
  599. package/src/feature-libraries/index.ts +8 -10
  600. package/src/feature-libraries/modular-schema/comparison.ts +2 -3
  601. package/src/feature-libraries/modular-schema/fieldKind.ts +90 -13
  602. package/src/feature-libraries/modular-schema/fieldKindConfiguration.ts +2 -3
  603. package/src/feature-libraries/modular-schema/genericFieldKind.ts +6 -6
  604. package/src/feature-libraries/modular-schema/index.ts +0 -1
  605. package/src/feature-libraries/modular-schema/isNeverTree.ts +7 -8
  606. package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +3 -6
  607. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +13 -13
  608. package/src/feature-libraries/object-forest/objectForest.ts +2 -6
  609. package/src/feature-libraries/optional-field/index.ts +1 -0
  610. package/src/feature-libraries/optional-field/optionalFieldCodecs.ts +1 -5
  611. package/src/feature-libraries/schema-index/codec.ts +10 -3
  612. package/src/feature-libraries/{default-schema/schemaChecker.ts → schemaChecker.ts} +4 -4
  613. package/src/feature-libraries/sequence-field/formatV2.ts +1 -0
  614. package/src/feature-libraries/sequence-field/sequenceFieldCodecs.ts +0 -2
  615. package/src/feature-libraries/treeCompressionUtils.ts +1 -15
  616. package/src/index.ts +7 -1
  617. package/src/packageVersion.ts +1 -1
  618. package/src/shared-tree/index.ts +0 -1
  619. package/src/shared-tree/sharedTree.ts +12 -88
  620. package/src/shared-tree/sharedTreeChangeCodecs.ts +1 -6
  621. package/src/shared-tree/sharedTreeChangeFamily.ts +2 -2
  622. package/src/shared-tree/treeCheckout.ts +2 -2
  623. package/src/shared-tree-core/editManagerCodecs.ts +19 -7
  624. package/src/shared-tree-core/editManagerFormatCommons.ts +11 -12
  625. package/src/shared-tree-core/index.ts +7 -3
  626. package/src/shared-tree-core/messageCodecs.ts +32 -17
  627. package/src/shared-tree-core/messageFormat.ts +8 -6
  628. package/src/simple-tree/api/configuration.ts +17 -4
  629. package/src/simple-tree/api/incrementalAllowedTypes.ts +20 -18
  630. package/src/simple-tree/api/index.ts +6 -1
  631. package/src/simple-tree/api/schemaFromSimple.ts +14 -6
  632. package/src/simple-tree/api/simpleSchemaCodec.ts +10 -9
  633. package/src/simple-tree/api/snapshotCompatibilityChecker.ts +135 -0
  634. package/src/simple-tree/api/tree.ts +2 -2
  635. package/src/simple-tree/core/allowedTypes.ts +1 -1
  636. package/src/simple-tree/core/index.ts +3 -1
  637. package/src/simple-tree/core/toStored.ts +42 -18
  638. package/src/simple-tree/core/treeNodeKernel.ts +1 -0
  639. package/src/simple-tree/core/treeNodeSchema.ts +1 -7
  640. package/src/simple-tree/core/treeNodeValid.ts +0 -2
  641. package/src/simple-tree/fieldSchema.ts +2 -11
  642. package/src/simple-tree/index.ts +7 -2
  643. package/src/simple-tree/leafNodeSchema.ts +1 -2
  644. package/src/simple-tree/node-kinds/array/arrayNode.ts +28 -75
  645. package/src/simple-tree/node-kinds/map/mapNode.ts +1 -15
  646. package/src/simple-tree/node-kinds/object/objectNode.ts +4 -18
  647. package/src/simple-tree/node-kinds/record/recordNode.ts +1 -15
  648. package/src/simple-tree/simpleSchema.ts +16 -3
  649. package/src/simple-tree/toStoredSchema.ts +54 -38
  650. package/src/simple-tree/unhydratedFlexTreeFromInsertable.ts +22 -17
  651. package/src/tableSchema.ts +110 -334
  652. package/src/treeFactory.ts +13 -4
  653. package/src/util/arrayUtilities.ts +88 -0
  654. package/src/util/breakable.ts +4 -4
  655. package/src/util/index.ts +6 -0
  656. package/src/util/typeCheckTests.ts +0 -1
  657. package/dist/feature-libraries/default-schema/defaultSchema.d.ts +0 -10
  658. package/dist/feature-libraries/default-schema/defaultSchema.d.ts.map +0 -1
  659. package/dist/feature-libraries/default-schema/defaultSchema.js +0 -15
  660. package/dist/feature-libraries/default-schema/defaultSchema.js.map +0 -1
  661. package/dist/feature-libraries/default-schema/schemaChecker.d.ts.map +0 -1
  662. package/dist/feature-libraries/default-schema/schemaChecker.js.map +0 -1
  663. package/dist/feature-libraries/modular-schema/fieldKindWithEditor.d.ts +0 -50
  664. package/dist/feature-libraries/modular-schema/fieldKindWithEditor.d.ts.map +0 -1
  665. package/dist/feature-libraries/modular-schema/fieldKindWithEditor.js +0 -76
  666. package/dist/feature-libraries/modular-schema/fieldKindWithEditor.js.map +0 -1
  667. package/dist/feature-libraries/optional-field/optionalFieldCodecV1.d.ts +0 -12
  668. package/dist/feature-libraries/optional-field/optionalFieldCodecV1.d.ts.map +0 -1
  669. package/dist/feature-libraries/optional-field/optionalFieldCodecV1.js +0 -158
  670. package/dist/feature-libraries/optional-field/optionalFieldCodecV1.js.map +0 -1
  671. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts +0 -11
  672. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts.map +0 -1
  673. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.js +0 -245
  674. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +0 -1
  675. package/lib/feature-libraries/default-schema/defaultSchema.d.ts +0 -10
  676. package/lib/feature-libraries/default-schema/defaultSchema.d.ts.map +0 -1
  677. package/lib/feature-libraries/default-schema/defaultSchema.js +0 -12
  678. package/lib/feature-libraries/default-schema/defaultSchema.js.map +0 -1
  679. package/lib/feature-libraries/default-schema/schemaChecker.d.ts.map +0 -1
  680. package/lib/feature-libraries/default-schema/schemaChecker.js.map +0 -1
  681. package/lib/feature-libraries/modular-schema/fieldKindWithEditor.d.ts +0 -50
  682. package/lib/feature-libraries/modular-schema/fieldKindWithEditor.d.ts.map +0 -1
  683. package/lib/feature-libraries/modular-schema/fieldKindWithEditor.js +0 -71
  684. package/lib/feature-libraries/modular-schema/fieldKindWithEditor.js.map +0 -1
  685. package/lib/feature-libraries/optional-field/optionalFieldCodecV1.d.ts +0 -12
  686. package/lib/feature-libraries/optional-field/optionalFieldCodecV1.d.ts.map +0 -1
  687. package/lib/feature-libraries/optional-field/optionalFieldCodecV1.js +0 -154
  688. package/lib/feature-libraries/optional-field/optionalFieldCodecV1.js.map +0 -1
  689. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts +0 -11
  690. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts.map +0 -1
  691. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.js +0 -241
  692. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +0 -1
  693. package/src/feature-libraries/default-schema/defaultSchema.ts +0 -15
  694. package/src/feature-libraries/modular-schema/fieldKindWithEditor.ts +0 -108
  695. package/src/feature-libraries/optional-field/optionalFieldCodecV1.ts +0 -208
  696. package/src/feature-libraries/sequence-field/sequenceFieldCodecV1.ts +0 -344
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ /*!
3
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
4
+ * Licensed under the MIT License.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.validateIndexRange = exports.validateIndex = exports.validatePositiveIndex = exports.validateSafeInteger = void 0;
8
+ const internal_1 = require("@fluidframework/telemetry-utils/internal");
9
+ /**
10
+ * Validates that the provided index is a safe integer.
11
+ * @throws If the index is invalid.
12
+ * @param index - The index to validate.
13
+ * @param apiName - The name of the API performing the validation.
14
+ * @throws If the index is invalid.
15
+ */
16
+ function validateSafeInteger(index, apiName) {
17
+ if (!Number.isSafeInteger(index)) {
18
+ throw new internal_1.UsageError(`Expected a safe integer passed to ${apiName}, got ${index}.`);
19
+ }
20
+ }
21
+ exports.validateSafeInteger = validateSafeInteger;
22
+ /**
23
+ * Validates that the provided index is a 0 or greater safe integer.
24
+ * @param index - The index to validate.
25
+ * @param apiName - The name of the API performing the validation.
26
+ * @throws If the index is invalid.
27
+ */
28
+ function validatePositiveIndex(index, apiName) {
29
+ validateSafeInteger(index, apiName);
30
+ if (index < 0) {
31
+ throw new internal_1.UsageError(`Expected non-negative index passed to ${apiName}, got ${index}.`);
32
+ }
33
+ }
34
+ exports.validatePositiveIndex = validatePositiveIndex;
35
+ /**
36
+ * Validates that the provided index is a non-negative safe integer within the bounds of the provided array (or, optionally, 1 past its end).
37
+ * @throws If the index is invalid.
38
+ * @param index - The index to validate.
39
+ * @param array - The array to validate against.
40
+ * @param apiName - The name of the API performing the validation.
41
+ * @param allowOnePastEnd - Whether to allow the index to be one past the end of the array.
42
+ */
43
+ function validateIndex(index, array, apiName, allowOnePastEnd = false) {
44
+ validatePositiveIndex(index, apiName);
45
+ if (allowOnePastEnd) {
46
+ if (index > array.length) {
47
+ throw new internal_1.UsageError(`Index value passed to ${apiName} is out of bounds. Expected at most ${array.length}, got ${index}.`);
48
+ }
49
+ }
50
+ else {
51
+ if (index >= array.length) {
52
+ throw new internal_1.UsageError(`Index value passed to ${apiName} is out of bounds. Expected at most ${array.length - 1}, got ${index}.`);
53
+ }
54
+ }
55
+ }
56
+ exports.validateIndex = validateIndex;
57
+ /**
58
+ * Validates that the provided range `[startIndex, endIndex)` is valid and within the bounds of the provided array.
59
+ * @remarks
60
+ * This is intended for ranges which are inclusive for the lower bound, and exclusive for the upper bound,
61
+ * and permits 0 length ranges, even `[array.length, array.length)`.
62
+ * @throws If the index is invalid.
63
+ * @param startIndex - The index that starts the range (inclusive).
64
+ * @param endIndex - The index that ends the range (exclusive).
65
+ * @param array - The array to validate against.
66
+ * @param apiName - The name of the API performing the validation.
67
+ */
68
+ function validateIndexRange(startIndex, endIndex, array, apiName) {
69
+ if (startIndex > endIndex) {
70
+ throw new internal_1.UsageError(`Malformed range passed to ${apiName}. Start index ${startIndex} is greater than end index ${endIndex}.`);
71
+ }
72
+ validateIndex(startIndex, array, apiName, true);
73
+ validateIndex(endIndex, array, apiName, true);
74
+ }
75
+ exports.validateIndexRange = validateIndexRange;
76
+ //# sourceMappingURL=arrayUtilities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arrayUtilities.js","sourceRoot":"","sources":["../../src/util/arrayUtilities.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uEAAsE;AAEtE;;;;;;GAMG;AACH,SAAgB,mBAAmB,CAAC,KAAa,EAAE,OAAe;IACjE,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,qBAAU,CAAC,qCAAqC,OAAO,SAAS,KAAK,GAAG,CAAC,CAAC;IACrF,CAAC;AACF,CAAC;AAJD,kDAIC;AAED;;;;;GAKG;AACH,SAAgB,qBAAqB,CAAC,KAAa,EAAE,OAAe;IACnE,mBAAmB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACpC,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;QACf,MAAM,IAAI,qBAAU,CAAC,yCAAyC,OAAO,SAAS,KAAK,GAAG,CAAC,CAAC;IACzF,CAAC;AACF,CAAC;AALD,sDAKC;AAED;;;;;;;GAOG;AACH,SAAgB,aAAa,CAC5B,KAAa,EACb,KAAkC,EAClC,OAAe,EACf,kBAA2B,KAAK;IAEhC,qBAAqB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACtC,IAAI,eAAe,EAAE,CAAC;QACrB,IAAI,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;YAC1B,MAAM,IAAI,qBAAU,CACnB,yBAAyB,OAAO,uCAAuC,KAAK,CAAC,MAAM,SAAS,KAAK,GAAG,CACpG,CAAC;QACH,CAAC;IACF,CAAC;SAAM,CAAC;QACP,IAAI,KAAK,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;YAC3B,MAAM,IAAI,qBAAU,CACnB,yBAAyB,OAAO,uCAAuC,KAAK,CAAC,MAAM,GAAG,CAAC,SAAS,KAAK,GAAG,CACxG,CAAC;QACH,CAAC;IACF,CAAC;AACF,CAAC;AApBD,sCAoBC;AAED;;;;;;;;;;GAUG;AACH,SAAgB,kBAAkB,CACjC,UAAkB,EAClB,QAAgB,EAChB,KAAkC,EAClC,OAAe;IAEf,IAAI,UAAU,GAAG,QAAQ,EAAE,CAAC;QAC3B,MAAM,IAAI,qBAAU,CACnB,6BAA6B,OAAO,iBAAiB,UAAU,8BAA8B,QAAQ,GAAG,CACxG,CAAC;IACH,CAAC;IACD,aAAa,CAAC,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IAChD,aAAa,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;AAC/C,CAAC;AAbD,gDAaC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\n/**\n * Validates that the provided index is a safe integer.\n * @throws If the index is invalid.\n * @param index - The index to validate.\n * @param apiName - The name of the API performing the validation.\n * @throws If the index is invalid.\n */\nexport function validateSafeInteger(index: number, apiName: string): void {\n\tif (!Number.isSafeInteger(index)) {\n\t\tthrow new UsageError(`Expected a safe integer passed to ${apiName}, got ${index}.`);\n\t}\n}\n\n/**\n * Validates that the provided index is a 0 or greater safe integer.\n * @param index - The index to validate.\n * @param apiName - The name of the API performing the validation.\n * @throws If the index is invalid.\n */\nexport function validatePositiveIndex(index: number, apiName: string): void {\n\tvalidateSafeInteger(index, apiName);\n\tif (index < 0) {\n\t\tthrow new UsageError(`Expected non-negative index passed to ${apiName}, got ${index}.`);\n\t}\n}\n\n/**\n * Validates that the provided index is a non-negative safe integer within the bounds of the provided array (or, optionally, 1 past its end).\n * @throws If the index is invalid.\n * @param index - The index to validate.\n * @param array - The array to validate against.\n * @param apiName - The name of the API performing the validation.\n * @param allowOnePastEnd - Whether to allow the index to be one past the end of the array.\n */\nexport function validateIndex(\n\tindex: number,\n\tarray: { readonly length: number },\n\tapiName: string,\n\tallowOnePastEnd: boolean = false,\n): void {\n\tvalidatePositiveIndex(index, apiName);\n\tif (allowOnePastEnd) {\n\t\tif (index > array.length) {\n\t\t\tthrow new UsageError(\n\t\t\t\t`Index value passed to ${apiName} is out of bounds. Expected at most ${array.length}, got ${index}.`,\n\t\t\t);\n\t\t}\n\t} else {\n\t\tif (index >= array.length) {\n\t\t\tthrow new UsageError(\n\t\t\t\t`Index value passed to ${apiName} is out of bounds. Expected at most ${array.length - 1}, got ${index}.`,\n\t\t\t);\n\t\t}\n\t}\n}\n\n/**\n * Validates that the provided range `[startIndex, endIndex)` is valid and within the bounds of the provided array.\n * @remarks\n * This is intended for ranges which are inclusive for the lower bound, and exclusive for the upper bound,\n * and permits 0 length ranges, even `[array.length, array.length)`.\n * @throws If the index is invalid.\n * @param startIndex - The index that starts the range (inclusive).\n * @param endIndex - The index that ends the range (exclusive).\n * @param array - The array to validate against.\n * @param apiName - The name of the API performing the validation.\n */\nexport function validateIndexRange(\n\tstartIndex: number,\n\tendIndex: number,\n\tarray: { readonly length: number },\n\tapiName: string,\n): void {\n\tif (startIndex > endIndex) {\n\t\tthrow new UsageError(\n\t\t\t`Malformed range passed to ${apiName}. Start index ${startIndex} is greater than end index ${endIndex}.`,\n\t\t);\n\t}\n\tvalidateIndex(startIndex, array, apiName, true);\n\tvalidateIndex(endIndex, array, apiName, true);\n}\n"]}
@@ -137,19 +137,19 @@ function throwIfBroken(target, context) {
137
137
  return replacementMethod;
138
138
  }
139
139
  exports.throwIfBroken = throwIfBroken;
140
- // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type, @typescript-eslint/ban-types
140
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
141
141
  function nameFunctionFrom(toName, nameFrom) {
142
142
  toName.displayName =
143
143
  nameFrom.displayName ?? nameFrom.name;
144
144
  }
145
145
  const isBreakerSymbol = Symbol("isBreaker");
146
146
  // Accepting any function like value is desired and safe here as this does not call the provided function.
147
- // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type, @typescript-eslint/ban-types
147
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
148
148
  function markBreaker(f) {
149
149
  f[isBreakerSymbol] = true;
150
150
  }
151
151
  // Accepting any function like value is desired and safe here as this does not call the provided function.
152
- // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type, @typescript-eslint/ban-types
152
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
153
153
  function isBreaker(f) {
154
154
  return isBreakerSymbol in f;
155
155
  }
@@ -1 +1 @@
1
- {"version":3,"file":"breakable.js","sourceRoot":"","sources":["../../src/util/breakable.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAC7D,uEAAsE;AAEtE;;;;;GAKG;AACH,MAAa,SAAS;IAGrB;IACC;;;;OAIG;IACc,IAAY;QAAZ,SAAI,GAAJ,IAAI,CAAQ;IAC3B,CAAC;IAEJ;;;;OAIG;IACI,GAAG;QACT,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,KAAK,GAAG,IAAI,qBAAU,CAC3B,kBAAkB,IAAI,CAAC,IAAI,+EAA+E,IAAI,CAAC,QAAQ,EAAE,CACzH,CAAC;YAEF,+GAA+G;YAC/G,mGAAmG;YACnG,6DAA6D;YAC5D,KAA6B,CAAC,KAAK;gBAClC,IAAI,CAAC,QAAgC,CAAC,KAAK,I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ED;;;;;;;GAOG;AACH,SAAgB,aAAa,CAC5B,MAAc,EACd,OAAsC;IAEtC,iKAAiK;IACjK,MAAM,kBAAkB,GAAG,MAAM,CAAC;IAElC,wEAAwE;IACxE,uDAAuD;IACvD,uKAAuK;IACvK,+FAA+F;IAC/F,MAAM,SAAS,GAAyB,IAAI,GAAG,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC;IAEjE,IAAI,SAAS,GAAkB,MAAM,CAAC,SAAS,CAAC;IAChD,OAAO,SAAS,KAAK,IAAI,EAAE,CAAC;QAC3B,KAAK,MAAM,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;YAC9C,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;gBACzB,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;gBACnB,MAAM,UAAU,GAAG,OAAO,CAAC,wBAAwB,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;gBACpE,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;oBAC9B,SAAS;oBACT,IAAI,OAAO,UAAU,CAAC,KAAK,KAAK,UAAU,EAAE,CAAC;wBAC5C,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;4BAClC,gKAAgK;4BAChK,UAAU,CAAC,KAAK,GAAG,cAAc,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;4BACpD,MAAM,CAAC,cAAc,CAAC,kBAAkB,CAAC,SAAS,EAAE,GAAG,EAAE,UAAU,CAAC,CAAC;wBACtE,CAAC;oBACF,CAAC;gBACF,CAAC;YACF,CAAC;QACF,CAAC;QACD,SAAS,GAAG,OAAO,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;IAC/C,CAAC;IAED,OAAO,kBAAkB,CAAC;AAC3B,CAAC;AAnCD,sCAmCC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\n/**\n * An object which can enter a \"broken\" state where trying to use it is a UsageError.\n * @remarks\n * Use {@link WithBreakable} to apply this to another object.\n * @sealed\n */\nexport class Breakable {\n\tprivate brokenBy?: Error;\n\n\tpublic constructor(\n\t\t/**\n\t\t * A name for a given breakable scope.\n\t\t * @remarks\n\t\t * This is useful for documenting the semantics of a given Breakable and when inspecting things in the debugger, but is currently otherwise unused.\n\t\t */\n\t\tprivate readonly name: string,\n\t) {}\n\n\t/**\n\t * Throws if this object is in the broken state.\n\t * @remarks\n\t * Can use {@link throwIfBroken} to apply this to a method.\n\t */\n\tpublic use(): void {\n\t\tif (this.brokenBy !== undefined) {\n\t\t\tconst error = new UsageError(\n\t\t\t\t`Invalid use of ${this.name} after it was put into an invalid state by another error.\\nOriginal Error:\\n${this.brokenBy}`,\n\t\t\t);\n\n\t\t\t// This \"cause\" field is added in ES2022, but using if even without that built in support, it is still helpful.\n\t\t\t// See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause\n\t\t\t// TODO: remove this cast when targeting ES2022 lib or later.\n\t\t\t(error as { cause?: unknown }).cause =\n\t\t\t\t(this.brokenBy as { cause?: unknown }).cause ?? this.brokenBy;\n\n\t\t\tthrow error;\n\t\t}\n\t}\n\n\t/**\n\t * Puts this object into the broken state, and throws an error.\n\t *\n\t * @throws If already broken by a different error, throws a UsageError, otherwise throws `brokenBy`.\n\t */\n\tpublic break(brokenBy: Error): never {\n\t\t// If already broken by this error, let it bubble up without rethrowing a modified version.\n\t\t// This prevents internal errors like asserts getting rethrown as different errors when wrapped with multiple call to `{@link Breakable.run}` or `{@link breakingMethod}`.\n\t\tif (this.brokenBy !== brokenBy) {\n\t\t\tthis.use();\n\t\t\tthis.brokenBy = brokenBy;\n\t\t}\n\t\tthrow brokenBy;\n\t}\n\n\t/**\n\t * {@link Breakable.break}, except tolerates `unknown` to be more easily used by catch blocks.\n\t * @privateRemarks\n\t * If there is a use-case, this should be made public.\n\t */\n\tprivate rethrowCaught(brokenBy: unknown): never {\n\t\tif (brokenBy instanceof Error) {\n\t\t\tthis.break(brokenBy);\n\t\t}\n\t\tthis.break(\n\t\t\tnew Error(`Non-error thrown breaking ${this.name}. Thrown value: \"${brokenBy}\"`),\n\t\t);\n\t}\n\n\t/**\n\t * Runs code which should break the object if it throws.\n\t * @remarks\n\t * Like {@link Breakable.use}, this also throws if already broken.\n\t * Any exceptions this catches are re-thrown.\n\t * Can use {@link breakingMethod} to apply this to a method.\n\t */\n\tpublic run<TResult>(breaker: () => TResult): TResult {\n\t\tthis.use();\n\t\ttry {\n\t\t\treturn breaker();\n\t\t} catch (error: unknown) {\n\t\t\tthis.rethrowCaught(error);\n\t\t}\n\t}\n\n\t/**\n\t * Clears the existing broken state.\n\t * @remarks\n\t * This is rarely safe to to: it is only ok when all objects using this breaker are known to not have been left in an invalid state.\n\t * This is pretty much only safe in tests which just were checking a specific error was thrown, and which know that error closepath is actually exception safe.\n\t */\n\tpublic clearError(): void {\n\t\tassert(this.brokenBy !== undefined, 0x9b6 /* No error to clear */);\n\t\tthis.brokenBy = undefined;\n\t}\n}\n\n/**\n * Marks an object as being able to be in a broken state (unknown/unspecified/broken state due to unhandled exception).\n * @remarks\n * See decorators {@link breakingMethod} and {@link throwIfBroken} for ease of use.\n */\nexport interface WithBreakable {\n\t/**\n\t * The breaker for this object.\n\t * @remarks\n\t * If this `breaker` is in the broken state, the `WithBreakable` should be considered in a broken state.\n\t */\n\treadonly breaker: Breakable;\n}\n\n/**\n * Decorator for methods which should break the object when they throw.\n * @remarks\n * This also throws if already broken like {@link throwIfBroken}.\n * See {@link Breakable.run} for details.\n *\n * This should be used on methods which modify data that could result in an unsupported/broken state if an exception is thrown while modifying.\n * It is ok for breakingMethods to call each-other.\n * @privateRemarks\n * Explicitly capturing the full `Target` type is necessary to make this work with generic methods with unknown numbers of type parameters.\n */\nexport function breakingMethod<\n\tTarget extends ((...args: any[]) => unknown) & ((this: This, ...args: Args) => Return),\n\tThis extends WithBreakable,\n\tArgs extends never[],\n\tReturn,\n>(target: Target, context?: ClassMethodDecoratorContext<This, Target>): Target {\n\tfunction replacementMethod(this: This, ...args: Args): Return {\n\t\tif (this.breaker === undefined) {\n\t\t\t// This case is necessary for when wrapping methods which are invoked inside the constructor of the base class before `breaker` is set.\n\t\t\t// Since the constructor throwing does not return an object, failing to put it into a broken state is not too bad.\n\t\t\t// However when more than just the constructed object should be broken, this can result in missing a break.\n\t\t\treturn target.call(this, ...args);\n\t\t}\n\t\treturn this.breaker.run(() => {\n\t\t\treturn target.call(this, ...args);\n\t\t});\n\t}\n\tmarkBreaker(replacementMethod);\n\tnameFunctionFrom(replacementMethod, target);\n\treturn replacementMethod as Target;\n}\n\n/**\n * Decorator for methods which should throw if the object is in a broken state.\n * @remarks\n * This should be used on methods which read data that could be invalid when the object is broken.\n * @privateRemarks\n * Explicitly capturing the full `Target` type is necessary to make this work with generic methods with unknown numbers of type parameters.\n */\nexport function throwIfBroken<\n\tTarget extends ((...args: any[]) => unknown) & ((this: This, ...args: Args) => Return),\n\tThis extends WithBreakable,\n\tArgs extends never[],\n\tReturn,\n>(target: Target, context: ClassMethodDecoratorContext<This, Target>): Target {\n\tfunction replacementMethod(this: This, ...args: Args): Return {\n\t\tthis.breaker.use();\n\t\treturn target.call(this, ...args);\n\t}\n\tmarkBreaker(replacementMethod);\n\tnameFunctionFrom(replacementMethod, target);\n\treturn replacementMethod as Target;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type, @typescript-eslint/ban-types\ntype PossiblyNamedFunction = Function & { displayName?: undefined | string };\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type, @typescript-eslint/ban-types\nfunction nameFunctionFrom(toName: Function, nameFrom: Function): void {\n\t(toName as PossiblyNamedFunction).displayName =\n\t\t(nameFrom as PossiblyNamedFunction).displayName ?? nameFrom.name;\n}\n\nconst isBreakerSymbol: unique symbol = Symbol(\"isBreaker\");\n\n// Accepting any function like value is desired and safe here as this does not call the provided function.\n// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type, @typescript-eslint/ban-types\nfunction markBreaker(f: Function): void {\n\t(f as unknown as Record<typeof isBreakerSymbol, true>)[isBreakerSymbol] = true;\n}\n\n// Accepting any function like value is desired and safe here as this does not call the provided function.\n// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type, @typescript-eslint/ban-types\nfunction isBreaker(f: Function): boolean {\n\treturn isBreakerSymbol in (f as unknown as Record<typeof isBreakerSymbol, true>);\n}\n\n/**\n * Decorator for classes which should break when their methods throw.\n * @remarks\n * Applies {@link breakingMethod} to all methods declared directly by class or its base classes.\n * Does not include those on derived classes.\n * Does not include getters or setters, or value properties.\n * Methods already marked as {@link breakingMethod} or {@link throwIfBroken} are unaffected.\n */\nexport function breakingClass<Target extends abstract new (...args: any[]) => WithBreakable>(\n\ttarget: Target,\n\tcontext: ClassDecoratorContext<Target>,\n): Target {\n\t// This could extend target, but doing so adds an extra step in the prototype chain and makes the instances just show up as \"DecoratedBreakable\" in the debugger.\n\tconst DecoratedBreakable = target;\n\n\t// Keep track of what keys we have seen (and already wrapped if needed).\n\t// Used to avoid rewrapping already wrapped properties.\n\t// Preloaded with \"constructor\" to avoid wrapping the constructor as there is no need to set the broken flag when the constructor throws and does not return an object.\n\t// Avoiding wrapping the constructor also avoids messing up the displayed name in the debugger.\n\tconst doNotWrap: Set<string | symbol> = new Set([\"constructor\"]);\n\n\tlet prototype: object | null = target.prototype;\n\twhile (prototype !== null) {\n\t\tfor (const key of Reflect.ownKeys(prototype)) {\n\t\t\tif (!doNotWrap.has(key)) {\n\t\t\t\tdoNotWrap.add(key);\n\t\t\t\tconst descriptor = Reflect.getOwnPropertyDescriptor(prototype, key);\n\t\t\t\tif (descriptor !== undefined) {\n\t\t\t\t\t// Method\n\t\t\t\t\tif (typeof descriptor.value === \"function\") {\n\t\t\t\t\t\tif (!isBreaker(descriptor.value)) {\n\t\t\t\t\t\t\t// This does not affect the original class, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor\n\t\t\t\t\t\t\tdescriptor.value = breakingMethod(descriptor.value);\n\t\t\t\t\t\t\tObject.defineProperty(DecoratedBreakable.prototype, key, descriptor);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tprototype = Reflect.getPrototypeOf(prototype);\n\t}\n\n\treturn DecoratedBreakable;\n}\n"]}
1
+ {"version":3,"file":"breakable.js","sourceRoot":"","sources":["../../src/util/breakable.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAC7D,uEAAsE;AAEtE;;;;;GAKG;AACH,MAAa,SAAS;IAGrB;IACC;;;;OAIG;IACc,IAAY;QAAZ,SAAI,GAAJ,IAAI,CAAQ;IAC3B,CAAC;IAEJ;;;;OAIG;IACI,GAAG;QACT,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,KAAK,GAAG,IAAI,qBAAU,CAC3B,kBAAkB,IAAI,CAAC,IAAI,+EAA+E,IAAI,CAAC,QAAQ,EAAE,CACzH,CAAC;YAEF,+GAA+G;YAC/G,mGAAmG;YACnG,6DAA6D;YAC5D,KAA6B,CAAC,KAAK;gBAClC,IAAI,CAAC,QAAgC,CAAC,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC;YAE/D,MAAM,KAAK,CAAC;QACb,CAAC;IACF,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,QAAe;QAC3B,2FAA2F;QAC3F,0KAA0K;QAC1K,IAAI,IAAI,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;YAChC,IAAI,CAAC,GAAG,EAAE,CAAC;YACX,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAC1B,CAAC;QACD,MAAM,QAAQ,CAAC;IAChB,CAAC;IAED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C;QAC3B,KAAK,MAAM,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;YAC9C,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;gBACzB,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;gBACnB,MAAM,UAAU,GAAG,OAAO,CAAC,wBAAwB,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;gBACpE,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;oBAC9B,SAAS;oBACT,IAAI,OAAO,UAAU,CAAC,KAAK,KAAK,UAAU,EAAE,CAAC;wBAC5C,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;4BAClC,gKAAgK;4BAChK,UAAU,CAAC,KAAK,GAAG,cAAc,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;4BACpD,MAAM,CAAC,cAAc,CAAC,kBAAkB,CAAC,SAAS,EAAE,GAAG,EAAE,UAAU,CAAC,CAAC;wBACtE,CAAC;oBACF,CAAC;gBACF,CAAC;YACF,CAAC;QACF,CAAC;QACD,SAAS,GAAG,OAAO,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;IAC/C,CAAC;IAED,OAAO,kBAAkB,CAAC;AAC3B,CAAC;AAnCD,sCAmCC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\n/**\n * An object which can enter a \"broken\" state where trying to use it is a UsageError.\n * @remarks\n * Use {@link WithBreakable} to apply this to another object.\n * @sealed\n */\nexport class Breakable {\n\tprivate brokenBy?: Error;\n\n\tpublic constructor(\n\t\t/**\n\t\t * A name for a given breakable scope.\n\t\t * @remarks\n\t\t * This is useful for documenting the semantics of a given Breakable and when inspecting things in the debugger, but is currently otherwise unused.\n\t\t */\n\t\tprivate readonly name: string,\n\t) {}\n\n\t/**\n\t * Throws if this object is in the broken state.\n\t * @remarks\n\t * Can use {@link throwIfBroken} to apply this to a method.\n\t */\n\tpublic use(): void {\n\t\tif (this.brokenBy !== undefined) {\n\t\t\tconst error = new UsageError(\n\t\t\t\t`Invalid use of ${this.name} after it was put into an invalid state by another error.\\nOriginal Error:\\n${this.brokenBy}`,\n\t\t\t);\n\n\t\t\t// This \"cause\" field is added in ES2022, but using if even without that built in support, it is still helpful.\n\t\t\t// See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause\n\t\t\t// TODO: remove this cast when targeting ES2022 lib or later.\n\t\t\t(error as { cause?: unknown }).cause =\n\t\t\t\t(this.brokenBy as { cause?: unknown }).cause ?? this.brokenBy;\n\n\t\t\tthrow error;\n\t\t}\n\t}\n\n\t/**\n\t * Puts this object into the broken state, and throws an error.\n\t *\n\t * @throws If already broken by a different error, throws a UsageError, otherwise throws `brokenBy`.\n\t */\n\tpublic break(brokenBy: Error): never {\n\t\t// If already broken by this error, let it bubble up without rethrowing a modified version.\n\t\t// This prevents internal errors like asserts getting rethrown as different errors when wrapped with multiple call to `{@link Breakable.run}` or `{@link breakingMethod}`.\n\t\tif (this.brokenBy !== brokenBy) {\n\t\t\tthis.use();\n\t\t\tthis.brokenBy = brokenBy;\n\t\t}\n\t\tthrow brokenBy;\n\t}\n\n\t/**\n\t * {@link Breakable.break}, except tolerates `unknown` to be more easily used by catch blocks.\n\t * @privateRemarks\n\t * If there is a use-case, this should be made public.\n\t */\n\tprivate rethrowCaught(brokenBy: unknown): never {\n\t\tif (brokenBy instanceof Error) {\n\t\t\tthis.break(brokenBy);\n\t\t}\n\t\tthis.break(\n\t\t\tnew Error(`Non-error thrown breaking ${this.name}. Thrown value: \"${brokenBy}\"`),\n\t\t);\n\t}\n\n\t/**\n\t * Runs code which should break the object if it throws.\n\t * @remarks\n\t * Like {@link Breakable.use}, this also throws if already broken.\n\t * Any exceptions this catches are re-thrown.\n\t * Can use {@link breakingMethod} to apply this to a method.\n\t */\n\tpublic run<TResult>(breaker: () => TResult): TResult {\n\t\tthis.use();\n\t\ttry {\n\t\t\treturn breaker();\n\t\t} catch (error: unknown) {\n\t\t\tthis.rethrowCaught(error);\n\t\t}\n\t}\n\n\t/**\n\t * Clears the existing broken state.\n\t * @remarks\n\t * This is rarely safe to to: it is only ok when all objects using this breaker are known to not have been left in an invalid state.\n\t * This is pretty much only safe in tests which just were checking a specific error was thrown, and which know that error closepath is actually exception safe.\n\t */\n\tpublic clearError(): void {\n\t\tassert(this.brokenBy !== undefined, 0x9b6 /* No error to clear */);\n\t\tthis.brokenBy = undefined;\n\t}\n}\n\n/**\n * Marks an object as being able to be in a broken state (unknown/unspecified/broken state due to unhandled exception).\n * @remarks\n * See decorators {@link breakingMethod} and {@link throwIfBroken} for ease of use.\n */\nexport interface WithBreakable {\n\t/**\n\t * The breaker for this object.\n\t * @remarks\n\t * If this `breaker` is in the broken state, the `WithBreakable` should be considered in a broken state.\n\t */\n\treadonly breaker: Breakable;\n}\n\n/**\n * Decorator for methods which should break the object when they throw.\n * @remarks\n * This also throws if already broken like {@link throwIfBroken}.\n * See {@link Breakable.run} for details.\n *\n * This should be used on methods which modify data that could result in an unsupported/broken state if an exception is thrown while modifying.\n * It is ok for breakingMethods to call each-other.\n * @privateRemarks\n * Explicitly capturing the full `Target` type is necessary to make this work with generic methods with unknown numbers of type parameters.\n */\nexport function breakingMethod<\n\tTarget extends ((...args: any[]) => unknown) & ((this: This, ...args: Args) => Return),\n\tThis extends WithBreakable,\n\tArgs extends never[],\n\tReturn,\n>(target: Target, context?: ClassMethodDecoratorContext<This, Target>): Target {\n\tfunction replacementMethod(this: This, ...args: Args): Return {\n\t\tif (this.breaker === undefined) {\n\t\t\t// This case is necessary for when wrapping methods which are invoked inside the constructor of the base class before `breaker` is set.\n\t\t\t// Since the constructor throwing does not return an object, failing to put it into a broken state is not too bad.\n\t\t\t// However when more than just the constructed object should be broken, this can result in missing a break.\n\t\t\treturn target.call(this, ...args);\n\t\t}\n\t\treturn this.breaker.run(() => {\n\t\t\treturn target.call(this, ...args);\n\t\t});\n\t}\n\tmarkBreaker(replacementMethod);\n\tnameFunctionFrom(replacementMethod, target);\n\treturn replacementMethod as Target;\n}\n\n/**\n * Decorator for methods which should throw if the object is in a broken state.\n * @remarks\n * This should be used on methods which read data that could be invalid when the object is broken.\n * @privateRemarks\n * Explicitly capturing the full `Target` type is necessary to make this work with generic methods with unknown numbers of type parameters.\n */\nexport function throwIfBroken<\n\tTarget extends ((...args: any[]) => unknown) & ((this: This, ...args: Args) => Return),\n\tThis extends WithBreakable,\n\tArgs extends never[],\n\tReturn,\n>(target: Target, context: ClassMethodDecoratorContext<This, Target>): Target {\n\tfunction replacementMethod(this: This, ...args: Args): Return {\n\t\tthis.breaker.use();\n\t\treturn target.call(this, ...args);\n\t}\n\tmarkBreaker(replacementMethod);\n\tnameFunctionFrom(replacementMethod, target);\n\treturn replacementMethod as Target;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\ntype PossiblyNamedFunction = Function & { displayName?: undefined | string };\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\nfunction nameFunctionFrom(toName: Function, nameFrom: Function): void {\n\t(toName as PossiblyNamedFunction).displayName =\n\t\t(nameFrom as PossiblyNamedFunction).displayName ?? nameFrom.name;\n}\n\nconst isBreakerSymbol: unique symbol = Symbol(\"isBreaker\");\n\n// Accepting any function like value is desired and safe here as this does not call the provided function.\n// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\nfunction markBreaker(f: Function): void {\n\t(f as unknown as Record<typeof isBreakerSymbol, true>)[isBreakerSymbol] = true;\n}\n\n// Accepting any function like value is desired and safe here as this does not call the provided function.\n// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\nfunction isBreaker(f: Function): boolean {\n\treturn isBreakerSymbol in (f as unknown as Record<typeof isBreakerSymbol, true>);\n}\n\n/**\n * Decorator for classes which should break when their methods throw.\n * @remarks\n * Applies {@link breakingMethod} to all methods declared directly by class or its base classes.\n * Does not include those on derived classes.\n * Does not include getters or setters, or value properties.\n * Methods already marked as {@link breakingMethod} or {@link throwIfBroken} are unaffected.\n */\nexport function breakingClass<Target extends abstract new (...args: any[]) => WithBreakable>(\n\ttarget: Target,\n\tcontext: ClassDecoratorContext<Target>,\n): Target {\n\t// This could extend target, but doing so adds an extra step in the prototype chain and makes the instances just show up as \"DecoratedBreakable\" in the debugger.\n\tconst DecoratedBreakable = target;\n\n\t// Keep track of what keys we have seen (and already wrapped if needed).\n\t// Used to avoid rewrapping already wrapped properties.\n\t// Preloaded with \"constructor\" to avoid wrapping the constructor as there is no need to set the broken flag when the constructor throws and does not return an object.\n\t// Avoiding wrapping the constructor also avoids messing up the displayed name in the debugger.\n\tconst doNotWrap: Set<string | symbol> = new Set([\"constructor\"]);\n\n\tlet prototype: object | null = target.prototype;\n\twhile (prototype !== null) {\n\t\tfor (const key of Reflect.ownKeys(prototype)) {\n\t\t\tif (!doNotWrap.has(key)) {\n\t\t\t\tdoNotWrap.add(key);\n\t\t\t\tconst descriptor = Reflect.getOwnPropertyDescriptor(prototype, key);\n\t\t\t\tif (descriptor !== undefined) {\n\t\t\t\t\t// Method\n\t\t\t\t\tif (typeof descriptor.value === \"function\") {\n\t\t\t\t\t\tif (!isBreaker(descriptor.value)) {\n\t\t\t\t\t\t\t// This does not affect the original class, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor\n\t\t\t\t\t\t\tdescriptor.value = breakingMethod(descriptor.value);\n\t\t\t\t\t\t\tObject.defineProperty(DecoratedBreakable.prototype, key, descriptor);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tprototype = Reflect.getPrototypeOf(prototype);\n\t}\n\n\treturn DecoratedBreakable;\n}\n"]}
@@ -2,6 +2,7 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
+ export { validateIndex, validateIndexRange, validatePositiveIndex, validateSafeInteger, } from "./arrayUtilities.js";
5
6
  export { brand, type Brand, BrandedType, type NameFromBranded, type ValueFromBranded, brandConst, } from "./brand.js";
6
7
  export { brandedNumberType, brandedStringType } from "./typeboxBrand.js";
7
8
  export { brandOpaque, extractFromOpaque, type ExtractFromOpaque, type Opaque, } from "./opaque.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,EACL,KAAK,KAAK,EACV,WAAW,EACX,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,UAAU,GACV,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EACN,WAAW,EACX,iBAAiB,EACjB,KAAK,iBAAiB,EACtB,KAAK,MAAM,GACX,MAAM,aAAa,CAAC;AACrB,OAAO,EACN,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,kBAAkB,EAClB,KAAK,SAAS,EACd,KAAK,iBAAiB,EACtB,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,GACtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,KAAK,SAAS,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnF,OAAO,EAAE,KAAK,UAAU,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACrE,YAAY,EACX,mBAAmB,EACnB,aAAa,EACb,SAAS,EACT,WAAW,EACX,qBAAqB,EACrB,SAAS,EACT,KAAK,EACL,cAAc,EACd,cAAc,EACd,WAAW,EACX,YAAY,EACZ,WAAW,EACX,mBAA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pB,oBAAoB,EACpB,KAAK,iBAAiB,EACtB,eAAe,GACf,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACN,SAAS,EACT,KAAK,aAAa,EAClB,cAAc,EACd,aAAa,EACb,aAAa,GACb,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,KAAK,UAAU,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnF,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,aAAa,EACb,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACN,KAAK,EACL,KAAK,KAAK,EACV,WAAW,EACX,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,UAAU,GACV,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EACN,WAAW,EACX,iBAAiB,EACjB,KAAK,iBAAiB,EACtB,KAAK,MAAM,GACX,MAAM,aAAa,CAAC;AACrB,OAAO,EACN,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,kBAAkB,EAClB,KAAK,SAAS,EACd,KAAK,iBAAiB,EACtB,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,GACtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,KAAK,SAAS,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnF,OAAO,EAAE,KAAK,UAAU,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACrE,YAAY,EACX,mBAAmB,EACnB,aAAa,EACb,SAAS,EACT,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,EACR,KAAK,gBAAgB,EACrB,kBAAkB,GAClB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACN,KAAK,WAAW,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,KAAK,iBAAiB,EACtB,eAAe,GACf,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACN,SAAS,EACT,KAAK,aAAa,EAClB,cAAc,EACd,aAAa,EACb,aAAa,GACb,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,KAAK,UAAU,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnF,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC"}
@@ -4,8 +4,13 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.count = exports.find = exports.compareStrings = exports.transformObjectMap = exports.assertValidRangeIndices = exports.capitalize = exports.disposeSymbol = exports.compareNamed = exports.oneFromIterable = exports.invertMap = exports.objectToMap = exports.assertNonNegativeSafeInteger = exports.assertValidRange = exports.assertValidIndex = exports.filterIterable = exports.mapIterable = exports.makeArray = exports.JsonCompatibleReadOnlySchema = exports.isReadonlyArray = exports.isJsonObject = exports.getOrCreate = exports.getOrAddEmptyToMap = exports.compareSets = exports.clone = exports.balancedReduce = exports.asMutable = exports.StackyIterator = exports.OffsetListFactory = exports.nestedSetContains = exports.addToNestedSet = exports.getOrCreateInNestedMap = exports.nestedMapFromFlatList = exports.nestedMapToFlatList = exports.mapNestedMap = exports.tryGetFromNestedMap = exports.tryAddToNestedMap = exports.setInNestedMap = exports.populateNestedMap = exports.SizedNestedMap = exports.forEachInNestedMap = exports.getOrDefaultInNestedMap = exports.getOrAddInNestedMap = exports.deleteFromNestedMap = exports.extractFromOpaque = exports.brandOpaque = exports.brandedStringType = exports.brandedNumberType = exports.brandConst = exports.BrandedType = exports.brand = void 0;
8
- exports.cloneWithReplacements = exports.mergeTupleBTrees = exports.newTupleBTree = exports.breakingClass = exports.throwIfBroken = exports.breakingMethod = exports.Breakable = exports.fakeIdAllocator = exports.idAllocatorFromState = exports.idAllocatorFromMaxId = exports.newIntegerRangeMap = exports.RangeMap = exports.brandedSlot = exports.getOrCreateSlotContent = exports.unsafeArrayToTuple = exports.ReferenceCountedBase = exports.iterableHasSome = exports.getOrAddInMap = exports.copyProperty = exports.defineLazyCachedProperty = exports.hasSingle = exports.hasSome = exports.getLast = void 0;
7
+ exports.assertValidRangeIndices = exports.capitalize = exports.disposeSymbol = exports.compareNamed = exports.oneFromIterable = exports.invertMap = exports.objectToMap = exports.assertNonNegativeSafeInteger = exports.assertValidRange = exports.assertValidIndex = exports.filterIterable = exports.mapIterable = exports.makeArray = exports.JsonCompatibleReadOnlySchema = exports.isReadonlyArray = exports.isJsonObject = exports.getOrCreate = exports.getOrAddEmptyToMap = exports.compareSets = exports.clone = exports.balancedReduce = exports.asMutable = exports.StackyIterator = exports.OffsetListFactory = exports.nestedSetContains = exports.addToNestedSet = exports.getOrCreateInNestedMap = exports.nestedMapFromFlatList = exports.nestedMapToFlatList = exports.mapNestedMap = exports.tryGetFromNestedMap = exports.tryAddToNestedMap = exports.setInNestedMap = exports.populateNestedMap = exports.SizedNestedMap = exports.forEachInNestedMap = exports.getOrDefaultInNestedMap = exports.getOrAddInNestedMap = exports.deleteFromNestedMap = exports.extractFromOpaque = exports.brandOpaque = exports.brandedStringType = exports.brandedNumberType = exports.brandConst = exports.BrandedType = exports.brand = exports.validateSafeInteger = exports.validatePositiveIndex = exports.validateIndexRange = exports.validateIndex = void 0;
8
+ exports.cloneWithReplacements = exports.mergeTupleBTrees = exports.newTupleBTree = exports.breakingClass = exports.throwIfBroken = exports.breakingMethod = exports.Breakable = exports.fakeIdAllocator = exports.idAllocatorFromState = exports.idAllocatorFromMaxId = exports.newIntegerRangeMap = exports.RangeMap = exports.brandedSlot = exports.getOrCreateSlotContent = exports.unsafeArrayToTuple = exports.ReferenceCountedBase = exports.iterableHasSome = exports.getOrAddInMap = exports.copyProperty = exports.defineLazyCachedProperty = exports.hasSingle = exports.hasSome = exports.getLast = exports.count = exports.find = exports.compareStrings = exports.transformObjectMap = void 0;
9
+ var arrayUtilities_js_1 = require("./arrayUtilities.js");
10
+ Object.defineProperty(exports, "validateIndex", { enumerable: true, get: function () { return arrayUtilities_js_1.validateIndex; } });
11
+ Object.defineProperty(exports, "validateIndexRange", { enumerable: true, get: function () { return arrayUtilities_js_1.validateIndexRange; } });
12
+ Object.defineProperty(exports, "validatePositiveIndex", { enumerable: true, get: function () { return arrayUtilities_js_1.validatePositiveIndex; } });
13
+ Object.defineProperty(exports, "validateSafeInteger", { enumerable: true, get: function () { return arrayUtilities_js_1.validateSafeInteger; } });
9
14
  var brand_js_1 = require("./brand.js");
10
15
  Object.defineProperty(exports, "brand", { enumerable: true, get: function () { return brand_js_1.brand; } });
11
16
  Object.defineProperty(exports, "BrandedType", { enumerable: true, get: function () { return brand_js_1.BrandedType; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH,uCAOoB;AANnB,iGAAA,KAAK,OAAA;AAEL,uGAAA,WAAW,OAAA;AAGX,sGAAA,UAAU,OAAA;AAEX,qDAAyE;AAAhE,oHAAA,iBAAiB,OAAA;AAAE,oHAAA,iBAAiB,OAAA;AAC7C,yCAKqB;AAJpB,wGAAA,WAAW,OAAA;AACX,8GAAA,iBAAiB,OAAA;AAIlB,+CAgBwB;AAfvB,mHAAA,mBAAmB,OAAA;AACnB,mHAAA,mBAAmB,OAAA;AACnB,uHAAA,uBAAuB,OAAA;AACvB,kHAAA,kBAAkB,OAAA;AAGlB,8GAAA,cAAc,OAAA;AACd,iHAAA,iBAAiB,OAAA;AACjB,8GAAA,cAAc,OAAA;AACd,iHAAA,iBAAiB,OAAA;AACjB,mHAAA,mBAAmB,OAAA;AACnB,4GAAA,YAAY,OAAA;AACZ,mHAAA,mBAAmB,OAAA;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GZ,6CAIuB;AAHtB,uGAAA,QAAQ,OAAA;AAER,iHAAA,kBAAkB,OAAA;AAGnB,mDAM0B;AAJzB,sHAAA,oBAAoB,OAAA;AACpB,sHAAA,oBAAoB,OAAA;AAEpB,iHAAA,eAAe,OAAA;AAGhB,+CAMwB;AALvB,yGAAA,SAAS,OAAA;AAET,8GAAA,cAAc,OAAA;AACd,6GAAA,aAAa,OAAA;AACb,6GAAA,aAAa,OAAA;AAGd,iDAAmF;AAAzD,8GAAA,aAAa,OAAA;AAAE,iHAAA,gBAAgB,OAAA;AAEzD,uEAAmE;AAA1D,iIAAA,qBAAqB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tbrand,\n\ttype Brand,\n\tBrandedType,\n\ttype NameFromBranded,\n\ttype ValueFromBranded,\n\tbrandConst,\n} from \"./brand.js\";\nexport { brandedNumberType, brandedStringType } from \"./typeboxBrand.js\";\nexport {\n\tbrandOpaque,\n\textractFromOpaque,\n\ttype ExtractFromOpaque,\n\ttype Opaque,\n} from \"./opaque.js\";\nexport {\n\tdeleteFromNestedMap,\n\tgetOrAddInNestedMap,\n\tgetOrDefaultInNestedMap,\n\tforEachInNestedMap,\n\ttype NestedMap,\n\ttype ReadonlyNestedMap,\n\tSizedNestedMap,\n\tpopulateNestedMap,\n\tsetInNestedMap,\n\ttryAddToNestedMap,\n\ttryGetFromNestedMap,\n\tmapNestedMap,\n\tnestedMapToFlatList,\n\tnestedMapFromFlatList,\n\tgetOrCreateInNestedMap,\n} from \"./nestedMap.js\";\nexport { addToNestedSet, type NestedSet, nestedSetContains } from \"./nestedSet.js\";\nexport { type OffsetList, OffsetListFactory } from \"./offsetList.js\";\nexport type {\n\tareSafelyAssignable,\n\tContravariant,\n\tCovariant,\n\teitherIsAny,\n\tEnforceTypeCheckTests,\n\tInvariant,\n\tisAny,\n\tisAssignableTo,\n\tisStrictSubset,\n\tMakeNominal,\n\trequireFalse,\n\trequireTrue,\n\trequireAssignableTo,\n\tareOnlyKeys,\n} from \"./typeCheck.js\";\nexport { StackyIterator } from \"./stackyIterator.js\";\nexport {\n\tasMutable,\n\tbalancedReduce,\n\tclone,\n\tcompareSets,\n\tgetOrAddEmptyToMap,\n\tgetOrCreate,\n\tisJsonObject,\n\tisReadonlyArray,\n\ttype JsonCompatible,\n\ttype JsonCompatibleObject,\n\ttype JsonCompatibleReadOnly,\n\ttype JsonCompatibleReadOnlyObject,\n\tJsonCompatibleReadOnlySchema,\n\tmakeArray,\n\tmapIterable,\n\tfilterIterable,\n\ttype Mutable,\n\ttype Populated,\n\ttype RecursiveReadonly,\n\tassertValidIndex,\n\tassertValidRange,\n\tassertNonNegativeSafeInteger,\n\tobjectToMap,\n\tinvertMap,\n\toneFromIterable,\n\ttype Named,\n\tcompareNamed,\n\tdisposeSymbol,\n\ttype IDisposable,\n\tcapitalize,\n\tassertValidRangeIndices,\n\ttransformObjectMap,\n\tcompareStrings,\n\tfind,\n\tcount,\n\tgetLast,\n\thasSome,\n\thasSingle,\n\tdefineLazyCachedProperty,\n\tcopyPropertyIfDefined as copyProperty,\n\tgetOrAddInMap,\n\titerableHasSome,\n} from \"./utils.js\";\nexport { ReferenceCountedBase, type ReferenceCounted } from \"./referenceCounting.js\";\n\nexport type {\n\t_RecursiveTrick,\n\tRestrictiveReadonlyRecord,\n\tRestrictiveStringRecord,\n\t_InlineTrick,\n\tFlattenKeys,\n\tIsUnion,\n\tUnionToIntersection,\n\tUnionToTuple,\n\tPopUnion,\n} from \"./typeUtils.js\";\n\nexport { unsafeArrayToTuple } from \"./typeUtils.js\";\n\nexport {\n\ttype BrandedKey,\n\ttype BrandedKeyContent,\n\ttype BrandedMapSubset,\n\tgetOrCreateSlotContent,\n\tbrandedSlot,\n} from \"./brandedMap.js\";\n\nexport {\n\tRangeMap,\n\ttype RangeQueryResult,\n\tnewIntegerRangeMap,\n} from \"./rangeMap.js\";\n\nexport {\n\ttype IdAllocator,\n\tidAllocatorFromMaxId,\n\tidAllocatorFromState,\n\ttype IdAllocationState,\n\tfakeIdAllocator,\n} from \"./idAllocator.js\";\n\nexport {\n\tBreakable,\n\ttype WithBreakable,\n\tbreakingMethod,\n\tthrowIfBroken,\n\tbreakingClass,\n} from \"./breakable.js\";\n\nexport { type TupleBTree, newTupleBTree, mergeTupleBTrees } from \"./bTreeUtils.js\";\n\nexport { cloneWithReplacements } from \"./cloneWithReplacements.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH,yDAK6B;AAJ5B,kHAAA,aAAa,OAAA;AACb,uHAAA,kBAAkB,OAAA;AAClB,0HAAA,qBAAqB,OAAA;AACrB,wHAAA,mBAAmB,OAAA;AAEpB,uCAOoB;AANnB,iGAAA,KAAK,OAAA;AAEL,uGAAA,WAAW,OAAA;AAGX,sGAAA,UAAU,OAAA;AAEX,qDAAyE;AAAhE,oHAAA,iBAAiB,OAAA;AAAE,oHAAA,iBAAiB,OAAA;AAC7C,yCAKqB;AAJpB,wGAAA,WAAW,OAAA;AACX,8GAAA,iBAAiB,OAAA;AAIlB,+CAgBwB;AAfvB,mHAAA,mBAAmB,OAAA;AACnB,mHAAA,mBAAmB,OAAA;AACnB,uHAAA,uBAAuB,OAAA;AACvB,kHAAA,kBAAkB,OAAA;AAGlB,8GAAA,cAAc,OAAA;AACd,iHAAA,iBAAiB,OAAA;AACjB,8GAAA,cAAc,OAAA;AACd,iHAAA,iBAAiB,OAAA;AACjB,mHAAA,mBAAmB,OAAA;AACnB,4GAAA,YAAY,OAAA;AACZ,mHAAA,mBAAmB,OAAA;AACnB,qHAAA,qBAAqB,OAAA;AACrB,sHAAA,sBAAsB,OAAA;AAEvB,+CAAmF;AAA1E,8GAAA,cAAc,OAAA;AAAkB,iHAAA,iBAAiB,OAAA;AAC1D,iDAAqE;AAA3C,kHAAA,iBAAiB,OAAA;AAiB3C,yDAAqD;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yGAAA,SAAS,OAAA;AAET,8GAAA,cAAc,OAAA;AACd,6GAAA,aAAa,OAAA;AACb,6GAAA,aAAa,OAAA;AAGd,iDAAmF;AAAzD,8GAAA,aAAa,OAAA;AAAE,iHAAA,gBAAgB,OAAA;AAEzD,uEAAmE;AAA1D,iIAAA,qBAAqB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tvalidateIndex,\n\tvalidateIndexRange,\n\tvalidatePositiveIndex,\n\tvalidateSafeInteger,\n} from \"./arrayUtilities.js\";\nexport {\n\tbrand,\n\ttype Brand,\n\tBrandedType,\n\ttype NameFromBranded,\n\ttype ValueFromBranded,\n\tbrandConst,\n} from \"./brand.js\";\nexport { brandedNumberType, brandedStringType } from \"./typeboxBrand.js\";\nexport {\n\tbrandOpaque,\n\textractFromOpaque,\n\ttype ExtractFromOpaque,\n\ttype Opaque,\n} from \"./opaque.js\";\nexport {\n\tdeleteFromNestedMap,\n\tgetOrAddInNestedMap,\n\tgetOrDefaultInNestedMap,\n\tforEachInNestedMap,\n\ttype NestedMap,\n\ttype ReadonlyNestedMap,\n\tSizedNestedMap,\n\tpopulateNestedMap,\n\tsetInNestedMap,\n\ttryAddToNestedMap,\n\ttryGetFromNestedMap,\n\tmapNestedMap,\n\tnestedMapToFlatList,\n\tnestedMapFromFlatList,\n\tgetOrCreateInNestedMap,\n} from \"./nestedMap.js\";\nexport { addToNestedSet, type NestedSet, nestedSetContains } from \"./nestedSet.js\";\nexport { type OffsetList, OffsetListFactory } from \"./offsetList.js\";\nexport type {\n\tareSafelyAssignable,\n\tContravariant,\n\tCovariant,\n\teitherIsAny,\n\tEnforceTypeCheckTests,\n\tInvariant,\n\tisAny,\n\tisAssignableTo,\n\tisStrictSubset,\n\tMakeNominal,\n\trequireFalse,\n\trequireTrue,\n\trequireAssignableTo,\n\tareOnlyKeys,\n} from \"./typeCheck.js\";\nexport { StackyIterator } from \"./stackyIterator.js\";\nexport {\n\tasMutable,\n\tbalancedReduce,\n\tclone,\n\tcompareSets,\n\tgetOrAddEmptyToMap,\n\tgetOrCreate,\n\tisJsonObject,\n\tisReadonlyArray,\n\ttype JsonCompatible,\n\ttype JsonCompatibleObject,\n\ttype JsonCompatibleReadOnly,\n\ttype JsonCompatibleReadOnlyObject,\n\tJsonCompatibleReadOnlySchema,\n\tmakeArray,\n\tmapIterable,\n\tfilterIterable,\n\ttype Mutable,\n\ttype Populated,\n\ttype RecursiveReadonly,\n\tassertValidIndex,\n\tassertValidRange,\n\tassertNonNegativeSafeInteger,\n\tobjectToMap,\n\tinvertMap,\n\toneFromIterable,\n\ttype Named,\n\tcompareNamed,\n\tdisposeSymbol,\n\ttype IDisposable,\n\tcapitalize,\n\tassertValidRangeIndices,\n\ttransformObjectMap,\n\tcompareStrings,\n\tfind,\n\tcount,\n\tgetLast,\n\thasSome,\n\thasSingle,\n\tdefineLazyCachedProperty,\n\tcopyPropertyIfDefined as copyProperty,\n\tgetOrAddInMap,\n\titerableHasSome,\n} from \"./utils.js\";\nexport { ReferenceCountedBase, type ReferenceCounted } from \"./referenceCounting.js\";\n\nexport type {\n\t_RecursiveTrick,\n\tRestrictiveReadonlyRecord,\n\tRestrictiveStringRecord,\n\t_InlineTrick,\n\tFlattenKeys,\n\tIsUnion,\n\tUnionToIntersection,\n\tUnionToTuple,\n\tPopUnion,\n} from \"./typeUtils.js\";\n\nexport { unsafeArrayToTuple } from \"./typeUtils.js\";\n\nexport {\n\ttype BrandedKey,\n\ttype BrandedKeyContent,\n\ttype BrandedMapSubset,\n\tgetOrCreateSlotContent,\n\tbrandedSlot,\n} from \"./brandedMap.js\";\n\nexport {\n\tRangeMap,\n\ttype RangeQueryResult,\n\tnewIntegerRangeMap,\n} from \"./rangeMap.js\";\n\nexport {\n\ttype IdAllocator,\n\tidAllocatorFromMaxId,\n\tidAllocatorFromState,\n\ttype IdAllocationState,\n\tfakeIdAllocator,\n} from \"./idAllocator.js\";\n\nexport {\n\tBreakable,\n\ttype WithBreakable,\n\tbreakingMethod,\n\tthrowIfBroken,\n\tbreakingClass,\n} from \"./breakable.js\";\n\nexport { type TupleBTree, newTupleBTree, mergeTupleBTrees } from \"./bTreeUtils.js\";\n\nexport { cloneWithReplacements } from \"./cloneWithReplacements.js\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"typeCheckTests.d.ts","sourceRoot":"","sources":["../../src/util/typeCheckTests.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,KAAK,EACX,aAAa,EACb,SAAS,EACT,SAAS,EACT,WAAW,EACX,WAAW,EACX,mBAAmB,EACnB,WAAW,EACX,KAAK,EACL,cAAc,EACd,cAAc,EACd,YAAY,EACZ,WAAW,EACX,MAAM,gBAAgB,CAAC;AAExB;;;GAGG;AAEH,OAAO,OAAO,MAAM;CAAG;AACvB,OAAO,OAAO,MAAM;CAAG;AAEvB,OAAO,OAAO,QAAQ;IACrB,SAAS,CAAC,UAAU,EAAE,WAAW,CAAC;CAClC;AAED,OAAO,OAAO,QAAQ;IACrB,SAAS,CAAC,UAAU,EAAE,WAAW,CAAC;CAClC;AAED,OAAO,OAAO,QAAS,SAAQ,QAAQ;IACtC,SAAS,CAAC,UAAU,EAAE,WAAW,CAAC;CAClC;AAED,OAAO,OAAO,QAAS,SAAQ,QAAQ;IACtC,SAAS,CAAC,UAAU,EAAE,WAAW,CAAC;CAClC;AAED,OAAO,OAAO,OAAO,CAAC,EAAE;CAAI;AAE5B,OAAO,OAAO,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACnC,SAAS,CAAC,UAAU,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;CACpC;AAED,OAAO,OAAO,oBAAoB,CAAC,EAAE,CAAC,CAAC;IACtC,SAAS,CAAC,UAAU,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;CACxC;AAED,OAAO,OAAO,gBAAgB,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACt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YAAY,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,GAClD,YAAY,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,GAGtC,WAAW,CAAC,WAAW,CAAC;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC,GAC7D,WAAW,CAAC,WAAW,CAAC;IAAE,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC,GAC9D,YAAY,CAAC,WAAW,CAAC;IAAE,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,CAAC,CAAC,GACzD,YAAY,CAAC,WAAW,CAAC;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"typeCheckTests.js","sourceRoot":"","sources":["../../src/util/typeCheckTests.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// These tests include making sure some banned types (like `{}`) work correctly,\n// and are authored with awareness of the issues with these types.\n\n/* eslint-disable @typescript-eslint/ban-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-extraneous-class */\n\nimport type {\n\tContravariant,\n\tCovariant,\n\tInvariant,\n\tMakeNominal,\n\tareOnlyKeys,\n\tareSafelyAssignable,\n\teitherIsAny,\n\tisAny,\n\tisAssignableTo,\n\tisStrictSubset,\n\trequireFalse,\n\trequireTrue,\n} from \"./typeCheck.js\";\n\n/**\n * Checks that typeCheck's constraints work as intended.\n * Since typescript does type erasure, these tests have to be compile time checks.\n */\n\ndeclare class Empty1 {}\ndeclare class Empty2 {}\n\ndeclare class Nominal1 {\n\tprotected _typeCheck: MakeNominal;\n}\n\ndeclare class Nominal2 {\n\tprotected _typeCheck: MakeNominal;\n}\n\ndeclare class Derived1 extends Nominal1 {\n\tprotected _typeCheck: MakeNominal;\n}\n\ndeclare class Derived2 extends Nominal1 {\n\tprotected _typeCheck: MakeNominal;\n}\n\ndeclare class Generic<_T> {}\n\ndeclare class GenericCovariant<out T> {\n\tprotected _typeCheck?: Covariant<T>;\n}\n\ndeclare class GenericContravariant<in T> {\n\tprotected _typeCheck?: Contravariant<T>;\n}\n\ndeclare class GenericInvariant<in out T> {\n\tprotected _typeCheck?: Invariant<T>;\n}\n\ndeclare class GenericMulti<in out T, out K> {\n\tprotected _typeCheck?: Invariant<T> & Covariant<K>;\n}\n\ninterface GenericCovariantInterface<out T> {\n\t_typeCheck?: Covariant<T>;\n}\n\ninterface GenericContravariantInterface<in T> {\n\t_typeCheck?: Contravariant<T>;\n}\n\ninterface GenericInvariantInterface<in out T> {\n\t_typeCheck?: Invariant<T>;\n}\n\n// Check that interface can be implemented without needing extra members\ndeclare class GenericInvariantImplementation<T> implements GenericInvariantInterface<T> {}\n\n/**\n * Import this into a context where you want to be sure the TypeCheck library is functioning properly.\n *\n * It's functionality depends on compiler settings (requires several of the strict options),\n * and could break with compiler version changes.\n * Thus for maximal confidence everything is working correctly, you need to import this.\n */\nexport type EnforceTypeCheckTests =\n\t// Add dummy use of type checking types above\n\t| requireTrue<\n\t\t\tisAssignableTo<GenericInvariantImplementation<number>, GenericInvariantInterface<number>>\n\t >\n\n\t// Positive tests\n\t| requireTrue<true>\n\t| requireFalse<false>\n\n\t// test isAssignableTo for normal types\n\t| requireTrue<isAssignableTo<Empty1, Empty1>>\n\t| requireTrue<isAssignableTo<Empty1, Empty2>>\n\t| requireTrue<isAssignableTo<Nominal1, Nominal1>>\n\t| requireFalse<isAssignableTo<Nominal1, Nominal2>>\n\t| requireTrue<isAssignableTo<Derived1, Nominal1>>\n\t| requireFalse<isAssignableTo<Derived1, Derived2>>\n\t| requireTrue<isAssignableTo<Generic<Nominal1>, Generic<Nominal2>>>\n\n\t// test isAssignableTo for any\n\t| requireTrue<isAssignableTo<any, Nominal1>>\n\t| requireTrue<isAssignableTo<Nominal1, any>>\n\n\t// test isAssignableTo for unknown: all types are assignable to unknown\n\t| requireFalse<isAssignableTo<unknown, Nominal1>>\n\t| requireTrue<isAssignableTo<Nominal1, unknown>>\n\n\t// test isAssignableTo for never: all types are assignable from never\n\t| requireTrue<isAssignableTo<never, Nominal1>>\n\t| requireFalse<isAssignableTo<Nominal1, never>>\n\n\t// test Covariant\n\t| requireFalse<isAssignableTo<GenericCovariant<Nominal1>, GenericCovariant<Nominal2>>>\n\t| requireTrue<isAssignableTo<GenericCovariant<Derived1>, GenericCovariant<Nominal1>>>\n\t| requireFalse<isAssignableTo<GenericCovariant<Nominal1>, GenericCovariant<Derived1>>>\n\n\t// test Contravariant\n\t| requireFalse<\n\t\t\tisAssignableTo<GenericContravariant<Nominal1>, GenericContravariant<Nominal2>>\n\t >\n\t| requireFalse<\n\t\t\tisAssignableTo<GenericContravariant<Derived1>, GenericContravariant<Nominal1>>\n\t >\n\t| requireTrue<isAssignableTo<GenericContravariant<Nominal1>, GenericContravariant<Derived1>>>\n\n\t// test Invariant\n\t| requireFalse<isAssignableTo<GenericInvariant<Nominal1>, GenericInvariant<Nominal2>>>\n\t| requireFalse<isAssignableTo<GenericInvariant<Derived1>, GenericInvariant<Nominal1>>>\n\t| requireFalse<isAssignableTo<GenericInvariant<Nominal1>, GenericInvariant<Derived1>>>\n\n\t// test Multiple parameters\n\t| requireFalse<\n\t\t\tisAssignableTo<GenericMulti<Nominal1, number>, GenericMulti<Derived1, number>>\n\t >\n\t| requireFalse<\n\t\t\tisAssignableTo<GenericMulti<number, Nominal1>, GenericMulti<number, Derived1>>\n\t >\n\t| requireTrue<isAssignableTo<GenericMulti<number, Derived1>, GenericMulti<number, Nominal1>>>\n\n\t// test Covariant Interface\n\t| requireFalse<\n\t\t\tisAssignableTo<GenericCovariantInterface<Nominal1>, GenericCovariantInterface<Nominal2>>\n\t >\n\t| requireTrue<\n\t\t\tisAssignableTo<GenericCovariantInterface<Derived1>, GenericCovariantInterface<Nominal1>>\n\t >\n\t| requireFalse<\n\t\t\tisAssignableTo<GenericCovariantInterface<Nominal1>, GenericCovariantInterface<Derived1>>\n\t >\n\n\t// test Contravariant Interface\n\t| requireFalse<\n\t\t\tisAssignableTo<\n\t\t\t\tGenericContravariantInterface<Nominal1>,\n\t\t\t\tGenericContravariantInterface<Nominal2>\n\t\t\t>\n\t >\n\t| requireFalse<\n\t\t\tisAssignableTo<\n\t\t\t\tGenericContravariantInterface<Derived1>,\n\t\t\t\tGenericContravariantInterface<Nominal1>\n\t\t\t>\n\t >\n\t| requireTrue<\n\t\t\tisAssignableTo<\n\t\t\t\tGenericContravariantInterface<Nominal1>,\n\t\t\t\tGenericContravariantInterface<Derived1>\n\t\t\t>\n\t >\n\n\t// test Invariant Interface\n\t| requireFalse<\n\t\t\tisAssignableTo<GenericInvariantInterface<Nominal1>, GenericInvariantInterface<Nominal2>>\n\t >\n\t| requireFalse<\n\t\t\tisAssignableTo<GenericInvariantInterface<Derived1>, GenericInvariantInterface<Nominal1>>\n\t >\n\t| requireFalse<\n\t\t\tisAssignableTo<GenericInvariantInterface<Nominal1>, GenericInvariantInterface<Derived1>>\n\t >\n\n\t// test eitherIsAny\n\t| requireTrue<eitherIsAny<any, Nominal1>>\n\t| requireTrue<eitherIsAny<Nominal1, any>>\n\t| requireTrue<eitherIsAny<any, any>>\n\t| requireFalse<eitherIsAny<Nominal1, Nominal1>>\n\n\t// areSafelyAssignable tests\n\t| requireTrue<areSafelyAssignable<Nominal1, Nominal1>>\n\t| requireFalse<areSafelyAssignable<unknown, Nominal1>>\n\t| requireFalse<areSafelyAssignable<any, any>>\n\t| requireTrue<areSafelyAssignable<unknown, unknown>>\n\t| requireFalse<areSafelyAssignable<any, Nominal1>>\n\t| requireFalse<areSafelyAssignable<Nominal1, any>>\n\t| requireFalse<areSafelyAssignable<unknown, any>>\n\n\t// test isAny\n\t| requireTrue<isAny<any>>\n\t| requireFalse<isAny<unknown>>\n\t| requireFalse<isAny<Nominal1>>\n\t| requireFalse<isAny<never>>\n\t| requireFalse<isAny<{}>>\n\t| requireFalse<isAny<boolean>>\n\t| requireFalse<isAny<number | undefined>>\n\t| requireFalse<isAny<1 & \"x\">>\n\t| requireFalse<isAny<(1 & 2) | {}>>\n\n\t// test isStrictSubset\n\t| requireTrue<isStrictSubset<1, 1 | 2>>\n\t| requireTrue<isStrictSubset<[1, true], [1 | 2, true]>>\n\t| requireTrue<isStrictSubset<[1, true], [1 | 2, true | false]>>\n\t| requireTrue<isStrictSubset<[1, true], [1, true | false]>>\n\t| requireTrue<isStrictSubset<[1, true], [1, true] | [1 | false]>>\n\t| requireTrue<isStrictSubset<1, number>>\n\t| requireFalse<isStrictSubset<1, 1>>\n\t| requireFalse<isStrictSubset<1, 2>>\n\t| requireFalse<isStrictSubset<[1, true], [1, true]>>\n\t| requireFalse<isStrictSubset<1 | 2, 1>>\n\n\t// areOnlyKeys\n\t| requireTrue<areOnlyKeys<{ a: number; b: number }, \"a\" | \"b\">>\n\t| requireTrue<areOnlyKeys<{ a?: number; b: number }, \"a\" | \"b\">>\n\t| requireFalse<areOnlyKeys<{ a?: number; b: number }, \"b\">>\n\t| requireFalse<areOnlyKeys<{ a: number; b: number }, \"a\">>;\n// This case is explicitly documented as unsupported.\n// | requireFalse<areOnlyKeys<Record<string, unknown>, \"a\">>;\n\n// negative tests (should not build)\n// @ts-expect-error negative test\ntype _falseIsTrue = requireTrue<false>;\n// @ts-expect-error negative test\ntype _trueIsFalse = requireFalse<true>;\n// @ts-expect-error negative test\ntype _booleanIsTrue = requireTrue<boolean>;\n// @ts-expect-error negative test\ntype _booleanIsFalse = requireFalse<boolean>;\n// @ts-expect-error negative test\ntype _emptyNotAssignable = requireFalse<isAssignableTo<Empty1, Empty2>>;\n// @ts-expect-error negative test\ntype _numberAssignableToString = requireTrue<isAssignableTo<number, string>>;\n// @ts-expect-error negative test\ntype _anyNotAny = requireFalse<isAny<any>>;\n"]}
1
+ {"version":3,"file":"typeCheckTests.js","sourceRoot":"","sources":["../../src/util/typeCheckTests.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// These tests include making sure some banned types (like `{}`) work correctly,\n// and are authored with awareness of the issues with these types.\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-extraneous-class */\n\nimport type {\n\tContravariant,\n\tCovariant,\n\tInvariant,\n\tMakeNominal,\n\tareOnlyKeys,\n\tareSafelyAssignable,\n\teitherIsAny,\n\tisAny,\n\tisAssignableTo,\n\tisStrictSubset,\n\trequireFalse,\n\trequireTrue,\n} from \"./typeCheck.js\";\n\n/**\n * Checks that typeCheck's constraints work as intended.\n * Since typescript does type erasure, these tests have to be compile time checks.\n */\n\ndeclare class Empty1 {}\ndeclare class Empty2 {}\n\ndeclare class Nominal1 {\n\tprotected _typeCheck: MakeNominal;\n}\n\ndeclare class Nominal2 {\n\tprotected _typeCheck: MakeNominal;\n}\n\ndeclare class Derived1 extends Nominal1 {\n\tprotected _typeCheck: MakeNominal;\n}\n\ndeclare class Derived2 extends Nominal1 {\n\tprotected _typeCheck: MakeNominal;\n}\n\ndeclare class Generic<_T> {}\n\ndeclare class GenericCovariant<out T> {\n\tprotected _typeCheck?: Covariant<T>;\n}\n\ndeclare class GenericContravariant<in T> {\n\tprotected _typeCheck?: Contravariant<T>;\n}\n\ndeclare class GenericInvariant<in out T> {\n\tprotected _typeCheck?: Invariant<T>;\n}\n\ndeclare class GenericMulti<in out T, out K> {\n\tprotected _typeCheck?: Invariant<T> & Covariant<K>;\n}\n\ninterface GenericCovariantInterface<out T> {\n\t_typeCheck?: Covariant<T>;\n}\n\ninterface GenericContravariantInterface<in T> {\n\t_typeCheck?: Contravariant<T>;\n}\n\ninterface GenericInvariantInterface<in out T> {\n\t_typeCheck?: Invariant<T>;\n}\n\n// Check that interface can be implemented without needing extra members\ndeclare class GenericInvariantImplementation<T> implements GenericInvariantInterface<T> {}\n\n/**\n * Import this into a context where you want to be sure the TypeCheck library is functioning properly.\n *\n * It's functionality depends on compiler settings (requires several of the strict options),\n * and could break with compiler version changes.\n * Thus for maximal confidence everything is working correctly, you need to import this.\n */\nexport type EnforceTypeCheckTests =\n\t// Add dummy use of type checking types above\n\t| requireTrue<\n\t\t\tisAssignableTo<GenericInvariantImplementation<number>, GenericInvariantInterface<number>>\n\t >\n\n\t// Positive tests\n\t| requireTrue<true>\n\t| requireFalse<false>\n\n\t// test isAssignableTo for normal types\n\t| requireTrue<isAssignableTo<Empty1, Empty1>>\n\t| requireTrue<isAssignableTo<Empty1, Empty2>>\n\t| requireTrue<isAssignableTo<Nominal1, Nominal1>>\n\t| requireFalse<isAssignableTo<Nominal1, Nominal2>>\n\t| requireTrue<isAssignableTo<Derived1, Nominal1>>\n\t| requireFalse<isAssignableTo<Derived1, Derived2>>\n\t| requireTrue<isAssignableTo<Generic<Nominal1>, Generic<Nominal2>>>\n\n\t// test isAssignableTo for any\n\t| requireTrue<isAssignableTo<any, Nominal1>>\n\t| requireTrue<isAssignableTo<Nominal1, any>>\n\n\t// test isAssignableTo for unknown: all types are assignable to unknown\n\t| requireFalse<isAssignableTo<unknown, Nominal1>>\n\t| requireTrue<isAssignableTo<Nominal1, unknown>>\n\n\t// test isAssignableTo for never: all types are assignable from never\n\t| requireTrue<isAssignableTo<never, Nominal1>>\n\t| requireFalse<isAssignableTo<Nominal1, never>>\n\n\t// test Covariant\n\t| requireFalse<isAssignableTo<GenericCovariant<Nominal1>, GenericCovariant<Nominal2>>>\n\t| requireTrue<isAssignableTo<GenericCovariant<Derived1>, GenericCovariant<Nominal1>>>\n\t| requireFalse<isAssignableTo<GenericCovariant<Nominal1>, GenericCovariant<Derived1>>>\n\n\t// test Contravariant\n\t| requireFalse<\n\t\t\tisAssignableTo<GenericContravariant<Nominal1>, GenericContravariant<Nominal2>>\n\t >\n\t| requireFalse<\n\t\t\tisAssignableTo<GenericContravariant<Derived1>, GenericContravariant<Nominal1>>\n\t >\n\t| requireTrue<isAssignableTo<GenericContravariant<Nominal1>, GenericContravariant<Derived1>>>\n\n\t// test Invariant\n\t| requireFalse<isAssignableTo<GenericInvariant<Nominal1>, GenericInvariant<Nominal2>>>\n\t| requireFalse<isAssignableTo<GenericInvariant<Derived1>, GenericInvariant<Nominal1>>>\n\t| requireFalse<isAssignableTo<GenericInvariant<Nominal1>, GenericInvariant<Derived1>>>\n\n\t// test Multiple parameters\n\t| requireFalse<\n\t\t\tisAssignableTo<GenericMulti<Nominal1, number>, GenericMulti<Derived1, number>>\n\t >\n\t| requireFalse<\n\t\t\tisAssignableTo<GenericMulti<number, Nominal1>, GenericMulti<number, Derived1>>\n\t >\n\t| requireTrue<isAssignableTo<GenericMulti<number, Derived1>, GenericMulti<number, Nominal1>>>\n\n\t// test Covariant Interface\n\t| requireFalse<\n\t\t\tisAssignableTo<GenericCovariantInterface<Nominal1>, GenericCovariantInterface<Nominal2>>\n\t >\n\t| requireTrue<\n\t\t\tisAssignableTo<GenericCovariantInterface<Derived1>, GenericCovariantInterface<Nominal1>>\n\t >\n\t| requireFalse<\n\t\t\tisAssignableTo<GenericCovariantInterface<Nominal1>, GenericCovariantInterface<Derived1>>\n\t >\n\n\t// test Contravariant Interface\n\t| requireFalse<\n\t\t\tisAssignableTo<\n\t\t\t\tGenericContravariantInterface<Nominal1>,\n\t\t\t\tGenericContravariantInterface<Nominal2>\n\t\t\t>\n\t >\n\t| requireFalse<\n\t\t\tisAssignableTo<\n\t\t\t\tGenericContravariantInterface<Derived1>,\n\t\t\t\tGenericContravariantInterface<Nominal1>\n\t\t\t>\n\t >\n\t| requireTrue<\n\t\t\tisAssignableTo<\n\t\t\t\tGenericContravariantInterface<Nominal1>,\n\t\t\t\tGenericContravariantInterface<Derived1>\n\t\t\t>\n\t >\n\n\t// test Invariant Interface\n\t| requireFalse<\n\t\t\tisAssignableTo<GenericInvariantInterface<Nominal1>, GenericInvariantInterface<Nominal2>>\n\t >\n\t| requireFalse<\n\t\t\tisAssignableTo<GenericInvariantInterface<Derived1>, GenericInvariantInterface<Nominal1>>\n\t >\n\t| requireFalse<\n\t\t\tisAssignableTo<GenericInvariantInterface<Nominal1>, GenericInvariantInterface<Derived1>>\n\t >\n\n\t// test eitherIsAny\n\t| requireTrue<eitherIsAny<any, Nominal1>>\n\t| requireTrue<eitherIsAny<Nominal1, any>>\n\t| requireTrue<eitherIsAny<any, any>>\n\t| requireFalse<eitherIsAny<Nominal1, Nominal1>>\n\n\t// areSafelyAssignable tests\n\t| requireTrue<areSafelyAssignable<Nominal1, Nominal1>>\n\t| requireFalse<areSafelyAssignable<unknown, Nominal1>>\n\t| requireFalse<areSafelyAssignable<any, any>>\n\t| requireTrue<areSafelyAssignable<unknown, unknown>>\n\t| requireFalse<areSafelyAssignable<any, Nominal1>>\n\t| requireFalse<areSafelyAssignable<Nominal1, any>>\n\t| requireFalse<areSafelyAssignable<unknown, any>>\n\n\t// test isAny\n\t| requireTrue<isAny<any>>\n\t| requireFalse<isAny<unknown>>\n\t| requireFalse<isAny<Nominal1>>\n\t| requireFalse<isAny<never>>\n\t| requireFalse<isAny<{}>>\n\t| requireFalse<isAny<boolean>>\n\t| requireFalse<isAny<number | undefined>>\n\t| requireFalse<isAny<1 & \"x\">>\n\t| requireFalse<isAny<(1 & 2) | {}>>\n\n\t// test isStrictSubset\n\t| requireTrue<isStrictSubset<1, 1 | 2>>\n\t| requireTrue<isStrictSubset<[1, true], [1 | 2, true]>>\n\t| requireTrue<isStrictSubset<[1, true], [1 | 2, true | false]>>\n\t| requireTrue<isStrictSubset<[1, true], [1, true | false]>>\n\t| requireTrue<isStrictSubset<[1, true], [1, true] | [1 | false]>>\n\t| requireTrue<isStrictSubset<1, number>>\n\t| requireFalse<isStrictSubset<1, 1>>\n\t| requireFalse<isStrictSubset<1, 2>>\n\t| requireFalse<isStrictSubset<[1, true], [1, true]>>\n\t| requireFalse<isStrictSubset<1 | 2, 1>>\n\n\t// areOnlyKeys\n\t| requireTrue<areOnlyKeys<{ a: number; b: number }, \"a\" | \"b\">>\n\t| requireTrue<areOnlyKeys<{ a?: number; b: number }, \"a\" | \"b\">>\n\t| requireFalse<areOnlyKeys<{ a?: number; b: number }, \"b\">>\n\t| requireFalse<areOnlyKeys<{ a: number; b: number }, \"a\">>;\n// This case is explicitly documented as unsupported.\n// | requireFalse<areOnlyKeys<Record<string, unknown>, \"a\">>;\n\n// negative tests (should not build)\n// @ts-expect-error negative test\ntype _falseIsTrue = requireTrue<false>;\n// @ts-expect-error negative test\ntype _trueIsFalse = requireFalse<true>;\n// @ts-expect-error negative test\ntype _booleanIsTrue = requireTrue<boolean>;\n// @ts-expect-error negative test\ntype _booleanIsFalse = requireFalse<boolean>;\n// @ts-expect-error negative test\ntype _emptyNotAssignable = requireFalse<isAssignableTo<Empty1, Empty2>>;\n// @ts-expect-error negative test\ntype _numberAssignableToString = requireTrue<isAssignableTo<number, string>>;\n// @ts-expect-error negative test\ntype _anyNotAny = requireFalse<isAny<any>>;\n"]}
package/lib/alpha.d.ts CHANGED
@@ -166,6 +166,7 @@ export {
166
166
  ICodecOptions,
167
167
  ITreeAlpha,
168
168
  IdentifierIndex,
169
+ IncrementalEncodingPolicy,
169
170
  Insertable,
170
171
  InsertableContent,
171
172
  InsertableField,
@@ -205,7 +206,6 @@ export {
205
206
  RunTransactionParams,
206
207
  SchemaFactoryAlpha,
207
208
  SharedTreeFormatOptions,
208
- SharedTreeFormatVersion,
209
209
  SharedTreeOptions,
210
210
  SimpleAllowedTypeAttributes,
211
211
  SimpleArrayNodeSchema,
@@ -249,8 +249,10 @@ export {
249
249
  allowUnused,
250
250
  asAlpha,
251
251
  asTreeViewAlpha,
252
+ checkCompatibility,
252
253
  cloneWithReplacements,
253
254
  comparePersistedSchema,
255
+ configuredSharedTreeAlpha,
254
256
  contentSchemaSymbol,
255
257
  createIdentifierIndex,
256
258
  createIndependentTreeAlpha,
@@ -258,11 +260,15 @@ export {
258
260
  decodeSimpleSchema,
259
261
  encodeSimpleSchema,
260
262
  evaluateLazySchema,
263
+ exportCompatibilitySchemaSnapshot,
261
264
  extractPersistedSchema,
262
265
  generateSchemaFromSimpleSchema,
263
266
  getBranch,
264
267
  getJsonSchema,
265
268
  getSimpleSchema,
269
+ importCompatibilitySchemaSnapshot,
270
+ incrementalEncodingPolicyForAllowedTypes,
271
+ incrementalSummaryHint,
266
272
  independentInitializedView,
267
273
  independentView,
268
274
  normalizeAllowedTypes,
package/lib/api.d.ts CHANGED
@@ -2,11 +2,10 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { type TreeView, type TreeViewAlpha, type TreeViewBeta, type ImplicitFieldSchema } from "./simple-tree/index.js";
5
+ import type { TreeView, TreeViewAlpha, TreeViewBeta, ImplicitFieldSchema, TreeViewConfiguration, TreeViewConfigurationAlpha } from "./simple-tree/index.js";
6
6
  /**
7
7
  * Module entry points for retrieving alternate (alpha/beta) versions of tree APIs.
8
8
  * For each API (usually a class) that has an alpha/beta version, add overloads to the function(s) below.
9
- * In the future, `asBeta` may be added here too.
10
9
  * These functions should only be used by external consumers, not referenced internally within the tree package, to avoid circular import dependencies.
11
10
  */
12
11
  /**
@@ -14,6 +13,11 @@ import { type TreeView, type TreeViewAlpha, type TreeViewBeta, type ImplicitFiel
14
13
  * @alpha
15
14
  */
16
15
  export declare function asAlpha<TSchema extends ImplicitFieldSchema>(view: TreeView<TSchema>): TreeViewAlpha<TSchema>;
16
+ /**
17
+ * Retrieve the {@link TreeViewConfigurationAlpha | alpha API} for a {@link TreeViewConfiguration}.
18
+ * @alpha
19
+ */
20
+ export declare function asAlpha<TSchema extends ImplicitFieldSchema>(view: TreeViewConfiguration<TSchema>): TreeViewConfigurationAlpha<TSchema>;
17
21
  /**
18
22
  * Retrieve the {@link TreeViewBeta | beta API} for a {@link TreeView}.
19
23
  * @beta
package/lib/api.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EAGxB,MAAM,wBAAwB,CAAC;AAEhC;;;;;GAKG;AAEH;;;GAGG;AACH,wBAAgB,OAAO,CAAC,OAAO,SAAS,mBAAmB,EAC1D,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,GACrB,aAAa,CAAC,OAAO,CAAC,CAGxB;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,OAAO,SAAS,mBAAmB,EACzD,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,GACrB,YAAY,CAAC,OAAO,CAAC,CAEvB"}
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,EACrB,0BAA0B,EAC1B,MAAM,wBAAwB,CAAC;AAEhC;;;;GAIG;AAEH;;;GAGG;AACH,wBAAgB,OAAO,CAAC,OAAO,SAAS,mBAAmB,EAC1D,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,GACrB,aAAa,CAAC,OAAO,CAAC,CAAC;AAE1B;;;GAGG;AACH,wBAAgB,OAAO,CAAC,OAAO,SAAS,mBAAmB,EAC1D,IAAI,EAAE,qBAAqB,CAAC,OAAO,CAAC,GAClC,0BAA0B,CAAC,OAAO,CAAC,CAAC;AASvC;;;GAGG;AACH,wBAAgB,MAAM,CAAC,OAAO,SAAS,mBAAmB,EACzD,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,GACrB,YAAY,CAAC,OAAO,CAAC,CAEvB"}
package/lib/api.js CHANGED
@@ -2,22 +2,11 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import {
6
- // eslint-disable-next-line import-x/no-deprecated
7
- asTreeViewAlpha, } from "./simple-tree/index.js";
8
5
  /**
9
- * Module entry points for retrieving alternate (alpha/beta) versions of tree APIs.
10
- * For each API (usually a class) that has an alpha/beta version, add overloads to the function(s) below.
11
- * In the future, `asBeta` may be added here too.
12
- * These functions should only be used by external consumers, not referenced internally within the tree package, to avoid circular import dependencies.
13
- */
14
- /**
15
- * Retrieve the {@link TreeViewAlpha | alpha API} for a {@link TreeView}.
16
- * @alpha
6
+ * Implementation of overloads for {@link asAlpha}.
17
7
  */
18
8
  export function asAlpha(view) {
19
- // eslint-disable-next-line import-x/no-deprecated
20
- return asTreeViewAlpha(view);
9
+ return view;
21
10
  }
22
11
  /**
23
12
  * Retrieve the {@link TreeViewBeta | beta API} for a {@link TreeView}.
package/lib/api.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO;AAKN,kDAAkD;AAClD,eAAe,GACf,MAAM,wBAAwB,CAAC;AAEhC;;;;;GAKG;AAEH;;;GAGG;AACH,MAAM,UAAU,OAAO,CACtB,IAAuB;IAEvB,kDAAkD;IAClD,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,MAAM,CACrB,IAAuB;IAEvB,OAAO,IAA6B,CAAC;AACtC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\ttype TreeView,\n\ttype TreeViewAlpha,\n\ttype TreeViewBeta,\n\ttype ImplicitFieldSchema,\n\t// eslint-disable-next-line import-x/no-deprecated\n\tasTreeViewAlpha,\n} from \"./simple-tree/index.js\";\n\n/**\n * Module entry points for retrieving alternate (alpha/beta) versions of tree APIs.\n * For each API (usually a class) that has an alpha/beta version, add overloads to the function(s) below.\n * In the future, `asBeta` may be added here too.\n * These functions should only be used by external consumers, not referenced internally within the tree package, to avoid circular import dependencies.\n */\n\n/**\n * Retrieve the {@link TreeViewAlpha | alpha API} for a {@link TreeView}.\n * @alpha\n */\nexport function asAlpha<TSchema extends ImplicitFieldSchema>(\n\tview: TreeView<TSchema>,\n): TreeViewAlpha<TSchema> {\n\t// eslint-disable-next-line import-x/no-deprecated\n\treturn asTreeViewAlpha(view);\n}\n\n/**\n * Retrieve the {@link TreeViewBeta | beta API} for a {@link TreeView}.\n * @beta\n */\nexport function asBeta<TSchema extends ImplicitFieldSchema>(\n\tview: TreeView<TSchema>,\n): TreeViewBeta<TSchema> {\n\treturn view as TreeViewBeta<TSchema>;\n}\n"]}
1
+ {"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAiCH;;GAEG;AACH,MAAM,UAAU,OAAO,CAAC,IAAa;IACpC,OAAO,IAAI,CAAC;AACb,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,MAAM,CACrB,IAAuB;IAEvB,OAAO,IAA6B,CAAC;AACtC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tTreeView,\n\tTreeViewAlpha,\n\tTreeViewBeta,\n\tImplicitFieldSchema,\n\tTreeViewConfiguration,\n\tTreeViewConfigurationAlpha,\n} from \"./simple-tree/index.js\";\n\n/**\n * Module entry points for retrieving alternate (alpha/beta) versions of tree APIs.\n * For each API (usually a class) that has an alpha/beta version, add overloads to the function(s) below.\n * These functions should only be used by external consumers, not referenced internally within the tree package, to avoid circular import dependencies.\n */\n\n/**\n * Retrieve the {@link TreeViewAlpha | alpha API} for a {@link TreeView}.\n * @alpha\n */\nexport function asAlpha<TSchema extends ImplicitFieldSchema>(\n\tview: TreeView<TSchema>,\n): TreeViewAlpha<TSchema>;\n\n/**\n * Retrieve the {@link TreeViewConfigurationAlpha | alpha API} for a {@link TreeViewConfiguration}.\n * @alpha\n */\nexport function asAlpha<TSchema extends ImplicitFieldSchema>(\n\tview: TreeViewConfiguration<TSchema>,\n): TreeViewConfigurationAlpha<TSchema>;\n\n/**\n * Implementation of overloads for {@link asAlpha}.\n */\nexport function asAlpha(view: unknown): unknown {\n\treturn view;\n}\n\n/**\n * Retrieve the {@link TreeViewBeta | beta API} for a {@link TreeView}.\n * @beta\n */\nexport function asBeta<TSchema extends ImplicitFieldSchema>(\n\tview: TreeView<TSchema>,\n): TreeViewBeta<TSchema> {\n\treturn view as TreeViewBeta<TSchema>;\n}\n"]}
@@ -307,7 +307,7 @@ export declare const FluidClientVersion: {
307
307
  /** Fluid Framework Client 2.1 and newer. */
308
308
  /**
309
309
  * Fluid Framework Client 2.43 and newer.
310
- *
310
+ * @remarks
311
311
  * New formats introduced in 2.43:
312
312
  * - SchemaFormatVersion.v2
313
313
  * - MessageFormatVersion.v4
@@ -317,11 +317,18 @@ export declare const FluidClientVersion: {
317
317
  readonly v2_43: "2.43.0";
318
318
  /**
319
319
  * Fluid Framework Client 2.52 and newer.
320
- *
320
+ * @remarks
321
321
  * New formats introduced in 2.52:
322
322
  * - DetachedFieldIndexFormatVersion.v2
323
323
  */
324
324
  readonly v2_52: "2.52.0";
325
+ /**
326
+ * Fluid Framework Client 2.73 and newer.
327
+ * @remarks
328
+ * New formats introduced in 2.73:
329
+ * - FieldBatchFormatVersion v2
330
+ */
331
+ readonly v2_73: "2.73.0";
325
332
  };
326
333
  /**
327
334
  * An up to date version which includes all the important stable features.
@@ -1 +1 @@
1
- {"version":3,"file":"codec.d.ts","sourceRoot":"","s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,CAAC;CACzC;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,SAAS,GAAG,sBAAsB,CAMzE"}
@@ -197,7 +197,7 @@ export const FluidClientVersion = {
197
197
  // v2_1 = v2_0,
198
198
  /**
199
199
  * Fluid Framework Client 2.43 and newer.
200
- *
200
+ * @remarks
201
201
  * New formats introduced in 2.43:
202
202
  * - SchemaFormatVersion.v2
203
203
  * - MessageFormatVersion.v4
@@ -207,11 +207,18 @@ export const FluidClientVersion = {
207
207
  v2_43: "2.43.0",
208
208
  /**
209
209
  * Fluid Framework Client 2.52 and newer.
210
- *
210
+ * @remarks
211
211
  * New formats introduced in 2.52:
212
212
  * - DetachedFieldIndexFormatVersion.v2
213
213
  */
214
214
  v2_52: "2.52.0",
215
+ /**
216
+ * Fluid Framework Client 2.73 and newer.
217
+ * @remarks
218
+ * New formats introduced in 2.73:
219
+ * - FieldBatchFormatVersion v2
220
+ */
221
+ v2_73: "2.73.0",
215
222
  };
216
223
  /**
217
224
  * An up to date version which includes all the important stable features.