@arcmantle/lit-jsx / compiler/type-utils
compiler/type-utils
Functions
isClassByType()
isClassByType(
path,filename,code):boolean|undefined
Defined in: compiler/type-utils.ts:110
Checks if a JSX element refers to a class (not a string literal) based on TypeScript type information.
Returns:
trueif the element is a class constructor (should use .tagName accessor)falseif the element is a string literal or function componentundefinedif type checking is not available or the type cannot be determined
Parameters
path
NodePath<JSXElement>
filename
string
code
string
Returns
boolean | undefined
isClassOrCustomElementByType()
isClassOrCustomElementByType(
path,filename,code):boolean|undefined
Defined in: compiler/type-utils.ts:19
Checks if a JSX element refers to a class or custom element based on TypeScript type information.
Returns:
trueif the element is a class constructor or string literal (should be treated as static/custom element)falseif the element is a function component (should be treated as dynamic)undefinedif type checking is not available or the type cannot be determined
Parameters
path
NodePath<JSXElement>
filename
string
code
string
Returns
boolean | undefined