From 8ac0c6d3dd1e0d518f0dd4e63dedff3fdcdf5a5f Mon Sep 17 00:00:00 2001 From: Joeri Exelmans Date: Wed, 2 Apr 2025 15:57:16 +0200 Subject: [PATCH] show generic functions also --- scripts/main.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/scripts/main.js b/scripts/main.js index ef3a6ab..597ebe7 100644 --- a/scripts/main.js +++ b/scripts/main.js @@ -123,15 +123,8 @@ async function listAllFunctions() { message: "select function:", choices: [ "(go back)", - ...[...ctx.types.m.entries()] - .filter(([i, types]) => { - for (const type of types) { - if (isFunction(type)) - return true; - } - return false; - }) - .flatMap(toChoices), + ...ctx.functions.flatMap(({fn, type}) => toChoices([fn, [type]])), + ...ctx.genericFunctions.flatMap(({fn, genericType}) => toChoices([fn, [genericType]])), ], }); if (choice === "(go back)") {