correct types for this function?
How would you correctly type
would be used in this context
getTokenIds()?getTokens() returns would be used in this context
getTokenIds()getTokens()export const getTokens = async () => {
return await supabase.from('tokens').select('*')
}
export const getTokenIds = tokens => {
return tokens.data!.map(token => token.coingecko_id).filter(id => id != null)
}{
error: null,
data: [{some data}, {some data}]
}const tokens = await getTokens()
const ids = getTokenIds(tokens)