In javascript and React Native, I use an API function which returns two elements: results and error.
import { findAll as forumFindAll } from '../../Api/ForumApi'
const IndexScreen = () => {
const [results, error] = forumFindAll()
...
I would like to rename the variables results and error on a single line (much like destructuring).
Something like that (but I know it doesn't work) :
const [results as forumsResults, error as forumsError] = forumFindAll()