Skip to content

@arcmantle/lit-jsx / shared/jsx-utils

shared/jsx-utils

Interfaces

LitPartConstructors

Defined in: shared/jsx-utils.ts:7

Properties

AttributePart

AttributePart: typeof AttributePart

Defined in: shared/jsx-utils.ts:8

BooleanPart

BooleanPart: typeof BooleanAttributePart

Defined in: shared/jsx-utils.ts:10

ChildPart

ChildPart: typeof ChildPart

Defined in: shared/jsx-utils.ts:12

ElementPart

ElementPart: typeof ElementPart

Defined in: shared/jsx-utils.ts:13

EventPart

EventPart: typeof EventPart

Defined in: shared/jsx-utils.ts:11

PropertyPart

PropertyPart: typeof PropertyPart

Defined in: shared/jsx-utils.ts:9

Variables

__ttl()

const __ttl: (strings) => TemplateStringsArray

Defined in: shared/jsx-utils.ts:26

Template tag function marker for jsx-lit React compatibility mode.

This function serves the same purpose as __$t but for React JSX transform mode. It's an identity function that marks template literals for jsx-lit processing.

Parameters

strings

TemplateStringsArray

Template strings array from template literal

Returns

TemplateStringsArray

The same template strings array unchanged


getLitParts()

const getLitParts: () => LitPartConstructors

Defined in: shared/jsx-utils.ts:38

Lazy-initialized function that extracts lit-html part constructors.

This function uses a clever technique to extract the internal part constructors from lit-html by creating temporary directives and examining their part types. This is necessary for jsx-lit's compile-time optimizations.

Returns

LitPartConstructors

Object containing all lit-html part constructors

Released under the Apache-2.0 License.