UNPKG

hyperformula

Version:

HyperFormula is a JavaScript engine for efficient processing of spreadsheet-like data and formulas

44 lines (43 loc) 1.81 kB
/** * @license * Copyright (c) 2025 Handsoncode. All rights reserved. */ import { SearchOptions, SearchStrategy } from '../../Lookup/SearchStrategy'; import { ProcedureAst } from '../../parser'; import { InterpreterState } from '../InterpreterState'; import { InterpreterValue, RawNoErrorScalarValue } from '../InterpreterValue'; import { SimpleRangeValue } from '../../SimpleRangeValue'; import { FunctionPlugin, FunctionPluginTypecheck, ImplementedFunctions } from './FunctionPlugin'; import { ArraySize } from '../../ArraySize'; export declare class LookupPlugin extends FunctionPlugin implements FunctionPluginTypecheck<LookupPlugin> { static implementedFunctions: ImplementedFunctions; private rowSearch; /** * Corresponds to VLOOKUP(key, range, index, [sorted]) * * @param ast * @param state */ vlookup(ast: ProcedureAst, state: InterpreterState): InterpreterValue; /** * Corresponds to HLOOKUP(key, range, index, [sorted]) * * @param ast * @param state */ hlookup(ast: ProcedureAst, state: InterpreterState): InterpreterValue; /** * Corresponds to XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode]) * * @param ast * @param state */ xlookup(ast: ProcedureAst, state: InterpreterState): InterpreterValue; xlookupArraySize(ast: ProcedureAst): ArraySize; match(ast: ProcedureAst, state: InterpreterState): InterpreterValue; protected searchInRange(key: RawNoErrorScalarValue, range: SimpleRangeValue, isWildcardMatchMode: boolean, searchOptions: SearchOptions, searchStrategy: SearchStrategy): number; private doVlookup; private doHlookup; private doXlookup; private doMatch; }