timezone-support
timezone-support copied to clipboard
TS Typings do not export Time, TimeZoneOffset and TimeZoneInfo
Are those interfaces really considered private? If so then why some public functions use them as return and/or input types?
For now I need to use "any" or redefine the interfaces in my own code, which doesn't seem right.
I agree this is an issue, but you can use TS generics to extract it from exported members:
import { convertDateToTime } from 'timezone-support';
// Time type is not exported from timezone-support
type Time = ReturnType<typeof convertDateToTime>;