Skip to content

Commit

Permalink
Merge pull request #3 from furey/patch/fromto-type-fix
Browse files Browse the repository at this point in the history
Patched Incorrect Type Name
  • Loading branch information
tsmx committed Jun 5, 2023
2 parents f3d61de + 82bb2f7 commit 45e4509
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion human-readable.d.ts
Expand Up @@ -11,7 +11,7 @@ export type HRSizeType = "BYTE" | "KBYTE" | "MBYTE" | "TBYTE" | "PBYTE";

export function fromBytes(bytes: number, options: HROptionsType): string;

export function calcFromTo(
export function fromTo(
bytes: number,
fromSize: HRSizeType,
toSize: HRSizeType,
Expand Down
4 changes: 2 additions & 2 deletions test/human-readable.test-d.ts
@@ -1,5 +1,5 @@
import { expectType } from 'tsd';
import { availableSizes, fromBytes, calcFromTo, HROptionsType } from '../human-readable';
import { availableSizes, fromBytes, fromTo, HROptionsType } from '../human-readable';

const testOptions: HROptionsType = {
mode: 'IEC',
Expand All @@ -10,4 +10,4 @@ expectType<string[]>(availableSizes());

expectType<string>(fromBytes(1024, testOptions));

expectType<string>(calcFromTo(1024, 'KBYTE', 'MBYTE', undefined));
expectType<string>(fromTo(1024, 'KBYTE', 'MBYTE', undefined));

0 comments on commit 45e4509

Please sign in to comment.