Skip to content

@openfabr/cdf / Exports / TraitConfig

Class: TraitConfig<CC>

Concrete class for a group of components sharing the same trait.

Usually there is no need to extend this class.

Type parameters

Name Type
CC extends ComponentConfig

Implements

Table of contents

Constructors

Properties

Constructors

constructor

new TraitConfig<CC>(name, type, subtype, details, config?)

Type parameters

Name Type
CC extends ComponentConfig

Parameters

Name Type Description
name string Name of the trait.
type string Type of the trait.
subtype string Subtype of the trait.
details CC[] A list of components sharing the same trait.
config? CC The fallback config that applies to all components defined for the trait.

Defined in

src/lib/config.ts:104

Properties

config

Optional Readonly config: CC

The fallback config that applies to all components defined for the trait.

Defined in

src/lib/config.ts:124


details

Readonly details: CC[]

A list of components sharing the same trait.

Defined in

src/lib/config.ts:120


name

Readonly name: string

Name of the trait.

Implementation of

NameAware.name

Defined in

src/lib/config.ts:108


subtype

Readonly subtype: string

Subtype of the trait.

Implementation of

SubtypeAware.subtype

Defined in

src/lib/config.ts:116


type

Readonly type: string

Type of the trait.

Implementation of

TypeAware.type

Defined in

src/lib/config.ts:112