/** * @license * Copyright (c) 2025 Handsoncode. All rights reserved. */ import { StructuralMetadata } from './buildFunctionDescriptions'; /** * Authored structural metadata (parameter optionality, `repeatLastArgs`) for the protected built-in functions * (`FunctionRegistry._protectedPlugins`), keyed by canonical id. * * Protected ids are not registered as ordinary plugins, so they carry no `implementedFunctions` entry for * {@link HyperFormula.resolveFunctionMetadata} to read arity/optionality from: * - `OFFSET` is transformed at parse time into a cell/range reference and has no plugin at all. * - `VERSION` has a plugin (`VersionPlugin`), but it is deliberately excluded from the general registry so it can * never be unregistered; reusing its `implementedFunctions` entry would require importing the protected plugin * into the metadata builders, which this module avoids. * * Each entry's `parameters.length` SHOULD equal the corresponding `FunctionDoc.parameters.length` in `FUNCTION_DOCS`. * A protected id degrades exactly as a plugin-backed one does when the two disagree: this map wins, and * `getFunctionDetails` reports these parameters under positional names (`Arg1`, `Arg2`, ...) with a console warning, * losing the catalogue's authored names and descriptions. The function itself stays available in both tiers, so keep * the invariant true by hand when editing either map to keep the descriptions. * * Deliberately prototype-less, exactly like `FUNCTION_DOCS`. `HyperFormula.resolveFunctionMetadata` indexes this map * with a caller-supplied function id, and with `Object.prototype` in the chain * `PROTECTED_FUNCTION_METADATA['toString']` resolves to a function rather than `undefined`. The * `FunctionRegistry.functionIsProtected` guard (a `Map` lookup) short-circuits before that read today, so this is * hardening rather than a live bug — but it keeps the invariant local to the map instead of resting on the order of * the caller's conditions, and makes every lookup here answer only for authored ids. */ export declare const PROTECTED_FUNCTION_METADATA: Record;