Skip to content

Commit

Permalink
Extend type definitions with overload fsSize(cb)
Browse files Browse the repository at this point in the history
The overload clarifies type checkers that `fsSize` can be called with
just the callback parameter, unlike the preexisting `fsSize(string, cb)`.
  • Loading branch information
Enet4 committed Nov 8, 2024
1 parent 3a92931 commit 0201f40
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -981,6 +981,7 @@ export function battery(cb?: (data: Systeminformation.BatteryData) => any): Prom
export function graphics(cb?: (data: Systeminformation.GraphicsData) => any): Promise<Systeminformation.GraphicsData>;

export function fsSize(drive?: string, cb?: (data: Systeminformation.FsSizeData[]) => any): Promise<Systeminformation.FsSizeData[]>;
export function fsSize(cb?: (data: Systeminformation.FsSizeData[]) => any): Promise<Systeminformation.FsSizeData[]>;
export function fsOpenFiles(cb?: (data: Systeminformation.FsOpenFilesData[]) => any): Promise<Systeminformation.FsOpenFilesData[]>;
export function blockDevices(cb?: (data: Systeminformation.BlockDevicesData[]) => any): Promise<Systeminformation.BlockDevicesData[]>;
export function fsStats(cb?: (data: Systeminformation.FsStatsData) => any): Promise<Systeminformation.FsStatsData>;
Expand Down

0 comments on commit 0201f40

Please sign in to comment.