Skip to content

Commit 58185f1

Browse files
docs(metadata): document getAvailableFunctions/getFunctionDetails (HF-249)
Add a CHANGELOG entry for the new built-in function metadata API, and a "Function metadata" section to the custom functions guide clarifying that the catalogue covers built-ins only — custom functions are absent from getAvailableFunctions() and getFunctionDetails() returns undefined for them.
1 parent ba34e55 commit 58185f1

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
99

1010
### Added
1111

12+
- Added the `getAvailableFunctions()` and `getFunctionDetails()` methods (both static and instance) for retrieving built-in function metadata: category, translated name, short description, generated syntax, and parameters.
1213
- Added an Indonesian (Bahasa Indonesia) language pack. [#1674](https://github.com/handsontable/hyperformula/pull/1674)
1314

1415
## [3.3.0] - 2026-05-20

docs/guide/custom-functions.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,3 +538,29 @@ MyCustomPlugin.translations = {
538538
};
539539
```
540540
:::
541+
542+
## Function metadata
543+
544+
HyperFormula ships metadata for its built-in functions (category, translated
545+
name, short description, syntax, and parameters). You can retrieve it with the
546+
`getAvailableFunctions()` and `getFunctionDetails()` methods, available both as
547+
static methods and as instance methods:
548+
549+
```js
550+
// a short list of all built-in functions, with names translated for a language
551+
const functions = HyperFormula.getAvailableFunctions('enGB');
552+
553+
// the full details of a single built-in function
554+
const sumDetails = HyperFormula.getFunctionDetails('SUM', 'enGB');
555+
```
556+
557+
This metadata covers **built-in functions only**. Custom functions are not
558+
included: they don't appear in the `getAvailableFunctions()` list, and
559+
`getFunctionDetails()` returns `undefined` for them.
560+
561+
```js
562+
HyperFormula.registerFunctionPlugin(MyCustomPlugin, MyCustomPlugin.translations);
563+
564+
// a custom function is not part of the built-in metadata
565+
const details = HyperFormula.getFunctionDetails('MY_FUNCTION', 'enGB'); // undefined
566+
```

0 commit comments

Comments
 (0)