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

add typescript definitions #444

Closed
wants to merge 6 commits into from
Closed

add typescript definitions #444

wants to merge 6 commits into from

Conversation

bmagistro
Copy link

Reference: Add typescript definitions #341
Reference: Module 'moment' has no exported member 'MomentFormatSpecification' #343

I couldn't come up with a solution to 343 other than copying lines 9-13 into the typescript file for moment-timezone.

Supports: grafana/clock-panel#19

@jsf-clabot
Copy link

jsf-clabot commented Feb 4, 2017

CLA assistant check
All committers have signed the CLA.

__momentBuiltinFormatBrand: any;
}

type MomentFormatSpecification = string | MomentBuiltinFormat | (string | MomentBuiltinFormat)[];
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the inconsistent indentation intentional? (This and above vs. the interfaces below.)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was not intentional. Haven't done much with JS. I used the initial from DefinitelyTyped and referenced other typescript files to get to this one. If there is a preferred format, I can make the updates.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of the file is indented correctly--just be consistent.

@bmagistro
Copy link
Author

Not sure if this is something that can be added to the build deps to allow CI to continue, but there is a dependency on "grunt-exec" and "ntypescript".

Tests came directly from DefinitelyTyped.

@bmagistro
Copy link
Author

Changes to ".travis.yml" align with the changes being requested in #310

@bmagistro
Copy link
Author

Any updates on this getting merged in?

@maggiepint
Copy link
Member

So, this situation has been nothing but heartbreak since we started it in the main moment library. Does this package currently work? https://www.npmjs.com/package/@types/moment-timezone

If so, strong preference for leaving them there.

@bmagistro
Copy link
Author

At this point I don't remember if it worked and I couldn't figure it out or if it didn't work. I am going to say I likely had an issue with the mentioned package likely similar if not the same as #343.

@bmagistro
Copy link
Author

Closing PR, trying to redo the update and it appears this was resolved, likely in #343

@bmagistro bmagistro closed this Dec 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants