type Task = {
name: string
category: string
duration: number
cost: number
website: string
identifier: string
availability: number
}
async function retrieveOne(): Promise<Task> {
const apiUrl = "https://www.boredapi.com/api/activity"
const response: Task = await fetch(apiUrl).then(response => (response.json()))
// Encountered issue with unsafe assignment of an `any` value.eslint@typescript-eslint/no-unsafe-assignment
// Any recommendations on how to resolve this?
return response
}
I received :
Encountered issue with unsafe assignment of an
any
value.eslint@typescript-eslint/no-unsafe-assignment
Any suggestions on how to rectify this?