Closed kostysh closed 6 months ago
Here is the type of the CreateMethod:
CreateMethod
export type CreateMethod = <T extends JobAttributesData>(name: string, data: T) => Job; // `Job` is not properly typed
Job itself has the following type:
Job
declare class Job<T extends JobAttributesData = JobAttributesData> { /* ... */ }
This way a return type of the CreateMethod has to look like this:
export type CreateMethod = <T extends JobAttributesData>(name: string, data: T) => Job<T>;
@code-xhyun maybe it will be more helpful if I will create PRs from time to time? Not too often )
@kostysh Sure! We welcome your participation!
https://github.com/pulsecron/pulse/pull/21
Here is the type of the
CreateMethod
:Job
itself has the following type:This way a return type of the
CreateMethod
has to look like this: