Files
NapCatQQ/.pnpm-store/v3/files/5f/fe5c6b2bb806a780adf30cbe59bd2e7d70bf252954ad0db344070879099e98dee58117462d5796b232c39b929dea71605c7d243b17ad8aaee7b197133fadbb
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

33 lines
1.2 KiB
Plaintext

import type { Static } from '../../type/static/index.mjs';
import { TypeBoxError } from '../../type/error/index.mjs';
import { type TLiteral } from '../../type/literal/index.mjs';
import { type TObject } from '../../type/object/index.mjs';
import { type TString } from '../../type/string/index.mjs';
import { type TUnknown } from '../../type/unknown/index.mjs';
import { type TUnion } from '../../type/union/index.mjs';
export type Insert = Static<typeof Insert>;
export declare const Insert: TObject<{
type: TLiteral<'insert'>;
path: TString;
value: TUnknown;
}>;
export type Update = Static<typeof Update>;
export declare const Update: TObject<{
type: TLiteral<'update'>;
path: TString;
value: TUnknown;
}>;
export type Delete = Static<typeof Delete>;
export declare const Delete: TObject<{
type: TLiteral<'delete'>;
path: TString;
}>;
export type Edit = Static<typeof Edit>;
export declare const Edit: TUnion<[typeof Insert, typeof Update, typeof Delete]>;
export declare class ValueDiffError extends TypeBoxError {
readonly value: unknown;
constructor(value: unknown, message: string);
}
export declare function Diff(current: unknown, next: unknown): Edit[];
export declare function Patch<T = any>(current: unknown, edits: Edit[]): T;