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

[typescript] types of utils broken #406

Closed
Mario-Eis opened this issue May 14, 2018 · 0 comments
Closed

[typescript] types of utils broken #406

Mario-Eis opened this issue May 14, 2018 · 0 comments

Comments

@Mario-Eis
Copy link

Environment

Tech Version
material-ui-pickers rc.8

Steps to reproduce

Just build with typescript.

Actual behavior

When using date-fns there will be:

ERROR in C:/Users/Mario/Documents/projects/privat/fiva-office-app/node_modules/material-ui-pickers/utils/luxon-utils.d.ts(2,26):
TS2307: Cannot find module 'luxon'.
ERROR in C:/Users/Mario/Documents/projects/privat/fiva-office-app/node_modules/material-ui-pickers/utils/moment-utils.d.ts(2,24):
TS2307: Cannot find module 'moment'.

I think the reason are the imports of all the utils (also unused ones) in MuiPickersUtilsProvider.d.ts

import DateFnsUtils from './date-fns-utils';
import MomentUtils from './moment-utils';
import LuxonUtils from './luxon-utils';

utils: typeof MomentUtils | typeof DateFnsUtils | typeof LuxonUtils;
should be
utils: Utils<any>
...or similar.

@Mario-Eis Mario-Eis changed the title typescript broken [typescript] types of utils broken May 14, 2018
dmtrKovalenko added a commit that referenced this issue May 15, 2018
…rop-broken

[#406] [typescript] Make utils prop of MuiPickersUtilsProvider typed …
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