You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug day.add does not have valid type safety because of the ManipulateType type
Expected behavior
Passing an invalid unit to dayjs.add will result in a type error.
Information
Day.js Version [1.11.1]
OS: [macOS 12.3.1]
Browser [N/A]
Time zone: [CDT]
Repro:
dayjs().add(4, 'millenniums') // Should result in: Type '"millenniums"' is not assignable to type 'ManipulateType'
// const nope: OpUnitType = 'millenniums'; // ❌ Type '"millenniums"' is not assignable to type 'OpUnitType'
The text was updated successfully, but these errors were encountered:
Describe the bug
day.add
does not have valid type safety because of theManipulateType
typeExpected behavior
Passing an invalid unit to
dayjs.add
will result in a type error.Information
Repro:
The text was updated successfully, but these errors were encountered: