import Job from "@/Job"; type JobConstructorParameters = ConstructorParameters; // Borrowed from https://dev.to/futuresight/how-2-typescript-get-the-last-item-type-from-a-tuple-of-types-3fh3#comment-gb5d type DropFirstInTuple = ((...args: T) => any) extends ( arg: any, ...rest: infer U ) => any ? U : T; type DerivedJobConstructorParameters = DropFirstInTuple; export interface JobDerived extends Job { new (...args: DerivedJobConstructorParameters): Job & typeof Job; }