1// Type definitions for React 16.4 2// Project: http://facebook.github.io/react/ 3// Definitions by: Asana <https://asana.com> 4// AssureSign <http://www.assuresign.com> 5// Microsoft <https://microsoft.com> 6// John Reilly <https://github.com/johnnyreilly> 7// Benoit Benezech <https://github.com/bbenezech> 8// Patricio Zavolinsky <https://github.com/pzavolinsky> 9// Digiguru <https://github.com/digiguru> 10// Eric Anderson <https://github.com/ericanderson> 11// Albert Kurniawan <https://github.com/morcerf> 12// Tanguy Krotoff <https://github.com/tkrotoff> 13// Dovydas Navickas <https://github.com/DovydasNavickas> 14// Stéphane Goetz <https://github.com/onigoetz> 15// Josh Rutherford <https://github.com/theruther4d> 16// Guilherme Hübner <https://github.com/guilhermehubner> 17// Ferdy Budhidharma <https://github.com/ferdaber> 18// Johann Rakotoharisoa <https://github.com/jrakotoharisoa> 19// Olivier Pascal <https://github.com/pascaloliv> 20// Martin Hochel <https://github.com/hotell> 21// Frank Li <https://github.com/franklixuefei> 22// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped 23// TypeScript Version: 2.8 24 25interface HTMLWebViewElement extends HTMLElement {} 26 27declare module "prop-types" { 28 // Type definitions for prop-types 15.5 29 // Project: https://github.com/reactjs/prop-types 30 // Definitions by: DovydasNavickas <https://github.com/DovydasNavickas> 31 // Ferdy Budhidharma <https://github.com/ferdaber> 32 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped 33 // TypeScript Version: 2.8 34 35 import { ReactNode, ReactElement } from 'react'; 36 37 export const nominalTypeHack: unique symbol; 38 39 export type IsOptional<T> = undefined | null extends T ? true : undefined extends T ? true : null extends T ? true : false; 40 41 export type RequiredKeys<V> = { [K in keyof V]: V[K] extends Validator<infer T> ? IsOptional<T> extends true ? never : K : never }[keyof V]; 42 export type OptionalKeys<V> = Exclude<keyof V, RequiredKeys<V>>; 43 export type InferPropsInner<V> = { [K in keyof V]: InferType<V[K]>; }; 44 45 export interface Validator<T> { 46 (props: object, propName: string, componentName: string, location: string, propFullName: string): Error | null; 47 [nominalTypeHack]?: T; 48 } 49 50 export interface Requireable<T> extends Validator<T | undefined | null> { 51 isRequired: Validator<NonNullable<T>>; 52 } 53 54 export type ValidationMap<T> = { [K in keyof T]-?: Validator<T[K]> }; 55 56 export type InferType<V> = V extends Validator<infer T> ? T : any; 57 export type InferProps<V> = 58 & InferPropsInner<Pick<V, RequiredKeys<V>>> 59 & Partial<InferPropsInner<Pick<V, OptionalKeys<V>>>>; 60 61 export const any: Requireable<any>; 62 export const array: Requireable<any[]>; 63 export const bool: Requireable<boolean>; 64 export const func: Requireable<(...args: any[]) => any>; 65 export const number: Requireable<number>; 66 export const object: Requireable<object>; 67 export const string: Requireable<string>; 68 export const node: Requireable<ReactNode>; 69 export const element: Requireable<ReactElement<any>>; 70 export const symbol: Requireable<symbol>; 71 export function instanceOf<T>(expectedClass: new (...args: any[]) => T): Requireable<T>; 72 export function oneOf<T>(types: T[]): Requireable<T>; 73 export function oneOfType<T extends Validator<any>>(types: T[]): Requireable<NonNullable<InferType<T>>>; 74 export function arrayOf<T>(type: Validator<T>): Requireable<T[]>; 75 export function objectOf<T>(type: Validator<T>): Requireable<{ [K in keyof any]: T; }>; 76 export function shape<P extends ValidationMap<any>>(type: P): Requireable<InferProps<P>>; 77 export function exact<P extends ValidationMap<any>>(type: P): Requireable<Required<InferProps<P>>>; 78 79 /** 80 * Assert that the values match with the type specs. 81 * Error messages are memorized and will only be shown once. 82 * 83 * @param typeSpecs Map of name to a ReactPropType 84 * @param values Runtime values that need to be type-checked 85 * @param location e.g. "prop", "context", "child context" 86 * @param componentName Name of the component for error messages. 87 * @param getStack Returns the component stack. 88 */ 89 export function checkPropTypes(typeSpecs: any, values: any, location: string, componentName: string, getStack?: () => any): void; 90 91} 92 93declare module "react" { 94 95 import * as PropTypes from 'prop-types'; 96 97 type NativeAnimationEvent = AnimationEvent; 98 type NativeClipboardEvent = ClipboardEvent; 99 type NativeCompositionEvent = CompositionEvent; 100 type NativeDragEvent = DragEvent; 101 type NativeFocusEvent = FocusEvent; 102 type NativeKeyboardEvent = KeyboardEvent; 103 type NativeMouseEvent = MouseEvent; 104 type NativeTouchEvent = TouchEvent; 105 type NativePointerEvent = PointerEvent; 106 type NativeTransitionEvent = TransitionEvent; 107 type NativeUIEvent = UIEvent; 108 type NativeWheelEvent = WheelEvent; 109 110 // tslint:disable-next-line:export-just-namespace 111 export = React; 112 113 namespace React { 114 // 115 // React Elements 116 // ---------------------------------------------------------------------- 117 118 type ReactType<P = any> = string | ComponentType<P>; 119 type ComponentType<P = {}> = ComponentClass<P> | StatelessComponent<P>; 120 121 type Key = string | number; 122 123 interface RefObject<T> { 124 readonly current: T | null; 125 } 126 127 type Ref<T> = string | { bivarianceHack(instance: T | null): any }["bivarianceHack"] | RefObject<T>; 128 129 type ComponentState = any; 130 131 interface Attributes { 132 key?: Key; 133 } 134 interface ClassAttributes<T> extends Attributes { 135 ref?: Ref<T>; 136 } 137 138 interface ReactElement<P> { 139 type: string | ComponentClass<P> | SFC<P>; 140 props: P; 141 key: Key | null; 142 } 143 144 interface SFCElement<P> extends ReactElement<P> { 145 type: SFC<P>; 146 } 147 148 type CElement<P, T extends Component<P, ComponentState>> = ComponentElement<P, T>; 149 interface ComponentElement<P, T extends Component<P, ComponentState>> extends ReactElement<P> { 150 type: ComponentClass<P>; 151 ref?: Ref<T>; 152 } 153 154 type ClassicElement<P> = CElement<P, ClassicComponent<P, ComponentState>>; 155 156 // string fallback for custom web-components 157 interface DOMElement<P extends HTMLAttributes<T> | SVGAttributes<T>, T extends Element> extends ReactElement<P> { 158 type: string; 159 ref: Ref<T>; 160 } 161 162 // ReactHTML for ReactHTMLElement 163 // tslint:disable-next-line:no-empty-interface 164 interface ReactHTMLElement<T extends HTMLElement> extends DetailedReactHTMLElement<AllHTMLAttributes<T>, T> { } 165 166 interface DetailedReactHTMLElement<P extends HTMLAttributes<T>, T extends HTMLElement> extends DOMElement<P, T> { 167 type: keyof ReactHTML; 168 } 169 170 // ReactSVG for ReactSVGElement 171 interface ReactSVGElement extends DOMElement<SVGAttributes<SVGElement>, SVGElement> { 172 type: keyof ReactSVG; 173 } 174 175 interface ReactPortal extends ReactElement<any> { 176 key: Key | null; 177 children: ReactNode; 178 } 179 180 // 181 // Factories 182 // ---------------------------------------------------------------------- 183 184 type Factory<P> = (props?: Attributes & P, ...children: ReactNode[]) => ReactElement<P>; 185 186 type SFCFactory<P> = (props?: Attributes & P, ...children: ReactNode[]) => SFCElement<P>; 187 188 type ComponentFactory<P, T extends Component<P, ComponentState>> = 189 (props?: ClassAttributes<T> & P, ...children: ReactNode[]) => CElement<P, T>; 190 191 type CFactory<P, T extends Component<P, ComponentState>> = ComponentFactory<P, T>; 192 type ClassicFactory<P> = CFactory<P, ClassicComponent<P, ComponentState>>; 193 194 type DOMFactory<P extends DOMAttributes<T>, T extends Element> = 195 (props?: ClassAttributes<T> & P | null, ...children: ReactNode[]) => DOMElement<P, T>; 196 197 // tslint:disable-next-line:no-empty-interface 198 interface HTMLFactory<T extends HTMLElement> extends DetailedHTMLFactory<AllHTMLAttributes<T>, T> { } 199 200 interface DetailedHTMLFactory<P extends HTMLAttributes<T>, T extends HTMLElement> extends DOMFactory<P, T> { 201 (props?: ClassAttributes<T> & P | null, ...children: ReactNode[]): DetailedReactHTMLElement<P, T>; 202 } 203 204 interface SVGFactory extends DOMFactory<SVGAttributes<SVGElement>, SVGElement> { 205 (props?: ClassAttributes<SVGElement> & SVGAttributes<SVGElement> | null, ...children: ReactNode[]): ReactSVGElement; 206 } 207 208 // 209 // React Nodes 210 // http://facebook.github.io/react/docs/glossary.html 211 // ---------------------------------------------------------------------- 212 213 type ReactText = string | number; 214 type ReactChild = ReactElement<any> | ReactText; 215 216 interface ReactNodeArray extends Array<ReactNode> { } 217 type ReactFragment = {} | ReactNodeArray; 218 type ReactNode = ReactChild | ReactFragment | ReactPortal | string | number | boolean | null | undefined; 219 220 // 221 // Top Level API 222 // ---------------------------------------------------------------------- 223 224 // DOM Elements 225 function createFactory<T extends HTMLElement>( 226 type: keyof ReactHTML): HTMLFactory<T>; 227 function createFactory( 228 type: keyof ReactSVG): SVGFactory; 229 function createFactory<P extends DOMAttributes<T>, T extends Element>( 230 type: string): DOMFactory<P, T>; 231 232 // Custom components 233 function createFactory<P>(type: SFC<P>): SFCFactory<P>; 234 function createFactory<P>( 235 type: ClassType<P, ClassicComponent<P, ComponentState>, ClassicComponentClass<P>>): CFactory<P, ClassicComponent<P, ComponentState>>; 236 function createFactory<P, T extends Component<P, ComponentState>, C extends ComponentClass<P>>( 237 type: ClassType<P, T, C>): CFactory<P, T>; 238 function createFactory<P>(type: ComponentClass<P>): Factory<P>; 239 240 // DOM Elements 241 // TODO: generalize this to everything in `keyof ReactHTML`, not just "input" 242 function createElement( 243 type: "input", 244 props?: InputHTMLAttributes<HTMLInputElement> & ClassAttributes<HTMLInputElement> | null, 245 ...children: ReactNode[]): DetailedReactHTMLElement<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>; 246 function createElement<P extends HTMLAttributes<T>, T extends HTMLElement>( 247 type: keyof ReactHTML, 248 props?: ClassAttributes<T> & P | null, 249 ...children: ReactNode[]): DetailedReactHTMLElement<P, T>; 250 function createElement<P extends SVGAttributes<T>, T extends SVGElement>( 251 type: keyof ReactSVG, 252 props?: ClassAttributes<T> & P | null, 253 ...children: ReactNode[]): ReactSVGElement; 254 function createElement<P extends DOMAttributes<T>, T extends Element>( 255 type: string, 256 props?: ClassAttributes<T> & P | null, 257 ...children: ReactNode[]): DOMElement<P, T>; 258 259 // Custom components 260 function createElement<P>( 261 type: SFC<P>, 262 props?: Attributes & P | null, 263 ...children: ReactNode[]): SFCElement<P>; 264 function createElement<P>( 265 type: ClassType<P, ClassicComponent<P, ComponentState>, ClassicComponentClass<P>>, 266 props?: ClassAttributes<ClassicComponent<P, ComponentState>> & P | null, 267 ...children: ReactNode[]): CElement<P, ClassicComponent<P, ComponentState>>; 268 function createElement<P, T extends Component<P, ComponentState>, C extends ComponentClass<P>>( 269 type: ClassType<P, T, C>, 270 props?: ClassAttributes<T> & P | null, 271 ...children: ReactNode[]): CElement<P, T>; 272 function createElement<P>( 273 type: SFC<P> | ComponentClass<P> | string, 274 props?: Attributes & P | null, 275 ...children: ReactNode[]): ReactElement<P>; 276 277 // DOM Elements 278 // ReactHTMLElement 279 function cloneElement<P extends HTMLAttributes<T>, T extends HTMLElement>( 280 element: DetailedReactHTMLElement<P, T>, 281 props?: P, 282 ...children: ReactNode[]): DetailedReactHTMLElement<P, T>; 283 // ReactHTMLElement, less specific 284 function cloneElement<P extends HTMLAttributes<T>, T extends HTMLElement>( 285 element: ReactHTMLElement<T>, 286 props?: P, 287 ...children: ReactNode[]): ReactHTMLElement<T>; 288 // SVGElement 289 function cloneElement<P extends SVGAttributes<T>, T extends SVGElement>( 290 element: ReactSVGElement, 291 props?: P, 292 ...children: ReactNode[]): ReactSVGElement; 293 // DOM Element (has to be the last, because type checking stops at first overload that fits) 294 function cloneElement<P extends DOMAttributes<T>, T extends Element>( 295 element: DOMElement<P, T>, 296 props?: DOMAttributes<T> & P, 297 ...children: ReactNode[]): DOMElement<P, T>; 298 299 // Custom components 300 function cloneElement<P>( 301 element: SFCElement<P>, 302 props?: Partial<P> & Attributes, 303 ...children: ReactNode[]): SFCElement<P>; 304 function cloneElement<P, T extends Component<P, ComponentState>>( 305 element: CElement<P, T>, 306 props?: Partial<P> & ClassAttributes<T>, 307 ...children: ReactNode[]): CElement<P, T>; 308 function cloneElement<P>( 309 element: ReactElement<P>, 310 props?: Partial<P> & Attributes, 311 ...children: ReactNode[]): ReactElement<P>; 312 313 // Context via RenderProps 314 interface ProviderProps<T> { 315 value: T; 316 children?: ReactNode; 317 } 318 319 interface ConsumerProps<T> { 320 children: (value: T) => ReactNode; 321 unstable_observedBits?: number; 322 } 323 324 type Provider<T> = ComponentType<ProviderProps<T>>; 325 type Consumer<T> = ComponentType<ConsumerProps<T>>; 326 interface Context<T> { 327 Provider: Provider<T>; 328 Consumer: Consumer<T>; 329 } 330 function createContext<T>( 331 defaultValue: T, 332 calculateChangedBits?: (prev: T, next: T) => number 333 ): Context<T>; 334 335 function isValidElement<P>(object: {} | null | undefined): object is ReactElement<P>; 336 337 const Children: ReactChildren; 338 const Fragment: ComponentType; 339 const StrictMode: ComponentType; 340 const version: string; 341 342 // 343 // Component API 344 // ---------------------------------------------------------------------- 345 346 type ReactInstance = Component<any> | Element; 347 348 // Base component for plain JS classes 349 // tslint:disable-next-line:no-empty-interface 350 interface Component<P = {}, S = {}, SS = any> extends ComponentLifecycle<P, S, SS> { } 351 class Component<P, S> { 352 constructor(props: Readonly<P>); 353 /** 354 * @deprecated 355 * https://reactjs.org/docs/legacy-context.html 356 */ 357 constructor(props: P, context?: any); 358 359 // We MUST keep setState() as a unified signature because it allows proper checking of the method return type. 360 // See: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/18365#issuecomment-351013257 361 // Also, the ` | S` allows intellisense to not be dumbisense 362 setState<K extends keyof S>( 363 state: ((prevState: Readonly<S>, props: Readonly<P>) => (Pick<S, K> | S | null)) | (Pick<S, K> | S | null), 364 callback?: () => void 365 ): void; 366 367 forceUpdate(callBack?: () => void): void; 368 render(): ReactNode; 369 370 // React.Props<T> is now deprecated, which means that the `children` 371 // property is not available on `P` by default, even though you can 372 // always pass children as variadic arguments to `createElement`. 373 // In the future, if we can define its call signature conditionally 374 // on the existence of `children` in `P`, then we should remove this. 375 readonly props: Readonly<{ children?: ReactNode }> & Readonly<P>; 376 state: Readonly<S>; 377 /** 378 * @deprecated 379 * https://reactjs.org/docs/legacy-context.html 380 */ 381 context: any; 382 /** 383 * @deprecated 384 * https://reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs 385 */ 386 refs: { 387 [key: string]: ReactInstance 388 }; 389 } 390 391 class PureComponent<P = {}, S = {}, SS = any> extends Component<P, S, SS> { } 392 393 interface ClassicComponent<P = {}, S = {}> extends Component<P, S> { 394 replaceState(nextState: S, callback?: () => void): void; 395 isMounted(): boolean; 396 getInitialState?(): S; 397 } 398 399 interface ChildContextProvider<CC> { 400 getChildContext(): CC; 401 } 402 403 // 404 // Class Interfaces 405 // ---------------------------------------------------------------------- 406 407 type SFC<P = {}> = StatelessComponent<P>; 408 interface StatelessComponent<P = {}> { 409 (props: P & { children?: ReactNode }, context?: any): ReactElement<any> | null; 410 propTypes?: ValidationMap<P>; 411 contextTypes?: ValidationMap<any>; 412 defaultProps?: Partial<P>; 413 displayName?: string; 414 } 415 416 interface RefForwardingComponent<T, P = {}> { 417 (props: P & { children?: ReactNode }, ref?: Ref<T>): ReactElement<any> | null; 418 propTypes?: ValidationMap<P>; 419 contextTypes?: ValidationMap<any>; 420 defaultProps?: Partial<P>; 421 displayName?: string; 422 } 423 424 interface ComponentClass<P = {}, S = ComponentState> extends StaticLifecycle<P, S> { 425 new(props: P, context?: any): Component<P, S>; 426 propTypes?: ValidationMap<P>; 427 contextTypes?: ValidationMap<any>; 428 childContextTypes?: ValidationMap<any>; 429 defaultProps?: Partial<P>; 430 displayName?: string; 431 } 432 433 interface ClassicComponentClass<P = {}> extends ComponentClass<P> { 434 new(props: P, context?: any): ClassicComponent<P, ComponentState>; 435 getDefaultProps?(): P; 436 } 437 438 /** 439 * We use an intersection type to infer multiple type parameters from 440 * a single argument, which is useful for many top-level API defs. 441 * See https://github.com/Microsoft/TypeScript/issues/7234 for more info. 442 */ 443 type ClassType<P, T extends Component<P, ComponentState>, C extends ComponentClass<P>> = 444 C & 445 (new (props: P, context?: any) => T) & 446 (new (props: P, context?: any) => { props: P }); 447 448 // 449 // Component Specs and Lifecycle 450 // ---------------------------------------------------------------------- 451 452 // This should actually be something like `Lifecycle<P, S> | DeprecatedLifecycle<P, S>`, 453 // as React will _not_ call the deprecated lifecycle methods if any of the new lifecycle 454 // methods are present. 455 interface ComponentLifecycle<P, S, SS = any> extends NewLifecycle<P, S, SS>, DeprecatedLifecycle<P, S> { 456 /** 457 * Called immediately after a component is mounted. Setting state here will trigger re-rendering. 458 */ 459 componentDidMount?(): void; 460 /** 461 * Called to determine whether the change in props and state should trigger a re-render. 462 * 463 * `Component` always returns true. 464 * `PureComponent` implements a shallow comparison on props and state and returns true if any 465 * props or states have changed. 466 * 467 * If false is returned, `Component#render`, `componentWillUpdate` 468 * and `componentDidUpdate` will not be called. 469 */ 470 shouldComponentUpdate?(nextProps: Readonly<P>, nextState: Readonly<S>, nextContext: any): boolean; 471 /** 472 * Called immediately before a component is destroyed. Perform any necessary cleanup in this method, such as 473 * cancelled network requests, or cleaning up any DOM elements created in `componentDidMount`. 474 */ 475 componentWillUnmount?(): void; 476 /** 477 * Catches exceptions generated in descendant components. Unhandled exceptions will cause 478 * the entire component tree to unmount. 479 */ 480 componentDidCatch?(error: Error, errorInfo: ErrorInfo): void; 481 } 482 483 // Unfortunately, we have no way of declaring that the component constructor must implement this 484 interface StaticLifecycle<P, S> { 485 getDerivedStateFromProps?: GetDerivedStateFromProps<P, S>; 486 } 487 488 type GetDerivedStateFromProps<P, S> = 489 /** 490 * Returns an update to a component's state based on its new props and old state. 491 * 492 * Note: its presence prevents any of the deprecated lifecycle methods from being invoked 493 */ 494 (nextProps: Readonly<P>, prevState: S) => Partial<S> | null; 495 496 // This should be "infer SS" but can't use it yet 497 interface NewLifecycle<P, S, SS> { 498 /** 499 * Runs before React applies the result of `render` to the document, and 500 * returns an object to be given to componentDidUpdate. Useful for saving 501 * things such as scroll position before `render` causes changes to it. 502 * 503 * Note: the presence of getSnapshotBeforeUpdate prevents any of the deprecated 504 * lifecycle events from running. 505 */ 506 getSnapshotBeforeUpdate?(prevProps: Readonly<P>, prevState: Readonly<S>): SS | null; 507 /** 508 * Called immediately after updating occurs. Not called for the initial render. 509 * 510 * The snapshot is only present if getSnapshotBeforeUpdate is present and returns non-null. 511 */ 512 componentDidUpdate?(prevProps: Readonly<P>, prevState: Readonly<S>, snapshot?: SS): void; 513 } 514 515 interface DeprecatedLifecycle<P, S> { 516 /** 517 * Called immediately before mounting occurs, and before `Component#render`. 518 * Avoid introducing any side-effects or subscriptions in this method. 519 * 520 * Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps 521 * prevents this from being invoked. 522 * 523 * @deprecated 16.3, use componentDidMount or the constructor instead; will stop working in React 17 524 * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state 525 * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path 526 */ 527 componentWillMount?(): void; 528 /** 529 * Called immediately before mounting occurs, and before `Component#render`. 530 * Avoid introducing any side-effects or subscriptions in this method. 531 * 532 * This method will not stop working in React 17. 533 * 534 * Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps 535 * prevents this from being invoked. 536 * 537 * @deprecated 16.3, use componentDidMount or the constructor instead 538 * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state 539 * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path 540 */ 541 UNSAFE_componentWillMount?(): void; 542 /** 543 * Called when the component may be receiving new props. 544 * React may call this even if props have not changed, so be sure to compare new and existing 545 * props if you only want to handle changes. 546 * 547 * Calling `Component#setState` generally does not trigger this method. 548 * 549 * Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps 550 * prevents this from being invoked. 551 * 552 * @deprecated 16.3, use static getDerivedStateFromProps instead; will stop working in React 17 553 * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props 554 * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path 555 */ 556 componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void; 557 /** 558 * Called when the component may be receiving new props. 559 * React may call this even if props have not changed, so be sure to compare new and existing 560 * props if you only want to handle changes. 561 * 562 * Calling `Component#setState` generally does not trigger this method. 563 * 564 * This method will not stop working in React 17. 565 * 566 * Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps 567 * prevents this from being invoked. 568 * 569 * @deprecated 16.3, use static getDerivedStateFromProps instead 570 * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props 571 * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path 572 */ 573 UNSAFE_componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void; 574 /** 575 * Called immediately before rendering when new props or state is received. Not called for the initial render. 576 * 577 * Note: You cannot call `Component#setState` here. 578 * 579 * Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps 580 * prevents this from being invoked. 581 * 582 * @deprecated 16.3, use getSnapshotBeforeUpdate instead; will stop working in React 17 583 * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update 584 * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path 585 */ 586 componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<S>, nextContext: any): void; 587 /** 588 * Called immediately before rendering when new props or state is received. Not called for the initial render. 589 * 590 * Note: You cannot call `Component#setState` here. 591 * 592 * This method will not stop working in React 17. 593 * 594 * Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps 595 * prevents this from being invoked. 596 * 597 * @deprecated 16.3, use getSnapshotBeforeUpdate instead 598 * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update 599 * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path 600 */ 601 UNSAFE_componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<S>, nextContext: any): void; 602 } 603 604 interface Mixin<P, S> extends ComponentLifecycle<P, S> { 605 mixins?: Array<Mixin<P, S>>; 606 statics?: { 607 [key: string]: any; 608 }; 609 610 displayName?: string; 611 propTypes?: ValidationMap<any>; 612 contextTypes?: ValidationMap<any>; 613 childContextTypes?: ValidationMap<any>; 614 615 getDefaultProps?(): P; 616 getInitialState?(): S; 617 } 618 619 interface ComponentSpec<P, S> extends Mixin<P, S> { 620 render(): ReactNode; 621 622 [propertyName: string]: any; 623 } 624 625 function createRef<T>(): RefObject<T>; 626 627 function forwardRef<T, P = {}>(Component: RefForwardingComponent<T, P>): ComponentType<P & ClassAttributes<T>>; 628 629 // 630 // Event System 631 // ---------------------------------------------------------------------- 632 633 interface SyntheticEvent<T = Element> { 634 bubbles: boolean; 635 /** 636 * A reference to the element on which the event listener is registered. 637 */ 638 currentTarget: EventTarget & T; 639 cancelable: boolean; 640 defaultPrevented: boolean; 641 eventPhase: number; 642 isTrusted: boolean; 643 nativeEvent: Event; 644 preventDefault(): void; 645 isDefaultPrevented(): boolean; 646 stopPropagation(): void; 647 isPropagationStopped(): boolean; 648 persist(): void; 649 // If you thought this should be `EventTarget & T`, see https://github.com/DefinitelyTyped/DefinitelyTyped/pull/12239 650 /** 651 * A reference to the element from which the event was originally dispatched. 652 * This might be a child element to the element on which the event listener is registered. 653 * 654 * @see currentTarget 655 */ 656 target: EventTarget; 657 timeStamp: number; 658 type: string; 659 } 660 661 interface ClipboardEvent<T = Element> extends SyntheticEvent<T> { 662 clipboardData: DataTransfer; 663 nativeEvent: NativeClipboardEvent; 664 } 665 666 interface CompositionEvent<T = Element> extends SyntheticEvent<T> { 667 data: string; 668 nativeEvent: NativeCompositionEvent; 669 } 670 671 interface DragEvent<T = Element> extends MouseEvent<T> { 672 dataTransfer: DataTransfer; 673 nativeEvent: NativeDragEvent; 674 } 675 676 interface PointerEvent<T = Element> extends MouseEvent<T> { 677 pointerId: number; 678 pressure: number; 679 tiltX: number; 680 tiltY: number; 681 width: number; 682 height: number; 683 pointerType: 'mouse' | 'pen' | 'touch'; 684 isPrimary: boolean; 685 nativeEvent: NativePointerEvent; 686 } 687 688 interface FocusEvent<T = Element> extends SyntheticEvent<T> { 689 nativeEvent: NativeFocusEvent; 690 relatedTarget: EventTarget; 691 target: EventTarget & T; 692 } 693 694 // tslint:disable-next-line:no-empty-interface 695 interface FormEvent<T = Element> extends SyntheticEvent<T> { 696 } 697 698 interface InvalidEvent<T = Element> extends SyntheticEvent<T> { 699 target: EventTarget & T; 700 } 701 702 interface ChangeEvent<T = Element> extends SyntheticEvent<T> { 703 target: EventTarget & T; 704 } 705 706 interface KeyboardEvent<T = Element> extends SyntheticEvent<T> { 707 altKey: boolean; 708 charCode: number; 709 ctrlKey: boolean; 710 /** 711 * 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. 712 */ 713 getModifierState(key: string): boolean; 714 /** 715 * See the [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#named-key-attribute-values). for possible values 716 */ 717 key: string; 718 keyCode: number; 719 locale: string; 720 location: number; 721 metaKey: boolean; 722 nativeEvent: NativeKeyboardEvent; 723 repeat: boolean; 724 shiftKey: boolean; 725 which: number; 726 } 727 728 interface MouseEvent<T = Element> extends SyntheticEvent<T> { 729 altKey: boolean; 730 button: number; 731 buttons: number; 732 clientX: number; 733 clientY: number; 734 ctrlKey: boolean; 735 /** 736 * 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. 737 */ 738 getModifierState(key: string): boolean; 739 metaKey: boolean; 740 nativeEvent: NativeMouseEvent; 741 pageX: number; 742 pageY: number; 743 relatedTarget: EventTarget; 744 screenX: number; 745 screenY: number; 746 shiftKey: boolean; 747 } 748 749 interface TouchEvent<T = Element> extends SyntheticEvent<T> { 750 altKey: boolean; 751 changedTouches: TouchList; 752 ctrlKey: boolean; 753 /** 754 * 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. 755 */ 756 getModifierState(key: string): boolean; 757 metaKey: boolean; 758 nativeEvent: NativeTouchEvent; 759 shiftKey: boolean; 760 targetTouches: TouchList; 761 touches: TouchList; 762 } 763 764 interface UIEvent<T = Element> extends SyntheticEvent<T> { 765 detail: number; 766 nativeEvent: NativeUIEvent; 767 view: AbstractView; 768 } 769 770 interface WheelEvent<T = Element> extends MouseEvent<T> { 771 deltaMode: number; 772 deltaX: number; 773 deltaY: number; 774 deltaZ: number; 775 nativeEvent: NativeWheelEvent; 776 } 777 778 interface AnimationEvent<T = Element> extends SyntheticEvent<T> { 779 animationName: string; 780 elapsedTime: number; 781 nativeEvent: NativeAnimationEvent; 782 pseudoElement: string; 783 } 784 785 interface TransitionEvent<T = Element> extends SyntheticEvent<T> { 786 elapsedTime: number; 787 nativeEvent: NativeTransitionEvent; 788 propertyName: string; 789 pseudoElement: string; 790 } 791 792 // 793 // Event Handler Types 794 // ---------------------------------------------------------------------- 795 796 type EventHandler<E extends SyntheticEvent<any>> = { bivarianceHack(event: E): void }["bivarianceHack"]; 797 798 type ReactEventHandler<T = Element> = EventHandler<SyntheticEvent<T>>; 799 800 type ClipboardEventHandler<T = Element> = EventHandler<ClipboardEvent<T>>; 801 type CompositionEventHandler<T = Element> = EventHandler<CompositionEvent<T>>; 802 type DragEventHandler<T = Element> = EventHandler<DragEvent<T>>; 803 type FocusEventHandler<T = Element> = EventHandler<FocusEvent<T>>; 804 type FormEventHandler<T = Element> = EventHandler<FormEvent<T>>; 805 type ChangeEventHandler<T = Element> = EventHandler<ChangeEvent<T>>; 806 type KeyboardEventHandler<T = Element> = EventHandler<KeyboardEvent<T>>; 807 type MouseEventHandler<T = Element> = EventHandler<MouseEvent<T>>; 808 type TouchEventHandler<T = Element> = EventHandler<TouchEvent<T>>; 809 type PointerEventHandler<T = Element> = EventHandler<PointerEvent<T>>; 810 type UIEventHandler<T = Element> = EventHandler<UIEvent<T>>; 811 type WheelEventHandler<T = Element> = EventHandler<WheelEvent<T>>; 812 type AnimationEventHandler<T = Element> = EventHandler<AnimationEvent<T>>; 813 type TransitionEventHandler<T = Element> = EventHandler<TransitionEvent<T>>; 814 815 // 816 // Props / DOM Attributes 817 // ---------------------------------------------------------------------- 818 819 /** 820 * @deprecated. This was used to allow clients to pass `ref` and `key` 821 * to `createElement`, which is no longer necessary due to intersection 822 * types. If you need to declare a props object before passing it to 823 * `createElement` or a factory, use `ClassAttributes<T>`: 824 * 825 * ```ts 826 * var b: Button | null; 827 * var props: ButtonProps & ClassAttributes<Button> = { 828 * ref: b => button = b, // ok! 829 * label: "I'm a Button" 830 * }; 831 * ``` 832 */ 833 interface Props<T> { 834 children?: ReactNode; 835 key?: Key; 836 ref?: Ref<T>; 837 } 838 839 interface HTMLProps<T> extends AllHTMLAttributes<T>, ClassAttributes<T> { 840 } 841 842 type DetailedHTMLProps<E extends HTMLAttributes<T>, T> = ClassAttributes<T> & E; 843 844 interface SVGProps<T> extends SVGAttributes<T>, ClassAttributes<T> { 845 } 846 847 interface DOMAttributes<T> { 848 children?: ReactNode; 849 dangerouslySetInnerHTML?: { 850 __html: string; 851 }; 852 853 // Clipboard Events 854 onCopy?: ClipboardEventHandler<T>; 855 onCopyCapture?: ClipboardEventHandler<T>; 856 onCut?: ClipboardEventHandler<T>; 857 onCutCapture?: ClipboardEventHandler<T>; 858 onPaste?: ClipboardEventHandler<T>; 859 onPasteCapture?: ClipboardEventHandler<T>; 860 861 // Composition Events 862 onCompositionEnd?: CompositionEventHandler<T>; 863 onCompositionEndCapture?: CompositionEventHandler<T>; 864 onCompositionStart?: CompositionEventHandler<T>; 865 onCompositionStartCapture?: CompositionEventHandler<T>; 866 onCompositionUpdate?: CompositionEventHandler<T>; 867 onCompositionUpdateCapture?: CompositionEventHandler<T>; 868 869 // Focus Events 870 onFocus?: FocusEventHandler<T>; 871 onFocusCapture?: FocusEventHandler<T>; 872 onBlur?: FocusEventHandler<T>; 873 onBlurCapture?: FocusEventHandler<T>; 874 875 // Form Events 876 onChange?: FormEventHandler<T>; 877 onChangeCapture?: FormEventHandler<T>; 878 onInput?: FormEventHandler<T>; 879 onInputCapture?: FormEventHandler<T>; 880 onReset?: FormEventHandler<T>; 881 onResetCapture?: FormEventHandler<T>; 882 onSubmit?: FormEventHandler<T>; 883 onSubmitCapture?: FormEventHandler<T>; 884 onInvalid?: FormEventHandler<T>; 885 onInvalidCapture?: FormEventHandler<T>; 886 887 // Image Events 888 onLoad?: ReactEventHandler<T>; 889 onLoadCapture?: ReactEventHandler<T>; 890 onError?: ReactEventHandler<T>; // also a Media Event 891 onErrorCapture?: ReactEventHandler<T>; // also a Media Event 892 893 // Keyboard Events 894 onKeyDown?: KeyboardEventHandler<T>; 895 onKeyDownCapture?: KeyboardEventHandler<T>; 896 onKeyPress?: KeyboardEventHandler<T>; 897 onKeyPressCapture?: KeyboardEventHandler<T>; 898 onKeyUp?: KeyboardEventHandler<T>; 899 onKeyUpCapture?: KeyboardEventHandler<T>; 900 901 // Media Events 902 onAbort?: ReactEventHandler<T>; 903 onAbortCapture?: ReactEventHandler<T>; 904 onCanPlay?: ReactEventHandler<T>; 905 onCanPlayCapture?: ReactEventHandler<T>; 906 onCanPlayThrough?: ReactEventHandler<T>; 907 onCanPlayThroughCapture?: ReactEventHandler<T>; 908 onDurationChange?: ReactEventHandler<T>; 909 onDurationChangeCapture?: ReactEventHandler<T>; 910 onEmptied?: ReactEventHandler<T>; 911 onEmptiedCapture?: ReactEventHandler<T>; 912 onEncrypted?: ReactEventHandler<T>; 913 onEncryptedCapture?: ReactEventHandler<T>; 914 onEnded?: ReactEventHandler<T>; 915 onEndedCapture?: ReactEventHandler<T>; 916 onLoadedData?: ReactEventHandler<T>; 917 onLoadedDataCapture?: ReactEventHandler<T>; 918 onLoadedMetadata?: ReactEventHandler<T>; 919 onLoadedMetadataCapture?: ReactEventHandler<T>; 920 onLoadStart?: ReactEventHandler<T>; 921 onLoadStartCapture?: ReactEventHandler<T>; 922 onPause?: ReactEventHandler<T>; 923 onPauseCapture?: ReactEventHandler<T>; 924 onPlay?: ReactEventHandler<T>; 925 onPlayCapture?: ReactEventHandler<T>; 926 onPlaying?: ReactEventHandler<T>; 927 onPlayingCapture?: ReactEventHandler<T>; 928 onProgress?: ReactEventHandler<T>; 929 onProgressCapture?: ReactEventHandler<T>; 930 onRateChange?: ReactEventHandler<T>; 931 onRateChangeCapture?: ReactEventHandler<T>; 932 onSeeked?: ReactEventHandler<T>; 933 onSeekedCapture?: ReactEventHandler<T>; 934 onSeeking?: ReactEventHandler<T>; 935 onSeekingCapture?: ReactEventHandler<T>; 936 onStalled?: ReactEventHandler<T>; 937 onStalledCapture?: ReactEventHandler<T>; 938 onSuspend?: ReactEventHandler<T>; 939 onSuspendCapture?: ReactEventHandler<T>; 940 onTimeUpdate?: ReactEventHandler<T>; 941 onTimeUpdateCapture?: ReactEventHandler<T>; 942 onVolumeChange?: ReactEventHandler<T>; 943 onVolumeChangeCapture?: ReactEventHandler<T>; 944 onWaiting?: ReactEventHandler<T>; 945 onWaitingCapture?: ReactEventHandler<T>; 946 947 // MouseEvents 948 onClick?: MouseEventHandler<T>; 949 onClickCapture?: MouseEventHandler<T>; 950 onContextMenu?: MouseEventHandler<T>; 951 onContextMenuCapture?: MouseEventHandler<T>; 952 onDoubleClick?: MouseEventHandler<T>; 953 onDoubleClickCapture?: MouseEventHandler<T>; 954 onDrag?: DragEventHandler<T>; 955 onDragCapture?: DragEventHandler<T>; 956 onDragEnd?: DragEventHandler<T>; 957 onDragEndCapture?: DragEventHandler<T>; 958 onDragEnter?: DragEventHandler<T>; 959 onDragEnterCapture?: DragEventHandler<T>; 960 onDragExit?: DragEventHandler<T>; 961 onDragExitCapture?: DragEventHandler<T>; 962 onDragLeave?: DragEventHandler<T>; 963 onDragLeaveCapture?: DragEventHandler<T>; 964 onDragOver?: DragEventHandler<T>; 965 onDragOverCapture?: DragEventHandler<T>; 966 onDragStart?: DragEventHandler<T>; 967 onDragStartCapture?: DragEventHandler<T>; 968 onDrop?: DragEventHandler<T>; 969 onDropCapture?: DragEventHandler<T>; 970 onMouseDown?: MouseEventHandler<T>; 971 onMouseDownCapture?: MouseEventHandler<T>; 972 onMouseEnter?: MouseEventHandler<T>; 973 onMouseLeave?: MouseEventHandler<T>; 974 onMouseMove?: MouseEventHandler<T>; 975 onMouseMoveCapture?: MouseEventHandler<T>; 976 onMouseOut?: MouseEventHandler<T>; 977 onMouseOutCapture?: MouseEventHandler<T>; 978 onMouseOver?: MouseEventHandler<T>; 979 onMouseOverCapture?: MouseEventHandler<T>; 980 onMouseUp?: MouseEventHandler<T>; 981 onMouseUpCapture?: MouseEventHandler<T>; 982 983 // Selection Events 984 onSelect?: ReactEventHandler<T>; 985 onSelectCapture?: ReactEventHandler<T>; 986 987 // Touch Events 988 onTouchCancel?: TouchEventHandler<T>; 989 onTouchCancelCapture?: TouchEventHandler<T>; 990 onTouchEnd?: TouchEventHandler<T>; 991 onTouchEndCapture?: TouchEventHandler<T>; 992 onTouchMove?: TouchEventHandler<T>; 993 onTouchMoveCapture?: TouchEventHandler<T>; 994 onTouchStart?: TouchEventHandler<T>; 995 onTouchStartCapture?: TouchEventHandler<T>; 996 997 // Pointer Events 998 onPointerDown?: PointerEventHandler<T>; 999 onPointerDownCapture?: PointerEventHandler<T>; 1000 onPointerMove?: PointerEventHandler<T>; 1001 onPointerMoveCapture?: PointerEventHandler<T>; 1002 onPointerUp?: PointerEventHandler<T>; 1003 onPointerUpCapture?: PointerEventHandler<T>; 1004 onPointerCancel?: PointerEventHandler<T>; 1005 onPointerCancelCapture?: PointerEventHandler<T>; 1006 onPointerEnter?: PointerEventHandler<T>; 1007 onPointerEnterCapture?: PointerEventHandler<T>; 1008 onPointerLeave?: PointerEventHandler<T>; 1009 onPointerLeaveCapture?: PointerEventHandler<T>; 1010 onPointerOver?: PointerEventHandler<T>; 1011 onPointerOverCapture?: PointerEventHandler<T>; 1012 onPointerOut?: PointerEventHandler<T>; 1013 onPointerOutCapture?: PointerEventHandler<T>; 1014 onGotPointerCapture?: PointerEventHandler<T>; 1015 onGotPointerCaptureCapture?: PointerEventHandler<T>; 1016 onLostPointerCapture?: PointerEventHandler<T>; 1017 onLostPointerCaptureCapture?: PointerEventHandler<T>; 1018 1019 // UI Events 1020 onScroll?: UIEventHandler<T>; 1021 onScrollCapture?: UIEventHandler<T>; 1022 1023 // Wheel Events 1024 onWheel?: WheelEventHandler<T>; 1025 onWheelCapture?: WheelEventHandler<T>; 1026 1027 // Animation Events 1028 onAnimationStart?: AnimationEventHandler<T>; 1029 onAnimationStartCapture?: AnimationEventHandler<T>; 1030 onAnimationEnd?: AnimationEventHandler<T>; 1031 onAnimationEndCapture?: AnimationEventHandler<T>; 1032 onAnimationIteration?: AnimationEventHandler<T>; 1033 onAnimationIterationCapture?: AnimationEventHandler<T>; 1034 1035 // Transition Events 1036 onTransitionEnd?: TransitionEventHandler<T>; 1037 onTransitionEndCapture?: TransitionEventHandler<T>; 1038 } 1039 1040 export interface CSSProperties { 1041 /** 1042 * The index signature was removed to enable closed typing for style 1043 * using CSSType. You're able to use type assertion or module augmentation 1044 * to add properties or an index signature of your own. 1045 * 1046 * For examples and more information, visit: 1047 * https://github.com/frenic/csstype#what-should-i-do-when-i-get-type-errors 1048 */ 1049 } 1050 1051 interface HTMLAttributes<T> extends DOMAttributes<T> { 1052 // React-specific Attributes 1053 defaultChecked?: boolean; 1054 defaultValue?: string | string[]; 1055 suppressContentEditableWarning?: boolean; 1056 suppressHydrationWarning?: boolean; 1057 1058 // Standard HTML Attributes 1059 accessKey?: string; 1060 className?: string; 1061 contentEditable?: boolean; 1062 contextMenu?: string; 1063 dir?: string; 1064 draggable?: boolean; 1065 hidden?: boolean; 1066 id?: string; 1067 lang?: string; 1068 placeholder?: string; 1069 slot?: string; 1070 spellCheck?: boolean; 1071 style?: CSSProperties; 1072 tabIndex?: number; 1073 title?: string; 1074 1075 // Unknown 1076 inputMode?: string; 1077 is?: string; 1078 radioGroup?: string; // <command>, <menuitem> 1079 1080 // WAI-ARIA 1081 role?: string; 1082 1083 // RDFa Attributes 1084 about?: string; 1085 datatype?: string; 1086 inlist?: any; 1087 prefix?: string; 1088 property?: string; 1089 resource?: string; 1090 typeof?: string; 1091 vocab?: string; 1092 1093 // Non-standard Attributes 1094 autoCapitalize?: string; 1095 autoCorrect?: string; 1096 autoSave?: string; 1097 color?: string; 1098 itemProp?: string; 1099 itemScope?: boolean; 1100 itemType?: string; 1101 itemID?: string; 1102 itemRef?: string; 1103 results?: number; 1104 security?: string; 1105 unselectable?: 'on' | 'off'; 1106 } 1107 1108 // All the WAI-ARIA 1.1 attributes from https://www.w3.org/TR/wai-aria-1.1/ 1109 interface HTMLAttributes<T> extends DOMAttributes<T> { 1110 /** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */ 1111 'aria-activedescendant'?: string; 1112 /** 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. */ 1113 'aria-atomic'?: boolean | 'false' | 'true'; 1114 /** 1115 * 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 1116 * presented if they are made. 1117 */ 1118 'aria-autocomplete'?: 'none' | 'inline' | 'list' | 'both'; 1119 /** 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. */ 1120 'aria-busy'?: boolean | 'false' | 'true'; 1121 /** 1122 * Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. 1123 * @see aria-pressed @see aria-selected. 1124 */ 1125 'aria-checked'?: boolean | 'false' | 'mixed' | 'true'; 1126 /** 1127 * Defines the total number of columns in a table, grid, or treegrid. 1128 * @see aria-colindex. 1129 */ 1130 'aria-colcount'?: number; 1131 /** 1132 * Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. 1133 * @see aria-colcount @see aria-colspan. 1134 */ 1135 'aria-colindex'?: number; 1136 /** 1137 * Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. 1138 * @see aria-colindex @see aria-rowspan. 1139 */ 1140 'aria-colspan'?: number; 1141 /** 1142 * Identifies the element (or elements) whose contents or presence are controlled by the current element. 1143 * @see aria-owns. 1144 */ 1145 'aria-controls'?: string; 1146 /** Indicates the element that represents the current item within a container or set of related elements. */ 1147 'aria-current'?: boolean | 'false' | 'true' | 'page' | 'step' | 'location' | 'date' | 'time'; 1148 /** 1149 * Identifies the element (or elements) that describes the object. 1150 * @see aria-labelledby 1151 */ 1152 'aria-describedby'?: string; 1153 /** 1154 * Identifies the element that provides a detailed, extended description for the object. 1155 * @see aria-describedby. 1156 */ 1157 'aria-details'?: string; 1158 /** 1159 * Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. 1160 * @see aria-hidden @see aria-readonly. 1161 */ 1162 'aria-disabled'?: boolean | 'false' | 'true'; 1163 /** 1164 * Indicates what functions can be performed when a dragged object is released on the drop target. 1165 * @deprecated in ARIA 1.1 1166 */ 1167 'aria-dropeffect'?: 'none' | 'copy' | 'execute' | 'link' | 'move' | 'popup'; 1168 /** 1169 * Identifies the element that provides an error message for the object. 1170 * @see aria-invalid @see aria-describedby. 1171 */ 1172 'aria-errormessage'?: string; 1173 /** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */ 1174 'aria-expanded'?: boolean | 'false' | 'true'; 1175 /** 1176 * Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, 1177 * allows assistive technology to override the general default of reading in document source order. 1178 */ 1179 'aria-flowto'?: string; 1180 /** 1181 * Indicates an element's "grabbed" state in a drag-and-drop operation. 1182 * @deprecated in ARIA 1.1 1183 */ 1184 'aria-grabbed'?: boolean | 'false' | 'true'; 1185 /** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */ 1186 'aria-haspopup'?: boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog'; 1187 /** 1188 * Indicates whether the element is exposed to an accessibility API. 1189 * @see aria-disabled. 1190 */ 1191 'aria-hidden'?: boolean | 'false' | 'true'; 1192 /** 1193 * Indicates the entered value does not conform to the format expected by the application. 1194 * @see aria-errormessage. 1195 */ 1196 'aria-invalid'?: boolean | 'false' | 'true' | 'grammar' | 'spelling'; 1197 /** Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. */ 1198 'aria-keyshortcuts'?: string; 1199 /** 1200 * Defines a string value that labels the current element. 1201 * @see aria-labelledby. 1202 */ 1203 'aria-label'?: string; 1204 /** 1205 * Identifies the element (or elements) that labels the current element. 1206 * @see aria-describedby. 1207 */ 1208 'aria-labelledby'?: string; 1209 /** Defines the hierarchical level of an element within a structure. */ 1210 'aria-level'?: number; 1211 /** 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. */ 1212 'aria-live'?: 'off' | 'assertive' | 'polite'; 1213 /** Indicates whether an element is modal when displayed. */ 1214 'aria-modal'?: boolean | 'false' | 'true'; 1215 /** Indicates whether a text box accepts multiple lines of input or only a single line. */ 1216 'aria-multiline'?: boolean | 'false' | 'true'; 1217 /** Indicates that the user may select more than one item from the current selectable descendants. */ 1218 'aria-multiselectable'?: boolean | 'false' | 'true'; 1219 /** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */ 1220 'aria-orientation'?: 'horizontal' | 'vertical'; 1221 /** 1222 * Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship 1223 * between DOM elements where the DOM hierarchy cannot be used to represent the relationship. 1224 * @see aria-controls. 1225 */ 1226 'aria-owns'?: string; 1227 /** 1228 * Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. 1229 * A hint could be a sample value or a brief description of the expected format. 1230 */ 1231 'aria-placeholder'?: string; 1232 /** 1233 * 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. 1234 * @see aria-setsize. 1235 */ 1236 'aria-posinset'?: number; 1237 /** 1238 * Indicates the current "pressed" state of toggle buttons. 1239 * @see aria-checked @see aria-selected. 1240 */ 1241 'aria-pressed'?: boolean | 'false' | 'mixed' | 'true'; 1242 /** 1243 * Indicates that the element is not editable, but is otherwise operable. 1244 * @see aria-disabled. 1245 */ 1246 'aria-readonly'?: boolean | 'false' | 'true'; 1247 /** 1248 * Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. 1249 * @see aria-atomic. 1250 */ 1251 'aria-relevant'?: 'additions' | 'additions text' | 'all' | 'removals' | 'text'; 1252 /** Indicates that user input is required on the element before a form may be submitted. */ 1253 'aria-required'?: boolean | 'false' | 'true'; 1254 /** Defines a human-readable, author-localized description for the role of an element. */ 1255 'aria-roledescription'?: string; 1256 /** 1257 * Defines the total number of rows in a table, grid, or treegrid. 1258 * @see aria-rowindex. 1259 */ 1260 'aria-rowcount'?: number; 1261 /** 1262 * Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. 1263 * @see aria-rowcount @see aria-rowspan. 1264 */ 1265 'aria-rowindex'?: number; 1266 /** 1267 * Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. 1268 * @see aria-rowindex @see aria-colspan. 1269 */ 1270 'aria-rowspan'?: number; 1271 /** 1272 * Indicates the current "selected" state of various widgets. 1273 * @see aria-checked @see aria-pressed. 1274 */ 1275 'aria-selected'?: boolean | 'false' | 'true'; 1276 /** 1277 * 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. 1278 * @see aria-posinset. 1279 */ 1280 'aria-setsize'?: number; 1281 /** Indicates if items in a table or grid are sorted in ascending or descending order. */ 1282 'aria-sort'?: 'none' | 'ascending' | 'descending' | 'other'; 1283 /** Defines the maximum allowed value for a range widget. */ 1284 'aria-valuemax'?: number; 1285 /** Defines the minimum allowed value for a range widget. */ 1286 'aria-valuemin'?: number; 1287 /** 1288 * Defines the current value for a range widget. 1289 * @see aria-valuetext. 1290 */ 1291 'aria-valuenow'?: number; 1292 /** Defines the human readable text alternative of aria-valuenow for a range widget. */ 1293 'aria-valuetext'?: string; 1294 } 1295 1296 interface AllHTMLAttributes<T> extends HTMLAttributes<T> { 1297 // Standard HTML Attributes 1298 accept?: string; 1299 acceptCharset?: string; 1300 action?: string; 1301 allowFullScreen?: boolean; 1302 allowTransparency?: boolean; 1303 alt?: string; 1304 as?: string; 1305 async?: boolean; 1306 autoComplete?: string; 1307 autoFocus?: boolean; 1308 autoPlay?: boolean; 1309 capture?: boolean | string; 1310 cellPadding?: number | string; 1311 cellSpacing?: number | string; 1312 charSet?: string; 1313 challenge?: string; 1314 checked?: boolean; 1315 cite?: string; 1316 classID?: string; 1317 cols?: number; 1318 colSpan?: number; 1319 content?: string; 1320 controls?: boolean; 1321 coords?: string; 1322 crossOrigin?: string; 1323 data?: string; 1324 dateTime?: string; 1325 default?: boolean; 1326 defer?: boolean; 1327 disabled?: boolean; 1328 download?: any; 1329 encType?: string; 1330 form?: string; 1331 formAction?: string; 1332 formEncType?: string; 1333 formMethod?: string; 1334 formNoValidate?: boolean; 1335 formTarget?: string; 1336 frameBorder?: number | string; 1337 headers?: string; 1338 height?: number | string; 1339 high?: number; 1340 href?: string; 1341 hrefLang?: string; 1342 htmlFor?: string; 1343 httpEquiv?: string; 1344 integrity?: string; 1345 keyParams?: string; 1346 keyType?: string; 1347 kind?: string; 1348 label?: string; 1349 list?: string; 1350 loop?: boolean; 1351 low?: number; 1352 manifest?: string; 1353 marginHeight?: number; 1354 marginWidth?: number; 1355 max?: number | string; 1356 maxLength?: number; 1357 media?: string; 1358 mediaGroup?: string; 1359 method?: string; 1360 min?: number | string; 1361 minLength?: number; 1362 multiple?: boolean; 1363 muted?: boolean; 1364 name?: string; 1365 nonce?: string; 1366 noValidate?: boolean; 1367 open?: boolean; 1368 optimum?: number; 1369 pattern?: string; 1370 placeholder?: string; 1371 playsInline?: boolean; 1372 poster?: string; 1373 preload?: string; 1374 readOnly?: boolean; 1375 rel?: string; 1376 required?: boolean; 1377 reversed?: boolean; 1378 rows?: number; 1379 rowSpan?: number; 1380 sandbox?: string; 1381 scope?: string; 1382 scoped?: boolean; 1383 scrolling?: string; 1384 seamless?: boolean; 1385 selected?: boolean; 1386 shape?: string; 1387 size?: number; 1388 sizes?: string; 1389 span?: number; 1390 src?: string; 1391 srcDoc?: string; 1392 srcLang?: string; 1393 srcSet?: string; 1394 start?: number; 1395 step?: number | string; 1396 summary?: string; 1397 target?: string; 1398 type?: string; 1399 useMap?: string; 1400 value?: string | string[] | number; 1401 width?: number | string; 1402 wmode?: string; 1403 wrap?: string; 1404 } 1405 1406 interface AnchorHTMLAttributes<T> extends HTMLAttributes<T> { 1407 download?: any; 1408 href?: string; 1409 hrefLang?: string; 1410 media?: string; 1411 rel?: string; 1412 target?: string; 1413 type?: string; 1414 } 1415 1416 // tslint:disable-next-line:no-empty-interface 1417 interface AudioHTMLAttributes<T> extends MediaHTMLAttributes<T> { } 1418 1419 interface AreaHTMLAttributes<T> extends HTMLAttributes<T> { 1420 alt?: string; 1421 coords?: string; 1422 download?: any; 1423 href?: string; 1424 hrefLang?: string; 1425 media?: string; 1426 rel?: string; 1427 shape?: string; 1428 target?: string; 1429 } 1430 1431 interface BaseHTMLAttributes<T> extends HTMLAttributes<T> { 1432 href?: string; 1433 target?: string; 1434 } 1435 1436 interface BlockquoteHTMLAttributes<T> extends HTMLAttributes<T> { 1437 cite?: string; 1438 } 1439 1440 interface ButtonHTMLAttributes<T> extends HTMLAttributes<T> { 1441 autoFocus?: boolean; 1442 disabled?: boolean; 1443 form?: string; 1444 formAction?: string; 1445 formEncType?: string; 1446 formMethod?: string; 1447 formNoValidate?: boolean; 1448 formTarget?: string; 1449 name?: string; 1450 type?: string; 1451 value?: string | string[] | number; 1452 } 1453 1454 interface CanvasHTMLAttributes<T> extends HTMLAttributes<T> { 1455 height?: number | string; 1456 width?: number | string; 1457 } 1458 1459 interface ColHTMLAttributes<T> extends HTMLAttributes<T> { 1460 span?: number; 1461 width?: number | string; 1462 } 1463 1464 interface ColgroupHTMLAttributes<T> extends HTMLAttributes<T> { 1465 span?: number; 1466 } 1467 1468 interface DetailsHTMLAttributes<T> extends HTMLAttributes<T> { 1469 open?: boolean; 1470 } 1471 1472 interface DelHTMLAttributes<T> extends HTMLAttributes<T> { 1473 cite?: string; 1474 dateTime?: string; 1475 } 1476 1477 interface DialogHTMLAttributes<T> extends HTMLAttributes<T> { 1478 open?: boolean; 1479 } 1480 1481 interface EmbedHTMLAttributes<T> extends HTMLAttributes<T> { 1482 height?: number | string; 1483 src?: string; 1484 type?: string; 1485 width?: number | string; 1486 } 1487 1488 interface FieldsetHTMLAttributes<T> extends HTMLAttributes<T> { 1489 disabled?: boolean; 1490 form?: string; 1491 name?: string; 1492 } 1493 1494 interface FormHTMLAttributes<T> extends HTMLAttributes<T> { 1495 acceptCharset?: string; 1496 action?: string; 1497 autoComplete?: string; 1498 encType?: string; 1499 method?: string; 1500 name?: string; 1501 noValidate?: boolean; 1502 target?: string; 1503 } 1504 1505 interface HtmlHTMLAttributes<T> extends HTMLAttributes<T> { 1506 manifest?: string; 1507 } 1508 1509 interface IframeHTMLAttributes<T> extends HTMLAttributes<T> { 1510 allow?: string; 1511 allowFullScreen?: boolean; 1512 allowTransparency?: boolean; 1513 frameBorder?: number | string; 1514 height?: number | string; 1515 marginHeight?: number; 1516 marginWidth?: number; 1517 name?: string; 1518 sandbox?: string; 1519 scrolling?: string; 1520 seamless?: boolean; 1521 src?: string; 1522 srcDoc?: string; 1523 width?: number | string; 1524 } 1525 1526 interface ImgHTMLAttributes<T> extends HTMLAttributes<T> { 1527 alt?: string; 1528 crossOrigin?: "anonymous" | "use-credentials" | ""; 1529 decoding?: "async" | "auto" | "sync"; 1530 height?: number | string; 1531 sizes?: string; 1532 src?: string; 1533 srcSet?: string; 1534 useMap?: string; 1535 width?: number | string; 1536 } 1537 1538 interface InsHTMLAttributes<T> extends HTMLAttributes<T> { 1539 cite?: string; 1540 dateTime?: string; 1541 } 1542 1543 interface InputHTMLAttributes<T> extends HTMLAttributes<T> { 1544 accept?: string; 1545 alt?: string; 1546 autoComplete?: string; 1547 autoFocus?: boolean; 1548 capture?: boolean | string; // https://www.w3.org/TR/html-media-capture/#the-capture-attribute 1549 checked?: boolean; 1550 crossOrigin?: string; 1551 disabled?: boolean; 1552 form?: string; 1553 formAction?: string; 1554 formEncType?: string; 1555 formMethod?: string; 1556 formNoValidate?: boolean; 1557 formTarget?: string; 1558 height?: number | string; 1559 list?: string; 1560 max?: number | string; 1561 maxLength?: number; 1562 min?: number | string; 1563 minLength?: number; 1564 multiple?: boolean; 1565 name?: string; 1566 pattern?: string; 1567 placeholder?: string; 1568 readOnly?: boolean; 1569 required?: boolean; 1570 size?: number; 1571 src?: string; 1572 step?: number | string; 1573 type?: string; 1574 value?: string | string[] | number; 1575 width?: number | string; 1576 1577 onChange?: ChangeEventHandler<T>; 1578 } 1579 1580 interface KeygenHTMLAttributes<T> extends HTMLAttributes<T> { 1581 autoFocus?: boolean; 1582 challenge?: string; 1583 disabled?: boolean; 1584 form?: string; 1585 keyType?: string; 1586 keyParams?: string; 1587 name?: string; 1588 } 1589 1590 interface LabelHTMLAttributes<T> extends HTMLAttributes<T> { 1591 form?: string; 1592 htmlFor?: string; 1593 } 1594 1595 interface LiHTMLAttributes<T> extends HTMLAttributes<T> { 1596 value?: string | string[] | number; 1597 } 1598 1599 interface LinkHTMLAttributes<T> extends HTMLAttributes<T> { 1600 as?: string; 1601 crossOrigin?: string; 1602 href?: string; 1603 hrefLang?: string; 1604 integrity?: string; 1605 media?: string; 1606 rel?: string; 1607 sizes?: string; 1608 type?: string; 1609 } 1610 1611 interface MapHTMLAttributes<T> extends HTMLAttributes<T> { 1612 name?: string; 1613 } 1614 1615 interface MenuHTMLAttributes<T> extends HTMLAttributes<T> { 1616 type?: string; 1617 } 1618 1619 interface MediaHTMLAttributes<T> extends HTMLAttributes<T> { 1620 autoPlay?: boolean; 1621 controls?: boolean; 1622 controlsList?: string; 1623 crossOrigin?: string; 1624 loop?: boolean; 1625 mediaGroup?: string; 1626 muted?: boolean; 1627 playsinline?: boolean; 1628 preload?: string; 1629 src?: string; 1630 } 1631 1632 interface MetaHTMLAttributes<T> extends HTMLAttributes<T> { 1633 charSet?: string; 1634 content?: string; 1635 httpEquiv?: string; 1636 name?: string; 1637 } 1638 1639 interface MeterHTMLAttributes<T> extends HTMLAttributes<T> { 1640 form?: string; 1641 high?: number; 1642 low?: number; 1643 max?: number | string; 1644 min?: number | string; 1645 optimum?: number; 1646 value?: string | string[] | number; 1647 } 1648 1649 interface QuoteHTMLAttributes<T> extends HTMLAttributes<T> { 1650 cite?: string; 1651 } 1652 1653 interface ObjectHTMLAttributes<T> extends HTMLAttributes<T> { 1654 classID?: string; 1655 data?: string; 1656 form?: string; 1657 height?: number | string; 1658 name?: string; 1659 type?: string; 1660 useMap?: string; 1661 width?: number | string; 1662 wmode?: string; 1663 } 1664 1665 interface OlHTMLAttributes<T> extends HTMLAttributes<T> { 1666 reversed?: boolean; 1667 start?: number; 1668 type?: '1' | 'a' | 'A' | 'i' | 'I'; 1669 } 1670 1671 interface OptgroupHTMLAttributes<T> extends HTMLAttributes<T> { 1672 disabled?: boolean; 1673 label?: string; 1674 } 1675 1676 interface OptionHTMLAttributes<T> extends HTMLAttributes<T> { 1677 disabled?: boolean; 1678 label?: string; 1679 selected?: boolean; 1680 value?: string | string[] | number; 1681 } 1682 1683 interface OutputHTMLAttributes<T> extends HTMLAttributes<T> { 1684 form?: string; 1685 htmlFor?: string; 1686 name?: string; 1687 } 1688 1689 interface ParamHTMLAttributes<T> extends HTMLAttributes<T> { 1690 name?: string; 1691 value?: string | string[] | number; 1692 } 1693 1694 interface ProgressHTMLAttributes<T> extends HTMLAttributes<T> { 1695 max?: number | string; 1696 value?: string | string[] | number; 1697 } 1698 1699 interface ScriptHTMLAttributes<T> extends HTMLAttributes<T> { 1700 async?: boolean; 1701 charSet?: string; 1702 crossOrigin?: string; 1703 defer?: boolean; 1704 integrity?: string; 1705 noModule?: boolean; 1706 nonce?: string; 1707 src?: string; 1708 type?: string; 1709 } 1710 1711 interface SelectHTMLAttributes<T> extends HTMLAttributes<T> { 1712 autoComplete?: string; 1713 autoFocus?: boolean; 1714 disabled?: boolean; 1715 form?: string; 1716 multiple?: boolean; 1717 name?: string; 1718 required?: boolean; 1719 size?: number; 1720 value?: string | string[] | number; 1721 onChange?: ChangeEventHandler<T>; 1722 } 1723 1724 interface SourceHTMLAttributes<T> extends HTMLAttributes<T> { 1725 media?: string; 1726 sizes?: string; 1727 src?: string; 1728 srcSet?: string; 1729 type?: string; 1730 } 1731 1732 interface StyleHTMLAttributes<T> extends HTMLAttributes<T> { 1733 media?: string; 1734 nonce?: string; 1735 scoped?: boolean; 1736 type?: string; 1737 } 1738 1739 interface TableHTMLAttributes<T> extends HTMLAttributes<T> { 1740 cellPadding?: number | string; 1741 cellSpacing?: number | string; 1742 summary?: string; 1743 } 1744 1745 interface TextareaHTMLAttributes<T> extends HTMLAttributes<T> { 1746 autoComplete?: string; 1747 autoFocus?: boolean; 1748 cols?: number; 1749 dirName?: string; 1750 disabled?: boolean; 1751 form?: string; 1752 maxLength?: number; 1753 minLength?: number; 1754 name?: string; 1755 placeholder?: string; 1756 readOnly?: boolean; 1757 required?: boolean; 1758 rows?: number; 1759 value?: string | string[] | number; 1760 wrap?: string; 1761 1762 onChange?: ChangeEventHandler<T>; 1763 } 1764 1765 interface TdHTMLAttributes<T> extends HTMLAttributes<T> { 1766 colSpan?: number; 1767 headers?: string; 1768 rowSpan?: number; 1769 scope?: string; 1770 } 1771 1772 interface ThHTMLAttributes<T> extends HTMLAttributes<T> { 1773 colSpan?: number; 1774 headers?: string; 1775 rowSpan?: number; 1776 scope?: string; 1777 } 1778 1779 interface TimeHTMLAttributes<T> extends HTMLAttributes<T> { 1780 dateTime?: string; 1781 } 1782 1783 interface TrackHTMLAttributes<T> extends HTMLAttributes<T> { 1784 default?: boolean; 1785 kind?: string; 1786 label?: string; 1787 src?: string; 1788 srcLang?: string; 1789 } 1790 1791 interface VideoHTMLAttributes<T> extends MediaHTMLAttributes<T> { 1792 height?: number | string; 1793 playsInline?: boolean; 1794 poster?: string; 1795 width?: number | string; 1796 } 1797 1798 // this list is "complete" in that it contains every SVG attribute 1799 // that React supports, but the types can be improved. 1800 // Full list here: https://facebook.github.io/react/docs/dom-elements.html 1801 // 1802 // The three broad type categories are (in order of restrictiveness): 1803 // - "number | string" 1804 // - "string" 1805 // - union of string literals 1806 interface SVGAttributes<T> extends DOMAttributes<T> { 1807 // Attributes which also defined in HTMLAttributes 1808 // See comment in SVGDOMPropertyConfig.js 1809 className?: string; 1810 color?: string; 1811 height?: number | string; 1812 id?: string; 1813 lang?: string; 1814 max?: number | string; 1815 media?: string; 1816 method?: string; 1817 min?: number | string; 1818 name?: string; 1819 style?: CSSProperties; 1820 target?: string; 1821 type?: string; 1822 width?: number | string; 1823 1824 // Other HTML properties supported by SVG elements in browsers 1825 role?: string; 1826 tabIndex?: number; 1827 1828 // SVG Specific attributes 1829 accentHeight?: number | string; 1830 accumulate?: "none" | "sum"; 1831 additive?: "replace" | "sum"; 1832 alignmentBaseline?: "auto" | "baseline" | "before-edge" | "text-before-edge" | "middle" | "central" | "after-edge" | 1833 "text-after-edge" | "ideographic" | "alphabetic" | "hanging" | "mathematical" | "inherit"; 1834 allowReorder?: "no" | "yes"; 1835 alphabetic?: number | string; 1836 amplitude?: number | string; 1837 arabicForm?: "initial" | "medial" | "terminal" | "isolated"; 1838 ascent?: number | string; 1839 attributeName?: string; 1840 attributeType?: string; 1841 autoReverse?: number | string; 1842 azimuth?: number | string; 1843 baseFrequency?: number | string; 1844 baselineShift?: number | string; 1845 baseProfile?: number | string; 1846 bbox?: number | string; 1847 begin?: number | string; 1848 bias?: number | string; 1849 by?: number | string; 1850 calcMode?: number | string; 1851 capHeight?: number | string; 1852 clip?: number | string; 1853 clipPath?: string; 1854 clipPathUnits?: number | string; 1855 clipRule?: number | string; 1856 colorInterpolation?: number | string; 1857 colorInterpolationFilters?: "auto" | "sRGB" | "linearRGB" | "inherit"; 1858 colorProfile?: number | string; 1859 colorRendering?: number | string; 1860 contentScriptType?: number | string; 1861 contentStyleType?: number | string; 1862 cursor?: number | string; 1863 cx?: number | string; 1864 cy?: number | string; 1865 d?: string; 1866 decelerate?: number | string; 1867 descent?: number | string; 1868 diffuseConstant?: number | string; 1869 direction?: number | string; 1870 display?: number | string; 1871 divisor?: number | string; 1872 dominantBaseline?: number | string; 1873 dur?: number | string; 1874 dx?: number | string; 1875 dy?: number | string; 1876 edgeMode?: number | string; 1877 elevation?: number | string; 1878 enableBackground?: number | string; 1879 end?: number | string; 1880 exponent?: number | string; 1881 externalResourcesRequired?: number | string; 1882 fill?: string; 1883 fillOpacity?: number | string; 1884 fillRule?: "nonzero" | "evenodd" | "inherit"; 1885 filter?: string; 1886 filterRes?: number | string; 1887 filterUnits?: number | string; 1888 floodColor?: number | string; 1889 floodOpacity?: number | string; 1890 focusable?: number | string; 1891 fontFamily?: string; 1892 fontSize?: number | string; 1893 fontSizeAdjust?: number | string; 1894 fontStretch?: number | string; 1895 fontStyle?: number | string; 1896 fontVariant?: number | string; 1897 fontWeight?: number | string; 1898 format?: number | string; 1899 from?: number | string; 1900 fx?: number | string; 1901 fy?: number | string; 1902 g1?: number | string; 1903 g2?: number | string; 1904 glyphName?: number | string; 1905 glyphOrientationHorizontal?: number | string; 1906 glyphOrientationVertical?: number | string; 1907 glyphRef?: number | string; 1908 gradientTransform?: string; 1909 gradientUnits?: string; 1910 hanging?: number | string; 1911 horizAdvX?: number | string; 1912 horizOriginX?: number | string; 1913 href?: string; 1914 ideographic?: number | string; 1915 imageRendering?: number | string; 1916 in2?: number | string; 1917 in?: string; 1918 intercept?: number | string; 1919 k1?: number | string; 1920 k2?: number | string; 1921 k3?: number | string; 1922 k4?: number | string; 1923 k?: number | string; 1924 kernelMatrix?: number | string; 1925 kernelUnitLength?: number | string; 1926 kerning?: number | string; 1927 keyPoints?: number | string; 1928 keySplines?: number | string; 1929 keyTimes?: number | string; 1930 lengthAdjust?: number | string; 1931 letterSpacing?: number | string; 1932 lightingColor?: number | string; 1933 limitingConeAngle?: number | string; 1934 local?: number | string; 1935 markerEnd?: string; 1936 markerHeight?: number | string; 1937 markerMid?: string; 1938 markerStart?: string; 1939 markerUnits?: number | string; 1940 markerWidth?: number | string; 1941 mask?: string; 1942 maskContentUnits?: number | string; 1943 maskUnits?: number | string; 1944 mathematical?: number | string; 1945 mode?: number | string; 1946 numOctaves?: number | string; 1947 offset?: number | string; 1948 opacity?: number | string; 1949 operator?: number | string; 1950 order?: number | string; 1951 orient?: number | string; 1952 orientation?: number | string; 1953 origin?: number | string; 1954 overflow?: number | string; 1955 overlinePosition?: number | string; 1956 overlineThickness?: number | string; 1957 paintOrder?: number | string; 1958 panose1?: number | string; 1959 pathLength?: number | string; 1960 patternContentUnits?: string; 1961 patternTransform?: number | string; 1962 patternUnits?: string; 1963 pointerEvents?: number | string; 1964 points?: string; 1965 pointsAtX?: number | string; 1966 pointsAtY?: number | string; 1967 pointsAtZ?: number | string; 1968 preserveAlpha?: number | string; 1969 preserveAspectRatio?: string; 1970 primitiveUnits?: number | string; 1971 r?: number | string; 1972 radius?: number | string; 1973 refX?: number | string; 1974 refY?: number | string; 1975 renderingIntent?: number | string; 1976 repeatCount?: number | string; 1977 repeatDur?: number | string; 1978 requiredExtensions?: number | string; 1979 requiredFeatures?: number | string; 1980 restart?: number | string; 1981 result?: string; 1982 rotate?: number | string; 1983 rx?: number | string; 1984 ry?: number | string; 1985 scale?: number | string; 1986 seed?: number | string; 1987 shapeRendering?: number | string; 1988 slope?: number | string; 1989 spacing?: number | string; 1990 specularConstant?: number | string; 1991 specularExponent?: number | string; 1992 speed?: number | string; 1993 spreadMethod?: string; 1994 startOffset?: number | string; 1995 stdDeviation?: number | string; 1996 stemh?: number | string; 1997 stemv?: number | string; 1998 stitchTiles?: number | string; 1999 stopColor?: string; 2000 stopOpacity?: number | string; 2001 strikethroughPosition?: number | string; 2002 strikethroughThickness?: number | string; 2003 string?: number | string; 2004 stroke?: string; 2005 strokeDasharray?: string | number; 2006 strokeDashoffset?: string | number; 2007 strokeLinecap?: "butt" | "round" | "square" | "inherit"; 2008 strokeLinejoin?: "miter" | "round" | "bevel" | "inherit"; 2009 strokeMiterlimit?: number | string; 2010 strokeOpacity?: number | string; 2011 strokeWidth?: number | string; 2012 surfaceScale?: number | string; 2013 systemLanguage?: number | string; 2014 tableValues?: number | string; 2015 targetX?: number | string; 2016 targetY?: number | string; 2017 textAnchor?: string; 2018 textDecoration?: number | string; 2019 textLength?: number | string; 2020 textRendering?: number | string; 2021 to?: number | string; 2022 transform?: string; 2023 u1?: number | string; 2024 u2?: number | string; 2025 underlinePosition?: number | string; 2026 underlineThickness?: number | string; 2027 unicode?: number | string; 2028 unicodeBidi?: number | string; 2029 unicodeRange?: number | string; 2030 unitsPerEm?: number | string; 2031 vAlphabetic?: number | string; 2032 values?: string; 2033 vectorEffect?: number | string; 2034 version?: string; 2035 vertAdvY?: number | string; 2036 vertOriginX?: number | string; 2037 vertOriginY?: number | string; 2038 vHanging?: number | string; 2039 vIdeographic?: number | string; 2040 viewBox?: string; 2041 viewTarget?: number | string; 2042 visibility?: number | string; 2043 vMathematical?: number | string; 2044 widths?: number | string; 2045 wordSpacing?: number | string; 2046 writingMode?: number | string; 2047 x1?: number | string; 2048 x2?: number | string; 2049 x?: number | string; 2050 xChannelSelector?: string; 2051 xHeight?: number | string; 2052 xlinkActuate?: string; 2053 xlinkArcrole?: string; 2054 xlinkHref?: string; 2055 xlinkRole?: string; 2056 xlinkShow?: string; 2057 xlinkTitle?: string; 2058 xlinkType?: string; 2059 xmlBase?: string; 2060 xmlLang?: string; 2061 xmlns?: string; 2062 xmlnsXlink?: string; 2063 xmlSpace?: string; 2064 y1?: number | string; 2065 y2?: number | string; 2066 y?: number | string; 2067 yChannelSelector?: string; 2068 z?: number | string; 2069 zoomAndPan?: string; 2070 } 2071 2072 interface WebViewHTMLAttributes<T> extends HTMLAttributes<T> { 2073 allowFullScreen?: boolean; 2074 allowpopups?: boolean; 2075 autoFocus?: boolean; 2076 autosize?: boolean; 2077 blinkfeatures?: string; 2078 disableblinkfeatures?: string; 2079 disableguestresize?: boolean; 2080 disablewebsecurity?: boolean; 2081 guestinstance?: string; 2082 httpreferrer?: string; 2083 nodeintegration?: boolean; 2084 partition?: string; 2085 plugins?: boolean; 2086 preload?: string; 2087 src?: string; 2088 useragent?: string; 2089 webpreferences?: string; 2090 } 2091 2092 // 2093 // React.DOM 2094 // ---------------------------------------------------------------------- 2095 2096 interface ReactHTML { 2097 a: DetailedHTMLFactory<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>; 2098 abbr: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2099 address: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2100 area: DetailedHTMLFactory<AreaHTMLAttributes<HTMLAreaElement>, HTMLAreaElement>; 2101 article: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2102 aside: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2103 audio: DetailedHTMLFactory<AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>; 2104 b: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2105 base: DetailedHTMLFactory<BaseHTMLAttributes<HTMLBaseElement>, HTMLBaseElement>; 2106 bdi: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2107 bdo: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2108 big: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2109 blockquote: DetailedHTMLFactory<BlockquoteHTMLAttributes<HTMLElement>, HTMLElement>; 2110 body: DetailedHTMLFactory<HTMLAttributes<HTMLBodyElement>, HTMLBodyElement>; 2111 br: DetailedHTMLFactory<HTMLAttributes<HTMLBRElement>, HTMLBRElement>; 2112 button: DetailedHTMLFactory<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>; 2113 canvas: DetailedHTMLFactory<CanvasHTMLAttributes<HTMLCanvasElement>, HTMLCanvasElement>; 2114 caption: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2115 cite: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2116 code: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2117 col: DetailedHTMLFactory<ColHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>; 2118 colgroup: DetailedHTMLFactory<ColgroupHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>; 2119 data: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2120 datalist: DetailedHTMLFactory<HTMLAttributes<HTMLDataListElement>, HTMLDataListElement>; 2121 dd: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2122 del: DetailedHTMLFactory<DelHTMLAttributes<HTMLElement>, HTMLElement>; 2123 details: DetailedHTMLFactory<DetailsHTMLAttributes<HTMLElement>, HTMLElement>; 2124 dfn: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2125 dialog: DetailedHTMLFactory<DialogHTMLAttributes<HTMLDialogElement>, HTMLDialogElement>; 2126 div: DetailedHTMLFactory<HTMLAttributes<HTMLDivElement>, HTMLDivElement>; 2127 dl: DetailedHTMLFactory<HTMLAttributes<HTMLDListElement>, HTMLDListElement>; 2128 dt: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2129 em: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2130 embed: DetailedHTMLFactory<EmbedHTMLAttributes<HTMLEmbedElement>, HTMLEmbedElement>; 2131 fieldset: DetailedHTMLFactory<FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>; 2132 figcaption: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2133 figure: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2134 footer: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2135 form: DetailedHTMLFactory<FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>; 2136 h1: DetailedHTMLFactory<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>; 2137 h2: DetailedHTMLFactory<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>; 2138 h3: DetailedHTMLFactory<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>; 2139 h4: DetailedHTMLFactory<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>; 2140 h5: DetailedHTMLFactory<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>; 2141 h6: DetailedHTMLFactory<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>; 2142 head: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLHeadElement>; 2143 header: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2144 hgroup: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2145 hr: DetailedHTMLFactory<HTMLAttributes<HTMLHRElement>, HTMLHRElement>; 2146 html: DetailedHTMLFactory<HtmlHTMLAttributes<HTMLHtmlElement>, HTMLHtmlElement>; 2147 i: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2148 iframe: DetailedHTMLFactory<IframeHTMLAttributes<HTMLIFrameElement>, HTMLIFrameElement>; 2149 img: DetailedHTMLFactory<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>; 2150 input: DetailedHTMLFactory<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>; 2151 ins: DetailedHTMLFactory<InsHTMLAttributes<HTMLModElement>, HTMLModElement>; 2152 kbd: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2153 keygen: DetailedHTMLFactory<KeygenHTMLAttributes<HTMLElement>, HTMLElement>; 2154 label: DetailedHTMLFactory<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>; 2155 legend: DetailedHTMLFactory<HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>; 2156 li: DetailedHTMLFactory<LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>; 2157 link: DetailedHTMLFactory<LinkHTMLAttributes<HTMLLinkElement>, HTMLLinkElement>; 2158 main: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2159 map: DetailedHTMLFactory<MapHTMLAttributes<HTMLMapElement>, HTMLMapElement>; 2160 mark: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2161 menu: DetailedHTMLFactory<MenuHTMLAttributes<HTMLElement>, HTMLElement>; 2162 menuitem: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2163 meta: DetailedHTMLFactory<MetaHTMLAttributes<HTMLMetaElement>, HTMLMetaElement>; 2164 meter: DetailedHTMLFactory<MeterHTMLAttributes<HTMLElement>, HTMLElement>; 2165 nav: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2166 noscript: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2167 object: DetailedHTMLFactory<ObjectHTMLAttributes<HTMLObjectElement>, HTMLObjectElement>; 2168 ol: DetailedHTMLFactory<OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>; 2169 optgroup: DetailedHTMLFactory<OptgroupHTMLAttributes<HTMLOptGroupElement>, HTMLOptGroupElement>; 2170 option: DetailedHTMLFactory<OptionHTMLAttributes<HTMLOptionElement>, HTMLOptionElement>; 2171 output: DetailedHTMLFactory<OutputHTMLAttributes<HTMLElement>, HTMLElement>; 2172 p: DetailedHTMLFactory<HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>; 2173 param: DetailedHTMLFactory<ParamHTMLAttributes<HTMLParamElement>, HTMLParamElement>; 2174 picture: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2175 pre: DetailedHTMLFactory<HTMLAttributes<HTMLPreElement>, HTMLPreElement>; 2176 progress: DetailedHTMLFactory<ProgressHTMLAttributes<HTMLProgressElement>, HTMLProgressElement>; 2177 q: DetailedHTMLFactory<QuoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>; 2178 rp: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2179 rt: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2180 ruby: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2181 s: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2182 samp: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2183 script: DetailedHTMLFactory<ScriptHTMLAttributes<HTMLScriptElement>, HTMLScriptElement>; 2184 section: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2185 select: DetailedHTMLFactory<SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>; 2186 small: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2187 source: DetailedHTMLFactory<SourceHTMLAttributes<HTMLSourceElement>, HTMLSourceElement>; 2188 span: DetailedHTMLFactory<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>; 2189 strong: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2190 style: DetailedHTMLFactory<StyleHTMLAttributes<HTMLStyleElement>, HTMLStyleElement>; 2191 sub: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2192 summary: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2193 sup: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2194 table: DetailedHTMLFactory<TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>; 2195 tbody: DetailedHTMLFactory<HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>; 2196 td: DetailedHTMLFactory<TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>; 2197 textarea: DetailedHTMLFactory<TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>; 2198 tfoot: DetailedHTMLFactory<HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>; 2199 th: DetailedHTMLFactory<ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>; 2200 thead: DetailedHTMLFactory<HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>; 2201 time: DetailedHTMLFactory<TimeHTMLAttributes<HTMLElement>, HTMLElement>; 2202 title: DetailedHTMLFactory<HTMLAttributes<HTMLTitleElement>, HTMLTitleElement>; 2203 tr: DetailedHTMLFactory<HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>; 2204 track: DetailedHTMLFactory<TrackHTMLAttributes<HTMLTrackElement>, HTMLTrackElement>; 2205 u: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2206 ul: DetailedHTMLFactory<HTMLAttributes<HTMLUListElement>, HTMLUListElement>; 2207 "var": DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2208 video: DetailedHTMLFactory<VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>; 2209 wbr: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>; 2210 webview: DetailedHTMLFactory<WebViewHTMLAttributes<HTMLWebViewElement>, HTMLWebViewElement>; 2211 } 2212 2213 interface ReactSVG { 2214 animate: SVGFactory; 2215 circle: SVGFactory; 2216 clipPath: SVGFactory; 2217 defs: SVGFactory; 2218 desc: SVGFactory; 2219 ellipse: SVGFactory; 2220 feBlend: SVGFactory; 2221 feColorMatrix: SVGFactory; 2222 feComponentTransfer: SVGFactory; 2223 feComposite: SVGFactory; 2224 feConvolveMatrix: SVGFactory; 2225 feDiffuseLighting: SVGFactory; 2226 feDisplacementMap: SVGFactory; 2227 feDistantLight: SVGFactory; 2228 feDropShadow: SVGFactory; 2229 feFlood: SVGFactory; 2230 feFuncA: SVGFactory; 2231 feFuncB: SVGFactory; 2232 feFuncG: SVGFactory; 2233 feFuncR: SVGFactory; 2234 feGaussianBlur: SVGFactory; 2235 feImage: SVGFactory; 2236 feMerge: SVGFactory; 2237 feMergeNode: SVGFactory; 2238 feMorphology: SVGFactory; 2239 feOffset: SVGFactory; 2240 fePointLight: SVGFactory; 2241 feSpecularLighting: SVGFactory; 2242 feSpotLight: SVGFactory; 2243 feTile: SVGFactory; 2244 feTurbulence: SVGFactory; 2245 filter: SVGFactory; 2246 foreignObject: SVGFactory; 2247 g: SVGFactory; 2248 image: SVGFactory; 2249 line: SVGFactory; 2250 linearGradient: SVGFactory; 2251 marker: SVGFactory; 2252 mask: SVGFactory; 2253 metadata: SVGFactory; 2254 path: SVGFactory; 2255 pattern: SVGFactory; 2256 polygon: SVGFactory; 2257 polyline: SVGFactory; 2258 radialGradient: SVGFactory; 2259 rect: SVGFactory; 2260 stop: SVGFactory; 2261 svg: SVGFactory; 2262 switch: SVGFactory; 2263 symbol: SVGFactory; 2264 text: SVGFactory; 2265 textPath: SVGFactory; 2266 tspan: SVGFactory; 2267 use: SVGFactory; 2268 view: SVGFactory; 2269 } 2270 2271 interface ReactDOM extends ReactHTML, ReactSVG { } 2272 2273 // 2274 // React.PropTypes 2275 // ---------------------------------------------------------------------- 2276 2277 type Validator<T> = PropTypes.Validator<T>; 2278 2279 type Requireable<T> = PropTypes.Requireable<T>; 2280 2281 type ValidationMap<T> = PropTypes.ValidationMap<T>; 2282 2283 interface ReactPropTypes { 2284 any: typeof PropTypes.any; 2285 array: typeof PropTypes.array; 2286 bool: typeof PropTypes.bool; 2287 func: typeof PropTypes.func; 2288 number: typeof PropTypes.number; 2289 object: typeof PropTypes.object; 2290 string: typeof PropTypes.string; 2291 node: typeof PropTypes.node; 2292 element: typeof PropTypes.element; 2293 instanceOf: typeof PropTypes.instanceOf; 2294 oneOf: typeof PropTypes.oneOf; 2295 oneOfType: typeof PropTypes.oneOfType; 2296 arrayOf: typeof PropTypes.arrayOf; 2297 objectOf: typeof PropTypes.objectOf; 2298 shape: typeof PropTypes.shape; 2299 exact: typeof PropTypes.exact; 2300 } 2301 2302 // 2303 // React.Children 2304 // ---------------------------------------------------------------------- 2305 2306 interface ReactChildren { 2307 map<T>(children: ReactNode, fn: (child: ReactChild, index: number) => T): T[]; 2308 forEach(children: ReactNode, fn: (child: ReactChild, index: number) => void): void; 2309 count(children: ReactNode): number; 2310 only(children: ReactNode): ReactElement<any>; 2311 toArray(children: ReactNode): ReactChild[]; 2312 } 2313 2314 // 2315 // Browser Interfaces 2316 // https://github.com/nikeee/2048-typescript/blob/master/2048/js/touch.d.ts 2317 // ---------------------------------------------------------------------- 2318 2319 interface AbstractView { 2320 styleMedia: StyleMedia; 2321 document: Document; 2322 } 2323 2324 interface Touch { 2325 identifier: number; 2326 target: EventTarget; 2327 screenX: number; 2328 screenY: number; 2329 clientX: number; 2330 clientY: number; 2331 pageX: number; 2332 pageY: number; 2333 } 2334 2335 interface TouchList { 2336 [index: number]: Touch; 2337 length: number; 2338 item(index: number): Touch; 2339 identifiedTouch(identifier: number): Touch; 2340 } 2341 2342 // 2343 // Error Interfaces 2344 // ---------------------------------------------------------------------- 2345 interface ErrorInfo { 2346 /** 2347 * Captures which component contained the exception, and its ancestors. 2348 */ 2349 componentStack: string; 2350 } 2351 2352 // Exotic components and their APIs 2353 // ---------------------------------------------------------------------- 2354 interface MutableRefObject<T> { 2355 current: T; 2356 } 2357 2358 type ForwardedRef<T> = ((instance: T | null) => void) | MutableRefObject<T | null> | null; 2359 2360 interface ForwardRefRenderFunction<T, P = {}> { 2361 (props: PropsWithChildren<P>, ref: ForwardedRef<T>): ReactElement<any> | null; 2362 displayName?: string; 2363 // explicit rejected with `never` required due to 2364 // https://github.com/microsoft/TypeScript/issues/36826 2365 /** 2366 * defaultProps are not supported on render functions 2367 */ 2368 defaultProps?: never; 2369 /** 2370 * propTypes are not supported on render functions 2371 */ 2372 propTypes?: never; 2373 } 2374 2375 function createRef<T>(): RefObject<T>; 2376 2377 type WeakValidationMap<T> = { 2378 [K in keyof T]?: null extends T[K] 2379 ? Validator<T[K] | null | undefined> 2380 : undefined extends T[K] 2381 ? Validator<T[K] | null | undefined> 2382 : Validator<T[K]> 2383 }; 2384 2385 // will show `ForwardRef(${Component.displayName || Component.name})` in devtools by default, 2386 // but can be given its own specific name 2387 interface ForwardRefExoticComponent<P> extends NamedExoticComponent<P> { 2388 defaultProps?: Partial<P>; 2389 propTypes?: WeakValidationMap<P>; 2390 } 2391 2392 function forwardRef<T, P = {}>(render: ForwardRefRenderFunction<T, P>): ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>>; 2393 2394 /** Ensures that the props do not include ref at all */ 2395 type PropsWithoutRef<P> = 2396 // Just Pick would be sufficient for this, but I'm trying to avoid unnecessary mapping over union types 2397 // https://github.com/Microsoft/TypeScript/issues/28339 2398 'ref' extends keyof P 2399 ? Pick<P, Exclude<keyof P, 'ref'>> 2400 : P; 2401 /** Ensures that the props do not include string ref, which cannot be forwarded */ 2402 type PropsWithRef<P> = 2403 // Just "P extends { ref?: infer R }" looks sufficient, but R will infer as {} if P is {}. 2404 'ref' extends keyof P 2405 ? P extends { ref?: infer R } 2406 ? string extends R 2407 ? PropsWithoutRef<P> & { ref?: Exclude<R, string> } 2408 : P 2409 : P 2410 : P; 2411 2412 type PropsWithChildren<P> = P & { children?: ReactNode }; 2413 type JSXElementConstructor<P> = 2414 | ((props: P) => ReactElement<any> | null) 2415 | (new (props: P) => Component<P, any>); 2416 type ElementType<P = any> = 2417 { 2418 [K in keyof JSX.IntrinsicElements]: P extends JSX.IntrinsicElements[K] ? K : never 2419 }[keyof JSX.IntrinsicElements] | 2420 ComponentType<P>; 2421 2422 interface RefAttributes<T> extends Attributes { 2423 ref?: Ref<T>; 2424 } 2425 2426 /** 2427 * NOTE: prefer ComponentPropsWithRef, if the ref is forwarded, 2428 * or ComponentPropsWithoutRef when refs are not supported. 2429 */ 2430 type ComponentProps<T extends keyof JSX.IntrinsicElements | JSXElementConstructor<any>> = 2431 T extends JSXElementConstructor<infer P> 2432 ? P 2433 : T extends keyof JSX.IntrinsicElements 2434 ? JSX.IntrinsicElements[T] 2435 : {}; 2436 type ComponentPropsWithRef<T extends ElementType> = 2437 T extends ComponentClass<infer P> 2438 ? PropsWithoutRef<P> & RefAttributes<InstanceType<T>> 2439 : PropsWithRef<ComponentProps<T>>; 2440 type ComponentPropsWithoutRef<T extends ElementType> = 2441 PropsWithoutRef<ComponentProps<T>>; 2442 2443 // will show `Memo(${Component.displayName || Component.name})` in devtools by default, 2444 // but can be given its own specific name 2445 type MemoExoticComponent<T extends ComponentType<any>> = NamedExoticComponent<ComponentPropsWithRef<T>> & { 2446 readonly type: T; 2447 }; 2448 2449 function memo<P extends object>( 2450 Component: SFC<P>, 2451 propsAreEqual?: (prevProps: Readonly<PropsWithChildren<P>>, nextProps: Readonly<PropsWithChildren<P>>) => boolean 2452 ): NamedExoticComponent<P>; 2453 function memo<T extends ComponentType<any>>( 2454 Component: T, 2455 propsAreEqual?: (prevProps: Readonly<ComponentProps<T>>, nextProps: Readonly<ComponentProps<T>>) => boolean 2456 ): MemoExoticComponent<T>; 2457 2458 type LazyExoticComponent<T extends ComponentType<any>> = ExoticComponent<ComponentPropsWithRef<T>> & { 2459 readonly _result: T; 2460 }; 2461 2462 function lazy<T extends ComponentType<any>>( 2463 factory: () => Promise<{ default: T }> 2464 ): LazyExoticComponent<T>; 2465 2466 interface ExoticComponent<P = {}> { 2467 /** 2468 * **NOTE**: Exotic components are not callable. 2469 */ 2470 (props: P): (ReactElement<any>|null); 2471 readonly $$typeof: symbol; 2472 } 2473 2474 interface NamedExoticComponent<P = {}> extends ExoticComponent<P> { 2475 displayName?: string; 2476 } 2477 } 2478 2479 // Declared props take priority over inferred props 2480 // If declared props have indexed properties, ignore inferred props entirely as keyof gets widened 2481 type MergePropTypes<P, T> = P & Pick<T, Exclude<keyof T, keyof P>>; 2482 2483 // Any prop that has a default prop becomes optional, but its type is unchanged 2484 // Undeclared default props are augmented into the resulting allowable attributes 2485 // If declared props have indexed properties, ignore default props entirely as keyof gets widened 2486 // Wrap in an outer-level conditional type to allow distribution over props that are unions 2487 type Defaultize<P, D> = P extends any 2488 ? string extends keyof P ? P : 2489 & Pick<P, Exclude<keyof P, keyof D>> 2490 & Partial<Pick<P, Extract<keyof P, keyof D>>> 2491 & Partial<Pick<D, Exclude<keyof D, keyof P>>> 2492 : never; 2493 2494 global { 2495 namespace JSX { 2496 // tslint:disable-next-line:no-empty-interface 2497 interface Element extends React.ReactElement<any> { } 2498 interface ElementClass extends React.Component<any> { 2499 render(): React.ReactNode; 2500 } 2501 interface ElementAttributesProperty { props: {}; } 2502 interface ElementChildrenAttribute { children: {}; } 2503 2504 type LibraryManagedAttributes<C, P> = C extends { propTypes: infer T; defaultProps: infer D; } 2505 ? Defaultize<MergePropTypes<P, PropTypes.InferProps<T>>, D> 2506 : C extends { propTypes: infer T; } 2507 ? MergePropTypes<P, PropTypes.InferProps<T>> 2508 : C extends { defaultProps: infer D; } 2509 ? Defaultize<P, D> 2510 : P; 2511 2512 // tslint:disable-next-line:no-empty-interface 2513 interface IntrinsicAttributes extends React.Attributes { } 2514 // tslint:disable-next-line:no-empty-interface 2515 interface IntrinsicClassAttributes<T> extends React.ClassAttributes<T> { } 2516 2517 interface IntrinsicElements { 2518 // HTML 2519 a: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>; 2520 abbr: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2521 address: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2522 area: React.DetailedHTMLProps<React.AreaHTMLAttributes<HTMLAreaElement>, HTMLAreaElement>; 2523 article: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2524 aside: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2525 audio: React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>; 2526 b: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2527 base: React.DetailedHTMLProps<React.BaseHTMLAttributes<HTMLBaseElement>, HTMLBaseElement>; 2528 bdi: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2529 bdo: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2530 big: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2531 blockquote: React.DetailedHTMLProps<React.BlockquoteHTMLAttributes<HTMLElement>, HTMLElement>; 2532 body: React.DetailedHTMLProps<React.HTMLAttributes<HTMLBodyElement>, HTMLBodyElement>; 2533 br: React.DetailedHTMLProps<React.HTMLAttributes<HTMLBRElement>, HTMLBRElement>; 2534 button: React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>; 2535 canvas: React.DetailedHTMLProps<React.CanvasHTMLAttributes<HTMLCanvasElement>, HTMLCanvasElement>; 2536 caption: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2537 cite: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2538 code: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2539 col: React.DetailedHTMLProps<React.ColHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>; 2540 colgroup: React.DetailedHTMLProps<React.ColgroupHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>; 2541 data: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2542 datalist: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDataListElement>, HTMLDataListElement>; 2543 dd: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2544 del: React.DetailedHTMLProps<React.DelHTMLAttributes<HTMLElement>, HTMLElement>; 2545 details: React.DetailedHTMLProps<React.DetailsHTMLAttributes<HTMLElement>, HTMLElement>; 2546 dfn: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2547 dialog: React.DetailedHTMLProps<React.DialogHTMLAttributes<HTMLDialogElement>, HTMLDialogElement>; 2548 div: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>; 2549 dl: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDListElement>, HTMLDListElement>; 2550 dt: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2551 em: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2552 embed: React.DetailedHTMLProps<React.EmbedHTMLAttributes<HTMLEmbedElement>, HTMLEmbedElement>; 2553 fieldset: React.DetailedHTMLProps<React.FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>; 2554 figcaption: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2555 figure: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2556 footer: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2557 form: React.DetailedHTMLProps<React.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>; 2558 h1: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>; 2559 h2: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>; 2560 h3: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>; 2561 h4: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>; 2562 h5: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>; 2563 h6: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>; 2564 head: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadElement>, HTMLHeadElement>; 2565 header: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2566 hgroup: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2567 hr: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHRElement>, HTMLHRElement>; 2568 html: React.DetailedHTMLProps<React.HtmlHTMLAttributes<HTMLHtmlElement>, HTMLHtmlElement>; 2569 i: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2570 iframe: React.DetailedHTMLProps<React.IframeHTMLAttributes<HTMLIFrameElement>, HTMLIFrameElement>; 2571 img: React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>; 2572 input: React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>; 2573 ins: React.DetailedHTMLProps<React.InsHTMLAttributes<HTMLModElement>, HTMLModElement>; 2574 kbd: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2575 keygen: React.DetailedHTMLProps<React.KeygenHTMLAttributes<HTMLElement>, HTMLElement>; 2576 label: React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>; 2577 legend: React.DetailedHTMLProps<React.HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>; 2578 li: React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>; 2579 link: React.DetailedHTMLProps<React.LinkHTMLAttributes<HTMLLinkElement>, HTMLLinkElement>; 2580 main: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2581 map: React.DetailedHTMLProps<React.MapHTMLAttributes<HTMLMapElement>, HTMLMapElement>; 2582 mark: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2583 menu: React.DetailedHTMLProps<React.MenuHTMLAttributes<HTMLElement>, HTMLElement>; 2584 menuitem: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2585 meta: React.DetailedHTMLProps<React.MetaHTMLAttributes<HTMLMetaElement>, HTMLMetaElement>; 2586 meter: React.DetailedHTMLProps<React.MeterHTMLAttributes<HTMLElement>, HTMLElement>; 2587 nav: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2588 noindex: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2589 noscript: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2590 object: React.DetailedHTMLProps<React.ObjectHTMLAttributes<HTMLObjectElement>, HTMLObjectElement>; 2591 ol: React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>; 2592 optgroup: React.DetailedHTMLProps<React.OptgroupHTMLAttributes<HTMLOptGroupElement>, HTMLOptGroupElement>; 2593 option: React.DetailedHTMLProps<React.OptionHTMLAttributes<HTMLOptionElement>, HTMLOptionElement>; 2594 output: React.DetailedHTMLProps<React.OutputHTMLAttributes<HTMLElement>, HTMLElement>; 2595 p: React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>; 2596 param: React.DetailedHTMLProps<React.ParamHTMLAttributes<HTMLParamElement>, HTMLParamElement>; 2597 picture: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2598 pre: React.DetailedHTMLProps<React.HTMLAttributes<HTMLPreElement>, HTMLPreElement>; 2599 progress: React.DetailedHTMLProps<React.ProgressHTMLAttributes<HTMLProgressElement>, HTMLProgressElement>; 2600 q: React.DetailedHTMLProps<React.QuoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>; 2601 rp: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2602 rt: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2603 ruby: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2604 s: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2605 samp: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2606 script: React.DetailedHTMLProps<React.ScriptHTMLAttributes<HTMLScriptElement>, HTMLScriptElement>; 2607 section: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2608 select: React.DetailedHTMLProps<React.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>; 2609 small: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2610 source: React.DetailedHTMLProps<React.SourceHTMLAttributes<HTMLSourceElement>, HTMLSourceElement>; 2611 span: React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>; 2612 strong: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2613 style: React.DetailedHTMLProps<React.StyleHTMLAttributes<HTMLStyleElement>, HTMLStyleElement>; 2614 sub: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2615 summary: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2616 sup: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2617 table: React.DetailedHTMLProps<React.TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>; 2618 tbody: React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>; 2619 td: React.DetailedHTMLProps<React.TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>; 2620 textarea: React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>; 2621 tfoot: React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>; 2622 th: React.DetailedHTMLProps<React.ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>; 2623 thead: React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>; 2624 time: React.DetailedHTMLProps<React.TimeHTMLAttributes<HTMLElement>, HTMLElement>; 2625 title: React.DetailedHTMLProps<React.HTMLAttributes<HTMLTitleElement>, HTMLTitleElement>; 2626 tr: React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>; 2627 track: React.DetailedHTMLProps<React.TrackHTMLAttributes<HTMLTrackElement>, HTMLTrackElement>; 2628 u: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2629 ul: React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>; 2630 "var": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2631 video: React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>; 2632 wbr: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>; 2633 webview: React.DetailedHTMLProps<React.WebViewHTMLAttributes<HTMLWebViewElement>, HTMLWebViewElement>; 2634 2635 // SVG 2636 svg: React.SVGProps<SVGSVGElement>; 2637 2638 animate: React.SVGProps<SVGElement>; // TODO: It is SVGAnimateElement but is not in TypeScript's lib.dom.d.ts for now. 2639 animateTransform: React.SVGProps<SVGElement>; // TODO: It is SVGAnimateTransformElement but is not in TypeScript's lib.dom.d.ts for now. 2640 circle: React.SVGProps<SVGCircleElement>; 2641 clipPath: React.SVGProps<SVGClipPathElement>; 2642 defs: React.SVGProps<SVGDefsElement>; 2643 desc: React.SVGProps<SVGDescElement>; 2644 ellipse: React.SVGProps<SVGEllipseElement>; 2645 feBlend: React.SVGProps<SVGFEBlendElement>; 2646 feColorMatrix: React.SVGProps<SVGFEColorMatrixElement>; 2647 feComponentTransfer: React.SVGProps<SVGFEComponentTransferElement>; 2648 feComposite: React.SVGProps<SVGFECompositeElement>; 2649 feConvolveMatrix: React.SVGProps<SVGFEConvolveMatrixElement>; 2650 feDiffuseLighting: React.SVGProps<SVGFEDiffuseLightingElement>; 2651 feDisplacementMap: React.SVGProps<SVGFEDisplacementMapElement>; 2652 feDistantLight: React.SVGProps<SVGFEDistantLightElement>; 2653 feFlood: React.SVGProps<SVGFEFloodElement>; 2654 feFuncA: React.SVGProps<SVGFEFuncAElement>; 2655 feFuncB: React.SVGProps<SVGFEFuncBElement>; 2656 feFuncG: React.SVGProps<SVGFEFuncGElement>; 2657 feFuncR: React.SVGProps<SVGFEFuncRElement>; 2658 feGaussianBlur: React.SVGProps<SVGFEGaussianBlurElement>; 2659 feImage: React.SVGProps<SVGFEImageElement>; 2660 feMerge: React.SVGProps<SVGFEMergeElement>; 2661 feMergeNode: React.SVGProps<SVGFEMergeNodeElement>; 2662 feMorphology: React.SVGProps<SVGFEMorphologyElement>; 2663 feOffset: React.SVGProps<SVGFEOffsetElement>; 2664 fePointLight: React.SVGProps<SVGFEPointLightElement>; 2665 feSpecularLighting: React.SVGProps<SVGFESpecularLightingElement>; 2666 feSpotLight: React.SVGProps<SVGFESpotLightElement>; 2667 feTile: React.SVGProps<SVGFETileElement>; 2668 feTurbulence: React.SVGProps<SVGFETurbulenceElement>; 2669 filter: React.SVGProps<SVGFilterElement>; 2670 foreignObject: React.SVGProps<SVGForeignObjectElement>; 2671 g: React.SVGProps<SVGGElement>; 2672 image: React.SVGProps<SVGImageElement>; 2673 line: React.SVGProps<SVGLineElement>; 2674 linearGradient: React.SVGProps<SVGLinearGradientElement>; 2675 marker: React.SVGProps<SVGMarkerElement>; 2676 mask: React.SVGProps<SVGMaskElement>; 2677 metadata: React.SVGProps<SVGMetadataElement>; 2678 path: React.SVGProps<SVGPathElement>; 2679 pattern: React.SVGProps<SVGPatternElement>; 2680 polygon: React.SVGProps<SVGPolygonElement>; 2681 polyline: React.SVGProps<SVGPolylineElement>; 2682 radialGradient: React.SVGProps<SVGRadialGradientElement>; 2683 rect: React.SVGProps<SVGRectElement>; 2684 stop: React.SVGProps<SVGStopElement>; 2685 switch: React.SVGProps<SVGSwitchElement>; 2686 symbol: React.SVGProps<SVGSymbolElement>; 2687 text: React.SVGProps<SVGTextElement>; 2688 textPath: React.SVGProps<SVGTextPathElement>; 2689 tspan: React.SVGProps<SVGTSpanElement>; 2690 use: React.SVGProps<SVGUseElement>; 2691 view: React.SVGProps<SVGViewElement>; 2692 } 2693 } 2694 } 2695} 2696 2697declare module "react/jsx-runtime" { 2698 import * as React from "react"; 2699 export function jsx(...args: any): React.ReactElement<any>; 2700 export function jsxs(...args: any): React.ReactElement<any>; 2701 export import Fragment = React.Fragment; 2702} 2703 2704 2705declare module "react/jsx-dev-runtime" { 2706 import * as React from "react"; 2707 export function jsxDEV(...args: any): React.ReactElement<any>; 2708 export import Fragment = React.Fragment; 2709} 2710