annil 1.15.1 → 1.17.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 (275) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +0 -2
  3. package/dist/api/DefineComponent/SubComponents/SubComponentsOption.d.ts +3 -3
  4. package/dist/api/DefineComponent/index.d.ts +4 -4
  5. package/dist/api/DefineComponent/normalizeOptions/__throttleDebounce__FieldCheck.d.ts +2 -3
  6. package/dist/api/DefineComponent/normalizeOptions/__throttleDebounce__FieldCheck.js.map +1 -1
  7. package/dist/api/DefineComponent/normalizeOptions/handleSubComponents.d.ts +2 -2
  8. package/dist/api/DefineComponent/normalizeOptions/handleSubComponents.js.map +1 -1
  9. package/dist/api/DefineComponent/normalizeOptions/initComputed/index.js.map +1 -1
  10. package/dist/api/DefineComponent/normalizeOptions/injectInfoHandler.js +1 -1
  11. package/dist/api/DefineComponent/normalizeOptions/injectInfoHandler.js.map +1 -1
  12. package/dist/api/DefineComponent/normalizeOptions/sameFuncFieldsCollect.d.ts +2 -2
  13. package/dist/api/DefineComponent/normalizeOptions/sameFuncFieldsCollect.js.map +1 -1
  14. package/dist/api/DefineComponent/normalizeOptions/watchHandler/index.js +3 -3
  15. package/dist/api/DefineComponent/normalizeOptions/watchHandler/index.js.map +1 -1
  16. package/dist/api/DefineComponent/returnType/GenerateComponentDoc.d.ts +2 -2
  17. package/dist/api/DefineComponent/returnType/GetCustomEventDocOfSubDoc.d.ts +3 -3
  18. package/dist/api/InstanceInject/instanceConfig.d.ts +2 -2
  19. package/dist/api/InstanceInject/instanceConfig.js.map +1 -1
  20. package/dist/api/RootComponent/PageLifetimes/PageLifetimesOption.d.ts +1 -3
  21. package/dist/api/RootComponent/index.d.ts +3 -3
  22. package/dist/api/RootComponent/index.js.map +1 -1
  23. package/dist/api/SubComponent/SubComputed/GetSubComputedDoc.d.ts +3 -0
  24. package/dist/api/SubComponent/SubComputed/GetSubComputedDoc.js +2 -0
  25. package/dist/api/SubComponent/SubComputed/GetSubComputedDoc.js.map +1 -0
  26. package/dist/api/SubComponent/SubComputed/SubComputedConstraint.d.ts +3 -0
  27. package/dist/api/SubComponent/SubComputed/SubComputedConstraint.js +2 -0
  28. package/dist/api/SubComponent/SubComputed/SubComputedConstraint.js.map +1 -0
  29. package/dist/api/{CustomComponent/CustomComputed/CustomComputedOption.d.ts → SubComponent/SubComputed/SubComputedOption.d.ts} +1 -1
  30. package/dist/api/SubComponent/SubComputed/SubComputedOption.js +2 -0
  31. package/dist/api/SubComponent/SubComputed/SubComputedOption.js.map +1 -0
  32. package/dist/api/SubComponent/SubData/SubDataConstraint.d.ts +3 -0
  33. package/dist/api/SubComponent/SubData/SubDataConstraint.js +2 -0
  34. package/dist/api/SubComponent/SubData/SubDataConstraint.js.map +1 -0
  35. package/dist/api/{CustomComponent/CustomData/CustomDataOption.d.ts → SubComponent/SubData/SubDataOption.d.ts} +1 -1
  36. package/dist/api/SubComponent/SubData/SubDataOption.js +2 -0
  37. package/dist/api/SubComponent/SubData/SubDataOption.js.map +1 -0
  38. package/dist/api/{CustomComponent/CustomEvents/CustomEventsConstraint.d.ts → SubComponent/SubEvents/SubEventsConstraint.d.ts} +1 -1
  39. package/dist/api/SubComponent/SubEvents/SubEventsConstraint.js +2 -0
  40. package/dist/api/SubComponent/SubEvents/SubEventsConstraint.js.map +1 -0
  41. package/dist/api/{CustomComponent/CustomEvents/CustomEventsOption.d.ts → SubComponent/SubEvents/SubEventsOption.d.ts} +1 -1
  42. package/dist/api/SubComponent/SubEvents/SubEventsOption.js +2 -0
  43. package/dist/api/SubComponent/SubEvents/SubEventsOption.js.map +1 -0
  44. package/dist/api/{CustomComponent/CustomInherit/CustomInheritConstraint.d.ts → SubComponent/SubInherit/SubInheritConstraint.d.ts} +1 -1
  45. package/dist/api/SubComponent/SubInherit/SubInheritConstraint.js +2 -0
  46. package/dist/api/SubComponent/SubInherit/SubInheritConstraint.js.map +1 -0
  47. package/dist/api/{CustomComponent/CustomInherit/CustomInheritOption.d.ts → SubComponent/SubInherit/SubInheritOption.d.ts} +1 -1
  48. package/dist/api/SubComponent/SubInherit/SubInheritOption.js +2 -0
  49. package/dist/api/SubComponent/SubInherit/SubInheritOption.js.map +1 -0
  50. package/dist/api/SubComponent/SubInstance/SubInstance.d.ts +2 -0
  51. package/dist/api/SubComponent/SubInstance/SubInstance.js.map +1 -0
  52. package/dist/api/{CustomComponent/CustomLifetimes → SubComponent/SubLifetimes}/SubLifetimesOption.d.ts +1 -1
  53. package/dist/api/SubComponent/SubLifetimes/SubLifetimesOption.js.map +1 -0
  54. package/dist/api/SubComponent/SubMethods/SubMethodsConstraint.d.ts +2 -0
  55. package/dist/api/SubComponent/SubMethods/SubMethodsConstraint.js +2 -0
  56. package/dist/api/SubComponent/SubMethods/SubMethodsConstraint.js.map +1 -0
  57. package/dist/api/SubComponent/SubMethods/SubMethodsOption.d.ts +5 -0
  58. package/dist/api/SubComponent/SubMethods/SubMethodsOption.js +2 -0
  59. package/dist/api/SubComponent/SubMethods/SubMethodsOption.js.map +1 -0
  60. package/dist/api/SubComponent/SubObservers/SubObserversOption.d.ts +2 -0
  61. package/dist/api/SubComponent/SubObservers/SubObserversOption.js +2 -0
  62. package/dist/api/SubComponent/SubObservers/SubObserversOption.js.map +1 -0
  63. package/dist/api/SubComponent/SubPageLifetimes/SubPageLifetimesOption.d.ts +2 -0
  64. package/dist/api/SubComponent/SubPageLifetimes/SubPageLifetimesOption.js +2 -0
  65. package/dist/api/SubComponent/SubPageLifetimes/SubPageLifetimesOption.js.map +1 -0
  66. package/dist/api/{CustomComponent/CustomReturnType/CreateCustomComponentDoc.d.ts → SubComponent/SubReturnType/CreateSubComponentDoc.d.ts} +1 -1
  67. package/dist/api/SubComponent/SubReturnType/CreateSubComponentDoc.js +2 -0
  68. package/dist/api/SubComponent/SubReturnType/CreateSubComponentDoc.js.map +1 -0
  69. package/dist/api/{CustomComponent/CustomStore/CustomStoreConstraint.d.ts → SubComponent/SubStore/SubStoreConstraint.d.ts} +1 -1
  70. package/dist/api/SubComponent/SubStore/SubStoreConstraint.js +2 -0
  71. package/dist/api/SubComponent/SubStore/SubStoreConstraint.js.map +1 -0
  72. package/dist/api/{CustomComponent/CustomStore/CustomStoreOption.d.ts → SubComponent/SubStore/SubStoreOption.d.ts} +1 -1
  73. package/dist/api/SubComponent/SubStore/SubStoreOption.js +2 -0
  74. package/dist/api/SubComponent/SubStore/SubStoreOption.js.map +1 -0
  75. package/dist/api/SubComponent/SubWatch/SubWatchOption.d.ts +2 -0
  76. package/dist/api/SubComponent/SubWatch/SubWatchOption.js +2 -0
  77. package/dist/api/SubComponent/SubWatch/SubWatchOption.js.map +1 -0
  78. package/dist/api/SubComponent/index.d.ts +49 -0
  79. package/dist/api/SubComponent/index.js +4 -0
  80. package/dist/api/SubComponent/index.js.map +1 -0
  81. package/dist/api/{CustomComponent → SubComponent}/returnType.d.ts +3 -3
  82. package/dist/api/SubComponent/returnType.js.map +1 -0
  83. package/dist/index.d.ts +2 -3
  84. package/dist/index.js +2 -3
  85. package/dist/index.js.map +1 -1
  86. package/package.json +1 -1
  87. package/src/api/DefineComponent/SubComponents/SubComponentsOption.ts +3 -4
  88. package/src/api/DefineComponent/SubComponents/test/normal.test.ts +3 -3
  89. package/src/api/DefineComponent/index.ts +8 -8
  90. package/src/api/DefineComponent/normalizeOptions/__throttleDebounce__FieldCheck.ts +2 -3
  91. package/src/api/DefineComponent/normalizeOptions/handleSubComponents.ts +2 -2
  92. package/src/api/DefineComponent/normalizeOptions/initComputed/index.ts +0 -9
  93. package/src/api/DefineComponent/normalizeOptions/injectInfoHandler.ts +1 -1
  94. package/src/api/DefineComponent/normalizeOptions/sameFuncFieldsCollect.ts +2 -2
  95. package/src/api/DefineComponent/normalizeOptions/watchHandler/index.ts +6 -3
  96. package/src/api/DefineComponent/returnType/GenerateComponentDoc.ts +2 -2
  97. package/src/api/DefineComponent/returnType/GetCustomEventDocOfSubDoc.ts +4 -4
  98. package/src/api/DefineComponent/returnType/test/normalComponentDoc.test.ts +6 -6
  99. package/src/api/InstanceInject/inject.ts +7 -2
  100. package/src/api/InstanceInject/instanceConfig.ts +3 -4
  101. package/src/api/InstanceInject/test/normal.test.ts +7 -6
  102. package/src/api/RootComponent/Instance/test/datas/mormal.test.ts +43 -0
  103. package/src/api/RootComponent/Instance/test/methods/mormal.test.ts +11 -2
  104. package/src/api/RootComponent/Instance/test/properties/mormal.test.ts +1 -1
  105. package/src/api/RootComponent/PageLifetimes/PageLifetimesOption.ts +1 -4
  106. package/src/api/RootComponent/PageLifetimes/test/normal.test.ts +3 -31
  107. package/src/api/RootComponent/Store/test/normal.test.ts +24 -4
  108. package/src/api/RootComponent/index.ts +20 -7
  109. package/src/api/{CustomComponent/CustomComputed/GetCustomComputedDoc.ts → SubComponent/SubComputed/GetSubComputedDoc.ts} +1 -1
  110. package/src/api/SubComponent/SubComputed/SubComputedConstraint.ts +1 -0
  111. package/src/api/{CustomComponent/CustomComputed/CustomComputedOption.ts → SubComponent/SubComputed/SubComputedOption.ts} +1 -1
  112. package/src/api/{CustomComponent/CustomComputed → SubComponent/SubComputed}/test/error.test.ts +7 -7
  113. package/src/api/{CustomComponent/CustomComputed → SubComponent/SubComputed}/test/normal.test.ts +9 -9
  114. package/src/api/{CustomComponent/CustomData/CustomDataConstraint.ts → SubComponent/SubData/SubDataConstraint.ts} +1 -1
  115. package/src/api/{CustomComponent/CustomData/CustomDataOption.ts → SubComponent/SubData/SubDataOption.ts} +1 -1
  116. package/src/api/{CustomComponent/CustomData → SubComponent/SubData}/test/error.test.ts +5 -5
  117. package/src/api/{CustomComponent/CustomData → SubComponent/SubData}/test/normal.test.ts +6 -6
  118. package/src/api/{CustomComponent/CustomEvents/CustomEventsConstraint.ts → SubComponent/SubEvents/SubEventsConstraint.ts} +1 -1
  119. package/src/api/{CustomComponent/CustomEvents/CustomEventsOption.ts → SubComponent/SubEvents/SubEventsOption.ts} +1 -1
  120. package/src/api/{CustomComponent/CustomEvents → SubComponent/SubEvents}/test/error.test.ts +3 -3
  121. package/src/api/{CustomComponent/CustomEvents → SubComponent/SubEvents}/test/normal.test.ts +10 -10
  122. package/src/api/{CustomComponent/CustomInherit/CustomInheritConstraint.ts → SubComponent/SubInherit/SubInheritConstraint.ts} +1 -1
  123. package/src/api/{CustomComponent/CustomInherit/CustomInheritOption.ts → SubComponent/SubInherit/SubInheritOption.ts} +1 -1
  124. package/src/api/{CustomComponent/CustomInherit → SubComponent/SubInherit}/test/error.test.ts +7 -7
  125. package/src/api/{CustomComponent/CustomInherit → SubComponent/SubInherit}/test/normal.test.ts +5 -5
  126. package/src/api/{CustomComponent/CustomInstance → SubComponent/SubInstance}/SubInstance.ts +1 -1
  127. package/src/api/{CustomComponent/CustomInstance → SubComponent/SubInstance}/test/error.test.ts +2 -2
  128. package/src/api/{CustomComponent/CustomInstance → SubComponent/SubInstance}/test/normal.test.ts +2 -2
  129. package/src/api/{CustomComponent/CustomLifetimes → SubComponent/SubLifetimes}/SubLifetimesOption.ts +1 -1
  130. package/src/api/SubComponent/SubMethods/SubMethodsConstraint.ts +3 -0
  131. package/src/api/{CustomComponent/CustomMethods/CustomMethodsOption.ts → SubComponent/SubMethods/SubMethodsOption.ts} +3 -3
  132. package/src/api/{CustomComponent/CustomMethods → SubComponent/SubMethods}/test/error.test.ts +3 -3
  133. package/src/api/{CustomComponent/CustomMethods → SubComponent/SubMethods}/test/normarl.test.ts +3 -3
  134. package/src/api/SubComponent/SubObservers/SubObserversOption.ts +3 -0
  135. package/src/api/{CustomComponent/CustomPageLifetimes/CustomPageLifetimesOption.ts → SubComponent/SubPageLifetimes/SubPageLifetimesOption.ts} +1 -1
  136. package/src/api/{CustomComponent/CustomReturnType/CreateCustomComponentDoc.ts → SubComponent/SubReturnType/CreateSubComponentDoc.ts} +1 -1
  137. package/src/api/{CustomComponent/CustomReturnType → SubComponent/SubReturnType}/test/error.test.ts +2 -2
  138. package/src/api/{CustomComponent/CustomReturnType → SubComponent/SubReturnType}/test/normal.test.ts +4 -4
  139. package/src/api/{CustomComponent/CustomStore/CustomStoreConstraint.ts → SubComponent/SubStore/SubStoreConstraint.ts} +1 -1
  140. package/src/api/{CustomComponent/CustomStore/CustomStoreOption.ts → SubComponent/SubStore/SubStoreOption.ts} +1 -1
  141. package/src/api/{CustomComponent/CustomStore → SubComponent/SubStore}/test/error.test.ts +4 -4
  142. package/src/api/{CustomComponent/CustomStore → SubComponent/SubStore}/test/normal.test.ts +5 -5
  143. package/src/api/SubComponent/SubWatch/SubWatchOption.ts +3 -0
  144. package/src/api/{CustomComponent/CustomWatch → SubComponent/SubWatch}/test/WatchComputed.test.ts +2 -2
  145. package/src/api/{CustomComponent/CustomWatch → SubComponent/SubWatch}/test/WatchProperties.test.ts +2 -2
  146. package/src/api/{CustomComponent/CustomWatch → SubComponent/SubWatch}/test/WatchRootData.test.ts +2 -2
  147. package/src/api/{CustomComponent/CustomWatch → SubComponent/SubWatch}/test/WatchSubData.test.ts +3 -3
  148. package/src/api/{CustomComponent/CustomWatch → SubComponent/SubWatch}/test/WtachInject.test.ts +2 -2
  149. package/src/api/{CustomComponent/CustomWatch → SubComponent/SubWatch}/test/error.test.ts +5 -5
  150. package/src/api/{CustomComponent → SubComponent}/index.ts +49 -49
  151. package/src/api/{CustomComponent → SubComponent}/returnType.ts +6 -6
  152. package/src/index.ts +2 -4
  153. package/src/thirdLib/wm/swiper.test.ts +2 -2
  154. package/dist/api/ChunkComponent/ChunkComputed/ChunkComputedConstraint.d.ts +0 -1
  155. package/dist/api/ChunkComponent/ChunkComputed/ChunkComputedConstraint.js +0 -2
  156. package/dist/api/ChunkComponent/ChunkComputed/ChunkComputedConstraint.js.map +0 -1
  157. package/dist/api/ChunkComponent/ChunkComputed/ChunkComputedOption.d.ts +0 -10
  158. package/dist/api/ChunkComponent/ChunkComputed/ChunkComputedOption.js +0 -2
  159. package/dist/api/ChunkComponent/ChunkComputed/ChunkComputedOption.js.map +0 -1
  160. package/dist/api/ChunkComponent/ChunkData/chunkDataOption.d.ts +0 -9
  161. package/dist/api/ChunkComponent/ChunkData/chunkDataOption.js +0 -2
  162. package/dist/api/ChunkComponent/ChunkData/chunkDataOption.js.map +0 -1
  163. package/dist/api/ChunkComponent/ChunkData/validatePrefix.d.ts +0 -2
  164. package/dist/api/ChunkComponent/ChunkData/validatePrefix.js +0 -2
  165. package/dist/api/ChunkComponent/ChunkData/validatePrefix.js.map +0 -1
  166. package/dist/api/ChunkComponent/ChunkMethods/ChunkMethodsOption.d.ts +0 -10
  167. package/dist/api/ChunkComponent/ChunkMethods/ChunkMethodsOption.js +0 -2
  168. package/dist/api/ChunkComponent/ChunkMethods/ChunkMethodsOption.js.map +0 -1
  169. package/dist/api/ChunkComponent/ChunkStore/ChunkStoreConstraint.d.ts +0 -2
  170. package/dist/api/ChunkComponent/ChunkStore/ChunkStoreConstraint.js +0 -2
  171. package/dist/api/ChunkComponent/ChunkStore/ChunkStoreConstraint.js.map +0 -1
  172. package/dist/api/ChunkComponent/ChunkStore/ChunkStoreOption.d.ts +0 -12
  173. package/dist/api/ChunkComponent/ChunkStore/ChunkStoreOption.js +0 -2
  174. package/dist/api/ChunkComponent/ChunkStore/ChunkStoreOption.js.map +0 -1
  175. package/dist/api/ChunkComponent/ChunklEvents/ChunkEventsConstraint.d.ts +0 -2
  176. package/dist/api/ChunkComponent/ChunklEvents/ChunkEventsConstraint.js +0 -2
  177. package/dist/api/ChunkComponent/ChunklEvents/ChunkEventsConstraint.js.map +0 -1
  178. package/dist/api/ChunkComponent/ChunklEvents/ChunkEventsOption.d.ts +0 -10
  179. package/dist/api/ChunkComponent/ChunklEvents/ChunkEventsOption.js +0 -2
  180. package/dist/api/ChunkComponent/ChunklEvents/ChunkEventsOption.js.map +0 -1
  181. package/dist/api/ChunkComponent/SlotComponentReturnType.d.ts +0 -20
  182. package/dist/api/ChunkComponent/SlotComponentReturnType.js +0 -2
  183. package/dist/api/ChunkComponent/SlotComponentReturnType.js.map +0 -1
  184. package/dist/api/ChunkComponent/index.d.ts +0 -24
  185. package/dist/api/ChunkComponent/index.js +0 -4
  186. package/dist/api/ChunkComponent/index.js.map +0 -1
  187. package/dist/api/CustomComponent/CustomComputed/CustomComputedConstraint.d.ts +0 -3
  188. package/dist/api/CustomComponent/CustomComputed/CustomComputedConstraint.js +0 -2
  189. package/dist/api/CustomComponent/CustomComputed/CustomComputedConstraint.js.map +0 -1
  190. package/dist/api/CustomComponent/CustomComputed/CustomComputedOption.js +0 -2
  191. package/dist/api/CustomComponent/CustomComputed/CustomComputedOption.js.map +0 -1
  192. package/dist/api/CustomComponent/CustomComputed/GetCustomComputedDoc.d.ts +0 -3
  193. package/dist/api/CustomComponent/CustomComputed/GetCustomComputedDoc.js +0 -2
  194. package/dist/api/CustomComponent/CustomComputed/GetCustomComputedDoc.js.map +0 -1
  195. package/dist/api/CustomComponent/CustomData/CustomDataConstraint.d.ts +0 -3
  196. package/dist/api/CustomComponent/CustomData/CustomDataConstraint.js +0 -2
  197. package/dist/api/CustomComponent/CustomData/CustomDataConstraint.js.map +0 -1
  198. package/dist/api/CustomComponent/CustomData/CustomDataOption.js +0 -2
  199. package/dist/api/CustomComponent/CustomData/CustomDataOption.js.map +0 -1
  200. package/dist/api/CustomComponent/CustomEvents/CustomEventsConstraint.js +0 -2
  201. package/dist/api/CustomComponent/CustomEvents/CustomEventsConstraint.js.map +0 -1
  202. package/dist/api/CustomComponent/CustomEvents/CustomEventsOption.js +0 -2
  203. package/dist/api/CustomComponent/CustomEvents/CustomEventsOption.js.map +0 -1
  204. package/dist/api/CustomComponent/CustomInherit/CustomInheritConstraint.js +0 -2
  205. package/dist/api/CustomComponent/CustomInherit/CustomInheritConstraint.js.map +0 -1
  206. package/dist/api/CustomComponent/CustomInherit/CustomInheritOption.js +0 -2
  207. package/dist/api/CustomComponent/CustomInherit/CustomInheritOption.js.map +0 -1
  208. package/dist/api/CustomComponent/CustomInstance/SubInstance.d.ts +0 -2
  209. package/dist/api/CustomComponent/CustomInstance/SubInstance.js.map +0 -1
  210. package/dist/api/CustomComponent/CustomLifetimes/SubLifetimesOption.js.map +0 -1
  211. package/dist/api/CustomComponent/CustomMethods/CustomMethodsConstraint.d.ts +0 -2
  212. package/dist/api/CustomComponent/CustomMethods/CustomMethodsConstraint.js +0 -2
  213. package/dist/api/CustomComponent/CustomMethods/CustomMethodsConstraint.js.map +0 -1
  214. package/dist/api/CustomComponent/CustomMethods/CustomMethodsOption.d.ts +0 -5
  215. package/dist/api/CustomComponent/CustomMethods/CustomMethodsOption.js +0 -2
  216. package/dist/api/CustomComponent/CustomMethods/CustomMethodsOption.js.map +0 -1
  217. package/dist/api/CustomComponent/CustomObservers/CustomObserversOption.d.ts +0 -2
  218. package/dist/api/CustomComponent/CustomObservers/CustomObserversOption.js +0 -2
  219. package/dist/api/CustomComponent/CustomObservers/CustomObserversOption.js.map +0 -1
  220. package/dist/api/CustomComponent/CustomPageLifetimes/CustomPageLifetimesOption.d.ts +0 -2
  221. package/dist/api/CustomComponent/CustomPageLifetimes/CustomPageLifetimesOption.js +0 -2
  222. package/dist/api/CustomComponent/CustomPageLifetimes/CustomPageLifetimesOption.js.map +0 -1
  223. package/dist/api/CustomComponent/CustomReturnType/CreateCustomComponentDoc.js +0 -2
  224. package/dist/api/CustomComponent/CustomReturnType/CreateCustomComponentDoc.js.map +0 -1
  225. package/dist/api/CustomComponent/CustomStore/CustomStoreConstraint.js +0 -2
  226. package/dist/api/CustomComponent/CustomStore/CustomStoreConstraint.js.map +0 -1
  227. package/dist/api/CustomComponent/CustomStore/CustomStoreOption.js +0 -2
  228. package/dist/api/CustomComponent/CustomStore/CustomStoreOption.js.map +0 -1
  229. package/dist/api/CustomComponent/CustomWatch/CustomWatchOption.d.ts +0 -2
  230. package/dist/api/CustomComponent/CustomWatch/CustomWatchOption.js +0 -2
  231. package/dist/api/CustomComponent/CustomWatch/CustomWatchOption.js.map +0 -1
  232. package/dist/api/CustomComponent/index.d.ts +0 -49
  233. package/dist/api/CustomComponent/index.js +0 -4
  234. package/dist/api/CustomComponent/index.js.map +0 -1
  235. package/dist/api/CustomComponent/returnType.js.map +0 -1
  236. package/src/api/ChunkComponent/ChunkComputed/ChunkComputedConstraint.ts +0 -1
  237. package/src/api/ChunkComponent/ChunkComputed/ChunkComputedOption.ts +0 -46
  238. package/src/api/ChunkComponent/ChunkComputed/GetChunkComputedDoc.ts +0 -9
  239. package/src/api/ChunkComponent/ChunkComputed/test/SlotGetComputedDoc.test.ts +0 -25
  240. package/src/api/ChunkComponent/ChunkComputed/test/error.test.ts +0 -33
  241. package/src/api/ChunkComponent/ChunkComputed/test/mock.ts +0 -37
  242. package/src/api/ChunkComponent/ChunkComputed/test/normal.test.ts +0 -86
  243. package/src/api/ChunkComponent/ChunkData/chunkDataConstraint.ts +0 -9
  244. package/src/api/ChunkComponent/ChunkData/chunkDataOption.ts +0 -17
  245. package/src/api/ChunkComponent/ChunkData/test/error.test.ts +0 -28
  246. package/src/api/ChunkComponent/ChunkData/test/mock.ts +0 -44
  247. package/src/api/ChunkComponent/ChunkData/test/normal.test.ts +0 -18
  248. package/src/api/ChunkComponent/ChunkData/validatePrefix.ts +0 -4
  249. package/src/api/ChunkComponent/ChunkLifetimes/ChunkLifetimes.test.ts +0 -24
  250. package/src/api/ChunkComponent/ChunkLifetimes/ChunkPageLifetimes.test.ts +0 -26
  251. package/src/api/ChunkComponent/ChunkMethods/ChunkMethodsOption.ts +0 -27
  252. package/src/api/ChunkComponent/ChunkMethods/test/error.test.ts +0 -31
  253. package/src/api/ChunkComponent/ChunkMethods/test/normal.test.ts +0 -21
  254. package/src/api/ChunkComponent/ChunkStore/ChunkStoreConstraint.ts +0 -3
  255. package/src/api/ChunkComponent/ChunkStore/ChunkStoreOption.ts +0 -33
  256. package/src/api/ChunkComponent/ChunkStore/test/error.test.ts +0 -36
  257. package/src/api/ChunkComponent/ChunkStore/test/mock.ts +0 -32
  258. package/src/api/ChunkComponent/ChunkStore/test/normal.test.ts +0 -52
  259. package/src/api/ChunkComponent/ChunkWatch/test/error.test.ts +0 -28
  260. package/src/api/ChunkComponent/ChunkWatch/test/normal.test.ts +0 -58
  261. package/src/api/ChunkComponent/ChunklEvents/ChunkEventsConstraint.ts +0 -3
  262. package/src/api/ChunkComponent/ChunklEvents/ChunkEventsOption.ts +0 -27
  263. package/src/api/ChunkComponent/ChunklEvents/test/error.test.ts +0 -24
  264. package/src/api/ChunkComponent/ChunklEvents/test/normal.test.ts +0 -26
  265. package/src/api/ChunkComponent/SlotComponentReturnType.ts +0 -32
  266. package/src/api/ChunkComponent/index.ts +0 -165
  267. package/src/api/CustomComponent/CustomComputed/CustomComputedConstraint.ts +0 -1
  268. package/src/api/CustomComponent/CustomMethods/CustomMethodsConstraint.ts +0 -3
  269. package/src/api/CustomComponent/CustomObservers/CustomObserversOption.ts +0 -3
  270. package/src/api/CustomComponent/CustomWatch/CustomWatchOption.ts +0 -3
  271. /package/dist/api/{CustomComponent/CustomInstance → SubComponent/SubInstance}/SubInstance.js +0 -0
  272. /package/dist/api/{CustomComponent/CustomLifetimes → SubComponent/SubLifetimes}/SubLifetimesOption.js +0 -0
  273. /package/dist/api/{CustomComponent → SubComponent}/returnType.js +0 -0
  274. /package/src/api/{CustomComponent/CustomPageLifetimes → SubComponent/SubPageLifetimes}/test/error.test.ts +0 -0
  275. /package/src/api/{CustomComponent/CustomPageLifetimes → SubComponent/SubPageLifetimes}/test/normal.test.ts +0 -0
@@ -1,31 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-empty-function */
2
- import { ChunkComponent } from "../..";
3
- import type { Mock_RootDoc } from "../../ChunkData/test/mock";
4
-
5
- // 1. 与RootDoc的event或methods重复
6
- ChunkComponent<Mock_RootDoc, "xxx">()({
7
- methods: {
8
- // @ts-expect-error 与RootDoc的events中的字段重复
9
- xxx_onTap() {},
10
- // @ts-expect-error 与RootDoc的methods中的字段重复
11
- xxx_test() {},
12
- },
13
- });
14
-
15
- // 3 与自身的events中的字段重复
16
- ChunkComponent<Mock_RootDoc, "xxx">()({
17
- events: {
18
- xxx_eventA() {},
19
- },
20
- methods: {
21
- // @ts-expect-error 与自身的events中的字段重复
22
- xxx_eventA() {},
23
- },
24
- });
25
- // 4 前缀错误
26
- ChunkComponent<Mock_RootDoc, "slot">()({
27
- methods: {
28
- // @ts-expect-error "⚠️字段不合法,请使用'slot_'或'_slot_'开头的字段名⚠️")
29
- xxx_num() {},
30
- },
31
- });
@@ -1,21 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-unused-expressions */
2
- import { Checking } from "hry-types";
3
- import { ChunkComponent } from "../..";
4
- import type { Mock_RootDoc } from "../../ChunkData/test/mock";
5
-
6
- // 1. 定义前缀为ddd的方法
7
- ChunkComponent<Mock_RootDoc, "ddd">()({
8
- methods: {
9
- // eslint-disable-next-line @typescript-eslint/no-empty-function
10
- ddd_xxx() {},
11
- },
12
- });
13
-
14
- // 2. 可以调用RootDoc中的methods字段
15
- ChunkComponent<Mock_RootDoc, "ddd">()({
16
- methods: {
17
- ddd_xxx() {
18
- Checking<ReturnType<typeof this.xxx_test>, void, true>;
19
- },
20
- },
21
- });
@@ -1,3 +0,0 @@
1
- import type { StoreConstraint } from "../../RootComponent/Store/StoreConstraint";
2
-
3
- export type ChunkStoreConstraint<T extends object = object> = StoreConstraint<T>;
@@ -1,33 +0,0 @@
1
- import type { G } from "hry-types";
2
- import type { Validators } from "../../../types/Validators";
3
- import type { TypeValidator } from "../../RootComponent/Store/StoreOption";
4
- import type { ValidatorPrefix } from "../ChunkData/validatePrefix";
5
- import type { ChunkStoreConstraint } from "./ChunkStoreConstraint";
6
-
7
- export type ChunkStoreOption<
8
- TStore extends ChunkStoreConstraint,
9
- TDuplicateKeys extends PropertyKey,
10
- Prefix extends string,
11
- > = {
12
- /**
13
- * 全局响应式数据字段,全局store对应数据变化实例对应数据自动setData。与properties和data字段有重复检测
14
- * @example
15
- * ```ts
16
- * {
17
- * //...
18
- * store: {
19
- * responsiveData: () => sroreX.str,
20
- * },
21
- * }
22
- * ```
23
- */
24
- store?:
25
- & TStore
26
- & Validators<
27
- [
28
- G.DuplicateFieldValidator<TStore, TDuplicateKeys, "字段重复">,
29
- ValidatorPrefix<TStore, Prefix>,
30
- TypeValidator<TStore>,
31
- ]
32
- >;
33
- };
@@ -1,36 +0,0 @@
1
- import { ChunkComponent } from "../..";
2
- import type { Mock_RootDoc } from "./mock";
3
-
4
- // 1 前缀错误
5
- ChunkComponent<Mock_RootDoc, "slot">()({
6
- store: {
7
- // @ts-expect-error "⚠️字段不合法,请使用'slot_'或'_slot_'开头的字段名⚠️")
8
- xxx_num: () => 1,
9
- },
10
- });
11
-
12
- // 2. 内部字段前缀错误
13
- ChunkComponent<Mock_RootDoc, "xxx">()({
14
- store: {
15
- // @ts-expect-error "⚠️字段不合法,请使用'xxx_'或'_xxx_'开头的字段名⚠️")
16
- _xxxx_num: () => 1,
17
- },
18
- });
19
-
20
- // 3. 与父级字段重复
21
- ChunkComponent<Mock_RootDoc, "slot">()({
22
- store: {
23
- // @ts-expect-error "⚠️字段重复⚠️")
24
- slot_num: () => 1,
25
- // @ts-expect-error "⚠️字段重复⚠️")
26
- _slot_str: () => "1",
27
- },
28
- });
29
-
30
- // 4. 返回类型错误
31
- ChunkComponent<{ properties: { categoryId: string } }>()({
32
- store: {
33
- // @ts-expect-error 4.1 返回类型中不可以包含undefined
34
- categoryList: () => undefined,
35
- },
36
- });
@@ -1,32 +0,0 @@
1
- import type { RootComponentDefinition } from "../../../RootComponent/returnType";
2
-
3
- export type Mock_RootDoc = RootComponentDefinition<{
4
- properties: {
5
- required_num: number;
6
- optional_literal_num?: 123 | 456 | 789;
7
- unionStrNum: string | number;
8
- required_obj: object | null;
9
- optional_obj?: object | null;
10
- slot_num: number;
11
- _slot_str: string;
12
- };
13
- data: {
14
- str: string;
15
- literal_str: "a" | "b" | "c";
16
- bool: boolean;
17
- };
18
- computed: {
19
- Cuinon: string | boolean;
20
- };
21
- }>;
22
-
23
- // export type Mock_SubDoc = {
24
- // allDatas: {
25
- // aaa_num: number;
26
- // aaa_literal_num: 123 | 456;
27
- // aaa_str?: string;
28
- // aaa_union: string | boolean;
29
- // aaa_obj: object | null;
30
- // aaa_obj1?: object | null;
31
- // };
32
- // };
@@ -1,52 +0,0 @@
1
- import { ChunkComponent } from "../..";
2
- import type { Mock_RootDoc } from "./mock";
3
-
4
- // 1 可以使用前缀字段
5
- ChunkComponent<Mock_RootDoc, "slot">()({
6
- store: {
7
- slot_xxx: () => 123,
8
- _slot_yyy: () => "str",
9
- },
10
- });
11
-
12
- // type User = {
13
- // name: string;
14
- // age?: number;
15
- // };
16
- // type AllGoods = Record<string, User[]>;
17
- // const M_User = observable({
18
- // allUser: {
19
- // categoryA: [{ name: "zhao", age: 20 }],
20
- // categoryB: [{ name: "zhao" }],
21
- // } as AllGoods,
22
- // });
23
-
24
- // ChunkComponent<{ properties: { categoryId: string } }>()({
25
- // data: {
26
- // // categoryList:[],
27
- // },
28
- // store: {
29
- // // 1 响应式不包含undefined时 只能写成getter函数形式
30
- // categoryList: (data) => M_User.allUser[data.categoryId],
31
- // // 2 响应式数据包含undefined时 只能写成对象形式
32
- // _categoryList: {
33
- // getter: (data) => M_User.allUser[data.categoryId][0].age,
34
- // default: 0,
35
- // },
36
- // _categoryList1: {
37
- // getter: (data) => M_User.allUser[data.categoryId] as User[] | undefined,
38
- // // 默认值为[]
39
- // default: [],
40
- // },
41
- // _categoryList2: {
42
- // getter: (data) => M_User.allUser[data.categoryId][0] as User | undefined,
43
- // // 对象类型 默认值为User类型
44
- // default: { name: "zhao", age: 20 },
45
- // },
46
- // _categoryList3: {
47
- // getter: (data) => M_User.allUser[data.categoryId][0] as User | undefined,
48
- // // 对象类型 默认值可以为null
49
- // default: null,
50
- // },
51
- // },
52
- // });
@@ -1,28 +0,0 @@
1
- import { ChunkComponent } from "../..";
2
- import type { Mock_RootDoc } from "../../ChunkComputed/test/mock";
3
- export type User = {
4
- name: string;
5
- age?: number;
6
- };
7
- // 1. 没有对应字段报错
8
- ChunkComponent<Mock_RootDoc, "zzz">()({
9
- watch: {
10
- // @ts-expect-error 没有对应字段报错
11
- // eslint-disable-next-line @typescript-eslint/no-empty-function
12
- xxx() {},
13
- },
14
- });
15
- // 2. 不可以watch含有null类型对象的子字段
16
- ChunkComponent<{ data: { user: User | null } }, "zzz">()({
17
- watch: {
18
- user(newValue, oldValue) {
19
- void oldValue;
20
- void newValue;
21
- },
22
- // @ts-expect-error 不能watch子字段 因为user可能为null
23
- "user.name"(newValue, oldValue) {
24
- void oldValue;
25
- void newValue;
26
- },
27
- },
28
- });
@@ -1,58 +0,0 @@
1
- import { Checking } from "hry-types";
2
- import { observable } from "mobx";
3
- import { ChunkComponent } from "../..";
4
- import type { Mock_RootDoc } from "../../ChunkData/test/mock";
5
-
6
- const obj = observable({
7
- gender: "male" as "male" | "female",
8
- });
9
- type Mock_user = {
10
- name: string;
11
- age?: number;
12
- };
13
- /**
14
- * watch data字段 深度只读
15
- */
16
- ChunkComponent<Mock_RootDoc, "zzz">()({
17
- data: {
18
- zzz_num: 123,
19
- zzz_obj: {} as Mock_user,
20
- },
21
- store: {
22
- zzz_gender: () => obj.gender,
23
- },
24
- computed: {
25
- zzz_computed(): number {
26
- return this.data.zzz_num + (this.data.zzz_obj.age ?? 1);
27
- },
28
- },
29
- watch: {
30
- // watch data字段
31
- zzz_num(newValue, oldValue) {
32
- void oldValue;
33
- void Checking<number, typeof newValue, true>;
34
-
35
- void Checking<number, typeof oldValue, true>;
36
- },
37
- // watch store字段
38
- zzz_obj(newValue, oldValue) {
39
- void oldValue;
40
- void Checking<Mock_user, typeof newValue, true>;
41
-
42
- void Checking<Mock_user, typeof oldValue, true>;
43
- },
44
- // watch computed字段
45
- zzz_computed(newValue: number, oldValue: number) {
46
- void oldValue;
47
- void Checking<number, typeof newValue, true>;
48
- void Checking<number, typeof oldValue, true>;
49
- },
50
- // watch RootDoc字段
51
- optional_obj(newValue, oldValue) {
52
- void oldValue;
53
- void Checking<object | null, typeof newValue, true>;
54
-
55
- void Checking<object | null, typeof oldValue, true>;
56
- },
57
- },
58
- });
@@ -1,3 +0,0 @@
1
- import type { WMBaseEvent } from "../../../types/OfficialTypeAlias";
2
-
3
- export type ChunkEventsConstraint = Record<string, (e: WMBaseEvent) => void>;
@@ -1,27 +0,0 @@
1
- import type { G } from "hry-types";
2
- import type { IfExtends } from "hry-types/src/Any/IfExtends";
3
- import type { Validators } from "../../../types/Validators";
4
- import type { ChunkEventsConstraint } from "./ChunkEventsConstraint";
5
-
6
- export type ChunkEventsOption<
7
- TEvents extends ChunkEventsConstraint,
8
- TDuplicateKeys extends PropertyKey,
9
- Prefix extends string,
10
- > = {
11
- /**
12
- * slot块数据
13
- */
14
- events?:
15
- & TEvents
16
- & Validators<
17
- [
18
- G.DuplicateFieldValidator<TEvents, TDuplicateKeys, "字段重复">,
19
- IfExtends<
20
- ChunkEventsConstraint,
21
- TEvents,
22
- unknown,
23
- IfExtends<Prefix, "", unknown, G.KeyValidator<TEvents, `${Prefix}_${string}`, "前缀错误">>
24
- >,
25
- ]
26
- >;
27
- };
@@ -1,24 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-empty-function */
2
- import { ChunkComponent } from "../..";
3
- import type { Mock_RootDoc } from "../../ChunkData/test/mock";
4
-
5
- // 1. 与RootDoc的event或methods重复
6
- ChunkComponent<Mock_RootDoc, "xxx">()({
7
- events: {
8
- // @ts-expect-error 与RootDoc的event重复
9
- xxx_onTap() {
10
- },
11
- // @ts-expect-error 与RootDoc的methods重复
12
- xxx_test() {
13
- },
14
- },
15
- });
16
-
17
- // 2 前缀错误
18
- ChunkComponent<Mock_RootDoc, "slot">()({
19
- events: {
20
- // @ts-expect-error "⚠️字段不合法,请使用'slot_'或'_slot_'开头的字段名⚠️")
21
- xxx_num() {
22
- },
23
- },
24
- });
@@ -1,26 +0,0 @@
1
- import { ChunkComponent } from "../..";
2
- import type { Mock_RootDoc } from "../../ChunkData/test/mock";
3
-
4
- ChunkComponent<Mock_RootDoc, "xxx">()({
5
- events: {
6
- xxx_ddd() {
7
- void 0;
8
- },
9
- },
10
- });
11
- ChunkComponent<{}>()({
12
- data: {
13
- ddd_src: "string",
14
- ddd_arr: [1, 2, 3],
15
- },
16
- methods: {
17
- ddffa() {
18
- void 0;
19
- },
20
- },
21
- events: {
22
- ddd_aaa(e) {
23
- console.log(e);
24
- },
25
- },
26
- });
@@ -1,32 +0,0 @@
1
- import type { Func } from "hry-types/src/Misc/_api";
2
- import type { DataConstraint } from "../RootComponent/Data/DataConstraint";
3
- import type { EventsConstraint } from "../RootComponent/Events/EventsConstraint";
4
- import type { LifetimesConstraint } from "../RootComponent/Lifetimes/LifetimesConstraint";
5
- import type { MethodsConstraint } from "../RootComponent/Methods/MethodsConstraint";
6
- import type { PageLifetimesOption } from "../RootComponent/PageLifetimes/PageLifetimesOption";
7
- import type { ChunkComputedConstraint } from "./ChunkComputed/ChunkComputedConstraint";
8
- import type { ChunkStoreConstraint } from "./ChunkStore/ChunkStoreConstraint";
9
-
10
- export type SlotComponentReturnType = {
11
- data?: DataConstraint;
12
- computed?: ChunkComputedConstraint;
13
- methods?: MethodsConstraint;
14
- events?: EventsConstraint;
15
- store?: ChunkStoreConstraint;
16
- observers?: Record<string, Func>;
17
- watch?: Record<string, Func>;
18
- lifetimes?: LifetimesConstraint;
19
- behaviors?: string[];
20
- pageLifetimes?:
21
- | PageLifetimesOption<false, object>["pageLifetimes"]
22
- | PageLifetimesOption<true, object>["pageLifetimes"];
23
- };
24
-
25
- // // 验证key是否合法
26
- // type _Validator<O, Doc, ErrKeys = Exclude<keyof O, keyof Doc>> = [ErrKeys] extends [never] ? Doc
27
- // : `错误的字段${ErrKeys & string}`;
28
-
29
- // /**
30
- // * SlotComponent Api 返回的类型
31
- // */
32
- // export type SlotComponentReturnType<O extends _Validator<O, _SlotComponentReturnType> = _SlotComponentReturnType> = O;
@@ -1,165 +0,0 @@
1
- import type { IfExtends } from "hry-types/src/Any/_api";
2
- import type { WMCompOtherOption } from "../../types/OfficialTypeAlias";
3
- import type { IInjectAllData, IInjectMethods, IInjectStore } from "../InstanceInject/instanceConfig";
4
- import type { GetComputedDef } from "../RootComponent/Computed/GetComputedDef";
5
- import type { RootComponentInstance } from "../RootComponent/Instance/RootComponentInstance";
6
- import type { LifetimesOption } from "../RootComponent/Lifetimes/LifetimesOption";
7
- import type { MethodsConstraint } from "../RootComponent/Methods/MethodsConstraint";
8
- import type { ObserversOption } from "../RootComponent/Observers/ObserversOption";
9
- import type { PageLifetimesOption } from "../RootComponent/PageLifetimes/PageLifetimesOption";
10
- import type { RootComponentDefinition } from "../RootComponent/returnType";
11
- import type { GetStoreDef } from "../RootComponent/Store/GetStoreDef";
12
- import type { WatchOption } from "../RootComponent/Watch/WatchOption";
13
- import type { ChunkComputedConstraint } from "./ChunkComputed/ChunkComputedConstraint";
14
- import type { ChunkComputedOption } from "./ChunkComputed/ChunkComputedOption";
15
- import type { ChunkDataOption } from "./ChunkData/chunkDataOption";
16
- import type { ChunkEventsConstraint } from "./ChunklEvents/ChunkEventsConstraint";
17
- import type { ChunkEventsOption } from "./ChunklEvents/ChunkEventsOption";
18
- import type { ChunkMethodsOption } from "./ChunkMethods/ChunkMethodsOption";
19
- import type { ChunkStoreConstraint } from "./ChunkStore/ChunkStoreConstraint";
20
- import type { ChunkStoreOption } from "./ChunkStore/ChunkStoreOption";
21
- type ChunkComponentOptions<
22
- TIsPage extends boolean,
23
- Prefix extends string,
24
- RootDatas extends object,
25
- TEvents extends ChunkEventsConstraint,
26
- TData extends object,
27
- TStore extends ChunkStoreConstraint,
28
- StoreDoc extends object,
29
- TComputed extends ChunkComputedConstraint,
30
- ComputedDoc extends object,
31
- RootMethods extends object,
32
- RootEvents extends object,
33
- TMethods extends MethodsConstraint,
34
- EventsDoc extends object,
35
- PropertiesDoc extends object,
36
- > =
37
-
38
- // // CustomEventsDoc extends object,
39
- & ChunkDataOption<TData, keyof (RootDatas & IInjectAllData), Prefix>
40
- & ChunkStoreOption<TStore, keyof (TData & RootDatas & IInjectAllData), Prefix>
41
- & ChunkComputedOption<
42
- TComputed,
43
- keyof (TData & StoreDoc & RootDatas & IInjectAllData),
44
- // { data: ComputeObject<TData & StoreDoc & RootDatas & ComputedDoc & IInjectAllData> },
45
- Prefix
46
- >
47
- & ChunkEventsOption<
48
- TEvents,
49
- keyof (RootMethods & RootEvents & IInjectMethods),
50
- Prefix
51
- >
52
- & ChunkMethodsOption<
53
- TMethods,
54
- keyof (RootMethods & RootEvents & EventsDoc & IInjectMethods),
55
- Prefix
56
- >
57
- & ThisType<
58
- RootComponentInstance<
59
- TIsPage,
60
- TMethods & RootMethods,
61
- TData,
62
- TData & StoreDoc & ComputedDoc & RootDatas & IInjectAllData,
63
- {},
64
- StoreDoc
65
- >
66
- >
67
- & PageLifetimesOption<TIsPage, PropertiesDoc>
68
- & LifetimesOption
69
- & WatchOption<
70
- & ComputedDoc
71
- & Required<RootDatas>
72
- & TData
73
- & StoreDoc
74
- & IInjectStore
75
- >
76
- & Partial<Omit<WMCompOtherOption, "pageLifetimes" | "definitionFilter" | "observers">>
77
- & ObserversOption<
78
- & ComputedDoc
79
- & Required<RootDatas>
80
- & TData
81
- & StoreDoc
82
- & IInjectStore
83
- >;
84
-
85
- type ChunkComponentConstructor<
86
- TRootComponentReturnType extends RootComponentDefinition,
87
- TPrefix extends string,
88
- IsPage extends boolean = TRootComponentReturnType["isPage"] extends true ? true : false,
89
- RootDatas extends object =
90
- & Required<TRootComponentReturnType["properties"]>
91
- & TRootComponentReturnType["data"]
92
- & TRootComponentReturnType["computed"]
93
- & TRootComponentReturnType["store"],
94
- RootMethods extends object = TRootComponentReturnType["methods"] & {},
95
- RootEvents extends object = TRootComponentReturnType["events"] & {},
96
- > = <
97
- TEvents extends ChunkEventsConstraint,
98
- TStore extends ChunkStoreConstraint<Required<TRootComponentReturnType["properties"]>>,
99
- TMethods extends MethodsConstraint = {},
100
- TData extends object = {},
101
- StoreDoc extends object = ChunkStoreConstraint<Required<TRootComponentReturnType["properties"]>> extends TStore ? {}
102
- : GetStoreDef<TStore>,
103
- TComputed extends ChunkComputedConstraint = {},
104
- ComputedDoc extends object = GetComputedDef<TComputed>,
105
- EventsDoc extends object = IfExtends<ChunkEventsConstraint, TEvents, {}, TEvents>,
106
- PropertiesDoc extends object = NonNullable<TRootComponentReturnType["properties"]>,
107
- >(
108
- options: ChunkComponentOptions<
109
- IsPage,
110
- TPrefix,
111
- RootDatas,
112
- TEvents,
113
- TData,
114
- TStore,
115
- StoreDoc,
116
- TComputed,
117
- ComputedDoc,
118
- RootMethods,
119
- RootEvents,
120
- TMethods,
121
- EventsDoc,
122
- PropertiesDoc
123
- >,
124
- ) => never;
125
-
126
- /**
127
- * ChunkComponent API
128
- * @description 它是用来配置wxml中非自定义组件元素数据和逻辑的API。在不想把wxml中某个元素提取为单独的自定义组件时,可以使用它来把某个元素的相关数据和逻辑配置在一起,以达到和自定义组件相同的效果。
129
- * @example
130
- * ```wxml
131
- * <view>
132
- * <customA ... / >
133
- * ...
134
- * <view id="chunkA" >
135
- * <text>{{chunkA_num}}</text>
136
- * <view bind:tap="chunkA_tap"/>
137
- * ...
138
- * </view>
139
- * </view>
140
- * ```
141
- * ```ts
142
- * const chunkA = ChunkComponent<Root, "chunkA">()({
143
- * data: {chunkA_num: "123",...},
144
- * events: {chunkA_tap(e){e.detail},...},// e.detail 类型为string
145
- * });
146
- * const customA = CustomComponent<Root, CustomA>()({
147
- * ...
148
- * });
149
- * DefinedComponent({
150
- * ...
151
- * subComponents: [chunkA, customA],
152
- * })
153
- * ```
154
- * @param options - ChunkComponent的选项配置,包括数据、方法、事件等,具体配置项和类型可以参考ChunkComponentOptions类型定义。
155
- * @returns never
156
- */
157
- export function ChunkComponent<
158
- TRootComponentReturnType extends RootComponentDefinition,
159
- TPrefix extends string = "",
160
- >(): ChunkComponentConstructor<
161
- TRootComponentReturnType,
162
- TPrefix
163
- > {
164
- return (options) => options as never;
165
- }
@@ -1 +0,0 @@
1
- export type CustomComputedConstraint<obj extends object> = { [k in keyof obj]?: () => obj[k] };
@@ -1,3 +0,0 @@
1
- import type { Func } from "hry-types/src/Misc/Func";
2
-
3
- export type CustomMethodsConstraint = Record<string, Func>;
@@ -1,3 +0,0 @@
1
- import type { ObserversOption } from "../../RootComponent/Observers/ObserversOption";
2
-
3
- export type CustomObserversOption<TObserversData extends object> = ObserversOption<TObserversData>;
@@ -1,3 +0,0 @@
1
- import type { WatchOption } from "../../RootComponent/Watch/WatchOption";
2
-
3
- export type CustomWatchOption<TWatchData extends object> = WatchOption<TWatchData>;