TypeScript Best Practices
// Some code
```typescript
function createDate(timestamp:number):Date;
function createDate(month:number,day: number, year: number): Date;
function createDate(monthOrTimestamp: number, day?:number,year?: number){
return day === undefined || year === undefined
? new Date(monthOrTimestamp)
: new Date(year, monthOrTimestamp, day);
}
console.log(createDate(554356800));
console.log(createDate(12,27,1987));
```Last updated