Skip to content

Commit

Permalink
Add definition for pretty-bytes (flow-typed#1491)
Browse files Browse the repository at this point in the history
  • Loading branch information
callumlocke authored and gantoine committed Nov 8, 2017
1 parent d42cbef commit d7ad169
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
declare module "pretty-bytes" {
declare module.exports: (num: number) => string;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const prettyBytes = require("pretty-bytes");

(prettyBytes(123): string);

// $ExpectError
prettyBytes("123");

// $ExpectError
prettyBytes(true);

0 comments on commit d7ad169

Please sign in to comment.