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

LocaleUtils should be exported from types/index.d.ts #812

Closed
UselessPickles opened this issue Oct 4, 2018 · 3 comments
Closed

LocaleUtils should be exported from types/index.d.ts #812

UselessPickles opened this issue Oct 4, 2018 · 3 comments

Comments

@UselessPickles
Copy link

Previous versions of react-day-picker exported the LocaleUtils interface in the TypeScript type definitions. This was changed at some point, and LocaleUtils is no longer exported.

Without this exported type, it is still possible, but cumbersome, to obtain the type as follows:

import { DayPickerProps } from "react-day-picker";
type DayPickerLocaleUtils = Exclude<DayPickerProps["localeUtils"], undefined>;

It would be much more convenient if LocaleUtils was exported by "react-day-picker".

Similarly, the other interfaces defined in utils.d.ts should probably also be exported for convenience. This would be as simple as adding the following line to index.d.ts:

export * from './utils';
@ZakTax
Copy link

ZakTax commented Jan 7, 2019

I am hitting the same issue

@vertic4l
Copy link

vertic4l commented Jan 9, 2019

same here

import DayPicker, { LocaleUtils } from "react-day-picker";

react-day-picker/types"' has no exported member 'LocaleUtils'.

@UselessPickles
Copy link
Author

There's already a PR for this that have been open since Nov 28, 2018. Can we get this merged? It's a one-liner: #834

@gpbl gpbl closed this as completed in #834 Feb 21, 2019
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

3 participants