Rationale
I would expect to be able to get the difference between two dates using "week" (or its variants) as unit.
Typescript doesn't let me compile the code because the expected type for the unit parameter is of QUnitType which doesn't hold "week" as a possible value. Also, from the source code we can actually pass one of the "week" variants although the types are not expecting it.
Expected behavior
I would expect to have diff(date: ConfigType, unit: QUnitType | OpUnitType, float?: boolean): number (or similar) instead of diff(date: ConfigType, unit: QUnitType, float?: boolean): number
Information
Rationale
I would expect to be able to get the difference between two dates using "week" (or its variants) as unit.
Typescript doesn't let me compile the code because the expected type for the unit parameter is of
QUnitTypewhich doesn't hold "week" as a possible value. Also, from the source code we can actually pass one of the "week" variants although the types are not expecting it.Expected behavior
I would expect to have
diff(date: ConfigType, unit: QUnitType | OpUnitType, float?: boolean): number(or similar) instead ofdiff(date: ConfigType, unit: QUnitType, float?: boolean): numberInformation