Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS Typings do not export Time, TimeZoneOffset and TimeZoneInfo #20

Open
powertomato opened this issue Oct 23, 2019 · 1 comment
Open

Comments

@powertomato
Copy link

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.

@kravco
Copy link

kravco commented May 20, 2020

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>;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants