LegacyContext.d.ts 878 B

123456789101112131415161718192021222324
  1. import * as React from 'react';
  2. import type { DataEntity, IconType } from 'rc-tree/lib/interface';
  3. import type { LegacyDataNode, SafeKey, Key } from './interface';
  4. interface LegacyContextProps {
  5. checkable: boolean | React.ReactNode;
  6. checkedKeys: Key[];
  7. halfCheckedKeys: Key[];
  8. treeExpandedKeys: Key[];
  9. treeDefaultExpandedKeys: Key[];
  10. onTreeExpand: (keys: Key[]) => void;
  11. treeDefaultExpandAll: boolean;
  12. treeIcon: IconType;
  13. showTreeIcon: boolean;
  14. switcherIcon: IconType;
  15. treeLine: boolean;
  16. treeNodeFilterProp: string;
  17. treeLoadedKeys: Key[];
  18. treeMotion: any;
  19. loadData: (treeNode: LegacyDataNode) => Promise<unknown>;
  20. onTreeLoad: (loadedKeys: Key[]) => void;
  21. keyEntities: Record<SafeKey, DataEntity<any>>;
  22. }
  23. declare const LegacySelectContext: React.Context<LegacyContextProps>;
  24. export default LegacySelectContext;