MCPcopy
hub / github.com/preactjs/preact / IntrinsicElements

Interface IntrinsicElements

test/ts/custom-elements.tsx:5–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3declare module '../../' {
4 namespace createElement.JSX {
5 interface IntrinsicElements {
6 // Custom element can use JSX EventHandler definitions
7 'clickable-ce': {
8 optionalAttr?: string;
9 onClick?: MouseEventHandler<HTMLElement>;
10 };
11
12 // Custom Element that extends HTML attributes
13 'color-picker': HTMLAttributes & {
14 // Required attribute
15 space: 'rgb' | 'hsl' | 'hsv';
16 // Optional attribute
17 alpha?: boolean;
18 };
19
20 // Custom Element with custom interface definition
21 'custom-whatever': WhateveElAttributes;
22 }
23 }
24}
25

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…