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 foundation #158

Closed
wants to merge 4 commits into from
Closed

typescript foundation #158

wants to merge 4 commits into from

Conversation

osdevisnot
Copy link
Contributor

@osdevisnot osdevisnot commented Dec 21, 2018

Tasks Completed:

  • Create type definitions for custom matcher used in tests
  • Configure tests to use ts-jest over jest and babel
  • Remove babel config from package.json
  • Refactor builds to use rollup with rollup.config.js over commands in scripts section of package.json
  • Repoint main, module and typyings fields in package.json to dist
  • Add new packages to package.json
  • Remove existing .d.ts file as this will now be auto generated.

Tasks Pending:

  • Match type definitions for public functions
  • add better types for internal functions
  • use more typescript features (rest/spread, arrow functions, Map, etc.)
  • switch to ts strict mode

@codecov-io
Copy link

codecov-io commented Dec 21, 2018

Codecov Report

Merging #158 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #158   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           1      1           
  Lines         183    196   +13     
  Branches       52     64   +12     
=====================================
+ Hits          183    196   +13
Impacted Files Coverage Δ
src/superfine.ts 100% <100%> (ø)

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 6c08e20...90f355e. Read the comment docs.

@osdevisnot
Copy link
Contributor Author

@jorgebucaran @mindplay-dk this is continuation of TS porting efforts that were being discussed in #155. Currently this is on a branch in my-fork and the PR is against master of this repo.

*/
export var h = function(
name: string | Function,
props?: any,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mindplay-dk existing definition for h are open to Props being a type. This works ok when declaring TS definitions separately. Any pointers on how I can achieve that using TS definitions in file?

Copy link
Contributor

Choose a reason for hiding this comment

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

The only difference as far as I can figure, is the h function will have a body - other than that, you should be able to just copy and paste from the original .d.ts?

You'll want to exclude the .d.ts from the build (as you do already) and move to emitting a generated .d.ts instead - once you have all the type declarations moved over, the emitted .d.ts should be very close to the hand-written one we have now.

(I'm not sure if that's what you were asking?)

@jorgebucaran
Copy link
Owner

The codebase has changed quite a bit. If this is going to happen, we might as well start from scratch.

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