breeze-client / InitialValues
Type Alias: InitialValues<T>
InitialValues<
T> = { [K in keyof T as K extends keyof Entity | keyof ComplexObject ? never : T[K] extends Function ? never : K]?: T[K] extends RelationArray<infer U> ? U[] | T[K] : T[K] extends ReadonlyArray<infer U> ? (U extends ComplexObject ? InitialValues<U> | U : U)[] | T[K] : T[K] extends ComplexObject ? InitialValues<T[K]> | T[K] : T[K] }
Defined in: src/manager/entity-manager.ts:232
The values EntityManager.createEntity can be given for an entity of class T: any of its data and navigation properties, each optional.
- A collection navigation property takes a plain array of entities, and a complex property a plain object of its own values - both are what
createEntityaccepts at runtime. - The members every entity has -
entityAspect,entityType,getProperty,setProperty- are not initial values, and passing one fails inside Breeze. Methods are left out too.
A property the class does not declare is a compile error, which is the point: at runtime createEntity ignores it without a word, so a misspelt or server-cased name (ShipName for shipName) would otherwise create the entity without it.
Only the constructor overload is checked. Pass the type's name or its EntityType to create one from values the compiler cannot see.
Type Parameters
T
T