poe-i18n
Version:
i18n utility for Path of Exile
31 lines (30 loc) • 960 B
TypeScript
import { Stat } from '../translate';
import { StatLocaleDatas } from '../types/StatDescription';
export declare type Options = {
datas: StatLocaleDatas;
start_file: string;
};
/**
* finds every stat or list of stats that could produce this text with its values
*
* use {textToStatsSingle} if you just want the first match
* use {textToStatsArray} if you want the generator values as an array
*
* @param text the stat text
* @param options see type definition
*/
export default function textToStats(text: string, options?: Partial<Options>): IterableIterator<Stat[]>;
/**
* @see {textToStats} as array
*
* @param text
* @param options
*/
export declare function textToStatsArray(text: string, options?: Partial<Options>): Stat[][];
/**
* only first match of @see {textToStats} but throws if none was found
*
* @param text
* @param options
*/
export declare function textToStatsFirst(text: string, options?: Partial<Options>): Stat[];