The model type for which to define the data source.
Example:
@D1
export class Person {
@PrimaryKey id: number;
@DataSource
static readonly default: IncludeTree<Person> = { dogs: {} };
@POST
foo(ds: DataSourceOf<Person>) {
// Cloesce won't append an implicit data source param here since it's explicit
}
}
// on the API client:
async foo(ds: "default" | "none"): Promise<void> {...}
Represents the name of a
@DataSourceavailable on a model typeT, or"none"when no data source (no joins) should be applied.All instantiated model methods implicitly have a Data Source param
__dataSource.