This is a prerelease version of FAST (3.0.0-rc.1).

@microsoft/fast-element > FASTElementDefinition > compose

FASTElementDefinition.compose() method

Creates an instance of FASTElementDefinition.

Signature:

static compose<TType extends Constructable<HTMLElement> = Constructable<HTMLElement>>(type: TType, nameOrDef?: string | PartialFASTElementDefinition<TType>): Promise<FASTElementDefinition<TType>>;

Parameters

Parameter

Type

Description

type

TType

The type this definition is being created for.

nameOrDef

string | PartialFASTElementDefinition<TType>

(Optional) The name of the element to define or a config object that describes the element to define.

Returns:

Promise<FASTElementDefinition<TType>>