1717// Ferdy Budhidharma <https://github.com/ferdaber>
1818// Johann Rakotoharisoa <https://github.com/jrakotoharisoa>
1919// Olivier Pascal <https://github.com/pascaloliv>
20+ // Martin Hochel <https://github.com/hotell>
2021// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
2122// TypeScript Version: 2.6
2223
@@ -281,13 +282,18 @@ declare namespace React {
281282 // tslint:disable-next-line:no-empty-interface
282283 interface Component < P = { } , S = { } , SS = any > extends ComponentLifecycle < P , S , SS > { }
283284 class Component < P , S > {
285+ constructor ( props : Readonly < P > ) ;
286+ /**
287+ * @deprecated
288+ * https://reactjs.org/docs/legacy-context.html
289+ */
284290 constructor ( props : P , context ?: any ) ;
285291
286292 // We MUST keep setState() as a unified signature because it allows proper checking of the method return type.
287293 // See: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/18365#issuecomment-351013257
288294 // Also, the ` | S` allows intellisense to not be dumbisense
289295 setState < K extends keyof S > (
290- state : ( ( prevState : Readonly < S > , props : P ) => ( Pick < S , K > | S | null ) ) | ( Pick < S , K > | S | null ) ,
296+ state : ( ( prevState : Readonly < S > , props : Readonly < P > ) => ( Pick < S , K > | S | null ) ) | ( Pick < S , K > | S | null ) ,
291297 callback ?: ( ) => void
292298 ) : void ;
293299
@@ -299,9 +305,17 @@ declare namespace React {
299305 // always pass children as variadic arguments to `createElement`.
300306 // In the future, if we can define its call signature conditionally
301307 // on the existence of `children` in `P`, then we should remove this.
302- props : Readonly < { children ?: ReactNode } > & Readonly < P > ;
303- state : Readonly < S > ;
308+ readonly props : Readonly < { children ?: ReactNode } > & Readonly < P > ;
309+ readonly state : null | Readonly < S > ;
310+ /**
311+ * @deprecated
312+ * https://reactjs.org/docs/legacy-context.html
313+ */
304314 context : any ;
315+ /**
316+ * @deprecated
317+ * https://reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs
318+ */
305319 refs : {
306320 [ key : string ] : ReactInstance
307321 } ;
0 commit comments