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 declaration for utils.js #885

Closed
wants to merge 1 commit into from

Conversation

adam187
Copy link

@adam187 adam187 commented Mar 27, 2019

Add missing declaration file for utils.js file.

import { localeUtils, dateUtils, modifiersUtils } from 'react-day-picker/utils'

@codecov-io
Copy link

codecov-io commented Mar 27, 2019

Codecov Report

Merging #885 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #885   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          15     15           
  Lines         659    659           
  Branches      146    146           
=====================================
  Hits          659    659

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 421af9f...709e807. Read the comment docs.

@DylanVann
Copy link
Contributor

There doesn't need to be a declaration file for every source file, there just needs to be declarations for the public API

@adam187
Copy link
Author

adam187 commented May 3, 2019

@DylanVann This file utils.js actually looks to me like public API.

Currently, you can't use utils function like in docs in typescript because of type/export conflicts but looks like this PR should solve it.

import { DateUtils } from "react-day-picker";

'DateUtils' only refers to a type, but is being used as a value here.ts

@DylanVann
Copy link
Contributor

Yeah I’m aware of the issue I’m just not sure this will do anything to help, also aware of that PR since I made it :)

@gpbl
Copy link
Owner

gpbl commented Aug 3, 2019

#899 has been merged 🎊

@gpbl gpbl closed this Aug 3, 2019
@adam187 adam187 deleted the ts-utils branch August 5, 2019 11:47
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.

None yet

4 participants