diff --git a/src/components/KeepAlive.tsx b/src/components/KeepAlive.tsx index f407b86..41120f4 100644 --- a/src/components/KeepAlive.tsx +++ b/src/components/KeepAlive.tsx @@ -4,12 +4,12 @@ import {START_MOUNTING_DOM, LIFECYCLE} from './Provider'; import keepAlive, {COMMAND} from '../utils/keepAliveDecorator'; import changePositionByComment from '../utils/changePositionByComment'; -interface IKeepAliveProps { +type IKeepAliveProps = React.PropsWithChildren<{ key?: string; name?: string; disabled?: boolean; extra?: any; -} +}> interface IKeepAliveInnerProps extends IKeepAliveProps { _container: any; diff --git a/src/components/Provider.tsx b/src/components/Provider.tsx index 43c4d36..3f1a879 100644 --- a/src/components/Provider.tsx +++ b/src/components/Provider.tsx @@ -47,7 +47,7 @@ export interface IKeepAliveProviderProps { max?: number; } -export default class KeepAliveProvider extends React.PureComponent implements IKeepAliveProviderImpl { +export default class KeepAliveProvider extends React.PureComponent> implements IKeepAliveProviderImpl { public static displayName = keepAliveProviderTypeName; public static defaultProps = {