diff --git a/types/hat/hat-tests.ts b/types/hat/hat-tests.ts index 3156a138f0..1ca7aa6415 100644 --- a/types/hat/hat-tests.ts +++ b/types/hat/hat-tests.ts @@ -3,6 +3,7 @@ import hat = require('hat'); const randomId = hat(); const rack = hat.rack(); +rack(); rack('car'); const tractorId = rack('tractor'); rack.get(tractorId); diff --git a/types/hat/index.d.ts b/types/hat/index.d.ts index 58a7bdc983..3088a14f79 100644 --- a/types/hat/index.d.ts +++ b/types/hat/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for hat 0.0 // Project: https://github.com/substack/node-hat // Definitions by: Sasha Grin +// Miro Yovchev // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped interface HatsList { @@ -12,7 +13,7 @@ interface Rack { base: number; hats: HatsList; - (data: any): string; + (data?: any): string; get(id: string): any; set(id: string, value: any): Rack; }