1 | import * as React from "react";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | export declare abstract class AbstractComponent<P, S> extends React.Component<P, S> {
|
9 |
|
10 | protected displayName: never;
|
11 | private timeoutIds;
|
12 | constructor(props: P, context?: any);
|
13 | componentWillReceiveProps(nextProps: P & {
|
14 | children?: React.ReactNode;
|
15 | }): void;
|
16 | componentWillUnmount(): void;
|
17 | /**
|
18 | * Set a timeout and remember its ID.
|
19 | * All stored timeouts will be cleared when component unmounts.
|
20 | *
|
21 | * @returns a "cancel" function that will clear timeout when invoked.
|
22 | */
|
23 | setTimeout(callback: () => void, timeout?: number): () => void;
|
24 | /**
|
25 | * Clear all known timeouts.
|
26 | */
|
27 | clearTimeouts: () => void;
|
28 | /**
|
29 | * Ensures that the props specified for a component are valid.
|
30 | * Implementations should check that props are valid and usually throw an Error if they are not.
|
31 | * Implementations should not duplicate checks that the type system already guarantees.
|
32 | *
|
33 | * This method should be used instead of React's
|
34 | * [propTypes](https:
|
35 | * Like propTypes, these runtime checks run only in development mode.
|
36 | */
|
37 | protected validateProps(_: P & {
|
38 | children?: React.ReactNode;
|
39 | }): void;
|
40 | }
|
41 |
|
\ | No newline at end of file |