Helper to define static methods with properly typed this context.
This is a zero-cost abstraction - at runtime it just returns the methods object.
At compile-time, it provides TypeScript with ThisType<InferConstructor & Methods>
so that this inside your methods is correctly typed as the model constructor.
Helper to define static methods with properly typed
thiscontext.This is a zero-cost abstraction - at runtime it just returns the methods object. At compile-time, it provides TypeScript with ThisType<InferConstructor & Methods>
so that
thisinside your methods is correctly typed as the model constructor.