events maps a name to true, listener options, listen<E>(options?) for an explicit event type, or custom<T>(options?) for a CustomEvent<T> (the same as listen<CustomEvent<T>>()). Otherwise an event is typed from HTMLElementEventMap by name. The array form is gone. handleEvent gets HandledEvent<S>, each event tagged with its literal type so event.type narrows.
52 lines
825 B
TypeScript
52 lines
825 B
TypeScript
export { WebComponent } from './web-component.ts';
|
|
export {
|
|
custom,
|
|
listen,
|
|
type EventDef,
|
|
type EventEntry,
|
|
type EventMapOf,
|
|
type EventOf,
|
|
type EventOptions,
|
|
type HandledEvent,
|
|
} from './events.ts';
|
|
export {
|
|
attributeName,
|
|
choice,
|
|
disable,
|
|
enable,
|
|
json,
|
|
kebab,
|
|
number,
|
|
prop,
|
|
string,
|
|
type AnyPropDef,
|
|
type BooleanOptions,
|
|
type Kebab,
|
|
type PropDef,
|
|
type PropOptions,
|
|
} from './props.ts';
|
|
export type {
|
|
AttributeMap,
|
|
AttributeOf,
|
|
AttributesOf,
|
|
ElementClass,
|
|
ElementConstructor,
|
|
ObservedAttributes,
|
|
PropChange,
|
|
PropNameConflict,
|
|
PropValues,
|
|
RefNameConflict,
|
|
RefElement,
|
|
RefSpec,
|
|
RefType,
|
|
Refs,
|
|
Spec,
|
|
SpecOf,
|
|
ValidateSpec,
|
|
ValueOf,
|
|
WebComponentConstructor,
|
|
WebComponentInstance,
|
|
WebComponentMembers,
|
|
WebComponentStatics,
|
|
} from './types.ts';
|