image-helldivers2
Version:
This package contains a curated collection of images from Helldivers 2 by Arrowhead Game Studios. If any images are used inappropriately, please contact me for their immediate removal. Contributions to this repository are welcome!
93 lines • 2.73 kB
TypeScript
export type ImageMetadata = {
/**
* - The name of the image file
*/
filename: string;
/**
* - User-defined label for the image
*/
label: string;
/**
* - Array of tag names associated with the image
*/
tags: string[];
};
export type Tag = {
/**
* - The name of the tag (used as identifier)
*/
name: string;
/**
* - The display title of the tag
*/
title: string;
/**
* - User-defined description of the tag
*/
description: string;
};
export type TagConfig = {
/**
* - Tags related to the subject of the image
*/
subject: Tag[];
/**
* - Tags related to the version of the image set
*/
version: Tag[];
/**
* - General tags and newly added tags
*/
general: Tag[];
};
/**
* @typedef {Object} ImageMetadata
* @property {string} filename - The name of the image file
* @property {string} label - User-defined label for the image
* @property {string[]} tags - Array of tag names associated with the image
*/
/**
* @typedef {Object} Tag
* @property {string} name - The name of the tag (used as identifier)
* @property {string} title - The display title of the tag
* @property {string} description - User-defined description of the tag
*/
/**
* @typedef {Object} TagConfig
* @property {Tag[]} subject - Tags related to the subject of the image
* @property {Tag[]} version - Tags related to the version of the image set
* @property {Tag[]} general - General tags and newly added tags
*/
/**
* Recursively gets a list of image files in the given directory.
* @param {string} [dir] - The directory to search (defaults to imageSetDir).
* @returns {string[]} An array of relative file paths.
*/
export function getImageList(dir?: string | undefined): string[];
/**
* Gets the name of the image set.
* @returns {string} The name of the image set.
*/
export function getImageSetName(): string;
/**
* Gets the metadata for all images.
* @returns {ImageMetadata[]} An array of image metadata objects.
*/
export function getImageMetadata(): ImageMetadata[];
/**
* Gets the tag configuration.
* @returns {TagConfig} The tag configuration object.
*/
export function getTagConfig(): TagConfig;
/**
* Gets all available tags across all categories.
* @returns {Tag[]} An array of all tags.
*/
export function getAllTags(): Tag[];
/**
* Gets metadata for a specific image.
* @param {string} imagePath - The relative path of the image.
* @returns {ImageMetadata|undefined} The metadata for the specified image, or undefined if not found.
*/
export function getImageMetadataByPath(imagePath: string): ImageMetadata | undefined;
//# sourceMappingURL=index.d.ts.map