Skip to content

Commit

Permalink
Fix TypeScript typing of bigints (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
DASPRiD committed May 17, 2020
1 parent 91c50f0 commit 8b1778d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ declare const fnv1a: {
//=> 13487074350300261116944693128525960095n
```
*/
bigInt(string: string, options?: fnv1a.Options): BigInt;
bigInt(string: string, options?: fnv1a.Options): bigint;
};

export = fnv1a;
2 changes: 1 addition & 1 deletion index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ import {expectType} from 'tsd';
import fnv1a = require('.');

expectType<number>(fnv1a('πŸ¦„πŸŒˆ'));
expectType<BigInt>(fnv1a.bigInt('πŸ¦„πŸŒˆ', {size: 128}));
expectType<bigint>(fnv1a.bigInt('πŸ¦„πŸŒˆ', {size: 128}));

0 comments on commit 8b1778d

Please sign in to comment.