@fluidframework/tree 2.21.0 → 2.22.0

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 (327) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +1 -0
  3. package/api-report/tree.alpha.api.md +29 -4
  4. package/api-report/tree.beta.api.md +29 -4
  5. package/api-report/tree.legacy.alpha.api.md +29 -4
  6. package/api-report/tree.legacy.public.api.md +29 -4
  7. package/api-report/tree.public.api.md +29 -4
  8. package/dist/alpha.d.ts +1 -0
  9. package/dist/beta.d.ts +1 -0
  10. package/dist/core/forest/editableForest.js +1 -1
  11. package/dist/core/forest/editableForest.js.map +1 -1
  12. package/dist/core/index.d.ts +1 -1
  13. package/dist/core/index.d.ts.map +1 -1
  14. package/dist/core/index.js.map +1 -1
  15. package/dist/core/tree/anchorSet.d.ts +2 -5
  16. package/dist/core/tree/anchorSet.d.ts.map +1 -1
  17. package/dist/core/tree/anchorSet.js +1 -151
  18. package/dist/core/tree/anchorSet.js.map +1 -1
  19. package/dist/core/tree/index.d.ts +1 -2
  20. package/dist/core/tree/index.d.ts.map +1 -1
  21. package/dist/core/tree/index.js.map +1 -1
  22. package/dist/core/tree/pathTree.d.ts +0 -11
  23. package/dist/core/tree/pathTree.d.ts.map +1 -1
  24. package/dist/core/tree/pathTree.js.map +1 -1
  25. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js +1 -1
  26. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  27. package/dist/feature-libraries/default-schema/defaultFieldKinds.js +1 -1
  28. package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  29. package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts +1 -2
  30. package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
  31. package/dist/feature-libraries/detachedFieldIndexSummarizer.js +0 -9
  32. package/dist/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
  33. package/dist/feature-libraries/flex-tree/treeEvents.d.ts +2 -4
  34. package/dist/feature-libraries/flex-tree/treeEvents.d.ts.map +1 -1
  35. package/dist/feature-libraries/flex-tree/treeEvents.js.map +1 -1
  36. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +1 -2
  37. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  38. package/dist/feature-libraries/forest-summary/forestSummarizer.js +0 -9
  39. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  40. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +6 -2
  41. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  42. package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  43. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts +2 -4
  44. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  45. package/dist/feature-libraries/modular-schema/genericFieldKind.js +4 -19
  46. package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  47. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  48. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +11 -12
  49. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  50. package/dist/feature-libraries/node-key/mockNodeKeyManager.js +1 -1
  51. package/dist/feature-libraries/node-key/mockNodeKeyManager.js.map +1 -1
  52. package/dist/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  53. package/dist/feature-libraries/optional-field/optionalField.js +7 -3
  54. package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
  55. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts +3 -5
  56. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  57. package/dist/feature-libraries/schema-index/schemaSummarizer.js +1 -11
  58. package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  59. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +1 -1
  60. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
  61. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js +13 -1
  62. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
  63. package/dist/index.d.ts +3 -3
  64. package/dist/index.d.ts.map +1 -1
  65. package/dist/index.js +4 -4
  66. package/dist/index.js.map +1 -1
  67. package/dist/legacy.d.ts +1 -0
  68. package/dist/packageVersion.d.ts +1 -1
  69. package/dist/packageVersion.js +1 -1
  70. package/dist/packageVersion.js.map +1 -1
  71. package/dist/public.d.ts +1 -0
  72. package/dist/shared-tree/index.d.ts +1 -3
  73. package/dist/shared-tree/index.d.ts.map +1 -1
  74. package/dist/shared-tree/index.js +1 -7
  75. package/dist/shared-tree/index.js.map +1 -1
  76. package/dist/shared-tree/schematizingTreeView.d.ts +4 -5
  77. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  78. package/dist/shared-tree/schematizingTreeView.js +9 -10
  79. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  80. package/dist/shared-tree/sharedTree.d.ts +39 -39
  81. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  82. package/dist/shared-tree/sharedTree.js +81 -52
  83. package/dist/shared-tree/sharedTree.js.map +1 -1
  84. package/dist/shared-tree/treeApi.d.ts +2 -2
  85. package/dist/shared-tree/treeApi.d.ts.map +1 -1
  86. package/dist/shared-tree/treeApi.js +9 -3
  87. package/dist/shared-tree/treeApi.js.map +1 -1
  88. package/dist/shared-tree/treeCheckout.d.ts +3 -3
  89. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  90. package/dist/shared-tree/treeCheckout.js +3 -2
  91. package/dist/shared-tree/treeCheckout.js.map +1 -1
  92. package/dist/shared-tree-core/editManager.js +1 -1
  93. package/dist/shared-tree-core/editManager.js.map +1 -1
  94. package/dist/shared-tree-core/editManagerSummarizer.d.ts +1 -2
  95. package/dist/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  96. package/dist/shared-tree-core/editManagerSummarizer.js +0 -9
  97. package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
  98. package/dist/shared-tree-core/sequenceIdUtils.d.ts +12 -1
  99. package/dist/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
  100. package/dist/shared-tree-core/sequenceIdUtils.js +25 -7
  101. package/dist/shared-tree-core/sequenceIdUtils.js.map +1 -1
  102. package/dist/shared-tree-core/sharedTreeCore.d.ts +25 -30
  103. package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  104. package/dist/shared-tree-core/sharedTreeCore.js +20 -49
  105. package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
  106. package/dist/simple-tree/api/index.d.ts +3 -2
  107. package/dist/simple-tree/api/index.d.ts.map +1 -1
  108. package/dist/simple-tree/api/index.js +3 -1
  109. package/dist/simple-tree/api/index.js.map +1 -1
  110. package/dist/simple-tree/api/schemaFactory.d.ts +156 -63
  111. package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
  112. package/dist/simple-tree/api/schemaFactory.js +179 -86
  113. package/dist/simple-tree/api/schemaFactory.js.map +1 -1
  114. package/dist/{shared-tree → simple-tree/api}/transactionTypes.d.ts +1 -1
  115. package/dist/simple-tree/api/transactionTypes.d.ts.map +1 -0
  116. package/dist/{shared-tree → simple-tree/api}/transactionTypes.js.map +1 -1
  117. package/dist/simple-tree/api/tree.d.ts +23 -2
  118. package/dist/simple-tree/api/tree.d.ts.map +1 -1
  119. package/dist/simple-tree/api/tree.js.map +1 -1
  120. package/dist/simple-tree/index.d.ts +1 -1
  121. package/dist/simple-tree/index.d.ts.map +1 -1
  122. package/dist/simple-tree/index.js +3 -2
  123. package/dist/simple-tree/index.js.map +1 -1
  124. package/dist/simple-tree/schemaTypes.d.ts +2 -2
  125. package/dist/simple-tree/schemaTypes.js +1 -1
  126. package/dist/simple-tree/schemaTypes.js.map +1 -1
  127. package/dist/simple-tree/treeNodeValid.js +1 -2
  128. package/dist/simple-tree/treeNodeValid.js.map +1 -1
  129. package/dist/treeFactory.d.ts +16 -5
  130. package/dist/treeFactory.d.ts.map +1 -1
  131. package/dist/treeFactory.js +21 -12
  132. package/dist/treeFactory.js.map +1 -1
  133. package/dist/util/breakable.d.ts +1 -1
  134. package/dist/util/breakable.d.ts.map +1 -1
  135. package/dist/util/breakable.js.map +1 -1
  136. package/dist/util/rangeMap.d.ts +1 -1
  137. package/dist/util/rangeMap.js +1 -1
  138. package/dist/util/rangeMap.js.map +1 -1
  139. package/lib/alpha.d.ts +1 -0
  140. package/lib/beta.d.ts +1 -0
  141. package/lib/core/forest/editableForest.js +1 -1
  142. package/lib/core/forest/editableForest.js.map +1 -1
  143. package/lib/core/index.d.ts +1 -1
  144. package/lib/core/index.d.ts.map +1 -1
  145. package/lib/core/index.js.map +1 -1
  146. package/lib/core/tree/anchorSet.d.ts +2 -5
  147. package/lib/core/tree/anchorSet.d.ts.map +1 -1
  148. package/lib/core/tree/anchorSet.js +1 -151
  149. package/lib/core/tree/anchorSet.js.map +1 -1
  150. package/lib/core/tree/index.d.ts +1 -2
  151. package/lib/core/tree/index.d.ts.map +1 -1
  152. package/lib/core/tree/index.js.map +1 -1
  153. package/lib/core/tree/pathTree.d.ts +0 -11
  154. package/lib/core/tree/pathTree.d.ts.map +1 -1
  155. package/lib/core/tree/pathTree.js.map +1 -1
  156. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js +1 -1
  157. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  158. package/lib/feature-libraries/default-schema/defaultFieldKinds.js +1 -1
  159. package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  160. package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts +1 -2
  161. package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
  162. package/lib/feature-libraries/detachedFieldIndexSummarizer.js +0 -9
  163. package/lib/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
  164. package/lib/feature-libraries/flex-tree/treeEvents.d.ts +2 -4
  165. package/lib/feature-libraries/flex-tree/treeEvents.d.ts.map +1 -1
  166. package/lib/feature-libraries/flex-tree/treeEvents.js.map +1 -1
  167. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +1 -2
  168. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  169. package/lib/feature-libraries/forest-summary/forestSummarizer.js +0 -9
  170. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  171. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +6 -2
  172. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  173. package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  174. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts +2 -4
  175. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  176. package/lib/feature-libraries/modular-schema/genericFieldKind.js +4 -19
  177. package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  178. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  179. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +11 -12
  180. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  181. package/lib/feature-libraries/node-key/mockNodeKeyManager.js +1 -1
  182. package/lib/feature-libraries/node-key/mockNodeKeyManager.js.map +1 -1
  183. package/lib/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  184. package/lib/feature-libraries/optional-field/optionalField.js +7 -3
  185. package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
  186. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts +3 -5
  187. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  188. package/lib/feature-libraries/schema-index/schemaSummarizer.js +1 -11
  189. package/lib/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  190. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +1 -1
  191. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
  192. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js +13 -1
  193. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
  194. package/lib/index.d.ts +3 -3
  195. package/lib/index.d.ts.map +1 -1
  196. package/lib/index.js +3 -3
  197. package/lib/index.js.map +1 -1
  198. package/lib/legacy.d.ts +1 -0
  199. package/lib/packageVersion.d.ts +1 -1
  200. package/lib/packageVersion.js +1 -1
  201. package/lib/packageVersion.js.map +1 -1
  202. package/lib/public.d.ts +1 -0
  203. package/lib/shared-tree/index.d.ts +1 -3
  204. package/lib/shared-tree/index.d.ts.map +1 -1
  205. package/lib/shared-tree/index.js +1 -3
  206. package/lib/shared-tree/index.js.map +1 -1
  207. package/lib/shared-tree/schematizingTreeView.d.ts +4 -5
  208. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  209. package/lib/shared-tree/schematizingTreeView.js +4 -5
  210. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  211. package/lib/shared-tree/sharedTree.d.ts +39 -39
  212. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  213. package/lib/shared-tree/sharedTree.js +79 -50
  214. package/lib/shared-tree/sharedTree.js.map +1 -1
  215. package/lib/shared-tree/treeApi.d.ts +2 -2
  216. package/lib/shared-tree/treeApi.d.ts.map +1 -1
  217. package/lib/shared-tree/treeApi.js +8 -2
  218. package/lib/shared-tree/treeApi.js.map +1 -1
  219. package/lib/shared-tree/treeCheckout.d.ts +3 -3
  220. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  221. package/lib/shared-tree/treeCheckout.js +4 -3
  222. package/lib/shared-tree/treeCheckout.js.map +1 -1
  223. package/lib/shared-tree-core/editManager.js +2 -2
  224. package/lib/shared-tree-core/editManager.js.map +1 -1
  225. package/lib/shared-tree-core/editManagerSummarizer.d.ts +1 -2
  226. package/lib/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  227. package/lib/shared-tree-core/editManagerSummarizer.js +0 -9
  228. package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
  229. package/lib/shared-tree-core/sequenceIdUtils.d.ts +12 -1
  230. package/lib/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
  231. package/lib/shared-tree-core/sequenceIdUtils.js +23 -5
  232. package/lib/shared-tree-core/sequenceIdUtils.js.map +1 -1
  233. package/lib/shared-tree-core/sharedTreeCore.d.ts +25 -30
  234. package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  235. package/lib/shared-tree-core/sharedTreeCore.js +19 -48
  236. package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
  237. package/lib/simple-tree/api/index.d.ts +3 -2
  238. package/lib/simple-tree/api/index.d.ts.map +1 -1
  239. package/lib/simple-tree/api/index.js +1 -0
  240. package/lib/simple-tree/api/index.js.map +1 -1
  241. package/lib/simple-tree/api/schemaFactory.d.ts +156 -63
  242. package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
  243. package/lib/simple-tree/api/schemaFactory.js +178 -85
  244. package/lib/simple-tree/api/schemaFactory.js.map +1 -1
  245. package/lib/{shared-tree → simple-tree/api}/transactionTypes.d.ts +1 -1
  246. package/lib/simple-tree/api/transactionTypes.d.ts.map +1 -0
  247. package/lib/{shared-tree → simple-tree/api}/transactionTypes.js.map +1 -1
  248. package/lib/simple-tree/api/tree.d.ts +23 -2
  249. package/lib/simple-tree/api/tree.d.ts.map +1 -1
  250. package/lib/simple-tree/api/tree.js.map +1 -1
  251. package/lib/simple-tree/index.d.ts +1 -1
  252. package/lib/simple-tree/index.d.ts.map +1 -1
  253. package/lib/simple-tree/index.js +1 -1
  254. package/lib/simple-tree/index.js.map +1 -1
  255. package/lib/simple-tree/schemaTypes.d.ts +2 -2
  256. package/lib/simple-tree/schemaTypes.js +1 -1
  257. package/lib/simple-tree/schemaTypes.js.map +1 -1
  258. package/lib/simple-tree/treeNodeValid.js +1 -2
  259. package/lib/simple-tree/treeNodeValid.js.map +1 -1
  260. package/lib/treeFactory.d.ts +16 -5
  261. package/lib/treeFactory.d.ts.map +1 -1
  262. package/lib/treeFactory.js +20 -11
  263. package/lib/treeFactory.js.map +1 -1
  264. package/lib/util/breakable.d.ts +1 -1
  265. package/lib/util/breakable.d.ts.map +1 -1
  266. package/lib/util/breakable.js.map +1 -1
  267. package/lib/util/rangeMap.d.ts +1 -1
  268. package/lib/util/rangeMap.js +1 -1
  269. package/lib/util/rangeMap.js.map +1 -1
  270. package/package.json +21 -21
  271. package/src/core/forest/editableForest.ts +1 -1
  272. package/src/core/index.ts +0 -3
  273. package/src/core/tree/anchorSet.ts +4 -197
  274. package/src/core/tree/index.ts +0 -3
  275. package/src/core/tree/pathTree.ts +0 -13
  276. package/src/feature-libraries/default-schema/defaultFieldKinds.ts +1 -1
  277. package/src/feature-libraries/detachedFieldIndexSummarizer.ts +0 -11
  278. package/src/feature-libraries/flex-tree/treeEvents.ts +2 -4
  279. package/src/feature-libraries/forest-summary/forestSummarizer.ts +0 -11
  280. package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +6 -2
  281. package/src/feature-libraries/modular-schema/genericFieldKind.ts +3 -35
  282. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +9 -42
  283. package/src/feature-libraries/optional-field/optionalField.ts +10 -3
  284. package/src/feature-libraries/schema-index/schemaSummarizer.ts +1 -16
  285. package/src/feature-libraries/sequence-field/sequenceFieldEditor.ts +13 -2
  286. package/src/index.ts +15 -12
  287. package/src/packageVersion.ts +1 -1
  288. package/src/shared-tree/index.ts +3 -19
  289. package/src/shared-tree/schematizingTreeView.ts +18 -16
  290. package/src/shared-tree/sharedTree.ts +203 -100
  291. package/src/shared-tree/treeApi.ts +10 -1
  292. package/src/shared-tree/treeCheckout.ts +11 -8
  293. package/src/shared-tree-core/editManager.ts +2 -2
  294. package/src/shared-tree-core/editManagerSummarizer.ts +0 -11
  295. package/src/shared-tree-core/sequenceIdUtils.ts +26 -5
  296. package/src/shared-tree-core/sharedTreeCore.ts +30 -87
  297. package/src/simple-tree/api/index.ts +15 -0
  298. package/src/simple-tree/api/schemaFactory.ts +203 -89
  299. package/src/{shared-tree → simple-tree/api}/transactionTypes.ts +1 -1
  300. package/src/simple-tree/api/tree.ts +31 -6
  301. package/src/simple-tree/index.ts +12 -0
  302. package/src/simple-tree/schemaTypes.ts +2 -2
  303. package/src/treeFactory.ts +29 -11
  304. package/src/util/breakable.ts +1 -1
  305. package/src/util/rangeMap.ts +1 -1
  306. package/dist/core/tree/visitPath.d.ts +0 -101
  307. package/dist/core/tree/visitPath.d.ts.map +0 -1
  308. package/dist/core/tree/visitPath.js +0 -7
  309. package/dist/core/tree/visitPath.js.map +0 -1
  310. package/dist/shared-tree/publicContracts.d.ts +0 -18
  311. package/dist/shared-tree/publicContracts.d.ts.map +0 -1
  312. package/dist/shared-tree/publicContracts.js +0 -24
  313. package/dist/shared-tree/publicContracts.js.map +0 -1
  314. package/dist/shared-tree/transactionTypes.d.ts.map +0 -1
  315. package/lib/core/tree/visitPath.d.ts +0 -101
  316. package/lib/core/tree/visitPath.d.ts.map +0 -1
  317. package/lib/core/tree/visitPath.js +0 -6
  318. package/lib/core/tree/visitPath.js.map +0 -1
  319. package/lib/shared-tree/publicContracts.d.ts +0 -18
  320. package/lib/shared-tree/publicContracts.d.ts.map +0 -1
  321. package/lib/shared-tree/publicContracts.js +0 -21
  322. package/lib/shared-tree/publicContracts.js.map +0 -1
  323. package/lib/shared-tree/transactionTypes.d.ts.map +0 -1
  324. package/src/core/tree/visitPath.ts +0 -124
  325. package/src/shared-tree/publicContracts.ts +0 -24
  326. /package/dist/{shared-tree → simple-tree/api}/transactionTypes.js +0 -0
  327. /package/lib/{shared-tree → simple-tree/api}/transactionTypes.js +0 -0
@@ -72,6 +72,105 @@ export declare const defaultSchemaFactoryObjectOptions: Required<Omit<SchemaFact
72
72
  * @system @public
73
73
  */
74
74
  export type ScopedSchemaName<TScope extends string | undefined, TName extends number | string> = TScope extends undefined ? `${TName}` : `${TScope}.${TName}`;
75
+ /**
76
+ * Stateless APIs exposed via {@link SchemaFactory} as both instance properties and as statics.
77
+ * @privateRemarks
78
+ * We have no way to make linkable members which exist both as statics and instance properties since API-Extractor does not support this.
79
+ * As a workaround, we have this type as a third place which can be linked.
80
+ * @system @sealed @public
81
+ */
82
+ export declare const schemaStatics: {
83
+ /**
84
+ * {@link TreeNodeSchema} for holding a JavaScript `string`.
85
+ *
86
+ * @remarks
87
+ * Strings containing unpaired UTF-16 surrogate pair code units may not be handled correctly.
88
+ *
89
+ * These limitations come from the use of UTF-8 encoding of the strings, which requires them to be valid unicode.
90
+ * JavaScript does not make this requirement for its strings so not all possible JavaScript strings are supported.
91
+ * @privateRemarks
92
+ * TODO:
93
+ * We should be much more clear about what happens if you use problematic values.
94
+ * We should validate and/or normalize them when inserting content.
95
+ */
96
+ readonly string: TreeNodeSchemaNonClass<"com.fluidframework.leaf.string", NodeKind.Leaf, string, string, true, unknown, never, unknown>;
97
+ /**
98
+ * {@link TreeNodeSchema} for holding a JavaScript `number`.
99
+ *
100
+ * @remarks
101
+ * The number is a {@link https://en.wikipedia.org/wiki/Double-precision_floating-point_format | double-precision 64-bit binary format IEEE 754} value, however there are some exceptions:
102
+ * - `NaN`, and the infinities are converted to `null` (and may therefore only be used where `null` is allowed by the schema).
103
+ * - `-0` may be converted to `0` in some cases.
104
+ *
105
+ * These limitations match the limitations of JSON.
106
+ * @privateRemarks
107
+ * TODO:
108
+ * We should be much more clear about what happens if you use problematic values.
109
+ * We should validate and/or normalize them when inserting content.
110
+ */
111
+ readonly number: TreeNodeSchemaNonClass<"com.fluidframework.leaf.number", NodeKind.Leaf, number, number, true, unknown, never, unknown>;
112
+ /**
113
+ * {@link TreeNodeSchema} for holding a boolean.
114
+ */
115
+ readonly boolean: TreeNodeSchemaNonClass<"com.fluidframework.leaf.boolean", NodeKind.Leaf, boolean, boolean, true, unknown, never, unknown>;
116
+ /**
117
+ * {@link TreeNodeSchema} for JavaScript `null`.
118
+ *
119
+ * @remarks
120
+ * There are good {@link https://www.npmjs.com/package/%40rushstack/eslint-plugin#rushstackno-new-null | reasons to avoid using null} in JavaScript, however sometimes it is desired.
121
+ * This {@link TreeNodeSchema} node provides the option to include nulls in trees when desired.
122
+ * Unless directly inter-operating with existing data using null, consider other approaches, like wrapping the value in an optional field, or using a more specifically named empty object node.
123
+ */
124
+ readonly null: TreeNodeSchemaNonClass<"com.fluidframework.leaf.null", NodeKind.Leaf, null, null, true, unknown, never, unknown>;
125
+ /**
126
+ * {@link TreeNodeSchema} for holding an {@link @fluidframework/core-interfaces#(IFluidHandle:interface)}.
127
+ */
128
+ readonly handle: TreeNodeSchemaNonClass<"com.fluidframework.leaf.handle", NodeKind.Leaf, _dummyImport<unknown>, _dummyImport<unknown>, true, unknown, never, unknown>;
129
+ /**
130
+ * {@link AllowedTypes} for holding any of the leaf types.
131
+ */
132
+ readonly leaves: readonly [TreeNodeSchemaNonClass<"com.fluidframework.leaf.string", NodeKind.Leaf, string, string, true, unknown, never, unknown>, TreeNodeSchemaNonClass<"com.fluidframework.leaf.number", NodeKind.Leaf, number, number, true, unknown, never, unknown>, TreeNodeSchemaNonClass<"com.fluidframework.leaf.boolean", NodeKind.Leaf, boolean, boolean, true, unknown, never, unknown>, TreeNodeSchemaNonClass<"com.fluidframework.leaf.null", NodeKind.Leaf, null, null, true, unknown, never, unknown>, TreeNodeSchemaNonClass<"com.fluidframework.leaf.handle", NodeKind.Leaf, _dummyImport<unknown>, _dummyImport<unknown>, true, unknown, never, unknown>];
133
+ /**
134
+ * Make a field optional instead of the default, which is required.
135
+ *
136
+ * @param t - The types allowed under the field.
137
+ * @param props - Optional properties to associate with the field.
138
+ *
139
+ * @typeParam TCustomMetadata - Custom metadata properties to associate with the field.
140
+ * See {@link FieldSchemaMetadata.custom}.
141
+ */
142
+ readonly optional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider">) => FieldSchema<FieldKind.Optional, T, TCustomMetadata>;
143
+ /**
144
+ * Make a field explicitly required.
145
+ *
146
+ * @param t - The types allowed under the field.
147
+ * @param props - Optional properties to associate with the field.
148
+ *
149
+ * @remarks
150
+ * Fields are required by default, but this API can be used to make the required nature explicit in the schema,
151
+ * and allows associating custom {@link FieldProps | properties} with the field.
152
+ *
153
+ * @typeParam TCustomMetadata - Custom metadata properties to associate with the field.
154
+ * See {@link FieldSchemaMetadata.custom}.
155
+ */
156
+ readonly required: <const T_1 extends ImplicitAllowedTypes, const TCustomMetadata_1 = unknown>(t: T_1, props?: Omit<FieldProps<TCustomMetadata_1>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Required, T_1, TCustomMetadata_1>;
157
+ /**
158
+ * {@link schemaStatics.optional} except tweaked to work better for recursive types.
159
+ * Use with {@link ValidateRecursiveSchema} for improved type safety.
160
+ * @remarks
161
+ * This version of {@link schemaStatics.optional} has fewer type constraints to work around TypeScript limitations, see {@link Unenforced}.
162
+ * See {@link ValidateRecursiveSchema} for additional information about using recursive schema.
163
+ */
164
+ readonly optionalRecursive: <const T_2 extends unknown>(t: T_2, props?: Omit<FieldProps, "defaultProvider">) => FieldSchemaUnsafe<FieldKind.Optional, T_2>;
165
+ /**
166
+ * {@link schemaStatics.required} except tweaked to work better for recursive types.
167
+ * Use with {@link ValidateRecursiveSchema} for improved type safety.
168
+ * @remarks
169
+ * This version of {@link schemaStatics.required} has fewer type constraints to work around TypeScript limitations, see {@link Unenforced}.
170
+ * See {@link ValidateRecursiveSchema} for additional information about using recursive schema.
171
+ */
172
+ readonly requiredRecursive: <const T_3 extends unknown>(t: T_3, props?: Omit<FieldProps, "defaultProvider">) => FieldSchemaUnsafe<FieldKind.Required, T_3>;
173
+ };
75
174
  /**
76
175
  * Creates various types of {@link TreeNodeSchema|schema} for {@link TreeNode}s.
77
176
  *
@@ -246,51 +345,53 @@ export declare class SchemaFactory<out TScope extends string | undefined = strin
246
345
  scope: TScope);
247
346
  private scoped;
248
347
  /**
249
- * {@link TreeNodeSchema} for holding a JavaScript `string`.
250
- *
251
- * @remarks
252
- * Strings containing unpaired UTF-16 surrogate pair code units may not be handled correctly.
253
- *
254
- * These limitations come from the use of UTF-8 encoding of the strings, which requires them to be valid unicode.
255
- * JavaScript does not make this requirement for its strings so not all possible JavaScript strings are supported.
256
- * @privateRemarks
257
- * TODO:
258
- * We should be much more clear about what happens if you use problematic values.
259
- * We should validate and/or normalize them when inserting content.
348
+ * {@inheritDoc schemaStatics.string}
260
349
  */
261
350
  readonly string: TreeNodeSchemaNonClass<"com.fluidframework.leaf.string", NodeKind.Leaf, string, string, true, unknown, never, unknown>;
262
351
  /**
263
- * {@link TreeNodeSchema} for holding a JavaScript `number`.
264
- *
265
- * @remarks
266
- * The number is a [double-precision 64-bit binary format IEEE 754](https://en.wikipedia.org/wiki/Double-precision_floating-point_format) value, however there are some exceptions:
267
- * - `NaN`, and the infinities are converted to `null` (and may therefore only be used where `null` is allowed by the schema).
268
- * - `-0` may be converted to `0` in some cases.
269
- *
270
- * These limitations match the limitations of JSON.
271
- * @privateRemarks
272
- * TODO:
273
- * We should be much more clear about what happens if you use problematic values.
274
- * We should validate and/or normalize them when inserting content.
352
+ * {@inheritDoc schemaStatics.number}
275
353
  */
276
354
  readonly number: TreeNodeSchemaNonClass<"com.fluidframework.leaf.number", NodeKind.Leaf, number, number, true, unknown, never, unknown>;
277
355
  /**
278
- * {@link TreeNodeSchema} for holding a boolean.
356
+ * {@inheritDoc schemaStatics.boolean}
279
357
  */
280
358
  readonly boolean: TreeNodeSchemaNonClass<"com.fluidframework.leaf.boolean", NodeKind.Leaf, boolean, boolean, true, unknown, never, unknown>;
281
359
  /**
282
- * {@link TreeNodeSchema} for JavaScript `null`.
283
- *
284
- * @remarks
285
- * There are good [reasons to avoid using null](https://www.npmjs.com/package/%40rushstack/eslint-plugin#rushstackno-new-null) in JavaScript, however sometimes it is desired.
286
- * This {@link TreeNodeSchema} node provides the option to include nulls in trees when desired.
287
- * Unless directly inter-operating with existing data using null, consider other approaches, like wrapping the value in an optional field, or using a more specifically named empty object node.
360
+ * {@inheritDoc schemaStatics.null}
288
361
  */
289
362
  readonly null: TreeNodeSchemaNonClass<"com.fluidframework.leaf.null", NodeKind.Leaf, null, null, true, unknown, never, unknown>;
290
363
  /**
291
- * {@link TreeNodeSchema} for holding an {@link @fluidframework/core-interfaces#(IFluidHandle:interface)}.
364
+ * {@inheritDoc schemaStatics.handle}
292
365
  */
293
366
  readonly handle: TreeNodeSchemaNonClass<"com.fluidframework.leaf.handle", NodeKind.Leaf, _dummyImport<unknown>, _dummyImport<unknown>, true, unknown, never, unknown>;
367
+ /**
368
+ * {@inheritDoc schemaStatics.leaves}
369
+ */
370
+ readonly leaves: readonly [TreeNodeSchemaNonClass<"com.fluidframework.leaf.string", NodeKind.Leaf, string, string, true, unknown, never, unknown>, TreeNodeSchemaNonClass<"com.fluidframework.leaf.number", NodeKind.Leaf, number, number, true, unknown, never, unknown>, TreeNodeSchemaNonClass<"com.fluidframework.leaf.boolean", NodeKind.Leaf, boolean, boolean, true, unknown, never, unknown>, TreeNodeSchemaNonClass<"com.fluidframework.leaf.null", NodeKind.Leaf, null, null, true, unknown, never, unknown>, TreeNodeSchemaNonClass<"com.fluidframework.leaf.handle", NodeKind.Leaf, _dummyImport<unknown>, _dummyImport<unknown>, true, unknown, never, unknown>];
371
+ /**
372
+ * {@inheritDoc schemaStatics.string}
373
+ */
374
+ static readonly string: TreeNodeSchemaNonClass<"com.fluidframework.leaf.string", NodeKind.Leaf, string, string, true, unknown, never, unknown>;
375
+ /**
376
+ * {@inheritDoc schemaStatics.number}
377
+ */
378
+ static readonly number: TreeNodeSchemaNonClass<"com.fluidframework.leaf.number", NodeKind.Leaf, number, number, true, unknown, never, unknown>;
379
+ /**
380
+ * {@inheritDoc schemaStatics.boolean}
381
+ */
382
+ static readonly boolean: TreeNodeSchemaNonClass<"com.fluidframework.leaf.boolean", NodeKind.Leaf, boolean, boolean, true, unknown, never, unknown>;
383
+ /**
384
+ * {@inheritDoc schemaStatics.null}
385
+ */
386
+ static readonly null: TreeNodeSchemaNonClass<"com.fluidframework.leaf.null", NodeKind.Leaf, null, null, true, unknown, never, unknown>;
387
+ /**
388
+ * {@inheritDoc schemaStatics.handle}
389
+ */
390
+ static readonly handle: TreeNodeSchemaNonClass<"com.fluidframework.leaf.handle", NodeKind.Leaf, _dummyImport<unknown>, _dummyImport<unknown>, true, unknown, never, unknown>;
391
+ /**
392
+ * {@inheritDoc schemaStatics.leaves}
393
+ */
394
+ static readonly leaves: readonly [TreeNodeSchemaNonClass<"com.fluidframework.leaf.string", NodeKind.Leaf, string, string, true, unknown, never, unknown>, TreeNodeSchemaNonClass<"com.fluidframework.leaf.number", NodeKind.Leaf, number, number, true, unknown, never, unknown>, TreeNodeSchemaNonClass<"com.fluidframework.leaf.boolean", NodeKind.Leaf, boolean, boolean, true, unknown, never, unknown>, TreeNodeSchemaNonClass<"com.fluidframework.leaf.null", NodeKind.Leaf, null, null, true, unknown, never, unknown>, TreeNodeSchemaNonClass<"com.fluidframework.leaf.handle", NodeKind.Leaf, _dummyImport<unknown>, _dummyImport<unknown>, true, unknown, never, unknown>];
294
395
  /**
295
396
  * Define a {@link TreeNodeSchemaClass} for a {@link TreeObjectNode}.
296
397
  *
@@ -403,45 +504,37 @@ export declare class SchemaFactory<out TScope extends string | undefined = strin
403
504
  */
404
505
  private namedArray;
405
506
  /**
406
- * Make a field optional instead of the default, which is required.
407
- *
408
- * @param t - The types allowed under the field.
409
- * @param props - Optional properties to associate with the field.
410
- *
411
- * @typeParam TCustomMetadata - Custom metadata properties to associate with the field.
412
- * See {@link FieldSchemaMetadata.custom}.
507
+ * {@inheritDoc schemaStatics.optional}
413
508
  */
414
- optional<const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider">): FieldSchema<FieldKind.Optional, T, TCustomMetadata>;
509
+ readonly optional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Optional, T, TCustomMetadata>;
415
510
  /**
416
- * Make a field explicitly required.
417
- *
418
- * @param t - The types allowed under the field.
419
- * @param props - Optional properties to associate with the field.
420
- *
421
- * @remarks
422
- * Fields are required by default, but this API can be used to make the required nature explicit in the schema,
423
- * and allows associating custom {@link FieldProps | properties} with the field.
424
- *
425
- * @typeParam TCustomMetadata - Custom metadata properties to associate with the field.
426
- * See {@link FieldSchemaMetadata.custom}.
511
+ * {@inheritDoc schemaStatics.required}
427
512
  */
428
- required<const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider">): FieldSchema<FieldKind.Required, T, TCustomMetadata>;
513
+ readonly required: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Required, T, TCustomMetadata>;
429
514
  /**
430
- * {@link SchemaFactory.optional} except tweaked to work better for recursive types.
431
- * Use with {@link ValidateRecursiveSchema} for improved type safety.
432
- * @remarks
433
- * This version of {@link SchemaFactory.optional} has fewer type constraints to work around TypeScript limitations, see {@link Unenforced}.
434
- * See {@link ValidateRecursiveSchema} for additional information about using recursive schema.
515
+ * {@inheritDoc schemaStatics.optionalRecursive}
435
516
  */
436
- optionalRecursive<const T extends Unenforced<ImplicitAllowedTypes>>(t: T, props?: Omit<FieldProps, "defaultProvider">): FieldSchemaUnsafe<FieldKind.Optional, T>;
517
+ readonly optionalRecursive: <const T extends unknown>(t: T, props?: Omit<FieldProps<unknown>, "defaultProvider"> | undefined) => FieldSchemaUnsafe<FieldKind.Optional, T>;
437
518
  /**
438
- * {@link SchemaFactory.required} except tweaked to work better for recursive types.
439
- * Use with {@link ValidateRecursiveSchema} for improved type safety.
440
- * @remarks
441
- * This version of {@link SchemaFactory.required} has fewer type constraints to work around TypeScript limitations, see {@link Unenforced}.
442
- * See {@link ValidateRecursiveSchema} for additional information about using recursive schema.
519
+ * {@inheritDoc schemaStatics.requiredRecursive}
520
+ */
521
+ readonly requiredRecursive: <const T extends unknown>(t: T, props?: Omit<FieldProps<unknown>, "defaultProvider"> | undefined) => FieldSchemaUnsafe<FieldKind.Required, T>;
522
+ /**
523
+ * {@inheritDoc schemaStatics.optional}
524
+ */
525
+ static readonly optional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Optional, T, TCustomMetadata>;
526
+ /**
527
+ * {@inheritDoc schemaStatics.required}
528
+ */
529
+ static readonly required: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Required, T, TCustomMetadata>;
530
+ /**
531
+ * {@inheritDoc schemaStatics.optionalRecursive}
532
+ */
533
+ static readonly optionalRecursive: <const T extends unknown>(t: T, props?: Omit<FieldProps<unknown>, "defaultProvider"> | undefined) => FieldSchemaUnsafe<FieldKind.Optional, T>;
534
+ /**
535
+ * {@inheritDoc schemaStatics.requiredRecursive}
443
536
  */
444
- requiredRecursive<const T extends Unenforced<ImplicitAllowedTypes>>(t: T, props?: Omit<FieldProps, "defaultProvider">): FieldSchemaUnsafe<FieldKind.Required, T>;
537
+ static readonly requiredRecursive: <const T extends unknown>(t: T, props?: Omit<FieldProps<unknown>, "defaultProvider"> | undefined) => FieldSchemaUnsafe<FieldKind.Required, T>;
445
538
  /**
446
539
  * A special field which holds a unique identifier for an object node.
447
540
  * @remarks
@@ -1 +1 @@
1
- {"version":3,"file":"schemaFactory.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/schemaFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,KAAK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AMG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAelE"}
@@ -41,6 +41,119 @@ export const defaultSchemaFactoryObjectOptions = {
41
41
  allowUnknownOptionalFields: false,
42
42
  };
43
43
  // > = `${TScope extends undefined ? "" : `${TScope}.`}${TName}`;
44
+ /**
45
+ * Stateless APIs exposed via {@link SchemaFactory} as both instance properties and as statics.
46
+ * @privateRemarks
47
+ * We have no way to make linkable members which exist both as statics and instance properties since API-Extractor does not support this.
48
+ * As a workaround, we have this type as a third place which can be linked.
49
+ * @system @sealed @public
50
+ */
51
+ export const schemaStatics = {
52
+ /**
53
+ * {@link TreeNodeSchema} for holding a JavaScript `string`.
54
+ *
55
+ * @remarks
56
+ * Strings containing unpaired UTF-16 surrogate pair code units may not be handled correctly.
57
+ *
58
+ * These limitations come from the use of UTF-8 encoding of the strings, which requires them to be valid unicode.
59
+ * JavaScript does not make this requirement for its strings so not all possible JavaScript strings are supported.
60
+ * @privateRemarks
61
+ * TODO:
62
+ * We should be much more clear about what happens if you use problematic values.
63
+ * We should validate and/or normalize them when inserting content.
64
+ */
65
+ string: stringSchema,
66
+ /**
67
+ * {@link TreeNodeSchema} for holding a JavaScript `number`.
68
+ *
69
+ * @remarks
70
+ * The number is a {@link https://en.wikipedia.org/wiki/Double-precision_floating-point_format | double-precision 64-bit binary format IEEE 754} value, however there are some exceptions:
71
+ * - `NaN`, and the infinities are converted to `null` (and may therefore only be used where `null` is allowed by the schema).
72
+ * - `-0` may be converted to `0` in some cases.
73
+ *
74
+ * These limitations match the limitations of JSON.
75
+ * @privateRemarks
76
+ * TODO:
77
+ * We should be much more clear about what happens if you use problematic values.
78
+ * We should validate and/or normalize them when inserting content.
79
+ */
80
+ number: numberSchema,
81
+ /**
82
+ * {@link TreeNodeSchema} for holding a boolean.
83
+ */
84
+ boolean: booleanSchema,
85
+ /**
86
+ * {@link TreeNodeSchema} for JavaScript `null`.
87
+ *
88
+ * @remarks
89
+ * There are good {@link https://www.npmjs.com/package/%40rushstack/eslint-plugin#rushstackno-new-null | reasons to avoid using null} in JavaScript, however sometimes it is desired.
90
+ * This {@link TreeNodeSchema} node provides the option to include nulls in trees when desired.
91
+ * Unless directly inter-operating with existing data using null, consider other approaches, like wrapping the value in an optional field, or using a more specifically named empty object node.
92
+ */
93
+ null: nullSchema,
94
+ /**
95
+ * {@link TreeNodeSchema} for holding an {@link @fluidframework/core-interfaces#(IFluidHandle:interface)}.
96
+ */
97
+ handle: handleSchema,
98
+ /**
99
+ * {@link AllowedTypes} for holding any of the leaf types.
100
+ */
101
+ leaves: [stringSchema, numberSchema, booleanSchema, nullSchema, handleSchema],
102
+ /**
103
+ * Make a field optional instead of the default, which is required.
104
+ *
105
+ * @param t - The types allowed under the field.
106
+ * @param props - Optional properties to associate with the field.
107
+ *
108
+ * @typeParam TCustomMetadata - Custom metadata properties to associate with the field.
109
+ * See {@link FieldSchemaMetadata.custom}.
110
+ */
111
+ optional: (t, props) => {
112
+ const defaultOptionalProvider = getDefaultProvider(() => {
113
+ return undefined;
114
+ });
115
+ return createFieldSchema(FieldKind.Optional, t, {
116
+ defaultProvider: defaultOptionalProvider,
117
+ ...props,
118
+ });
119
+ },
120
+ /**
121
+ * Make a field explicitly required.
122
+ *
123
+ * @param t - The types allowed under the field.
124
+ * @param props - Optional properties to associate with the field.
125
+ *
126
+ * @remarks
127
+ * Fields are required by default, but this API can be used to make the required nature explicit in the schema,
128
+ * and allows associating custom {@link FieldProps | properties} with the field.
129
+ *
130
+ * @typeParam TCustomMetadata - Custom metadata properties to associate with the field.
131
+ * See {@link FieldSchemaMetadata.custom}.
132
+ */
133
+ required: (t, props) => {
134
+ return createFieldSchema(FieldKind.Required, t, props);
135
+ },
136
+ /**
137
+ * {@link schemaStatics.optional} except tweaked to work better for recursive types.
138
+ * Use with {@link ValidateRecursiveSchema} for improved type safety.
139
+ * @remarks
140
+ * This version of {@link schemaStatics.optional} has fewer type constraints to work around TypeScript limitations, see {@link Unenforced}.
141
+ * See {@link ValidateRecursiveSchema} for additional information about using recursive schema.
142
+ */
143
+ optionalRecursive: (t, props) => {
144
+ return createFieldSchemaUnsafe(FieldKind.Optional, t, props);
145
+ },
146
+ /**
147
+ * {@link schemaStatics.required} except tweaked to work better for recursive types.
148
+ * Use with {@link ValidateRecursiveSchema} for improved type safety.
149
+ * @remarks
150
+ * This version of {@link schemaStatics.required} has fewer type constraints to work around TypeScript limitations, see {@link Unenforced}.
151
+ * See {@link ValidateRecursiveSchema} for additional information about using recursive schema.
152
+ */
153
+ requiredRecursive: (t, props) => {
154
+ return createFieldSchemaUnsafe(FieldKind.Required, t, props);
155
+ },
156
+ };
44
157
  // TODO:
45
158
  // SchemaFactory.array references should link to the correct overloads, however the syntax for this does not seems to work currently for methods unless the they are not qualified with the class.
46
159
  // API-Extractor requires such links to be qualified with the class, so it can't work.
@@ -187,51 +300,45 @@ export class SchemaFactory {
187
300
  */
188
301
  this.structuralTypes = new Map();
189
302
  /**
190
- * {@link TreeNodeSchema} for holding a JavaScript `string`.
191
- *
192
- * @remarks
193
- * Strings containing unpaired UTF-16 surrogate pair code units may not be handled correctly.
194
- *
195
- * These limitations come from the use of UTF-8 encoding of the strings, which requires them to be valid unicode.
196
- * JavaScript does not make this requirement for its strings so not all possible JavaScript strings are supported.
197
- * @privateRemarks
198
- * TODO:
199
- * We should be much more clear about what happens if you use problematic values.
200
- * We should validate and/or normalize them when inserting content.
303
+ * {@inheritDoc schemaStatics.string}
201
304
  */
202
305
  this.string = stringSchema;
203
306
  /**
204
- * {@link TreeNodeSchema} for holding a JavaScript `number`.
205
- *
206
- * @remarks
207
- * The number is a [double-precision 64-bit binary format IEEE 754](https://en.wikipedia.org/wiki/Double-precision_floating-point_format) value, however there are some exceptions:
208
- * - `NaN`, and the infinities are converted to `null` (and may therefore only be used where `null` is allowed by the schema).
209
- * - `-0` may be converted to `0` in some cases.
210
- *
211
- * These limitations match the limitations of JSON.
212
- * @privateRemarks
213
- * TODO:
214
- * We should be much more clear about what happens if you use problematic values.
215
- * We should validate and/or normalize them when inserting content.
307
+ * {@inheritDoc schemaStatics.number}
216
308
  */
217
309
  this.number = numberSchema;
218
310
  /**
219
- * {@link TreeNodeSchema} for holding a boolean.
311
+ * {@inheritDoc schemaStatics.boolean}
220
312
  */
221
313
  this.boolean = booleanSchema;
222
314
  /**
223
- * {@link TreeNodeSchema} for JavaScript `null`.
224
- *
225
- * @remarks
226
- * There are good [reasons to avoid using null](https://www.npmjs.com/package/%40rushstack/eslint-plugin#rushstackno-new-null) in JavaScript, however sometimes it is desired.
227
- * This {@link TreeNodeSchema} node provides the option to include nulls in trees when desired.
228
- * Unless directly inter-operating with existing data using null, consider other approaches, like wrapping the value in an optional field, or using a more specifically named empty object node.
315
+ * {@inheritDoc schemaStatics.null}
229
316
  */
230
317
  this.null = nullSchema;
231
318
  /**
232
- * {@link TreeNodeSchema} for holding an {@link @fluidframework/core-interfaces#(IFluidHandle:interface)}.
319
+ * {@inheritDoc schemaStatics.handle}
233
320
  */
234
321
  this.handle = handleSchema;
322
+ /**
323
+ * {@inheritDoc schemaStatics.leaves}
324
+ */
325
+ this.leaves = schemaStatics.leaves;
326
+ /**
327
+ * {@inheritDoc schemaStatics.optional}
328
+ */
329
+ this.optional = schemaStatics.optional;
330
+ /**
331
+ * {@inheritDoc schemaStatics.required}
332
+ */
333
+ this.required = schemaStatics.required;
334
+ /**
335
+ * {@inheritDoc schemaStatics.optionalRecursive}
336
+ */
337
+ this.optionalRecursive = schemaStatics.optionalRecursive;
338
+ /**
339
+ * {@inheritDoc schemaStatics.requiredRecursive}
340
+ */
341
+ this.requiredRecursive = schemaStatics.requiredRecursive;
235
342
  }
236
343
  scoped(name) {
237
344
  return (this.scope === undefined ? `${name}` : `${this.scope}.${name}`);
@@ -300,60 +407,6 @@ export class SchemaFactory {
300
407
  namedArray(name, allowedTypes, customizable, implicitlyConstructable) {
301
408
  return arraySchema(this.scoped(name), allowedTypes, implicitlyConstructable, customizable);
302
409
  }
303
- /**
304
- * Make a field optional instead of the default, which is required.
305
- *
306
- * @param t - The types allowed under the field.
307
- * @param props - Optional properties to associate with the field.
308
- *
309
- * @typeParam TCustomMetadata - Custom metadata properties to associate with the field.
310
- * See {@link FieldSchemaMetadata.custom}.
311
- */
312
- optional(t, props) {
313
- const defaultOptionalProvider = getDefaultProvider(() => {
314
- return undefined;
315
- });
316
- return createFieldSchema(FieldKind.Optional, t, {
317
- defaultProvider: defaultOptionalProvider,
318
- ...props,
319
- });
320
- }
321
- /**
322
- * Make a field explicitly required.
323
- *
324
- * @param t - The types allowed under the field.
325
- * @param props - Optional properties to associate with the field.
326
- *
327
- * @remarks
328
- * Fields are required by default, but this API can be used to make the required nature explicit in the schema,
329
- * and allows associating custom {@link FieldProps | properties} with the field.
330
- *
331
- * @typeParam TCustomMetadata - Custom metadata properties to associate with the field.
332
- * See {@link FieldSchemaMetadata.custom}.
333
- */
334
- required(t, props) {
335
- return createFieldSchema(FieldKind.Required, t, props);
336
- }
337
- /**
338
- * {@link SchemaFactory.optional} except tweaked to work better for recursive types.
339
- * Use with {@link ValidateRecursiveSchema} for improved type safety.
340
- * @remarks
341
- * This version of {@link SchemaFactory.optional} has fewer type constraints to work around TypeScript limitations, see {@link Unenforced}.
342
- * See {@link ValidateRecursiveSchema} for additional information about using recursive schema.
343
- */
344
- optionalRecursive(t, props) {
345
- return createFieldSchemaUnsafe(FieldKind.Optional, t, props);
346
- }
347
- /**
348
- * {@link SchemaFactory.required} except tweaked to work better for recursive types.
349
- * Use with {@link ValidateRecursiveSchema} for improved type safety.
350
- * @remarks
351
- * This version of {@link SchemaFactory.required} has fewer type constraints to work around TypeScript limitations, see {@link Unenforced}.
352
- * See {@link ValidateRecursiveSchema} for additional information about using recursive schema.
353
- */
354
- requiredRecursive(t, props) {
355
- return createFieldSchemaUnsafe(FieldKind.Required, t, props);
356
- }
357
410
  /**
358
411
  * A special field which holds a unique identifier for an object node.
359
412
  * @remarks
@@ -424,6 +477,46 @@ export class SchemaFactory {
424
477
  return MapSchema;
425
478
  }
426
479
  }
480
+ /**
481
+ * {@inheritDoc schemaStatics.string}
482
+ */
483
+ SchemaFactory.string = stringSchema;
484
+ /**
485
+ * {@inheritDoc schemaStatics.number}
486
+ */
487
+ SchemaFactory.number = numberSchema;
488
+ /**
489
+ * {@inheritDoc schemaStatics.boolean}
490
+ */
491
+ SchemaFactory.boolean = booleanSchema;
492
+ /**
493
+ * {@inheritDoc schemaStatics.null}
494
+ */
495
+ SchemaFactory.null = nullSchema;
496
+ /**
497
+ * {@inheritDoc schemaStatics.handle}
498
+ */
499
+ SchemaFactory.handle = handleSchema;
500
+ /**
501
+ * {@inheritDoc schemaStatics.leaves}
502
+ */
503
+ SchemaFactory.leaves = schemaStatics.leaves;
504
+ /**
505
+ * {@inheritDoc schemaStatics.optional}
506
+ */
507
+ SchemaFactory.optional = schemaStatics.optional;
508
+ /**
509
+ * {@inheritDoc schemaStatics.required}
510
+ */
511
+ SchemaFactory.required = schemaStatics.required;
512
+ /**
513
+ * {@inheritDoc schemaStatics.optionalRecursive}
514
+ */
515
+ SchemaFactory.optionalRecursive = schemaStatics.optionalRecursive;
516
+ /**
517
+ * {@inheritDoc schemaStatics.requiredRecursive}
518
+ */
519
+ SchemaFactory.requiredRecursive = schemaStatics.requiredRecursive;
427
520
  export function structuralName(collectionName, allowedTypes) {
428
521
  let inner;
429
522
  if (!isReadonlyArray(allowedTypes)) {