show generic functions also
This commit is contained in:
parent
4a4983f693
commit
8ac0c6d3dd
1 changed files with 2 additions and 9 deletions
|
|
@ -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)") {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue