Skip to content

@vttforge/core / ConvertSubTypesOptions

Interface: ConvertSubTypesOptions<T>

Extends

Type Parameters

T

T extends SubTypedDocument = SubTypedDocument

Properties

changes?

readonly optional changes?: (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

readonly document: SubTypeDocument

Inherited from

SubTypeQuery.document


id

readonly id: string

Module id.

Inherited from

SubTypeQuery.id


system?

readonly optional system?: (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?

readonly optional to?: 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

readonly type: string

The bare type key, as it appears in documentTypes and itemDataModels.

Inherited from

SubTypeQuery.type

MIT licensed.