-
Notifications
You must be signed in to change notification settings - Fork 43
Description
here there are no definition for getRunningTasks,
`interface Store {
connect(cb: (error: any, length: number) => void): void;
getTask(taskId: any, cb: (error: any, task: T) => void): void;
deleteTask(taskId: any, cb: () => void): void;
putTask(taskId: any, task: T, priority: number, cb: (error: any) => void): void;
takeFirstN(n: number, cb: (error: any, lockId: string) => void): void;
takeLastN(n: number, cb: (error: any, lockId: string) => void): void;
getLock(lockId: string, cb: (error: any, tasks: { [taskId: string]: T }) => void): void;
releaseLock(lockId: string, cb: (error: any) => void): void;
}`
So when I try to implement my custom store and defining the function getRunningTasks the visual studio code intellisens tells me "Object literal may only specify known properties, and 'getRunningTasks' does not exist in type 'Store'.ts(2353)". The getRunningTask is neccessary for the connect function, otherwise I got a type error saying "self._store.getRunningTasks is not a function". I can implement it and just ignore the error, but then I'm not it's working as intended. Or I can try to extend the interface, but that does seem like a workaround and not the intended solution??
I am new to all this so maybe I have misunderstood something.