Skip to content

@vttforge/core / TypedTypeDataModel

Type Alias: TypedTypeDataModel<S, Parent> ​

TypedTypeDataModel<S, Parent> = InferSchema<S> & TypeDataModelHooks & TypeDataModelMembers<Parent> & object

What an instance looks like when the schema is known.

The schema's fields ARE the instance properties: inside prepareDerivedData() you read this.level, not this.system.level, and actor.system is this instance.

Derived values are not in the schema, so they are not here either. Declare them on the subclass:

ts
declare armorClass: number;

Type Declaration ​

$inferData ​

readonly $inferData: InferSchema<S>

Phantom property carrying the schema's inferred shape. Never assigned, never present at runtime; it exists so the type has a name:

ts
type CharacterSystem = CharacterData['$inferData'];

Type Parameters ​

S ​

S extends Record<string, FieldInstance>

Parent ​

Parent = DocumentMembers

MIT licensed.