Skip to content

Commit

Permalink
[misc] Specify length of toArray return type (#5766)
Browse files Browse the repository at this point in the history
  • Loading branch information
mongoose700 authored Oct 29, 2020
1 parent 0dcaaa6 commit 52019f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ts3.1-typing-tests/moment-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ var getMonth: number = moment().month();
var getQuater: number = moment().quarter();
var getYear: number = moment().year();

var date: [number, number, number, number, number, number, number] = moment().toArray();

moment().hours(0).minutes(0).seconds(0).milliseconds(0);

var a3 = moment([2011, 0, 1, 8]);
Expand Down
2 changes: 1 addition & 1 deletion ts3.1-typings/moment.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ declare namespace moment {

diff(b: MomentInput, unitOfTime?: unitOfTime.Diff, precise?: boolean): number;

toArray(): number[];
toArray(): [number, number, number, number, number, number, number];
toDate(): Date;
toISOString(keepOffset?: boolean): string;
inspect(): string;
Expand Down

0 comments on commit 52019f1

Please sign in to comment.