annil 1.16.0 → 1.18.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.
- package/README.md +38 -169
- package/dist/api/ChunkComponent/ChunkComputed/ChunkComputedConstraint.d.ts +1 -0
- package/dist/api/ChunkComponent/ChunkComputed/ChunkComputedConstraint.js +2 -0
- package/dist/api/ChunkComponent/ChunkComputed/ChunkComputedConstraint.js.map +1 -0
- package/dist/api/ChunkComponent/ChunkComputed/ChunkComputedOption.d.ts +10 -0
- package/dist/api/ChunkComponent/ChunkComputed/ChunkComputedOption.js +2 -0
- package/dist/api/ChunkComponent/ChunkComputed/ChunkComputedOption.js.map +1 -0
- package/dist/api/ChunkComponent/ChunkData/chunkDataOption.d.ts +9 -0
- package/dist/api/ChunkComponent/ChunkData/chunkDataOption.js +2 -0
- package/dist/api/ChunkComponent/ChunkData/chunkDataOption.js.map +1 -0
- package/dist/api/ChunkComponent/ChunkData/validatePrefix.d.ts +2 -0
- package/dist/api/ChunkComponent/ChunkData/validatePrefix.js +2 -0
- package/dist/api/ChunkComponent/ChunkData/validatePrefix.js.map +1 -0
- package/dist/api/ChunkComponent/ChunkMethods/ChunkMethodsOption.d.ts +10 -0
- package/dist/api/ChunkComponent/ChunkMethods/ChunkMethodsOption.js +2 -0
- package/dist/api/ChunkComponent/ChunkMethods/ChunkMethodsOption.js.map +1 -0
- package/dist/api/ChunkComponent/ChunkStore/ChunkStoreConstraint.d.ts +2 -0
- package/dist/api/ChunkComponent/ChunkStore/ChunkStoreConstraint.js +2 -0
- package/dist/api/ChunkComponent/ChunkStore/ChunkStoreConstraint.js.map +1 -0
- package/dist/api/ChunkComponent/ChunkStore/ChunkStoreOption.d.ts +12 -0
- package/dist/api/ChunkComponent/ChunkStore/ChunkStoreOption.js +2 -0
- package/dist/api/ChunkComponent/ChunkStore/ChunkStoreOption.js.map +1 -0
- package/dist/api/ChunkComponent/ChunklEvents/ChunkEventsConstraint.d.ts +2 -0
- package/dist/api/ChunkComponent/ChunklEvents/ChunkEventsConstraint.js +2 -0
- package/dist/api/ChunkComponent/ChunklEvents/ChunkEventsConstraint.js.map +1 -0
- package/dist/api/ChunkComponent/ChunklEvents/ChunkEventsOption.d.ts +10 -0
- package/dist/api/ChunkComponent/ChunklEvents/ChunkEventsOption.js +2 -0
- package/dist/api/ChunkComponent/ChunklEvents/ChunkEventsOption.js.map +1 -0
- package/dist/api/ChunkComponent/SlotComponentReturnType.d.ts +20 -0
- package/dist/api/ChunkComponent/SlotComponentReturnType.js +2 -0
- package/dist/api/ChunkComponent/SlotComponentReturnType.js.map +1 -0
- package/dist/api/ChunkComponent/index.d.ts +24 -0
- package/dist/api/ChunkComponent/index.js +4 -0
- package/dist/api/ChunkComponent/index.js.map +1 -0
- package/dist/api/CustomComponent/CustomComputed/CustomComputedConstraint.d.ts +3 -0
- package/dist/api/CustomComponent/CustomComputed/CustomComputedConstraint.js +2 -0
- package/dist/api/CustomComponent/CustomComputed/CustomComputedConstraint.js.map +1 -0
- package/dist/api/{SubComponent/SubComputed/SubComputedOption.d.ts → CustomComponent/CustomComputed/CustomComputedOption.d.ts} +1 -1
- package/dist/api/CustomComponent/CustomComputed/CustomComputedOption.js +2 -0
- package/dist/api/CustomComponent/CustomComputed/CustomComputedOption.js.map +1 -0
- package/dist/api/CustomComponent/CustomComputed/GetCustomComputedDoc.d.ts +3 -0
- package/dist/api/CustomComponent/CustomComputed/GetCustomComputedDoc.js +2 -0
- package/dist/api/CustomComponent/CustomComputed/GetCustomComputedDoc.js.map +1 -0
- package/dist/api/CustomComponent/CustomData/CustomDataConstraint.d.ts +3 -0
- package/dist/api/CustomComponent/CustomData/CustomDataConstraint.js +2 -0
- package/dist/api/CustomComponent/CustomData/CustomDataConstraint.js.map +1 -0
- package/dist/api/{SubComponent/SubData/SubDataOption.d.ts → CustomComponent/CustomData/CustomDataOption.d.ts} +1 -1
- package/dist/api/CustomComponent/CustomData/CustomDataOption.js +2 -0
- package/dist/api/CustomComponent/CustomData/CustomDataOption.js.map +1 -0
- package/dist/api/{SubComponent/SubEvents/SubEventsConstraint.d.ts → CustomComponent/CustomEvents/CustomEventsConstraint.d.ts} +1 -1
- package/dist/api/CustomComponent/CustomEvents/CustomEventsConstraint.js +2 -0
- package/dist/api/CustomComponent/CustomEvents/CustomEventsConstraint.js.map +1 -0
- package/dist/api/CustomComponent/CustomEvents/CustomEventsOption.d.ts +4 -0
- package/dist/api/CustomComponent/CustomEvents/CustomEventsOption.js +2 -0
- package/dist/api/CustomComponent/CustomEvents/CustomEventsOption.js.map +1 -0
- package/dist/api/{SubComponent/SubInherit/SubInheritConstraint.d.ts → CustomComponent/CustomInherit/CustomInheritConstraint.d.ts} +1 -1
- package/dist/api/CustomComponent/CustomInherit/CustomInheritConstraint.js +2 -0
- package/dist/api/CustomComponent/CustomInherit/CustomInheritConstraint.js.map +1 -0
- package/dist/api/{SubComponent/SubInherit/SubInheritOption.d.ts → CustomComponent/CustomInherit/CustomInheritOption.d.ts} +1 -1
- package/dist/api/CustomComponent/CustomInherit/CustomInheritOption.js +2 -0
- package/dist/api/CustomComponent/CustomInherit/CustomInheritOption.js.map +1 -0
- package/dist/api/CustomComponent/CustomInstance/CustomInstance.d.ts +2 -0
- package/dist/api/CustomComponent/CustomInstance/CustomInstance.js +2 -0
- package/dist/api/CustomComponent/CustomInstance/CustomInstance.js.map +1 -0
- package/dist/api/{SubComponent/SubLifetimes/SubLifetimesOption.d.ts → CustomComponent/CustomLifetimes/CustomLifetimesOption.d.ts} +1 -1
- package/dist/api/CustomComponent/CustomLifetimes/CustomLifetimesOption.js +2 -0
- package/dist/api/CustomComponent/CustomLifetimes/CustomLifetimesOption.js.map +1 -0
- package/dist/api/CustomComponent/CustomMethods/CustomMethodsConstraint.d.ts +2 -0
- package/dist/api/CustomComponent/CustomMethods/CustomMethodsConstraint.js +2 -0
- package/dist/api/CustomComponent/CustomMethods/CustomMethodsConstraint.js.map +1 -0
- package/dist/api/CustomComponent/CustomMethods/CustomMethodsOption.d.ts +5 -0
- package/dist/api/CustomComponent/CustomMethods/CustomMethodsOption.js +2 -0
- package/dist/api/CustomComponent/CustomMethods/CustomMethodsOption.js.map +1 -0
- package/dist/api/CustomComponent/CustomObservers/CustomObserversOption.d.ts +2 -0
- package/dist/api/CustomComponent/CustomObservers/CustomObserversOption.js +2 -0
- package/dist/api/CustomComponent/CustomObservers/CustomObserversOption.js.map +1 -0
- package/dist/api/CustomComponent/CustomPageLifetimes/CustomPageLifetimesOption.d.ts +2 -0
- package/dist/api/CustomComponent/CustomPageLifetimes/CustomPageLifetimesOption.js +2 -0
- package/dist/api/CustomComponent/CustomPageLifetimes/CustomPageLifetimesOption.js.map +1 -0
- package/dist/api/{SubComponent/SubReturnType/CreateSubComponentDoc.d.ts → CustomComponent/CustomReturnType/CreateCustomComponentDoc.d.ts} +1 -1
- package/dist/api/CustomComponent/CustomReturnType/CreateCustomComponentDoc.js +2 -0
- package/dist/api/CustomComponent/CustomReturnType/CreateCustomComponentDoc.js.map +1 -0
- package/dist/api/{SubComponent/SubStore/SubStoreConstraint.d.ts → CustomComponent/CustomStore/CustomStoreConstraint.d.ts} +1 -1
- package/dist/api/CustomComponent/CustomStore/CustomStoreConstraint.js +2 -0
- package/dist/api/CustomComponent/CustomStore/CustomStoreConstraint.js.map +1 -0
- package/dist/api/{SubComponent/SubStore/SubStoreOption.d.ts → CustomComponent/CustomStore/CustomStoreOption.d.ts} +1 -1
- package/dist/api/CustomComponent/CustomStore/CustomStoreOption.js +2 -0
- package/dist/api/CustomComponent/CustomStore/CustomStoreOption.js.map +1 -0
- package/dist/api/CustomComponent/CustomWatch/CustomWatchOption.d.ts +2 -0
- package/dist/api/CustomComponent/CustomWatch/CustomWatchOption.js +2 -0
- package/dist/api/CustomComponent/CustomWatch/CustomWatchOption.js.map +1 -0
- package/dist/api/CustomComponent/index.d.ts +49 -0
- package/dist/api/CustomComponent/index.js +4 -0
- package/dist/api/CustomComponent/index.js.map +1 -0
- package/dist/api/{SubComponent → CustomComponent}/returnType.d.ts +3 -3
- package/dist/api/CustomComponent/returnType.js.map +1 -0
- package/dist/api/DefineComponent/SubComponents/SubComponentsOption.d.ts +2 -2
- package/dist/api/DefineComponent/index.d.ts +4 -4
- package/dist/api/DefineComponent/normalizeOptions/__throttleDebounce__FieldCheck.d.ts +3 -2
- package/dist/api/DefineComponent/normalizeOptions/__throttleDebounce__FieldCheck.js.map +1 -1
- package/dist/api/DefineComponent/normalizeOptions/customEventsHandle.js +3 -3
- package/dist/api/DefineComponent/normalizeOptions/customEventsHandle.js.map +1 -1
- package/dist/api/DefineComponent/normalizeOptions/handleStore/reactionRegister.js +1 -2
- package/dist/api/DefineComponent/normalizeOptions/handleStore/reactionRegister.js.map +1 -1
- package/dist/api/DefineComponent/normalizeOptions/handleSubComponents.d.ts +3 -2
- package/dist/api/DefineComponent/normalizeOptions/handleSubComponents.js.map +1 -1
- package/dist/api/DefineComponent/normalizeOptions/index.js +1 -2
- package/dist/api/DefineComponent/normalizeOptions/index.js.map +1 -1
- package/dist/api/DefineComponent/normalizeOptions/injectInfoHandler.js +1 -1
- package/dist/api/DefineComponent/normalizeOptions/injectInfoHandler.js.map +1 -1
- package/dist/api/DefineComponent/normalizeOptions/sameFuncFieldsCollect.d.ts +3 -2
- package/dist/api/DefineComponent/normalizeOptions/sameFuncFieldsCollect.js +1 -2
- package/dist/api/DefineComponent/normalizeOptions/sameFuncFieldsCollect.js.map +1 -1
- package/dist/api/DefineComponent/normalizeOptions/watchHandler/getPathsValue.js +1 -1
- package/dist/api/DefineComponent/normalizeOptions/watchHandler/getPathsValue.js.map +1 -1
- package/dist/api/DefineComponent/normalizeOptions/watchHandler/index.js +3 -4
- package/dist/api/DefineComponent/normalizeOptions/watchHandler/index.js.map +1 -1
- package/dist/api/DefineComponent/returnType/ComponentDoc.d.ts +1 -4
- package/dist/api/DefineComponent/returnType/GenerateComponentDoc.d.ts +3 -3
- package/dist/api/DefineComponent/returnType/GetCustomEventDocOfSubDoc.d.ts +3 -3
- package/dist/api/InstanceInject/instanceConfig.d.ts +2 -2
- package/dist/api/InstanceInject/instanceConfig.js +1 -3
- package/dist/api/InstanceInject/instanceConfig.js.map +1 -1
- package/dist/api/RootComponent/Events/EventsConstraint.d.ts +9 -7
- package/dist/api/RootComponent/index.d.ts +6 -5
- package/dist/api/RootComponent/index.js.map +1 -1
- package/dist/behaviors/BbeforeCreated.d.ts +1 -1
- package/dist/behaviors/BthrottleDebounce.d.ts +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/thirdLib/vant/Button.d.ts +2 -2
- package/dist/thirdLib/vant/NoticeBar.d.ts +2 -2
- package/dist/thirdLib/vant/Popup.d.ts +2 -2
- package/dist/thirdLib/wm/Textarea.d.ts +2 -2
- package/dist/thirdLib/wm/map.d.ts +2 -2
- package/dist/thirdLib/wm/scrollView.d.ts +2 -2
- package/dist/thirdLib/wm/swiper.d.ts +2 -2
- package/dist/thirdLib/wm/view.d.ts +2 -2
- package/dist/types/{CreateComponentType.d.ts → CreateComponentDoc.d.ts} +5 -2
- package/dist/types/CreateComponentDoc.js +2 -0
- package/dist/types/CreateComponentDoc.js.map +1 -0
- package/dist/utils/nonNullable.js +1 -1
- package/dist/utils/nonNullable.js.map +1 -1
- package/package.json +8 -11
- package/CHANGELOG.md +0 -943
- package/dist/api/SubComponent/SubComputed/GetSubComputedDoc.d.ts +0 -3
- package/dist/api/SubComponent/SubComputed/GetSubComputedDoc.js +0 -2
- package/dist/api/SubComponent/SubComputed/GetSubComputedDoc.js.map +0 -1
- package/dist/api/SubComponent/SubComputed/SubComputedConstraint.d.ts +0 -3
- package/dist/api/SubComponent/SubComputed/SubComputedConstraint.js +0 -2
- package/dist/api/SubComponent/SubComputed/SubComputedConstraint.js.map +0 -1
- package/dist/api/SubComponent/SubComputed/SubComputedOption.js +0 -2
- package/dist/api/SubComponent/SubComputed/SubComputedOption.js.map +0 -1
- package/dist/api/SubComponent/SubData/SubDataConstraint.d.ts +0 -3
- package/dist/api/SubComponent/SubData/SubDataConstraint.js +0 -2
- package/dist/api/SubComponent/SubData/SubDataConstraint.js.map +0 -1
- package/dist/api/SubComponent/SubData/SubDataOption.js +0 -2
- package/dist/api/SubComponent/SubData/SubDataOption.js.map +0 -1
- package/dist/api/SubComponent/SubEvents/SubEventsConstraint.js +0 -2
- package/dist/api/SubComponent/SubEvents/SubEventsConstraint.js.map +0 -1
- package/dist/api/SubComponent/SubEvents/SubEventsOption.d.ts +0 -4
- package/dist/api/SubComponent/SubEvents/SubEventsOption.js +0 -2
- package/dist/api/SubComponent/SubEvents/SubEventsOption.js.map +0 -1
- package/dist/api/SubComponent/SubInherit/SubInheritConstraint.js +0 -2
- package/dist/api/SubComponent/SubInherit/SubInheritConstraint.js.map +0 -1
- package/dist/api/SubComponent/SubInherit/SubInheritOption.js +0 -2
- package/dist/api/SubComponent/SubInherit/SubInheritOption.js.map +0 -1
- package/dist/api/SubComponent/SubInstance/SubInstance.d.ts +0 -2
- package/dist/api/SubComponent/SubInstance/SubInstance.js +0 -2
- package/dist/api/SubComponent/SubInstance/SubInstance.js.map +0 -1
- package/dist/api/SubComponent/SubLifetimes/SubLifetimesOption.js +0 -2
- package/dist/api/SubComponent/SubLifetimes/SubLifetimesOption.js.map +0 -1
- package/dist/api/SubComponent/SubMethods/SubMethodsConstraint.d.ts +0 -2
- package/dist/api/SubComponent/SubMethods/SubMethodsConstraint.js +0 -2
- package/dist/api/SubComponent/SubMethods/SubMethodsConstraint.js.map +0 -1
- package/dist/api/SubComponent/SubMethods/SubMethodsOption.d.ts +0 -5
- package/dist/api/SubComponent/SubMethods/SubMethodsOption.js +0 -2
- package/dist/api/SubComponent/SubMethods/SubMethodsOption.js.map +0 -1
- package/dist/api/SubComponent/SubObservers/SubObserversOption.d.ts +0 -2
- package/dist/api/SubComponent/SubObservers/SubObserversOption.js +0 -2
- package/dist/api/SubComponent/SubObservers/SubObserversOption.js.map +0 -1
- package/dist/api/SubComponent/SubPageLifetimes/SubPageLifetimesOption.d.ts +0 -2
- package/dist/api/SubComponent/SubPageLifetimes/SubPageLifetimesOption.js +0 -2
- package/dist/api/SubComponent/SubPageLifetimes/SubPageLifetimesOption.js.map +0 -1
- package/dist/api/SubComponent/SubReturnType/CreateSubComponentDoc.js +0 -2
- package/dist/api/SubComponent/SubReturnType/CreateSubComponentDoc.js.map +0 -1
- package/dist/api/SubComponent/SubStore/SubStoreConstraint.js +0 -2
- package/dist/api/SubComponent/SubStore/SubStoreConstraint.js.map +0 -1
- package/dist/api/SubComponent/SubStore/SubStoreOption.js +0 -2
- package/dist/api/SubComponent/SubStore/SubStoreOption.js.map +0 -1
- package/dist/api/SubComponent/SubWatch/SubWatchOption.d.ts +0 -2
- package/dist/api/SubComponent/SubWatch/SubWatchOption.js +0 -2
- package/dist/api/SubComponent/SubWatch/SubWatchOption.js.map +0 -1
- package/dist/api/SubComponent/index.d.ts +0 -49
- package/dist/api/SubComponent/index.js +0 -4
- package/dist/api/SubComponent/index.js.map +0 -1
- package/dist/api/SubComponent/returnType.js.map +0 -1
- package/dist/types/CreateComponentType.js +0 -2
- package/dist/types/CreateComponentType.js.map +0 -1
- package/dist/types/ExtendComponentType.d.ts +0 -7
- package/dist/types/ExtendComponentType.js +0 -2
- package/dist/types/ExtendComponentType.js.map +0 -1
- package/dist/types/RemoveNullOfRequired.d.ts +0 -4
- package/dist/types/RemoveNullOfRequired.js +0 -2
- package/dist/types/RemoveNullOfRequired.js.map +0 -1
- package/src/api/DefineComponent/NameOrPath/NameOrPathOption.ts +0 -31
- package/src/api/DefineComponent/NameOrPath/test/error.test.ts +0 -32
- package/src/api/DefineComponent/NameOrPath/test/normal.test.ts +0 -13
- package/src/api/DefineComponent/RootComponent/RootComponentOption.ts +0 -11
- package/src/api/DefineComponent/SubComponents/SubComponentsOption.ts +0 -13
- package/src/api/DefineComponent/SubComponents/test/normal.test.ts +0 -1049
- package/src/api/DefineComponent/index.ts +0 -58
- package/src/api/DefineComponent/normalizeOptions/__throttleDebounce__FieldCheck.ts +0 -29
- package/src/api/DefineComponent/normalizeOptions/customEventsHandle.ts +0 -55
- package/src/api/DefineComponent/normalizeOptions/handleRootComponent.ts +0 -33
- package/src/api/DefineComponent/normalizeOptions/handleStore/disposeStore.ts +0 -10
- package/src/api/DefineComponent/normalizeOptions/handleStore/initStore.ts +0 -9
- package/src/api/DefineComponent/normalizeOptions/handleStore/reactionRegister.ts +0 -70
- package/src/api/DefineComponent/normalizeOptions/handleSubComponents.ts +0 -23
- package/src/api/DefineComponent/normalizeOptions/hijackHandle/addDetachedData.ts +0 -10
- package/src/api/DefineComponent/normalizeOptions/hijackHandle/hijack.ts +0 -26
- package/src/api/DefineComponent/normalizeOptions/hijackHandle/index.ts +0 -57
- package/src/api/DefineComponent/normalizeOptions/hijackHandle/isPageCheck.ts +0 -22
- package/src/api/DefineComponent/normalizeOptions/hijackHandle/loadReceivedDataHandle.ts +0 -25
- package/src/api/DefineComponent/normalizeOptions/hijackHandle/onLoadReceivedDataHandle.ts +0 -33
- package/src/api/DefineComponent/normalizeOptions/hijackHandle/pagePathCheck.ts +0 -9
- package/src/api/DefineComponent/normalizeOptions/index.ts +0 -143
- package/src/api/DefineComponent/normalizeOptions/initComputed/computedUpdater.ts +0 -51
- package/src/api/DefineComponent/normalizeOptions/initComputed/data-tracer.ts +0 -62
- package/src/api/DefineComponent/normalizeOptions/initComputed/dependencesOptimize.ts +0 -45
- package/src/api/DefineComponent/normalizeOptions/initComputed/index.ts +0 -42
- package/src/api/DefineComponent/normalizeOptions/initComputed/initComputedAndGetCache.ts +0 -105
- package/src/api/DefineComponent/normalizeOptions/injectInfoHandler.ts +0 -51
- package/src/api/DefineComponent/normalizeOptions/internalFieldProtection.ts +0 -27
- package/src/api/DefineComponent/normalizeOptions/otherFieldsHandle.ts +0 -29
- package/src/api/DefineComponent/normalizeOptions/sameFuncFieldsCollect.ts +0 -23
- package/src/api/DefineComponent/normalizeOptions/sameFuncOptionsHandle.ts +0 -36
- package/src/api/DefineComponent/normalizeOptions/watchHandler/getPathsValue.ts +0 -31
- package/src/api/DefineComponent/normalizeOptions/watchHandler/getPropertiesValue.ts +0 -51
- package/src/api/DefineComponent/normalizeOptions/watchHandler/hasComputedPath.ts +0 -9
- package/src/api/DefineComponent/normalizeOptions/watchHandler/index.ts +0 -78
- package/src/api/DefineComponent/returnType/ComponentDoc.ts +0 -25
- package/src/api/DefineComponent/returnType/GenerateComponentDoc.ts +0 -46
- package/src/api/DefineComponent/returnType/GeneratePageDoc.ts +0 -22
- package/src/api/DefineComponent/returnType/GetCustomEventDocOfSubDoc.ts +0 -24
- package/src/api/DefineComponent/returnType/GetPropertiesDocOfSubDoc.ts +0 -7
- package/src/api/DefineComponent/returnType/PageDoc.ts +0 -19
- package/src/api/DefineComponent/returnType/test/normalComponentDoc.test.ts +0 -248
- package/src/api/DefineComponent/returnType/test/normalPageDoc.test.ts +0 -49
- package/src/api/InstanceInject/inject.ts +0 -36
- package/src/api/InstanceInject/instanceConfig.ts +0 -50
- package/src/api/InstanceInject/test/normal.test.ts +0 -41
- package/src/api/RootComponent/Computed/ComputedConstraint.ts +0 -4
- package/src/api/RootComponent/Computed/ComputedOption.ts +0 -35
- package/src/api/RootComponent/Computed/GetComputedDef.ts +0 -10
- package/src/api/RootComponent/Computed/test/GetComputedDoc.test.ts +0 -25
- package/src/api/RootComponent/Computed/test/error.test.ts +0 -50
- package/src/api/RootComponent/Computed/test/normal.test.ts +0 -124
- package/src/api/RootComponent/CustomEvents/CustomEventConstraint.ts +0 -89
- package/src/api/RootComponent/CustomEvents/CustomEventsDef.ts +0 -4
- package/src/api/RootComponent/CustomEvents/CustomEventsDoc.ts +0 -4
- package/src/api/RootComponent/CustomEvents/CustomEventsOption.ts +0 -41
- package/src/api/RootComponent/CustomEvents/CustomEventsTag.ts +0 -59
- package/src/api/RootComponent/CustomEvents/GetCustomEventDef.ts +0 -29
- package/src/api/RootComponent/CustomEvents/GetCustomEventDoc.ts +0 -47
- package/src/api/RootComponent/CustomEvents/test/GetCustomEventDoc.test.ts +0 -38
- package/src/api/RootComponent/CustomEvents/test/GetFullEventDoc.test.ts +0 -57
- package/src/api/RootComponent/CustomEvents/test/GetShortEventDoc.test.ts +0 -36
- package/src/api/RootComponent/CustomEvents/test/error.test.ts +0 -101
- package/src/api/RootComponent/CustomEvents/test/normal.test.ts +0 -99
- package/src/api/RootComponent/Data/DataConstraint.ts +0 -1
- package/src/api/RootComponent/Data/DataOption.ts +0 -25
- package/src/api/RootComponent/Data/GetDataDef.ts +0 -8
- package/src/api/RootComponent/Data/GetDataDoc.ts +0 -8
- package/src/api/RootComponent/Data/test/GetDataDoc.test.ts +0 -32
- package/src/api/RootComponent/Data/test/error.test.ts +0 -14
- package/src/api/RootComponent/Data/test/normal.test.ts +0 -33
- package/src/api/RootComponent/Events/EventsConstraint.ts +0 -74
- package/src/api/RootComponent/Events/EventsOption.ts +0 -55
- package/src/api/RootComponent/Events/test/normal.test.ts +0 -161
- package/src/api/RootComponent/Instance/CustomEventMethods.ts +0 -11
- package/src/api/RootComponent/Instance/CustomSetData.ts +0 -17
- package/src/api/RootComponent/Instance/RootComponentInstance.ts +0 -46
- package/src/api/RootComponent/Instance/test/CustomEventsDoc.test.ts +0 -70
- package/src/api/RootComponent/Instance/test/CustomSetData.test.ts +0 -44
- package/src/api/RootComponent/Instance/test/customEvents/error.test.ts +0 -13
- package/src/api/RootComponent/Instance/test/customEvents/normal.test.ts +0 -71
- package/src/api/RootComponent/Instance/test/methods/error.test.ts +0 -14
- package/src/api/RootComponent/Instance/test/methods/mormal.test.ts +0 -18
- package/src/api/RootComponent/Instance/test/properties/mormal.test.ts +0 -58
- package/src/api/RootComponent/Instance/test/setData/error.test.ts +0 -65
- package/src/api/RootComponent/Instance/test/setData/normal.test.ts +0 -51
- package/src/api/RootComponent/IsPage/IsPageOption.ts +0 -6
- package/src/api/RootComponent/IsPage/test/normal.test.ts +0 -29
- package/src/api/RootComponent/Lifetimes/LifetimesConstraint.ts +0 -14
- package/src/api/RootComponent/Lifetimes/LifetimesOption.ts +0 -31
- package/src/api/RootComponent/Lifetimes/test/error.test.ts +0 -31
- package/src/api/RootComponent/Lifetimes/test/normal.test.ts +0 -34
- package/src/api/RootComponent/Methods/MethodsConstraint.ts +0 -3
- package/src/api/RootComponent/Methods/MethodsOption.ts +0 -15
- package/src/api/RootComponent/Methods/test/error.test.ts +0 -41
- package/src/api/RootComponent/Methods/test/mormal.test.ts +0 -25
- package/src/api/RootComponent/Observers/ObserversOption.ts +0 -58
- package/src/api/RootComponent/Observers/test/normal.test.ts +0 -30
- package/src/api/RootComponent/PageLifetimes/PageLifetimesOption.ts +0 -29
- package/src/api/RootComponent/PageLifetimes/test/error.test.ts +0 -37
- package/src/api/RootComponent/PageLifetimes/test/normal.test.ts +0 -71
- package/src/api/RootComponent/Properties/GetOptionalDef.ts +0 -18
- package/src/api/RootComponent/Properties/GetPropertiesDef.ts +0 -22
- package/src/api/RootComponent/Properties/GetRequiredDef.ts +0 -16
- package/src/api/RootComponent/Properties/PropertiesConstraint.ts +0 -38
- package/src/api/RootComponent/Properties/PropertiesOption.ts +0 -25
- package/src/api/RootComponent/Properties/PropertiesValueValidator.ts +0 -21
- package/src/api/RootComponent/Properties/test/error.test.ts +0 -49
- package/src/api/RootComponent/Properties/test/normalEmpty.test.ts +0 -42
- package/src/api/RootComponent/Properties/test/normalOptional.test.ts +0 -118
- package/src/api/RootComponent/Properties/test/normalRequired.test.ts +0 -107
- package/src/api/RootComponent/Store/GetStoreDef.ts +0 -34
- package/src/api/RootComponent/Store/StoreConstraint.ts +0 -2
- package/src/api/RootComponent/Store/StoreOption.ts +0 -53
- package/src/api/RootComponent/Store/test/error.test.ts +0 -30
- package/src/api/RootComponent/Store/test/normal.test.ts +0 -35
- package/src/api/RootComponent/Watch/WatchOption.ts +0 -67
- package/src/api/RootComponent/Watch/test/WatchComputed.test.ts +0 -40
- package/src/api/RootComponent/Watch/test/WatchData.test.ts +0 -55
- package/src/api/RootComponent/Watch/test/WatchProperties.test.ts +0 -170
- package/src/api/RootComponent/Watch/test/WtachInject.test.ts +0 -16
- package/src/api/RootComponent/Watch/test/error.test.ts +0 -54
- package/src/api/RootComponent/index.ts +0 -151
- package/src/api/RootComponent/returnType.ts +0 -57
- package/src/api/SubComponent/SubComputed/GetSubComputedDoc.ts +0 -4
- package/src/api/SubComponent/SubComputed/SubComputedConstraint.ts +0 -1
- package/src/api/SubComponent/SubComputed/SubComputedOption.ts +0 -11
- package/src/api/SubComponent/SubComputed/test/error.test.ts +0 -88
- package/src/api/SubComponent/SubComputed/test/normal.test.ts +0 -207
- package/src/api/SubComponent/SubData/SubDataConstraint.ts +0 -9
- package/src/api/SubComponent/SubData/SubDataOption.ts +0 -17
- package/src/api/SubComponent/SubData/test/error.test.ts +0 -64
- package/src/api/SubComponent/SubData/test/normal.test.ts +0 -91
- package/src/api/SubComponent/SubEvents/SubEventsConstraint.ts +0 -27
- package/src/api/SubComponent/SubEvents/SubEventsOption.ts +0 -12
- package/src/api/SubComponent/SubEvents/test/error.test.ts +0 -36
- package/src/api/SubComponent/SubEvents/test/normal.test.ts +0 -209
- package/src/api/SubComponent/SubInherit/SubInheritConstraint.ts +0 -17
- package/src/api/SubComponent/SubInherit/SubInheritOption.ts +0 -15
- package/src/api/SubComponent/SubInherit/test/error.test.ts +0 -84
- package/src/api/SubComponent/SubInherit/test/normal.test.ts +0 -81
- package/src/api/SubComponent/SubInstance/SubInstance.ts +0 -9
- package/src/api/SubComponent/SubInstance/test/error.test.ts +0 -22
- package/src/api/SubComponent/SubInstance/test/normal.test.ts +0 -87
- package/src/api/SubComponent/SubLifetimes/SubLifetimesOption.ts +0 -3
- package/src/api/SubComponent/SubMethods/SubMethodsConstraint.ts +0 -3
- package/src/api/SubComponent/SubMethods/SubMethodsOption.ts +0 -17
- package/src/api/SubComponent/SubMethods/test/error.test.ts +0 -51
- package/src/api/SubComponent/SubMethods/test/normarl.test.ts +0 -33
- package/src/api/SubComponent/SubObservers/SubObserversOption.ts +0 -3
- package/src/api/SubComponent/SubPageLifetimes/SubPageLifetimesOption.ts +0 -6
- package/src/api/SubComponent/SubPageLifetimes/test/error.test.ts +0 -1
- package/src/api/SubComponent/SubPageLifetimes/test/normal.test.ts +0 -1
- package/src/api/SubComponent/SubReturnType/CreateSubComponentDoc.ts +0 -41
- package/src/api/SubComponent/SubReturnType/test/error.test.ts +0 -18
- package/src/api/SubComponent/SubReturnType/test/normal.test.ts +0 -98
- package/src/api/SubComponent/SubStore/SubStoreConstraint.ts +0 -13
- package/src/api/SubComponent/SubStore/SubStoreOption.ts +0 -32
- package/src/api/SubComponent/SubStore/test/error.test.ts +0 -60
- package/src/api/SubComponent/SubStore/test/normal.test.ts +0 -43
- package/src/api/SubComponent/SubWatch/SubWatchOption.ts +0 -3
- package/src/api/SubComponent/SubWatch/test/WatchComputed.test.ts +0 -90
- package/src/api/SubComponent/SubWatch/test/WatchProperties.test.ts +0 -151
- package/src/api/SubComponent/SubWatch/test/WatchRootData.test.ts +0 -122
- package/src/api/SubComponent/SubWatch/test/WatchSubData.test.ts +0 -49
- package/src/api/SubComponent/SubWatch/test/WtachInject.test.ts +0 -16
- package/src/api/SubComponent/SubWatch/test/error.test.ts +0 -60
- package/src/api/SubComponent/index.ts +0 -301
- package/src/api/SubComponent/returnType.ts +0 -39
- package/src/api/wxSugar.ts +0 -107
- package/src/behaviors/BbeforeCreated.ts +0 -18
- package/src/behaviors/BthrottleDebounce.ts +0 -28
- package/src/index.ts +0 -46
- package/src/thirdLib/index.ts +0 -3
- package/src/thirdLib/vant/Button.ts +0 -23
- package/src/thirdLib/vant/NoticeBar.ts +0 -32
- package/src/thirdLib/vant/Popup.ts +0 -70
- package/src/thirdLib/vant/index.ts +0 -5
- package/src/thirdLib/wm/Textarea.ts +0 -117
- package/src/thirdLib/wm/baseEvents.ts +0 -54
- package/src/thirdLib/wm/index.ts +0 -9
- package/src/thirdLib/wm/map.ts +0 -266
- package/src/thirdLib/wm/scrollView.ts +0 -86
- package/src/thirdLib/wm/swiper.test.ts +0 -22
- package/src/thirdLib/wm/swiper.ts +0 -111
- package/src/thirdLib/wm/view.ts +0 -28
- package/src/types/AddNullForObject.ts +0 -6
- package/src/types/AddPrefix.ts +0 -10
- package/src/types/Assert.ts +0 -1
- package/src/types/Assign.ts +0 -1
- package/src/types/ComputeObject.ts +0 -1
- package/src/types/CreateComponentType.ts +0 -37
- package/src/types/DetailedType.ts +0 -15
- package/src/types/ExtendComponentType.ts +0 -60
- package/src/types/Extra.ts +0 -1
- package/src/types/GetComponentPrefix.ts +0 -36
- package/src/types/GetPropertiesDuplicatedKeys.ts +0 -14
- package/src/types/Has.ts +0 -1
- package/src/types/InferDetailedType.test.ts +0 -13
- package/src/types/InferDetailedType.ts +0 -12
- package/src/types/InnerData.ts +0 -1
- package/src/types/ListOfSamePrimitive.ts +0 -20
- package/src/types/OfficialTypeAlias.ts +0 -107
- package/src/types/RemoveInnerData.ts +0 -5
- package/src/types/RemoveNever.ts +0 -6
- package/src/types/RemoveNullOfRequired.ts +0 -8
- package/src/types/RemovePrefix.ts +0 -3
- package/src/types/Replace.ts +0 -24
- package/src/types/ReplacePrefix.ts +0 -46
- package/src/types/RequiredKeys.ts +0 -8
- package/src/types/Shift.ts +0 -2
- package/src/types/TwoParamsEqual.ts +0 -3
- package/src/types/UnionToComma.test.ts +0 -9
- package/src/types/Validators.ts +0 -17
- package/src/types/includes.ts +0 -3
- package/src/utils/InnerMarker.ts +0 -3
- package/src/utils/_utils.ts +0 -8
- package/src/utils/applyDebounceAndThrottle.ts +0 -31
- package/src/utils/debounce.ts +0 -22
- package/src/utils/deepClone.ts +0 -20
- package/src/utils/deepEqual.ts +0 -32
- package/src/utils/isEmptyObject.ts +0 -14
- package/src/utils/nonNullable.ts +0 -20
- package/src/utils/throttle.ts +0 -24
- package/src/utils/typeEqual.ts +0 -30
- package/src/utils/typeNotEqual.ts +0 -48
- package/tsconfig.json +0 -24
- /package/dist/api/{SubComponent → CustomComponent}/returnType.js +0 -0
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import type { G } from "hry-types";
|
|
2
|
-
import type { As } from "hry-types/src/Any/As";
|
|
3
|
-
import type { IfContains } from "hry-types/src/Any/IfContains";
|
|
4
|
-
import type { Func } from "hry-types/src/Misc/Func";
|
|
5
|
-
import type { Validators } from "../../../types/Validators";
|
|
6
|
-
import type { StoreConstraint } from "./StoreConstraint";
|
|
7
|
-
|
|
8
|
-
export type StoreOption<
|
|
9
|
-
TStore extends StoreConstraint,
|
|
10
|
-
TDuplicateKeys extends PropertyKey,
|
|
11
|
-
> = {
|
|
12
|
-
/**
|
|
13
|
-
* 全局响应式数据字段,全局store对应数据变化实例对应数据自动setData。与properties和data字段有重复检测
|
|
14
|
-
* @example
|
|
15
|
-
* ```ts
|
|
16
|
-
* {
|
|
17
|
-
* properties:{
|
|
18
|
-
* useId: String,
|
|
19
|
-
* }
|
|
20
|
-
* //...
|
|
21
|
-
* store: {
|
|
22
|
-
* responsiveData: () => sroreX.str,
|
|
23
|
-
* user:(data)=> M_AllUser[data.useId],
|
|
24
|
-
* _user: {
|
|
25
|
-
* getter: (data) => M_AllUser[data.useId],
|
|
26
|
-
* default: null,
|
|
27
|
-
* },
|
|
28
|
-
* },
|
|
29
|
-
* }
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
store?:
|
|
33
|
-
& TStore
|
|
34
|
-
& Validators<[
|
|
35
|
-
G.DuplicateFieldValidator<TStore, TDuplicateKeys, "字段重复">,
|
|
36
|
-
// TypeValidator<TStore>,
|
|
37
|
-
]>;
|
|
38
|
-
};
|
|
39
|
-
/**
|
|
40
|
-
* 验证properties的value类型是否正确
|
|
41
|
-
* @returns unknown | `{ default: () => "⚠️类型错误⚠️" }`
|
|
42
|
-
*/
|
|
43
|
-
export type TypeValidator<
|
|
44
|
-
TStore,
|
|
45
|
-
Result = {
|
|
46
|
-
[k in keyof TStore]: IfContains<
|
|
47
|
-
ReturnType<As<TStore[k], Func>>,
|
|
48
|
-
undefined,
|
|
49
|
-
() => "⚠️返回类型中不可以包含undefined⚠️",
|
|
50
|
-
unknown
|
|
51
|
-
>;
|
|
52
|
-
},
|
|
53
|
-
> = Record<keyof TStore, unknown> extends Result ? unknown : Result;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { observable } from "mobx";
|
|
2
|
-
import { RootComponent } from "../..";
|
|
3
|
-
const user = observable({
|
|
4
|
-
name: "zhao",
|
|
5
|
-
age: 20,
|
|
6
|
-
});
|
|
7
|
-
|
|
8
|
-
// 1 约束错误
|
|
9
|
-
RootComponent()({
|
|
10
|
-
store: {
|
|
11
|
-
// @ts-expect-error 1.1 不能将类型“string”分配给类型“Getter<{}, unknown>”
|
|
12
|
-
userName: user.name,
|
|
13
|
-
},
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
// 2 重复字段错误
|
|
17
|
-
RootComponent()({
|
|
18
|
-
properties: {
|
|
19
|
-
userName: String,
|
|
20
|
-
},
|
|
21
|
-
data: {
|
|
22
|
-
userAge: 20,
|
|
23
|
-
},
|
|
24
|
-
store: {
|
|
25
|
-
// @ts-expect-error 2.1 与properties字段重复
|
|
26
|
-
userName: () => user.name,
|
|
27
|
-
// @ts-expect-error 2.2 与userAge字段重复
|
|
28
|
-
userAge: () => user.age,
|
|
29
|
-
},
|
|
30
|
-
});
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { observable } from "mobx";
|
|
2
|
-
import { typeEqual } from "../../../../utils/_utils";
|
|
3
|
-
import { RootComponent } from "../..";
|
|
4
|
-
const user = observable({
|
|
5
|
-
name: "zhao",
|
|
6
|
-
age: 20,
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
const storeDoc = RootComponent()({
|
|
10
|
-
properties: {
|
|
11
|
-
condition: Number,
|
|
12
|
-
},
|
|
13
|
-
store: {
|
|
14
|
-
// normal
|
|
15
|
-
userName: () => user.name,
|
|
16
|
-
// 条件反应式,当condition>10时,响应式,否则不可响应式(返回undefined),但不报错(有警告).
|
|
17
|
-
userAge: (props) => {
|
|
18
|
-
if (props.condition > 10) {
|
|
19
|
-
return user.age;
|
|
20
|
-
}
|
|
21
|
-
return undefined;
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
type StoreDocExpected = {
|
|
27
|
-
properties: {
|
|
28
|
-
condition: number;
|
|
29
|
-
};
|
|
30
|
-
store: {
|
|
31
|
-
userName: string;
|
|
32
|
-
userAge: number | undefined;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
typeEqual<StoreDocExpected>()(storeDoc);
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import type { IfExtends } from "hry-types/src/Any/IfExtends";
|
|
2
|
-
import type { IsPureObject } from "hry-types/src/Any/IsPureObject";
|
|
3
|
-
import type { NoInfer } from "hry-types/src/Generic/NoInfer";
|
|
4
|
-
import type { EmptyObject } from "hry-types/src/Misc/EmptyObject";
|
|
5
|
-
|
|
6
|
-
type getFirstKeys<T extends string> = T extends `${infer F}.${string}` ? F : never;
|
|
7
|
-
|
|
8
|
-
type getLastKeys<T extends string> = T extends `${string}.${infer L}` ? L : never;
|
|
9
|
-
|
|
10
|
-
// 加入对象字段一级key 例如 `obj.xxx`(newValue,oldValue){...}和`obj.**`
|
|
11
|
-
type AddFieldsOfObject<
|
|
12
|
-
TWatchData extends object,
|
|
13
|
-
_WatchKeys extends keyof TWatchData,
|
|
14
|
-
secondKeys extends string = {
|
|
15
|
-
[k in _WatchKeys]: IsPureObject<TWatchData[k]> extends true
|
|
16
|
-
? `${k & string}.${(keyof TWatchData[k]) & string}` | `${k & string}.**`
|
|
17
|
-
: never;
|
|
18
|
-
}[_WatchKeys],
|
|
19
|
-
> = {
|
|
20
|
-
[k in secondKeys]?: (
|
|
21
|
-
// @ts-ignore
|
|
22
|
-
newValue: IfExtends<
|
|
23
|
-
getLastKeys<k>,
|
|
24
|
-
"**",
|
|
25
|
-
// @ts-ignore
|
|
26
|
-
Exclude<TWatchData[getFirstKeys<k>], null>,
|
|
27
|
-
// @ts-ignore
|
|
28
|
-
NonNullable<(Exclude<TWatchData[getFirstKeys<k>], null>)[getLastKeys<k>]>
|
|
29
|
-
>,
|
|
30
|
-
oldValue: IfExtends<
|
|
31
|
-
getLastKeys<k>,
|
|
32
|
-
"**",
|
|
33
|
-
// @ts-ignore
|
|
34
|
-
TWatchData[getFirstKeys<k>],
|
|
35
|
-
// @ts-ignore
|
|
36
|
-
(Exclude<TWatchData[getFirstKeys<k>], null>)[getLastKeys<k>]
|
|
37
|
-
>,
|
|
38
|
-
) => void | Promise<void>;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export type WatchOption<TWatchData extends object, _WatchKeys extends keyof TWatchData = keyof TWatchData> = {
|
|
42
|
-
/**
|
|
43
|
-
* 监控所有data字段,值变化时(JSON.stringify判断)运行watch函数,一参为最新值,二参为变化前值。
|
|
44
|
-
* 对象数据可通过`obj.xxx:`监控具体字段(只加入了一级字段类型提示)
|
|
45
|
-
*/
|
|
46
|
-
watch?: IfExtends<
|
|
47
|
-
{},
|
|
48
|
-
TWatchData,
|
|
49
|
-
EmptyObject,
|
|
50
|
-
// 不加NoInfer会导致只监控计算字段时错误
|
|
51
|
-
NoInfer<
|
|
52
|
-
& {
|
|
53
|
-
[k in _WatchKeys]?: (
|
|
54
|
-
newValue: TWatchData[k],
|
|
55
|
-
oldValue: TWatchData[k],
|
|
56
|
-
) => void | Promise<void>;
|
|
57
|
-
}
|
|
58
|
-
// 解决单独书写计算书写字段的报错(猜测是:ts字面量约束检测提前计算属性key引起的错误提示)
|
|
59
|
-
// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style
|
|
60
|
-
& {
|
|
61
|
-
[k in _WatchKeys as never]: unknown;
|
|
62
|
-
}
|
|
63
|
-
// 加入对象的一级字段类型提示
|
|
64
|
-
& AddFieldsOfObject<TWatchData, _WatchKeys>
|
|
65
|
-
>
|
|
66
|
-
>;
|
|
67
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Checking, type Test } from "hry-types";
|
|
2
|
-
|
|
3
|
-
import type { DetailedType } from "../../../../types/DetailedType";
|
|
4
|
-
import { RootComponent } from "../..";
|
|
5
|
-
import type { Mock_User } from "../../Properties/test/normalRequired.test";
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* 1 computed字段时需要手写类型,可悬停鼠标到key查看类型,深度只读
|
|
9
|
-
*/
|
|
10
|
-
RootComponent()({
|
|
11
|
-
properties: {
|
|
12
|
-
Pnum: Number,
|
|
13
|
-
obj: Object as DetailedType<Mock_User>,
|
|
14
|
-
},
|
|
15
|
-
data: {
|
|
16
|
-
DNum: 123,
|
|
17
|
-
},
|
|
18
|
-
computed: {
|
|
19
|
-
CNum() {
|
|
20
|
-
return this.data.Pnum + this.data.DNum;
|
|
21
|
-
},
|
|
22
|
-
Cobj() {
|
|
23
|
-
return this.data.obj;
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
watch: {
|
|
27
|
-
CNum(newValue: number, oldValue: number) {
|
|
28
|
-
void oldValue;
|
|
29
|
-
void Checking<number, typeof newValue, Test.Pass>;
|
|
30
|
-
|
|
31
|
-
void Checking<number, typeof oldValue, Test.Pass>;
|
|
32
|
-
},
|
|
33
|
-
Cobj(newValue: Mock_User, oldValue: Mock_User | null) {
|
|
34
|
-
void oldValue;
|
|
35
|
-
void Checking<Mock_User, typeof newValue, Test.Pass>;
|
|
36
|
-
|
|
37
|
-
void Checking<Mock_User | null, typeof oldValue, Test.Pass>;
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
});
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Checking, type Test } from "hry-types";
|
|
2
|
-
|
|
3
|
-
import { observable } from "mobx";
|
|
4
|
-
import { RootComponent } from "../..";
|
|
5
|
-
import type { Mock_User } from "../../Properties/test/normalRequired.test";
|
|
6
|
-
|
|
7
|
-
const obj = observable({
|
|
8
|
-
gender: "male" as "male" | "female",
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* watch data字段 深度只读
|
|
13
|
-
*/
|
|
14
|
-
RootComponent()({
|
|
15
|
-
data: {
|
|
16
|
-
num: 123,
|
|
17
|
-
obj: {} as Mock_User,
|
|
18
|
-
},
|
|
19
|
-
store: {
|
|
20
|
-
reactiveLiteral: () => obj.gender,
|
|
21
|
-
reactiveNumber: () => ({} as number),
|
|
22
|
-
reactiveUser: () => ({} as Mock_User),
|
|
23
|
-
},
|
|
24
|
-
watch: {
|
|
25
|
-
num(newValue, oldValue) {
|
|
26
|
-
void oldValue;
|
|
27
|
-
void Checking<number, typeof newValue, Test.Pass>;
|
|
28
|
-
|
|
29
|
-
void Checking<number, typeof oldValue, Test.Pass>;
|
|
30
|
-
},
|
|
31
|
-
obj(newValue, oldValue) {
|
|
32
|
-
void oldValue;
|
|
33
|
-
void Checking<Mock_User, typeof newValue, Test.Pass>;
|
|
34
|
-
|
|
35
|
-
void Checking<Mock_User, typeof oldValue, Test.Pass>;
|
|
36
|
-
},
|
|
37
|
-
reactiveNumber(newValue: number, oldValue) {
|
|
38
|
-
void oldValue;
|
|
39
|
-
void Checking<number, typeof newValue, Test.Pass>;
|
|
40
|
-
void Checking<number, typeof oldValue, Test.Pass>;
|
|
41
|
-
},
|
|
42
|
-
reactiveLiteral(newValue, oldValue) {
|
|
43
|
-
void oldValue;
|
|
44
|
-
void Checking<"male" | "female", typeof newValue, Test.Pass>;
|
|
45
|
-
|
|
46
|
-
void Checking<"male" | "female", typeof oldValue, Test.Pass>;
|
|
47
|
-
},
|
|
48
|
-
reactiveUser(newValue, oldValue) {
|
|
49
|
-
void oldValue;
|
|
50
|
-
void Checking<Mock_User, typeof newValue, Test.Pass>;
|
|
51
|
-
|
|
52
|
-
void Checking<Mock_User, typeof oldValue, Test.Pass>;
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
});
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
import { Checking, type Test } from "hry-types";
|
|
2
|
-
import type { DetailedType } from "../../../..";
|
|
3
|
-
import { RootComponent } from "../..";
|
|
4
|
-
import type { OptionalType } from "../../Properties/PropertiesConstraint";
|
|
5
|
-
import {
|
|
6
|
-
type Mock_Cart,
|
|
7
|
-
mock_requiredTypes,
|
|
8
|
-
mock_requiredUnion,
|
|
9
|
-
type Mock_User,
|
|
10
|
-
} from "../../Properties/test/normalRequired.test";
|
|
11
|
-
const mock_optional = {
|
|
12
|
-
optional_num: {
|
|
13
|
-
type: Number,
|
|
14
|
-
value: 123,
|
|
15
|
-
},
|
|
16
|
-
optional_gender: {
|
|
17
|
-
type: String as DetailedType<"male" | "female">,
|
|
18
|
-
value: "male" as const,
|
|
19
|
-
},
|
|
20
|
-
optional_obj: {
|
|
21
|
-
type: Object as DetailedType<Mock_User>,
|
|
22
|
-
value: {
|
|
23
|
-
id: "id",
|
|
24
|
-
name: "name",
|
|
25
|
-
age: 20,
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
optional_objOrNull: {
|
|
29
|
-
type: Object as DetailedType<Mock_User | null>,
|
|
30
|
-
value: null,
|
|
31
|
-
},
|
|
32
|
-
} satisfies Record<string, OptionalType>;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* watch properties字段 深度只读, 必传对象字段newValue去除null
|
|
36
|
-
*/
|
|
37
|
-
RootComponent()({
|
|
38
|
-
properties: {
|
|
39
|
-
...mock_requiredTypes,
|
|
40
|
-
...mock_requiredUnion,
|
|
41
|
-
...mock_optional,
|
|
42
|
-
},
|
|
43
|
-
watch: {
|
|
44
|
-
// 必传单一字段
|
|
45
|
-
str(newValue, oldValue) {
|
|
46
|
-
void oldValue;
|
|
47
|
-
void Checking<string, typeof newValue, Test.Pass>;
|
|
48
|
-
|
|
49
|
-
void Checking<string, typeof oldValue, Test.Pass>;
|
|
50
|
-
},
|
|
51
|
-
num(newValue, oldValue) {
|
|
52
|
-
void oldValue;
|
|
53
|
-
void Checking<number, typeof newValue, Test.Pass>;
|
|
54
|
-
|
|
55
|
-
void Checking<number, typeof oldValue, Test.Pass>;
|
|
56
|
-
},
|
|
57
|
-
bool(newValue, oldValue) {
|
|
58
|
-
void oldValue;
|
|
59
|
-
void Checking<boolean, typeof newValue, Test.Pass>;
|
|
60
|
-
|
|
61
|
-
void Checking<boolean, typeof oldValue, Test.Pass>;
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
obj(newValue, oldValue) {
|
|
65
|
-
void oldValue;
|
|
66
|
-
void Checking<object, typeof newValue, Test.Pass>;
|
|
67
|
-
|
|
68
|
-
void Checking<object, typeof oldValue, Test.Pass>;
|
|
69
|
-
},
|
|
70
|
-
tuple(newValue, oldValue) {
|
|
71
|
-
void oldValue;
|
|
72
|
-
void Checking<[string, number, boolean], typeof newValue, Test.Pass>;
|
|
73
|
-
|
|
74
|
-
void Checking<[string, number, boolean], typeof oldValue, Test.Pass>;
|
|
75
|
-
},
|
|
76
|
-
union_str(newValue, oldValue) {
|
|
77
|
-
void oldValue;
|
|
78
|
-
void Checking<"male" | "female", typeof newValue, Test.Pass>;
|
|
79
|
-
|
|
80
|
-
void Checking<"male" | "female", typeof oldValue, Test.Pass>;
|
|
81
|
-
},
|
|
82
|
-
union_num(newValue, oldValue) {
|
|
83
|
-
void oldValue;
|
|
84
|
-
void Checking<0 | 1 | 2, typeof newValue, Test.Pass>;
|
|
85
|
-
|
|
86
|
-
void Checking<0 | 1 | 2, typeof oldValue, Test.Pass>;
|
|
87
|
-
},
|
|
88
|
-
union_bool(newValue, oldValue) {
|
|
89
|
-
void oldValue;
|
|
90
|
-
void Checking<false | true, typeof newValue, Test.Pass>;
|
|
91
|
-
|
|
92
|
-
void Checking<false | true, typeof oldValue, Test.Pass>;
|
|
93
|
-
},
|
|
94
|
-
union_arr(newValue, oldValue) {
|
|
95
|
-
void oldValue;
|
|
96
|
-
void Checking<number[] | string[], typeof newValue, Test.Pass>;
|
|
97
|
-
|
|
98
|
-
void Checking<number[] | string[], typeof oldValue, Test.Pass>;
|
|
99
|
-
},
|
|
100
|
-
union_obj(newValue, oldValue) {
|
|
101
|
-
void oldValue;
|
|
102
|
-
void Checking<Mock_User | Mock_Cart, typeof newValue, Test.Pass>;
|
|
103
|
-
|
|
104
|
-
void Checking<Mock_User | Mock_Cart, typeof oldValue, Test.Pass>;
|
|
105
|
-
},
|
|
106
|
-
// 必传多类型联合
|
|
107
|
-
union_str_num_bool(newValue, oldValue) {
|
|
108
|
-
void oldValue;
|
|
109
|
-
void Checking<string | number | boolean, typeof newValue, Test.Pass>;
|
|
110
|
-
|
|
111
|
-
void Checking<string | number | boolean, typeof oldValue, Test.Pass>;
|
|
112
|
-
},
|
|
113
|
-
union_literalStr_Literalnum(newValue, oldValue) {
|
|
114
|
-
void oldValue;
|
|
115
|
-
void Checking<0 | 1 | 2 | "male" | "female", typeof newValue, Test.Pass>;
|
|
116
|
-
|
|
117
|
-
void Checking<0 | 1 | 2 | "male" | "female", typeof oldValue, Test.Pass>;
|
|
118
|
-
},
|
|
119
|
-
union_mockUser_num(newValue, oldValue) {
|
|
120
|
-
void oldValue;
|
|
121
|
-
void Checking<number | Mock_User, typeof newValue, Test.Pass>;
|
|
122
|
-
|
|
123
|
-
void Checking<number | Mock_User, typeof oldValue, Test.Pass>;
|
|
124
|
-
},
|
|
125
|
-
// 可选字段
|
|
126
|
-
optional_gender(newValue, oldValue) {
|
|
127
|
-
void oldValue;
|
|
128
|
-
void Checking<"male" | "female", typeof newValue, Test.Pass>;
|
|
129
|
-
|
|
130
|
-
void Checking<"male" | "female", typeof oldValue, Test.Pass>;
|
|
131
|
-
},
|
|
132
|
-
optional_num(newValue, oldValue) {
|
|
133
|
-
void oldValue;
|
|
134
|
-
void Checking<number, typeof newValue, Test.Pass>;
|
|
135
|
-
|
|
136
|
-
void Checking<number, typeof oldValue, Test.Pass>;
|
|
137
|
-
},
|
|
138
|
-
optional_obj(newValue, oldValue) {
|
|
139
|
-
void oldValue;
|
|
140
|
-
void Checking<Mock_User, typeof newValue, Test.Pass>;
|
|
141
|
-
|
|
142
|
-
void Checking<Mock_User, typeof oldValue, Test.Pass>;
|
|
143
|
-
},
|
|
144
|
-
// 对象的二段key
|
|
145
|
-
"optional_obj.age"(newValue, oldValue) {
|
|
146
|
-
void oldValue;
|
|
147
|
-
void Checking<number, typeof newValue, Test.Pass>;
|
|
148
|
-
|
|
149
|
-
void Checking<number | undefined, typeof oldValue, Test.Pass>;
|
|
150
|
-
},
|
|
151
|
-
"optional_obj.**"(newValue, oldValue) {
|
|
152
|
-
void oldValue;
|
|
153
|
-
void Checking<Mock_User, typeof newValue, Test.Pass>;
|
|
154
|
-
|
|
155
|
-
void Checking<Mock_User, typeof oldValue, Test.Pass>;
|
|
156
|
-
},
|
|
157
|
-
"optional_obj.id"(newValue, oldValue) {
|
|
158
|
-
void oldValue;
|
|
159
|
-
void Checking<string, typeof newValue, Test.Pass>;
|
|
160
|
-
|
|
161
|
-
void Checking<string, typeof oldValue, Test.Pass>;
|
|
162
|
-
},
|
|
163
|
-
optional_objOrNull(newValue, oldValue) {
|
|
164
|
-
void oldValue;
|
|
165
|
-
void Checking<Mock_User | null, typeof newValue, Test.Pass>;
|
|
166
|
-
|
|
167
|
-
void Checking<Mock_User | null, typeof oldValue, Test.Pass>;
|
|
168
|
-
},
|
|
169
|
-
},
|
|
170
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Checking, type Test } from "hry-types";
|
|
2
|
-
import { RootComponent } from "../..";
|
|
3
|
-
/**
|
|
4
|
-
* watch 只能监控 注入的store字段
|
|
5
|
-
* 注入文件 https://github.com/missannil/annil/blob/main/src/api/InstanceInject/inject.ts
|
|
6
|
-
*/
|
|
7
|
-
RootComponent()({
|
|
8
|
-
watch: {
|
|
9
|
-
injectTheme(newValue, oldValue) {
|
|
10
|
-
void oldValue;
|
|
11
|
-
void Checking<"dark" | "light" | undefined, typeof newValue, Test.Pass>;
|
|
12
|
-
|
|
13
|
-
void Checking<"dark" | "light" | undefined, typeof oldValue, Test.Pass>;
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
});
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import type { DetailedType } from "../../../../types/DetailedType";
|
|
2
|
-
import { RootComponent } from "../..";
|
|
3
|
-
// 1 没有data可以watch 约束为EmptyObject
|
|
4
|
-
RootComponent()({
|
|
5
|
-
watch: {
|
|
6
|
-
// @ts-expect-error 无可监控字段时,约束为EmptyObject,即不可写任何字段
|
|
7
|
-
xxx() {
|
|
8
|
-
void 0;
|
|
9
|
-
},
|
|
10
|
-
},
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* 2 超出约束字段报错
|
|
15
|
-
*/
|
|
16
|
-
RootComponent()({
|
|
17
|
-
properties: {
|
|
18
|
-
num: Number,
|
|
19
|
-
},
|
|
20
|
-
data: {
|
|
21
|
-
str: "123",
|
|
22
|
-
},
|
|
23
|
-
computed: {
|
|
24
|
-
Cnum() {
|
|
25
|
-
return this.data.num;
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
watch: {
|
|
29
|
-
// @ts-expect-error otherFields不在约束字段(num,str,Cnum)中
|
|
30
|
-
otherFields() {
|
|
31
|
-
void 0;
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
});
|
|
35
|
-
/**
|
|
36
|
-
* 3 对象联合null的类型 不能watch子字段
|
|
37
|
-
*/
|
|
38
|
-
RootComponent()({
|
|
39
|
-
properties: {
|
|
40
|
-
user: Object as DetailedType<{ name: string; age: number } | null>,
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
watch: {
|
|
44
|
-
user(newValue, oldValue) {
|
|
45
|
-
void oldValue;
|
|
46
|
-
void newValue;
|
|
47
|
-
},
|
|
48
|
-
// @ts-expect-error 不能watch子字段 因为user可能为null
|
|
49
|
-
"user.name"(newValue, oldValue) {
|
|
50
|
-
void oldValue;
|
|
51
|
-
void newValue;
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
});
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import type { IfExtends } from "hry-types/src/Any/IfExtends";
|
|
2
|
-
import type { EmptyObject } from "hry-types/src/Misc/EmptyObject";
|
|
3
|
-
import type { Func } from "hry-types/src/Misc/Func";
|
|
4
|
-
import type { ComputeIntersection } from "hry-types/src/Object/_api";
|
|
5
|
-
import type { ComputeObject } from "../../types/ComputeObject";
|
|
6
|
-
import type { WMCompOtherOption } from "../../types/OfficialTypeAlias";
|
|
7
|
-
import type { RemoveNullOfRequired } from "../../types/RemoveNullOfRequired";
|
|
8
|
-
import type { ComponentDoc } from "../DefineComponent/returnType/ComponentDoc";
|
|
9
|
-
import type { IInjectStore } from "../InstanceInject/instanceConfig";
|
|
10
|
-
import type { ComputedConstraint } from "./Computed/ComputedConstraint";
|
|
11
|
-
import type { ComputedOption } from "./Computed/ComputedOption";
|
|
12
|
-
import type { GetComputedDef } from "./Computed/GetComputedDef";
|
|
13
|
-
import type { CustomEventConstraint } from "./CustomEvents/CustomEventConstraint";
|
|
14
|
-
import type { CustomEventsOption } from "./CustomEvents/CustomEventsOption";
|
|
15
|
-
import type { GetCustomEventsDef } from "./CustomEvents/GetCustomEventDef";
|
|
16
|
-
import type { DataOption } from "./Data/DataOption";
|
|
17
|
-
import type { EventsConstraint } from "./Events/EventsConstraint";
|
|
18
|
-
import type { EventsOption } from "./Events/EventsOption";
|
|
19
|
-
import type { RootComponentInstance } from "./Instance/RootComponentInstance";
|
|
20
|
-
import type { IsPageOption } from "./IsPage/IsPageOption";
|
|
21
|
-
import type { LifetimesOption } from "./Lifetimes/LifetimesOption";
|
|
22
|
-
import type { MethodsConstraint } from "./Methods/MethodsConstraint";
|
|
23
|
-
import type { MethodsOption } from "./Methods/MethodsOption";
|
|
24
|
-
import type { ObserversOption } from "./Observers/ObserversOption";
|
|
25
|
-
import type { PageLifetimesOption } from "./PageLifetimes/PageLifetimesOption";
|
|
26
|
-
import type { GetPropertiesDef } from "./Properties/GetPropertiesDef";
|
|
27
|
-
import type { PropertiesConstraint } from "./Properties/PropertiesConstraint";
|
|
28
|
-
import type { PropertiesOption } from "./Properties/PropertiesOption";
|
|
29
|
-
import type { GetStoreDef } from "./Store/GetStoreDef";
|
|
30
|
-
import type { StoreConstraint } from "./Store/StoreConstraint";
|
|
31
|
-
import type { StoreOption } from "./Store/StoreOption";
|
|
32
|
-
import type { WatchOption } from "./Watch/WatchOption";
|
|
33
|
-
|
|
34
|
-
type RootComponentOptions<
|
|
35
|
-
TEvents extends object,
|
|
36
|
-
TIsPage extends boolean,
|
|
37
|
-
TCustomEvents extends CustomEventConstraint,
|
|
38
|
-
TMethods extends MethodsConstraint,
|
|
39
|
-
TProperties extends PropertiesConstraint,
|
|
40
|
-
TData extends object,
|
|
41
|
-
TStore extends StoreConstraint,
|
|
42
|
-
TComputed extends Record<string, Func>,
|
|
43
|
-
EventsDef extends object,
|
|
44
|
-
CustomEventsDef extends object,
|
|
45
|
-
PropertiesDef extends object,
|
|
46
|
-
DataDef extends object,
|
|
47
|
-
StoreDef extends object,
|
|
48
|
-
ComputedDef extends object,
|
|
49
|
-
> =
|
|
50
|
-
& MethodsOption<TMethods, keyof (EventsDef & CustomEventsDef)>
|
|
51
|
-
& PropertiesOption<TProperties>
|
|
52
|
-
& IsPageOption<TIsPage>
|
|
53
|
-
& EventsOption<TEvents>
|
|
54
|
-
& IfExtends<TIsPage, false, CustomEventsOption<TCustomEvents, keyof EventsDef>, {}>
|
|
55
|
-
& DataOption<TData, keyof PropertiesDef>
|
|
56
|
-
& StoreOption<TStore, keyof (PropertiesDef & DataDef)>
|
|
57
|
-
& ComputedOption<
|
|
58
|
-
TComputed,
|
|
59
|
-
keyof (PropertiesDef & DataDef & StoreDef)
|
|
60
|
-
> // { data: ComputeObject<DataDef & Required<PropertiesDef> & StoreDef & ComputedDef & IInjectAllData> }
|
|
61
|
-
& PageLifetimesOption<TIsPage, PropertiesDef>
|
|
62
|
-
& LifetimesOption
|
|
63
|
-
& WatchOption<
|
|
64
|
-
& ComputedDef
|
|
65
|
-
& Required<PropertiesDef>
|
|
66
|
-
& DataDef
|
|
67
|
-
& StoreDef
|
|
68
|
-
& IInjectStore
|
|
69
|
-
>
|
|
70
|
-
& Partial<Omit<WMCompOtherOption, "pageLifetimes" | "definitionFilter" | "observers">>
|
|
71
|
-
& ObserversOption<
|
|
72
|
-
& ComputedDef
|
|
73
|
-
& Required<PropertiesDef>
|
|
74
|
-
& DataDef
|
|
75
|
-
& StoreDef
|
|
76
|
-
& IInjectStore
|
|
77
|
-
>
|
|
78
|
-
& ThisType<
|
|
79
|
-
RootComponentInstance<
|
|
80
|
-
TIsPage,
|
|
81
|
-
TMethods,
|
|
82
|
-
DataDef,
|
|
83
|
-
DataDef & Required<PropertiesDef> & StoreDef & ComputedDef,
|
|
84
|
-
CustomEventsDef,
|
|
85
|
-
StoreDef
|
|
86
|
-
>
|
|
87
|
-
>;
|
|
88
|
-
|
|
89
|
-
type RootComponentConstructor<TComponentDocList extends ComponentDoc[]> = <
|
|
90
|
-
TEvents extends EventsConstraint<TComponentDocList>,
|
|
91
|
-
TStore extends StoreConstraint<PropertiesDef>,
|
|
92
|
-
TIsPage extends boolean = false,
|
|
93
|
-
const TProperties extends PropertiesConstraint = {},
|
|
94
|
-
TData extends object = {},
|
|
95
|
-
TComputed extends ComputedConstraint = {},
|
|
96
|
-
// 页面时自定义事件无意义
|
|
97
|
-
TCustomEvents extends IfExtends<TIsPage, false, CustomEventConstraint, EmptyObject> = {},
|
|
98
|
-
TMethods extends MethodsConstraint = {},
|
|
99
|
-
EventsDef extends object = IfExtends<EventsConstraint<TComponentDocList>, TEvents, {}, TEvents>,
|
|
100
|
-
CustomEventsDef extends object = GetCustomEventsDef<TCustomEvents>,
|
|
101
|
-
PropertiesDef extends object = GetPropertiesDef<TProperties>,
|
|
102
|
-
DataDef extends object = TData,
|
|
103
|
-
StoreDef extends object = StoreConstraint<PropertiesDef> extends TStore ? {} : GetStoreDef<TStore>,
|
|
104
|
-
ComputedDef extends object = GetComputedDef<TComputed>,
|
|
105
|
-
>(
|
|
106
|
-
options: RootComponentOptions<
|
|
107
|
-
TEvents,
|
|
108
|
-
TIsPage,
|
|
109
|
-
TCustomEvents,
|
|
110
|
-
TMethods,
|
|
111
|
-
TProperties,
|
|
112
|
-
TData,
|
|
113
|
-
TStore,
|
|
114
|
-
TComputed,
|
|
115
|
-
// TObservers,
|
|
116
|
-
EventsDef,
|
|
117
|
-
CustomEventsDef,
|
|
118
|
-
PropertiesDef,
|
|
119
|
-
DataDef,
|
|
120
|
-
StoreDef,
|
|
121
|
-
ComputedDef
|
|
122
|
-
>,
|
|
123
|
-
) => // 生成RootComponentDefinition
|
|
124
|
-
ComputeIntersection<
|
|
125
|
-
& IfExtends<TIsPage, false, {}, { isPage: true }>
|
|
126
|
-
& IfExtends<
|
|
127
|
-
EmptyObject,
|
|
128
|
-
PropertiesDef,
|
|
129
|
-
{},
|
|
130
|
-
{ properties: IfExtends<false, TIsPage, PropertiesDef, RemoveNullOfRequired<PropertiesDef>> }
|
|
131
|
-
>
|
|
132
|
-
& IfExtends<EmptyObject, DataDef, {}, { data: DataDef }>
|
|
133
|
-
& IfExtends<EmptyObject, StoreDef, {}, { store: ComputeObject<StoreDef> }>
|
|
134
|
-
& IfExtends<EmptyObject, ComputedDef, {}, { computed: ComputedDef }>
|
|
135
|
-
& IfExtends<EmptyObject, TMethods, {}, { methods: TMethods }>
|
|
136
|
-
& IfExtends<EmptyObject, EventsDef, {}, { events: EventsDef }>
|
|
137
|
-
& IfExtends<EmptyObject, CustomEventsDef, {}, { customEvents: ComputeObject<CustomEventsDef> }>
|
|
138
|
-
>;
|
|
139
|
-
/**
|
|
140
|
-
* RootComponent API
|
|
141
|
-
* @returns RootComponentDefinition
|
|
142
|
-
*/
|
|
143
|
-
export function RootComponent<
|
|
144
|
-
// TComponentDocList泛型为了给events字段提供类型约束
|
|
145
|
-
TComponentDocList extends ComponentDoc[] = [],
|
|
146
|
-
>(): RootComponentConstructor<
|
|
147
|
-
TComponentDocList
|
|
148
|
-
> {
|
|
149
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
150
|
-
return (options: any) => options;
|
|
151
|
-
}
|