-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.d.ts
46 lines (46 loc) · 1.31 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/**
* @file index.ts
* @author imcuttle
*
*/
/// <reference types="node" />
import * as React from 'react'
import { EventEmitter } from 'events'
import * as PropTypes from 'prop-types'
import { ClassAttributes } from 'react'
export type InputType = {
newValue?: string
oldValue?: string
}
export declare function bindKeepAliveLifeCycle<T extends React.ComponentType>(Component: T): T
export type KeepAlivePropsTypes = {
uniqKey: string
disabled?: boolean
} & ClassAttributes<KeepAlive>
export type KeepAlivePropsState = {
components: {}
}
export default class KeepAlive extends React.PureComponent<KeepAlivePropsTypes, KeepAlivePropsState> {
static propTypes: {
uniqKey: PropTypes.Validator<string>
}
emitter: EventEmitter
static childContextTypes: {
getPrevUniqKey: PropTypes.Requireable<(...args: any[]) => any>
uniqKey: PropTypes.Requireable<string>
disabled: PropTypes.Requireable<boolean>
emitter: PropTypes.Requireable<any>
}
constructor(props: any, context: any)
getChildContext(): {
getPrevUniqKey: () => string
disabled: boolean
uniqKey: string
emitter: EventEmitter
}
UNSAFE_componentWillReceiveProps(nextProps: any): void
prevUniqKey: string
UNSAFE_componentWillUpdate(next: any): void
componentDidUpdate(prev: any): void
render(): React.JSX.Element
}