Skip to content

getRunningTask is not defined in the store interface #97

@Lizza96

Description

@Lizza96

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions