Can the type be determined based on a payload function?
For example:
export const myFunction = (
findAll: boolean
) => {
const finders: { key: if findAll is true, then VueWrapper<T>[] else VueWrapper<T> } = {}
})
In this case, I aim to alter the finders
type to an Array
if the findAll
condition is true