@types/react 18.0.36 → 18.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
react/ts5.0/index.d.ts ADDED
@@ -0,0 +1,3297 @@
1
+ // NOTE: Users of the `experimental` builds of React should add a reference
2
+ // to 'react/experimental' in their project. See experimental.d.ts's top comment
3
+ // for reference and documentation on how exactly to do it.
4
+
5
+ /// <reference path="global.d.ts" />
6
+
7
+ import * as CSS from 'csstype';
8
+ import * as PropTypes from 'prop-types';
9
+ import { Interaction as SchedulerInteraction } from 'scheduler/tracing';
10
+
11
+ type NativeAnimationEvent = AnimationEvent;
12
+ type NativeClipboardEvent = ClipboardEvent;
13
+ type NativeCompositionEvent = CompositionEvent;
14
+ type NativeDragEvent = DragEvent;
15
+ type NativeFocusEvent = FocusEvent;
16
+ type NativeKeyboardEvent = KeyboardEvent;
17
+ type NativeMouseEvent = MouseEvent;
18
+ type NativeTouchEvent = TouchEvent;
19
+ type NativePointerEvent = PointerEvent;
20
+ type NativeTransitionEvent = TransitionEvent;
21
+ type NativeUIEvent = UIEvent;
22
+ type NativeWheelEvent = WheelEvent;
23
+ type Booleanish = boolean | 'true' | 'false';
24
+
25
+ declare const UNDEFINED_VOID_ONLY: unique symbol;
26
+ // Destructors are only allowed to return void.
27
+ type Destructor = () => void | { [UNDEFINED_VOID_ONLY]: never };
28
+ type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
29
+
30
+ // eslint-disable-next-line export-just-namespace
31
+ export = React;
32
+ export as namespace React;
33
+
34
+ declare namespace React {
35
+ //
36
+ // React Elements
37
+ // ----------------------------------------------------------------------
38
+
39
+ type ElementType<P = any> =
40
+ {
41
+ [K in keyof JSX.IntrinsicElements]: P extends JSX.IntrinsicElements[K] ? K : never
42
+ }[keyof JSX.IntrinsicElements] |
43
+ ComponentType<P>;
44
+ type ComponentType<P = {}> = ComponentClass<P> | FunctionComponent<P>;
45
+
46
+ type JSXElementConstructor<P> =
47
+ | ((props: P) => ReactElement<any, any> | null)
48
+ | (new (props: P) => Component<any, any>);
49
+
50
+ interface RefObject<T> {
51
+ readonly current: T | null;
52
+ }
53
+ // Bivariance hack for consistent unsoundness with RefObject
54
+ type RefCallback<T> = { bivarianceHack(instance: T | null): void }["bivarianceHack"];
55
+ type Ref<T> = RefCallback<T> | RefObject<T> | null;
56
+ type LegacyRef<T> = string | Ref<T>;
57
+ /**
58
+ * Gets the instance type for a React element. The instance will be different for various component types:
59
+ *
60
+ * - React class components will be the class instance. So if you had `class Foo extends React.Component<{}> {}`
61
+ * and used `React.ElementRef<typeof Foo>` then the type would be the instance of `Foo`.
62
+ * - React stateless functional components do not have a backing instance and so `React.ElementRef<typeof Bar>`
63
+ * (when `Bar` is `function Bar() {}`) will give you the `undefined` type.
64
+ * - JSX intrinsics like `div` will give you their DOM instance. For `React.ElementRef<'div'>` that would be
65
+ * `HTMLDivElement`. For `React.ElementRef<'input'>` that would be `HTMLInputElement`.
66
+ * - React stateless functional components that forward a `ref` will give you the `ElementRef` of the forwarded
67
+ * to component.
68
+ *
69
+ * `C` must be the type _of_ a React component so you need to use typeof as in `React.ElementRef<typeof MyComponent>`.
70
+ *
71
+ * @todo In Flow, this works a little different with forwarded refs and the `AbstractComponent` that
72
+ * `React.forwardRef()` returns.
73
+ */
74
+ type ElementRef<
75
+ C extends
76
+ | ForwardRefExoticComponent<any>
77
+ | { new (props: any): Component<any> }
78
+ | ((props: any, context?: any) => ReactElement | null)
79
+ | keyof JSX.IntrinsicElements
80
+ > =
81
+ // need to check first if `ref` is a valid prop for ts@3.0
82
+ // otherwise it will infer `{}` instead of `never`
83
+ "ref" extends keyof ComponentPropsWithRef<C>
84
+ ? NonNullable<ComponentPropsWithRef<C>["ref"]> extends Ref<
85
+ infer Instance
86
+ >
87
+ ? Instance
88
+ : never
89
+ : never;
90
+
91
+ type ComponentState = any;
92
+
93
+ type Key = string | number;
94
+
95
+ /**
96
+ * @internal You shouldn't need to use this type since you never see these attributes
97
+ * inside your component or have to validate them.
98
+ */
99
+ interface Attributes {
100
+ key?: Key | null | undefined;
101
+ }
102
+ interface RefAttributes<T> extends Attributes {
103
+ /**
104
+ * Allows getting a ref to the component instance.
105
+ * Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).
106
+ * @see https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom
107
+ */
108
+ ref?: Ref<T> | undefined;
109
+ }
110
+ interface ClassAttributes<T> extends Attributes {
111
+ /**
112
+ * Allows getting a ref to the component instance.
113
+ * Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).
114
+ * @see https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom
115
+ */
116
+ ref?: LegacyRef<T> | undefined;
117
+ }
118
+
119
+ interface ReactElement<P = any, T extends string | JSXElementConstructor<any> = string | JSXElementConstructor<any>> {
120
+ type: T;
121
+ props: P;
122
+ key: Key | null;
123
+ }
124
+
125
+ interface ReactComponentElement<
126
+ T extends keyof JSX.IntrinsicElements | JSXElementConstructor<any>,
127
+ P = Pick<ComponentProps<T>, Exclude<keyof ComponentProps<T>, 'key' | 'ref'>>
128
+ > extends ReactElement<P, Exclude<T, number>> { }
129
+
130
+ interface FunctionComponentElement<P> extends ReactElement<P, FunctionComponent<P>> {
131
+ ref?: ('ref' extends keyof P ? P extends { ref?: infer R | undefined } ? R : never : never) | undefined;
132
+ }
133
+
134
+ type CElement<P, T extends Component<P, ComponentState>> = ComponentElement<P, T>;
135
+ interface ComponentElement<P, T extends Component<P, ComponentState>> extends ReactElement<P, ComponentClass<P>> {
136
+ ref?: LegacyRef<T> | undefined;
137
+ }
138
+
139
+ type ClassicElement<P> = CElement<P, ClassicComponent<P, ComponentState>>;
140
+
141
+ // string fallback for custom web-components
142
+ interface DOMElement<P extends HTMLAttributes<T> | SVGAttributes<T>, T extends Element> extends ReactElement<P, string> {
143
+ ref: LegacyRef<T>;
144
+ }
145
+
146
+ // ReactHTML for ReactHTMLElement
147
+ interface ReactHTMLElement<T extends HTMLElement> extends DetailedReactHTMLElement<AllHTMLAttributes<T>, T> { }
148
+
149
+ interface DetailedReactHTMLElement<P extends HTMLAttributes<T>, T extends HTMLElement> extends DOMElement<P, T> {
150
+ type: keyof ReactHTML;
151
+ }
152
+
153
+ // ReactSVG for ReactSVGElement
154
+ interface ReactSVGElement extends DOMElement<SVGAttributes<SVGElement>, SVGElement> {
155
+ type: keyof ReactSVG;
156
+ }
157
+
158
+ interface ReactPortal extends ReactElement {
159
+ key: Key | null;
160
+ children: ReactNode;
161
+ }
162
+
163
+ //
164
+ // Factories
165
+ // ----------------------------------------------------------------------
166
+
167
+ type Factory<P> = (props?: Attributes & P, ...children: ReactNode[]) => ReactElement<P>;
168
+
169
+ /**
170
+ * @deprecated Please use `FunctionComponentFactory`
171
+ */
172
+ type SFCFactory<P> = FunctionComponentFactory<P>;
173
+
174
+ type FunctionComponentFactory<P> = (props?: Attributes & P, ...children: ReactNode[]) => FunctionComponentElement<P>;
175
+
176
+ type ComponentFactory<P, T extends Component<P, ComponentState>> =
177
+ (props?: ClassAttributes<T> & P, ...children: ReactNode[]) => CElement<P, T>;
178
+
179
+ type CFactory<P, T extends Component<P, ComponentState>> = ComponentFactory<P, T>;
180
+ type ClassicFactory<P> = CFactory<P, ClassicComponent<P, ComponentState>>;
181
+
182
+ type DOMFactory<P extends DOMAttributes<T>, T extends Element> =
183
+ (props?: ClassAttributes<T> & P | null, ...children: ReactNode[]) => DOMElement<P, T>;
184
+
185
+ interface HTMLFactory<T extends HTMLElement> extends DetailedHTMLFactory<AllHTMLAttributes<T>, T> {}
186
+
187
+ interface DetailedHTMLFactory<P extends HTMLAttributes<T>, T extends HTMLElement> extends DOMFactory<P, T> {
188
+ (props?: ClassAttributes<T> & P | null, ...children: ReactNode[]): DetailedReactHTMLElement<P, T>;
189
+ }
190
+
191
+ interface SVGFactory extends DOMFactory<SVGAttributes<SVGElement>, SVGElement> {
192
+ (props?: ClassAttributes<SVGElement> & SVGAttributes<SVGElement> | null, ...children: ReactNode[]): ReactSVGElement;
193
+ }
194
+
195
+ /**
196
+ * @deprecated - This type is not relevant when using React. Inline the type instead to make the intent clear.
197
+ */
198
+ type ReactText = string | number;
199
+ /**
200
+ * @deprecated - This type is not relevant when using React. Inline the type instead to make the intent clear.
201
+ */
202
+ type ReactChild = ReactElement | string | number;
203
+
204
+ /**
205
+ * @deprecated Use either `ReactNode[]` if you need an array or `Iterable<ReactNode>` if its passed to a host component.
206
+ */
207
+ interface ReactNodeArray extends ReadonlyArray<ReactNode> {}
208
+ type ReactFragment = Iterable<ReactNode>;
209
+ type ReactNode = ReactElement | string | number | ReactFragment | ReactPortal | boolean | null | undefined;
210
+
211
+ //
212
+ // Top Level API
213
+ // ----------------------------------------------------------------------
214
+
215
+ // DOM Elements
216
+ function createFactory<T extends HTMLElement>(
217
+ type: keyof ReactHTML): HTMLFactory<T>;
218
+ function createFactory(
219
+ type: keyof ReactSVG): SVGFactory;
220
+ function createFactory<P extends DOMAttributes<T>, T extends Element>(
221
+ type: string): DOMFactory<P, T>;
222
+
223
+ // Custom components
224
+ function createFactory<P>(type: FunctionComponent<P>): FunctionComponentFactory<P>;
225
+ function createFactory<P>(
226
+ type: ClassType<P, ClassicComponent<P, ComponentState>, ClassicComponentClass<P>>): CFactory<P, ClassicComponent<P, ComponentState>>;
227
+ function createFactory<P, T extends Component<P, ComponentState>, C extends ComponentClass<P>>(
228
+ type: ClassType<P, T, C>): CFactory<P, T>;
229
+ function createFactory<P>(type: ComponentClass<P>): Factory<P>;
230
+
231
+ // DOM Elements
232
+ // TODO: generalize this to everything in `keyof ReactHTML`, not just "input"
233
+ function createElement(
234
+ type: "input",
235
+ props?: InputHTMLAttributes<HTMLInputElement> & ClassAttributes<HTMLInputElement> | null,
236
+ ...children: ReactNode[]): DetailedReactHTMLElement<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
237
+ function createElement<P extends HTMLAttributes<T>, T extends HTMLElement>(
238
+ type: keyof ReactHTML,
239
+ props?: ClassAttributes<T> & P | null,
240
+ ...children: ReactNode[]): DetailedReactHTMLElement<P, T>;
241
+ function createElement<P extends SVGAttributes<T>, T extends SVGElement>(
242
+ type: keyof ReactSVG,
243
+ props?: ClassAttributes<T> & P | null,
244
+ ...children: ReactNode[]): ReactSVGElement;
245
+ function createElement<P extends DOMAttributes<T>, T extends Element>(
246
+ type: string,
247
+ props?: ClassAttributes<T> & P | null,
248
+ ...children: ReactNode[]): DOMElement<P, T>;
249
+
250
+ // Custom components
251
+
252
+ function createElement<P extends {}>(
253
+ type: FunctionComponent<P>,
254
+ props?: Attributes & P | null,
255
+ ...children: ReactNode[]): FunctionComponentElement<P>;
256
+ function createElement<P extends {}>(
257
+ type: ClassType<P, ClassicComponent<P, ComponentState>, ClassicComponentClass<P>>,
258
+ props?: ClassAttributes<ClassicComponent<P, ComponentState>> & P | null,
259
+ ...children: ReactNode[]): CElement<P, ClassicComponent<P, ComponentState>>;
260
+ function createElement<P extends {}, T extends Component<P, ComponentState>, C extends ComponentClass<P>>(
261
+ type: ClassType<P, T, C>,
262
+ props?: ClassAttributes<T> & P | null,
263
+ ...children: ReactNode[]): CElement<P, T>;
264
+ function createElement<P extends {}>(
265
+ type: FunctionComponent<P> | ComponentClass<P> | string,
266
+ props?: Attributes & P | null,
267
+ ...children: ReactNode[]): ReactElement<P>;
268
+
269
+ // DOM Elements
270
+ // ReactHTMLElement
271
+ function cloneElement<P extends HTMLAttributes<T>, T extends HTMLElement>(
272
+ element: DetailedReactHTMLElement<P, T>,
273
+ props?: P,
274
+ ...children: ReactNode[]): DetailedReactHTMLElement<P, T>;
275
+ // ReactHTMLElement, less specific
276
+ function cloneElement<P extends HTMLAttributes<T>, T extends HTMLElement>(
277
+ element: ReactHTMLElement<T>,
278
+ props?: P,
279
+ ...children: ReactNode[]): ReactHTMLElement<T>;
280
+ // SVGElement
281
+ function cloneElement<P extends SVGAttributes<T>, T extends SVGElement>(
282
+ element: ReactSVGElement,
283
+ props?: P,
284
+ ...children: ReactNode[]): ReactSVGElement;
285
+ // DOM Element (has to be the last, because type checking stops at first overload that fits)
286
+ function cloneElement<P extends DOMAttributes<T>, T extends Element>(
287
+ element: DOMElement<P, T>,
288
+ props?: DOMAttributes<T> & P,
289
+ ...children: ReactNode[]): DOMElement<P, T>;
290
+
291
+ // Custom components
292
+ function cloneElement<P>(
293
+ element: FunctionComponentElement<P>,
294
+ props?: Partial<P> & Attributes,
295
+ ...children: ReactNode[]): FunctionComponentElement<P>;
296
+ function cloneElement<P, T extends Component<P, ComponentState>>(
297
+ element: CElement<P, T>,
298
+ props?: Partial<P> & ClassAttributes<T>,
299
+ ...children: ReactNode[]): CElement<P, T>;
300
+ function cloneElement<P>(
301
+ element: ReactElement<P>,
302
+ props?: Partial<P> & Attributes,
303
+ ...children: ReactNode[]): ReactElement<P>;
304
+
305
+ // Context via RenderProps
306
+ interface ProviderProps<T> {
307
+ value: T;
308
+ children?: ReactNode | undefined;
309
+ }
310
+
311
+ interface ConsumerProps<T> {
312
+ children: (value: T) => ReactNode;
313
+ }
314
+
315
+ // TODO: similar to how Fragment is actually a symbol, the values returned from createContext,
316
+ // forwardRef and memo are actually objects that are treated specially by the renderer; see:
317
+ // https://github.com/facebook/react/blob/v16.6.0/packages/react/src/ReactContext.js#L35-L48
318
+ // https://github.com/facebook/react/blob/v16.6.0/packages/react/src/forwardRef.js#L42-L45
319
+ // https://github.com/facebook/react/blob/v16.6.0/packages/react/src/memo.js#L27-L31
320
+ // However, we have no way of telling the JSX parser that it's a JSX element type or its props other than
321
+ // by pretending to be a normal component.
322
+ //
323
+ // We don't just use ComponentType or FunctionComponent types because you are not supposed to attach statics to this
324
+ // object, but rather to the original function.
325
+ interface ExoticComponent<P = {}> {
326
+ /**
327
+ * **NOTE**: Exotic components are not callable.
328
+ */
329
+ (props: P): (ReactElement|null);
330
+ readonly $$typeof: symbol;
331
+ }
332
+
333
+ interface NamedExoticComponent<P = {}> extends ExoticComponent<P> {
334
+ displayName?: string | undefined;
335
+ }
336
+
337
+ interface ProviderExoticComponent<P> extends ExoticComponent<P> {
338
+ propTypes?: WeakValidationMap<P> | undefined;
339
+ }
340
+
341
+ type ContextType<C extends Context<any>> = C extends Context<infer T> ? T : never;
342
+
343
+ // NOTE: only the Context object itself can get a displayName
344
+ // https://github.com/facebook/react-devtools/blob/e0b854e4c/backend/attachRendererFiber.js#L310-L325
345
+ type Provider<T> = ProviderExoticComponent<ProviderProps<T>>;
346
+ type Consumer<T> = ExoticComponent<ConsumerProps<T>>;
347
+ interface Context<T> {
348
+ Provider: Provider<T>;
349
+ Consumer: Consumer<T>;
350
+ displayName?: string | undefined;
351
+ }
352
+ function createContext<T>(
353
+ // If you thought this should be optional, see
354
+ // https://github.com/DefinitelyTyped/DefinitelyTyped/pull/24509#issuecomment-382213106
355
+ defaultValue: T,
356
+ ): Context<T>;
357
+
358
+ function isValidElement<P>(object: {} | null | undefined): object is ReactElement<P>;
359
+
360
+ // Sync with `ReactChildren` until `ReactChildren` is removed.
361
+ const Children: {
362
+ map<T, C>(children: C | ReadonlyArray<C>, fn: (child: C, index: number) => T):
363
+ C extends null | undefined ? C : Array<Exclude<T, boolean | null | undefined>>;
364
+ forEach<C>(children: C | ReadonlyArray<C>, fn: (child: C, index: number) => void): void;
365
+ count(children: any): number;
366
+ only<C>(children: C): C extends any[] ? never : C;
367
+ toArray(children: ReactNode | ReactNode[]): Array<Exclude<ReactNode, boolean | null | undefined>>;
368
+ };
369
+ const Fragment: ExoticComponent<{ children?: ReactNode | undefined }>;
370
+ const StrictMode: ExoticComponent<{ children?: ReactNode | undefined }>;
371
+
372
+ interface SuspenseProps {
373
+ children?: ReactNode | undefined;
374
+
375
+ /** A fallback react tree to show when a Suspense child (like React.lazy) suspends */
376
+ fallback?: ReactNode;
377
+ }
378
+
379
+ const Suspense: ExoticComponent<SuspenseProps>;
380
+ const version: string;
381
+
382
+ /**
383
+ * {@link https://react.dev/reference/react/Profiler#onrender-callback Profiler API}
384
+ */
385
+ type ProfilerOnRenderCallback = (
386
+ id: string,
387
+ phase: "mount" | "update",
388
+ actualDuration: number,
389
+ baseDuration: number,
390
+ startTime: number,
391
+ commitTime: number,
392
+ interactions: Set<SchedulerInteraction>,
393
+ ) => void;
394
+ interface ProfilerProps {
395
+ children?: ReactNode | undefined;
396
+ id: string;
397
+ onRender: ProfilerOnRenderCallback;
398
+ }
399
+
400
+ const Profiler: ExoticComponent<ProfilerProps>;
401
+
402
+ //
403
+ // Component API
404
+ // ----------------------------------------------------------------------
405
+
406
+ type ReactInstance = Component<any> | Element;
407
+
408
+ // Base component for plain JS classes
409
+ interface Component<P = {}, S = {}, SS = any> extends ComponentLifecycle<P, S, SS> { }
410
+ class Component<P, S> {
411
+ // tslint won't let me format the sample code in a way that vscode likes it :(
412
+ /**
413
+ * If set, `this.context` will be set at runtime to the current value of the given Context.
414
+ *
415
+ * Usage:
416
+ *
417
+ * ```ts
418
+ * type MyContext = number
419
+ * const Ctx = React.createContext<MyContext>(0)
420
+ *
421
+ * class Foo extends React.Component {
422
+ * static contextType = Ctx
423
+ * context!: React.ContextType<typeof Ctx>
424
+ * render () {
425
+ * return <>My context's value: {this.context}</>;
426
+ * }
427
+ * }
428
+ * ```
429
+ *
430
+ * @see https://react.dev/reference/react/Component#static-contexttype
431
+ */
432
+ static contextType?: Context<any> | undefined;
433
+
434
+ /**
435
+ * If using the new style context, re-declare this in your class to be the
436
+ * `React.ContextType` of your `static contextType`.
437
+ * Should be used with type annotation or static contextType.
438
+ *
439
+ * ```ts
440
+ * static contextType = MyContext
441
+ * // For TS pre-3.7:
442
+ * context!: React.ContextType<typeof MyContext>
443
+ * // For TS 3.7 and above:
444
+ * declare context: React.ContextType<typeof MyContext>
445
+ * ```
446
+ *
447
+ * @see https://react.dev/reference/react/Component#context
448
+ */
449
+ context: unknown;
450
+
451
+ constructor(props: Readonly<P> | P);
452
+ /**
453
+ * @deprecated
454
+ * @see https://legacy.reactjs.org/docs/legacy-context.html
455
+ */
456
+ constructor(props: P, context: any);
457
+
458
+ // We MUST keep setState() as a unified signature because it allows proper checking of the method return type.
459
+ // See: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/18365#issuecomment-351013257
460
+ // Also, the ` | S` allows intellisense to not be dumbisense
461
+ setState<K extends keyof S>(
462
+ state: ((prevState: Readonly<S>, props: Readonly<P>) => (Pick<S, K> | S | null)) | (Pick<S, K> | S | null),
463
+ callback?: () => void
464
+ ): void;
465
+
466
+ forceUpdate(callback?: () => void): void;
467
+ render(): ReactNode;
468
+
469
+ readonly props: Readonly<P>;
470
+ state: Readonly<S>;
471
+ /**
472
+ * @deprecated
473
+ * https://legacy.reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs
474
+ */
475
+ refs: {
476
+ [key: string]: ReactInstance
477
+ };
478
+ }
479
+
480
+ class PureComponent<P = {}, S = {}, SS = any> extends Component<P, S, SS> { }
481
+
482
+ interface ClassicComponent<P = {}, S = {}> extends Component<P, S> {
483
+ replaceState(nextState: S, callback?: () => void): void;
484
+ isMounted(): boolean;
485
+ getInitialState?(): S;
486
+ }
487
+
488
+ interface ChildContextProvider<CC> {
489
+ getChildContext(): CC;
490
+ }
491
+
492
+ //
493
+ // Class Interfaces
494
+ // ----------------------------------------------------------------------
495
+
496
+ type FC<P = {}> = FunctionComponent<P>;
497
+
498
+ interface FunctionComponent<P = {}> {
499
+ (props: P, context?: any): ReactElement<any, any> | null;
500
+ propTypes?: WeakValidationMap<P> | undefined;
501
+ contextTypes?: ValidationMap<any> | undefined;
502
+ defaultProps?: Partial<P> | undefined;
503
+ displayName?: string | undefined;
504
+ }
505
+
506
+ /**
507
+ * @deprecated - Equivalent with `React.FC`.
508
+ */
509
+ type VFC<P = {}> = VoidFunctionComponent<P>;
510
+
511
+ /**
512
+ * @deprecated - Equivalent with `React.FunctionComponent`.
513
+ */
514
+ interface VoidFunctionComponent<P = {}> {
515
+ (props: P, context?: any): ReactElement<any, any> | null;
516
+ propTypes?: WeakValidationMap<P> | undefined;
517
+ contextTypes?: ValidationMap<any> | undefined;
518
+ defaultProps?: Partial<P> | undefined;
519
+ displayName?: string | undefined;
520
+ }
521
+
522
+ type ForwardedRef<T> = ((instance: T | null) => void) | MutableRefObject<T | null> | null;
523
+
524
+ interface ForwardRefRenderFunction<T, P = {}> {
525
+ (props: P, ref: ForwardedRef<T>): ReactElement | null;
526
+ displayName?: string | undefined;
527
+ // explicit rejected with `never` required due to
528
+ // https://github.com/microsoft/TypeScript/issues/36826
529
+ /**
530
+ * defaultProps are not supported on render functions
531
+ */
532
+ defaultProps?: never | undefined;
533
+ /**
534
+ * propTypes are not supported on render functions
535
+ */
536
+ propTypes?: never | undefined;
537
+ }
538
+
539
+ interface ComponentClass<P = {}, S = ComponentState> extends StaticLifecycle<P, S> {
540
+ new (props: P, context?: any): Component<P, S>;
541
+ propTypes?: WeakValidationMap<P> | undefined;
542
+ contextType?: Context<any> | undefined;
543
+ contextTypes?: ValidationMap<any> | undefined;
544
+ childContextTypes?: ValidationMap<any> | undefined;
545
+ defaultProps?: Partial<P> | undefined;
546
+ displayName?: string | undefined;
547
+ }
548
+
549
+ interface ClassicComponentClass<P = {}> extends ComponentClass<P> {
550
+ new (props: P, context?: any): ClassicComponent<P, ComponentState>;
551
+ getDefaultProps?(): P;
552
+ }
553
+
554
+ /**
555
+ * We use an intersection type to infer multiple type parameters from
556
+ * a single argument, which is useful for many top-level API defs.
557
+ * See https://github.com/Microsoft/TypeScript/issues/7234 for more info.
558
+ */
559
+ type ClassType<P, T extends Component<P, ComponentState>, C extends ComponentClass<P>> =
560
+ C &
561
+ (new (props: P, context?: any) => T);
562
+
563
+ //
564
+ // Component Specs and Lifecycle
565
+ // ----------------------------------------------------------------------
566
+
567
+ // This should actually be something like `Lifecycle<P, S> | DeprecatedLifecycle<P, S>`,
568
+ // as React will _not_ call the deprecated lifecycle methods if any of the new lifecycle
569
+ // methods are present.
570
+ interface ComponentLifecycle<P, S, SS = any> extends NewLifecycle<P, S, SS>, DeprecatedLifecycle<P, S> {
571
+ /**
572
+ * Called immediately after a component is mounted. Setting state here will trigger re-rendering.
573
+ */
574
+ componentDidMount?(): void;
575
+ /**
576
+ * Called to determine whether the change in props and state should trigger a re-render.
577
+ *
578
+ * `Component` always returns true.
579
+ * `PureComponent` implements a shallow comparison on props and state and returns true if any
580
+ * props or states have changed.
581
+ *
582
+ * If false is returned, `Component#render`, `componentWillUpdate`
583
+ * and `componentDidUpdate` will not be called.
584
+ */
585
+ shouldComponentUpdate?(nextProps: Readonly<P>, nextState: Readonly<S>, nextContext: any): boolean;
586
+ /**
587
+ * Called immediately before a component is destroyed. Perform any necessary cleanup in this method, such as
588
+ * cancelled network requests, or cleaning up any DOM elements created in `componentDidMount`.
589
+ */
590
+ componentWillUnmount?(): void;
591
+ /**
592
+ * Catches exceptions generated in descendant components. Unhandled exceptions will cause
593
+ * the entire component tree to unmount.
594
+ */
595
+ componentDidCatch?(error: Error, errorInfo: ErrorInfo): void;
596
+ }
597
+
598
+ // Unfortunately, we have no way of declaring that the component constructor must implement this
599
+ interface StaticLifecycle<P, S> {
600
+ getDerivedStateFromProps?: GetDerivedStateFromProps<P, S> | undefined;
601
+ getDerivedStateFromError?: GetDerivedStateFromError<P, S> | undefined;
602
+ }
603
+
604
+ type GetDerivedStateFromProps<P, S> =
605
+ /**
606
+ * Returns an update to a component's state based on its new props and old state.
607
+ *
608
+ * Note: its presence prevents any of the deprecated lifecycle methods from being invoked
609
+ */
610
+ (nextProps: Readonly<P>, prevState: S) => Partial<S> | null;
611
+
612
+ type GetDerivedStateFromError<P, S> =
613
+ /**
614
+ * This lifecycle is invoked after an error has been thrown by a descendant component.
615
+ * It receives the error that was thrown as a parameter and should return a value to update state.
616
+ *
617
+ * Note: its presence prevents any of the deprecated lifecycle methods from being invoked
618
+ */
619
+ (error: any) => Partial<S> | null;
620
+
621
+ // This should be "infer SS" but can't use it yet
622
+ interface NewLifecycle<P, S, SS> {
623
+ /**
624
+ * Runs before React applies the result of `render` to the document, and
625
+ * returns an object to be given to componentDidUpdate. Useful for saving
626
+ * things such as scroll position before `render` causes changes to it.
627
+ *
628
+ * Note: the presence of getSnapshotBeforeUpdate prevents any of the deprecated
629
+ * lifecycle events from running.
630
+ */
631
+ getSnapshotBeforeUpdate?(prevProps: Readonly<P>, prevState: Readonly<S>): SS | null;
632
+ /**
633
+ * Called immediately after updating occurs. Not called for the initial render.
634
+ *
635
+ * The snapshot is only present if getSnapshotBeforeUpdate is present and returns non-null.
636
+ */
637
+ componentDidUpdate?(prevProps: Readonly<P>, prevState: Readonly<S>, snapshot?: SS): void;
638
+ }
639
+
640
+ interface DeprecatedLifecycle<P, S> {
641
+ /**
642
+ * Called immediately before mounting occurs, and before `Component#render`.
643
+ * Avoid introducing any side-effects or subscriptions in this method.
644
+ *
645
+ * Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps
646
+ * prevents this from being invoked.
647
+ *
648
+ * @deprecated 16.3, use componentDidMount or the constructor instead; will stop working in React 17
649
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state
650
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
651
+ */
652
+ componentWillMount?(): void;
653
+ /**
654
+ * Called immediately before mounting occurs, and before `Component#render`.
655
+ * Avoid introducing any side-effects or subscriptions in this method.
656
+ *
657
+ * This method will not stop working in React 17.
658
+ *
659
+ * Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps
660
+ * prevents this from being invoked.
661
+ *
662
+ * @deprecated 16.3, use componentDidMount or the constructor instead
663
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state
664
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
665
+ */
666
+ UNSAFE_componentWillMount?(): void;
667
+ /**
668
+ * Called when the component may be receiving new props.
669
+ * React may call this even if props have not changed, so be sure to compare new and existing
670
+ * props if you only want to handle changes.
671
+ *
672
+ * Calling `Component#setState` generally does not trigger this method.
673
+ *
674
+ * Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps
675
+ * prevents this from being invoked.
676
+ *
677
+ * @deprecated 16.3, use static getDerivedStateFromProps instead; will stop working in React 17
678
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props
679
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
680
+ */
681
+ componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
682
+ /**
683
+ * Called when the component may be receiving new props.
684
+ * React may call this even if props have not changed, so be sure to compare new and existing
685
+ * props if you only want to handle changes.
686
+ *
687
+ * Calling `Component#setState` generally does not trigger this method.
688
+ *
689
+ * This method will not stop working in React 17.
690
+ *
691
+ * Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps
692
+ * prevents this from being invoked.
693
+ *
694
+ * @deprecated 16.3, use static getDerivedStateFromProps instead
695
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props
696
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
697
+ */
698
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
699
+ /**
700
+ * Called immediately before rendering when new props or state is received. Not called for the initial render.
701
+ *
702
+ * Note: You cannot call `Component#setState` here.
703
+ *
704
+ * Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps
705
+ * prevents this from being invoked.
706
+ *
707
+ * @deprecated 16.3, use getSnapshotBeforeUpdate instead; will stop working in React 17
708
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update
709
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
710
+ */
711
+ componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<S>, nextContext: any): void;
712
+ /**
713
+ * Called immediately before rendering when new props or state is received. Not called for the initial render.
714
+ *
715
+ * Note: You cannot call `Component#setState` here.
716
+ *
717
+ * This method will not stop working in React 17.
718
+ *
719
+ * Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps
720
+ * prevents this from being invoked.
721
+ *
722
+ * @deprecated 16.3, use getSnapshotBeforeUpdate instead
723
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update
724
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
725
+ */
726
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<S>, nextContext: any): void;
727
+ }
728
+
729
+ interface Mixin<P, S> extends ComponentLifecycle<P, S> {
730
+ mixins?: Array<Mixin<P, S>> | undefined;
731
+ statics?: {
732
+ [key: string]: any;
733
+ } | undefined;
734
+
735
+ displayName?: string | undefined;
736
+ propTypes?: ValidationMap<any> | undefined;
737
+ contextTypes?: ValidationMap<any> | undefined;
738
+ childContextTypes?: ValidationMap<any> | undefined;
739
+
740
+ getDefaultProps?(): P;
741
+ getInitialState?(): S;
742
+ }
743
+
744
+ interface ComponentSpec<P, S> extends Mixin<P, S> {
745
+ render(): ReactNode;
746
+
747
+ [propertyName: string]: any;
748
+ }
749
+
750
+ function createRef<T>(): RefObject<T>;
751
+
752
+ // will show `ForwardRef(${Component.displayName || Component.name})` in devtools by default,
753
+ // but can be given its own specific name
754
+ interface ForwardRefExoticComponent<P> extends NamedExoticComponent<P> {
755
+ defaultProps?: Partial<P> | undefined;
756
+ propTypes?: WeakValidationMap<P> | undefined;
757
+ }
758
+
759
+ function forwardRef<T, P = {}>(render: ForwardRefRenderFunction<T, P>): ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>>;
760
+
761
+ /** Ensures that the props do not include ref at all */
762
+ type PropsWithoutRef<P> =
763
+ // Omit would not be sufficient for this. We'd like to avoid unnecessary mapping and need a distributive conditional to support unions.
764
+ // see: https://www.typescriptlang.org/docs/handbook/2/conditional-types.html#distributive-conditional-types
765
+ // https://github.com/Microsoft/TypeScript/issues/28339
766
+ P extends any ? ('ref' extends keyof P ? Omit<P, 'ref'> : P) : P;
767
+ /** Ensures that the props do not include string ref, which cannot be forwarded */
768
+ type PropsWithRef<P> =
769
+ // Just "P extends { ref?: infer R }" looks sufficient, but R will infer as {} if P is {}.
770
+ 'ref' extends keyof P
771
+ ? P extends { ref?: infer R | undefined }
772
+ ? string extends R
773
+ ? PropsWithoutRef<P> & { ref?: Exclude<R, string> | undefined }
774
+ : P
775
+ : P
776
+ : P;
777
+
778
+ type PropsWithChildren<P = unknown> = P & { children?: ReactNode | undefined };
779
+
780
+ /**
781
+ * NOTE: prefer ComponentPropsWithRef, if the ref is forwarded,
782
+ * or ComponentPropsWithoutRef when refs are not supported.
783
+ */
784
+ type ComponentProps<T extends keyof JSX.IntrinsicElements | JSXElementConstructor<any>> =
785
+ T extends JSXElementConstructor<infer P>
786
+ ? P
787
+ : T extends keyof JSX.IntrinsicElements
788
+ ? JSX.IntrinsicElements[T]
789
+ : {};
790
+ type ComponentPropsWithRef<T extends ElementType> =
791
+ T extends (new (props: infer P) => Component<any, any>)
792
+ ? PropsWithoutRef<P> & RefAttributes<InstanceType<T>>
793
+ : PropsWithRef<ComponentProps<T>>;
794
+ type ComponentPropsWithoutRef<T extends ElementType> =
795
+ PropsWithoutRef<ComponentProps<T>>;
796
+
797
+ type ComponentRef<T extends ElementType> = T extends NamedExoticComponent<
798
+ ComponentPropsWithoutRef<T> & RefAttributes<infer Method>
799
+ >
800
+ ? Method
801
+ : ComponentPropsWithRef<T> extends RefAttributes<infer Method>
802
+ ? Method
803
+ : never;
804
+
805
+ // will show `Memo(${Component.displayName || Component.name})` in devtools by default,
806
+ // but can be given its own specific name
807
+ type MemoExoticComponent<T extends ComponentType<any>> = NamedExoticComponent<ComponentPropsWithRef<T>> & {
808
+ readonly type: T;
809
+ };
810
+
811
+ function memo<P extends object>(
812
+ Component: FunctionComponent<P>,
813
+ propsAreEqual?: (prevProps: Readonly<P>, nextProps: Readonly<P>) => boolean
814
+ ): NamedExoticComponent<P>;
815
+ function memo<T extends ComponentType<any>>(
816
+ Component: T,
817
+ propsAreEqual?: (prevProps: Readonly<ComponentProps<T>>, nextProps: Readonly<ComponentProps<T>>) => boolean
818
+ ): MemoExoticComponent<T>;
819
+
820
+ type LazyExoticComponent<T extends ComponentType<any>> = ExoticComponent<ComponentPropsWithRef<T>> & {
821
+ readonly _result: T;
822
+ };
823
+
824
+ function lazy<T extends ComponentType<any>>(
825
+ factory: () => Promise<{ default: T }>
826
+ ): LazyExoticComponent<T>;
827
+
828
+ //
829
+ // React Hooks
830
+ // ----------------------------------------------------------------------
831
+
832
+ // based on the code in https://github.com/facebook/react/pull/13968
833
+
834
+ // Unlike the class component setState, the updates are not allowed to be partial
835
+ type SetStateAction<S> = S | ((prevState: S) => S);
836
+ // this technically does accept a second argument, but it's already under a deprecation warning
837
+ // and it's not even released so probably better to not define it.
838
+ type Dispatch<A> = (value: A) => void;
839
+ // Since action _can_ be undefined, dispatch may be called without any parameters.
840
+ type DispatchWithoutAction = () => void;
841
+ // Unlike redux, the actions _can_ be anything
842
+ type Reducer<S, A> = (prevState: S, action: A) => S;
843
+ // If useReducer accepts a reducer without action, dispatch may be called without any parameters.
844
+ type ReducerWithoutAction<S> = (prevState: S) => S;
845
+ // types used to try and prevent the compiler from reducing S
846
+ // to a supertype common with the second argument to useReducer()
847
+ type ReducerState<R extends Reducer<any, any>> = R extends Reducer<infer S, any> ? S : never;
848
+ type ReducerAction<R extends Reducer<any, any>> = R extends Reducer<any, infer A> ? A : never;
849
+ // The identity check is done with the SameValue algorithm (Object.is), which is stricter than ===
850
+ type ReducerStateWithoutAction<R extends ReducerWithoutAction<any>> =
851
+ R extends ReducerWithoutAction<infer S> ? S : never;
852
+ type DependencyList = ReadonlyArray<unknown>;
853
+
854
+ // NOTE: callbacks are _only_ allowed to return either void, or a destructor.
855
+ type EffectCallback = () => (void | Destructor);
856
+
857
+ interface MutableRefObject<T> {
858
+ current: T;
859
+ }
860
+
861
+ // This will technically work if you give a Consumer<T> or Provider<T> but it's deprecated and warns
862
+ /**
863
+ * Accepts a context object (the value returned from `React.createContext`) and returns the current
864
+ * context value, as given by the nearest context provider for the given context.
865
+ *
866
+ * @version 16.8.0
867
+ * @see https://react.dev/reference/react/useContext
868
+ */
869
+ function useContext<T>(context: Context<T>/*, (not public API) observedBits?: number|boolean */): T;
870
+ /**
871
+ * Returns a stateful value, and a function to update it.
872
+ *
873
+ * @version 16.8.0
874
+ * @see https://react.dev/reference/react/useState
875
+ */
876
+ function useState<S>(initialState: S | (() => S)): [S, Dispatch<SetStateAction<S>>];
877
+ // convenience overload when first argument is omitted
878
+ /**
879
+ * Returns a stateful value, and a function to update it.
880
+ *
881
+ * @version 16.8.0
882
+ * @see https://react.dev/reference/react/useState
883
+ */
884
+ function useState<S = undefined>(): [S | undefined, Dispatch<SetStateAction<S | undefined>>];
885
+ /**
886
+ * An alternative to `useState`.
887
+ *
888
+ * `useReducer` is usually preferable to `useState` when you have complex state logic that involves
889
+ * multiple sub-values. It also lets you optimize performance for components that trigger deep
890
+ * updates because you can pass `dispatch` down instead of callbacks.
891
+ *
892
+ * @version 16.8.0
893
+ * @see https://react.dev/reference/react/useReducer
894
+ */
895
+ // overload where dispatch could accept 0 arguments.
896
+ function useReducer<R extends ReducerWithoutAction<any>, I>(
897
+ reducer: R,
898
+ initializerArg: I,
899
+ initializer: (arg: I) => ReducerStateWithoutAction<R>
900
+ ): [ReducerStateWithoutAction<R>, DispatchWithoutAction];
901
+ /**
902
+ * An alternative to `useState`.
903
+ *
904
+ * `useReducer` is usually preferable to `useState` when you have complex state logic that involves
905
+ * multiple sub-values. It also lets you optimize performance for components that trigger deep
906
+ * updates because you can pass `dispatch` down instead of callbacks.
907
+ *
908
+ * @version 16.8.0
909
+ * @see https://react.dev/reference/react/useReducer
910
+ */
911
+ // overload where dispatch could accept 0 arguments.
912
+ function useReducer<R extends ReducerWithoutAction<any>>(
913
+ reducer: R,
914
+ initializerArg: ReducerStateWithoutAction<R>,
915
+ initializer?: undefined
916
+ ): [ReducerStateWithoutAction<R>, DispatchWithoutAction];
917
+ /**
918
+ * An alternative to `useState`.
919
+ *
920
+ * `useReducer` is usually preferable to `useState` when you have complex state logic that involves
921
+ * multiple sub-values. It also lets you optimize performance for components that trigger deep
922
+ * updates because you can pass `dispatch` down instead of callbacks.
923
+ *
924
+ * @version 16.8.0
925
+ * @see https://react.dev/reference/react/useReducer
926
+ */
927
+ // overload where "I" may be a subset of ReducerState<R>; used to provide autocompletion.
928
+ // If "I" matches ReducerState<R> exactly then the last overload will allow initializer to be omitted.
929
+ // the last overload effectively behaves as if the identity function (x => x) is the initializer.
930
+ function useReducer<R extends Reducer<any, any>, I>(
931
+ reducer: R,
932
+ initializerArg: I & ReducerState<R>,
933
+ initializer: (arg: I & ReducerState<R>) => ReducerState<R>
934
+ ): [ReducerState<R>, Dispatch<ReducerAction<R>>];
935
+ /**
936
+ * An alternative to `useState`.
937
+ *
938
+ * `useReducer` is usually preferable to `useState` when you have complex state logic that involves
939
+ * multiple sub-values. It also lets you optimize performance for components that trigger deep
940
+ * updates because you can pass `dispatch` down instead of callbacks.
941
+ *
942
+ * @version 16.8.0
943
+ * @see https://react.dev/reference/react/useReducer
944
+ */
945
+ // overload for free "I"; all goes as long as initializer converts it into "ReducerState<R>".
946
+ function useReducer<R extends Reducer<any, any>, I>(
947
+ reducer: R,
948
+ initializerArg: I,
949
+ initializer: (arg: I) => ReducerState<R>
950
+ ): [ReducerState<R>, Dispatch<ReducerAction<R>>];
951
+ /**
952
+ * An alternative to `useState`.
953
+ *
954
+ * `useReducer` is usually preferable to `useState` when you have complex state logic that involves
955
+ * multiple sub-values. It also lets you optimize performance for components that trigger deep
956
+ * updates because you can pass `dispatch` down instead of callbacks.
957
+ *
958
+ * @version 16.8.0
959
+ * @see https://react.dev/reference/react/useReducer
960
+ */
961
+
962
+ // I'm not sure if I keep this 2-ary or if I make it (2,3)-ary; it's currently (2,3)-ary.
963
+ // The Flow types do have an overload for 3-ary invocation with undefined initializer.
964
+
965
+ // NOTE: without the ReducerState indirection, TypeScript would reduce S to be the most common
966
+ // supertype between the reducer's return type and the initialState (or the initializer's return type),
967
+ // which would prevent autocompletion from ever working.
968
+
969
+ // TODO: double-check if this weird overload logic is necessary. It is possible it's either a bug
970
+ // in older versions, or a regression in newer versions of the typescript completion service.
971
+ function useReducer<R extends Reducer<any, any>>(
972
+ reducer: R,
973
+ initialState: ReducerState<R>,
974
+ initializer?: undefined
975
+ ): [ReducerState<R>, Dispatch<ReducerAction<R>>];
976
+ /**
977
+ * `useRef` returns a mutable ref object whose `.current` property is initialized to the passed argument
978
+ * (`initialValue`). The returned object will persist for the full lifetime of the component.
979
+ *
980
+ * Note that `useRef()` is useful for more than the `ref` attribute. It’s handy for keeping any mutable
981
+ * value around similar to how you’d use instance fields in classes.
982
+ *
983
+ * @version 16.8.0
984
+ * @see https://react.dev/reference/react/useRef
985
+ */
986
+ function useRef<T>(initialValue: T): MutableRefObject<T>;
987
+ // convenience overload for refs given as a ref prop as they typically start with a null value
988
+ /**
989
+ * `useRef` returns a mutable ref object whose `.current` property is initialized to the passed argument
990
+ * (`initialValue`). The returned object will persist for the full lifetime of the component.
991
+ *
992
+ * Note that `useRef()` is useful for more than the `ref` attribute. It’s handy for keeping any mutable
993
+ * value around similar to how you’d use instance fields in classes.
994
+ *
995
+ * Usage note: if you need the result of useRef to be directly mutable, include `| null` in the type
996
+ * of the generic argument.
997
+ *
998
+ * @version 16.8.0
999
+ * @see https://react.dev/reference/react/useRef
1000
+ */
1001
+ function useRef<T>(initialValue: T|null): RefObject<T>;
1002
+ // convenience overload for potentially undefined initialValue / call with 0 arguments
1003
+ // has a default to stop it from defaulting to {} instead
1004
+ /**
1005
+ * `useRef` returns a mutable ref object whose `.current` property is initialized to the passed argument
1006
+ * (`initialValue`). The returned object will persist for the full lifetime of the component.
1007
+ *
1008
+ * Note that `useRef()` is useful for more than the `ref` attribute. It’s handy for keeping any mutable
1009
+ * value around similar to how you’d use instance fields in classes.
1010
+ *
1011
+ * @version 16.8.0
1012
+ * @see https://react.dev/reference/react/useRef
1013
+ */
1014
+ function useRef<T = undefined>(): MutableRefObject<T | undefined>;
1015
+ /**
1016
+ * The signature is identical to `useEffect`, but it fires synchronously after all DOM mutations.
1017
+ * Use this to read layout from the DOM and synchronously re-render. Updates scheduled inside
1018
+ * `useLayoutEffect` will be flushed synchronously, before the browser has a chance to paint.
1019
+ *
1020
+ * Prefer the standard `useEffect` when possible to avoid blocking visual updates.
1021
+ *
1022
+ * If you’re migrating code from a class component, `useLayoutEffect` fires in the same phase as
1023
+ * `componentDidMount` and `componentDidUpdate`.
1024
+ *
1025
+ * @version 16.8.0
1026
+ * @see https://react.dev/reference/react/useLayoutEffect
1027
+ */
1028
+ function useLayoutEffect(effect: EffectCallback, deps?: DependencyList): void;
1029
+ /**
1030
+ * Accepts a function that contains imperative, possibly effectful code.
1031
+ *
1032
+ * @param effect Imperative function that can return a cleanup function
1033
+ * @param deps If present, effect will only activate if the values in the list change.
1034
+ *
1035
+ * @version 16.8.0
1036
+ * @see https://react.dev/reference/react/useEffect
1037
+ */
1038
+ function useEffect(effect: EffectCallback, deps?: DependencyList): void;
1039
+ // NOTE: this does not accept strings, but this will have to be fixed by removing strings from type Ref<T>
1040
+ /**
1041
+ * `useImperativeHandle` customizes the instance value that is exposed to parent components when using
1042
+ * `ref`. As always, imperative code using refs should be avoided in most cases.
1043
+ *
1044
+ * `useImperativeHandle` should be used with `React.forwardRef`.
1045
+ *
1046
+ * @version 16.8.0
1047
+ * @see https://react.dev/reference/react/useImperativeHandle
1048
+ */
1049
+ function useImperativeHandle<T, R extends T>(ref: Ref<T>|undefined, init: () => R, deps?: DependencyList): void;
1050
+ // I made 'inputs' required here and in useMemo as there's no point to memoizing without the memoization key
1051
+ // useCallback(X) is identical to just using X, useMemo(() => Y) is identical to just using Y.
1052
+ /**
1053
+ * `useCallback` will return a memoized version of the callback that only changes if one of the `inputs`
1054
+ * has changed.
1055
+ *
1056
+ * @version 16.8.0
1057
+ * @see https://react.dev/reference/react/useCallback
1058
+ */
1059
+ // A specific function type would not trigger implicit any.
1060
+ // See https://github.com/DefinitelyTyped/DefinitelyTyped/issues/52873#issuecomment-845806435 for a comparison between `Function` and more specific types.
1061
+ // tslint:disable-next-line ban-types
1062
+ function useCallback<T extends Function>(callback: T, deps: DependencyList): T;
1063
+ /**
1064
+ * `useMemo` will only recompute the memoized value when one of the `deps` has changed.
1065
+ *
1066
+ * @version 16.8.0
1067
+ * @see https://react.dev/reference/react/useMemo
1068
+ */
1069
+ // allow undefined, but don't make it optional as that is very likely a mistake
1070
+ function useMemo<T>(factory: () => T, deps: DependencyList | undefined): T;
1071
+ /**
1072
+ * `useDebugValue` can be used to display a label for custom hooks in React DevTools.
1073
+ *
1074
+ * NOTE: We don’t recommend adding debug values to every custom hook.
1075
+ * It’s most valuable for custom hooks that are part of shared libraries.
1076
+ *
1077
+ * @version 16.8.0
1078
+ * @see https://react.dev/reference/react/useDebugValue
1079
+ */
1080
+ // the name of the custom hook is itself derived from the function name at runtime:
1081
+ // it's just the function name without the "use" prefix.
1082
+ function useDebugValue<T>(value: T, format?: (value: T) => any): void;
1083
+
1084
+ // must be synchronous
1085
+ export type TransitionFunction = () => VoidOrUndefinedOnly;
1086
+ // strange definition to allow vscode to show documentation on the invocation
1087
+ export interface TransitionStartFunction {
1088
+ /**
1089
+ * State updates caused inside the callback are allowed to be deferred.
1090
+ *
1091
+ * **If some state update causes a component to suspend, that state update should be wrapped in a transition.**
1092
+ *
1093
+ * @param callback A _synchronous_ function which causes state updates that can be deferred.
1094
+ */
1095
+ (callback: TransitionFunction): void;
1096
+ }
1097
+
1098
+ /**
1099
+ * Returns a deferred version of the value that may “lag behind” it.
1100
+ *
1101
+ * This is commonly used to keep the interface responsive when you have something that renders immediately
1102
+ * based on user input and something that needs to wait for a data fetch.
1103
+ *
1104
+ * A good example of this is a text input.
1105
+ *
1106
+ * @param value The value that is going to be deferred
1107
+ *
1108
+ * @see https://react.dev/reference/react/useDeferredValue
1109
+ */
1110
+ export function useDeferredValue<T>(value: T): T;
1111
+
1112
+ /**
1113
+ * Allows components to avoid undesirable loading states by waiting for content to load
1114
+ * before transitioning to the next screen. It also allows components to defer slower,
1115
+ * data fetching updates until subsequent renders so that more crucial updates can be
1116
+ * rendered immediately.
1117
+ *
1118
+ * The `useTransition` hook returns two values in an array.
1119
+ *
1120
+ * The first is a boolean, React’s way of informing us whether we’re waiting for the transition to finish.
1121
+ * The second is a function that takes a callback. We can use it to tell React which state we want to defer.
1122
+ *
1123
+ * **If some state update causes a component to suspend, that state update should be wrapped in a transition.**`
1124
+ *
1125
+ * @see https://react.dev/reference/react/useTransition
1126
+ */
1127
+ export function useTransition(): [boolean, TransitionStartFunction];
1128
+
1129
+ /**
1130
+ * Similar to `useTransition` but allows uses where hooks are not available.
1131
+ *
1132
+ * @param callback A _synchronous_ function which causes state updates that can be deferred.
1133
+ */
1134
+ export function startTransition(scope: TransitionFunction): void;
1135
+
1136
+ export function useId(): string;
1137
+
1138
+ /**
1139
+ * @param effect Imperative function that can return a cleanup function
1140
+ * @param deps If present, effect will only activate if the values in the list change.
1141
+ *
1142
+ * @see https://github.com/facebook/react/pull/21913
1143
+ */
1144
+ export function useInsertionEffect(effect: EffectCallback, deps?: DependencyList): void;
1145
+
1146
+ /**
1147
+ * @param subscribe
1148
+ * @param getSnapshot
1149
+ *
1150
+ * @see https://github.com/reactwg/react-18/discussions/86
1151
+ */
1152
+ // keep in sync with `useSyncExternalStore` from `use-sync-external-store`
1153
+ export function useSyncExternalStore<Snapshot>(
1154
+ subscribe: (onStoreChange: () => void) => () => void,
1155
+ getSnapshot: () => Snapshot,
1156
+ getServerSnapshot?: () => Snapshot,
1157
+ ): Snapshot;
1158
+
1159
+ //
1160
+ // Event System
1161
+ // ----------------------------------------------------------------------
1162
+ // TODO: change any to unknown when moving to TS v3
1163
+ interface BaseSyntheticEvent<E = object, C = any, T = any> {
1164
+ nativeEvent: E;
1165
+ currentTarget: C;
1166
+ target: T;
1167
+ bubbles: boolean;
1168
+ cancelable: boolean;
1169
+ defaultPrevented: boolean;
1170
+ eventPhase: number;
1171
+ isTrusted: boolean;
1172
+ preventDefault(): void;
1173
+ isDefaultPrevented(): boolean;
1174
+ stopPropagation(): void;
1175
+ isPropagationStopped(): boolean;
1176
+ persist(): void;
1177
+ timeStamp: number;
1178
+ type: string;
1179
+ }
1180
+
1181
+ /**
1182
+ * currentTarget - a reference to the element on which the event listener is registered.
1183
+ *
1184
+ * target - a reference to the element from which the event was originally dispatched.
1185
+ * This might be a child element to the element on which the event listener is registered.
1186
+ * If you thought this should be `EventTarget & T`, see https://github.com/DefinitelyTyped/DefinitelyTyped/issues/11508#issuecomment-256045682
1187
+ */
1188
+ interface SyntheticEvent<T = Element, E = Event> extends BaseSyntheticEvent<E, EventTarget & T, EventTarget> {}
1189
+
1190
+ interface ClipboardEvent<T = Element> extends SyntheticEvent<T, NativeClipboardEvent> {
1191
+ clipboardData: DataTransfer;
1192
+ }
1193
+
1194
+ interface CompositionEvent<T = Element> extends SyntheticEvent<T, NativeCompositionEvent> {
1195
+ data: string;
1196
+ }
1197
+
1198
+ interface DragEvent<T = Element> extends MouseEvent<T, NativeDragEvent> {
1199
+ dataTransfer: DataTransfer;
1200
+ }
1201
+
1202
+ interface PointerEvent<T = Element> extends MouseEvent<T, NativePointerEvent> {
1203
+ pointerId: number;
1204
+ pressure: number;
1205
+ tangentialPressure: number;
1206
+ tiltX: number;
1207
+ tiltY: number;
1208
+ twist: number;
1209
+ width: number;
1210
+ height: number;
1211
+ pointerType: 'mouse' | 'pen' | 'touch';
1212
+ isPrimary: boolean;
1213
+ }
1214
+
1215
+ interface FocusEvent<Target = Element, RelatedTarget = Element> extends SyntheticEvent<Target, NativeFocusEvent> {
1216
+ relatedTarget: (EventTarget & RelatedTarget) | null;
1217
+ target: EventTarget & Target;
1218
+ }
1219
+
1220
+ interface FormEvent<T = Element> extends SyntheticEvent<T> {
1221
+ }
1222
+
1223
+ interface InvalidEvent<T = Element> extends SyntheticEvent<T> {
1224
+ target: EventTarget & T;
1225
+ }
1226
+
1227
+ interface ChangeEvent<T = Element> extends SyntheticEvent<T> {
1228
+ target: EventTarget & T;
1229
+ }
1230
+
1231
+ export type ModifierKey = "Alt" | "AltGraph" | "CapsLock" | "Control" | "Fn" | "FnLock" | "Hyper" | "Meta" | "NumLock" | "ScrollLock" | "Shift" | "Super" | "Symbol" | "SymbolLock";
1232
+
1233
+ interface KeyboardEvent<T = Element> extends UIEvent<T, NativeKeyboardEvent> {
1234
+ altKey: boolean;
1235
+ /** @deprecated */
1236
+ charCode: number;
1237
+ ctrlKey: boolean;
1238
+ code: string;
1239
+ /**
1240
+ * See [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#keys-modifier). for a list of valid (case-sensitive) arguments to this method.
1241
+ */
1242
+ getModifierState(key: ModifierKey): boolean;
1243
+ /**
1244
+ * See the [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#named-key-attribute-values). for possible values
1245
+ */
1246
+ key: string;
1247
+ /** @deprecated */
1248
+ keyCode: number;
1249
+ locale: string;
1250
+ location: number;
1251
+ metaKey: boolean;
1252
+ repeat: boolean;
1253
+ shiftKey: boolean;
1254
+ /** @deprecated */
1255
+ which: number;
1256
+ }
1257
+
1258
+ interface MouseEvent<T = Element, E = NativeMouseEvent> extends UIEvent<T, E> {
1259
+ altKey: boolean;
1260
+ button: number;
1261
+ buttons: number;
1262
+ clientX: number;
1263
+ clientY: number;
1264
+ ctrlKey: boolean;
1265
+ /**
1266
+ * See [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#keys-modifier). for a list of valid (case-sensitive) arguments to this method.
1267
+ */
1268
+ getModifierState(key: ModifierKey): boolean;
1269
+ metaKey: boolean;
1270
+ movementX: number;
1271
+ movementY: number;
1272
+ pageX: number;
1273
+ pageY: number;
1274
+ relatedTarget: EventTarget | null;
1275
+ screenX: number;
1276
+ screenY: number;
1277
+ shiftKey: boolean;
1278
+ }
1279
+
1280
+ interface TouchEvent<T = Element> extends UIEvent<T, NativeTouchEvent> {
1281
+ altKey: boolean;
1282
+ changedTouches: TouchList;
1283
+ ctrlKey: boolean;
1284
+ /**
1285
+ * See [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#keys-modifier). for a list of valid (case-sensitive) arguments to this method.
1286
+ */
1287
+ getModifierState(key: ModifierKey): boolean;
1288
+ metaKey: boolean;
1289
+ shiftKey: boolean;
1290
+ targetTouches: TouchList;
1291
+ touches: TouchList;
1292
+ }
1293
+
1294
+ interface UIEvent<T = Element, E = NativeUIEvent> extends SyntheticEvent<T, E> {
1295
+ detail: number;
1296
+ view: AbstractView;
1297
+ }
1298
+
1299
+ interface WheelEvent<T = Element> extends MouseEvent<T, NativeWheelEvent> {
1300
+ deltaMode: number;
1301
+ deltaX: number;
1302
+ deltaY: number;
1303
+ deltaZ: number;
1304
+ }
1305
+
1306
+ interface AnimationEvent<T = Element> extends SyntheticEvent<T, NativeAnimationEvent> {
1307
+ animationName: string;
1308
+ elapsedTime: number;
1309
+ pseudoElement: string;
1310
+ }
1311
+
1312
+ interface TransitionEvent<T = Element> extends SyntheticEvent<T, NativeTransitionEvent> {
1313
+ elapsedTime: number;
1314
+ propertyName: string;
1315
+ pseudoElement: string;
1316
+ }
1317
+
1318
+ //
1319
+ // Event Handler Types
1320
+ // ----------------------------------------------------------------------
1321
+
1322
+ type EventHandler<E extends SyntheticEvent<any>> = { bivarianceHack(event: E): void }["bivarianceHack"];
1323
+
1324
+ type ReactEventHandler<T = Element> = EventHandler<SyntheticEvent<T>>;
1325
+
1326
+ type ClipboardEventHandler<T = Element> = EventHandler<ClipboardEvent<T>>;
1327
+ type CompositionEventHandler<T = Element> = EventHandler<CompositionEvent<T>>;
1328
+ type DragEventHandler<T = Element> = EventHandler<DragEvent<T>>;
1329
+ type FocusEventHandler<T = Element> = EventHandler<FocusEvent<T>>;
1330
+ type FormEventHandler<T = Element> = EventHandler<FormEvent<T>>;
1331
+ type ChangeEventHandler<T = Element> = EventHandler<ChangeEvent<T>>;
1332
+ type KeyboardEventHandler<T = Element> = EventHandler<KeyboardEvent<T>>;
1333
+ type MouseEventHandler<T = Element> = EventHandler<MouseEvent<T>>;
1334
+ type TouchEventHandler<T = Element> = EventHandler<TouchEvent<T>>;
1335
+ type PointerEventHandler<T = Element> = EventHandler<PointerEvent<T>>;
1336
+ type UIEventHandler<T = Element> = EventHandler<UIEvent<T>>;
1337
+ type WheelEventHandler<T = Element> = EventHandler<WheelEvent<T>>;
1338
+ type AnimationEventHandler<T = Element> = EventHandler<AnimationEvent<T>>;
1339
+ type TransitionEventHandler<T = Element> = EventHandler<TransitionEvent<T>>;
1340
+
1341
+ //
1342
+ // Props / DOM Attributes
1343
+ // ----------------------------------------------------------------------
1344
+
1345
+ interface HTMLProps<T> extends AllHTMLAttributes<T>, ClassAttributes<T> {
1346
+ }
1347
+
1348
+ type DetailedHTMLProps<E extends HTMLAttributes<T>, T> = ClassAttributes<T> & E;
1349
+
1350
+ interface SVGProps<T> extends SVGAttributes<T>, ClassAttributes<T> {
1351
+ }
1352
+
1353
+ interface DOMAttributes<T> {
1354
+ children?: ReactNode | undefined;
1355
+ dangerouslySetInnerHTML?: {
1356
+ // Should be InnerHTML['innerHTML'].
1357
+ // But unfortunately we're mixing renderer-specific type declarations.
1358
+ __html: string | TrustedHTML;
1359
+ } | undefined;
1360
+
1361
+ // Clipboard Events
1362
+ onCopy?: ClipboardEventHandler<T> | undefined;
1363
+ onCopyCapture?: ClipboardEventHandler<T> | undefined;
1364
+ onCut?: ClipboardEventHandler<T> | undefined;
1365
+ onCutCapture?: ClipboardEventHandler<T> | undefined;
1366
+ onPaste?: ClipboardEventHandler<T> | undefined;
1367
+ onPasteCapture?: ClipboardEventHandler<T> | undefined;
1368
+
1369
+ // Composition Events
1370
+ onCompositionEnd?: CompositionEventHandler<T> | undefined;
1371
+ onCompositionEndCapture?: CompositionEventHandler<T> | undefined;
1372
+ onCompositionStart?: CompositionEventHandler<T> | undefined;
1373
+ onCompositionStartCapture?: CompositionEventHandler<T> | undefined;
1374
+ onCompositionUpdate?: CompositionEventHandler<T> | undefined;
1375
+ onCompositionUpdateCapture?: CompositionEventHandler<T> | undefined;
1376
+
1377
+ // Focus Events
1378
+ onFocus?: FocusEventHandler<T> | undefined;
1379
+ onFocusCapture?: FocusEventHandler<T> | undefined;
1380
+ onBlur?: FocusEventHandler<T> | undefined;
1381
+ onBlurCapture?: FocusEventHandler<T> | undefined;
1382
+
1383
+ // Form Events
1384
+ onChange?: FormEventHandler<T> | undefined;
1385
+ onChangeCapture?: FormEventHandler<T> | undefined;
1386
+ onBeforeInput?: FormEventHandler<T> | undefined;
1387
+ onBeforeInputCapture?: FormEventHandler<T> | undefined;
1388
+ onInput?: FormEventHandler<T> | undefined;
1389
+ onInputCapture?: FormEventHandler<T> | undefined;
1390
+ onReset?: FormEventHandler<T> | undefined;
1391
+ onResetCapture?: FormEventHandler<T> | undefined;
1392
+ onSubmit?: FormEventHandler<T> | undefined;
1393
+ onSubmitCapture?: FormEventHandler<T> | undefined;
1394
+ onInvalid?: FormEventHandler<T> | undefined;
1395
+ onInvalidCapture?: FormEventHandler<T> | undefined;
1396
+
1397
+ // Image Events
1398
+ onLoad?: ReactEventHandler<T> | undefined;
1399
+ onLoadCapture?: ReactEventHandler<T> | undefined;
1400
+ onError?: ReactEventHandler<T> | undefined; // also a Media Event
1401
+ onErrorCapture?: ReactEventHandler<T> | undefined; // also a Media Event
1402
+
1403
+ // Keyboard Events
1404
+ onKeyDown?: KeyboardEventHandler<T> | undefined;
1405
+ onKeyDownCapture?: KeyboardEventHandler<T> | undefined;
1406
+ /** @deprecated */
1407
+ onKeyPress?: KeyboardEventHandler<T> | undefined;
1408
+ /** @deprecated */
1409
+ onKeyPressCapture?: KeyboardEventHandler<T> | undefined;
1410
+ onKeyUp?: KeyboardEventHandler<T> | undefined;
1411
+ onKeyUpCapture?: KeyboardEventHandler<T> | undefined;
1412
+
1413
+ // Media Events
1414
+ onAbort?: ReactEventHandler<T> | undefined;
1415
+ onAbortCapture?: ReactEventHandler<T> | undefined;
1416
+ onCanPlay?: ReactEventHandler<T> | undefined;
1417
+ onCanPlayCapture?: ReactEventHandler<T> | undefined;
1418
+ onCanPlayThrough?: ReactEventHandler<T> | undefined;
1419
+ onCanPlayThroughCapture?: ReactEventHandler<T> | undefined;
1420
+ onDurationChange?: ReactEventHandler<T> | undefined;
1421
+ onDurationChangeCapture?: ReactEventHandler<T> | undefined;
1422
+ onEmptied?: ReactEventHandler<T> | undefined;
1423
+ onEmptiedCapture?: ReactEventHandler<T> | undefined;
1424
+ onEncrypted?: ReactEventHandler<T> | undefined;
1425
+ onEncryptedCapture?: ReactEventHandler<T> | undefined;
1426
+ onEnded?: ReactEventHandler<T> | undefined;
1427
+ onEndedCapture?: ReactEventHandler<T> | undefined;
1428
+ onLoadedData?: ReactEventHandler<T> | undefined;
1429
+ onLoadedDataCapture?: ReactEventHandler<T> | undefined;
1430
+ onLoadedMetadata?: ReactEventHandler<T> | undefined;
1431
+ onLoadedMetadataCapture?: ReactEventHandler<T> | undefined;
1432
+ onLoadStart?: ReactEventHandler<T> | undefined;
1433
+ onLoadStartCapture?: ReactEventHandler<T> | undefined;
1434
+ onPause?: ReactEventHandler<T> | undefined;
1435
+ onPauseCapture?: ReactEventHandler<T> | undefined;
1436
+ onPlay?: ReactEventHandler<T> | undefined;
1437
+ onPlayCapture?: ReactEventHandler<T> | undefined;
1438
+ onPlaying?: ReactEventHandler<T> | undefined;
1439
+ onPlayingCapture?: ReactEventHandler<T> | undefined;
1440
+ onProgress?: ReactEventHandler<T> | undefined;
1441
+ onProgressCapture?: ReactEventHandler<T> | undefined;
1442
+ onRateChange?: ReactEventHandler<T> | undefined;
1443
+ onRateChangeCapture?: ReactEventHandler<T> | undefined;
1444
+ onResize?: ReactEventHandler<T> | undefined;
1445
+ onResizeCapture?: ReactEventHandler<T> | undefined;
1446
+ onSeeked?: ReactEventHandler<T> | undefined;
1447
+ onSeekedCapture?: ReactEventHandler<T> | undefined;
1448
+ onSeeking?: ReactEventHandler<T> | undefined;
1449
+ onSeekingCapture?: ReactEventHandler<T> | undefined;
1450
+ onStalled?: ReactEventHandler<T> | undefined;
1451
+ onStalledCapture?: ReactEventHandler<T> | undefined;
1452
+ onSuspend?: ReactEventHandler<T> | undefined;
1453
+ onSuspendCapture?: ReactEventHandler<T> | undefined;
1454
+ onTimeUpdate?: ReactEventHandler<T> | undefined;
1455
+ onTimeUpdateCapture?: ReactEventHandler<T> | undefined;
1456
+ onVolumeChange?: ReactEventHandler<T> | undefined;
1457
+ onVolumeChangeCapture?: ReactEventHandler<T> | undefined;
1458
+ onWaiting?: ReactEventHandler<T> | undefined;
1459
+ onWaitingCapture?: ReactEventHandler<T> | undefined;
1460
+
1461
+ // MouseEvents
1462
+ onAuxClick?: MouseEventHandler<T> | undefined;
1463
+ onAuxClickCapture?: MouseEventHandler<T> | undefined;
1464
+ onClick?: MouseEventHandler<T> | undefined;
1465
+ onClickCapture?: MouseEventHandler<T> | undefined;
1466
+ onContextMenu?: MouseEventHandler<T> | undefined;
1467
+ onContextMenuCapture?: MouseEventHandler<T> | undefined;
1468
+ onDoubleClick?: MouseEventHandler<T> | undefined;
1469
+ onDoubleClickCapture?: MouseEventHandler<T> | undefined;
1470
+ onDrag?: DragEventHandler<T> | undefined;
1471
+ onDragCapture?: DragEventHandler<T> | undefined;
1472
+ onDragEnd?: DragEventHandler<T> | undefined;
1473
+ onDragEndCapture?: DragEventHandler<T> | undefined;
1474
+ onDragEnter?: DragEventHandler<T> | undefined;
1475
+ onDragEnterCapture?: DragEventHandler<T> | undefined;
1476
+ onDragExit?: DragEventHandler<T> | undefined;
1477
+ onDragExitCapture?: DragEventHandler<T> | undefined;
1478
+ onDragLeave?: DragEventHandler<T> | undefined;
1479
+ onDragLeaveCapture?: DragEventHandler<T> | undefined;
1480
+ onDragOver?: DragEventHandler<T> | undefined;
1481
+ onDragOverCapture?: DragEventHandler<T> | undefined;
1482
+ onDragStart?: DragEventHandler<T> | undefined;
1483
+ onDragStartCapture?: DragEventHandler<T> | undefined;
1484
+ onDrop?: DragEventHandler<T> | undefined;
1485
+ onDropCapture?: DragEventHandler<T> | undefined;
1486
+ onMouseDown?: MouseEventHandler<T> | undefined;
1487
+ onMouseDownCapture?: MouseEventHandler<T> | undefined;
1488
+ onMouseEnter?: MouseEventHandler<T> | undefined;
1489
+ onMouseLeave?: MouseEventHandler<T> | undefined;
1490
+ onMouseMove?: MouseEventHandler<T> | undefined;
1491
+ onMouseMoveCapture?: MouseEventHandler<T> | undefined;
1492
+ onMouseOut?: MouseEventHandler<T> | undefined;
1493
+ onMouseOutCapture?: MouseEventHandler<T> | undefined;
1494
+ onMouseOver?: MouseEventHandler<T> | undefined;
1495
+ onMouseOverCapture?: MouseEventHandler<T> | undefined;
1496
+ onMouseUp?: MouseEventHandler<T> | undefined;
1497
+ onMouseUpCapture?: MouseEventHandler<T> | undefined;
1498
+
1499
+ // Selection Events
1500
+ onSelect?: ReactEventHandler<T> | undefined;
1501
+ onSelectCapture?: ReactEventHandler<T> | undefined;
1502
+
1503
+ // Touch Events
1504
+ onTouchCancel?: TouchEventHandler<T> | undefined;
1505
+ onTouchCancelCapture?: TouchEventHandler<T> | undefined;
1506
+ onTouchEnd?: TouchEventHandler<T> | undefined;
1507
+ onTouchEndCapture?: TouchEventHandler<T> | undefined;
1508
+ onTouchMove?: TouchEventHandler<T> | undefined;
1509
+ onTouchMoveCapture?: TouchEventHandler<T> | undefined;
1510
+ onTouchStart?: TouchEventHandler<T> | undefined;
1511
+ onTouchStartCapture?: TouchEventHandler<T> | undefined;
1512
+
1513
+ // Pointer Events
1514
+ onPointerDown?: PointerEventHandler<T> | undefined;
1515
+ onPointerDownCapture?: PointerEventHandler<T> | undefined;
1516
+ onPointerMove?: PointerEventHandler<T> | undefined;
1517
+ onPointerMoveCapture?: PointerEventHandler<T> | undefined;
1518
+ onPointerUp?: PointerEventHandler<T> | undefined;
1519
+ onPointerUpCapture?: PointerEventHandler<T> | undefined;
1520
+ onPointerCancel?: PointerEventHandler<T> | undefined;
1521
+ onPointerCancelCapture?: PointerEventHandler<T> | undefined;
1522
+ onPointerEnter?: PointerEventHandler<T> | undefined;
1523
+ onPointerEnterCapture?: PointerEventHandler<T> | undefined;
1524
+ onPointerLeave?: PointerEventHandler<T> | undefined;
1525
+ onPointerLeaveCapture?: PointerEventHandler<T> | undefined;
1526
+ onPointerOver?: PointerEventHandler<T> | undefined;
1527
+ onPointerOverCapture?: PointerEventHandler<T> | undefined;
1528
+ onPointerOut?: PointerEventHandler<T> | undefined;
1529
+ onPointerOutCapture?: PointerEventHandler<T> | undefined;
1530
+ onGotPointerCapture?: PointerEventHandler<T> | undefined;
1531
+ onGotPointerCaptureCapture?: PointerEventHandler<T> | undefined;
1532
+ onLostPointerCapture?: PointerEventHandler<T> | undefined;
1533
+ onLostPointerCaptureCapture?: PointerEventHandler<T> | undefined;
1534
+
1535
+ // UI Events
1536
+ onScroll?: UIEventHandler<T> | undefined;
1537
+ onScrollCapture?: UIEventHandler<T> | undefined;
1538
+
1539
+ // Wheel Events
1540
+ onWheel?: WheelEventHandler<T> | undefined;
1541
+ onWheelCapture?: WheelEventHandler<T> | undefined;
1542
+
1543
+ // Animation Events
1544
+ onAnimationStart?: AnimationEventHandler<T> | undefined;
1545
+ onAnimationStartCapture?: AnimationEventHandler<T> | undefined;
1546
+ onAnimationEnd?: AnimationEventHandler<T> | undefined;
1547
+ onAnimationEndCapture?: AnimationEventHandler<T> | undefined;
1548
+ onAnimationIteration?: AnimationEventHandler<T> | undefined;
1549
+ onAnimationIterationCapture?: AnimationEventHandler<T> | undefined;
1550
+
1551
+ // Transition Events
1552
+ onTransitionEnd?: TransitionEventHandler<T> | undefined;
1553
+ onTransitionEndCapture?: TransitionEventHandler<T> | undefined;
1554
+ }
1555
+
1556
+ export interface CSSProperties extends CSS.Properties<string | number> {
1557
+ /**
1558
+ * The index signature was removed to enable closed typing for style
1559
+ * using CSSType. You're able to use type assertion or module augmentation
1560
+ * to add properties or an index signature of your own.
1561
+ *
1562
+ * For examples and more information, visit:
1563
+ * https://github.com/frenic/csstype#what-should-i-do-when-i-get-type-errors
1564
+ */
1565
+ }
1566
+
1567
+ // All the WAI-ARIA 1.1 attributes from https://www.w3.org/TR/wai-aria-1.1/
1568
+ interface AriaAttributes {
1569
+ /** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */
1570
+ 'aria-activedescendant'?: string | undefined;
1571
+ /** Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. */
1572
+ 'aria-atomic'?: Booleanish | undefined;
1573
+ /**
1574
+ * Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be
1575
+ * presented if they are made.
1576
+ */
1577
+ 'aria-autocomplete'?: 'none' | 'inline' | 'list' | 'both' | undefined;
1578
+ /** Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user. */
1579
+ 'aria-busy'?: Booleanish | undefined;
1580
+ /**
1581
+ * Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.
1582
+ * @see aria-pressed @see aria-selected.
1583
+ */
1584
+ 'aria-checked'?: boolean | 'false' | 'mixed' | 'true' | undefined;
1585
+ /**
1586
+ * Defines the total number of columns in a table, grid, or treegrid.
1587
+ * @see aria-colindex.
1588
+ */
1589
+ 'aria-colcount'?: number | undefined;
1590
+ /**
1591
+ * Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.
1592
+ * @see aria-colcount @see aria-colspan.
1593
+ */
1594
+ 'aria-colindex'?: number | undefined;
1595
+ /**
1596
+ * Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.
1597
+ * @see aria-colindex @see aria-rowspan.
1598
+ */
1599
+ 'aria-colspan'?: number | undefined;
1600
+ /**
1601
+ * Identifies the element (or elements) whose contents or presence are controlled by the current element.
1602
+ * @see aria-owns.
1603
+ */
1604
+ 'aria-controls'?: string | undefined;
1605
+ /** Indicates the element that represents the current item within a container or set of related elements. */
1606
+ 'aria-current'?: boolean | 'false' | 'true' | 'page' | 'step' | 'location' | 'date' | 'time' | undefined;
1607
+ /**
1608
+ * Identifies the element (or elements) that describes the object.
1609
+ * @see aria-labelledby
1610
+ */
1611
+ 'aria-describedby'?: string | undefined;
1612
+ /**
1613
+ * Identifies the element that provides a detailed, extended description for the object.
1614
+ * @see aria-describedby.
1615
+ */
1616
+ 'aria-details'?: string | undefined;
1617
+ /**
1618
+ * Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
1619
+ * @see aria-hidden @see aria-readonly.
1620
+ */
1621
+ 'aria-disabled'?: Booleanish | undefined;
1622
+ /**
1623
+ * Indicates what functions can be performed when a dragged object is released on the drop target.
1624
+ * @deprecated in ARIA 1.1
1625
+ */
1626
+ 'aria-dropeffect'?: 'none' | 'copy' | 'execute' | 'link' | 'move' | 'popup' | undefined;
1627
+ /**
1628
+ * Identifies the element that provides an error message for the object.
1629
+ * @see aria-invalid @see aria-describedby.
1630
+ */
1631
+ 'aria-errormessage'?: string | undefined;
1632
+ /** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */
1633
+ 'aria-expanded'?: Booleanish | undefined;
1634
+ /**
1635
+ * Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,
1636
+ * allows assistive technology to override the general default of reading in document source order.
1637
+ */
1638
+ 'aria-flowto'?: string | undefined;
1639
+ /**
1640
+ * Indicates an element's "grabbed" state in a drag-and-drop operation.
1641
+ * @deprecated in ARIA 1.1
1642
+ */
1643
+ 'aria-grabbed'?: Booleanish | undefined;
1644
+ /** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */
1645
+ 'aria-haspopup'?: boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | undefined;
1646
+ /**
1647
+ * Indicates whether the element is exposed to an accessibility API.
1648
+ * @see aria-disabled.
1649
+ */
1650
+ 'aria-hidden'?: Booleanish | undefined;
1651
+ /**
1652
+ * Indicates the entered value does not conform to the format expected by the application.
1653
+ * @see aria-errormessage.
1654
+ */
1655
+ 'aria-invalid'?: boolean | 'false' | 'true' | 'grammar' | 'spelling' | undefined;
1656
+ /** Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. */
1657
+ 'aria-keyshortcuts'?: string | undefined;
1658
+ /**
1659
+ * Defines a string value that labels the current element.
1660
+ * @see aria-labelledby.
1661
+ */
1662
+ 'aria-label'?: string | undefined;
1663
+ /**
1664
+ * Identifies the element (or elements) that labels the current element.
1665
+ * @see aria-describedby.
1666
+ */
1667
+ 'aria-labelledby'?: string | undefined;
1668
+ /** Defines the hierarchical level of an element within a structure. */
1669
+ 'aria-level'?: number | undefined;
1670
+ /** Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. */
1671
+ 'aria-live'?: 'off' | 'assertive' | 'polite' | undefined;
1672
+ /** Indicates whether an element is modal when displayed. */
1673
+ 'aria-modal'?: Booleanish | undefined;
1674
+ /** Indicates whether a text box accepts multiple lines of input or only a single line. */
1675
+ 'aria-multiline'?: Booleanish | undefined;
1676
+ /** Indicates that the user may select more than one item from the current selectable descendants. */
1677
+ 'aria-multiselectable'?: Booleanish | undefined;
1678
+ /** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */
1679
+ 'aria-orientation'?: 'horizontal' | 'vertical' | undefined;
1680
+ /**
1681
+ * Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship
1682
+ * between DOM elements where the DOM hierarchy cannot be used to represent the relationship.
1683
+ * @see aria-controls.
1684
+ */
1685
+ 'aria-owns'?: string | undefined;
1686
+ /**
1687
+ * Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.
1688
+ * A hint could be a sample value or a brief description of the expected format.
1689
+ */
1690
+ 'aria-placeholder'?: string | undefined;
1691
+ /**
1692
+ * Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.
1693
+ * @see aria-setsize.
1694
+ */
1695
+ 'aria-posinset'?: number | undefined;
1696
+ /**
1697
+ * Indicates the current "pressed" state of toggle buttons.
1698
+ * @see aria-checked @see aria-selected.
1699
+ */
1700
+ 'aria-pressed'?: boolean | 'false' | 'mixed' | 'true' | undefined;
1701
+ /**
1702
+ * Indicates that the element is not editable, but is otherwise operable.
1703
+ * @see aria-disabled.
1704
+ */
1705
+ 'aria-readonly'?: Booleanish | undefined;
1706
+ /**
1707
+ * Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.
1708
+ * @see aria-atomic.
1709
+ */
1710
+ 'aria-relevant'?: 'additions' | 'additions removals' | 'additions text' | 'all' | 'removals' | 'removals additions' | 'removals text' | 'text' | 'text additions' | 'text removals' | undefined;
1711
+ /** Indicates that user input is required on the element before a form may be submitted. */
1712
+ 'aria-required'?: Booleanish | undefined;
1713
+ /** Defines a human-readable, author-localized description for the role of an element. */
1714
+ 'aria-roledescription'?: string | undefined;
1715
+ /**
1716
+ * Defines the total number of rows in a table, grid, or treegrid.
1717
+ * @see aria-rowindex.
1718
+ */
1719
+ 'aria-rowcount'?: number | undefined;
1720
+ /**
1721
+ * Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.
1722
+ * @see aria-rowcount @see aria-rowspan.
1723
+ */
1724
+ 'aria-rowindex'?: number | undefined;
1725
+ /**
1726
+ * Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.
1727
+ * @see aria-rowindex @see aria-colspan.
1728
+ */
1729
+ 'aria-rowspan'?: number | undefined;
1730
+ /**
1731
+ * Indicates the current "selected" state of various widgets.
1732
+ * @see aria-checked @see aria-pressed.
1733
+ */
1734
+ 'aria-selected'?: Booleanish | undefined;
1735
+ /**
1736
+ * Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.
1737
+ * @see aria-posinset.
1738
+ */
1739
+ 'aria-setsize'?: number | undefined;
1740
+ /** Indicates if items in a table or grid are sorted in ascending or descending order. */
1741
+ 'aria-sort'?: 'none' | 'ascending' | 'descending' | 'other' | undefined;
1742
+ /** Defines the maximum allowed value for a range widget. */
1743
+ 'aria-valuemax'?: number | undefined;
1744
+ /** Defines the minimum allowed value for a range widget. */
1745
+ 'aria-valuemin'?: number | undefined;
1746
+ /**
1747
+ * Defines the current value for a range widget.
1748
+ * @see aria-valuetext.
1749
+ */
1750
+ 'aria-valuenow'?: number | undefined;
1751
+ /** Defines the human readable text alternative of aria-valuenow for a range widget. */
1752
+ 'aria-valuetext'?: string | undefined;
1753
+ }
1754
+
1755
+ // All the WAI-ARIA 1.1 role attribute values from https://www.w3.org/TR/wai-aria-1.1/#role_definitions
1756
+ type AriaRole =
1757
+ | 'alert'
1758
+ | 'alertdialog'
1759
+ | 'application'
1760
+ | 'article'
1761
+ | 'banner'
1762
+ | 'button'
1763
+ | 'cell'
1764
+ | 'checkbox'
1765
+ | 'columnheader'
1766
+ | 'combobox'
1767
+ | 'complementary'
1768
+ | 'contentinfo'
1769
+ | 'definition'
1770
+ | 'dialog'
1771
+ | 'directory'
1772
+ | 'document'
1773
+ | 'feed'
1774
+ | 'figure'
1775
+ | 'form'
1776
+ | 'grid'
1777
+ | 'gridcell'
1778
+ | 'group'
1779
+ | 'heading'
1780
+ | 'img'
1781
+ | 'link'
1782
+ | 'list'
1783
+ | 'listbox'
1784
+ | 'listitem'
1785
+ | 'log'
1786
+ | 'main'
1787
+ | 'marquee'
1788
+ | 'math'
1789
+ | 'menu'
1790
+ | 'menubar'
1791
+ | 'menuitem'
1792
+ | 'menuitemcheckbox'
1793
+ | 'menuitemradio'
1794
+ | 'navigation'
1795
+ | 'none'
1796
+ | 'note'
1797
+ | 'option'
1798
+ | 'presentation'
1799
+ | 'progressbar'
1800
+ | 'radio'
1801
+ | 'radiogroup'
1802
+ | 'region'
1803
+ | 'row'
1804
+ | 'rowgroup'
1805
+ | 'rowheader'
1806
+ | 'scrollbar'
1807
+ | 'search'
1808
+ | 'searchbox'
1809
+ | 'separator'
1810
+ | 'slider'
1811
+ | 'spinbutton'
1812
+ | 'status'
1813
+ | 'switch'
1814
+ | 'tab'
1815
+ | 'table'
1816
+ | 'tablist'
1817
+ | 'tabpanel'
1818
+ | 'term'
1819
+ | 'textbox'
1820
+ | 'timer'
1821
+ | 'toolbar'
1822
+ | 'tooltip'
1823
+ | 'tree'
1824
+ | 'treegrid'
1825
+ | 'treeitem'
1826
+ | (string & {});
1827
+
1828
+ interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> {
1829
+ // React-specific Attributes
1830
+ defaultChecked?: boolean | undefined;
1831
+ defaultValue?: string | number | ReadonlyArray<string> | undefined;
1832
+ suppressContentEditableWarning?: boolean | undefined;
1833
+ suppressHydrationWarning?: boolean | undefined;
1834
+
1835
+ // Standard HTML Attributes
1836
+ accessKey?: string | undefined;
1837
+ autoFocus?: boolean | undefined;
1838
+ className?: string | undefined;
1839
+ contentEditable?: Booleanish | "inherit" | undefined;
1840
+ contextMenu?: string | undefined;
1841
+ dir?: string | undefined;
1842
+ draggable?: Booleanish | undefined;
1843
+ hidden?: boolean | undefined;
1844
+ id?: string | undefined;
1845
+ lang?: string | undefined;
1846
+ nonce?: string | undefined;
1847
+ placeholder?: string | undefined;
1848
+ slot?: string | undefined;
1849
+ spellCheck?: Booleanish | undefined;
1850
+ style?: CSSProperties | undefined;
1851
+ tabIndex?: number | undefined;
1852
+ title?: string | undefined;
1853
+ translate?: 'yes' | 'no' | undefined;
1854
+
1855
+ // Unknown
1856
+ radioGroup?: string | undefined; // <command>, <menuitem>
1857
+
1858
+ // WAI-ARIA
1859
+ role?: AriaRole | undefined;
1860
+
1861
+ // RDFa Attributes
1862
+ about?: string | undefined;
1863
+ content?: string | undefined;
1864
+ datatype?: string | undefined;
1865
+ inlist?: any;
1866
+ prefix?: string | undefined;
1867
+ property?: string | undefined;
1868
+ rel?: string | undefined;
1869
+ resource?: string | undefined;
1870
+ rev?: string | undefined;
1871
+ typeof?: string | undefined;
1872
+ vocab?: string | undefined;
1873
+
1874
+ // Non-standard Attributes
1875
+ autoCapitalize?: string | undefined;
1876
+ autoCorrect?: string | undefined;
1877
+ autoSave?: string | undefined;
1878
+ color?: string | undefined;
1879
+ itemProp?: string | undefined;
1880
+ itemScope?: boolean | undefined;
1881
+ itemType?: string | undefined;
1882
+ itemID?: string | undefined;
1883
+ itemRef?: string | undefined;
1884
+ results?: number | undefined;
1885
+ security?: string | undefined;
1886
+ unselectable?: 'on' | 'off' | undefined;
1887
+
1888
+ // Living Standard
1889
+ /**
1890
+ * Hints at the type of data that might be entered by the user while editing the element or its contents
1891
+ * @see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute
1892
+ */
1893
+ inputMode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search' | undefined;
1894
+ /**
1895
+ * Specify that a standard HTML element should behave like a defined custom built-in element
1896
+ * @see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is
1897
+ */
1898
+ is?: string | undefined;
1899
+ }
1900
+
1901
+ interface AllHTMLAttributes<T> extends HTMLAttributes<T> {
1902
+ // Standard HTML Attributes
1903
+ accept?: string | undefined;
1904
+ acceptCharset?: string | undefined;
1905
+ action?: string | undefined;
1906
+ allowFullScreen?: boolean | undefined;
1907
+ allowTransparency?: boolean | undefined;
1908
+ alt?: string | undefined;
1909
+ as?: string | undefined;
1910
+ async?: boolean | undefined;
1911
+ autoComplete?: string | undefined;
1912
+ autoPlay?: boolean | undefined;
1913
+ capture?: boolean | 'user' | 'environment' | undefined;
1914
+ cellPadding?: number | string | undefined;
1915
+ cellSpacing?: number | string | undefined;
1916
+ charSet?: string | undefined;
1917
+ challenge?: string | undefined;
1918
+ checked?: boolean | undefined;
1919
+ cite?: string | undefined;
1920
+ classID?: string | undefined;
1921
+ cols?: number | undefined;
1922
+ colSpan?: number | undefined;
1923
+ controls?: boolean | undefined;
1924
+ coords?: string | undefined;
1925
+ crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
1926
+ data?: string | undefined;
1927
+ dateTime?: string | undefined;
1928
+ default?: boolean | undefined;
1929
+ defer?: boolean | undefined;
1930
+ disabled?: boolean | undefined;
1931
+ download?: any;
1932
+ encType?: string | undefined;
1933
+ form?: string | undefined;
1934
+ formAction?: string | undefined;
1935
+ formEncType?: string | undefined;
1936
+ formMethod?: string | undefined;
1937
+ formNoValidate?: boolean | undefined;
1938
+ formTarget?: string | undefined;
1939
+ frameBorder?: number | string | undefined;
1940
+ headers?: string | undefined;
1941
+ height?: number | string | undefined;
1942
+ high?: number | undefined;
1943
+ href?: string | undefined;
1944
+ hrefLang?: string | undefined;
1945
+ htmlFor?: string | undefined;
1946
+ httpEquiv?: string | undefined;
1947
+ integrity?: string | undefined;
1948
+ keyParams?: string | undefined;
1949
+ keyType?: string | undefined;
1950
+ kind?: string | undefined;
1951
+ label?: string | undefined;
1952
+ list?: string | undefined;
1953
+ loop?: boolean | undefined;
1954
+ low?: number | undefined;
1955
+ manifest?: string | undefined;
1956
+ marginHeight?: number | undefined;
1957
+ marginWidth?: number | undefined;
1958
+ max?: number | string | undefined;
1959
+ maxLength?: number | undefined;
1960
+ media?: string | undefined;
1961
+ mediaGroup?: string | undefined;
1962
+ method?: string | undefined;
1963
+ min?: number | string | undefined;
1964
+ minLength?: number | undefined;
1965
+ multiple?: boolean | undefined;
1966
+ muted?: boolean | undefined;
1967
+ name?: string | undefined;
1968
+ noValidate?: boolean | undefined;
1969
+ open?: boolean | undefined;
1970
+ optimum?: number | undefined;
1971
+ pattern?: string | undefined;
1972
+ placeholder?: string | undefined;
1973
+ playsInline?: boolean | undefined;
1974
+ poster?: string | undefined;
1975
+ preload?: string | undefined;
1976
+ readOnly?: boolean | undefined;
1977
+ required?: boolean | undefined;
1978
+ reversed?: boolean | undefined;
1979
+ rows?: number | undefined;
1980
+ rowSpan?: number | undefined;
1981
+ sandbox?: string | undefined;
1982
+ scope?: string | undefined;
1983
+ scoped?: boolean | undefined;
1984
+ scrolling?: string | undefined;
1985
+ seamless?: boolean | undefined;
1986
+ selected?: boolean | undefined;
1987
+ shape?: string | undefined;
1988
+ size?: number | undefined;
1989
+ sizes?: string | undefined;
1990
+ span?: number | undefined;
1991
+ src?: string | undefined;
1992
+ srcDoc?: string | undefined;
1993
+ srcLang?: string | undefined;
1994
+ srcSet?: string | undefined;
1995
+ start?: number | undefined;
1996
+ step?: number | string | undefined;
1997
+ summary?: string | undefined;
1998
+ target?: string | undefined;
1999
+ type?: string | undefined;
2000
+ useMap?: string | undefined;
2001
+ value?: string | ReadonlyArray<string> | number | undefined;
2002
+ width?: number | string | undefined;
2003
+ wmode?: string | undefined;
2004
+ wrap?: string | undefined;
2005
+ }
2006
+
2007
+ type HTMLAttributeReferrerPolicy =
2008
+ | ''
2009
+ | 'no-referrer'
2010
+ | 'no-referrer-when-downgrade'
2011
+ | 'origin'
2012
+ | 'origin-when-cross-origin'
2013
+ | 'same-origin'
2014
+ | 'strict-origin'
2015
+ | 'strict-origin-when-cross-origin'
2016
+ | 'unsafe-url';
2017
+
2018
+ type HTMLAttributeAnchorTarget =
2019
+ | '_self'
2020
+ | '_blank'
2021
+ | '_parent'
2022
+ | '_top'
2023
+ | (string & {});
2024
+
2025
+ interface AnchorHTMLAttributes<T> extends HTMLAttributes<T> {
2026
+ download?: any;
2027
+ href?: string | undefined;
2028
+ hrefLang?: string | undefined;
2029
+ media?: string | undefined;
2030
+ ping?: string | undefined;
2031
+ target?: HTMLAttributeAnchorTarget | undefined;
2032
+ type?: string | undefined;
2033
+ referrerPolicy?: HTMLAttributeReferrerPolicy | undefined;
2034
+ }
2035
+
2036
+ interface AudioHTMLAttributes<T> extends MediaHTMLAttributes<T> {}
2037
+
2038
+ interface AreaHTMLAttributes<T> extends HTMLAttributes<T> {
2039
+ alt?: string | undefined;
2040
+ coords?: string | undefined;
2041
+ download?: any;
2042
+ href?: string | undefined;
2043
+ hrefLang?: string | undefined;
2044
+ media?: string | undefined;
2045
+ referrerPolicy?: HTMLAttributeReferrerPolicy | undefined;
2046
+ shape?: string | undefined;
2047
+ target?: string | undefined;
2048
+ }
2049
+
2050
+ interface BaseHTMLAttributes<T> extends HTMLAttributes<T> {
2051
+ href?: string | undefined;
2052
+ target?: string | undefined;
2053
+ }
2054
+
2055
+ interface BlockquoteHTMLAttributes<T> extends HTMLAttributes<T> {
2056
+ cite?: string | undefined;
2057
+ }
2058
+
2059
+ interface ButtonHTMLAttributes<T> extends HTMLAttributes<T> {
2060
+ disabled?: boolean | undefined;
2061
+ form?: string | undefined;
2062
+ formAction?: string | undefined;
2063
+ formEncType?: string | undefined;
2064
+ formMethod?: string | undefined;
2065
+ formNoValidate?: boolean | undefined;
2066
+ formTarget?: string | undefined;
2067
+ name?: string | undefined;
2068
+ type?: 'submit' | 'reset' | 'button' | undefined;
2069
+ value?: string | ReadonlyArray<string> | number | undefined;
2070
+ }
2071
+
2072
+ interface CanvasHTMLAttributes<T> extends HTMLAttributes<T> {
2073
+ height?: number | string | undefined;
2074
+ width?: number | string | undefined;
2075
+ }
2076
+
2077
+ interface ColHTMLAttributes<T> extends HTMLAttributes<T> {
2078
+ span?: number | undefined;
2079
+ width?: number | string | undefined;
2080
+ }
2081
+
2082
+ interface ColgroupHTMLAttributes<T> extends HTMLAttributes<T> {
2083
+ span?: number | undefined;
2084
+ }
2085
+
2086
+ interface DataHTMLAttributes<T> extends HTMLAttributes<T> {
2087
+ value?: string | ReadonlyArray<string> | number | undefined;
2088
+ }
2089
+
2090
+ interface DetailsHTMLAttributes<T> extends HTMLAttributes<T> {
2091
+ open?: boolean | undefined;
2092
+ onToggle?: ReactEventHandler<T> | undefined;
2093
+ }
2094
+
2095
+ interface DelHTMLAttributes<T> extends HTMLAttributes<T> {
2096
+ cite?: string | undefined;
2097
+ dateTime?: string | undefined;
2098
+ }
2099
+
2100
+ interface DialogHTMLAttributes<T> extends HTMLAttributes<T> {
2101
+ onCancel?: ReactEventHandler<T> | undefined;
2102
+ onClose?: ReactEventHandler<T> | undefined;
2103
+ open?: boolean | undefined;
2104
+ }
2105
+
2106
+ interface EmbedHTMLAttributes<T> extends HTMLAttributes<T> {
2107
+ height?: number | string | undefined;
2108
+ src?: string | undefined;
2109
+ type?: string | undefined;
2110
+ width?: number | string | undefined;
2111
+ }
2112
+
2113
+ interface FieldsetHTMLAttributes<T> extends HTMLAttributes<T> {
2114
+ disabled?: boolean | undefined;
2115
+ form?: string | undefined;
2116
+ name?: string | undefined;
2117
+ }
2118
+
2119
+ interface FormHTMLAttributes<T> extends HTMLAttributes<T> {
2120
+ acceptCharset?: string | undefined;
2121
+ action?: string | undefined;
2122
+ autoComplete?: string | undefined;
2123
+ encType?: string | undefined;
2124
+ method?: string | undefined;
2125
+ name?: string | undefined;
2126
+ noValidate?: boolean | undefined;
2127
+ target?: string | undefined;
2128
+ }
2129
+
2130
+ interface HtmlHTMLAttributes<T> extends HTMLAttributes<T> {
2131
+ manifest?: string | undefined;
2132
+ }
2133
+
2134
+ interface IframeHTMLAttributes<T> extends HTMLAttributes<T> {
2135
+ allow?: string | undefined;
2136
+ allowFullScreen?: boolean | undefined;
2137
+ allowTransparency?: boolean | undefined;
2138
+ /** @deprecated */
2139
+ frameBorder?: number | string | undefined;
2140
+ height?: number | string | undefined;
2141
+ loading?: "eager" | "lazy" | undefined;
2142
+ /** @deprecated */
2143
+ marginHeight?: number | undefined;
2144
+ /** @deprecated */
2145
+ marginWidth?: number | undefined;
2146
+ name?: string | undefined;
2147
+ referrerPolicy?: HTMLAttributeReferrerPolicy | undefined;
2148
+ sandbox?: string | undefined;
2149
+ /** @deprecated */
2150
+ scrolling?: string | undefined;
2151
+ seamless?: boolean | undefined;
2152
+ src?: string | undefined;
2153
+ srcDoc?: string | undefined;
2154
+ width?: number | string | undefined;
2155
+ }
2156
+
2157
+ interface ImgHTMLAttributes<T> extends HTMLAttributes<T> {
2158
+ alt?: string | undefined;
2159
+ crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
2160
+ decoding?: "async" | "auto" | "sync" | undefined;
2161
+ height?: number | string | undefined;
2162
+ loading?: "eager" | "lazy" | undefined;
2163
+ referrerPolicy?: HTMLAttributeReferrerPolicy | undefined;
2164
+ sizes?: string | undefined;
2165
+ src?: string | undefined;
2166
+ srcSet?: string | undefined;
2167
+ useMap?: string | undefined;
2168
+ width?: number | string | undefined;
2169
+ }
2170
+
2171
+ interface InsHTMLAttributes<T> extends HTMLAttributes<T> {
2172
+ cite?: string | undefined;
2173
+ dateTime?: string | undefined;
2174
+ }
2175
+
2176
+ type HTMLInputTypeAttribute =
2177
+ | 'button'
2178
+ | 'checkbox'
2179
+ | 'color'
2180
+ | 'date'
2181
+ | 'datetime-local'
2182
+ | 'email'
2183
+ | 'file'
2184
+ | 'hidden'
2185
+ | 'image'
2186
+ | 'month'
2187
+ | 'number'
2188
+ | 'password'
2189
+ | 'radio'
2190
+ | 'range'
2191
+ | 'reset'
2192
+ | 'search'
2193
+ | 'submit'
2194
+ | 'tel'
2195
+ | 'text'
2196
+ | 'time'
2197
+ | 'url'
2198
+ | 'week'
2199
+ | (string & {});
2200
+
2201
+ interface InputHTMLAttributes<T> extends HTMLAttributes<T> {
2202
+ accept?: string | undefined;
2203
+ alt?: string | undefined;
2204
+ autoComplete?: string | undefined;
2205
+ capture?: boolean | 'user' | 'environment' | undefined; // https://www.w3.org/TR/html-media-capture/#the-capture-attribute
2206
+ checked?: boolean | undefined;
2207
+ crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
2208
+ disabled?: boolean | undefined;
2209
+ enterKeyHint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send' | undefined;
2210
+ form?: string | undefined;
2211
+ formAction?: string | undefined;
2212
+ formEncType?: string | undefined;
2213
+ formMethod?: string | undefined;
2214
+ formNoValidate?: boolean | undefined;
2215
+ formTarget?: string | undefined;
2216
+ height?: number | string | undefined;
2217
+ list?: string | undefined;
2218
+ max?: number | string | undefined;
2219
+ maxLength?: number | undefined;
2220
+ min?: number | string | undefined;
2221
+ minLength?: number | undefined;
2222
+ multiple?: boolean | undefined;
2223
+ name?: string | undefined;
2224
+ pattern?: string | undefined;
2225
+ placeholder?: string | undefined;
2226
+ readOnly?: boolean | undefined;
2227
+ required?: boolean | undefined;
2228
+ size?: number | undefined;
2229
+ src?: string | undefined;
2230
+ step?: number | string | undefined;
2231
+ type?: HTMLInputTypeAttribute | undefined;
2232
+ value?: string | ReadonlyArray<string> | number | undefined;
2233
+ width?: number | string | undefined;
2234
+
2235
+ onChange?: ChangeEventHandler<T> | undefined;
2236
+ }
2237
+
2238
+ interface KeygenHTMLAttributes<T> extends HTMLAttributes<T> {
2239
+ challenge?: string | undefined;
2240
+ disabled?: boolean | undefined;
2241
+ form?: string | undefined;
2242
+ keyType?: string | undefined;
2243
+ keyParams?: string | undefined;
2244
+ name?: string | undefined;
2245
+ }
2246
+
2247
+ interface LabelHTMLAttributes<T> extends HTMLAttributes<T> {
2248
+ form?: string | undefined;
2249
+ htmlFor?: string | undefined;
2250
+ }
2251
+
2252
+ interface LiHTMLAttributes<T> extends HTMLAttributes<T> {
2253
+ value?: string | ReadonlyArray<string> | number | undefined;
2254
+ }
2255
+
2256
+ interface LinkHTMLAttributes<T> extends HTMLAttributes<T> {
2257
+ as?: string | undefined;
2258
+ crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
2259
+ href?: string | undefined;
2260
+ hrefLang?: string | undefined;
2261
+ integrity?: string | undefined;
2262
+ media?: string | undefined;
2263
+ imageSrcSet?: string | undefined;
2264
+ imageSizes?: string | undefined;
2265
+ referrerPolicy?: HTMLAttributeReferrerPolicy | undefined;
2266
+ sizes?: string | undefined;
2267
+ type?: string | undefined;
2268
+ charSet?: string | undefined;
2269
+ }
2270
+
2271
+ interface MapHTMLAttributes<T> extends HTMLAttributes<T> {
2272
+ name?: string | undefined;
2273
+ }
2274
+
2275
+ interface MenuHTMLAttributes<T> extends HTMLAttributes<T> {
2276
+ type?: string | undefined;
2277
+ }
2278
+
2279
+ interface MediaHTMLAttributes<T> extends HTMLAttributes<T> {
2280
+ autoPlay?: boolean | undefined;
2281
+ controls?: boolean | undefined;
2282
+ controlsList?: string | undefined;
2283
+ crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
2284
+ loop?: boolean | undefined;
2285
+ mediaGroup?: string | undefined;
2286
+ muted?: boolean | undefined;
2287
+ playsInline?: boolean | undefined;
2288
+ preload?: string | undefined;
2289
+ src?: string | undefined;
2290
+ }
2291
+
2292
+ interface MetaHTMLAttributes<T> extends HTMLAttributes<T> {
2293
+ charSet?: string | undefined;
2294
+ httpEquiv?: string | undefined;
2295
+ name?: string | undefined;
2296
+ media?: string | undefined;
2297
+ }
2298
+
2299
+ interface MeterHTMLAttributes<T> extends HTMLAttributes<T> {
2300
+ form?: string | undefined;
2301
+ high?: number | undefined;
2302
+ low?: number | undefined;
2303
+ max?: number | string | undefined;
2304
+ min?: number | string | undefined;
2305
+ optimum?: number | undefined;
2306
+ value?: string | ReadonlyArray<string> | number | undefined;
2307
+ }
2308
+
2309
+ interface QuoteHTMLAttributes<T> extends HTMLAttributes<T> {
2310
+ cite?: string | undefined;
2311
+ }
2312
+
2313
+ interface ObjectHTMLAttributes<T> extends HTMLAttributes<T> {
2314
+ classID?: string | undefined;
2315
+ data?: string | undefined;
2316
+ form?: string | undefined;
2317
+ height?: number | string | undefined;
2318
+ name?: string | undefined;
2319
+ type?: string | undefined;
2320
+ useMap?: string | undefined;
2321
+ width?: number | string | undefined;
2322
+ wmode?: string | undefined;
2323
+ }
2324
+
2325
+ interface OlHTMLAttributes<T> extends HTMLAttributes<T> {
2326
+ reversed?: boolean | undefined;
2327
+ start?: number | undefined;
2328
+ type?: '1' | 'a' | 'A' | 'i' | 'I' | undefined;
2329
+ }
2330
+
2331
+ interface OptgroupHTMLAttributes<T> extends HTMLAttributes<T> {
2332
+ disabled?: boolean | undefined;
2333
+ label?: string | undefined;
2334
+ }
2335
+
2336
+ interface OptionHTMLAttributes<T> extends HTMLAttributes<T> {
2337
+ disabled?: boolean | undefined;
2338
+ label?: string | undefined;
2339
+ selected?: boolean | undefined;
2340
+ value?: string | ReadonlyArray<string> | number | undefined;
2341
+ }
2342
+
2343
+ interface OutputHTMLAttributes<T> extends HTMLAttributes<T> {
2344
+ form?: string | undefined;
2345
+ htmlFor?: string | undefined;
2346
+ name?: string | undefined;
2347
+ }
2348
+
2349
+ interface ParamHTMLAttributes<T> extends HTMLAttributes<T> {
2350
+ name?: string | undefined;
2351
+ value?: string | ReadonlyArray<string> | number | undefined;
2352
+ }
2353
+
2354
+ interface ProgressHTMLAttributes<T> extends HTMLAttributes<T> {
2355
+ max?: number | string | undefined;
2356
+ value?: string | ReadonlyArray<string> | number | undefined;
2357
+ }
2358
+
2359
+ interface SlotHTMLAttributes<T> extends HTMLAttributes<T> {
2360
+ name?: string | undefined;
2361
+ }
2362
+
2363
+ interface ScriptHTMLAttributes<T> extends HTMLAttributes<T> {
2364
+ async?: boolean | undefined;
2365
+ /** @deprecated */
2366
+ charSet?: string | undefined;
2367
+ crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
2368
+ defer?: boolean | undefined;
2369
+ integrity?: string | undefined;
2370
+ noModule?: boolean | undefined;
2371
+ referrerPolicy?: HTMLAttributeReferrerPolicy | undefined;
2372
+ src?: string | undefined;
2373
+ type?: string | undefined;
2374
+ }
2375
+
2376
+ interface SelectHTMLAttributes<T> extends HTMLAttributes<T> {
2377
+ autoComplete?: string | undefined;
2378
+ disabled?: boolean | undefined;
2379
+ form?: string | undefined;
2380
+ multiple?: boolean | undefined;
2381
+ name?: string | undefined;
2382
+ required?: boolean | undefined;
2383
+ size?: number | undefined;
2384
+ value?: string | ReadonlyArray<string> | number | undefined;
2385
+ onChange?: ChangeEventHandler<T> | undefined;
2386
+ }
2387
+
2388
+ interface SourceHTMLAttributes<T> extends HTMLAttributes<T> {
2389
+ height?: number | string | undefined;
2390
+ media?: string | undefined;
2391
+ sizes?: string | undefined;
2392
+ src?: string | undefined;
2393
+ srcSet?: string | undefined;
2394
+ type?: string | undefined;
2395
+ width?: number | string | undefined;
2396
+ }
2397
+
2398
+ interface StyleHTMLAttributes<T> extends HTMLAttributes<T> {
2399
+ media?: string | undefined;
2400
+ scoped?: boolean | undefined;
2401
+ type?: string | undefined;
2402
+ }
2403
+
2404
+ interface TableHTMLAttributes<T> extends HTMLAttributes<T> {
2405
+ align?: "left" | "center" | "right" | undefined;
2406
+ bgcolor?: string | undefined;
2407
+ border?: number | undefined;
2408
+ cellPadding?: number | string | undefined;
2409
+ cellSpacing?: number | string | undefined;
2410
+ frame?: boolean | undefined;
2411
+ rules?: "none" | "groups" | "rows" | "columns" | "all" | undefined;
2412
+ summary?: string | undefined;
2413
+ width?: number | string | undefined;
2414
+ }
2415
+
2416
+ interface TextareaHTMLAttributes<T> extends HTMLAttributes<T> {
2417
+ autoComplete?: string | undefined;
2418
+ cols?: number | undefined;
2419
+ dirName?: string | undefined;
2420
+ disabled?: boolean | undefined;
2421
+ form?: string | undefined;
2422
+ maxLength?: number | undefined;
2423
+ minLength?: number | undefined;
2424
+ name?: string | undefined;
2425
+ placeholder?: string | undefined;
2426
+ readOnly?: boolean | undefined;
2427
+ required?: boolean | undefined;
2428
+ rows?: number | undefined;
2429
+ value?: string | ReadonlyArray<string> | number | undefined;
2430
+ wrap?: string | undefined;
2431
+
2432
+ onChange?: ChangeEventHandler<T> | undefined;
2433
+ }
2434
+
2435
+ interface TdHTMLAttributes<T> extends HTMLAttributes<T> {
2436
+ align?: "left" | "center" | "right" | "justify" | "char" | undefined;
2437
+ colSpan?: number | undefined;
2438
+ headers?: string | undefined;
2439
+ rowSpan?: number | undefined;
2440
+ scope?: string | undefined;
2441
+ abbr?: string | undefined;
2442
+ height?: number | string | undefined;
2443
+ width?: number | string | undefined;
2444
+ valign?: "top" | "middle" | "bottom" | "baseline" | undefined;
2445
+ }
2446
+
2447
+ interface ThHTMLAttributes<T> extends HTMLAttributes<T> {
2448
+ align?: "left" | "center" | "right" | "justify" | "char" | undefined;
2449
+ colSpan?: number | undefined;
2450
+ headers?: string | undefined;
2451
+ rowSpan?: number | undefined;
2452
+ scope?: string | undefined;
2453
+ abbr?: string | undefined;
2454
+ }
2455
+
2456
+ interface TimeHTMLAttributes<T> extends HTMLAttributes<T> {
2457
+ dateTime?: string | undefined;
2458
+ }
2459
+
2460
+ interface TrackHTMLAttributes<T> extends HTMLAttributes<T> {
2461
+ default?: boolean | undefined;
2462
+ kind?: string | undefined;
2463
+ label?: string | undefined;
2464
+ src?: string | undefined;
2465
+ srcLang?: string | undefined;
2466
+ }
2467
+
2468
+ interface VideoHTMLAttributes<T> extends MediaHTMLAttributes<T> {
2469
+ height?: number | string | undefined;
2470
+ playsInline?: boolean | undefined;
2471
+ poster?: string | undefined;
2472
+ width?: number | string | undefined;
2473
+ disablePictureInPicture?: boolean | undefined;
2474
+ disableRemotePlayback?: boolean | undefined;
2475
+ }
2476
+
2477
+ // this list is "complete" in that it contains every SVG attribute
2478
+ // that React supports, but the types can be improved.
2479
+ // Full list here: https://facebook.github.io/react/docs/dom-elements.html
2480
+ //
2481
+ // The three broad type categories are (in order of restrictiveness):
2482
+ // - "number | string"
2483
+ // - "string"
2484
+ // - union of string literals
2485
+ interface SVGAttributes<T> extends AriaAttributes, DOMAttributes<T> {
2486
+ // Attributes which also defined in HTMLAttributes
2487
+ // See comment in SVGDOMPropertyConfig.js
2488
+ className?: string | undefined;
2489
+ color?: string | undefined;
2490
+ height?: number | string | undefined;
2491
+ id?: string | undefined;
2492
+ lang?: string | undefined;
2493
+ max?: number | string | undefined;
2494
+ media?: string | undefined;
2495
+ method?: string | undefined;
2496
+ min?: number | string | undefined;
2497
+ name?: string | undefined;
2498
+ style?: CSSProperties | undefined;
2499
+ target?: string | undefined;
2500
+ type?: string | undefined;
2501
+ width?: number | string | undefined;
2502
+
2503
+ // Other HTML properties supported by SVG elements in browsers
2504
+ role?: AriaRole | undefined;
2505
+ tabIndex?: number | undefined;
2506
+ crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
2507
+
2508
+ // SVG Specific attributes
2509
+ accentHeight?: number | string | undefined;
2510
+ accumulate?: "none" | "sum" | undefined;
2511
+ additive?: "replace" | "sum" | undefined;
2512
+ alignmentBaseline?: "auto" | "baseline" | "before-edge" | "text-before-edge" | "middle" | "central" | "after-edge" |
2513
+ "text-after-edge" | "ideographic" | "alphabetic" | "hanging" | "mathematical" | "inherit" | undefined;
2514
+ allowReorder?: "no" | "yes" | undefined;
2515
+ alphabetic?: number | string | undefined;
2516
+ amplitude?: number | string | undefined;
2517
+ arabicForm?: "initial" | "medial" | "terminal" | "isolated" | undefined;
2518
+ ascent?: number | string | undefined;
2519
+ attributeName?: string | undefined;
2520
+ attributeType?: string | undefined;
2521
+ autoReverse?: Booleanish | undefined;
2522
+ azimuth?: number | string | undefined;
2523
+ baseFrequency?: number | string | undefined;
2524
+ baselineShift?: number | string | undefined;
2525
+ baseProfile?: number | string | undefined;
2526
+ bbox?: number | string | undefined;
2527
+ begin?: number | string | undefined;
2528
+ bias?: number | string | undefined;
2529
+ by?: number | string | undefined;
2530
+ calcMode?: number | string | undefined;
2531
+ capHeight?: number | string | undefined;
2532
+ clip?: number | string | undefined;
2533
+ clipPath?: string | undefined;
2534
+ clipPathUnits?: number | string | undefined;
2535
+ clipRule?: number | string | undefined;
2536
+ colorInterpolation?: number | string | undefined;
2537
+ colorInterpolationFilters?: "auto" | "sRGB" | "linearRGB" | "inherit" | undefined;
2538
+ colorProfile?: number | string | undefined;
2539
+ colorRendering?: number | string | undefined;
2540
+ contentScriptType?: number | string | undefined;
2541
+ contentStyleType?: number | string | undefined;
2542
+ cursor?: number | string | undefined;
2543
+ cx?: number | string | undefined;
2544
+ cy?: number | string | undefined;
2545
+ d?: string | undefined;
2546
+ decelerate?: number | string | undefined;
2547
+ descent?: number | string | undefined;
2548
+ diffuseConstant?: number | string | undefined;
2549
+ direction?: number | string | undefined;
2550
+ display?: number | string | undefined;
2551
+ divisor?: number | string | undefined;
2552
+ dominantBaseline?: number | string | undefined;
2553
+ dur?: number | string | undefined;
2554
+ dx?: number | string | undefined;
2555
+ dy?: number | string | undefined;
2556
+ edgeMode?: number | string | undefined;
2557
+ elevation?: number | string | undefined;
2558
+ enableBackground?: number | string | undefined;
2559
+ end?: number | string | undefined;
2560
+ exponent?: number | string | undefined;
2561
+ externalResourcesRequired?: Booleanish | undefined;
2562
+ fill?: string | undefined;
2563
+ fillOpacity?: number | string | undefined;
2564
+ fillRule?: "nonzero" | "evenodd" | "inherit" | undefined;
2565
+ filter?: string | undefined;
2566
+ filterRes?: number | string | undefined;
2567
+ filterUnits?: number | string | undefined;
2568
+ floodColor?: number | string | undefined;
2569
+ floodOpacity?: number | string | undefined;
2570
+ focusable?: Booleanish | "auto" | undefined;
2571
+ fontFamily?: string | undefined;
2572
+ fontSize?: number | string | undefined;
2573
+ fontSizeAdjust?: number | string | undefined;
2574
+ fontStretch?: number | string | undefined;
2575
+ fontStyle?: number | string | undefined;
2576
+ fontVariant?: number | string | undefined;
2577
+ fontWeight?: number | string | undefined;
2578
+ format?: number | string | undefined;
2579
+ fr?: number | string | undefined;
2580
+ from?: number | string | undefined;
2581
+ fx?: number | string | undefined;
2582
+ fy?: number | string | undefined;
2583
+ g1?: number | string | undefined;
2584
+ g2?: number | string | undefined;
2585
+ glyphName?: number | string | undefined;
2586
+ glyphOrientationHorizontal?: number | string | undefined;
2587
+ glyphOrientationVertical?: number | string | undefined;
2588
+ glyphRef?: number | string | undefined;
2589
+ gradientTransform?: string | undefined;
2590
+ gradientUnits?: string | undefined;
2591
+ hanging?: number | string | undefined;
2592
+ horizAdvX?: number | string | undefined;
2593
+ horizOriginX?: number | string | undefined;
2594
+ href?: string | undefined;
2595
+ ideographic?: number | string | undefined;
2596
+ imageRendering?: number | string | undefined;
2597
+ in2?: number | string | undefined;
2598
+ in?: string | undefined;
2599
+ intercept?: number | string | undefined;
2600
+ k1?: number | string | undefined;
2601
+ k2?: number | string | undefined;
2602
+ k3?: number | string | undefined;
2603
+ k4?: number | string | undefined;
2604
+ k?: number | string | undefined;
2605
+ kernelMatrix?: number | string | undefined;
2606
+ kernelUnitLength?: number | string | undefined;
2607
+ kerning?: number | string | undefined;
2608
+ keyPoints?: number | string | undefined;
2609
+ keySplines?: number | string | undefined;
2610
+ keyTimes?: number | string | undefined;
2611
+ lengthAdjust?: number | string | undefined;
2612
+ letterSpacing?: number | string | undefined;
2613
+ lightingColor?: number | string | undefined;
2614
+ limitingConeAngle?: number | string | undefined;
2615
+ local?: number | string | undefined;
2616
+ markerEnd?: string | undefined;
2617
+ markerHeight?: number | string | undefined;
2618
+ markerMid?: string | undefined;
2619
+ markerStart?: string | undefined;
2620
+ markerUnits?: number | string | undefined;
2621
+ markerWidth?: number | string | undefined;
2622
+ mask?: string | undefined;
2623
+ maskContentUnits?: number | string | undefined;
2624
+ maskUnits?: number | string | undefined;
2625
+ mathematical?: number | string | undefined;
2626
+ mode?: number | string | undefined;
2627
+ numOctaves?: number | string | undefined;
2628
+ offset?: number | string | undefined;
2629
+ opacity?: number | string | undefined;
2630
+ operator?: number | string | undefined;
2631
+ order?: number | string | undefined;
2632
+ orient?: number | string | undefined;
2633
+ orientation?: number | string | undefined;
2634
+ origin?: number | string | undefined;
2635
+ overflow?: number | string | undefined;
2636
+ overlinePosition?: number | string | undefined;
2637
+ overlineThickness?: number | string | undefined;
2638
+ paintOrder?: number | string | undefined;
2639
+ panose1?: number | string | undefined;
2640
+ path?: string | undefined;
2641
+ pathLength?: number | string | undefined;
2642
+ patternContentUnits?: string | undefined;
2643
+ patternTransform?: number | string | undefined;
2644
+ patternUnits?: string | undefined;
2645
+ pointerEvents?: number | string | undefined;
2646
+ points?: string | undefined;
2647
+ pointsAtX?: number | string | undefined;
2648
+ pointsAtY?: number | string | undefined;
2649
+ pointsAtZ?: number | string | undefined;
2650
+ preserveAlpha?: Booleanish | undefined;
2651
+ preserveAspectRatio?: string | undefined;
2652
+ primitiveUnits?: number | string | undefined;
2653
+ r?: number | string | undefined;
2654
+ radius?: number | string | undefined;
2655
+ refX?: number | string | undefined;
2656
+ refY?: number | string | undefined;
2657
+ renderingIntent?: number | string | undefined;
2658
+ repeatCount?: number | string | undefined;
2659
+ repeatDur?: number | string | undefined;
2660
+ requiredExtensions?: number | string | undefined;
2661
+ requiredFeatures?: number | string | undefined;
2662
+ restart?: number | string | undefined;
2663
+ result?: string | undefined;
2664
+ rotate?: number | string | undefined;
2665
+ rx?: number | string | undefined;
2666
+ ry?: number | string | undefined;
2667
+ scale?: number | string | undefined;
2668
+ seed?: number | string | undefined;
2669
+ shapeRendering?: number | string | undefined;
2670
+ slope?: number | string | undefined;
2671
+ spacing?: number | string | undefined;
2672
+ specularConstant?: number | string | undefined;
2673
+ specularExponent?: number | string | undefined;
2674
+ speed?: number | string | undefined;
2675
+ spreadMethod?: string | undefined;
2676
+ startOffset?: number | string | undefined;
2677
+ stdDeviation?: number | string | undefined;
2678
+ stemh?: number | string | undefined;
2679
+ stemv?: number | string | undefined;
2680
+ stitchTiles?: number | string | undefined;
2681
+ stopColor?: string | undefined;
2682
+ stopOpacity?: number | string | undefined;
2683
+ strikethroughPosition?: number | string | undefined;
2684
+ strikethroughThickness?: number | string | undefined;
2685
+ string?: number | string | undefined;
2686
+ stroke?: string | undefined;
2687
+ strokeDasharray?: string | number | undefined;
2688
+ strokeDashoffset?: string | number | undefined;
2689
+ strokeLinecap?: "butt" | "round" | "square" | "inherit" | undefined;
2690
+ strokeLinejoin?: "miter" | "round" | "bevel" | "inherit" | undefined;
2691
+ strokeMiterlimit?: number | string | undefined;
2692
+ strokeOpacity?: number | string | undefined;
2693
+ strokeWidth?: number | string | undefined;
2694
+ surfaceScale?: number | string | undefined;
2695
+ systemLanguage?: number | string | undefined;
2696
+ tableValues?: number | string | undefined;
2697
+ targetX?: number | string | undefined;
2698
+ targetY?: number | string | undefined;
2699
+ textAnchor?: string | undefined;
2700
+ textDecoration?: number | string | undefined;
2701
+ textLength?: number | string | undefined;
2702
+ textRendering?: number | string | undefined;
2703
+ to?: number | string | undefined;
2704
+ transform?: string | undefined;
2705
+ u1?: number | string | undefined;
2706
+ u2?: number | string | undefined;
2707
+ underlinePosition?: number | string | undefined;
2708
+ underlineThickness?: number | string | undefined;
2709
+ unicode?: number | string | undefined;
2710
+ unicodeBidi?: number | string | undefined;
2711
+ unicodeRange?: number | string | undefined;
2712
+ unitsPerEm?: number | string | undefined;
2713
+ vAlphabetic?: number | string | undefined;
2714
+ values?: string | undefined;
2715
+ vectorEffect?: number | string | undefined;
2716
+ version?: string | undefined;
2717
+ vertAdvY?: number | string | undefined;
2718
+ vertOriginX?: number | string | undefined;
2719
+ vertOriginY?: number | string | undefined;
2720
+ vHanging?: number | string | undefined;
2721
+ vIdeographic?: number | string | undefined;
2722
+ viewBox?: string | undefined;
2723
+ viewTarget?: number | string | undefined;
2724
+ visibility?: number | string | undefined;
2725
+ vMathematical?: number | string | undefined;
2726
+ widths?: number | string | undefined;
2727
+ wordSpacing?: number | string | undefined;
2728
+ writingMode?: number | string | undefined;
2729
+ x1?: number | string | undefined;
2730
+ x2?: number | string | undefined;
2731
+ x?: number | string | undefined;
2732
+ xChannelSelector?: string | undefined;
2733
+ xHeight?: number | string | undefined;
2734
+ xlinkActuate?: string | undefined;
2735
+ xlinkArcrole?: string | undefined;
2736
+ xlinkHref?: string | undefined;
2737
+ xlinkRole?: string | undefined;
2738
+ xlinkShow?: string | undefined;
2739
+ xlinkTitle?: string | undefined;
2740
+ xlinkType?: string | undefined;
2741
+ xmlBase?: string | undefined;
2742
+ xmlLang?: string | undefined;
2743
+ xmlns?: string | undefined;
2744
+ xmlnsXlink?: string | undefined;
2745
+ xmlSpace?: string | undefined;
2746
+ y1?: number | string | undefined;
2747
+ y2?: number | string | undefined;
2748
+ y?: number | string | undefined;
2749
+ yChannelSelector?: string | undefined;
2750
+ z?: number | string | undefined;
2751
+ zoomAndPan?: string | undefined;
2752
+ }
2753
+
2754
+ interface WebViewHTMLAttributes<T> extends HTMLAttributes<T> {
2755
+ allowFullScreen?: boolean | undefined;
2756
+ allowpopups?: boolean | undefined;
2757
+ autosize?: boolean | undefined;
2758
+ blinkfeatures?: string | undefined;
2759
+ disableblinkfeatures?: string | undefined;
2760
+ disableguestresize?: boolean | undefined;
2761
+ disablewebsecurity?: boolean | undefined;
2762
+ guestinstance?: string | undefined;
2763
+ httpreferrer?: string | undefined;
2764
+ nodeintegration?: boolean | undefined;
2765
+ partition?: string | undefined;
2766
+ plugins?: boolean | undefined;
2767
+ preload?: string | undefined;
2768
+ src?: string | undefined;
2769
+ useragent?: string | undefined;
2770
+ webpreferences?: string | undefined;
2771
+ }
2772
+
2773
+ //
2774
+ // React.DOM
2775
+ // ----------------------------------------------------------------------
2776
+
2777
+ interface ReactHTML {
2778
+ a: DetailedHTMLFactory<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;
2779
+ abbr: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2780
+ address: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2781
+ area: DetailedHTMLFactory<AreaHTMLAttributes<HTMLAreaElement>, HTMLAreaElement>;
2782
+ article: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2783
+ aside: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2784
+ audio: DetailedHTMLFactory<AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>;
2785
+ b: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2786
+ base: DetailedHTMLFactory<BaseHTMLAttributes<HTMLBaseElement>, HTMLBaseElement>;
2787
+ bdi: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2788
+ bdo: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2789
+ big: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2790
+ blockquote: DetailedHTMLFactory<BlockquoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>;
2791
+ body: DetailedHTMLFactory<HTMLAttributes<HTMLBodyElement>, HTMLBodyElement>;
2792
+ br: DetailedHTMLFactory<HTMLAttributes<HTMLBRElement>, HTMLBRElement>;
2793
+ button: DetailedHTMLFactory<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
2794
+ canvas: DetailedHTMLFactory<CanvasHTMLAttributes<HTMLCanvasElement>, HTMLCanvasElement>;
2795
+ caption: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2796
+ center: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2797
+ cite: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2798
+ code: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2799
+ col: DetailedHTMLFactory<ColHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>;
2800
+ colgroup: DetailedHTMLFactory<ColgroupHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>;
2801
+ data: DetailedHTMLFactory<DataHTMLAttributes<HTMLDataElement>, HTMLDataElement>;
2802
+ datalist: DetailedHTMLFactory<HTMLAttributes<HTMLDataListElement>, HTMLDataListElement>;
2803
+ dd: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2804
+ del: DetailedHTMLFactory<DelHTMLAttributes<HTMLModElement>, HTMLModElement>;
2805
+ details: DetailedHTMLFactory<DetailsHTMLAttributes<HTMLDetailsElement>, HTMLDetailsElement>;
2806
+ dfn: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2807
+ dialog: DetailedHTMLFactory<DialogHTMLAttributes<HTMLDialogElement>, HTMLDialogElement>;
2808
+ div: DetailedHTMLFactory<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
2809
+ dl: DetailedHTMLFactory<HTMLAttributes<HTMLDListElement>, HTMLDListElement>;
2810
+ dt: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2811
+ em: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2812
+ embed: DetailedHTMLFactory<EmbedHTMLAttributes<HTMLEmbedElement>, HTMLEmbedElement>;
2813
+ fieldset: DetailedHTMLFactory<FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>;
2814
+ figcaption: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2815
+ figure: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2816
+ footer: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2817
+ form: DetailedHTMLFactory<FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>;
2818
+ h1: DetailedHTMLFactory<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
2819
+ h2: DetailedHTMLFactory<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
2820
+ h3: DetailedHTMLFactory<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
2821
+ h4: DetailedHTMLFactory<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
2822
+ h5: DetailedHTMLFactory<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
2823
+ h6: DetailedHTMLFactory<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
2824
+ head: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLHeadElement>;
2825
+ header: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2826
+ hgroup: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2827
+ hr: DetailedHTMLFactory<HTMLAttributes<HTMLHRElement>, HTMLHRElement>;
2828
+ html: DetailedHTMLFactory<HtmlHTMLAttributes<HTMLHtmlElement>, HTMLHtmlElement>;
2829
+ i: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2830
+ iframe: DetailedHTMLFactory<IframeHTMLAttributes<HTMLIFrameElement>, HTMLIFrameElement>;
2831
+ img: DetailedHTMLFactory<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>;
2832
+ input: DetailedHTMLFactory<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
2833
+ ins: DetailedHTMLFactory<InsHTMLAttributes<HTMLModElement>, HTMLModElement>;
2834
+ kbd: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2835
+ keygen: DetailedHTMLFactory<KeygenHTMLAttributes<HTMLElement>, HTMLElement>;
2836
+ label: DetailedHTMLFactory<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>;
2837
+ legend: DetailedHTMLFactory<HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>;
2838
+ li: DetailedHTMLFactory<LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>;
2839
+ link: DetailedHTMLFactory<LinkHTMLAttributes<HTMLLinkElement>, HTMLLinkElement>;
2840
+ main: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2841
+ map: DetailedHTMLFactory<MapHTMLAttributes<HTMLMapElement>, HTMLMapElement>;
2842
+ mark: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2843
+ menu: DetailedHTMLFactory<MenuHTMLAttributes<HTMLElement>, HTMLElement>;
2844
+ menuitem: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2845
+ meta: DetailedHTMLFactory<MetaHTMLAttributes<HTMLMetaElement>, HTMLMetaElement>;
2846
+ meter: DetailedHTMLFactory<MeterHTMLAttributes<HTMLMeterElement>, HTMLMeterElement>;
2847
+ nav: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2848
+ noscript: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2849
+ object: DetailedHTMLFactory<ObjectHTMLAttributes<HTMLObjectElement>, HTMLObjectElement>;
2850
+ ol: DetailedHTMLFactory<OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>;
2851
+ optgroup: DetailedHTMLFactory<OptgroupHTMLAttributes<HTMLOptGroupElement>, HTMLOptGroupElement>;
2852
+ option: DetailedHTMLFactory<OptionHTMLAttributes<HTMLOptionElement>, HTMLOptionElement>;
2853
+ output: DetailedHTMLFactory<OutputHTMLAttributes<HTMLOutputElement>, HTMLOutputElement>;
2854
+ p: DetailedHTMLFactory<HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>;
2855
+ param: DetailedHTMLFactory<ParamHTMLAttributes<HTMLParamElement>, HTMLParamElement>;
2856
+ picture: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2857
+ pre: DetailedHTMLFactory<HTMLAttributes<HTMLPreElement>, HTMLPreElement>;
2858
+ progress: DetailedHTMLFactory<ProgressHTMLAttributes<HTMLProgressElement>, HTMLProgressElement>;
2859
+ q: DetailedHTMLFactory<QuoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>;
2860
+ rp: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2861
+ rt: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2862
+ ruby: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2863
+ s: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2864
+ samp: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2865
+ slot: DetailedHTMLFactory<SlotHTMLAttributes<HTMLSlotElement>, HTMLSlotElement>;
2866
+ script: DetailedHTMLFactory<ScriptHTMLAttributes<HTMLScriptElement>, HTMLScriptElement>;
2867
+ section: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2868
+ select: DetailedHTMLFactory<SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>;
2869
+ small: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2870
+ source: DetailedHTMLFactory<SourceHTMLAttributes<HTMLSourceElement>, HTMLSourceElement>;
2871
+ span: DetailedHTMLFactory<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;
2872
+ strong: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2873
+ style: DetailedHTMLFactory<StyleHTMLAttributes<HTMLStyleElement>, HTMLStyleElement>;
2874
+ sub: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2875
+ summary: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2876
+ sup: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2877
+ table: DetailedHTMLFactory<TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>;
2878
+ template: DetailedHTMLFactory<HTMLAttributes<HTMLTemplateElement>, HTMLTemplateElement>;
2879
+ tbody: DetailedHTMLFactory<HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>;
2880
+ td: DetailedHTMLFactory<TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>;
2881
+ textarea: DetailedHTMLFactory<TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>;
2882
+ tfoot: DetailedHTMLFactory<HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>;
2883
+ th: DetailedHTMLFactory<ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>;
2884
+ thead: DetailedHTMLFactory<HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>;
2885
+ time: DetailedHTMLFactory<TimeHTMLAttributes<HTMLTimeElement>, HTMLTimeElement>;
2886
+ title: DetailedHTMLFactory<HTMLAttributes<HTMLTitleElement>, HTMLTitleElement>;
2887
+ tr: DetailedHTMLFactory<HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>;
2888
+ track: DetailedHTMLFactory<TrackHTMLAttributes<HTMLTrackElement>, HTMLTrackElement>;
2889
+ u: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2890
+ ul: DetailedHTMLFactory<HTMLAttributes<HTMLUListElement>, HTMLUListElement>;
2891
+ "var": DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2892
+ video: DetailedHTMLFactory<VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>;
2893
+ wbr: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2894
+ webview: DetailedHTMLFactory<WebViewHTMLAttributes<HTMLWebViewElement>, HTMLWebViewElement>;
2895
+ }
2896
+
2897
+ interface ReactSVG {
2898
+ animate: SVGFactory;
2899
+ circle: SVGFactory;
2900
+ clipPath: SVGFactory;
2901
+ defs: SVGFactory;
2902
+ desc: SVGFactory;
2903
+ ellipse: SVGFactory;
2904
+ feBlend: SVGFactory;
2905
+ feColorMatrix: SVGFactory;
2906
+ feComponentTransfer: SVGFactory;
2907
+ feComposite: SVGFactory;
2908
+ feConvolveMatrix: SVGFactory;
2909
+ feDiffuseLighting: SVGFactory;
2910
+ feDisplacementMap: SVGFactory;
2911
+ feDistantLight: SVGFactory;
2912
+ feDropShadow: SVGFactory;
2913
+ feFlood: SVGFactory;
2914
+ feFuncA: SVGFactory;
2915
+ feFuncB: SVGFactory;
2916
+ feFuncG: SVGFactory;
2917
+ feFuncR: SVGFactory;
2918
+ feGaussianBlur: SVGFactory;
2919
+ feImage: SVGFactory;
2920
+ feMerge: SVGFactory;
2921
+ feMergeNode: SVGFactory;
2922
+ feMorphology: SVGFactory;
2923
+ feOffset: SVGFactory;
2924
+ fePointLight: SVGFactory;
2925
+ feSpecularLighting: SVGFactory;
2926
+ feSpotLight: SVGFactory;
2927
+ feTile: SVGFactory;
2928
+ feTurbulence: SVGFactory;
2929
+ filter: SVGFactory;
2930
+ foreignObject: SVGFactory;
2931
+ g: SVGFactory;
2932
+ image: SVGFactory;
2933
+ line: SVGFactory;
2934
+ linearGradient: SVGFactory;
2935
+ marker: SVGFactory;
2936
+ mask: SVGFactory;
2937
+ metadata: SVGFactory;
2938
+ path: SVGFactory;
2939
+ pattern: SVGFactory;
2940
+ polygon: SVGFactory;
2941
+ polyline: SVGFactory;
2942
+ radialGradient: SVGFactory;
2943
+ rect: SVGFactory;
2944
+ stop: SVGFactory;
2945
+ svg: SVGFactory;
2946
+ switch: SVGFactory;
2947
+ symbol: SVGFactory;
2948
+ text: SVGFactory;
2949
+ textPath: SVGFactory;
2950
+ tspan: SVGFactory;
2951
+ use: SVGFactory;
2952
+ view: SVGFactory;
2953
+ }
2954
+
2955
+ interface ReactDOM extends ReactHTML, ReactSVG { }
2956
+
2957
+ //
2958
+ // React.PropTypes
2959
+ // ----------------------------------------------------------------------
2960
+
2961
+ type Validator<T> = PropTypes.Validator<T>;
2962
+
2963
+ type Requireable<T> = PropTypes.Requireable<T>;
2964
+
2965
+ type ValidationMap<T> = PropTypes.ValidationMap<T>;
2966
+
2967
+ type WeakValidationMap<T> = {
2968
+ [K in keyof T]?: null extends T[K]
2969
+ ? Validator<T[K] | null | undefined>
2970
+ : undefined extends T[K]
2971
+ ? Validator<T[K] | null | undefined>
2972
+ : Validator<T[K]>
2973
+ };
2974
+
2975
+ interface ReactPropTypes {
2976
+ any: typeof PropTypes.any;
2977
+ array: typeof PropTypes.array;
2978
+ bool: typeof PropTypes.bool;
2979
+ func: typeof PropTypes.func;
2980
+ number: typeof PropTypes.number;
2981
+ object: typeof PropTypes.object;
2982
+ string: typeof PropTypes.string;
2983
+ node: typeof PropTypes.node;
2984
+ element: typeof PropTypes.element;
2985
+ instanceOf: typeof PropTypes.instanceOf;
2986
+ oneOf: typeof PropTypes.oneOf;
2987
+ oneOfType: typeof PropTypes.oneOfType;
2988
+ arrayOf: typeof PropTypes.arrayOf;
2989
+ objectOf: typeof PropTypes.objectOf;
2990
+ shape: typeof PropTypes.shape;
2991
+ exact: typeof PropTypes.exact;
2992
+ }
2993
+
2994
+ //
2995
+ // React.Children
2996
+ // ----------------------------------------------------------------------
2997
+
2998
+ /**
2999
+ * @deprecated - Use `typeof React.Children` instead.
3000
+ */
3001
+ // Sync with type of `const Children`.
3002
+ interface ReactChildren {
3003
+ map<T, C>(children: C | ReadonlyArray<C>, fn: (child: C, index: number) => T):
3004
+ C extends null | undefined ? C : Array<Exclude<T, boolean | null | undefined>>;
3005
+ forEach<C>(children: C | ReadonlyArray<C>, fn: (child: C, index: number) => void): void;
3006
+ count(children: any): number;
3007
+ only<C>(children: C): C extends any[] ? never : C;
3008
+ toArray(children: ReactNode | ReactNode[]): Array<Exclude<ReactNode, boolean | null | undefined>>;
3009
+ }
3010
+
3011
+ //
3012
+ // Browser Interfaces
3013
+ // https://github.com/nikeee/2048-typescript/blob/master/2048/js/touch.d.ts
3014
+ // ----------------------------------------------------------------------
3015
+
3016
+ interface AbstractView {
3017
+ styleMedia: StyleMedia;
3018
+ document: Document;
3019
+ }
3020
+
3021
+ interface Touch {
3022
+ identifier: number;
3023
+ target: EventTarget;
3024
+ screenX: number;
3025
+ screenY: number;
3026
+ clientX: number;
3027
+ clientY: number;
3028
+ pageX: number;
3029
+ pageY: number;
3030
+ }
3031
+
3032
+ interface TouchList {
3033
+ [index: number]: Touch;
3034
+ length: number;
3035
+ item(index: number): Touch;
3036
+ identifiedTouch(identifier: number): Touch;
3037
+ }
3038
+
3039
+ //
3040
+ // Error Interfaces
3041
+ // ----------------------------------------------------------------------
3042
+ interface ErrorInfo {
3043
+ /**
3044
+ * Captures which component contained the exception, and its ancestors.
3045
+ */
3046
+ componentStack: string;
3047
+ }
3048
+ }
3049
+
3050
+ // naked 'any' type in a conditional type will short circuit and union both the then/else branches
3051
+ // so boolean is only resolved for T = any
3052
+ type IsExactlyAny<T> = boolean extends (T extends never ? true : false) ? true : false;
3053
+
3054
+ type ExactlyAnyPropertyKeys<T> = { [K in keyof T]: IsExactlyAny<T[K]> extends true ? K : never }[keyof T];
3055
+ type NotExactlyAnyPropertyKeys<T> = Exclude<keyof T, ExactlyAnyPropertyKeys<T>>;
3056
+
3057
+ // Try to resolve ill-defined props like for JS users: props can be any, or sometimes objects with properties of type any
3058
+ type MergePropTypes<P, T> =
3059
+ // Distribute over P in case it is a union type
3060
+ P extends any
3061
+ // If props is type any, use propTypes definitions
3062
+ ? IsExactlyAny<P> extends true ? T :
3063
+ // If declared props have indexed properties, ignore inferred props entirely as keyof gets widened
3064
+ string extends keyof P ? P :
3065
+ // Prefer declared types which are not exactly any
3066
+ & Pick<P, NotExactlyAnyPropertyKeys<P>>
3067
+ // For props which are exactly any, use the type inferred from propTypes if present
3068
+ & Pick<T, Exclude<keyof T, NotExactlyAnyPropertyKeys<P>>>
3069
+ // Keep leftover props not specified in propTypes
3070
+ & Pick<P, Exclude<keyof P, keyof T>>
3071
+ : never;
3072
+
3073
+ type InexactPartial<T> = { [K in keyof T]?: T[K] | undefined };
3074
+
3075
+ // Any prop that has a default prop becomes optional, but its type is unchanged
3076
+ // Undeclared default props are augmented into the resulting allowable attributes
3077
+ // If declared props have indexed properties, ignore default props entirely as keyof gets widened
3078
+ // Wrap in an outer-level conditional type to allow distribution over props that are unions
3079
+ type Defaultize<P, D> = P extends any
3080
+ ? string extends keyof P ? P :
3081
+ & Pick<P, Exclude<keyof P, keyof D>>
3082
+ & InexactPartial<Pick<P, Extract<keyof P, keyof D>>>
3083
+ & InexactPartial<Pick<D, Exclude<keyof D, keyof P>>>
3084
+ : never;
3085
+
3086
+ type ReactManagedAttributes<C, P> = C extends { propTypes: infer T; defaultProps: infer D; }
3087
+ ? Defaultize<MergePropTypes<P, PropTypes.InferProps<T>>, D>
3088
+ : C extends { propTypes: infer T; }
3089
+ ? MergePropTypes<P, PropTypes.InferProps<T>>
3090
+ : C extends { defaultProps: infer D; }
3091
+ ? Defaultize<P, D>
3092
+ : P;
3093
+
3094
+ declare global {
3095
+ namespace JSX {
3096
+ interface Element extends React.ReactElement<any, any> { }
3097
+ interface ElementClass extends React.Component<any> {
3098
+ render(): React.ReactNode;
3099
+ }
3100
+ interface ElementAttributesProperty { props: {}; }
3101
+ interface ElementChildrenAttribute { children: {}; }
3102
+
3103
+ // We can't recurse forever because `type` can't be self-referential;
3104
+ // let's assume it's reasonable to do a single React.lazy() around a single React.memo() / vice-versa
3105
+ type LibraryManagedAttributes<C, P> = C extends React.MemoExoticComponent<infer T> | React.LazyExoticComponent<infer T>
3106
+ ? T extends React.MemoExoticComponent<infer U> | React.LazyExoticComponent<infer U>
3107
+ ? ReactManagedAttributes<U, P>
3108
+ : ReactManagedAttributes<T, P>
3109
+ : ReactManagedAttributes<C, P>;
3110
+
3111
+ interface IntrinsicAttributes extends React.Attributes { }
3112
+ interface IntrinsicClassAttributes<T> extends React.ClassAttributes<T> { }
3113
+
3114
+ interface IntrinsicElements {
3115
+ // HTML
3116
+ a: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;
3117
+ abbr: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3118
+ address: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3119
+ area: React.DetailedHTMLProps<React.AreaHTMLAttributes<HTMLAreaElement>, HTMLAreaElement>;
3120
+ article: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3121
+ aside: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3122
+ audio: React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>;
3123
+ b: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3124
+ base: React.DetailedHTMLProps<React.BaseHTMLAttributes<HTMLBaseElement>, HTMLBaseElement>;
3125
+ bdi: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3126
+ bdo: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3127
+ big: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3128
+ blockquote: React.DetailedHTMLProps<React.BlockquoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>;
3129
+ body: React.DetailedHTMLProps<React.HTMLAttributes<HTMLBodyElement>, HTMLBodyElement>;
3130
+ br: React.DetailedHTMLProps<React.HTMLAttributes<HTMLBRElement>, HTMLBRElement>;
3131
+ button: React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
3132
+ canvas: React.DetailedHTMLProps<React.CanvasHTMLAttributes<HTMLCanvasElement>, HTMLCanvasElement>;
3133
+ caption: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3134
+ center: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3135
+ cite: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3136
+ code: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3137
+ col: React.DetailedHTMLProps<React.ColHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>;
3138
+ colgroup: React.DetailedHTMLProps<React.ColgroupHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>;
3139
+ data: React.DetailedHTMLProps<React.DataHTMLAttributes<HTMLDataElement>, HTMLDataElement>;
3140
+ datalist: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDataListElement>, HTMLDataListElement>;
3141
+ dd: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3142
+ del: React.DetailedHTMLProps<React.DelHTMLAttributes<HTMLModElement>, HTMLModElement>;
3143
+ details: React.DetailedHTMLProps<React.DetailsHTMLAttributes<HTMLDetailsElement>, HTMLDetailsElement>;
3144
+ dfn: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3145
+ dialog: React.DetailedHTMLProps<React.DialogHTMLAttributes<HTMLDialogElement>, HTMLDialogElement>;
3146
+ div: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
3147
+ dl: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDListElement>, HTMLDListElement>;
3148
+ dt: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3149
+ em: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3150
+ embed: React.DetailedHTMLProps<React.EmbedHTMLAttributes<HTMLEmbedElement>, HTMLEmbedElement>;
3151
+ fieldset: React.DetailedHTMLProps<React.FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>;
3152
+ figcaption: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3153
+ figure: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3154
+ footer: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3155
+ form: React.DetailedHTMLProps<React.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>;
3156
+ h1: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
3157
+ h2: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
3158
+ h3: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
3159
+ h4: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
3160
+ h5: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
3161
+ h6: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
3162
+ head: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadElement>, HTMLHeadElement>;
3163
+ header: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3164
+ hgroup: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3165
+ hr: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHRElement>, HTMLHRElement>;
3166
+ html: React.DetailedHTMLProps<React.HtmlHTMLAttributes<HTMLHtmlElement>, HTMLHtmlElement>;
3167
+ i: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3168
+ iframe: React.DetailedHTMLProps<React.IframeHTMLAttributes<HTMLIFrameElement>, HTMLIFrameElement>;
3169
+ img: React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>;
3170
+ input: React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
3171
+ ins: React.DetailedHTMLProps<React.InsHTMLAttributes<HTMLModElement>, HTMLModElement>;
3172
+ kbd: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3173
+ keygen: React.DetailedHTMLProps<React.KeygenHTMLAttributes<HTMLElement>, HTMLElement>;
3174
+ label: React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>;
3175
+ legend: React.DetailedHTMLProps<React.HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>;
3176
+ li: React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>;
3177
+ link: React.DetailedHTMLProps<React.LinkHTMLAttributes<HTMLLinkElement>, HTMLLinkElement>;
3178
+ main: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3179
+ map: React.DetailedHTMLProps<React.MapHTMLAttributes<HTMLMapElement>, HTMLMapElement>;
3180
+ mark: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3181
+ menu: React.DetailedHTMLProps<React.MenuHTMLAttributes<HTMLElement>, HTMLElement>;
3182
+ menuitem: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3183
+ meta: React.DetailedHTMLProps<React.MetaHTMLAttributes<HTMLMetaElement>, HTMLMetaElement>;
3184
+ meter: React.DetailedHTMLProps<React.MeterHTMLAttributes<HTMLMeterElement>, HTMLMeterElement>;
3185
+ nav: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3186
+ noindex: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3187
+ noscript: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3188
+ object: React.DetailedHTMLProps<React.ObjectHTMLAttributes<HTMLObjectElement>, HTMLObjectElement>;
3189
+ ol: React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>;
3190
+ optgroup: React.DetailedHTMLProps<React.OptgroupHTMLAttributes<HTMLOptGroupElement>, HTMLOptGroupElement>;
3191
+ option: React.DetailedHTMLProps<React.OptionHTMLAttributes<HTMLOptionElement>, HTMLOptionElement>;
3192
+ output: React.DetailedHTMLProps<React.OutputHTMLAttributes<HTMLOutputElement>, HTMLOutputElement>;
3193
+ p: React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>;
3194
+ param: React.DetailedHTMLProps<React.ParamHTMLAttributes<HTMLParamElement>, HTMLParamElement>;
3195
+ picture: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3196
+ pre: React.DetailedHTMLProps<React.HTMLAttributes<HTMLPreElement>, HTMLPreElement>;
3197
+ progress: React.DetailedHTMLProps<React.ProgressHTMLAttributes<HTMLProgressElement>, HTMLProgressElement>;
3198
+ q: React.DetailedHTMLProps<React.QuoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>;
3199
+ rp: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3200
+ rt: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3201
+ ruby: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3202
+ s: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3203
+ samp: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3204
+ slot: React.DetailedHTMLProps<React.SlotHTMLAttributes<HTMLSlotElement>, HTMLSlotElement>;
3205
+ script: React.DetailedHTMLProps<React.ScriptHTMLAttributes<HTMLScriptElement>, HTMLScriptElement>;
3206
+ section: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3207
+ select: React.DetailedHTMLProps<React.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>;
3208
+ small: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3209
+ source: React.DetailedHTMLProps<React.SourceHTMLAttributes<HTMLSourceElement>, HTMLSourceElement>;
3210
+ span: React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;
3211
+ strong: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3212
+ style: React.DetailedHTMLProps<React.StyleHTMLAttributes<HTMLStyleElement>, HTMLStyleElement>;
3213
+ sub: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3214
+ summary: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3215
+ sup: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3216
+ table: React.DetailedHTMLProps<React.TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>;
3217
+ template: React.DetailedHTMLProps<React.HTMLAttributes<HTMLTemplateElement>, HTMLTemplateElement>;
3218
+ tbody: React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>;
3219
+ td: React.DetailedHTMLProps<React.TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>;
3220
+ textarea: React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>;
3221
+ tfoot: React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>;
3222
+ th: React.DetailedHTMLProps<React.ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>;
3223
+ thead: React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>;
3224
+ time: React.DetailedHTMLProps<React.TimeHTMLAttributes<HTMLTimeElement>, HTMLTimeElement>;
3225
+ title: React.DetailedHTMLProps<React.HTMLAttributes<HTMLTitleElement>, HTMLTitleElement>;
3226
+ tr: React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>;
3227
+ track: React.DetailedHTMLProps<React.TrackHTMLAttributes<HTMLTrackElement>, HTMLTrackElement>;
3228
+ u: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3229
+ ul: React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>;
3230
+ "var": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3231
+ video: React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>;
3232
+ wbr: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3233
+ webview: React.DetailedHTMLProps<React.WebViewHTMLAttributes<HTMLWebViewElement>, HTMLWebViewElement>;
3234
+
3235
+ // SVG
3236
+ svg: React.SVGProps<SVGSVGElement>;
3237
+
3238
+ animate: React.SVGProps<SVGElement>; // TODO: It is SVGAnimateElement but is not in TypeScript's lib.dom.d.ts for now.
3239
+ animateMotion: React.SVGProps<SVGElement>;
3240
+ animateTransform: React.SVGProps<SVGElement>; // TODO: It is SVGAnimateTransformElement but is not in TypeScript's lib.dom.d.ts for now.
3241
+ circle: React.SVGProps<SVGCircleElement>;
3242
+ clipPath: React.SVGProps<SVGClipPathElement>;
3243
+ defs: React.SVGProps<SVGDefsElement>;
3244
+ desc: React.SVGProps<SVGDescElement>;
3245
+ ellipse: React.SVGProps<SVGEllipseElement>;
3246
+ feBlend: React.SVGProps<SVGFEBlendElement>;
3247
+ feColorMatrix: React.SVGProps<SVGFEColorMatrixElement>;
3248
+ feComponentTransfer: React.SVGProps<SVGFEComponentTransferElement>;
3249
+ feComposite: React.SVGProps<SVGFECompositeElement>;
3250
+ feConvolveMatrix: React.SVGProps<SVGFEConvolveMatrixElement>;
3251
+ feDiffuseLighting: React.SVGProps<SVGFEDiffuseLightingElement>;
3252
+ feDisplacementMap: React.SVGProps<SVGFEDisplacementMapElement>;
3253
+ feDistantLight: React.SVGProps<SVGFEDistantLightElement>;
3254
+ feDropShadow: React.SVGProps<SVGFEDropShadowElement>;
3255
+ feFlood: React.SVGProps<SVGFEFloodElement>;
3256
+ feFuncA: React.SVGProps<SVGFEFuncAElement>;
3257
+ feFuncB: React.SVGProps<SVGFEFuncBElement>;
3258
+ feFuncG: React.SVGProps<SVGFEFuncGElement>;
3259
+ feFuncR: React.SVGProps<SVGFEFuncRElement>;
3260
+ feGaussianBlur: React.SVGProps<SVGFEGaussianBlurElement>;
3261
+ feImage: React.SVGProps<SVGFEImageElement>;
3262
+ feMerge: React.SVGProps<SVGFEMergeElement>;
3263
+ feMergeNode: React.SVGProps<SVGFEMergeNodeElement>;
3264
+ feMorphology: React.SVGProps<SVGFEMorphologyElement>;
3265
+ feOffset: React.SVGProps<SVGFEOffsetElement>;
3266
+ fePointLight: React.SVGProps<SVGFEPointLightElement>;
3267
+ feSpecularLighting: React.SVGProps<SVGFESpecularLightingElement>;
3268
+ feSpotLight: React.SVGProps<SVGFESpotLightElement>;
3269
+ feTile: React.SVGProps<SVGFETileElement>;
3270
+ feTurbulence: React.SVGProps<SVGFETurbulenceElement>;
3271
+ filter: React.SVGProps<SVGFilterElement>;
3272
+ foreignObject: React.SVGProps<SVGForeignObjectElement>;
3273
+ g: React.SVGProps<SVGGElement>;
3274
+ image: React.SVGProps<SVGImageElement>;
3275
+ line: React.SVGProps<SVGLineElement>;
3276
+ linearGradient: React.SVGProps<SVGLinearGradientElement>;
3277
+ marker: React.SVGProps<SVGMarkerElement>;
3278
+ mask: React.SVGProps<SVGMaskElement>;
3279
+ metadata: React.SVGProps<SVGMetadataElement>;
3280
+ mpath: React.SVGProps<SVGElement>;
3281
+ path: React.SVGProps<SVGPathElement>;
3282
+ pattern: React.SVGProps<SVGPatternElement>;
3283
+ polygon: React.SVGProps<SVGPolygonElement>;
3284
+ polyline: React.SVGProps<SVGPolylineElement>;
3285
+ radialGradient: React.SVGProps<SVGRadialGradientElement>;
3286
+ rect: React.SVGProps<SVGRectElement>;
3287
+ stop: React.SVGProps<SVGStopElement>;
3288
+ switch: React.SVGProps<SVGSwitchElement>;
3289
+ symbol: React.SVGProps<SVGSymbolElement>;
3290
+ text: React.SVGProps<SVGTextElement>;
3291
+ textPath: React.SVGProps<SVGTextPathElement>;
3292
+ tspan: React.SVGProps<SVGTSpanElement>;
3293
+ use: React.SVGProps<SVGUseElement>;
3294
+ view: React.SVGProps<SVGViewElement>;
3295
+ }
3296
+ }
3297
+ }