Here is my code. I am getting the error below.
type Filters = {
type: 'expenses' | 'income'
week: string
month: string
category: string
}
class SubjectManager {
private subject$: BehaviorSubject<Filters> = new BehaviorSubject({
category: 'all',
week: '1',
month: '10',
type: 'expenses'
})
}
Error
Type 'Filters' cannot be assigned to type '{ category: string; week: string; month: string; type: "expenses";
How can I fix this error?