regle-typescript

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Regle TypeScript

Regle TypeScript

Regle provides first-class TypeScript support with full type inference. This skill covers type-safe validation output, typing rules schemas, and typing component props.
Regle提供一流的TypeScript支持,具备完整的类型推断能力。本技能涵盖类型安全的验证输出、规则模式类型定义以及组件属性类型定义。

Key Exports

核心导出项

ExportPackagePurpose
InferInput
@regle/core
Infer state type from rules
InferSafeOutput
@regle/core
Infer validated output type from
r$
inferRules
@regle/core
Preserve autocompletion in computed rules
RegleComputedRules
@regle/core
Type helper for explicit rule typing
InferRegleRoot
@regle/core
Extract
r$
type from a composable
RegleFieldStatus
@regle/core
Type for a single field status prop
导出项用途
InferInput
@regle/core
从规则中推断状态类型
InferSafeOutput
@regle/core
r$
中推断验证输出类型
inferRules
@regle/core
在计算规则中保留自动补全功能
RegleComputedRules
@regle/core
用于显式规则类型定义的类型助手
InferRegleRoot
@regle/core
从组合式函数中提取
r$
类型
RegleFieldStatus
@regle/core
单个字段状态属性的类型

References

参考资料

TopicDescriptionReference
Type Safe Output
$validate
return types,
InferSafeOutput
typescript-type-safe-output
Typing Rules
inferRules
,
RegleComputedRules
, nested properties
typescript-typing-rules
Typing Props
InferRegleRoot
,
RegleFieldStatus
, typing component props
typescript-typing-props
主题描述参考链接
类型安全输出
$validate
返回类型、
InferSafeOutput
typescript-type-safe-output
规则类型定义
inferRules
RegleComputedRules
、嵌套属性
typescript-typing-rules
属性类型定义
InferRegleRoot
RegleFieldStatus
、组件属性类型定义
typescript-typing-props