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

[misc] fix min/moment-with-locales typing #5778

Closed
wants to merge 2 commits into from
Closed

[misc] fix min/moment-with-locales typing #5778

wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Nov 20, 2020

Issue

Currently importing moment/min/moment-with-locales produces a type error.

import moment from 'moment/min/moment-with-locales';
// Error(ts 7016): Could not find a declaration file for module 'moment/min/moment-with-locales'. 

It is an issue because it is specifically told in the doc to use this import path

To save the step of loading individual locales (i.e. just load them all), import the moment/min/moment-with-locales module instead.

Resolution

Redirect /min/moment-with-locales typings to ts3.1-typings/moment.d.ts

Redirect /min/moment-with-locales typings to ts3.1-typings/moment.d.ts
@ghost ghost changed the title types: fix /min/moment-with-locales typing [misc] fix /min/moment-with-locales typing Nov 20, 2020
@coveralls
Copy link

coveralls commented Nov 20, 2020

Coverage Status

Coverage decreased (-0.03%) to 88.499% when pulling b20ba9c on alburkerk:develop into 52019f1 on moment:develop.

@ronangaillard
Copy link

Same problem here, thanks for the fix !

@wanderSX
Copy link

wanderSX commented Apr 22, 2021

What's the status of it? Would be great to have this issue finally fixed

@ichernev
Copy link
Contributor

@ghost if you leave only the package.json change it can be easily merged.

ichernev added a commit that referenced this pull request Dec 24, 2023
@ichernev
Copy link
Contributor

Merged in 231cb8a (package.json only)

@ichernev ichernev closed this Dec 24, 2023
@ichernev ichernev changed the title [misc] fix /min/moment-with-locales typing [misc] fix min/moment-with-locales typing Dec 26, 2023
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

Successfully merging this pull request may close these issues.

4 participants