| 1 | /*! |
| 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. |
| 3 | * |
| 4 | * This source code is licensed under the MIT license found in the |
| 5 | * LICENSE file in the root directory of this source tree. |
| 6 | */ |
| 7 | |
| 8 | /** |
| 9 | * TypeScript Definition File for React. |
| 10 | * |
| 11 | * Full type definitions are not yet officially supported. These are mostly |
| 12 | * just helpers for the unit test. |
| 13 | */ |
| 14 | |
| 15 | declare let global: any; |
| 16 | |
| 17 | declare module 'react' { |
| 18 | export class Component { |
| 19 | props: any; |
| 20 | state: any; |
| 21 | context: any; |
| 22 | static name: string; |
| 23 | constructor(props?, context?); |
| 24 | setState(partial : any, callback ?: any) : void; |
| 25 | forceUpdate(callback ?: any) : void; |
| 26 | } |
| 27 | export let PropTypes : any; |
| 28 | export function createElement(tag : any, props ?: any, ...children : any[]) : any |
| 29 | export function createRef(): any; |
| 30 | } |