网页 综合 更新时间 2026-11-13 17:00:02

Utility Types | Vue.js

自动蜘蛛 vuejs.org 正文约 2142 字
Utility Types | Vue.js
Reactivity: Utilities
Reactivity: Advanced
Dependency Injection
Options: Composition
Syntax Specification
Server-Side Rendering
TypeScript Utility Types
This page only lists a few commonly used utility types that may need explanation for their usage. For a full list of exported types, consult the source code.
Used to annotate a prop with more advanced types when using runtime props declarations.
See also Guide - Typing Component Props
Alias for T | Ref<T>. Useful for annotating arguments of Composables.
Alias for T | Ref<T> | (() => T). Useful for annotating arguments of Composables.
Extract prop types from a runtime props options object. The extracted types are internal facing - i.e. the resolved props received by the component. This means boolean props and props with default values are always defined, even if they are not required.
To extract public facing props, i.e. props that the parent is allowed to pass, use ExtractPublicPropTypes.
Extract prop types from a runtime props options object. The extracted types are public facing - i.e. the props that the parent is allowed to pass.
Used to augment the component instance type to support custom global properties.
Augmentations must be placed in a module .ts or .d.ts file. See Type Augmentation Placement for more details.
See also Guide - Augmenting Global Properties
Used to augment the component options type to support custom options.
Augmentations must be placed in a module .ts or .d.ts file. See Type Augmentation Placement for more details.
See also Guide - Augmenting Custom Options
Used to augment allowed TSX props in order to use non-declared props on TSX elements.
Augmentations must be placed in a module .ts or .d.ts file. See Type Augmentation Placement for more details.
Used to augment allowed values in style property bindings.
Allow any custom CSS property
Augmentations must be placed in a module .ts or .d.ts file. See Type Augmentation Placement for more details.
SFC <style> tags support linking CSS values to dynamic component state using the v-bind CSS function. This allows for custom properties without type augmentation.
Edit this page on GitHub
访问原文 返回搜索 https://vuejs.org/api/utility-types
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。