) => Element);
type Component = (props: P) => Element;
type ClassComponent = abstract new (...args: any[]) => Instance;
type ComponentLike =
| Component
| ClassComponent;
type ComponentProps =
T extends Component ? P :
T extends ClassComponent ? JSXElementProps> :
T extends abstract new (...args: any[]) => infer I ? JSXElementProps> :
{};
}
// eslint-disable-next-line no-var
var as: {
/**
* Informs the compiler that the value should be bound as a property value.\
* This binds the expression value as a property, using the `.` syntax e.g `.key=${value}`\
* This function call is removed during compilation, therefore it has no runtime effect.
*/
prop: (value: T) => T;
/**
* Informs the compiler that the value should be bound as a boolean attribute.\
* This allows the template to bind the value using the `?` syntax, e.g. `?disabled=${true}`\
* This function call is removed during compilation, therefore it has no runtime effect.
*/
bool: (value: boolean) => boolean;
/**
* Creates a component-like value for an intrinsic tag, so it can be used in
* JSX as a dynamic tag identifier.
*
* The returned component requires `static`.
* Example:
* const Tag = as.tag('a');
*
*/
tag: (tag: Tag) => LitJSX.DynamicTag;
};
}