UNPKG

typerinth

Version:

A TypeScript library for interacting with the Modrinth API.

35 lines (34 loc) 935 B
import { FacetType } from "../enums/facets/FacetType"; import { FacetOperation } from "../enums/facets/FacetOperation"; export default class Facet { private type; private operation; private value; /** * Creates a new Facet * @param type The type of the facet * @param operation The operation of the facet * @param value The value of the facet */ constructor(type: FacetType, operation: FacetOperation, value: string); /** * Gets the type of the facet * @returns The type of the facet */ getType(): FacetType; /** * Gets the operation of the facet * @returns The operation of the facet */ getOperation(): FacetOperation; /** * Gets the value of the facet * @returns The value of the facet */ getValue(): string; /** * Stringifies the facet * @returns The stringified facet */ stringify(): string; }