import { default as ts } from 'typescript'; import { dynamicHtmlSymbol, dynamicSvgSymbol } from './config.ts'; /** * Check if prop initializer has bindProperty(), bindAttribute(), * bindBooleanAttribute() or bindEvent() call - these explicitly indicate the * prop type. * * @remarks * Not checking for now if function is actually coming from `@arcgis/lumina` - if * this is an issue, can add later */ export declare function checkExplicitPropType(initializer: ts.JsxAttributeValue | undefined): { readonly propType: JsxPropType; readonly initializer: ts.JsxExpression | undefined; } | undefined; /** * Decide whether a JSX prop should be converted to property, attribute or event * * Unless there is a good reason to do otherwise, most props are converted into * properties rather than attributes. Reasons: * - For third-party web components, since we are consuming them in JSX, the * typings will most likely include names of properties not attributes. * - Setting attributes is more bug-prone in lit as `a=${undefined}` is still * considered truthy (you have to use `a=${nothing}` to unset an attribute) * - If you want to conditionally display a boolean html attribute, there is * the `?a=${someBoolean}` syntax. * - The above two cases add complexity and bugs - properties are much simpler * - Setting property is more performant than setting attribute * * For most HTML attributes, setting the property will reflect to the attribute. * If the third-party web component expects to have the attribute set (for * styling or other reasons), it should reflect the property. * There are also flag functions available (bindAttribute and etc) if you * explicitly want to overwrite the below prop type inference logic. */ export declare function inferPropType(propName: string, initializer: ts.JsxAttributeValue | undefined, tagName: string | typeof dynamicHtmlSymbol | typeof dynamicSvgSymbol): JsxPropType; declare const specialPropsArray: readonly ["class", "style", "ref", "directives", "key", "deferLoad"]; type SpecialProp = (typeof specialPropsArray)[number]; export type JsxPropType = SpecialProp | "attribute" | "booleanAttribute" | "event" | "property"; export {};