egon-orm-workspace / egon-orm / PreloadMarker
Interface: PreloadMarker<P> ​
Defined in: core/src/contracts/schema.ts:623
The type-only marker of a Loaded row type: the preloaded associations as an object type, { author: true; comments: true }, so that a row with more preloads is still assignable where fewer are expected, and two markers on one row merge into one. It is never set at run time. (A property, not a method like RowMarker: the types of two methods would not merge. A copy of a row keeps it in its type, but without the RowMarker the copy is a plain object to Json, which ignores this key.)
Example ​
ts
type Preloaded = NonNullable<Loaded<typeof Post, "author">["~preloaded"]>; // { readonly author: true }Type Parameters ​
P ​
P
Properties ​
~preloaded? ​
ts
readonly "~preloaded"?: P;Defined in: core/src/contracts/schema.ts:625
Type-only; never set at runtime.

