Type Reference(类型总览)
本页先给出“高频类型速查”,然后提供 wevu 当前导出的接口/类型别名全量索引。
1. 高频类型速查
| 类型 | 链接 | 说明 |
|---|---|---|
SetupContext | /wevu/api/index/interfaces/SetupContext | setup(props, ctx) 的上下文类型。 |
RuntimeInstance | /wevu/api/index/interfaces/RuntimeInstance | 运行时实例,含 snapshot/watch/bindModel 等能力。 |
ComponentDefinition | /wevu/api/index/interfaces/ComponentDefinition | 小程序组件定义结构。 |
DefineComponentOptions | /wevu/api/index/interfaces/DefineComponentOptions | defineComponent 参数类型。 |
CreateAppOptions | /wevu/api/index/interfaces/CreateAppOptions | createApp 参数类型。 |
DefineStoreOptions | /wevu/api/index/interfaces/DefineStoreOptions | defineStore 参数类型。 |
WatchOptions | /wevu/api/index/interfaces/WatchOptions | watch/watchEffect 配置。 |
ModelBinding | /wevu/api/index/interfaces/ModelBinding | bindModel/useModel 绑定结果。 |
TriggerEventOptions | /wevu/api/index/type-aliases/TriggerEventOptions | emit/triggerEvent 选项类型。 |
WevuDefaults | /wevu/api/index/interfaces/WevuDefaults | setWevuDefaults 配置结构。 |
MiniProgramInstance | /wevu/api/index/type-aliases/MiniProgramInstance | setup 中原生实例类型。 |
WevuPlugin | /wevu/api/index/type-aliases/WevuPlugin | 插件函数类型。 |
2. 接口(Interfaces)全量索引
| 接口 | 领域 |
|---|---|
ActionSubscriber | Store/action 订阅 |
AppConfig | App 配置 |
ComponentDefinition | 组件定义 |
ComputedRef | 只读 computed |
CreateAppOptions | createApp 参数 |
DefineAppOptions | App 定义参数 |
DefineComponentOptions | defineComponent 参数 |
DefineStoreOptions | defineStore 参数 |
EffectScope | effect 作用域 |
GlobalComponents | 全局组件扩展 |
GlobalDirectives | 全局指令扩展 |
InternalRuntimeStateFields | 运行时内部状态 |
MiniProgramAdapter | 平台适配器 |
MiniProgramComponentOptions | 小程序组件配置 |
ModelBinding | 双向绑定结果 |
ModelBindingOptions | 双向绑定选项 |
MutationRecord | mutation 记录 |
PageFeatures | 页面 feature 开关 |
PrelinkReactiveTreeOptions | reactive 预链接选项 |
PropOptions | prop 选项 |
RuntimeApp | App 运行时实例 |
RuntimeInstance | 页面/组件运行时实例 |
SetDataDebugInfo | setData 调试信息 |
SetDataSnapshotOptions | setData 快照选项 |
SetupContext | setup 上下文 |
StoreManager | store 管理器 |
SubscriptionCallback | 订阅回调 |
TemplateRefs | 模板 ref 集合 |
TemplateRefValue | 模板 ref 值类型 |
WatchOptions | watch 配置 |
WevuDefaults | 全局默认值配置 |
WevuGlobalComponents | wevu 全局组件 |
WevuGlobalDirectives | wevu 全局指令 |
WritableComputedOptions | 可写 computed 配置 |
WritableComputedRef | 可写 computed 引用 |
3. 类型别名(Type Aliases)全量索引
3.1 组件、Props、宏相关
| 类型别名 | 说明 |
|---|---|
AllowedComponentProps | 允许透传的组件属性 |
ComponentCustomProps | 自定义组件属性扩展 |
ComponentOptionsMixin | 组件选项 mixin |
ComponentPropsOptions | props 选项定义 |
ComponentPublicInstance | 公共实例类型 |
DefineComponent | defineComponent 类型签名 |
EmitsOptions | emits 配置类型 |
ExtractDefaultPropTypes | 默认值推断 |
ExtractPropTypes | props 推断结果 |
ExtractPublicPropTypes | 对外 props 推断 |
InferPropType | 单个 prop 类型推断 |
InferProps | props 对象推断 |
PropConstructor | prop 构造器类型 |
PropType | prop 类型声明 |
PublicProps | 公共 props 合集 |
SetupFunction | setup 函数签名 |
TriggerEventOptions | triggerEvent 选项 |
VNode | VNode 兼容类型 |
VNodeProps | VNode props 兼容类型 |
3.2 响应式与工具类型
| 类型别名 | 说明 |
|---|---|
ComputedDefinitions | computed 定义集合 |
ComputedGetter | computed getter |
ComputedSetter | computed setter |
ExtractComputed | 提取 computed 返回值 |
ExtractMethods | 提取 methods 返回值 |
MaybeRef | 值或 Ref |
MaybeRefOrGetter | 值或 Ref 或 getter |
MethodDefinitions | methods 定义集合 |
Ref | Ref 类型 |
ShallowRef | ShallowRef 类型 |
ShallowUnwrapRef | shallow 解包类型 |
ToRefs | toRefs 返回类型 |
WatchStopHandle | watch 停止句柄 |
3.3 小程序桥接与运行时内部
| 类型别名 | 说明 |
|---|---|
InternalRuntimeState | 运行时内部状态 |
MiniProgramAppOptions | App 原生配置 |
MiniProgramBehaviorIdentifier | Behavior 标识符 |
MiniProgramComponentBehaviorOptions | 组件 behavior 配置 |
MiniProgramComponentRawOptions | 组件原始配置 |
MiniProgramInstance | 原生组件/页面实例 |
MiniProgramPageLifetimes | 页面生命周期类型 |
ObjectDirective | 指令对象类型 |
TemplateRef | 模板 ref 类型 |
3.4 store / model / mutation
| 类型别名 | 说明 |
|---|---|
ModelBindingPayload | model 绑定 payload |
MutationKind | mutation 种类 |
MutationOp | mutation 操作 |
MutationType | mutation 类型 |
WevuPlugin | 插件类型 |
4. 编译侧类型(wevu/compiler)
| 类型别名 | 链接 | 说明 |
|---|---|---|
WevuRuntimeApiName | /wevu/api/compiler/type-aliases/WevuRuntimeApiName | 编译器识别的运行时 API 名字联合。 |
WevuPageHookName | /wevu/api/compiler/type-aliases/WevuPageHookName | 页面 hook 名字联合。 |
WevuPageFeatureFlag | /wevu/api/compiler/type-aliases/WevuPageFeatureFlag | 页面 feature 开关联合。 |
5. 相关页
- Core API:/wevu/api-reference/core
- Reactivity API:/wevu/api-reference/reactivity
- Runtime Bridge API:/wevu/api-reference/runtime-bridge