Files
2026Technology-Competition/docs/superpowers/specs/implementation-steps/02-phase2.1-adapter-interface.md
T

35 lines
710 B
Markdown

# Step 02 — Phase 2.1: 适配器接口
**依赖**: Step 01
**参考设计**: §3.2
## 目标
`LinterAdapter` 接口从 `types.ts` 精化到适配器模块中,作为所有适配器的统一接口。
## 新建文件
| # | 文件 | 说明 |
|---|------|------|
| 1 | `src/adapters/adapter.ts` | 重新导出/精化 LinterAdapter 接口 |
---
## `src/adapters/adapter.ts`
```typescript
import { LinterAdapter } from '../types';
export type { LinterAdapter };
export type { LinterDiagnostic, AdapterResult, AdapterStatus } from '../types';
```
> 如果后续适配器需要额外的共享类型,在此文件中扩展。
---
## 验收
- [ ] 文件创建完成
- [ ] `npm run compile` 通过