Files
NapCatQQ/.pnpm-store/v3/files/bc/097f2975b00a1d22217f6eddbd7dbbb5a27ca0177e4fde3ea1db3d8bcabf21918d85029827defdf34bd27a568f84b74ae3acce426018b93ff6f135b473eee8
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';
import { TypeBoxError } from '../../type/error/index';
import { type TLiteral } from '../../type/literal/index';
import { type TObject } from '../../type/object/index';
import { type TString } from '../../type/string/index';
import { type TUnknown } from '../../type/unknown/index';
import { type TUnion } from '../../type/union/index';
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;