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:91

Properties

config

Optional Readonly config: CC

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

Defined in

src/lib/config.ts:111


details

Readonly details: CC[]

A list of components sharing the same trait.

Defined in

src/lib/config.ts:107


name

Readonly name: string

Name of the trait.

Implementation of

NameAware.name

Defined in

src/lib/config.ts:95


subtype

Readonly subtype: string

Subtype of the trait.

Implementation of

SubtypeAware.subtype

Defined in

src/lib/config.ts:103


type

Readonly type: string

Type of the trait.

Implementation of

TypeAware.type

Defined in

src/lib/config.ts:99