@vttforge/core / ConvertSubTypesOptions
Interface: ConvertSubTypesOptions<T>
Extends
Type Parameters
T
T extends SubTypedDocument = SubTypedDocument
Properties
changes?
readonlyoptionalchanges?: (document) =>Record<string,unknown>
Anything else to set while converting, such as a name or a flag.
Parameters
document
T
Returns
Record<string, unknown>
document
readonlydocument:SubTypeDocument
Inherited from
id
readonlyid:string
Module id.
Inherited from
system?
readonlyoptionalsystem?: (document) =>Record<string,unknown>
The system data the converted document keeps. Default: what it already had, unchanged. A core type stores it as a plain object, so nothing is lost even where nothing reads it.
Parameters
document
T
Returns
Record<string, unknown>
to?
readonlyoptionalto?:string
The type to become. Default 'base', which every document class has and no package owns, so it survives anything else being uninstalled too.
type
readonlytype:string
The bare type key, as it appears in documentTypes and itemDataModels.