image-in-browser
Version:
Package for encoding / decoding images, transforming images, applying filters, drawing primitives on images on the client side (no need for server Node.js)
65 lines (64 loc) • 2.17 kB
TypeScript
/** @format */
import { IfdDirectory } from './ifd-directory.js';
/**
* Represents a container for IFD directories.
*/
export declare class IfdContainer {
/**
* A map of directory names to IfdDirectory objects.
*/
protected directories: Map<string, IfdDirectory>;
/**
* Gets an iterator for the keys in the directories map.
*/
get keys(): IterableIterator<string>;
/**
* Gets an iterator for the values in the directories map.
*/
get values(): IterableIterator<IfdDirectory>;
/**
* Gets an iterator for the entries in the directories map.
*/
get entries(): IterableIterator<[string, IfdDirectory]>;
/**
* Gets the number of entries in the directories map.
*/
get size(): number;
/**
* Checks if the directories map is empty.
*/
get isEmpty(): boolean;
/**
* Constructs an IfdContainer.
* @param {Map<string, IfdDirectory>} [directories] - An optional map of directory names to IfdDirectory objects.
*/
constructor(directories?: Map<string, IfdDirectory>);
/**
* Creates a new IfdContainer from an existing one.
* @param {IfdContainer} other - The existing IfdContainer to copy.
* @returns {IfdContainer} A new IfdContainer instance.
*/
static from(other: IfdContainer): IfdContainer;
/**
* Checks if a directory with the given key exists.
* @param {string} key - The key to check for.
* @returns {boolean} True if the key exists, false otherwise.
*/
has(key: string): boolean;
/**
* Gets the IfdDirectory for the given name, creating it if it doesn't exist.
* @param {string} ifdName - The name of the directory to get.
* @returns {IfdDirectory} The IfdDirectory for the given name.
*/
get(ifdName: string): IfdDirectory;
/**
* Sets the IfdDirectory for the given name.
* @param {string} ifdName - The name of the directory to set.
* @param {IfdDirectory} value - The IfdDirectory to set.
*/
set(ifdName: string, value: IfdDirectory): void;
/**
* Clears all entries in the directories map.
*/
clear(): void;
}