/
Alex_Ural
/
opencode
Обзор
Документация
Войти
/
Alex_Ural
/
opencode
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
packages/schema/src/revert.ts
24 строки
880 B
Kit Langton
refactor(schema): tighten public contracts (#33771)
25 июн 2026, 20:10
Не верифицирован
25 июн 2026, 20:10
9e9d405
Код
Авторство
О чём код?
export * as Revert from "./revert" import { Schema } from "effect" import { optional } from "./schema" import { NonNegativeInt, RelativePath } from "./schema" import { SessionMessage } from "./session-message" export const FileDiff = Schema.Struct({ path: RelativePath, status: Schema.Literals(["added", "modified", "deleted"]), additions: NonNegativeInt, deletions: NonNegativeInt, patch: Schema.String, }).annotate({ identifier: "File.Diff" }) export interface FileDiff extends Schema.Schema.Type<typeof FileDiff> {} export const State = Schema.Struct({ messageID: SessionMessage.ID, partID: Schema.String.pipe(optional), snapshot: Schema.String.pipe(optional), diff: Schema.String.pipe(optional), files: Schema.Array(FileDiff).pipe(optional), }).annotate({ identifier: "Revert.State" }) export interface State extends Schema.Schema.Type<typeof State> {}