最终稳定性与打磨
用于生产就绪的最终稳定性改进和打磨。
StabilityReport
所有类型稳定性的综合报告。
typescript
import type { StabilityReport } from 'uni-types'
type Report = StabilityReport<{
version: '1.13.0'
totalTypes: 2500
stableTypes: 2450
betaTypes: 30
experimentalTypes: 20
overallStability: 'production-ready'
typeCoverage: 99.5
testPassRate: 100
}>StabilityLevel
定义类型的稳定性分类。
typescript
import type { StabilityLevel } from 'uni-types'
type Stable = StabilityLevel<'stable'>
type Beta = StabilityLevel<'beta'>
type Experimental = StabilityLevel<'experimental'>
type Deprecated = StabilityLevel<'deprecated'>
type Alpha = StabilityLevel<'alpha'>PolishResult
对类型应用最终打磨的结果。
typescript
import type { PolishResult } from 'uni-types'
type Result = PolishResult<{
originalType: { a?: string | null; b: number | undefined }
polishedType: { a: string; b: number }
changes: ['stripped nullish', 'made required', 'simplified union']
improvements: 3
backwardsCompatible: true
}>RegressionTest
类型级回归测试定义。
typescript
import type { RegressionTest } from 'uni-types'
type Test = RegressionTest<{
name: 'DeepPartial-nested-arrays'
input: { a: { b: string[] } }
expected: { a?: { b?: string[] } }
version: '1.13.0'
status: 'passing'
lastRun: string
}>EdgeCase
记录和处理类型行为中的边界情况。
typescript
import type { EdgeCase } from 'uni-types'
type Case = EdgeCase<{
name: 'DeepPartial-with-never'
input: never
expected: never
handled: true
documented: true
test: 'passing'
}>TypeAudit
类型质量和一致性的审计结果。
typescript
import type { TypeAudit } from 'uni-types'
type Audit = TypeAudit<{
version: '1.13.0'
auditedTypes: 2500
issues: 0
warnings: 5
suggestions: 12
consistencyScore: 98
namingConventions: 'consistent'
documentationCoverage: 95
}>ProductionReadiness
生产就绪的最终评估。
typescript
import type { ProductionReadiness } from 'uni-types'
type Ready = ProductionReadiness<{
version: '1.13.0'
criteria: {
typeSafety: 'passed'
performance: 'passed'
documentation: 'passed'
testing: 'passed'
migration: 'passed'
betaFeedback: 'passed'
}
overallStatus: 'ready'
recommended: true
}>QualityScore
跨多个维度的综合质量评分。
typescript
import type { QualityScore } from 'uni-types'
type Score = QualityScore<{
typeSafety: 99
performance: 95
documentation: 95
testing: 98
developerExperience: 97
compatibility: 100
overall: 97
}>