Skip to content

[I] Union

PropertyModifierTypeDescriptionOverridesInherited from
baseType?publicTypeType declared with the extends clause of a union statement. Every variant of the union is guaranteed to be assignable to this type. This is only set for named unions declared with an extends clause. It documents a constraint: it does not imply a subclassing relationship, it does not mean the union is extensible, and it has no interaction with @discriminator. Emitters should not require this to be present: a union with the same variants and no extends clause should ideally be handled the same way.--
creating?publictrueIf the type is currently being created.-BaseType.creating
decoratorspublicDecoratorApplication[]--DecoratedType.decorators
entityKindreadonly"Type"--BaseType.entityKind
expressionpublicboolean---
instantiationParameters?publicType[]--BaseType.instantiationParameters
isFinishedpublicbooleanReflect if a type has been finished(Decorators have been called). There is multiple reasons a type might not be finished: - a template declaration will not - a template instance that argument that are still template parameters - a template instance that is only partially instantiated(like a templated operation inside a templated interface)-BaseType.isFinished
kindpublic"Union"-BaseType.kind-
name?publicstring---
namespace?publicNamespace---
node?publicUnionStatementNode | UnionExpressionNodeNode used to construct this type. If the node is undefined it means the type was dynamically built. With typekit for example.BaseType.node-
templateMapper?publicTypeMapper--TemplatedTypeBase.templateMapper
templateNode?publicNode--TemplatedTypeBase.templateNode
variantspublicRekeyableMap<string | symbol, UnionVariant>The variants of the union. Variants are ordered in order that they appear in source.--