Skip to content

@arcmantle/lit-jsx / compiler/attribute-processor

compiler/attribute-processor

Classes

AttributeValidators

Defined in: compiler/attribute-processor.ts:49

Constructors

Constructor

new AttributeValidators(): AttributeValidators

Returns

AttributeValidators

Methods

isBoolean()

static isBoolean(attr): attr is JSXAttributeBoolean

Defined in: compiler/attribute-processor.ts:112

Parameters
attr

JSXAttribute

Returns

attr is JSXAttributeBoolean

isCallBinding()

static isCallBinding(attr): attr is CallBindingAttribute

Defined in: compiler/attribute-processor.ts:55

Parameters
attr

JSXAttribute

Returns

attr is CallBindingAttribute

isClassListBinding()

static isClassListBinding(attr): attr is JSXAttributeWithExpression

Defined in: compiler/attribute-processor.ts:87

Parameters
attr

JSXAttribute

Returns

attr is JSXAttributeWithExpression

isCustomElementIdentifier()

static isCustomElementIdentifier(attr): attr is JSXAttribute

Defined in: compiler/attribute-processor.ts:51

Parameters
attr

JSXAttribute

Returns

attr is JSXAttribute

isDirective()

static isDirective(attr): attr is JSXAttributeWithExpression

Defined in: compiler/attribute-processor.ts:79

Parameters
attr

JSXAttribute

Returns

attr is JSXAttributeWithExpression

isEvent()

static isEvent(attr): attr is JSXAttributeWithExpression

Defined in: compiler/attribute-processor.ts:95

Parameters
attr

JSXAttribute

Returns

attr is JSXAttributeWithExpression

isExpression()

static isExpression(attr): attr is JSXAttributeWithExpression

Defined in: compiler/attribute-processor.ts:99

Parameters
attr

JSXAttribute

Returns

attr is JSXAttributeWithExpression

isNonExpression()

static isNonExpression(attribute): attribute is JSXAttributeWithoutExpression

Defined in: compiler/attribute-processor.ts:104

Parameters
attribute

JSXAttribute

Returns

attribute is JSXAttributeWithoutExpression

isRef()

static isRef(attr): attr is JSXAttributeWithExpression

Defined in: compiler/attribute-processor.ts:83

Parameters
attr

JSXAttribute

Returns

attr is JSXAttributeWithExpression

isSpread()

static isSpread(attr): attr is JSXSpreadAttribute

Defined in: compiler/attribute-processor.ts:108

Parameters
attr

JSXAttribute | JSXSpreadAttribute

Returns

attr is JSXSpreadAttribute

isStyleListBinding()

static isStyleListBinding(attr): attr is JSXAttributeWithExpression

Defined in: compiler/attribute-processor.ts:91

Parameters
attr

JSXAttribute

Returns

attr is JSXAttributeWithExpression


CompiledAttributeProcessor

Defined in: compiler/attribute-processor.ts:411

Extends

Constructors

Constructor

new CompiledAttributeProcessor(): CompiledAttributeProcessor

Returns

CompiledAttributeProcessor

Inherited from

AttributeProcessor<CompiledContext>.constructor

Methods

boolean()

boolean(attr, context): void

Defined in: compiler/attribute-processor.ts:481

Parameters
attr

JSXAttributeBoolean

context

CompiledContext

Returns

void

Overrides

AttributeProcessor.boolean

callBinding()

callBinding(attr, context): void

Defined in: compiler/attribute-processor.ts:417

Parameters
attr

CallBindingAttribute

context

CompiledContext

Returns

void

Overrides

AttributeProcessor.callBinding

classList()

classList(attr, context): void

Defined in: compiler/attribute-processor.ts:436

Parameters
attr

JSXAttributeWithExpression

context

CompiledContext

Returns

void

Overrides

AttributeProcessor.classList

createBoolean()

protected createBoolean(attr, context): string

Defined in: compiler/attribute-processor.ts:314

Parameters
attr

JSXAttributeBoolean

context

CompiledContext

Returns

string

Inherited from

AttributeProcessor.createBoolean

createClassList()

protected createClassList(attr, context): CallExpression

Defined in: compiler/attribute-processor.ts:241

Parameters
attr

JSXAttributeWithExpression

context

CompiledContext

Returns

CallExpression

Inherited from

AttributeProcessor.createClassList

createDirective()

protected createDirective(attr, context): Expression[]

Defined in: compiler/attribute-processor.ts:215

Parameters
attr

JSXAttributeWithExpression

context

CompiledContext

Returns

Expression[]

Inherited from

AttributeProcessor.createDirective

createEvent()

protected createEvent(attr, context): [string, Expression]

Defined in: compiler/attribute-processor.ts:265

Parameters
attr

JSXAttributeWithExpression

context

CompiledContext

Returns

[string, Expression]

Inherited from

AttributeProcessor.createEvent

createExpression()

protected createExpression(attr, context): [string, Expression]

Defined in: compiler/attribute-processor.ts:269

Parameters
attr

JSXAttributeWithExpression

context

CompiledContext

Returns

[string, Expression]

Inherited from

AttributeProcessor.createExpression

createNonExpression()

protected createNonExpression(attr, context): [string, string]

Defined in: compiler/attribute-processor.ts:292

Parameters
attr

JSXAttributeWithoutExpression

context

CompiledContext

Returns

[string, string]

Inherited from

AttributeProcessor.createNonExpression

createRef()

protected createRef(attr, context): CallExpression

Defined in: compiler/attribute-processor.ts:229

Parameters
attr

JSXAttributeWithExpression

context

CompiledContext

Returns

CallExpression

Inherited from

AttributeProcessor.createRef

createSpread()

protected createSpread(attr, context): CallExpression

Defined in: compiler/attribute-processor.ts:302

Parameters
attr

JSXSpreadAttribute

context

CompiledContext

Returns

CallExpression

Inherited from

AttributeProcessor.createSpread

createStyleList()

protected createStyleList(attr, context): CallExpression

Defined in: compiler/attribute-processor.ts:253

Parameters
attr

JSXAttributeWithExpression

context

CompiledContext

Returns

CallExpression

Inherited from

AttributeProcessor.createStyleList

createValueBinding()

protected createValueBinding(attr, context): ValueBinding

Defined in: compiler/attribute-processor.ts:177

Parameters
attr

CallBindingAttribute

context

CompiledContext

Returns

ValueBinding

Inherited from

AttributeProcessor.createValueBinding

customElementIdentifier()

customElementIdentifier(attr, context): void

Defined in: compiler/attribute-processor.ts:413

Parameters
attr

JSXAttribute

context

CompiledContext

Returns

void

Overrides

AttributeProcessor.customElementIdentifier

directive()

directive(attr, context): void

Defined in: compiler/attribute-processor.ts:421

Parameters
attr

JSXAttributeWithExpression

context

CompiledContext

Returns

void

Overrides

AttributeProcessor.directive

event()

event(attr, context): void

Defined in: compiler/attribute-processor.ts:452

Parameters
attr

JSXAttributeWithExpression

context

CompiledContext

Returns

void

Overrides

AttributeProcessor.event

expression()

expression(attr, context): void

Defined in: compiler/attribute-processor.ts:460

Parameters
attr

JSXAttributeWithExpression

context

CompiledContext

Returns

void

Overrides

AttributeProcessor.expression

nonExpression()

nonExpression(attr, context): void

Defined in: compiler/attribute-processor.ts:468

Parameters
attr

JSXAttributeWithoutExpression

context

CompiledContext

Returns

void

Overrides

AttributeProcessor.nonExpression

processAttribute()

processAttribute(attr, context): void

Defined in: compiler/attribute-processor.ts:143

Parameters
attr

JSXAttribute | JSXSpreadAttribute

context

CompiledContext

Returns

void

Inherited from

AttributeProcessor.processAttribute

ref()

ref(attr, context): void

Defined in: compiler/attribute-processor.ts:428

Parameters
attr

JSXAttributeWithExpression

context

CompiledContext

Returns

void

Overrides

AttributeProcessor.ref

spread()

spread(attr, context): void

Defined in: compiler/attribute-processor.ts:474

Parameters
attr

JSXSpreadAttribute

context

CompiledContext

Returns

void

Overrides

AttributeProcessor.spread

styleList()

styleList(attr, context): void

Defined in: compiler/attribute-processor.ts:444

Parameters
attr

JSXAttributeWithExpression

context

CompiledContext

Returns

void

Overrides

AttributeProcessor.styleList

valueBinding()

protected valueBinding(attr, context): void

Defined in: compiler/attribute-processor.ts:487

Parameters
attr

CallBindingAttribute

context

CompiledContext

Returns

void


CreateCompiledPart

Defined in: compiler/attribute-processor.ts:508

Constructors

Constructor

new CreateCompiledPart(): CreateCompiledPart

Returns

CreateCompiledPart

Methods

attribute()

static attribute(index, name): ObjectExpression

Defined in: compiler/attribute-processor.ts:541

Parameters
index

number

name

string

Returns

ObjectExpression

boolean()

static boolean(index, name): ObjectExpression

Defined in: compiler/attribute-processor.ts:549

Parameters
index

number

name

string

Returns

ObjectExpression

child()

static child(index): ObjectExpression

Defined in: compiler/attribute-processor.ts:533

Parameters
index

number

Returns

ObjectExpression

createAttributePart()

protected static createAttributePart(index, name, ctor): ObjectExpression

Defined in: compiler/attribute-processor.ts:517

Parameters
index

number

name

string

ctor

string

Returns

ObjectExpression

createBasePart()

protected static createBasePart(type, index): ObjectProperty[]

Defined in: compiler/attribute-processor.ts:510

Parameters
type

PartType

index

number

Returns

ObjectProperty[]

element()

static element(index): ObjectExpression

Defined in: compiler/attribute-processor.ts:537

Parameters
index

number

Returns

ObjectExpression

event()

static event(index, name): ObjectExpression

Defined in: compiler/attribute-processor.ts:553

Parameters
index

number

name

string

Returns

ObjectExpression

property()

static property(index, name): ObjectExpression

Defined in: compiler/attribute-processor.ts:545

Parameters
index

number

name

string

Returns

ObjectExpression


TemplateAttributeProcessor

Defined in: compiler/attribute-processor.ts:322

Extends

Constructors

Constructor

new TemplateAttributeProcessor(): TemplateAttributeProcessor

Returns

TemplateAttributeProcessor

Inherited from

AttributeProcessor<TemplateContext>.constructor

Methods

boolean()

boolean(attribute, context): void

Defined in: compiler/attribute-processor.ts:388

Parameters
attribute

JSXAttributeBoolean

context

TemplateContext

Returns

void

Overrides

AttributeProcessor.boolean

callBinding()

callBinding(attr, context): void

Defined in: compiler/attribute-processor.ts:328

Parameters
attr

CallBindingAttribute

context

TemplateContext

Returns

void

Overrides

AttributeProcessor.callBinding

classList()

classList(attr, context): void

Defined in: compiler/attribute-processor.ts:347

Parameters
attr

JSXAttributeWithExpression

context

TemplateContext

Returns

void

Overrides

AttributeProcessor.classList

createBoolean()

protected createBoolean(attr, context): string

Defined in: compiler/attribute-processor.ts:314

Parameters
attr

JSXAttributeBoolean

context

TemplateContext

Returns

string

Inherited from

AttributeProcessor.createBoolean

createClassList()

protected createClassList(attr, context): CallExpression

Defined in: compiler/attribute-processor.ts:241

Parameters
attr

JSXAttributeWithExpression

context

TemplateContext

Returns

CallExpression

Inherited from

AttributeProcessor.createClassList

createDirective()

protected createDirective(attr, context): Expression[]

Defined in: compiler/attribute-processor.ts:215

Parameters
attr

JSXAttributeWithExpression

context

TemplateContext

Returns

Expression[]

Inherited from

AttributeProcessor.createDirective

createEvent()

protected createEvent(attr, context): [string, Expression]

Defined in: compiler/attribute-processor.ts:265

Parameters
attr

JSXAttributeWithExpression

context

TemplateContext

Returns

[string, Expression]

Inherited from

AttributeProcessor.createEvent

createExpression()

protected createExpression(attr, context): [string, Expression]

Defined in: compiler/attribute-processor.ts:269

Parameters
attr

JSXAttributeWithExpression

context

TemplateContext

Returns

[string, Expression]

Inherited from

AttributeProcessor.createExpression

createNonExpression()

protected createNonExpression(attr, context): [string, string]

Defined in: compiler/attribute-processor.ts:292

Parameters
attr

JSXAttributeWithoutExpression

context

TemplateContext

Returns

[string, string]

Inherited from

AttributeProcessor.createNonExpression

createRef()

protected createRef(attr, context): CallExpression

Defined in: compiler/attribute-processor.ts:229

Parameters
attr

JSXAttributeWithExpression

context

TemplateContext

Returns

CallExpression

Inherited from

AttributeProcessor.createRef

createSpread()

protected createSpread(attr, context): CallExpression

Defined in: compiler/attribute-processor.ts:302

Parameters
attr

JSXSpreadAttribute

context

TemplateContext

Returns

CallExpression

Inherited from

AttributeProcessor.createSpread

createStyleList()

protected createStyleList(attr, context): CallExpression

Defined in: compiler/attribute-processor.ts:253

Parameters
attr

JSXAttributeWithExpression

context

TemplateContext

Returns

CallExpression

Inherited from

AttributeProcessor.createStyleList

createValueBinding()

protected createValueBinding(attr, context): ValueBinding

Defined in: compiler/attribute-processor.ts:177

Parameters
attr

CallBindingAttribute

context

TemplateContext

Returns

ValueBinding

Inherited from

AttributeProcessor.createValueBinding

customElementIdentifier()

customElementIdentifier(attr, context): void

Defined in: compiler/attribute-processor.ts:324

Parameters
attr

JSXAttribute

context

TemplateContext

Returns

void

Overrides

AttributeProcessor.customElementIdentifier

directive()

directive(attr, context): void

Defined in: compiler/attribute-processor.ts:332

Parameters
attr

JSXAttributeWithExpression

context

TemplateContext

Returns

void

Overrides

AttributeProcessor.directive

event()

event(attr, context): void

Defined in: compiler/attribute-processor.ts:361

Parameters
attr

JSXAttributeWithExpression

context

TemplateContext

Returns

void

Overrides

AttributeProcessor.event

expression()

expression(attr, context): void

Defined in: compiler/attribute-processor.ts:368

Parameters
attr

JSXAttributeWithExpression

context

TemplateContext

Returns

void

Overrides

AttributeProcessor.expression

nonExpression()

nonExpression(attr, context): void

Defined in: compiler/attribute-processor.ts:375

Parameters
attr

JSXAttributeWithoutExpression

context

TemplateContext

Returns

void

Overrides

AttributeProcessor.nonExpression

processAttribute()

processAttribute(attr, context): void

Defined in: compiler/attribute-processor.ts:143

Parameters
attr

JSXAttribute | JSXSpreadAttribute

context

TemplateContext

Returns

void

Inherited from

AttributeProcessor.processAttribute

ref()

ref(attr, context): void

Defined in: compiler/attribute-processor.ts:339

Parameters
attr

JSXAttributeWithExpression

context

TemplateContext

Returns

void

Overrides

AttributeProcessor.ref

spread()

spread(attribute, context): void

Defined in: compiler/attribute-processor.ts:381

Parameters
attribute

JSXSpreadAttribute

context

TemplateContext

Returns

void

Overrides

AttributeProcessor.spread

styleList()

styleList(attr, context): void

Defined in: compiler/attribute-processor.ts:354

Parameters
attr

JSXAttributeWithExpression

context

TemplateContext

Returns

void

Overrides

AttributeProcessor.styleList

valueBinding()

protected valueBinding(attr, context): void

Defined in: compiler/attribute-processor.ts:394

Parameters
attr

CallBindingAttribute

context

TemplateContext

Returns

void

Interfaces

ProcessorContext

Defined in: compiler/attribute-processor.ts:119

Extended by

Properties

builder

builder: unknown

Defined in: compiler/attribute-processor.ts:120

importsUsed

importsUsed: Set<"rest" | "html" | "svg" | "htmlStatic" | "svgStatic" | "mathml" | "mathmlStatic" | "unsafeStatic" | "classMap" | "styleMap" | "createRef" | "literalMap" | "taggedTemplateUtil" | "booleanPart" | "attributePart" | "propertyPart" | "elementPart" | "eventPart" | "childPart">

Defined in: compiler/attribute-processor.ts:125

isInitialElement

isInitialElement: boolean

Defined in: compiler/attribute-processor.ts:124

path

path: NodePath<JSXElement | JSXFragment>

Defined in: compiler/attribute-processor.ts:122

program

program: Program

Defined in: compiler/attribute-processor.ts:121

tagName

tagName: string

Defined in: compiler/attribute-processor.ts:123

Functions

hasCustomElementIdentifier()

hasCustomElementIdentifier(attributes): boolean

Defined in: compiler/attribute-processor.ts:560

Parameters

attributes

(JSXAttribute | JSXSpreadAttribute)[]

Returns

boolean

Released under the Apache-2.0 License.