UNPKG

igir

Version:

🕹 A zero-setup ROM collection manager that sorts, filters, extracts or archives, patches, and reports on collections of any size on any OS.

65 lines (64 loc) • 1.92 kB
import Archive from '../files/archives/archive.js'; import ArchiveEntry from '../files/archives/archiveEntry.js'; import File from '../files/file.js'; import { ChecksumProps } from '../files/fileChecksums.js'; type ROMStatus = 'baddump' | 'nodump' | 'good'; export interface ROMProps extends ChecksumProps { readonly name: string; readonly size: number; readonly status?: ROMStatus; readonly merge?: string; readonly bios?: string; } /** * @see http://www.logiqx.com/DatFAQs/CMPro.php */ export default class ROM implements ROMProps { readonly name: string; readonly size: number; readonly crc32?: string; readonly md5?: string; readonly sha1?: string; readonly sha256?: string; readonly status?: ROMStatus; readonly merge?: string; readonly bios?: string; constructor(props?: ROMProps); /** * Create an XML object, to be used by the owning {@link Game}. */ toXmlDatObj(): object; getName(): string; getSize(): number; getCrc32(): string | undefined; getMd5(): string | undefined; getSha1(): string | undefined; getSha256(): string | undefined; getStatus(): ROMStatus | undefined; getMerge(): string | undefined; getBios(): string | undefined; /** * Return a new copy of this {@link ROM} with a different name. */ withName(name: string): ROM; /** * Turn this {@link ROM} into a non-existent {@link File}. */ toFile(): Promise<File>; /** * Turn this {@link ROM} into a non-existent {@link ArchiveEntry}, given a {@link Archive}. */ toArchiveEntry<A extends Archive>(archive: A): Promise<ArchiveEntry<A>>; /** **************************** * * Pseudo Built-Ins * * **************************** */ /** * A string hash code to uniquely identify this {@link ROM}. */ hashCode(): string; } export {};