Fix optional argument (#37708)

This commit is contained in:
Miro Yovchev 2019-08-22 18:27:57 +03:00 committed by Sheetal Nandi
parent f478ae00c2
commit 292fbe1496
2 changed files with 3 additions and 1 deletions

View File

@ -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);

View File

@ -1,6 +1,7 @@
// Type definitions for hat 0.0
// Project: https://github.com/substack/node-hat
// Definitions by: Sasha Grin <https://github.com/tup1tsa>
// Miro Yovchev <https://github.com/myovchev>
// 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;
}