Type Alias InstanceMethodsFrom<Manifest, Methods, RelationFields>

InstanceMethodsFrom: {
    [K in keyof Methods]: (
        this: ManifestTypes<
            Manifest,
            EmptyStaticMethods,
            Methods,
            RelationFields,
        >["Instance"] & Methods,
        ...args: Parameters<Methods[K]>,
    ) => ReturnType<Methods[K]>
}

Map a methods object to include the correct this type for model instances.

Similar to StaticMethodsFrom, but targets instance methods so they receive the fully-typed instance (including relation fields) as their this context without extra boilerplate.

Type Parameters