UNPKG

taglib-wasm

Version:

TagLib-Wasm is the universal tagging library for TypeScript/JavaScript platforms: Browsers, Node.js, Deno, Bun, Cloudflare Workers, and Electron apps

26 lines 1.39 kB
/** * Single registry of "extra" editable state (everything beyond basic tags and * the text PropertyMap) that must survive a file reconstruct in * {@link saveViaFreshHandle}. Adding a new metadata kind is ONE entry here; the * `extra-state-registry.test.ts` coverage check fails CI if a passthrough field * is added without a registry entry, so a field can no longer be silently * dropped on save (the taglib-upg class of bug). */ import type { FileHandle } from "../wasm.js"; type ExtraField = { /** Stable name, used by the test-net coverage check. */ readonly name: string; /** * Copy this field from `source` onto `target`. `sourceComplete` is true when * `source` holds the file's full state (WASI save-as): empty/absent means * "explicitly cleared" and is propagated. It is false for partial loads, * where empty may just mean "not read from the truncated middle" — those are * skipped so the freshly-reloaded full handle keeps its originals. */ copy(target: FileHandle, source: FileHandle, sourceComplete: boolean): void; }; export declare const EXTRA_FIELDS: readonly ExtraField[]; /** Copy every registered extra-state field from `source` onto `target`. */ export declare function copyExtraState(target: FileHandle, source: FileHandle, sourceComplete: boolean): void; export {}; //# sourceMappingURL=extra-state-registry.d.ts.map