Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

index.d.ts 19KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769
  1. // Type definitions for systeminformation
  2. // Project: https://github.com/sebhildebrandt/systeminformation
  3. // Definitions by: sebhildebrandt <https://github.com/sebhildebrandt>
  4. export namespace Systeminformation {
  5. // 1. General
  6. interface TimeData {
  7. current: string;
  8. uptime: string;
  9. timezone: string;
  10. timezoneName: string;
  11. }
  12. // 2. System (HW)
  13. interface RaspberryRevisionData {
  14. manufacturer: string;
  15. processor: string;
  16. type: string;
  17. revision: string;
  18. }
  19. interface SystemData {
  20. manufacturer: string;
  21. model: string;
  22. version: string;
  23. serial: string;
  24. uuid: string;
  25. sku: string;
  26. raspberry?: RaspberryRevisionData;
  27. }
  28. interface BiosData {
  29. vendor: string;
  30. version: string;
  31. releaseDate: string;
  32. revision: string;
  33. }
  34. interface BaseboardData {
  35. manufacturer: string;
  36. model: string;
  37. version: string;
  38. serial: string;
  39. assetTag: string;
  40. }
  41. interface ChassisData {
  42. manufacturer: string;
  43. model: string;
  44. type: string;
  45. version: string;
  46. serial: string;
  47. assetTag: string;
  48. sku: string;
  49. }
  50. // 3. CPU, Memory, Disks, Battery, Graphics
  51. interface CpuData {
  52. manufacturer: string;
  53. brand: string;
  54. vendor: string;
  55. family: string;
  56. model: string;
  57. stepping: string;
  58. revision: string;
  59. voltage: string;
  60. speed: string;
  61. speedmin: string;
  62. speedmax: string;
  63. governor: string;
  64. cores: number;
  65. physicalCores: number;
  66. processors: number;
  67. socket: string;
  68. cache: CpuCacheData;
  69. }
  70. interface CpuWithFlagsData extends CpuData {
  71. flags: string;
  72. }
  73. interface CpuCacheData {
  74. l1d: number;
  75. l1i: number;
  76. l2: number;
  77. l3: number;
  78. }
  79. interface CpuCurrentSpeedData {
  80. min: number;
  81. max: number;
  82. avg: number;
  83. cores: number[];
  84. }
  85. interface CpuTemperatureData {
  86. main: number;
  87. cores: number[];
  88. max: number;
  89. }
  90. interface MemData {
  91. total: number;
  92. free: number;
  93. used: number;
  94. active: number;
  95. available: number;
  96. buffcache: number;
  97. buffers: number;
  98. cached: number;
  99. slab: number;
  100. swaptotal: number;
  101. swapused: number;
  102. swapfree: number;
  103. }
  104. interface MemLayoutData {
  105. size: number;
  106. bank: string;
  107. type: string;
  108. clockSpeed: number;
  109. formFactor: string;
  110. partNum: string;
  111. serialNum: string;
  112. voltageConfigured: number;
  113. voltageMin: number;
  114. voltageMax: number;
  115. }
  116. interface SmartData {
  117. smartctl: {
  118. version: number[];
  119. platform_info: string;
  120. build_info: string;
  121. argv: string[];
  122. exit_status: number;
  123. };
  124. json_format_version: number[];
  125. device: {
  126. name: string;
  127. info_name: string;
  128. type: string;
  129. protocol: string;
  130. }
  131. smart_status: {
  132. passed: boolean;
  133. }
  134. ata_smart_attributes: {
  135. revision: number;
  136. table: {
  137. id: number;
  138. name: string;
  139. value: number;
  140. worst: number;
  141. thresh: number;
  142. when_failed: string;
  143. flags: {
  144. value: number;
  145. string: string;
  146. prefailure: boolean;
  147. updated_online: boolean;
  148. performance: boolean;
  149. error_rate: boolean;
  150. event_count: boolean;
  151. auto_keep: boolean;
  152. };
  153. raw: { value: number; string: string }
  154. }[];
  155. };
  156. power_on_time: {
  157. hours: number;
  158. };
  159. power_cycle_count: number;
  160. temperature: {
  161. current: number;
  162. };
  163. ata_smart_error_log: {
  164. summary: {
  165. revision: number;
  166. count: number;
  167. };
  168. };
  169. ata_smart_self_test_log: {
  170. standard: {
  171. revision: number;
  172. table: {
  173. type: {
  174. value: number;
  175. string: string;
  176. },
  177. status: {
  178. value: number;
  179. string: string;
  180. passed: boolean;
  181. },
  182. lifetime_hours: number;
  183. }[];
  184. count: number;
  185. error_count_total: number;
  186. error_count_outdated: number;
  187. };
  188. }
  189. }
  190. interface DiskLayoutData {
  191. device: string;
  192. type: string;
  193. name: string;
  194. vendor: string;
  195. size: number;
  196. bytesPerSector: number;
  197. totalCylinders: number;
  198. totalHeads: number;
  199. totalSectors: number;
  200. totalTracks: number;
  201. tracksPerCylinder: number;
  202. sectorsPerTrack: number;
  203. firmwareRevision: string;
  204. serialNum: string;
  205. interfaceType: string;
  206. smartStatus: string;
  207. smartData?: SmartData;
  208. }
  209. interface BatteryData {
  210. hasbattery: boolean;
  211. cyclecount: number;
  212. ischarging: boolean;
  213. voltage: number;
  214. designedcapacity: number;
  215. maxcapacity: number;
  216. currentcapacity: number;
  217. capacityUnit: string;
  218. percent: number;
  219. timeremaining: number,
  220. acconnected: boolean;
  221. type: string;
  222. model: string;
  223. manufacturer: string;
  224. serial: string;
  225. }
  226. interface GraphicsData {
  227. controllers: GraphicsControllerData[];
  228. displays: GraphicsDisplayData[];
  229. }
  230. interface GraphicsControllerData {
  231. vendor: string;
  232. model: string;
  233. bus: string;
  234. vram: number;
  235. vramDynamic: boolean;
  236. }
  237. interface GraphicsDisplayData {
  238. vendor: string;
  239. model: string;
  240. deviceName: string;
  241. main: boolean;
  242. builtin: boolean;
  243. connection: string;
  244. sizex: number;
  245. sizey: number;
  246. pixeldepth: number;
  247. resolutionx: number;
  248. resolutiony: number;
  249. currentResX: number;
  250. currentResY: number;
  251. positionX: number;
  252. positionY: number;
  253. currentRefreshRate: number;
  254. }
  255. // 4. Operating System
  256. interface OsData {
  257. platform: string;
  258. distro: string;
  259. release: string;
  260. codename: string;
  261. kernel: string;
  262. arch: string;
  263. hostname: string;
  264. codepage: string;
  265. logofile: string;
  266. serial: string;
  267. build: string;
  268. servicepack: string;
  269. uefi: boolean;
  270. }
  271. interface UuidData {
  272. os: string;
  273. }
  274. interface VersionData {
  275. kernel?: string;
  276. openssl?: string;
  277. systemOpenssl?: string;
  278. systemOpensslLib?: string;
  279. node?: string;
  280. v8?: string;
  281. npm?: string;
  282. yarn?: string;
  283. pm2?: string;
  284. gulp?: string;
  285. grunt?: string;
  286. git?: string;
  287. tsc?: string;
  288. mysql?: string;
  289. redis?: string;
  290. mongodb?: string;
  291. nginx?: string;
  292. php?: string;
  293. docker?: string;
  294. postfix?: string;
  295. postgresql?: string;
  296. perl?: string;
  297. python?: string;
  298. python3?: string;
  299. pip?: string;
  300. pip3?: string;
  301. java?: string;
  302. gcc?: string;
  303. virtualbox?: string;
  304. dotnet?: string;
  305. }
  306. interface UserData {
  307. user: string;
  308. tty: string;
  309. date: string;
  310. time: string;
  311. ip: string;
  312. command: string;
  313. }
  314. // 5. File System
  315. interface FsSizeData {
  316. fs: string;
  317. type: string;
  318. size: number;
  319. used: number;
  320. use: number;
  321. mount: string;
  322. }
  323. interface FsOpenFilesData {
  324. max: number;
  325. allocated: number;
  326. available: number;
  327. }
  328. interface BlockDevicesData {
  329. name: string;
  330. identifier: string;
  331. type: string;
  332. fstype: string;
  333. mount: string;
  334. size: number;
  335. physical: string;
  336. uuid: string;
  337. label: string;
  338. model: string;
  339. serial: string;
  340. removable: boolean;
  341. protocol: string;
  342. }
  343. interface FsStatsData {
  344. rx: number;
  345. wx: number;
  346. tx: number;
  347. rx_sec: number;
  348. wx_sec: number;
  349. tx_sec: number;
  350. ms: number;
  351. }
  352. interface DisksIoData {
  353. rIO: number;
  354. wIO: number;
  355. tIO: number;
  356. rIO_sec: number;
  357. wIO_sec: number;
  358. tIO_sec: number;
  359. ms: number;
  360. }
  361. // 6. Network related functions
  362. interface NetworkInterfacesData {
  363. iface: string;
  364. ifaceName: string;
  365. ip4: string;
  366. ip4subnet: string;
  367. ip6: string;
  368. ip6subnet: string;
  369. mac: string;
  370. internal: boolean;
  371. virtual: boolean;
  372. operstate: string;
  373. type: string;
  374. duplex: string;
  375. mtu: number;
  376. speed: number;
  377. dhcp: boolean;
  378. dnsSuffix: string;
  379. ieee8021xAuth: string;
  380. ieee8021xState: string;
  381. carrier_changes: number;
  382. }
  383. interface NetworkStatsData {
  384. iface: string;
  385. operstate: string;
  386. rx_bytes: number;
  387. rx_dropped: number;
  388. rx_errors: number;
  389. tx_bytes: number;
  390. tx_dropped: number;
  391. tx_errors: number;
  392. rx_sec: number;
  393. tx_sec: number;
  394. ms: number;
  395. }
  396. interface NetworkConnectionsData {
  397. protocol: string;
  398. localaddress: string;
  399. localport: string;
  400. peeraddress: string;
  401. peerport: string;
  402. state: string;
  403. pid: number;
  404. process: string;
  405. }
  406. interface InetChecksiteData {
  407. url: string;
  408. ok: boolean;
  409. status: number;
  410. ms: number;
  411. }
  412. interface WifiNetworkData {
  413. ssid: string;
  414. bssid: string;
  415. mode: string;
  416. channel: number;
  417. frequency: number;
  418. signalLevel: number;
  419. quality: number;
  420. security: string[];
  421. wpaFlags: string[];
  422. rsnFlags: string[];
  423. }
  424. // 7. Current Load, Processes & Services
  425. interface CurrentLoadData {
  426. avgload: number;
  427. currentload: number;
  428. currentload_user: number;
  429. currentload_system: number;
  430. currentload_nice: number;
  431. currentload_idle: number;
  432. currentload_irq: number;
  433. raw_currentload: number;
  434. raw_currentload_user: number;
  435. raw_currentload_system: number;
  436. raw_currentload_nice: number;
  437. raw_currentload_idle: number;
  438. raw_currentload_irq: number;
  439. cpus: CurrentLoadCpuData[];
  440. }
  441. interface CurrentLoadCpuData {
  442. load: number;
  443. load_user: number;
  444. load_system: number;
  445. load_nice: number;
  446. load_idle: number;
  447. load_irq: number;
  448. raw_load: number;
  449. raw_load_user: number;
  450. raw_load_system: number;
  451. raw_load_nice: number;
  452. raw_load_idle: number;
  453. raw_load_irq: number;
  454. }
  455. interface ProcessesData {
  456. all: number;
  457. running: number;
  458. blocked: number;
  459. sleeping: number;
  460. unknown: number;
  461. list: ProcessesProcessData[];
  462. }
  463. interface ProcessesProcessData {
  464. pid: number;
  465. parentPid: number;
  466. name: string,
  467. pcpu: number;
  468. pcpuu: number;
  469. pcpus: number;
  470. pmem: number;
  471. priority: number;
  472. mem_vsz: number;
  473. mem_rss: number;
  474. nice: number;
  475. started: string,
  476. state: string;
  477. tty: string;
  478. user: string;
  479. command: string;
  480. params: string;
  481. path: string;
  482. }
  483. interface ProcessesProcessLoadData {
  484. proc: string;
  485. pid: number;
  486. pids: number[];
  487. cpu: number;
  488. mem: number;
  489. }
  490. interface ServicesData {
  491. name: string;
  492. running: boolean;
  493. startmode: string;
  494. pids: number[];
  495. pcpu: number;
  496. pmem: number;
  497. }
  498. // 8. Docker
  499. interface DockerInfoData {
  500. id: string;
  501. containers: number;
  502. containersRunning: number;
  503. containersPaused: number;
  504. containersStopped: number;
  505. images: number;
  506. driver: string;
  507. memoryLimit: boolean;
  508. swapLimit: boolean;
  509. kernelMemory: boolean;
  510. cpuCfsPeriod: boolean;
  511. cpuCfsQuota: boolean;
  512. cpuShares: boolean;
  513. cpuSet: boolean;
  514. ipv4Forwarding: boolean;
  515. bridgeNfIptables: boolean;
  516. bridgeNfIp6tables: boolean;
  517. debug: boolean;
  518. mfd: number;
  519. oomKillDisable: boolean;
  520. ngoroutines: number;
  521. systemTime: string;
  522. loggingDriver: string;
  523. cgroupDriver: string;
  524. nEventsListener: number;
  525. kernelVersion: string;
  526. operatingSystem: string;
  527. osType: string;
  528. architecture: string;
  529. ncpu: number;
  530. memTotal: number;
  531. dockerRootDir: string;
  532. httpProxy: string;
  533. httpsProxy: string;
  534. noProxy: string;
  535. name: string;
  536. labels: string[];
  537. experimentalBuild: boolean;
  538. serverVersion: string;
  539. clusterStore: string;
  540. clusterAdvertise: string;
  541. defaultRuntime: string;
  542. liveRestoreEnabled: boolean;
  543. isolation: string;
  544. initBinary: string;
  545. productLicense: string;
  546. }
  547. interface DockerContainerData {
  548. id: string;
  549. name: string;
  550. image: string;
  551. imageID: string;
  552. command: string;
  553. created: number;
  554. started: number;
  555. finished: number;
  556. createdAt: string;
  557. startedAt: string;
  558. finishedAt: string;
  559. state: string;
  560. restartCount: number;
  561. platform: string;
  562. driver: string;
  563. ports: number[];
  564. mounts: DockerContainerMountData[];
  565. }
  566. interface DockerContainerMountData {
  567. Type: string;
  568. Source: string;
  569. Destination: string;
  570. Mode: string;
  571. RW: boolean;
  572. Propagation: string;
  573. }
  574. interface DockerContainerStatsData {
  575. id: string;
  576. mem_usage: number;
  577. mem_limit: number;
  578. mem_percent: number;
  579. cpu_percent: number;
  580. netIO: {
  581. rx: number;
  582. wx: number;
  583. };
  584. blockIO: {
  585. r: number;
  586. w: number;
  587. };
  588. restartCount: number;
  589. cpu_stats: any;
  590. precpu_stats: any;
  591. memory_stats: any,
  592. networks: any;
  593. }
  594. // 9. Virtual Box
  595. interface VboxInfoData {
  596. id: string;
  597. name: string;
  598. running: boolean;
  599. started: string;
  600. runningSince: number;
  601. stopped: string;
  602. stoppedSince: number;
  603. guestOS: string;
  604. hardwareUUID: string;
  605. memory: number;
  606. vram: number;
  607. cpus: number;
  608. cpuExepCap: string;
  609. cpuProfile: string;
  610. chipset: string;
  611. firmware: string;
  612. pageFusion: boolean;
  613. configFile: string;
  614. snapshotFolder: string;
  615. logFolder: string;
  616. HPET: boolean;
  617. PAE: boolean;
  618. longMode: boolean;
  619. tripleFaultReset: boolean;
  620. APIC: boolean;
  621. X2APIC: boolean;
  622. ACPI: boolean;
  623. IOAPIC: boolean;
  624. biosAPICmode: string;
  625. bootMenuMode: string;
  626. bootDevice1: string;
  627. bootDevice2: string;
  628. bootDevice3: string;
  629. bootDevice4: string;
  630. timeOffset: string;
  631. RTC: string;
  632. }
  633. // 10. "Get All at once" - functions
  634. interface StaticData {
  635. version: string;
  636. system: SystemData;
  637. bios: BiosData;
  638. baseboard: BaseboardData;
  639. chassis: ChassisData;
  640. os: OsData;
  641. uuid: UuidData;
  642. versions: VersionData;
  643. cpu: CpuWithFlagsData;
  644. graphics: GraphicsData;
  645. net: NetworkInterfacesData[];
  646. memLayout: MemLayoutData[];
  647. diskLayout: DiskLayoutData[];
  648. }
  649. }
  650. export function version(): string;
  651. export function system(cb?: (data: Systeminformation.SystemData) => any): Promise<Systeminformation.SystemData>;
  652. export function bios(cb?: (data: Systeminformation.BiosData) => any): Promise<Systeminformation.BiosData>;
  653. export function baseboard(cb?: (data: Systeminformation.BaseboardData) => any): Promise<Systeminformation.BaseboardData>;
  654. export function chassis(cb?: (data: Systeminformation.ChassisData) => any): Promise<Systeminformation.ChassisData>;
  655. export function time(): Systeminformation.TimeData;
  656. export function osInfo(cb?: (data: Systeminformation.OsData) => any): Promise<Systeminformation.OsData>;
  657. export function versions(apps?: string, cb?: (data: Systeminformation.VersionData) => any): Promise<Systeminformation.VersionData>;
  658. export function shell(cb?: (data: string) => any): Promise<string>;
  659. export function uuid(cb?: (data: Systeminformation.UuidData) => any): Promise<Systeminformation.UuidData>;
  660. export function cpu(cb?: (data: Systeminformation.CpuData) => any): Promise<Systeminformation.CpuData>;
  661. export function cpuFlags(cb?: (data: string) => any): Promise<string>;
  662. export function cpuCache(cb?: (data: Systeminformation.CpuCacheData) => any): Promise<Systeminformation.CpuCacheData>;
  663. export function cpuCurrentspeed(cb?: (data: Systeminformation.CpuCurrentSpeedData) => any): Promise<Systeminformation.CpuCurrentSpeedData>;
  664. export function cpuTemperature(cb?: (data: Systeminformation.CpuTemperatureData) => any): Promise<Systeminformation.CpuTemperatureData>;
  665. export function currentLoad(cb?: (data: Systeminformation.CurrentLoadData) => any): Promise<Systeminformation.CurrentLoadData>;
  666. export function fullLoad(cb?: (data: number) => any): Promise<number>;
  667. export function mem(cb?: (data: Systeminformation.MemData) => any): Promise<Systeminformation.MemData>;
  668. export function memLayout(cb?: (data: Systeminformation.MemLayoutData[]) => any): Promise<Systeminformation.MemLayoutData[]>;
  669. export function battery(cb?: (data: Systeminformation.BatteryData) => any): Promise<Systeminformation.BatteryData>;
  670. export function graphics(cb?: (data: Systeminformation.GraphicsData) => any): Promise<Systeminformation.GraphicsData>;
  671. export function fsSize(cb?: (data: Systeminformation.FsSizeData[]) => any): Promise<Systeminformation.FsSizeData[]>;
  672. export function fsOpenFiles(cb?: (data: Systeminformation.FsOpenFilesData[]) => any): Promise<Systeminformation.FsOpenFilesData[]>;
  673. export function blockDevices(cb?: (data: Systeminformation.BlockDevicesData[]) => any): Promise<Systeminformation.BlockDevicesData[]>;
  674. export function fsStats(cb?: (data: Systeminformation.FsStatsData) => any): Promise<Systeminformation.FsStatsData>;
  675. export function disksIO(cb?: (data: Systeminformation.DisksIoData) => any): Promise<Systeminformation.DisksIoData>;
  676. export function diskLayout(cb?: (data: Systeminformation.DiskLayoutData[]) => any): Promise<Systeminformation.DiskLayoutData[]>;
  677. export function networkInterfaceDefault(cb?: (data: string) => any): Promise<string>;
  678. export function networkGatewayDefault(cb?: (data: string) => any): Promise<string>;
  679. export function networkInterfaces(cb?: (data: Systeminformation.NetworkInterfacesData[]) => any): Promise<Systeminformation.NetworkInterfacesData[]>;
  680. export function networkStats(ifaces?: string, cb?: (data: Systeminformation.NetworkStatsData[]) => any): Promise<Systeminformation.NetworkStatsData[]>;
  681. export function networkConnections(cb?: (data: Systeminformation.NetworkConnectionsData[]) => any): Promise<Systeminformation.NetworkConnectionsData[]>;
  682. export function inetChecksite(url: string, cb?: (data: Systeminformation.InetChecksiteData) => any): Promise<Systeminformation.InetChecksiteData>;
  683. export function inetLatency(host?: string, cb?: (data: number) => any): Promise<number>;
  684. export function wifiNetworks(cb?: (data: Systeminformation.WifiNetworkData[]) => any): Promise<Systeminformation.WifiNetworkData[]>;
  685. export function users(cb?: (data: Systeminformation.UserData[]) => any): Promise<Systeminformation.UserData[]>;
  686. export function processes(cb?: (data: Systeminformation.ProcessesData) => any): Promise<Systeminformation.ProcessesData>;
  687. export function processLoad(processName: string, cb?: (data: Systeminformation.ProcessesProcessLoadData) => any): Promise<Systeminformation.ProcessesProcessLoadData>;
  688. export function services(serviceName: string, cb?: (data: Systeminformation.ServicesData[]) => any): Promise<Systeminformation.ServicesData[]>;
  689. export function dockerInfo(cb?: (data: Systeminformation.DockerInfoData) => any): Promise<Systeminformation.DockerInfoData>;
  690. export function dockerContainers(all?: boolean, cb?: (data: Systeminformation.DockerContainerData[]) => any): Promise<Systeminformation.DockerContainerData[]>;
  691. export function dockerContainerStats(id?: string, cb?: (data: Systeminformation.DockerContainerStatsData[]) => any): Promise<Systeminformation.DockerContainerStatsData[]>;
  692. export function dockerContainerProcesses(id?: string, cb?: (data: any) => any): Promise<any>;
  693. export function dockerAll(cb?: (data: any) => any): Promise<any>;
  694. export function vboxInfo(cb?: (data: Systeminformation.VboxInfoData[]) => any): Promise<Systeminformation.VboxInfoData[]>;
  695. export function getStaticData(cb?: (data: Systeminformation.StaticData) => any): Promise<Systeminformation.StaticData>;
  696. export function getDynamicData(srv?: string, iface?: string, cb?: (data: any) => any): Promise<any>;
  697. export function getAllData(srv?: string, iface?: string, cb?: (data: any) => any): Promise<any>;
  698. export function get(valuesObject: any, cb?: (data: any) => any): Promise<any>;
  699. export function observe(valuesObject: any, interval: number, cb?: (data: any) => any): number;