I am a super newbie to Typescript so sorry for a dumb question...
I want to write a function that takes arguments like below
export const AutoComplete = async (
str: string,
functionList?: GetAllFunctions()
) => {
}
GetAllFunctions() is something that returns an array and need to be the default for functionList but I could also do something like
AutoComplete ('foo', ['foo', 'bar'...])
What would be the correct way to do that