Skip to content

Commit

Permalink
Fix constants typings (date-fns#2791)
Browse files Browse the repository at this point in the history
Fixed constants not having proper TypeScript and Flow types.
  • Loading branch information
JuanM04 authored Nov 29, 2021
1 parent fab57a9 commit 9c5299c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/constants/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
export const daysInWeek: number
export const maxTime: number
export const millisecondsInMinute: number
export const millisecondsInHour: number
export const millisecondsInSecond: number
export const minTime: number
export const minutesInHour: number
export const monthsInQuarter: number
export const monthsInYear: number
export const quartersInYear: number
export const secondsInHour: number
export const secondsInMinute: number
10 changes: 10 additions & 0 deletions src/constants/index.js.flow
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
// @flow

declare export var daysInWeek: number
declare export var maxTime: number
declare export var millisecondsInMinute: number
declare export var millisecondsInHour: number
declare export var millisecondsInSecond: number
declare export var minTime: number
declare export var minutesInHour: number
declare export var monthsInQuarter: number
declare export var monthsInYear: number
declare export var quartersInYear: number
declare export var secondsInHour: number
declare export var secondsInMinute: number

0 comments on commit 9c5299c

Please sign in to comment.