show generic functions also

This commit is contained in:
Joeri Exelmans 2025-04-02 15:57:16 +02:00
parent 4a4983f693
commit 8ac0c6d3dd

View file

@ -123,15 +123,8 @@ async function listAllFunctions() {
message: "select function:", message: "select function:",
choices: [ choices: [
"(go back)", "(go back)",
...[...ctx.types.m.entries()] ...ctx.functions.flatMap(({fn, type}) => toChoices([fn, [type]])),
.filter(([i, types]) => { ...ctx.genericFunctions.flatMap(({fn, genericType}) => toChoices([fn, [genericType]])),
for (const type of types) {
if (isFunction(type))
return true;
}
return false;
})
.flatMap(toChoices),
], ],
}); });
if (choice === "(go back)") { if (choice === "(go back)") {