how Geany classifies constructions?
The classification is in the ctags parsers, and the ctags kinds are mapped by Geany [here](https://github.com/geany/geany/blob/90c6096ed6ea167f9100ce8f74229a3f47acc29a...)
Quite specifically in JavaScript,
which seems to be the problem, there is no Javascript case in the switch linked above, so it falls through to the somewhat random default. Well I guess it was good enough that whoever added the Javascript type didn't bother to change it, but clearly not perfect.
Anyway, if somebody with both JS and C knowledge wanted to contribute a pull request with a more specific mapping it would probably be accepted.