I'm developing a program that requires importing multiple functions from a separate file and executing them all to add their return values to an expected output or data transformation. It's part of a larger project where I need these functions to seamlessly integrate without modifying the core library code.
For instance:
export function func1() : any {
return {test1: "test1"}
}
export function func2() : any {
return {test2: "test2"}
}
export function func3() : any {
return {test3: "test3"}
}
Relevant Functions in Separate File
import * as val_funcs from "path/to/val_func/file"
function get_val_list() : any {
// Need to iterate through each function in val_funcs
// Executing each one, collecting the value, then returning it
}
I'm uncertain about how to achieve this task or what specific keywords to search for answers. Despite trying different search queries like "how to run each function in a list in TypeScript", I haven't found a useful solution yet.