I am currently working with typescript and mongoose. I have defined an interface like this:
interface Task {
taskid: Boolean;
description: Boolean;
}
My goal is to create a schema where one of the fields contains an array of Tasks:
const employeeSchema = new Schema({
_id: { type: String, required: true }
name: { type: String }
tasks: [Task]
})
However, I encounter an error stating 'Task' only refers to a type, but is being used as a value here. How can I resolve this issue?